@charisol/plexo-sdk 1.1.3 → 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.
@@ -1,6 +1,6 @@
1
- import { a as e, c as t, d as n, f as r, g as i, i as a, m as o, n as s, o as c, p as l, r as u, s as d, t as f, u as p } from "./iconSvgStatic-DKNX8fUj.js";
1
+ import { _ as e, a as t, c as n, d as r, f as i, h as a, i as o, l as s, m as c, n as l, o as u, p as d, r as f, s as p, t as m } from "./iconSvgStatic-CeiuMavi.js";
2
2
  //#region src/utilities/playground.constants.ts
3
- var m = (e) => `https://picsum.photos/seed/${encodeURIComponent(e)}/1200/800`, h = [
3
+ var h = (e) => `https://picsum.photos/seed/${encodeURIComponent(e)}/1200/800`, g = [
4
4
  {
5
5
  id: "all",
6
6
  label: "All sources"
@@ -17,7 +17,7 @@ var m = (e) => `https://picsum.photos/seed/${encodeURIComponent(e)}/1200/800`, h
17
17
  id: "pixabay",
18
18
  label: "Pixabay"
19
19
  }
20
- ], g = [
20
+ ], _ = [
21
21
  {
22
22
  id: "surface-book",
23
23
  label: "Surface Book",
@@ -84,7 +84,7 @@ var m = (e) => `https://picsum.photos/seed/${encodeURIComponent(e)}/1200/800`, h
84
84
  width: 375,
85
85
  category: "mobile"
86
86
  }
87
- ], _ = 1280, v = [
87
+ ], v = 1280, y = [
88
88
  {
89
89
  id: "facebook",
90
90
  label: "Facebook"
@@ -117,7 +117,7 @@ var m = (e) => `https://picsum.photos/seed/${encodeURIComponent(e)}/1200/800`, h
117
117
  id: "tiktok",
118
118
  label: "TikTok"
119
119
  }
120
- ], y = [
120
+ ], b = [
121
121
  {
122
122
  label: "Text",
123
123
  value: "text"
@@ -150,7 +150,7 @@ var m = (e) => `https://picsum.photos/seed/${encodeURIComponent(e)}/1200/800`, h
150
150
  label: "Checkbox",
151
151
  value: "checkbox"
152
152
  }
153
- ], b = [
153
+ ], x = [
154
154
  {
155
155
  label: "1 Column",
156
156
  widths: ["100%"],
@@ -199,7 +199,7 @@ var m = (e) => `https://picsum.photos/seed/${encodeURIComponent(e)}/1200/800`, h
199
199
  "25%"
200
200
  ]
201
201
  }
202
- ], x = [
202
+ ], S = [
203
203
  {
204
204
  label: "Roboto",
205
205
  value: "'Roboto', sans-serif",
@@ -600,8 +600,8 @@ var m = (e) => `https://picsum.photos/seed/${encodeURIComponent(e)}/1200/800`, h
600
600
  value: "'Great Vibes', cursive",
601
601
  style: "handwriting"
602
602
  }
603
- ], S = new Map(x.map((e) => [e.value, e.label]));
604
- function C(e, t = []) {
603
+ ], C = new Map(S.map((e) => [e.value, e.label]));
604
+ function w(e, t = []) {
605
605
  let n = /* @__PURE__ */ new Set(), r = (e) => {
606
606
  if (!e) return;
607
607
  let t = Array.isArray(e.columns) ? e.columns : [];
@@ -619,17 +619,17 @@ function C(e, t = []) {
619
619
  for (let e of t) typeof e == "string" && e.trim() && n.add(e.trim());
620
620
  return n;
621
621
  }
622
- function w(e) {
622
+ function T(e) {
623
623
  let t = /* @__PURE__ */ new Set();
624
624
  for (let n of e) {
625
- let e = S.get(n);
625
+ let e = C.get(n);
626
626
  e && t.add(e);
627
627
  }
628
628
  return t.size === 0 ? null : `https://fonts.googleapis.com/css?family=${Array.from(t).map((e) => `${encodeURIComponent(e).replace(/%20/g, "+")}:400,700`).join("|")}&display=swap`;
629
629
  }
630
630
  //#endregion
631
631
  //#region src/utilities/responsiveDefaults.ts
632
- var T = {
632
+ var ee = {
633
633
  tablet: {
634
634
  thresholdPx: 24,
635
635
  scale: .85,
@@ -640,7 +640,7 @@ var T = {
640
640
  scale: .7,
641
641
  floorPx: 14
642
642
  }
643
- }, ee = {
643
+ }, E = {
644
644
  tablet: {
645
645
  thresholdPx: 320,
646
646
  scale: .8,
@@ -651,7 +651,7 @@ var T = {
651
651
  scale: .55,
652
652
  floorPx: 140
653
653
  }
654
- }, E = {
654
+ }, D = {
655
655
  tablet: {
656
656
  thresholdPx: 48,
657
657
  scale: .75,
@@ -662,7 +662,7 @@ var T = {
662
662
  scale: .55,
663
663
  floorPx: 16
664
664
  }
665
- }, D = {
665
+ }, O = {
666
666
  tablet: {
667
667
  thresholdPx: 500,
668
668
  scale: 1,
@@ -673,11 +673,11 @@ var T = {
673
673
  scale: 1,
674
674
  floorPx: 0
675
675
  }
676
- }, O = ["fontSize"], k = [
676
+ }, k = ["fontSize"], A = [
677
677
  "height",
678
678
  "minHeight",
679
679
  "maxHeight"
680
- ], A = [
680
+ ], j = [
681
681
  "padding",
682
682
  "paddingTop",
683
683
  "paddingBottom",
@@ -686,8 +686,8 @@ var T = {
686
686
  "margin",
687
687
  "marginTop",
688
688
  "marginBottom"
689
- ], j = ["width", "maxWidth"];
690
- function M(e) {
689
+ ], M = ["width", "maxWidth"];
690
+ function N(e) {
691
691
  if (typeof e == "number" && Number.isFinite(e)) return e;
692
692
  if (typeof e != "string") return null;
693
693
  let t = e.trim().match(/^(-?\d+(?:\.\d+)?)px$/);
@@ -695,59 +695,47 @@ function M(e) {
695
695
  let n = parseFloat(t[1]);
696
696
  return Number.isFinite(n) ? n : null;
697
697
  }
698
- function N(e, t) {
698
+ function P(e, t) {
699
699
  return e < t.thresholdPx ? null : Math.max(Math.round(e * t.scale), t.floorPx);
700
700
  }
701
- function P(e, t) {
701
+ function F(e, t) {
702
702
  if (!e || typeof e != "object") return {};
703
703
  let n = {};
704
- for (let r of O) {
705
- let i = M(e[r]);
706
- if (i === null) continue;
707
- let a = N(i, T[t]);
708
- a !== null && (n[r] = `${a}px`);
709
- }
710
704
  for (let r of k) {
711
- let i = M(e[r]);
705
+ let i = N(e[r]);
712
706
  if (i === null) continue;
713
- let a = N(i, ee[t]);
707
+ let a = P(i, ee[t]);
714
708
  a !== null && (n[r] = `${a}px`);
715
709
  }
716
710
  for (let r of A) {
717
- let i = M(e[r]);
711
+ let i = N(e[r]);
718
712
  if (i === null) continue;
719
- let a = N(i, E[t]);
713
+ let a = P(i, E[t]);
720
714
  a !== null && (n[r] = `${a}px`);
721
715
  }
722
716
  for (let r of j) {
723
- let i = M(e[r]);
724
- i !== null && i >= D[t].thresholdPx && (n[r] = "100%");
717
+ let i = N(e[r]);
718
+ if (i === null) continue;
719
+ let a = P(i, D[t]);
720
+ a !== null && (n[r] = `${a}px`);
721
+ }
722
+ for (let r of M) {
723
+ let i = N(e[r]);
724
+ i !== null && i >= O[t].thresholdPx && (n[r] = "100%");
725
725
  }
726
726
  return n;
727
727
  }
728
- function F(e, t, n) {
728
+ function I(e, t, n) {
729
729
  let r = e || {};
730
730
  return n ? {
731
731
  ...r,
732
- ...P(r, n),
732
+ ...F(r, n),
733
733
  ...t || {}
734
734
  } : r;
735
735
  }
736
736
  //#endregion
737
737
  //#region src/utilities/compiler.ts
738
- var I = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif", te = (e) => e === "twitter" ? "x" : e, L = (e, t = "currentColor") => {
739
- switch (te(e)) {
740
- case "facebook": return `<svg viewBox="0 0 24 24" width="16" height="16" aria-hidden="true"><path fill="${t}" d="M14 8h2V4h-2c-2.2 0-4 1.8-4 4v2H8v4h2v6h4v-6h2.5l.5-4H14V8c0-.55.45-1 1-1Z"/></svg>`;
741
- case "instagram": return `<svg viewBox="0 0 24 24" width="16" height="16" aria-hidden="true"><rect x="4" y="4" width="16" height="16" rx="5" ry="5" fill="none" stroke="${t}" stroke-width="2"/><circle cx="12" cy="12" r="3.5" fill="none" stroke="${t}" stroke-width="2"/><circle cx="17" cy="7" r="1" fill="${t}"/></svg>`;
742
- case "linkedin": return `<svg viewBox="0 0 24 24" width="16" height="16" aria-hidden="true"><circle cx="8" cy="9" r="1.25" fill="${t}"/><path fill="${t}" d="M7 11h2v6H7zM11 11h2v.9c.5-.7 1.34-1.15 2.4-1.15 2 0 3.1 1.25 3.1 3.6V17h-2v-2.2c0-1.3-.45-2.05-1.55-2.05-1.2 0-1.85.8-1.85 2.05V17h-2z"/></svg>`;
743
- case "x": return `<svg viewBox="0 0 24 24" width="16" height="16" aria-hidden="true"><path fill="${t}" d="M6 5h3.1l3 4.2L15.7 5H18l-4.8 5.5L18.4 18h-3.1l-3.3-4.7L8 18H5.6l5-5.8z"/></svg>`;
744
- case "youtube": return `<svg viewBox="0 0 24 24" width="16" height="16" aria-hidden="true"><rect x="3" y="6.5" width="18" height="11" rx="3" fill="${t}"/><path fill="#fff" d="m10 9 5 3-5 3z"/></svg>`;
745
- case "pinterest": return `<svg viewBox="0 0 24 24" width="16" height="16" aria-hidden="true"><path fill="${t}" d="M12 4a8 8 0 0 0-2.9 15.46c-.04-1.17 0-2.58.3-3.82l1.1-4.6s-.27-.56-.27-1.4c0-1.3.75-2.27 1.68-2.27.8 0 1.18.6 1.18 1.3 0 .8-.5 2-.77 3.12-.22.94.47 1.7 1.4 1.7 1.67 0 2.8-2.15 2.8-4.7 0-1.93-1.3-3.37-3.67-3.37-2.68 0-4.35 2-4.35 4.23 0 .77.23 1.34.6 1.77.17.2.2.29.13.53l-.2.8c-.07.25-.3.34-.56.25-1.55-.63-2.27-2.32-2.27-4.22 0-3.14 2.64-6.9 7.89-6.9 4.21 0 6.98 3.05 6.98 6.32 0 4.32-2.4 7.54-5.93 7.54-1.18 0-2.28-.64-2.65-1.37l-.73 2.78c-.26.95-.77 2.14-1.22 2.96A8 8 0 1 0 12 4Z"/></svg>`;
746
- case "whatsapp": return `<svg viewBox="0 0 24 24" width="16" height="16" aria-hidden="true"><path fill="${t}" d="M12 4a8 8 0 0 0-6.9 12.04L4 20l4.11-1.06A8 8 0 1 0 12 4Zm4.55 11.36c-.2.56-1.14 1.04-1.57 1.1-.4.06-.92.09-1.48-.08-.34-.11-.78-.25-1.35-.5-2.37-1.03-3.92-3.45-4.04-3.6-.11-.15-.96-1.27-.96-2.42s.6-1.72.8-1.96c.2-.24.45-.3.6-.3h.43c.14 0 .33-.05.51.38.2.48.7 1.67.75 1.79.06.12.1.26.02.42-.07.15-.11.26-.22.39-.11.13-.23.29-.33.39-.11.11-.22.23-.1.45.11.22.52.86 1.11 1.39.76.68 1.4.89 1.62.99.22.11.35.09.48-.06.13-.15.56-.65.72-.88.15-.22.31-.18.52-.11.22.08 1.36.64 1.6.76.23.11.38.17.44.27.06.1.06.61-.14 1.17Z"/></svg>`;
747
- case "tiktok": return `<svg viewBox="0 0 24 24" width="16" height="16" aria-hidden="true"><path fill="${t}" d="M14.4 4c.24 1.12.9 2.08 1.86 2.67.7.42 1.52.64 2.35.63V10a6.5 6.5 0 0 1-4.2-1.52v5.24A4.72 4.72 0 1 1 9.7 9v2.6a2.12 2.12 0 1 0 2.1 2.12V4z"/></svg>`;
748
- default: return `<svg viewBox="0 0 24 24" width="16" height="16" aria-hidden="true"><circle cx="12" cy="12" r="4" fill="${t}"/></svg>`;
749
- }
750
- };
738
+ var L = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif";
751
739
  function R(e) {
752
740
  if (!e || typeof e != "object") return null;
753
741
  if (Array.isArray(e.columns) && e.columns.length > 0) return e;
@@ -1021,7 +1009,7 @@ function V(e) {
1021
1009
  }
1022
1010
  function H(e, t, n, r, i) {
1023
1011
  let a = {
1024
- ...P(n, r),
1012
+ ...F(n, r),
1025
1013
  ...i || {}
1026
1014
  };
1027
1015
  for (let e of Object.keys(a)) V(a[e]) && delete a[e];
@@ -1134,84 +1122,84 @@ function Y(e, t, n) {
1134
1122
  function X(e) {
1135
1123
  return `<!-- Unsupported block ${String(e)} -->`;
1136
1124
  }
1137
- var Z = (i) => {
1138
- if (!i || typeof i != "object") return "";
1139
- let m = i.style || {}, h = z(i.type === "form_container" ? {
1125
+ var Z = (e) => {
1126
+ if (!e || typeof e != "object") return "";
1127
+ let h = e.style || {}, g = z(e.type === "form_container" ? {
1140
1128
  ...U(),
1141
- ...m
1142
- } : m), g = i.attributes || {}, _ = ` data-plexo-id="${W(i.id)}"`;
1143
- switch (i.type) {
1144
- case "heading": return `<h2${_} style="margin-top: 0; margin-bottom: 8px; ${h}">${g.text || "Heading"}</h2>`;
1145
- case "paragraph": return `<p${_} style="margin-top: 0; margin-bottom: 12px; ${h}">${g.text || "Paragraph text content."}</p>`;
1146
- case "text": return `<div${_} style="${h}">${g.text || ""}</div>`;
1129
+ ...h
1130
+ } : h), _ = e.attributes || {}, v = ` data-plexo-id="${W(e.id)}"`;
1131
+ switch (e.type) {
1132
+ case "heading": return `<h2${v} style="margin-top: 0; margin-bottom: 8px; ${g}">${_.text || "Heading"}</h2>`;
1133
+ case "paragraph": return `<p${v} style="margin-top: 0; margin-bottom: 12px; ${g}">${_.text || "Paragraph text content."}</p>`;
1134
+ case "text": return `<div${v} style="${g}">${_.text || ""}</div>`;
1147
1135
  case "button": {
1148
- let e = a(i), t = z({
1149
- ...m,
1150
- width: e.width,
1151
- height: e.height
1136
+ let n = t(e), r = z({
1137
+ ...h,
1138
+ width: n.width,
1139
+ height: n.height
1152
1140
  });
1153
- return `<div style="text-align: ${m.textAlign || "center"};"><a${_} href="${g.href || "#"}" target="${g.openInNewTab ? "_blank" : "_self"}" style="display: inline-block; text-decoration: none; ${t}">${g.text || "Button"}</a></div>`;
1141
+ return `<div style="text-align: ${h.textAlign || "center"};"><a${v} href="${_.href || "#"}" target="${_.openInNewTab ? "_blank" : "_self"}" style="display: inline-block; text-decoration: none; ${r}">${_.text || "Button"}</a></div>`;
1154
1142
  }
1155
1143
  case "image": {
1156
- let e = t(i), n = m.textAlign === "center" ? "margin: 0 auto; display: block;" : m.textAlign === "right" ? "margin-left: auto; display: block;" : "display: inline-block;", r = z({
1157
- ...m,
1158
- width: e.width,
1159
- height: e.height
1144
+ let t = s(e), n = h.textAlign === "center" ? "margin: 0 auto; display: block;" : h.textAlign === "right" ? "margin-left: auto; display: block;" : "display: inline-block;", r = z({
1145
+ ...h,
1146
+ width: t.width,
1147
+ height: t.height
1160
1148
  });
1161
- return `<img${_} src="${g.src || "https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe"}" alt="${g.alt || ""}" style="${r} ${n}" />`;
1149
+ return `<img${v} src="${_.src || "https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe"}" alt="${_.alt || ""}" style="${r} ${n}" />`;
1162
1150
  }
1163
- case "divider": return `<hr${_} style="border: 0; border-top: ${m.borderWidth || "1px"} ${m.borderStyle || "solid"} ${m.borderColor || "#334155"}; ${h}" />`;
1164
- case "spacer": return `<div${_} style="height: ${m.height || "24px"};"></div>`;
1165
- case "card": return `<div${_} style="${h}">
1166
- <h3 style="margin-top: 0; margin-bottom: 8px; color: #ffffff;">${g.title || "Card Title"}</h3>
1167
- <p style="margin: 0; color: #94a3b8; font-size: 14px;">${g.description || "Card description."}</p>
1151
+ case "divider": return `<hr${v} style="border: 0; border-top: ${h.borderWidth || "1px"} ${h.borderStyle || "solid"} ${h.borderColor || "#334155"}; ${g}" />`;
1152
+ case "spacer": return `<div${v} style="height: ${h.height || "24px"};"></div>`;
1153
+ case "card": return `<div${v} style="${g}">
1154
+ <h3 style="margin-top: 0; margin-bottom: 8px; color: #ffffff;">${_.title || "Card Title"}</h3>
1155
+ <p style="margin: 0; color: #94a3b8; font-size: 14px;">${_.description || "Card description."}</p>
1168
1156
  </div>`;
1169
1157
  case "form_container": {
1170
1158
  let t = {
1171
1159
  ...U(),
1172
- ...m
1160
+ ...h
1173
1161
  }, n = {};
1174
1162
  for (let e of Object.keys(t)) K.includes(e) || (n[e] = t[e]);
1175
- n.height = e(i);
1176
- let r = z(n), a = c(Array.isArray(g.fields) ? g.fields : []), o = t.fieldSpacing || "12px", s = a.map((e) => `<div style="margin-bottom: ${o};">${q(e)}</div>`).join(""), l = g.buttonAutoWidth === !1 ? t.buttonWidth || "100%" : "auto", d = t.buttonAlign === "left" ? "flex-start" : t.buttonAlign === "right" ? "flex-end" : "center", f = g.buttonAutoHeight === !1 && t.buttonHeight || "auto", p = z({
1163
+ n.height = u(e);
1164
+ let r = z(n), i = p(Array.isArray(_.fields) ? _.fields : []), a = t.fieldSpacing || "12px", s = i.map((e) => `<div style="margin-bottom: ${a};">${q(e)}</div>`).join(""), c = _.buttonAutoWidth === !1 ? t.buttonWidth || "100%" : "auto", l = t.buttonAlign === "left" ? "flex-start" : t.buttonAlign === "right" ? "flex-end" : "center", d = _.buttonAutoHeight === !1 && t.buttonHeight || "auto", f = z({
1177
1165
  backgroundColor: t.buttonBackgroundColor,
1178
1166
  color: t.buttonTextColor,
1179
1167
  borderRadius: t.buttonBorderRadius,
1180
- paddingTop: u(t.buttonPaddingTop, t.buttonPadding, "top", "10px"),
1181
- paddingBottom: u(t.buttonPaddingBottom, t.buttonPadding, "bottom", "10px"),
1182
- paddingLeft: u(t.buttonPaddingLeft, t.buttonPadding, "left", "14px"),
1183
- paddingRight: u(t.buttonPaddingRight, t.buttonPadding, "right", "14px"),
1184
- marginTop: u(t.buttonMarginTop, t.buttonMargin, "top"),
1185
- marginBottom: u(t.buttonMarginBottom, t.buttonMargin, "bottom"),
1186
- marginLeft: u(t.buttonMarginLeft, t.buttonMargin, "left"),
1187
- marginRight: u(t.buttonMarginRight, t.buttonMargin, "right"),
1168
+ paddingTop: o(t.buttonPaddingTop, t.buttonPadding, "top", "10px"),
1169
+ paddingBottom: o(t.buttonPaddingBottom, t.buttonPadding, "bottom", "10px"),
1170
+ paddingLeft: o(t.buttonPaddingLeft, t.buttonPadding, "left", "14px"),
1171
+ paddingRight: o(t.buttonPaddingRight, t.buttonPadding, "right", "14px"),
1172
+ marginTop: o(t.buttonMarginTop, t.buttonMargin, "top"),
1173
+ marginBottom: o(t.buttonMarginBottom, t.buttonMargin, "bottom"),
1174
+ marginLeft: o(t.buttonMarginLeft, t.buttonMargin, "left"),
1175
+ marginRight: o(t.buttonMarginRight, t.buttonMargin, "right"),
1188
1176
  fontSize: t.buttonFontSize,
1189
1177
  fontWeight: t.buttonFontWeight,
1190
- width: l,
1191
- height: f
1178
+ width: c,
1179
+ height: d
1192
1180
  });
1193
- return `<form${_} action="${W(g.actionUrl || g.action || "#")}" method="${W(g.method || "POST")}" style="${r}">${s}<div style="display: flex; width: 100%; justify-content: ${d};"><button type="submit" style="border: 0; cursor: pointer; ${p}">${g.submitLabel || "Submit"}</button></div></form>`;
1181
+ return `<form${v} action="${W(_.actionUrl || _.action || "#")}" method="${W(_.method || "POST")}" style="${r}">${s}<div style="display: flex; width: 100%; justify-content: ${l};"><button type="submit" style="border: 0; cursor: pointer; ${f}">${_.submitLabel || "Submit"}</button></div></form>`;
1194
1182
  }
1195
1183
  case "input": {
1196
- let e = g.inputType || g.type || "text", t = W(g.name || g.fieldName || "field"), n = W(g.placeholder || ""), r = g.required ? " required" : "";
1197
- return `<input${_} type="${W(e)}" name="${t}" placeholder="${n}" style="width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid #334155; ${h}"${r} />`;
1184
+ let e = _.inputType || _.type || "text", t = W(_.name || _.fieldName || "field"), n = W(_.placeholder || ""), r = _.required ? " required" : "";
1185
+ return `<input${v} type="${W(e)}" name="${t}" placeholder="${n}" style="width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid #334155; ${g}"${r} />`;
1198
1186
  }
1199
- case "textarea": return `<textarea${_} name="${W(g.name || g.fieldName || "field")}" placeholder="${W(g.placeholder || "")}" style="width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid #334155; ${h}"${g.required ? " required" : ""}></textarea>`;
1200
- case "select": return `<select${_} name="${W(g.name || g.fieldName || "field")}" style="width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid #334155; ${h}"${g.required ? " required" : ""}>${(Array.isArray(g.options) ? g.options : []).map((e) => `<option value="${W(e?.value ?? "")}">${e?.label ?? e?.value ?? ""}</option>`).join("")}</select>`;
1201
- case "html": return `<div${_} style="${z({
1202
- ...m,
1203
- height: d(i, "auto")
1204
- })}">${g.htmlContent || g.text || ""}</div>`;
1187
+ case "textarea": return `<textarea${v} name="${W(_.name || _.fieldName || "field")}" placeholder="${W(_.placeholder || "")}" style="width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid #334155; ${g}"${_.required ? " required" : ""}></textarea>`;
1188
+ case "select": return `<select${v} name="${W(_.name || _.fieldName || "field")}" style="width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid #334155; ${g}"${_.required ? " required" : ""}>${(Array.isArray(_.options) ? _.options : []).map((e) => `<option value="${W(e?.value ?? "")}">${e?.label ?? e?.value ?? ""}</option>`).join("")}</select>`;
1189
+ case "html": return `<div${v} style="${z({
1190
+ ...h,
1191
+ height: n(e, "auto")
1192
+ })}">${_.htmlContent || _.text || ""}</div>`;
1205
1193
  case "social": {
1206
- let e = n(i), t = m.textAlign === "center" ? "center" : m.textAlign === "right" ? "flex-end" : "flex-start";
1207
- return `<div${_} style="${z({
1208
- padding: m.padding,
1209
- margin: m.margin,
1194
+ let t = i(e), n = h.textAlign === "center" ? "center" : h.textAlign === "right" ? "flex-end" : "flex-start";
1195
+ return `<div${v} style="${z({
1196
+ padding: h.padding,
1197
+ margin: h.margin,
1210
1198
  display: "flex",
1211
1199
  flexWrap: "wrap",
1212
- gap: m.iconSpacing || "8px",
1213
- justifyContent: t
1214
- })}">${e.map((e) => {
1200
+ gap: h.iconSpacing || "8px",
1201
+ justifyContent: n
1202
+ })}">${t.map((e) => {
1215
1203
  let t = z({
1216
1204
  width: e.size,
1217
1205
  height: e.size,
@@ -1224,137 +1212,137 @@ var Z = (i) => {
1224
1212
  justifyContent: "center",
1225
1213
  overflow: "hidden"
1226
1214
  });
1227
- return `<a href="${W(e.url)}" style="${t} text-decoration: none;">${L(e.provider, e.color)}</a>`;
1215
+ return `<a href="${W(e.url)}" style="${t} text-decoration: none;">${l(e.provider, e.color)}</a>`;
1228
1216
  }).join("")}</div>`;
1229
1217
  }
1230
1218
  case "menu": {
1231
- let e = p(i), t = m.textAlign === "center" ? "center" : m.textAlign === "right" ? "flex-end" : "flex-start";
1232
- return `<div${_} style="${z({
1233
- ...m,
1219
+ let t = r(e), n = h.textAlign === "center" ? "center" : h.textAlign === "right" ? "flex-end" : "flex-start";
1220
+ return `<div${v} style="${z({
1221
+ ...h,
1234
1222
  display: "flex",
1235
1223
  flexWrap: "wrap",
1236
1224
  gap: "16px",
1237
- justifyContent: t
1238
- })}">${e.map((e) => `<a href="${W(e.href)}" style="text-decoration: none; color: inherit; font-weight: ${m.fontWeight || 600};">${W(e.label)}</a>`).join("")}</div>`;
1225
+ justifyContent: n
1226
+ })}">${t.map((e) => `<a href="${W(e.href)}" style="text-decoration: none; color: inherit; font-weight: ${h.fontWeight || 600};">${W(e.label)}</a>`).join("")}</div>`;
1239
1227
  }
1240
1228
  case "icon": {
1241
- let e = m.fontSize || `${g.iconSize || 48}px`, t = m.color || "#1e293b", n = parseInt(String(e), 10) || 48, r = f(g.iconName, n, t), i = m.textAlign === "right" ? "flex-end" : m.textAlign === "left" ? "flex-start" : "center", a = z({
1242
- padding: m.padding,
1243
- margin: m.margin,
1229
+ let e = h.fontSize || `${_.iconSize || 48}px`, t = h.color || "#1e293b", n = parseInt(String(e), 10) || 48, r = m(_.iconName, n, t), i = h.textAlign === "right" ? "flex-end" : h.textAlign === "left" ? "flex-start" : "center", a = z({
1230
+ padding: h.padding,
1231
+ margin: h.margin,
1244
1232
  display: "flex",
1245
1233
  justifyContent: i
1246
- }), o = typeof g.href == "string" ? g.href.trim() : "", s = `<span style="display: inline-flex; align-items: center; justify-content: center; color: ${t};">${r}</span>`;
1247
- return `<div style="${a}">${o ? `<a${_} href="${W(o)}" target="${g.openInNewTab ? "_blank" : "_self"}" style="text-decoration: none;">${s}</a>` : `<span${_}>${s}</span>`}</div>`;
1234
+ }), o = typeof _.href == "string" ? _.href.trim() : "", s = `<span style="display: inline-flex; align-items: center; justify-content: center; color: ${t};">${r}</span>`;
1235
+ return `<div style="${a}">${o ? `<a${v} href="${W(o)}" target="${_.openInNewTab ? "_blank" : "_self"}" style="text-decoration: none;">${s}</a>` : `<span${v}>${s}</span>`}</div>`;
1248
1236
  }
1249
1237
  case "table": {
1250
- let e = r(i), t = `${m.borderWidth || "1px"} ${m.borderStyle || "solid"} ${m.borderColor || "#cbd5e1"}`, n = (n, r, i) => {
1251
- let a = i ? "th" : "td", o = i ? m.headerBgColor || "#f8fafc" : e.striped && r % 2 == 1 ? "#f8fafc" : m.contentBgColor || "#ffffff", s = i ? m.headerTextColor || "#1e293b" : m.contentTextColor || "#475569", c = i ? m.headerTextAlign || "left" : m.contentTextAlign || "left";
1252
- return `<tr>${n.map((e) => {
1253
- let n = z({
1254
- padding: m.cellPadding || "8px",
1255
- border: t,
1238
+ let t = d(e), n = `${h.borderWidth || "1px"} ${h.borderStyle || "solid"} ${h.borderColor || "#cbd5e1"}`, r = (e, r, i) => {
1239
+ let a = i ? "th" : "td", o = i ? h.headerBgColor || "#f8fafc" : t.striped && r % 2 == 1 ? "#f8fafc" : h.contentBgColor || "#ffffff", s = i ? h.headerTextColor || "#1e293b" : h.contentTextColor || "#475569", c = i ? h.headerTextAlign || "left" : h.contentTextAlign || "left";
1240
+ return `<tr>${e.map((e) => {
1241
+ let t = z({
1242
+ padding: h.cellPadding || "8px",
1243
+ border: n,
1256
1244
  backgroundColor: o,
1257
1245
  color: s,
1258
1246
  textAlign: c,
1259
- lineHeight: m.contentLineHeight,
1260
- letterSpacing: m.contentLetterSpacing,
1247
+ lineHeight: h.contentLineHeight,
1248
+ letterSpacing: h.contentLetterSpacing,
1261
1249
  fontWeight: i ? "700" : void 0
1262
1250
  });
1263
- return `<${a} style="${n}">${e || "&nbsp;"}</${a}>`;
1251
+ return `<${a} style="${t}">${e || "&nbsp;"}</${a}>`;
1264
1252
  }).join("")}</tr>`;
1265
- }, a = e.enableHeader && e.cells.length > 0 ? `<thead>${n(e.cells[0], 0, !0)}</thead>` : "", o = +!!e.enableHeader, s = e.enableFooter ? e.cells.length - 1 : e.cells.length, c = e.cells.slice(o, Math.max(o, s)).map((e, t) => n(e, t, !1)).join(""), l = e.enableFooter && e.cells.length > o ? `<tfoot>${n(e.cells[e.cells.length - 1], e.cells.length - 1, !1)}</tfoot>` : "", u = z({
1253
+ }, i = t.enableHeader && t.cells.length > 0 ? `<thead>${r(t.cells[0], 0, !0)}</thead>` : "", a = +!!t.enableHeader, o = t.enableFooter ? t.cells.length - 1 : t.cells.length, s = t.cells.slice(a, Math.max(a, o)).map((e, t) => r(e, t, !1)).join(""), c = t.enableFooter && t.cells.length > a ? `<tfoot>${r(t.cells[t.cells.length - 1], t.cells.length - 1, !1)}</tfoot>` : "", l = z({
1266
1254
  borderCollapse: "collapse",
1267
1255
  width: "100%"
1268
1256
  });
1269
- return `<div${_} style="${z({
1270
- padding: m.padding,
1271
- margin: m.margin,
1257
+ return `<div${v} style="${z({
1258
+ padding: h.padding,
1259
+ margin: h.margin,
1272
1260
  overflowX: "auto"
1273
- })}"><table style="${u}">${a}<tbody>${c}</tbody>${l}</table></div>`;
1261
+ })}"><table style="${l}">${i}<tbody>${s}</tbody>${c}</table></div>`;
1274
1262
  }
1275
1263
  case "video": {
1276
- let e = o(g.videoUrl), t = g.linkType === "email" ? `mailto:${g.href || ""}` : g.href || g.videoUrl || "#", n = g.target || "_blank";
1277
- return `<div${_} style="${z({
1278
- padding: m.padding,
1279
- margin: m.margin,
1280
- borderRadius: m.borderRadius,
1264
+ let e = a(_.videoUrl), t = _.linkType === "email" ? `mailto:${_.href || ""}` : _.href || _.videoUrl || "#", n = _.target || "_blank";
1265
+ return `<div${v} style="${z({
1266
+ padding: h.padding,
1267
+ margin: h.margin,
1268
+ borderRadius: h.borderRadius,
1281
1269
  overflow: "hidden"
1282
- })}"><a href="${W(t)}" target="${W(n)}" style="position: relative; display: block; text-decoration: none;"><img src="${W(e.thumbnailUrl)}" alt="${W(g.alt || "Video preview")}" style="width: 100%; display: block;" /><span style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 56px; height: 56px; border-radius: 9999px; background: rgba(15, 23, 42, 0.75); display: flex; align-items: center; justify-content: center;"><span style="width: 0; height: 0; border-top: 10px solid transparent; border-bottom: 10px solid transparent; border-left: 16px solid #ffffff; margin-left: 4px;"></span></span></a></div>`;
1270
+ })}"><a href="${W(t)}" target="${W(n)}" style="position: relative; display: block; text-decoration: none;"><img src="${W(e.thumbnailUrl)}" alt="${W(_.alt || "Video preview")}" style="width: 100%; display: block;" /><span style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 56px; height: 56px; border-radius: 9999px; background: rgba(15, 23, 42, 0.75); display: flex; align-items: center; justify-content: center;"><span style="width: 0; height: 0; border-top: 10px solid transparent; border-bottom: 10px solid transparent; border-left: 16px solid #ffffff; margin-left: 4px;"></span></span></a></div>`;
1283
1271
  }
1284
1272
  case "timer": {
1285
- let e = g.showLabels !== !1, t = z({
1286
- fontFamily: m.digitsFontFamily,
1287
- fontSize: m.digitsFontSize || "40px",
1288
- color: m.digitsColor || "#1e293b",
1273
+ let t = _.showLabels !== !1, n = z({
1274
+ fontFamily: h.digitsFontFamily,
1275
+ fontSize: h.digitsFontSize || "40px",
1276
+ color: h.digitsColor || "#1e293b",
1289
1277
  fontWeight: "800"
1290
- }), n = z({
1291
- fontFamily: m.labelsFontFamily,
1292
- fontSize: m.labelsFontSize || "16px",
1293
- color: m.labelsColor || "#64748b"
1294
1278
  }), r = z({
1295
- backgroundColor: m.backgroundColor || "#f8fafc",
1296
- borderRadius: m.borderRadius || "8px",
1297
- padding: m.padding || "16px",
1279
+ fontFamily: h.labelsFontFamily,
1280
+ fontSize: h.labelsFontSize || "16px",
1281
+ color: h.labelsColor || "#64748b"
1282
+ }), i = z({
1283
+ backgroundColor: h.backgroundColor || "#f8fafc",
1284
+ borderRadius: h.borderRadius || "8px",
1285
+ padding: h.padding || "16px",
1298
1286
  textAlign: "center"
1299
- }), a = (r, i, a) => `<div style="display: inline-flex; flex-direction: column; align-items: center; padding: 0 10px;"><span data-unit="${r}" style="${t}">${a}</span>${e ? `<span style="${n}">${i}</span>` : ""}</div>`, o = l(g.targetDate), s = W(g.targetDate || "2026-12-31T23:59:59"), c = `<script>(function(){var wrap=document.querySelector(${JSON.stringify(`[data-plexo-id="${i.id}"]`)});if(!wrap)return;var target=new Date(wrap.getAttribute('data-plexo-target')).getTime();function pad(n){return String(n).padStart(2,'0');}function tick(){var diff=target-Date.now();var d=wrap.querySelector('[data-unit="days"]'),h=wrap.querySelector('[data-unit="hours"]'),m=wrap.querySelector('[data-unit="minutes"]'),s=wrap.querySelector('[data-unit="seconds"]');if(diff<=0){[d,h,m,s].forEach(function(n){if(n)n.textContent='00';});clearInterval(iv);return;}var total=Math.floor(diff/1000);if(d)d.textContent=pad(Math.floor(total/86400));if(h)h.textContent=pad(Math.floor(total%86400/3600));if(m)m.textContent=pad(Math.floor(total%3600/60));if(s)s.textContent=pad(total%60);}tick();var iv=setInterval(tick,1000);})();<\/script>`;
1300
- return `<div${_} data-plexo-target="${s}" style="${r}"><div>${a("days", "Days", o.days)}${a("hours", "Hours", o.hours)}${a("minutes", "Mins", o.minutes)}${a("seconds", "Secs", o.seconds)}</div>${c}</div>`;
1287
+ }), a = (e, i, a) => `<div style="display: inline-flex; flex-direction: column; align-items: center; padding: 0 10px;"><span data-unit="${e}" style="${n}">${a}</span>${t ? `<span style="${r}">${i}</span>` : ""}</div>`, o = c(_.targetDate), s = W(_.targetDate || "2026-12-31T23:59:59"), l = `<script>(function(){var wrap=document.querySelector(${JSON.stringify(`[data-plexo-id="${e.id}"]`)});if(!wrap)return;var target=new Date(wrap.getAttribute('data-plexo-target')).getTime();function pad(n){return String(n).padStart(2,'0');}function tick(){var diff=target-Date.now();var d=wrap.querySelector('[data-unit="days"]'),h=wrap.querySelector('[data-unit="hours"]'),m=wrap.querySelector('[data-unit="minutes"]'),s=wrap.querySelector('[data-unit="seconds"]');if(diff<=0){[d,h,m,s].forEach(function(n){if(n)n.textContent='00';});clearInterval(iv);return;}var total=Math.floor(diff/1000);if(d)d.textContent=pad(Math.floor(total/86400));if(h)h.textContent=pad(Math.floor(total%86400/3600));if(m)m.textContent=pad(Math.floor(total%3600/60));if(s)s.textContent=pad(total%60);}tick();var iv=setInterval(tick,1000);})();<\/script>`;
1288
+ return `<div${v} data-plexo-target="${s}" style="${i}"><div>${a("days", "Days", o.days)}${a("hours", "Hours", o.hours)}${a("minutes", "Mins", o.minutes)}${a("seconds", "Secs", o.seconds)}</div>${l}</div>`;
1301
1289
  }
1302
1290
  case "carousel": {
1303
- let e = Array.isArray(g.images) ? g.images : [], t = z({
1304
- padding: m.padding || "10px",
1305
- margin: m.margin,
1306
- backgroundColor: m.backgroundColor,
1291
+ let t = Array.isArray(_.images) ? _.images : [], n = z({
1292
+ padding: h.padding || "10px",
1293
+ margin: h.margin,
1294
+ backgroundColor: h.backgroundColor,
1307
1295
  position: "relative",
1308
1296
  overflow: "hidden",
1309
1297
  borderRadius: "12px"
1310
1298
  });
1311
- if (e.length === 0) return `<div${_} style="${t}"><div style="padding: 40px; text-align: center; color: #94a3b8;">No images in carousel</div></div>`;
1312
- let n = Math.min(e.length - 1, Math.max(0, parseInt(String(g.activeIdx), 10) || 0)), r = e.map((e, t) => `<div data-slide-idx="${t}" style="display: ${t === n ? "block" : "none"};"><img src="${W(e.src)}" alt="${W(e.alt || e.caption || "")}" style="width: 100%; display: block;" />${e.caption ? `<div style="padding: 8px; text-align: center; background: rgba(15, 23, 42, 0.8); color: #fff; font-size: 12px; font-weight: 600;">${W(e.caption)}</div>` : ""}</div>`).join(""), a = e.length > 1 ? `<div style="display: flex; gap: 6px; justify-content: center; padding: 8px 0;">${e.map((e, t) => `<button type="button" data-dot-idx="${t}" style="width: 8px; height: 8px; border-radius: 9999px; border: none; background: ${t === n ? "#4f46e5" : "#cbd5e1"}; cursor: pointer;"></button>`).join("")}</div>` : "";
1313
- return `<div${_} data-active-idx="${n}" style="${t}">${e.length > 1 ? "<button type=\"button\" data-nav=\"prev\" style=\"position: absolute; left: 8px; top: 40%; transform: translateY(-50%); border: none; background: rgba(15, 23, 42, 0.6); color: #fff; width: 28px; height: 28px; border-radius: 9999px; cursor: pointer;\">‹</button><button type=\"button\" data-nav=\"next\" style=\"position: absolute; right: 8px; top: 40%; transform: translateY(-50%); border: none; background: rgba(15, 23, 42, 0.6); color: #fff; width: 28px; height: 28px; border-radius: 9999px; cursor: pointer;\">›</button>" : ""}${r}${a}${`<script>(function(){var wrap=document.querySelector(${JSON.stringify(`[data-plexo-id="${i.id}"]`)});if(!wrap)return;var slides=wrap.querySelectorAll('[data-slide-idx]');var dots=wrap.querySelectorAll('[data-dot-idx]');function show(n){var idx=(n+slides.length)%slides.length;slides.forEach(function(s,i){s.style.display=i===idx?'block':'none';});dots.forEach(function(d,i){d.style.background=i===idx?'#4f46e5':'#cbd5e1';});wrap.setAttribute('data-active-idx',String(idx));}var prev=wrap.querySelector('[data-nav="prev"]');var next=wrap.querySelector('[data-nav="next"]');if(prev)prev.addEventListener('click',function(){show(parseInt(wrap.getAttribute('data-active-idx')||'0',10)-1);});if(next)next.addEventListener('click',function(){show(parseInt(wrap.getAttribute('data-active-idx')||'0',10)+1);});dots.forEach(function(d,i){d.addEventListener('click',function(){show(i);});});})();<\/script>`}</div>`;
1299
+ if (t.length === 0) return `<div${v} style="${n}"><div style="padding: 40px; text-align: center; color: #94a3b8;">No images in carousel</div></div>`;
1300
+ let r = Math.min(t.length - 1, Math.max(0, parseInt(String(_.activeIdx), 10) || 0)), i = t.map((e, t) => `<div data-slide-idx="${t}" style="display: ${t === r ? "block" : "none"};"><img src="${W(e.src)}" alt="${W(e.alt || e.caption || "")}" style="width: 100%; display: block;" />${e.caption ? `<div style="padding: 8px; text-align: center; background: rgba(15, 23, 42, 0.8); color: #fff; font-size: 12px; font-weight: 600;">${W(e.caption)}</div>` : ""}</div>`).join(""), a = t.length > 1 ? `<div style="display: flex; gap: 6px; justify-content: center; padding: 8px 0;">${t.map((e, t) => `<button type="button" data-dot-idx="${t}" style="width: 8px; height: 8px; border-radius: 9999px; border: none; background: ${t === r ? "#4f46e5" : "#cbd5e1"}; cursor: pointer;"></button>`).join("")}</div>` : "";
1301
+ return `<div${v} data-active-idx="${r}" style="${n}">${t.length > 1 ? "<button type=\"button\" data-nav=\"prev\" style=\"position: absolute; left: 8px; top: 40%; transform: translateY(-50%); border: none; background: rgba(15, 23, 42, 0.6); color: #fff; width: 28px; height: 28px; border-radius: 9999px; cursor: pointer;\">‹</button><button type=\"button\" data-nav=\"next\" style=\"position: absolute; right: 8px; top: 40%; transform: translateY(-50%); border: none; background: rgba(15, 23, 42, 0.6); color: #fff; width: 28px; height: 28px; border-radius: 9999px; cursor: pointer;\">›</button>" : ""}${i}${a}${`<script>(function(){var wrap=document.querySelector(${JSON.stringify(`[data-plexo-id="${e.id}"]`)});if(!wrap)return;var slides=wrap.querySelectorAll('[data-slide-idx]');var dots=wrap.querySelectorAll('[data-dot-idx]');function show(n){var idx=(n+slides.length)%slides.length;slides.forEach(function(s,i){s.style.display=i===idx?'block':'none';});dots.forEach(function(d,i){d.style.background=i===idx?'#4f46e5':'#cbd5e1';});wrap.setAttribute('data-active-idx',String(idx));}var prev=wrap.querySelector('[data-nav="prev"]');var next=wrap.querySelector('[data-nav="next"]');if(prev)prev.addEventListener('click',function(){show(parseInt(wrap.getAttribute('data-active-idx')||'0',10)-1);});if(next)next.addEventListener('click',function(){show(parseInt(wrap.getAttribute('data-active-idx')||'0',10)+1);});dots.forEach(function(d,i){d.addEventListener('click',function(){show(i);});});})();<\/script>`}</div>`;
1314
1302
  }
1315
1303
  case "accordion": {
1316
- let e = s(i), t = g.mode === "multi" ? "multi" : "single", n = g.iconStyle || "chevron", r = g.iconPosition === "left", a = g.showDividers !== !1, o = g.animation !== "none", c = z({
1317
- border: `${m.borderWidth || "1px"} ${m.borderStyle || "solid"} ${m.borderColor || "#e2e8f0"}`,
1318
- borderRadius: m.borderRadius || "10px",
1304
+ let t = f(e), n = _.mode === "multi" ? "multi" : "single", r = _.iconStyle || "chevron", i = _.iconPosition === "left", a = _.showDividers !== !1, o = _.animation !== "none", s = z({
1305
+ border: `${h.borderWidth || "1px"} ${h.borderStyle || "solid"} ${h.borderColor || "#e2e8f0"}`,
1306
+ borderRadius: h.borderRadius || "10px",
1319
1307
  overflow: "hidden",
1320
- margin: m.margin
1308
+ margin: h.margin
1321
1309
  });
1322
- return e.length === 0 ? `<div${_} style="${c}"></div>` : `<div${_} data-acc-mode="${t}" data-acc-icon-style="${n}" style="${c}"><div class="plexo-acc-group">${Y(e, m, {
1323
- iconStyle: n,
1324
- iconOnLeft: r,
1310
+ return t.length === 0 ? `<div${v} style="${s}"></div>` : `<div${v} data-acc-mode="${n}" data-acc-icon-style="${r}" style="${s}"><div class="plexo-acc-group">${Y(t, h, {
1311
+ iconStyle: r,
1312
+ iconOnLeft: i,
1325
1313
  showDividers: a,
1326
1314
  animated: o
1327
- })}</div>${`<script>(function(){var root=document.querySelector(${JSON.stringify(`[data-plexo-id="${i.id}"]`)});if(!root)return;var mode=root.getAttribute('data-acc-mode')||'single';var iconStyle=root.getAttribute('data-acc-icon-style')||'chevron';function setIconState(icon,open){if(!icon)return;if(iconStyle==='plus'){icon.textContent=open?'−':'+';}else if(iconStyle==='arrow'){icon.style.transform=open?'rotate(90deg)':'';}else if(iconStyle==='chevron'){icon.style.transform=open?'rotate(180deg)':'';}}var headers=root.querySelectorAll('[data-acc-header]');headers.forEach(function(header){header.addEventListener('click',function(){var item=header.parentElement;var group=item.parentElement;var panel=item.children[1];var isOpen=header.getAttribute('data-acc-open')==='1';if(mode!=='multi'&&group){Array.prototype.forEach.call(group.children,function(sib){if(sib===item)return;var sh=sib.children[0];var sp=sib.children[1];if(sh){sh.setAttribute('data-acc-open','0');setIconState(sh.querySelector('[data-acc-icon]'),false);}if(sp)sp.style.gridTemplateRows='0fr';});}var next=!isOpen;header.setAttribute('data-acc-open',next?'1':'0');panel.style.gridTemplateRows=next?'1fr':'0fr';setIconState(header.querySelector('[data-acc-icon]'),next);});});})();<\/script>`}</div>`;
1315
+ })}</div>${`<script>(function(){var root=document.querySelector(${JSON.stringify(`[data-plexo-id="${e.id}"]`)});if(!root)return;var mode=root.getAttribute('data-acc-mode')||'single';var iconStyle=root.getAttribute('data-acc-icon-style')||'chevron';function setIconState(icon,open){if(!icon)return;if(iconStyle==='plus'){icon.textContent=open?'−':'+';}else if(iconStyle==='arrow'){icon.style.transform=open?'rotate(90deg)':'';}else if(iconStyle==='chevron'){icon.style.transform=open?'rotate(180deg)':'';}}var headers=root.querySelectorAll('[data-acc-header]');headers.forEach(function(header){header.addEventListener('click',function(){var item=header.parentElement;var group=item.parentElement;var panel=item.children[1];var isOpen=header.getAttribute('data-acc-open')==='1';if(mode!=='multi'&&group){Array.prototype.forEach.call(group.children,function(sib){if(sib===item)return;var sh=sib.children[0];var sp=sib.children[1];if(sh){sh.setAttribute('data-acc-open','0');setIconState(sh.querySelector('[data-acc-icon]'),false);}if(sp)sp.style.gridTemplateRows='0fr';});}var next=!isOpen;header.setAttribute('data-acc-open',next?'1':'0');panel.style.gridTemplateRows=next?'1fr':'0fr';setIconState(header.querySelector('[data-acc-icon]'),next);});});})();<\/script>`}</div>`;
1328
1316
  }
1329
- default: return X(i.type);
1317
+ default: return X(e.type);
1330
1318
  }
1331
- }, Q = (e, t) => {
1332
- if (!e || typeof e != "object") return "";
1333
- let n = R(e);
1334
- if (!n) return `\n <!-- ROW SKIPPED (type="${typeof e.type == "string" ? e.type : "unknown"}"${e.id ? `, id="${e.id}"` : ""}): this row has no 'columns' array and its shorthand content (e.g. a list of items/links) can't be auto-converted without losing data. Provide a fully hydrated row with 'columns' and 'elements' instead. -->`;
1335
- let r = z(n.style || {}), a = G("id", n.htmlId), o = G("class", n.htmlClass), s = n.id || `row-${Math.random().toString(36).substring(2, 9)}`;
1336
- H(t, s, n.style, "tablet", n.styleTablet), H(t, s, n.style, "mobile", n.styleMobile);
1337
- let c = `\n <!-- ROW START: ${n.id || "row"} -->`;
1338
- c += `\n <div data-plexo-id="${s}"${a}${o} class="plexo-row" style="display: flex; flex-wrap: wrap; margin-left: -8px; margin-right: -8px; ${r}">`;
1339
- let l = Array.isArray(n.columns) ? n.columns : [];
1340
- for (let e of l) {
1341
- if (!e) continue;
1342
- let n = e.styles || e.style || {}, r = z(n), a = G("id", e.attrs?.htmlId), o = e.attrs?.htmlClass ? ` ${e.attrs.htmlClass}` : "", s = e.id || `col-${Math.random().toString(36).substring(2, 9)}`;
1343
- H(t, s, n, "tablet", e.stylesTablet), H(t, s, n, "mobile", e.stylesMobile), c += `\n <!-- COLUMN START: ${e.id || "col"} -->`, c += `\n <div data-plexo-id="${s}"${a} class="plexo-col${o}" style="box-sizing: border-box; padding-left: 8px; padding-right: 8px; width: ${e.width || "100%"}; ${r}">`;
1344
- let l = Array.isArray(e.elements) ? e.elements : [], u = Array.isArray(e.nestedRows) ? e.nestedRows : [], d = new Map(l.map((e) => [e.id, e])), f = new Map(u.map((e) => [e.id, e]));
1345
- for (let n of i({
1346
- ...e,
1319
+ }, Q = (t, n) => {
1320
+ if (!t || typeof t != "object") return "";
1321
+ let r = R(t);
1322
+ if (!r) return `\n <!-- ROW SKIPPED (type="${typeof t.type == "string" ? t.type : "unknown"}"${t.id ? `, id="${t.id}"` : ""}): this row has no 'columns' array and its shorthand content (e.g. a list of items/links) can't be auto-converted without losing data. Provide a fully hydrated row with 'columns' and 'elements' instead. -->`;
1323
+ let i = z(r.style || {}), a = G("id", r.htmlId), o = G("class", r.htmlClass), s = r.id || `row-${Math.random().toString(36).substring(2, 9)}`;
1324
+ H(n, s, r.style, "tablet", r.styleTablet), H(n, s, r.style, "mobile", r.styleMobile);
1325
+ let c = `\n <!-- ROW START: ${r.id || "row"} -->`;
1326
+ c += `\n <div data-plexo-id="${s}"${a}${o} class="plexo-row" style="display: flex; flex-wrap: wrap; margin-left: -8px; margin-right: -8px; ${i}">`;
1327
+ let l = Array.isArray(r.columns) ? r.columns : [];
1328
+ for (let t of l) {
1329
+ if (!t) continue;
1330
+ let r = t.styles || t.style || {}, i = z(r), a = G("id", t.attrs?.htmlId), o = t.attrs?.htmlClass ? ` ${t.attrs.htmlClass}` : "", s = t.id || `col-${Math.random().toString(36).substring(2, 9)}`;
1331
+ H(n, s, r, "tablet", t.stylesTablet), H(n, s, r, "mobile", t.stylesMobile), c += `\n <!-- COLUMN START: ${t.id || "col"} -->`, c += `\n <div data-plexo-id="${s}"${a} class="plexo-col${o}" style="box-sizing: border-box; padding-left: 8px; padding-right: 8px; width: ${t.width || "100%"}; ${i}">`;
1332
+ let l = Array.isArray(t.elements) ? t.elements : [], u = Array.isArray(t.nestedRows) ? t.nestedRows : [], d = new Map(l.map((e) => [e.id, e])), f = new Map(u.map((e) => [e.id, e]));
1333
+ for (let r of e({
1334
+ ...t,
1347
1335
  elements: l,
1348
1336
  nestedRows: u
1349
1337
  })) {
1350
- let e = d.get(n);
1338
+ let e = d.get(r);
1351
1339
  if (e) {
1352
- let n = e.attributes || {}, r = typeof n.htmlClassNames == "string" ? n.htmlClassNames : typeof n.htmlClass == "string" ? n.htmlClass : typeof n.className == "string" ? n.className : "", i = G("id", n.htmlId), a = G("class", r), o = e.style?.display, s = o === "inline-block" || o === "inline" || o === "inline-flex" ? `margin-bottom: 16px; display: ${o}; vertical-align: top;` : "margin-bottom: 16px;";
1353
- H(t, e.id, e.style, "tablet", e.styleTablet), H(t, e.id, e.style, "mobile", e.styleMobile), c += `\n <div${i}${a} style="${s}">`, c += `\n ${Z(e)}`, c += "\n </div>";
1340
+ let t = e.attributes || {}, r = typeof t.htmlClassNames == "string" ? t.htmlClassNames : typeof t.htmlClass == "string" ? t.htmlClass : typeof t.className == "string" ? t.className : "", i = G("id", t.htmlId), a = G("class", r), o = e.style?.display, s = o === "inline-block" || o === "inline" || o === "inline-flex" ? `margin-bottom: 16px; display: ${o}; vertical-align: top;` : "margin-bottom: 16px;";
1341
+ H(n, e.id, e.style, "tablet", e.styleTablet), H(n, e.id, e.style, "mobile", e.styleMobile), c += `\n <div${i}${a} style="${s}">`, c += `\n ${Z(e)}`, c += "\n </div>";
1354
1342
  continue;
1355
1343
  }
1356
- let r = f.get(n);
1357
- r && (c += Q(r, t));
1344
+ let t = f.get(r);
1345
+ t && (c += Q(t, n));
1358
1346
  }
1359
1347
  c += "\n </div>";
1360
1348
  }
@@ -1387,7 +1375,7 @@ var Z = (i) => {
1387
1375
  "favicon"
1388
1376
  ], a = {};
1389
1377
  for (let e of Object.keys(r)) i.includes(e) || (a[e] = r[e]);
1390
- let o = z(a), s = typeof r.htmlTitle == "string" && r.htmlTitle.trim() ? r.htmlTitle.trim() : typeof e?.name == "string" && e.name.trim() ? e.name.trim() : "Plexo Rendered Page", c = G("id", r.htmlId), l = G("class", r.htmlClass), u = typeof r.customCss == "string" && r.customCss.trim() ? r.customCss.trim() : "", d = typeof r.customJs == "string" && r.customJs.trim() ? r.customJs.trim() : "", f = typeof r.favicon == "string" && r.favicon.trim() ? r.favicon.trim() : "", p = Array.isArray(n.rows) ? n.rows : Array.isArray(t.rows) ? t.rows : Array.isArray(e.rows) ? e.rows : [], m = w(C(p, [r.fontFamily])), h = {
1378
+ let o = z(a), s = typeof r.htmlTitle == "string" && r.htmlTitle.trim() ? r.htmlTitle.trim() : typeof e?.name == "string" && e.name.trim() ? e.name.trim() : "Plexo Rendered Page", c = G("id", r.htmlId), l = G("class", r.htmlClass), u = typeof r.customCss == "string" && r.customCss.trim() ? r.customCss.trim() : "", d = typeof r.customJs == "string" && r.customJs.trim() ? r.customJs.trim() : "", f = typeof r.favicon == "string" && r.favicon.trim() ? r.favicon.trim() : "", p = Array.isArray(n.rows) ? n.rows : Array.isArray(t.rows) ? t.rows : Array.isArray(e.rows) ? e.rows : [], m = T(w(p, [r.fontFamily])), h = {
1391
1379
  tablet: [],
1392
1380
  mobile: []
1393
1381
  }, g = "";
@@ -1401,7 +1389,7 @@ var Z = (i) => {
1401
1389
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
1402
1390
  ${m ? `<link rel="stylesheet" href="${m}">` : ""}
1403
1391
  <style>
1404
- body { margin: 0; font-family: ${I}; }
1392
+ body { margin: 0; font-family: ${L}; }
1405
1393
  .plexo-row {
1406
1394
  display: flex;
1407
1395
  flex-wrap: wrap;
@@ -1431,14 +1419,14 @@ ${d ? ` <script>\n${d}\n <\/script>` : ""}
1431
1419
  </body>
1432
1420
  </html>`, y = y.replace(/<span[^>]*data-merge-val="([^"]*)"[^>]*>[\s\S]*?<\/span>/gi, "$1"), y;
1433
1421
  };
1434
- function ne(e) {
1422
+ function te(e) {
1435
1423
  return $(e).replace(/<[^>]*>/g, " ").replace(/\s+/g, " ").trim();
1436
1424
  }
1437
- function re(e) {
1425
+ function ne(e) {
1438
1426
  return $(e);
1439
1427
  }
1440
- function ie(e) {
1428
+ function re(e) {
1441
1429
  return e;
1442
1430
  }
1443
1431
  //#endregion
1444
- export { x as _, re as a, h as b, U as c, F as d, w as f, y as g, g as h, $ as i, B as l, b as m, K as n, ne as o, C as p, H as r, R as s, I as t, ie as u, _ as v, m as x, v as y };
1432
+ export { S as _, ne as a, g as b, U as c, I as d, T as f, b as g, _ as h, $ as i, B as l, x as m, K as n, te as o, w as p, H as r, R as s, L as t, re as u, v, h as x, y };