monto-email-builder 1.4.7 → 1.4.8

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 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/HtmlEditor/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6F,MAAM,OAAO,CAAC;AAmBlH,OAAO,EAaL,OAAO,EAIP,KAAK,EAKN,MAAM,eAAe,CAAC;AAWvB,OAAO,EAAE,QAAQ,EAAK,MAAM,SAAS,CAAC;AAWtC,OAAO,EAUL,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,KAAK,kCAAkC,EACxC,MAAM,aAAa,CAAC;AAYrB,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;AAC1D,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,QAAQ,CAAC;AACpD,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG,WAAW,CAAC;AACzD,YAAY,EACV,uBAAuB,EACvB,sBAAsB,EACtB,kCAAkC,GACnC,CAAC;AAEF,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,MAAM,CAAC;IAC7B,aAAa,EAAE,MAAM,sBAAsB,EAAE,CAAC;IAC9C,YAAY,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,sBAAsB,EAAE,KAAK,IAAI,KAAK,sBAAsB,EAAE,CAAC;IACjG,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;IAC5D,aAAa,EAAE,MAAM,IAAI,CAAC;CAC3B;AA8DD,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC;;;OAGG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB;;;OAGG;IACH,WAAW,CAAC,EAAE,cAAc,CAAC;IAC7B;;;OAGG;IACH,aAAa,CAAC,EAAE,gBAAgB,CAAC;IACjC;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IACpB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,eAAe,CAAC,EAAE,kBAAkB,CAAC;IACrC;;OAEG;IACH,SAAS,CAAC,EAAE,uBAAuB,EAAE,CAAC;IACtC;;OAEG;IACH,iBAAiB,CAAC,EAAE,CAAC,SAAS,EAAE,sBAAsB,EAAE,KAAK,IAAI,CAAC;IAClE;;;OAGG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAC;CACnC;AA4+BD,QAAA,MAAM,mBAAmB,uFAevB,CAAC;AAGH,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/HtmlEditor/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6F,MAAM,OAAO,CAAC;AAmBlH,OAAO,EAaL,OAAO,EAIP,KAAK,EAKN,MAAM,eAAe,CAAC;AAWvB,OAAO,EAAE,QAAQ,EAAK,MAAM,SAAS,CAAC;AAWtC,OAAO,EAUL,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,KAAK,kCAAkC,EACxC,MAAM,aAAa,CAAC;AAYrB,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;AAC1D,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,QAAQ,CAAC;AACpD,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG,WAAW,CAAC;AACzD,YAAY,EACV,uBAAuB,EACvB,sBAAsB,EACtB,kCAAkC,GACnC,CAAC;AAEF,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,MAAM,CAAC;IAC7B,aAAa,EAAE,MAAM,sBAAsB,EAAE,CAAC;IAC9C,YAAY,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,sBAAsB,EAAE,KAAK,IAAI,KAAK,sBAAsB,EAAE,CAAC;IACjG,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;IAC5D,aAAa,EAAE,MAAM,IAAI,CAAC;CAC3B;AA8DD,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC;;;OAGG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB;;;OAGG;IACH,WAAW,CAAC,EAAE,cAAc,CAAC;IAC7B;;;OAGG;IACH,aAAa,CAAC,EAAE,gBAAgB,CAAC;IACjC;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IACpB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,eAAe,CAAC,EAAE,kBAAkB,CAAC;IACrC;;OAEG;IACH,SAAS,CAAC,EAAE,uBAAuB,EAAE,CAAC;IACtC;;OAEG;IACH,iBAAiB,CAAC,EAAE,CAAC,SAAS,EAAE,sBAAsB,EAAE,KAAK,IAAI,CAAC;IAClE;;;OAGG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAC;CACnC;AA6/BD,QAAA,MAAM,mBAAmB,uFAevB,CAAC;AAGH,eAAe,mBAAmB,CAAC"}
@@ -1,383 +1,390 @@
1
- import { jsx as r, jsxs as x, Fragment as Ot } from "react/jsx-runtime";
2
- import { forwardRef as mt, useState as V, useRef as $, useEffect as G, useCallback as L, useMemo as Q, useImperativeHandle as Pt } from "react";
3
- import _t from "@uiw/react-codemirror";
4
- import { html as Wt } from "@codemirror/lang-html";
5
- import { xcodeDark as jt, tomorrowNightBlue as Gt, dracula as ht, basicDark as qt, abcdef as Ut, bbedit as Yt, noctisLilac as Kt, gruvboxLight as Xt, tokyoNightDay as Jt, vscodeLight as Qt, xcodeLight as Zt } from "@uiw/codemirror-themes-all";
1
+ import { jsx as n, jsxs as g, Fragment as Wt } from "react/jsx-runtime";
2
+ import { forwardRef as pt, useState as V, useRef as w, useEffect as z, useCallback as k, useMemo as Q, useImperativeHandle as jt } from "react";
3
+ import Gt from "@uiw/react-codemirror";
4
+ import { html as Ut } from "@codemirror/lang-html";
5
+ import { xcodeDark as qt, tomorrowNightBlue as Yt, dracula as ft, basicDark as Kt, abcdef as Xt, bbedit as Jt, noctisLilac as Qt, gruvboxLight as Zt, tokyoNightDay as er, vscodeLight as tr, xcodeLight as rr } from "@uiw/codemirror-themes-all";
6
6
  import Z from "@mui/material/ToggleButton";
7
- import rt from "@mui/material/ToggleButtonGroup";
8
- import { ThemeProvider as er, ScopedCssBaseline as tr, useTheme as rr, Box as h, Tooltip as q, FormControl as or, InputLabel as nr, Select as ar, ListSubheader as ot, MenuItem as nt, Button as Te, Tabs as ir, Tab as at, Typography as k, Accordion as lr, AccordionSummary as sr, AccordionDetails as cr, TextField as we, Divider as dr } from "@mui/material";
9
- import { alpha as ue } from "@mui/material/styles";
10
- import * as ur from "@mui/icons-material/AddOutlined";
11
- import * as mr from "@mui/icons-material/Code";
12
- import * as hr from "@mui/icons-material/DataObjectOutlined";
13
- import * as br from "@mui/icons-material/ExpandMoreOutlined";
14
- import * as pr from "@mui/icons-material/HelpOutlined";
15
- import * as fr from "@mui/icons-material/Visibility";
16
- import * as xr from "@mui/icons-material/ViewColumn";
17
- import * as gr from "@mui/icons-material/MonitorOutlined";
18
- import * as vr from "@mui/icons-material/PhoneIphoneOutlined";
19
- import { B as yr, V as A, r as B, T as Ir, a as it, t as Er } from "./chunks/chunk-C6lRuHXq.js";
20
- const Ce = yr, U = "unsubscribe_link", he = /\{\{\s*([^{}]+?)\s*\}\}/g, lt = /\{%\s*([^{}%]+?)\s*%\}/g;
21
- function He(o) {
22
- return (o || "").replace(he, (l, u, c, g) => {
7
+ import at from "@mui/material/ToggleButtonGroup";
8
+ import { ThemeProvider as nr, ScopedCssBaseline as or, useTheme as ar, Box as h, Tooltip as U, FormControl as ir, InputLabel as lr, Select as sr, ListSubheader as it, MenuItem as lt, Button as He, Tabs as cr, Tab as st, Typography as A, Accordion as dr, AccordionSummary as ur, AccordionDetails as mr, TextField as we, Divider as hr } from "@mui/material";
9
+ import { alpha as he } from "@mui/material/styles";
10
+ import * as br from "@mui/icons-material/AddOutlined";
11
+ import * as pr from "@mui/icons-material/Code";
12
+ import * as fr from "@mui/icons-material/DataObjectOutlined";
13
+ import * as gr from "@mui/icons-material/ExpandMoreOutlined";
14
+ import * as xr from "@mui/icons-material/HelpOutlined";
15
+ import * as vr from "@mui/icons-material/Visibility";
16
+ import * as yr from "@mui/icons-material/ViewColumn";
17
+ import * as Ir from "@mui/icons-material/MonitorOutlined";
18
+ import * as Er from "@mui/icons-material/PhoneIphoneOutlined";
19
+ import { B as Vr, V as B, r as R, T as Cr, a as ct, t as Tr } from "./chunks/chunk-C6lRuHXq.js";
20
+ const De = Vr, q = "unsubscribe_link", pe = /\{\{\s*([^{}]+?)\s*\}\}/g, dt = /\{%\s*([^{}%]+?)\s*%\}/g;
21
+ function Se(r) {
22
+ return (r || "").replace(pe, (l, u, c, x) => {
23
23
  const i = c + l.length;
24
- if (!be(g, c, i, "{", "}")) return l;
24
+ if (!fe(x, c, i, "{", "}")) return l;
25
25
  const m = String(u).trim();
26
- return !m || !A.test(m) || m !== U ? l : `{%${m}%}`;
26
+ return !m || !B.test(m) || m !== q ? l : `{%${m}%}`;
27
27
  });
28
28
  }
29
- function be(o, a, l, u, c) {
30
- return o[a - 1] !== u && o[l] !== c;
29
+ function fe(r, a, l, u, c) {
30
+ return r[a - 1] !== u && r[l] !== c;
31
31
  }
32
- function bt(o, a = "user") {
33
- return a === "builtin" || a === "system" ? `{%${o}%}` : `{{${o}}}`;
32
+ function gt(r, a = "user") {
33
+ return a === "builtin" || a === "system" ? `{%${r}%}` : `{{${r}}}`;
34
34
  }
35
- function Vr(o) {
36
- const a = typeof o == "string" ? o.trim() : "";
35
+ function Hr(r) {
36
+ const a = typeof r == "string" ? r.trim() : "";
37
37
  if (a.startsWith("{{") && a.endsWith("}}")) {
38
38
  const l = a.slice(2, -2).trim();
39
- if (A.test(l))
39
+ if (B.test(l))
40
40
  return {
41
41
  attribute: l,
42
- type: l === U ? "system" : "user"
42
+ type: l === q ? "system" : "user"
43
43
  };
44
44
  }
45
45
  if (a.startsWith("{%") && a.endsWith("%}")) {
46
46
  const l = a.slice(2, -2).trim();
47
- if (A.test(l)) return { attribute: l, type: "system" };
47
+ if (B.test(l)) return { attribute: l, type: "system" };
48
48
  }
49
49
  return null;
50
50
  }
51
- function Tr(o, a) {
52
- const l = o.variable ?? o.Variable ?? o.key ?? "", u = Vr(l), c = String(o.attribute ?? o.Attribute ?? (u == null ? void 0 : u.attribute) ?? "").trim(), g = o.type ?? o.Type ?? (u == null ? void 0 : u.type) ?? (c === U ? "system" : "user"), i = c === U || g === "system" ? "system" : "user", m = o.attribute ?? o.Attribute ?? (u == null ? void 0 : u.attribute) ?? "", b = String(m).trim();
53
- return !b || !A.test(b) ? null : {
54
- id: Number(o.id) || a + 1,
55
- variableInstanceId: o.variableInstanceId ?? o.VariableInstanceId,
51
+ function wr(r, a) {
52
+ const l = r.variable ?? r.Variable ?? r.key ?? "", u = Hr(l), c = String(r.attribute ?? r.Attribute ?? (u == null ? void 0 : u.attribute) ?? "").trim(), x = r.type ?? r.Type ?? (u == null ? void 0 : u.type) ?? (c === q ? "system" : "user"), i = c === q || x === "system" ? "system" : "user", m = r.attribute ?? r.Attribute ?? (u == null ? void 0 : u.attribute) ?? "", b = String(m).trim();
53
+ return !b || !B.test(b) ? null : {
54
+ id: Number(r.id) || a + 1,
55
+ variableInstanceId: r.variableInstanceId ?? r.VariableInstanceId,
56
56
  variable: i === "system" ? `{%${b}%}` : `{{${b}}}`,
57
57
  type: i,
58
58
  attribute: b,
59
- default: String(o.default ?? o.Default ?? o.value ?? "")
59
+ default: String(r.default ?? r.Default ?? r.value ?? "")
60
60
  };
61
61
  }
62
- function st(o) {
63
- return Array.isArray(o) ? o.map((a, l) => Tr(a, l)).filter((a) => !!a).map((a, l) => ({
62
+ function ut(r) {
63
+ return Array.isArray(r) ? r.map((a, l) => wr(a, l)).filter((a) => !!a).map((a, l) => ({
64
64
  ...a,
65
65
  id: l + 1,
66
- variableInstanceId: a.variableInstanceId || De(a.type, a.attribute, l)
66
+ variableInstanceId: a.variableInstanceId || Le(a.type, a.attribute, l)
67
67
  })) : [];
68
68
  }
69
- function ee(o) {
70
- const a = o || "", l = [], u = (i, m, b) => {
69
+ function ee(r) {
70
+ const a = r || "", l = [], u = (i, m, b) => {
71
71
  l.push({ attribute: i, type: m, start: b });
72
72
  };
73
73
  let c;
74
- for (he.lastIndex = 0; c = he.exec(a); ) {
74
+ for (pe.lastIndex = 0; c = pe.exec(a); ) {
75
75
  const i = c.index, m = i + c[0].length;
76
- if (!be(a, i, m, "{", "}")) continue;
76
+ if (!fe(a, i, m, "{", "}")) continue;
77
77
  const b = c[1].trim();
78
- !b || !A.test(b) || u(b, "user", i);
78
+ !b || !B.test(b) || u(b, "user", i);
79
79
  }
80
- let g;
81
- for (lt.lastIndex = 0; g = lt.exec(a); ) {
82
- const i = g.index, m = i + g[0].length;
83
- if (!be(a, i, m, "{", "}")) continue;
84
- const b = g[1].trim();
85
- !b || !A.test(b) || u(b, "system", i);
80
+ let x;
81
+ for (dt.lastIndex = 0; x = dt.exec(a); ) {
82
+ const i = x.index, m = i + x[0].length;
83
+ if (!fe(a, i, m, "{", "}")) continue;
84
+ const b = x[1].trim();
85
+ !b || !B.test(b) || u(b, "system", i);
86
86
  }
87
87
  return l.sort((i, m) => i.start - m.start), l.map((i, m) => ({
88
88
  id: m + 1,
89
- variableInstanceId: Sr(i.type, i.attribute, i.start),
89
+ variableInstanceId: Lr(i.type, i.attribute, i.start),
90
90
  variable: i.type === "system" ? `{%${i.attribute}%}` : `{{${i.attribute}}}`,
91
91
  type: i.type,
92
92
  attribute: i.attribute,
93
93
  default: ""
94
94
  }));
95
95
  }
96
- function me(o, a) {
96
+ function be(r, a) {
97
97
  const l = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map();
98
98
  return a.forEach((c) => {
99
- const g = { item: c, consumed: !1 };
99
+ const x = { item: c, consumed: !1 };
100
100
  if (c.variableInstanceId) {
101
101
  const b = l.get(c.variableInstanceId) ?? [];
102
- b.push(g), l.set(c.variableInstanceId, b);
102
+ b.push(x), l.set(c.variableInstanceId, b);
103
103
  }
104
104
  const i = `${c.type}:${c.attribute}`, m = u.get(i) ?? [];
105
- m.push(g), u.set(i, m);
106
- }), o.map((c, g) => {
107
- var R;
108
- const i = `${c.type}:${c.attribute}`, m = c.variableInstanceId ? (R = l.get(c.variableInstanceId)) == null ? void 0 : R.find((v) => !v.consumed) : void 0, b = (u.get(i) ?? []).find((v) => !v.consumed), C = m ?? b;
109
- return C && (C.consumed = !0), {
105
+ m.push(x), u.set(i, m);
106
+ }), r.map((c, x) => {
107
+ var N;
108
+ const i = `${c.type}:${c.attribute}`, m = c.variableInstanceId ? (N = l.get(c.variableInstanceId)) == null ? void 0 : N.find((v) => !v.consumed) : void 0, b = (u.get(i) ?? []).find((v) => !v.consumed), S = m ?? b;
109
+ return S && (S.consumed = !0), {
110
110
  ...c,
111
- id: g + 1,
112
- variableInstanceId: c.variableInstanceId || De(c.type, c.attribute, g),
113
- default: c.type === "system" ? "" : (C == null ? void 0 : C.item.default) ?? c.default ?? ""
111
+ id: x + 1,
112
+ variableInstanceId: c.variableInstanceId || Le(c.type, c.attribute, x),
113
+ default: c.type === "system" ? "" : (S == null ? void 0 : S.item.default) ?? c.default ?? ""
114
114
  };
115
115
  });
116
116
  }
117
- function wr(o) {
118
- return o.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
117
+ function Sr(r) {
118
+ return r.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
119
119
  }
120
- function ct(o, a) {
120
+ function mt(r, a) {
121
121
  const l = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map();
122
122
  a.forEach((i) => {
123
123
  i.type === "user" && (i.variableInstanceId && l.set(i.variableInstanceId, i.default ?? ""), u.has(i.attribute) || u.set(i.attribute, i.default ?? ""));
124
124
  });
125
- const c = ee(o), g = /* @__PURE__ */ new Map();
125
+ const c = ee(r), x = /* @__PURE__ */ new Map();
126
126
  return c.forEach((i) => {
127
127
  const m = Number(String(i.variableInstanceId ?? "").split("-at-")[1]);
128
- Number.isFinite(m) && g.set(m, i);
129
- }), (o || "").replace(he, (i, m, b, C) => {
128
+ Number.isFinite(m) && x.set(m, i);
129
+ }), (r || "").replace(pe, (i, m, b, S) => {
130
130
  var te;
131
- const R = b + i.length;
132
- if (!be(C, b, R, "{", "}")) return i;
131
+ const N = b + i.length;
132
+ if (!fe(S, b, N, "{", "}")) return i;
133
133
  const v = String(m).trim();
134
- if (!v || !A.test(v)) return i;
135
- const z = (te = g.get(b)) == null ? void 0 : te.variableInstanceId, N = (z ? l.get(z) : void 0) ?? (a.filter((s) => s.type === "user" && s.attribute === v).length === 1 ? u.get(v) : void 0);
136
- return N === void 0 || N === "" ? i : wr(N);
134
+ if (!v || !B.test(v)) return i;
135
+ const $ = (te = x.get(b)) == null ? void 0 : te.variableInstanceId, O = ($ ? l.get($) : void 0) ?? (a.filter((s) => s.type === "user" && s.attribute === v).length === 1 ? u.get(v) : void 0);
136
+ return O === void 0 || O === "" ? i : Sr(O);
137
137
  });
138
138
  }
139
- function dt(o, a, l = "") {
140
- const u = o.trim();
141
- if (!u || !A.test(u)) return null;
139
+ function ht(r, a, l = "") {
140
+ const u = r.trim();
141
+ if (!u || !B.test(u)) return null;
142
142
  const c = a === "builtin" ? "system" : "user";
143
143
  return {
144
144
  id: 1,
145
- variableInstanceId: De(c, u, 0),
146
- variable: bt(u, a),
145
+ variableInstanceId: Le(c, u, 0),
146
+ variable: gt(u, a),
147
147
  type: c,
148
148
  attribute: u,
149
149
  default: c === "system" ? "" : l
150
150
  };
151
151
  }
152
- function Hr(o) {
153
- const a = o.trim();
154
- return a ? Ce.some((l) => l.items.some((u) => u.name === a)) : !1;
152
+ function Dr(r) {
153
+ const a = r.trim();
154
+ return a ? De.some((l) => l.items.some((u) => u.name === a)) : !1;
155
155
  }
156
- function Cr(o, a) {
157
- const l = o.trim();
158
- return a === "builtin" && l === U ? `<a href="{%${U}%}">Unsubscribe Link</a>` : bt(l, a);
156
+ function Mr(r, a) {
157
+ const l = r.trim();
158
+ return a === "builtin" && l === q ? `<a href="{%${q}%}">Unsubscribe Link</a>` : gt(l, a);
159
159
  }
160
- function De(o, a, l) {
161
- return `html-${o}-${a}-${l + 1}`;
160
+ function Le(r, a, l) {
161
+ return `html-${r}-${a}-${l + 1}`;
162
162
  }
163
- function Sr(o, a, l) {
164
- return `html-${o}-${a}-at-${l}`;
163
+ function Lr(r, a, l) {
164
+ return `html-${r}-${a}-at-${l}`;
165
165
  }
166
- const Dr = B(ur), Mr = B(mr), Lr = B(hr), kr = B(br), Ar = B(pr), Br = B(fr), Fr = B(xr), zr = B(gr), $r = B(vr), Se = {
166
+ const kr = R(br), Ar = R(pr), Br = R(fr), Rr = R(gr), Fr = R(xr), $r = R(vr), zr = R(yr), Nr = R(Ir), Or = R(Er), Me = {
167
167
  // 浅色主题
168
- xcodeLight: Zt,
169
- vscodeLight: Qt,
170
- tokyoNightDay: Jt,
171
- gruvboxLight: Xt,
172
- noctisLilac: Kt,
173
- bbedit: Yt,
168
+ xcodeLight: rr,
169
+ vscodeLight: tr,
170
+ tokyoNightDay: er,
171
+ gruvboxLight: Zt,
172
+ noctisLilac: Qt,
173
+ bbedit: Jt,
174
174
  // 深色主题
175
- abcdef: Ut,
176
- basicDark: qt,
177
- dracula: ht,
178
- tomorrowNightBlue: Gt,
179
- xcodeDark: jt
180
- }, Rr = {
175
+ abcdef: Xt,
176
+ basicDark: Kt,
177
+ dracula: ft,
178
+ tomorrowNightBlue: Yt,
179
+ xcodeDark: qt
180
+ }, Pr = {
181
181
  xcodeLight: "Xcode Light (Light)",
182
182
  vscodeLight: "VSCode Light (Light)",
183
183
  tokyoNightDay: "Tokyo Night Day (Light)",
184
184
  gruvboxLight: "Gruvbox Light (Light)",
185
185
  noctisLilac: "Noctis Lilac (Light)",
186
186
  bbedit: "BBEdit (Light)"
187
- }, Nr = {
187
+ }, _r = {
188
188
  abcdef: "ABCDEF (Dark)",
189
189
  basicDark: "Basic Dark (Dark)",
190
190
  dracula: "Dracula (Dark)",
191
191
  tomorrowNightBlue: "Tomorrow Night Blue (Dark)",
192
192
  xcodeDark: "Xcode Dark (Dark)"
193
- }, pt = "html-editor-theme", ut = "dracula";
194
- function Or(o = ut) {
195
- const a = o && Se[o] ? o : ut;
193
+ }, xt = "html-editor-theme", bt = "dracula";
194
+ function Wr(r = bt) {
195
+ const a = r && Me[r] ? r : bt;
196
196
  if (typeof window > "u") return a;
197
197
  try {
198
- const l = localStorage.getItem(pt);
199
- if (l && Se[l]) return l;
198
+ const l = localStorage.getItem(xt);
199
+ if (l && Me[l]) return l;
200
200
  } catch {
201
201
  console.error("Failed to get HTML Editor stored theme");
202
202
  }
203
203
  return a;
204
204
  }
205
- function Pr(o) {
205
+ function jr(r) {
206
206
  try {
207
- localStorage.setItem(pt, o);
207
+ localStorage.setItem(xt, r);
208
208
  } catch {
209
- console.error("Failed to set HTML Editor stored theme", o);
209
+ console.error("Failed to set HTML Editor stored theme", r);
210
210
  }
211
211
  }
212
- function _r({
213
- value: o,
212
+ function Gr({
213
+ value: r,
214
214
  onChange: a,
215
215
  language: l = "zh",
216
216
  initialMode: u = "split",
217
217
  initialDevice: c = "desktop",
218
- codeEditorHeight: g = "100%",
218
+ codeEditorHeight: x = "100%",
219
219
  previewHeight: i = "100%",
220
220
  sx: m,
221
221
  showToolbar: b = !0,
222
- initialTheme: C,
223
- initialRightTab: R = "preview",
222
+ initialTheme: S,
223
+ initialRightTab: N = "preview",
224
224
  variables: v,
225
- onVariablesChange: z,
226
- requireVariableDefaults: N = !0
225
+ onVariablesChange: $,
226
+ requireVariableDefaults: O = !0
227
227
  }, te) {
228
- var Re, Ne, Oe, Pe, _e, We, je, Ge, qe, Ue, Ye, Ke, Xe, Je, Qe, Ze, et, tt;
229
- const s = (e, t) => Er(e, t, l), [S, xt] = V(u), [O, gt] = V(c), [Me, vt] = V(() => Or(C)), [I, pe] = V(() => He(o)), [re, P] = V(R), [H, fe] = V(() => st(v)), [yt, It] = V(!1), [Et, Vt] = V(null), [_, Le] = V(""), [W, ke] = V(""), [xe, oe] = V(!1), [ge, ne] = V(!1), Y = $(null), ve = $(null), T = $(H), Ae = $(null), Be = $(null), ye = $(!1), ae = $(null);
230
- G(() => {
231
- const e = He(o);
232
- e !== I && (pe(e), a == null || a(e));
233
- }, [o, I, a]), G(() => {
228
+ var Pe, _e, We, je, Ge, Ue, qe, Ye, Ke, Xe, Je, Qe, Ze, et, tt, rt, nt, ot;
229
+ const s = (e, t) => Tr(e, t, l), [D, yt] = V(u), [P, It] = V(c), [ke, Et] = V(() => Wr(S)), [I, ge] = V(() => Se(r)), re = w(Se(r)), [ne, _] = V(N), [H, xe] = V(() => ut(v)), [Vt, Ct] = V(!1), [Tt, Ht] = V(null), [W, Ae] = V(""), [j, Be] = V(""), [ve, oe] = V(!1), [ye, ae] = V(!1), Y = w(null), Ie = w(null), C = w(H), ie = w(null), Re = w(r), Fe = w(null), $e = w(null), Ee = w(!1), le = w(null);
230
+ z(() => {
231
+ re.current = I;
232
+ }, [I]), z(() => {
233
+ if (r === Re.current) return;
234
+ if (Re.current = r, r === ie.current) {
235
+ ie.current = null;
236
+ return;
237
+ }
238
+ ie.current = null;
239
+ const e = Se(r);
240
+ e !== re.current && (re.current = e, ge(e));
241
+ }, [r]), z(() => {
234
242
  if (v === void 0) return;
235
- const e = st(v);
236
- T.current = e, fe(e);
237
- }, [v]), G(() => {
243
+ const e = ut(v);
244
+ C.current = e, xe(e);
245
+ }, [v]), z(() => {
238
246
  if (v !== void 0) return;
239
- const e = ee(I), t = me(e, T.current);
240
- (t.length !== T.current.length || t.some((d, y) => {
241
- const p = T.current[y];
247
+ const e = ee(I), t = be(e, C.current);
248
+ (t.length !== C.current.length || t.some((d, y) => {
249
+ const p = C.current[y];
242
250
  return !p || p.variableInstanceId !== d.variableInstanceId || p.attribute !== d.attribute || p.type !== d.type || p.default !== d.default;
243
- })) && (T.current = t, fe(t));
251
+ })) && (C.current = t, xe(t));
244
252
  }, [I, v]);
245
- const F = L(
253
+ const F = k(
246
254
  (e) => {
247
- const t = e.map((n, d) => ({
248
- ...n,
255
+ const t = e.map((o, d) => ({
256
+ ...o,
249
257
  id: d + 1,
250
- default: n.type === "system" ? "" : n.default ?? ""
258
+ default: o.type === "system" ? "" : o.default ?? ""
251
259
  }));
252
- return T.current = t, fe(t), z == null || z(t), t;
260
+ return C.current = t, xe(t), $ == null || $(t), t;
253
261
  },
254
- [z]
255
- ), D = L(() => {
256
- var t, n;
257
- const e = (n = (t = ve.current) == null ? void 0 : t.state) == null ? void 0 : n.doc;
262
+ [$]
263
+ ), M = k(() => {
264
+ var t, o;
265
+ const e = (o = (t = Ie.current) == null ? void 0 : t.state) == null ? void 0 : o.doc;
258
266
  return e && typeof e.toString == "function" ? e.toString() : I;
259
- }, [I]), Ie = (e) => {
260
- const t = He(e);
261
- pe(t), Y.current && clearTimeout(Y.current), Y.current = setTimeout(() => {
262
- a == null || a(t);
267
+ }, [I]), Ve = (e) => {
268
+ ie.current = e, re.current = e, ge(e), Y.current && clearTimeout(Y.current), Y.current = setTimeout(() => {
269
+ a == null || a(e);
263
270
  }, 300);
264
- }, K = L(
271
+ }, K = k(
265
272
  (e) => {
266
- const t = ee(e ?? D()), n = me(t, T.current);
267
- return F(n);
273
+ const t = ee(e ?? M()), o = be(t, C.current);
274
+ return F(o);
268
275
  },
269
- [D, F]
270
- ), ie = L(() => {
271
- const e = D();
272
- e !== I && pe(e);
273
- const t = K(e), n = N ? t.filter(
274
- (d) => d.type === "user" && it(d.attribute, "user") && d.default.trim() === ""
276
+ [M, F]
277
+ ), se = k(() => {
278
+ const e = M();
279
+ e !== I && ge(e);
280
+ const t = K(e), o = O ? t.filter(
281
+ (d) => d.type === "user" && ct(d.attribute, "user") && d.default.trim() === ""
275
282
  ) : [];
276
- return It(n.length > 0), n.length > 0 && P("variables"), {
277
- valid: n.length === 0,
283
+ return Ct(o.length > 0), o.length > 0 && _("variables"), {
284
+ valid: o.length === 0,
278
285
  variables: t,
279
- missing: n
286
+ missing: o
280
287
  };
281
- }, [D, I, N, K]), Tt = L(() => {
282
- ye.current = !0, ie(), P("variables");
283
- }, [ie]);
284
- G(() => {
285
- if (re !== "variables" || !ye.current) return;
288
+ }, [M, I, O, K]), wt = k(() => {
289
+ Ee.current = !0, se(), _("variables");
290
+ }, [se]);
291
+ z(() => {
292
+ if (ne !== "variables" || !Ee.current) return;
286
293
  const e = window.requestAnimationFrame(() => {
287
- const t = Ae.current, n = Be.current;
288
- t && n && t.scrollTo({
289
- top: Math.max(n.offsetTop - 8, 0),
294
+ const t = Fe.current, o = $e.current;
295
+ t && o && t.scrollTo({
296
+ top: Math.max(o.offsetTop - 8, 0),
290
297
  behavior: "auto"
291
- }), ye.current = !1;
298
+ }), Ee.current = !1;
292
299
  });
293
300
  return () => window.cancelAnimationFrame(e);
294
- }, [re, H.length]), G(() => () => {
301
+ }, [ne, H.length]), z(() => () => {
295
302
  Y.current && clearTimeout(Y.current);
296
303
  }, []);
297
- const wt = (e) => {
304
+ const St = (e) => {
298
305
  var f, E, X;
299
306
  const t = e || "";
300
- let n = t;
307
+ let o = t;
301
308
  if (!t.trim())
302
- n = "<!DOCTYPE html><html><head></head><body></body></html>";
309
+ o = "<!DOCTYPE html><html><head></head><body></body></html>";
303
310
  else {
304
- const M = new DOMParser().parseFromString(t, "text/html"), Ve = ((f = M.documentElement) == null ? void 0 : f.tagName.toLowerCase()) === "html", $t = ((E = M.head) == null ? void 0 : E.tagName.toLowerCase()) === "head", Rt = ((X = M.body) == null ? void 0 : X.tagName.toLowerCase()) === "body";
305
- if (!Ve || !$t || !Rt) {
306
- const Nt = M.body ? M.body.innerHTML : t;
307
- n = `<!DOCTYPE html><html><head>${M.head ? M.head.innerHTML : ""}</head><body>${Nt}</body></html>`;
311
+ const L = new DOMParser().parseFromString(t, "text/html"), Te = ((f = L.documentElement) == null ? void 0 : f.tagName.toLowerCase()) === "html", Ot = ((E = L.head) == null ? void 0 : E.tagName.toLowerCase()) === "head", Pt = ((X = L.body) == null ? void 0 : X.tagName.toLowerCase()) === "body";
312
+ if (!Te || !Ot || !Pt) {
313
+ const _t = L.body ? L.body.innerHTML : t;
314
+ o = `<!DOCTYPE html><html><head>${L.head ? L.head.innerHTML : ""}</head><body>${_t}</body></html>`;
308
315
  } else
309
- n = `<!DOCTYPE html>${M.documentElement.outerHTML}`;
316
+ o = `<!DOCTYPE html>${L.documentElement.outerHTML}`;
310
317
  }
311
- const d = ["script", "iframe", "object", "embed", "canvas"], p = new DOMParser().parseFromString(n, "text/html");
318
+ const d = ["script", "iframe", "object", "embed", "canvas"], p = new DOMParser().parseFromString(o, "text/html");
312
319
  return d.forEach((J) => {
313
- p.querySelectorAll(J).forEach((Ve) => Ve.remove());
314
- }), n = `<!DOCTYPE html>${p.documentElement.outerHTML}`, n;
315
- }, Fe = Q(
316
- () => ct(I, H),
320
+ p.querySelectorAll(J).forEach((Te) => Te.remove());
321
+ }), o = `<!DOCTYPE html>${p.documentElement.outerHTML}`, o;
322
+ }, ze = Q(
323
+ () => mt(I, H),
317
324
  [H, I]
318
- ), le = Q(() => wt(Fe), [Fe]);
319
- Pt(
325
+ ), ce = Q(() => St(ze), [ze]);
326
+ jt(
320
327
  te,
321
328
  () => ({
322
- getValue: () => D(),
323
- getPreviewHtml: () => ct(D(), T.current),
324
- scanVariables: () => K(D()),
329
+ getValue: () => M(),
330
+ getPreviewHtml: () => mt(M(), C.current),
331
+ scanVariables: () => K(M()),
325
332
  getVariables: (e) => {
326
- const t = K(D());
333
+ const t = K(M());
327
334
  return e == null || e(t), t;
328
335
  },
329
- validateVariables: ie,
330
- showVariables: () => P("variables")
336
+ validateVariables: se,
337
+ showVariables: () => _("variables")
331
338
  }),
332
- [D, K, ie]
333
- ), G(() => {
334
- ae.current && ae.current.srcdoc !== le && (ae.current.srcdoc = le);
335
- }, [le]);
336
- const Ht = (e, t) => {
337
- t !== null && xt(t);
338
- }, Ct = (e, t) => {
339
- (t === "desktop" || t === "mobile") && gt(t);
340
- }, se = L(
339
+ [M, K, se]
340
+ ), z(() => {
341
+ le.current && le.current.srcdoc !== ce && (le.current.srcdoc = ce);
342
+ }, [ce]);
343
+ const Dt = (e, t) => {
344
+ t !== null && yt(t);
345
+ }, Mt = (e, t) => {
346
+ (t === "desktop" || t === "mobile") && It(t);
347
+ }, de = k(
341
348
  (e) => {
342
349
  var d, y;
343
- const t = ve.current;
350
+ const t = Ie.current;
344
351
  if (t != null && t.state && (t != null && t.dispatch)) {
345
352
  const p = (d = t.state.selection) == null ? void 0 : d.main, f = t.state.doc.toString(), E = (p == null ? void 0 : p.from) ?? t.state.doc.length, X = (p == null ? void 0 : p.to) ?? E, J = `${f.slice(0, E)}${e}${f.slice(X)}`;
346
353
  return t.dispatch({
347
354
  changes: { from: E, to: X, insert: e },
348
355
  selection: { anchor: E + e.length }
349
- }), (y = t.focus) == null || y.call(t), Ie(J), J;
356
+ }), (y = t.focus) == null || y.call(t), Ve(J), J;
350
357
  }
351
- const n = `${I}${e}`;
352
- return Ie(n), n;
358
+ const o = `${I}${e}`;
359
+ return Ve(o), o;
353
360
  },
354
361
  [I]
355
- ), St = L(
362
+ ), Lt = k(
356
363
  (e, t) => {
357
- const n = T.current;
364
+ const o = C.current;
358
365
  F(
359
- n.map(
366
+ o.map(
360
367
  (d) => d.variableInstanceId === e ? { ...d, default: t } : d
361
368
  )
362
369
  );
363
370
  },
364
371
  [F]
365
- ), Dt = L(
372
+ ), kt = k(
366
373
  (e, t) => {
367
- if (!dt(e, t)) return;
368
- const d = se(Cr(e, t)), y = ee(d), p = me(y, T.current);
369
- F(p), P("variables");
374
+ if (!ht(e, t)) return;
375
+ const d = de(Mr(e, t)), y = ee(d), p = be(y, C.current);
376
+ F(p), _("variables");
370
377
  },
371
- [se, F]
372
- ), ce = Q(() => {
373
- const e = _.trim();
374
- return e ? A.test(e) ? Hr(e) || H.some((t) => t.type === "user" && t.attribute === e) ? s("text.variables.customVariableNameDuplicate") : "" : s("text.variables.customVariableNameInvalid") : s("text.variables.customVariableNameRequired");
375
- }, [_, H]), Mt = L(() => {
378
+ [de, F]
379
+ ), ue = Q(() => {
376
380
  const e = W.trim();
377
- if (oe(!0), ne(!0), ce || e === "") return;
378
- const t = dt(_.trim(), "user", e);
381
+ return e ? B.test(e) ? Dr(e) || H.some((t) => t.type === "user" && t.attribute === e) ? s("text.variables.customVariableNameDuplicate") : "" : s("text.variables.customVariableNameInvalid") : s("text.variables.customVariableNameRequired");
382
+ }, [W, H]), At = k(() => {
383
+ const e = j.trim();
384
+ if (oe(!0), ae(!0), ue || e === "") return;
385
+ const t = ht(W.trim(), "user", e);
379
386
  if (!t) return;
380
- const n = se(t.variable), d = ee(n), y = me(d, T.current);
387
+ const o = de(t.variable), d = ee(o), y = be(d, C.current);
381
388
  let p = -1;
382
389
  for (let f = y.length - 1; f >= 0; f -= 1) {
383
390
  const E = y[f];
@@ -390,34 +397,34 @@ function _r({
390
397
  y.map(
391
398
  (f, E) => E === p ? { ...f, default: t.default } : f
392
399
  )
393
- ), Le(""), ke(""), oe(!1), ne(!1), P("variables");
394
- }, [W, _, ce, se, F]), Lt = Q(() => {
400
+ ), Ae(""), Be(""), oe(!1), ae(!1), _("variables");
401
+ }, [j, W, ue, de, F]), Bt = Q(() => {
395
402
  const e = /* @__PURE__ */ new Set();
396
- return [{ id: "custom", items: H.filter((n) => n.type === "user").filter((n) => !Ce.some((d) => d.items.some((y) => y.name === n.attribute))).filter((n) => e.has(n.attribute) ? !1 : (e.add(n.attribute), !0)).map((n) => ({
397
- name: n.attribute,
398
- labelKey: n.attribute,
403
+ return [{ id: "custom", items: H.filter((o) => o.type === "user").filter((o) => !De.some((d) => d.items.some((y) => y.name === o.attribute))).filter((o) => e.has(o.attribute) ? !1 : (e.add(o.attribute), !0)).map((o) => ({
404
+ name: o.attribute,
405
+ labelKey: o.attribute,
399
406
  kind: "user"
400
- })) }, ...Ce];
401
- }, [H]), de = Q(
407
+ })) }, ...De];
408
+ }, [H]), me = Q(
402
409
  () => H.filter((e) => e.type !== "system"),
403
410
  [H]
404
- ), kt = (e) => e === "custom" ? "text.variables.groupCustom" : e === "contacts" ? "text.variables.groupContacts" : e === "email" ? "text.variables.groupEmail" : e === "organization" ? "text.variables.groupOrganization" : e === "date" ? "text.variables.groupDate" : "text.variables.groupLinks", w = rr(), At = O === "desktop" || O === "mobile" ? O : "desktop", Bt = S === "split" || S === "code" || S === "preview" ? S : "split";
405
- (Ne = (Re = w.palette) == null ? void 0 : Re.action) == null || Ne.selected, (Pe = (Oe = w.palette) == null ? void 0 : Oe.primary) == null || Pe.main, (We = (_e = w.palette) == null ? void 0 : _e.action) == null || We.selected, (Ge = (je = w.palette) == null ? void 0 : je.background) == null || Ge.paper, (Ue = (qe = w.palette) == null ? void 0 : qe.text) == null || Ue.primary, (Ke = (Ye = w.palette) == null ? void 0 : Ye.action) == null || Ke.hover;
406
- const j = {
411
+ ), Rt = (e) => e === "custom" ? "text.variables.groupCustom" : e === "contacts" ? "text.variables.groupContacts" : e === "email" ? "text.variables.groupEmail" : e === "organization" ? "text.variables.groupOrganization" : e === "date" ? "text.variables.groupDate" : "text.variables.groupLinks", T = ar(), Ft = P === "desktop" || P === "mobile" ? P : "desktop", $t = D === "split" || D === "code" || D === "preview" ? D : "split";
412
+ (_e = (Pe = T.palette) == null ? void 0 : Pe.action) == null || _e.selected, (je = (We = T.palette) == null ? void 0 : We.primary) == null || je.main, (Ue = (Ge = T.palette) == null ? void 0 : Ge.action) == null || Ue.selected, (Ye = (qe = T.palette) == null ? void 0 : qe.background) == null || Ye.paper, (Xe = (Ke = T.palette) == null ? void 0 : Ke.text) == null || Xe.primary, (Qe = (Je = T.palette) == null ? void 0 : Je.action) == null || Qe.hover;
413
+ const G = {
407
414
  tooltip: {
408
415
  sx: {
409
416
  fontSize: "13px",
410
417
  fontWeight: 400,
411
418
  lineHeight: 1.45,
412
419
  maxWidth: 360,
413
- backgroundColor: ue(((Je = (Xe = w.palette) == null ? void 0 : Xe.text) == null ? void 0 : Je.primary) ?? "#1F1F21", 0.9),
414
- color: ((Ze = (Qe = w.palette) == null ? void 0 : Qe.common) == null ? void 0 : Ze.white) ?? "#fff"
420
+ backgroundColor: he(((et = (Ze = T.palette) == null ? void 0 : Ze.text) == null ? void 0 : et.primary) ?? "#1F1F21", 0.9),
421
+ color: ((rt = (tt = T.palette) == null ? void 0 : tt.common) == null ? void 0 : rt.white) ?? "#fff"
415
422
  }
416
423
  },
417
424
  arrow: {
418
- sx: { color: ue(((tt = (et = w.palette) == null ? void 0 : et.text) == null ? void 0 : tt.primary) ?? "#1F1F21", 0.9) }
425
+ sx: { color: he(((ot = (nt = T.palette) == null ? void 0 : nt.text) == null ? void 0 : ot.primary) ?? "#1F1F21", 0.9) }
419
426
  }
420
- }, Ee = {
427
+ }, Ce = {
421
428
  component: "div",
422
429
  sx: {
423
430
  mt: 0.5,
@@ -425,20 +432,20 @@ function _r({
425
432
  minHeight: 18,
426
433
  lineHeight: 1.5
427
434
  }
428
- }, ze = () => /* @__PURE__ */ x(
435
+ }, Ne = () => /* @__PURE__ */ g(
429
436
  h,
430
437
  {
431
438
  sx: {
432
- height: g,
439
+ height: x,
433
440
  minHeight: 0,
434
441
  display: "flex",
435
442
  flexDirection: "column",
436
443
  position: "relative",
437
- borderRight: S === "split" ? "1px solid" : "none",
444
+ borderRight: D === "split" ? "1px solid" : "none",
438
445
  borderColor: "divider"
439
446
  },
440
447
  children: [
441
- /* @__PURE__ */ r(
448
+ /* @__PURE__ */ n(
442
449
  h,
443
450
  {
444
451
  sx: {
@@ -469,16 +476,16 @@ function _r({
469
476
  opacity: 1
470
477
  }
471
478
  },
472
- children: /* @__PURE__ */ r(
473
- _t,
479
+ children: /* @__PURE__ */ n(
480
+ Gt,
474
481
  {
475
482
  value: I,
476
483
  height: "100%",
477
- extensions: [Wt()],
478
- theme: Se[Me] || ht,
479
- onChange: Ie,
484
+ extensions: [Ut()],
485
+ theme: Me[ke] || ft,
486
+ onChange: Ve,
480
487
  onCreateEditor: (e) => {
481
- ve.current = e;
488
+ Ie.current = e;
482
489
  },
483
490
  basicSetup: {
484
491
  lineNumbers: !0,
@@ -490,13 +497,13 @@ function _r({
490
497
  )
491
498
  }
492
499
  ),
493
- /* @__PURE__ */ r(
494
- Te,
500
+ /* @__PURE__ */ n(
501
+ He,
495
502
  {
496
503
  size: "small",
497
504
  variant: "contained",
498
- startIcon: /* @__PURE__ */ r(Lr, { fontSize: "small" }),
499
- onClick: Tt,
505
+ startIcon: /* @__PURE__ */ n(Br, { fontSize: "small" }),
506
+ onClick: wt,
500
507
  sx: {
501
508
  position: "absolute",
502
509
  right: 16,
@@ -510,28 +517,28 @@ function _r({
510
517
  )
511
518
  ]
512
519
  }
513
- ), Ft = () => /* @__PURE__ */ r(h, { sx: {
520
+ ), zt = () => /* @__PURE__ */ n(h, { sx: {
514
521
  height: i,
515
522
  overflow: "auto",
516
523
  backgroundColor: "#F5F5F5",
517
- padding: O === "mobile" ? "32px 16px" : "16px",
524
+ padding: P === "mobile" ? "32px 16px" : "16px",
518
525
  display: "flex",
519
526
  justifyContent: "center"
520
- }, children: /* @__PURE__ */ r(
527
+ }, children: /* @__PURE__ */ n(
521
528
  h,
522
529
  {
523
530
  sx: {
524
531
  width: "100%",
525
- maxWidth: O === "mobile" ? "370px" : "100%",
526
- height: O === "mobile" ? "800px" : "100%",
532
+ maxWidth: P === "mobile" ? "370px" : "100%",
533
+ height: P === "mobile" ? "800px" : "100%",
527
534
  border: "none",
528
535
  overflow: "hidden"
529
536
  },
530
- children: /* @__PURE__ */ r(
537
+ children: /* @__PURE__ */ n(
531
538
  "iframe",
532
539
  {
533
- ref: ae,
534
- srcDoc: le,
540
+ ref: le,
541
+ srcDoc: ce,
535
542
  style: {
536
543
  width: "100%",
537
544
  height: "100%",
@@ -543,10 +550,10 @@ function _r({
543
550
  }
544
551
  )
545
552
  }
546
- ) }), zt = () => /* @__PURE__ */ x(
553
+ ) }), Nt = () => /* @__PURE__ */ g(
547
554
  h,
548
555
  {
549
- ref: Ae,
556
+ ref: Fe,
550
557
  sx: {
551
558
  flex: 1,
552
559
  height: "100%",
@@ -558,23 +565,23 @@ function _r({
558
565
  pb: 6
559
566
  },
560
567
  children: [
561
- /* @__PURE__ */ r(h, { sx: { display: "flex", alignItems: "center", justifyContent: "space-between", gap: 1, mb: 1.5 }, children: /* @__PURE__ */ x(h, { sx: { minWidth: 0 }, children: [
562
- /* @__PURE__ */ x(h, { sx: { display: "flex", alignItems: "center", gap: 0.75 }, children: [
563
- /* @__PURE__ */ r(k, { variant: "subtitle1", sx: { fontWeight: 700 }, children: s("htmlEditor.variables.title") }),
564
- /* @__PURE__ */ r(q, { title: s("htmlEditor.variables.help"), arrow: !0, slotProps: j, children: /* @__PURE__ */ r(h, { component: "span", sx: { display: "inline-flex", color: "text.secondary", cursor: "help" }, children: /* @__PURE__ */ r(Ar, { fontSize: "small" }) }) })
568
+ /* @__PURE__ */ n(h, { sx: { display: "flex", alignItems: "center", justifyContent: "space-between", gap: 1, mb: 1.5 }, children: /* @__PURE__ */ g(h, { sx: { minWidth: 0 }, children: [
569
+ /* @__PURE__ */ g(h, { sx: { display: "flex", alignItems: "center", gap: 0.75 }, children: [
570
+ /* @__PURE__ */ n(A, { variant: "subtitle1", sx: { fontWeight: 700 }, children: s("htmlEditor.variables.title") }),
571
+ /* @__PURE__ */ n(U, { title: s("htmlEditor.variables.help"), arrow: !0, slotProps: G, children: /* @__PURE__ */ n(h, { component: "span", sx: { display: "inline-flex", color: "text.secondary", cursor: "help" }, children: /* @__PURE__ */ n(Fr, { fontSize: "small" }) }) })
565
572
  ] }),
566
- /* @__PURE__ */ r(k, { component: "div", variant: "body2", color: "text.secondary", children: s("htmlEditor.variables.scanHint") })
573
+ /* @__PURE__ */ n(A, { component: "div", variant: "body2", color: "text.secondary", children: s("htmlEditor.variables.scanHint") })
567
574
  ] }) }),
568
- /* @__PURE__ */ r(h, { sx: { mb: 2 }, children: Lt.map((e) => {
569
- const t = Et === e.id;
570
- return /* @__PURE__ */ x(
571
- lr,
575
+ /* @__PURE__ */ n(h, { sx: { mb: 2 }, children: Bt.map((e) => {
576
+ const t = Tt === e.id;
577
+ return /* @__PURE__ */ g(
578
+ dr,
572
579
  {
573
580
  disableGutters: !0,
574
581
  square: !0,
575
582
  elevation: 0,
576
583
  expanded: t,
577
- onChange: (n, d) => Vt(d ? e.id : null),
584
+ onChange: (o, d) => Ht(d ? e.id : null),
578
585
  sx: {
579
586
  "&:before": { display: "none" },
580
587
  border: 1,
@@ -584,66 +591,66 @@ function _r({
584
591
  mb: 1
585
592
  },
586
593
  children: [
587
- /* @__PURE__ */ r(
588
- sr,
594
+ /* @__PURE__ */ n(
595
+ ur,
589
596
  {
590
- expandIcon: /* @__PURE__ */ r(kr, { fontSize: "small" }),
597
+ expandIcon: /* @__PURE__ */ n(Rr, { fontSize: "small" }),
591
598
  sx: {
592
599
  minHeight: 44,
593
600
  "& .MuiAccordionSummary-content": { my: 1 }
594
601
  },
595
- children: /* @__PURE__ */ r(k, { component: "div", variant: "body2", color: "text.primary", children: s(kt(e.id)) })
602
+ children: /* @__PURE__ */ n(A, { component: "div", variant: "body2", color: "text.primary", children: s(Rt(e.id)) })
596
603
  }
597
604
  ),
598
- /* @__PURE__ */ x(cr, { sx: { pt: 0, pb: 1.25 }, children: [
599
- e.id === "custom" && /* @__PURE__ */ x(h, { sx: { mb: 1 }, children: [
600
- /* @__PURE__ */ r(
605
+ /* @__PURE__ */ g(mr, { sx: { pt: 0, pb: 1.25 }, children: [
606
+ e.id === "custom" && /* @__PURE__ */ g(h, { sx: { mb: 1 }, children: [
607
+ /* @__PURE__ */ n(
601
608
  we,
602
609
  {
603
610
  size: "small",
604
611
  fullWidth: !0,
605
612
  label: s("text.variables.customVariableName"),
606
- value: _,
613
+ value: W,
607
614
  placeholder: "e.g. order_id",
608
- onChange: (n) => {
609
- Le(n.target.value), !xe && n.target.value.trim() !== "" && oe(!0);
615
+ onChange: (o) => {
616
+ Ae(o.target.value), !ve && o.target.value.trim() !== "" && oe(!0);
610
617
  },
611
618
  onBlur: () => {
612
- _.trim() !== "" && oe(!0);
619
+ W.trim() !== "" && oe(!0);
613
620
  },
614
- error: xe && !!ce,
615
- helperText: xe && ce || " ",
616
- FormHelperTextProps: Ee,
621
+ error: ve && !!ue,
622
+ helperText: ve && ue || " ",
623
+ FormHelperTextProps: Ce,
617
624
  sx: { mb: 1 }
618
625
  }
619
626
  ),
620
- /* @__PURE__ */ r(
627
+ /* @__PURE__ */ n(
621
628
  we,
622
629
  {
623
630
  size: "small",
624
631
  fullWidth: !0,
625
632
  label: s("text.variables.defaultValueLabel"),
626
- value: W,
633
+ value: j,
627
634
  placeholder: s("text.variables.defaultPlaceholder"),
628
- onChange: (n) => {
629
- ke(n.target.value), !ge && n.target.value.trim() !== "" && ne(!0);
635
+ onChange: (o) => {
636
+ Be(o.target.value), !ye && o.target.value.trim() !== "" && ae(!0);
630
637
  },
631
638
  onBlur: () => {
632
- W.trim() !== "" && ne(!0);
639
+ j.trim() !== "" && ae(!0);
633
640
  },
634
- error: ge && W.trim() === "",
635
- helperText: ge && W.trim() === "" ? s("text.variables.defaultRequired") : " ",
636
- FormHelperTextProps: Ee
641
+ error: ye && j.trim() === "",
642
+ helperText: ye && j.trim() === "" ? s("text.variables.defaultRequired") : " ",
643
+ FormHelperTextProps: Ce
637
644
  }
638
645
  ),
639
- /* @__PURE__ */ r(
640
- Te,
646
+ /* @__PURE__ */ n(
647
+ He,
641
648
  {
642
649
  fullWidth: !0,
643
650
  size: "small",
644
651
  variant: "outlined",
645
- startIcon: /* @__PURE__ */ r(Dr, { fontSize: "small" }),
646
- onClick: Mt,
652
+ startIcon: /* @__PURE__ */ n(kr, { fontSize: "small" }),
653
+ onClick: At,
647
654
  sx: {
648
655
  justifyContent: "center",
649
656
  borderColor: "divider",
@@ -655,33 +662,33 @@ function _r({
655
662
  }
656
663
  )
657
664
  ] }),
658
- e.items.length > 0 && /* @__PURE__ */ r(h, { sx: { display: "grid", gap: 0.75 }, children: e.items.map((n) => /* @__PURE__ */ r(
659
- Te,
665
+ e.items.length > 0 && /* @__PURE__ */ n(h, { sx: { display: "grid", gap: 0.75 }, children: e.items.map((o) => /* @__PURE__ */ n(
666
+ He,
660
667
  {
661
668
  size: "small",
662
669
  variant: "outlined",
663
- onClick: () => Dt(n.name, n.kind),
670
+ onClick: () => kt(o.name, o.kind),
664
671
  sx: {
665
672
  justifyContent: "flex-start",
666
673
  borderColor: "divider",
667
674
  color: "text.secondary",
668
675
  textTransform: "none"
669
676
  },
670
- children: /* @__PURE__ */ x(h, { sx: { textAlign: "left", minWidth: 0 }, children: [
671
- /* @__PURE__ */ r(k, { component: "div", variant: "body2", color: "text.primary", children: e.id === "custom" ? n.name : s(n.labelKey) }),
672
- /* @__PURE__ */ r(
673
- k,
677
+ children: /* @__PURE__ */ g(h, { sx: { textAlign: "left", minWidth: 0 }, children: [
678
+ /* @__PURE__ */ n(A, { component: "div", variant: "body2", color: "text.primary", children: e.id === "custom" ? o.name : s(o.labelKey) }),
679
+ /* @__PURE__ */ n(
680
+ A,
674
681
  {
675
682
  component: "div",
676
683
  variant: "caption",
677
684
  color: "text.secondary",
678
685
  sx: { fontFamily: "monospace" },
679
- children: n.kind === "builtin" ? `{%${n.name}%}` : `{{${n.name}}}`
686
+ children: o.kind === "builtin" ? `{%${o.name}%}` : `{{${o.name}}}`
680
687
  }
681
688
  )
682
689
  ] })
683
690
  },
684
- `${e.id}:${n.name}`
691
+ `${e.id}:${o.name}`
685
692
  )) })
686
693
  ] })
687
694
  ]
@@ -689,10 +696,10 @@ function _r({
689
696
  e.id
690
697
  );
691
698
  }) }),
692
- /* @__PURE__ */ r(dr, { sx: { my: 2 } }),
693
- /* @__PURE__ */ r(k, { component: "div", ref: Be, variant: "subtitle2", sx: { mb: 0.5 }, children: s("htmlEditor.variables.detected") }),
694
- /* @__PURE__ */ r(k, { component: "div", variant: "caption", color: "text.secondary", sx: { display: "block", mb: 1 }, children: s("htmlEditor.variables.defaultHelp") }),
695
- de.length === 0 ? /* @__PURE__ */ r(
699
+ /* @__PURE__ */ n(hr, { sx: { my: 2 } }),
700
+ /* @__PURE__ */ n(A, { component: "div", ref: $e, variant: "subtitle2", sx: { mb: 0.5 }, children: s("htmlEditor.variables.detected") }),
701
+ /* @__PURE__ */ n(A, { component: "div", variant: "caption", color: "text.secondary", sx: { display: "block", mb: 1 }, children: s("htmlEditor.variables.defaultHelp") }),
702
+ me.length === 0 ? /* @__PURE__ */ n(
696
703
  h,
697
704
  {
698
705
  sx: {
@@ -706,9 +713,9 @@ function _r({
706
713
  },
707
714
  children: s("htmlEditor.variables.empty")
708
715
  }
709
- ) : /* @__PURE__ */ r(h, { sx: { display: "grid", gap: 0.75 }, children: de.map((e, t) => {
710
- const n = e.type === "user" && it(e.attribute, "user"), d = yt && n && e.default.trim() === "", y = de.filter((f) => f.type === e.type && f.attribute === e.attribute).length, p = de.slice(0, t + 1).filter((f) => f.type === e.type && f.attribute === e.attribute).length;
711
- return /* @__PURE__ */ x(
716
+ ) : /* @__PURE__ */ n(h, { sx: { display: "grid", gap: 0.75 }, children: me.map((e, t) => {
717
+ const o = e.type === "user" && ct(e.attribute, "user"), d = Vt && o && e.default.trim() === "", y = me.filter((f) => f.type === e.type && f.attribute === e.attribute).length, p = me.slice(0, t + 1).filter((f) => f.type === e.type && f.attribute === e.attribute).length;
718
+ return /* @__PURE__ */ g(
712
719
  h,
713
720
  {
714
721
  sx: {
@@ -722,16 +729,16 @@ function _r({
722
729
  borderColor: d ? "error.main" : "transparent",
723
730
  borderRadius: 1,
724
731
  borderBottomColor: d ? "error.main" : "divider",
725
- backgroundColor: d ? ue(w.palette.error.main, 0.04) : "transparent",
732
+ backgroundColor: d ? he(T.palette.error.main, 0.04) : "transparent",
726
733
  transition: "background-color 120ms ease, border-color 120ms ease",
727
734
  "&:hover": {
728
- backgroundColor: d ? ue(w.palette.error.main, 0.04) : "action.hover",
735
+ backgroundColor: d ? he(T.palette.error.main, 0.04) : "action.hover",
729
736
  borderColor: d ? "error.main" : "divider"
730
737
  }
731
738
  },
732
739
  children: [
733
- /* @__PURE__ */ r(
734
- k,
740
+ /* @__PURE__ */ n(
741
+ A,
735
742
  {
736
743
  component: "div",
737
744
  variant: "body2",
@@ -745,7 +752,7 @@ function _r({
745
752
  children: y > 1 ? `${e.variable} (${p})` : e.variable
746
753
  }
747
754
  ),
748
- n ? /* @__PURE__ */ r(
755
+ o ? /* @__PURE__ */ n(
749
756
  we,
750
757
  {
751
758
  size: "small",
@@ -755,8 +762,8 @@ function _r({
755
762
  placeholder: s("text.variables.defaultPlaceholder"),
756
763
  error: d,
757
764
  helperText: d ? s("text.variables.defaultRequired") : " ",
758
- FormHelperTextProps: Ee,
759
- onChange: (f) => St(e.variableInstanceId, f.target.value),
765
+ FormHelperTextProps: Ce,
766
+ onChange: (f) => Lt(e.variableInstanceId, f.target.value),
760
767
  sx: {
761
768
  "& .MuiOutlinedInput-root": {
762
769
  minHeight: 40,
@@ -768,7 +775,7 @@ function _r({
768
775
  }
769
776
  }
770
777
  }
771
- ) : /* @__PURE__ */ r(k, { component: "div", variant: "body2", color: "text.secondary", sx: { fontSize: 13 }, children: s("htmlEditor.variables.systemDefault") })
778
+ ) : /* @__PURE__ */ n(A, { component: "div", variant: "body2", color: "text.secondary", sx: { fontSize: 13 }, children: s("htmlEditor.variables.systemDefault") })
772
779
  ]
773
780
  },
774
781
  e.variableInstanceId || `${e.type}:${e.attribute}:${e.id}`
@@ -776,12 +783,12 @@ function _r({
776
783
  }) })
777
784
  ]
778
785
  }
779
- ), $e = () => /* @__PURE__ */ x(h, { sx: { height: i, minHeight: 0, display: "flex", flexDirection: "column" }, children: [
780
- /* @__PURE__ */ x(
781
- ir,
786
+ ), Oe = () => /* @__PURE__ */ g(h, { sx: { height: i, minHeight: 0, display: "flex", flexDirection: "column" }, children: [
787
+ /* @__PURE__ */ g(
788
+ cr,
782
789
  {
783
- value: re,
784
- onChange: (e, t) => P(t),
790
+ value: ne,
791
+ onChange: (e, t) => _(t),
785
792
  sx: {
786
793
  minHeight: 40,
787
794
  borderBottom: "1px solid",
@@ -793,14 +800,14 @@ function _r({
793
800
  }
794
801
  },
795
802
  children: [
796
- /* @__PURE__ */ r(at, { value: "preview", label: s("htmlEditor.tabs.preview") }),
797
- /* @__PURE__ */ r(at, { value: "variables", label: s("htmlEditor.tabs.variables") })
803
+ /* @__PURE__ */ n(st, { value: "preview", label: s("htmlEditor.tabs.preview") }),
804
+ /* @__PURE__ */ n(st, { value: "variables", label: s("htmlEditor.tabs.variables") })
798
805
  ]
799
806
  }
800
807
  ),
801
- /* @__PURE__ */ r(h, { sx: { flex: 1, minHeight: 0, overflow: "hidden", display: "flex", flexDirection: "column" }, children: re === "preview" ? Ft() : zt() })
808
+ /* @__PURE__ */ n(h, { sx: { flex: 1, minHeight: 0, overflow: "hidden", display: "flex", flexDirection: "column" }, children: ne === "preview" ? zt() : Nt() })
802
809
  ] });
803
- return /* @__PURE__ */ x(
810
+ return /* @__PURE__ */ g(
804
811
  h,
805
812
  {
806
813
  sx: {
@@ -813,7 +820,7 @@ function _r({
813
820
  ...m
814
821
  },
815
822
  children: [
816
- b && /* @__PURE__ */ x(
823
+ b && /* @__PURE__ */ g(
817
824
  h,
818
825
  {
819
826
  sx: {
@@ -826,55 +833,55 @@ function _r({
826
833
  backgroundColor: "background.paper"
827
834
  },
828
835
  children: [
829
- /* @__PURE__ */ x(h, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
830
- /* @__PURE__ */ x(
831
- rt,
836
+ /* @__PURE__ */ g(h, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
837
+ /* @__PURE__ */ g(
838
+ at,
832
839
  {
833
- value: Bt,
840
+ value: $t,
834
841
  exclusive: !0,
835
- onChange: Ht,
842
+ onChange: Dt,
836
843
  size: "small",
837
844
  "aria-label": s("htmlEditor.mode.split"),
838
845
  children: [
839
- /* @__PURE__ */ r(q, { title: s("htmlEditor.tooltips.splitView"), arrow: !0, slotProps: j, children: /* @__PURE__ */ r(
846
+ /* @__PURE__ */ n(U, { title: s("htmlEditor.tooltips.splitView"), arrow: !0, slotProps: G, children: /* @__PURE__ */ n(
840
847
  Z,
841
848
  {
842
849
  value: "split",
843
850
  "aria-label": s("htmlEditor.mode.split"),
844
- children: /* @__PURE__ */ r(Fr, { fontSize: "small" })
851
+ children: /* @__PURE__ */ n(zr, { fontSize: "small" })
845
852
  }
846
853
  ) }),
847
- /* @__PURE__ */ r(q, { title: s("htmlEditor.tooltips.codeOnly"), arrow: !0, slotProps: j, children: /* @__PURE__ */ r(
854
+ /* @__PURE__ */ n(U, { title: s("htmlEditor.tooltips.codeOnly"), arrow: !0, slotProps: G, children: /* @__PURE__ */ n(
848
855
  Z,
849
856
  {
850
857
  value: "code",
851
858
  "aria-label": s("htmlEditor.mode.code"),
852
- children: /* @__PURE__ */ r(Mr, { fontSize: "small" })
859
+ children: /* @__PURE__ */ n(Ar, { fontSize: "small" })
853
860
  }
854
861
  ) }),
855
- /* @__PURE__ */ r(q, { title: s("htmlEditor.tooltips.previewOnly"), arrow: !0, slotProps: j, children: /* @__PURE__ */ r(
862
+ /* @__PURE__ */ n(U, { title: s("htmlEditor.tooltips.previewOnly"), arrow: !0, slotProps: G, children: /* @__PURE__ */ n(
856
863
  Z,
857
864
  {
858
865
  value: "preview",
859
866
  "aria-label": s("htmlEditor.mode.preview"),
860
- children: /* @__PURE__ */ r(Br, { fontSize: "small" })
867
+ children: /* @__PURE__ */ n($r, { fontSize: "small" })
861
868
  }
862
869
  ) })
863
870
  ]
864
871
  }
865
872
  ),
866
- /* @__PURE__ */ x(or, { size: "small", sx: { minWidth: 140 }, children: [
867
- /* @__PURE__ */ r(nr, { id: "theme-select-label", children: s("htmlEditor.theme") }),
868
- /* @__PURE__ */ x(
869
- ar,
873
+ /* @__PURE__ */ g(ir, { size: "small", sx: { minWidth: 140 }, children: [
874
+ /* @__PURE__ */ n(lr, { id: "theme-select-label", children: s("htmlEditor.theme") }),
875
+ /* @__PURE__ */ g(
876
+ sr,
870
877
  {
871
878
  labelId: "theme-select-label",
872
879
  id: "theme-select",
873
- value: Me,
880
+ value: ke,
874
881
  label: s("htmlEditor.theme"),
875
882
  onChange: (e) => {
876
883
  const t = e.target.value;
877
- vt(t), Pr(t);
884
+ Et(t), jr(t);
878
885
  },
879
886
  sx: {
880
887
  // fontSize: '0.875rem',
@@ -883,38 +890,38 @@ function _r({
883
890
  }
884
891
  },
885
892
  children: [
886
- /* @__PURE__ */ r(ot, { children: s("htmlEditor.lightThemes") }),
887
- Object.entries(Rr).map(([e, t]) => /* @__PURE__ */ r(nt, { value: e, children: t }, e)),
888
- /* @__PURE__ */ r(ot, { children: s("htmlEditor.darkThemes") }),
889
- Object.entries(Nr).map(([e, t]) => /* @__PURE__ */ r(nt, { value: e, children: t }, e))
893
+ /* @__PURE__ */ n(it, { children: s("htmlEditor.lightThemes") }),
894
+ Object.entries(Pr).map(([e, t]) => /* @__PURE__ */ n(lt, { value: e, children: t }, e)),
895
+ /* @__PURE__ */ n(it, { children: s("htmlEditor.darkThemes") }),
896
+ Object.entries(_r).map(([e, t]) => /* @__PURE__ */ n(lt, { value: e, children: t }, e))
890
897
  ]
891
898
  }
892
899
  )
893
900
  ] })
894
901
  ] }),
895
- /* @__PURE__ */ r(h, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: S !== "code" && /* @__PURE__ */ x(
896
- rt,
902
+ /* @__PURE__ */ n(h, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: D !== "code" && /* @__PURE__ */ g(
903
+ at,
897
904
  {
898
- value: At,
905
+ value: Ft,
899
906
  exclusive: !0,
900
- onChange: Ct,
907
+ onChange: Mt,
901
908
  size: "small",
902
909
  "aria-label": s("htmlEditor.device.desktop"),
903
910
  children: [
904
- /* @__PURE__ */ r(q, { title: s("htmlEditor.tooltips.desktopView"), arrow: !0, slotProps: j, children: /* @__PURE__ */ r(
911
+ /* @__PURE__ */ n(U, { title: s("htmlEditor.tooltips.desktopView"), arrow: !0, slotProps: G, children: /* @__PURE__ */ n(
905
912
  Z,
906
913
  {
907
914
  value: "desktop",
908
915
  "aria-label": s("htmlEditor.device.desktop"),
909
- children: /* @__PURE__ */ r(zr, { fontSize: "small" })
916
+ children: /* @__PURE__ */ n(Nr, { fontSize: "small" })
910
917
  }
911
918
  ) }),
912
- /* @__PURE__ */ r(q, { title: s("htmlEditor.tooltips.mobileView"), arrow: !0, slotProps: j, children: /* @__PURE__ */ r(
919
+ /* @__PURE__ */ n(U, { title: s("htmlEditor.tooltips.mobileView"), arrow: !0, slotProps: G, children: /* @__PURE__ */ n(
913
920
  Z,
914
921
  {
915
922
  value: "mobile",
916
923
  "aria-label": s("htmlEditor.device.mobile"),
917
- children: /* @__PURE__ */ r($r, { fontSize: "small" })
924
+ children: /* @__PURE__ */ n(Or, { fontSize: "small" })
918
925
  }
919
926
  ) })
920
927
  ]
@@ -923,7 +930,7 @@ function _r({
923
930
  ]
924
931
  }
925
932
  ),
926
- /* @__PURE__ */ x(
933
+ /* @__PURE__ */ g(
927
934
  h,
928
935
  {
929
936
  sx: {
@@ -934,12 +941,12 @@ function _r({
934
941
  overflow: "hidden"
935
942
  },
936
943
  children: [
937
- S === "split" && /* @__PURE__ */ x(Ot, { children: [
938
- /* @__PURE__ */ r(h, { sx: { flex: 1, minHeight: 0, minWidth: 0, overflow: "hidden" }, children: ze() }),
939
- /* @__PURE__ */ r(h, { sx: { flex: 1, minHeight: 0, minWidth: 0, overflow: "hidden" }, children: $e() })
944
+ D === "split" && /* @__PURE__ */ g(Wt, { children: [
945
+ /* @__PURE__ */ n(h, { sx: { flex: 1, minHeight: 0, minWidth: 0, overflow: "hidden" }, children: Ne() }),
946
+ /* @__PURE__ */ n(h, { sx: { flex: 1, minHeight: 0, minWidth: 0, overflow: "hidden" }, children: Oe() })
940
947
  ] }),
941
- S === "code" && /* @__PURE__ */ r(h, { sx: { flex: 1, minHeight: 0, minWidth: 0, overflow: "hidden" }, children: ze() }),
942
- S === "preview" && /* @__PURE__ */ r(h, { sx: { flex: 1, minHeight: 0, minWidth: 0, overflow: "hidden" }, children: $e() })
948
+ D === "code" && /* @__PURE__ */ n(h, { sx: { flex: 1, minHeight: 0, minWidth: 0, overflow: "hidden" }, children: Ne() }),
949
+ D === "preview" && /* @__PURE__ */ n(h, { sx: { flex: 1, minHeight: 0, minWidth: 0, overflow: "hidden" }, children: Oe() })
943
950
  ]
944
951
  }
945
952
  )
@@ -947,10 +954,10 @@ function _r({
947
954
  }
948
955
  );
949
956
  }
950
- const ft = mt(_r);
951
- ft.displayName = "HtmlEditorContent";
952
- const Wr = mt((o, a) => /* @__PURE__ */ r(er, { theme: Ir, children: /* @__PURE__ */ r(
953
- tr,
957
+ const vt = pt(Gr);
958
+ vt.displayName = "HtmlEditorContent";
959
+ const Ur = pt((r, a) => /* @__PURE__ */ n(nr, { theme: Cr, children: /* @__PURE__ */ n(
960
+ or,
954
961
  {
955
962
  sx: {
956
963
  height: "100%",
@@ -960,11 +967,11 @@ const Wr = mt((o, a) => /* @__PURE__ */ r(er, { theme: Ir, children: /* @__PURE_
960
967
  display: "flex",
961
968
  flexDirection: "column"
962
969
  },
963
- children: /* @__PURE__ */ r(ft, { ref: a, ...o })
970
+ children: /* @__PURE__ */ n(vt, { ref: a, ...r })
964
971
  }
965
972
  ) }));
966
- Wr.displayName = "HtmlEditor";
973
+ Ur.displayName = "HtmlEditor";
967
974
  export {
968
- Wr as HtmlEditor,
969
- Wr as default
975
+ Ur as HtmlEditor,
976
+ Ur as default
970
977
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "monto-email-builder",
3
- "version": "1.4.7",
3
+ "version": "1.4.8",
4
4
  "description": "A powerful and customizable email template builder React component library with visual editing, internationalization, and image upload support",
5
5
  "keywords": [
6
6
  "email",