easy-email-pro-kit 0.5.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.es.js +54 -54
- package/package.json +1 -1
package/lib/index.es.js
CHANGED
|
@@ -39,7 +39,7 @@ var Se = (t, n, d) => new Promise((p, f) => {
|
|
|
39
39
|
import { useEmailRenderContext as gn, EmailRenderProvider as Ue, components as $e, ElementType as st, ResponsivePlugin as yn, BlockManager as et, classnames as Fe, mergeBlock as Oe, createCustomBlock as ft, t as A, ElementCategory as wt, NodeUtils as fn, ElementPlugin as Mt } from "easy-email-pro-core";
|
|
40
40
|
import { get as qt, set as Ze, flatMap as wn, cloneDeep as Ve, isEqual as _e, merge as Mn } from "lodash";
|
|
41
41
|
import T, { useState as xt, useEffect as qe, useRef as zt, useMemo as xn } from "react";
|
|
42
|
-
import { AttributesPanelWrapper as vt, ResponsiveTabs as Tt,
|
|
42
|
+
import { AttributesPanelWrapper as vt, ResponsiveTabs as Tt, useEditorContext as St, CollapseWrapper as Zt, AttributeField as ne, ResponsiveField as ie, previewLoadImage as $t, useElementInteract as vn, ConfigPanelsMap as Nt } from "easy-email-pro-theme";
|
|
43
43
|
import Tn from "react-dom/server";
|
|
44
44
|
import { Collapse as Te, Button as Dt, Message as Wt, Grid as lt, Divider as ct } from "@arco-design/web-react";
|
|
45
45
|
import { ActiveTabKeys as fe, useEditorProps as Ct, useSelectedNode as Lt, useEditorState as It } from "easy-email-pro-editor";
|
|
@@ -111,7 +111,7 @@ class _r extends yn {
|
|
|
111
111
|
"attributes.css-class",
|
|
112
112
|
Fe(R, S)
|
|
113
113
|
);
|
|
114
|
-
const
|
|
114
|
+
const oe = K.render({
|
|
115
115
|
mode: p,
|
|
116
116
|
children: b,
|
|
117
117
|
context: w,
|
|
@@ -127,7 +127,7 @@ class _r extends yn {
|
|
|
127
127
|
Nn,
|
|
128
128
|
{
|
|
129
129
|
desktop: () => /* @__PURE__ */ T.createElement(T.Fragment, null, G),
|
|
130
|
-
mobile: () => /* @__PURE__ */ T.createElement(T.Fragment, null,
|
|
130
|
+
mobile: () => /* @__PURE__ */ T.createElement(T.Fragment, null, oe)
|
|
131
131
|
}
|
|
132
132
|
))), L;
|
|
133
133
|
});
|
|
@@ -1610,10 +1610,10 @@ function gt(t, n, d) {
|
|
|
1610
1610
|
);
|
|
1611
1611
|
}
|
|
1612
1612
|
for (let I = K.length, S = 0; S < I; S += 4) {
|
|
1613
|
-
const X = K[S], R = K[S + 1],
|
|
1614
|
-
if (w && V === 0 || x === "diff" && b && X === b[S] && R === b[S + 1] &&
|
|
1613
|
+
const X = K[S], R = K[S + 1], oe = K[S + 2], V = K[S + 3];
|
|
1614
|
+
if (w && V === 0 || x === "diff" && b && X === b[S] && R === b[S + 1] && oe === b[S + 2] && V === b[S + 3])
|
|
1615
1615
|
continue;
|
|
1616
|
-
const J = X << 16 | R << 8 |
|
|
1616
|
+
const J = X << 16 | R << 8 | oe, B = V * 1e8 + J, E = B % 32768;
|
|
1617
1617
|
let se = L.get(E);
|
|
1618
1618
|
se || (se = /* @__PURE__ */ new Map(), L.set(E, se));
|
|
1619
1619
|
let me = se.get(B);
|
|
@@ -1763,8 +1763,8 @@ function or(t, n = {}) {
|
|
|
1763
1763
|
for (let V = L - 2; X < V && (R += p[X].count, !(R > S)); X++)
|
|
1764
1764
|
;
|
|
1765
1765
|
x(h, X);
|
|
1766
|
-
const
|
|
1767
|
-
h =
|
|
1766
|
+
const oe = w();
|
|
1767
|
+
h = oe >= 0 ? b[oe] : null;
|
|
1768
1768
|
}
|
|
1769
1769
|
for (let G = b.length, L = 0; L < G; L++)
|
|
1770
1770
|
b[L].srgb = Hn(b[L].oklab);
|
|
@@ -1982,13 +1982,13 @@ function Sr(t, n, d) {
|
|
|
1982
1982
|
function S(B) {
|
|
1983
1983
|
K |= B << L, L += G, I(8);
|
|
1984
1984
|
}
|
|
1985
|
-
let X = n[0] & b, R = {},
|
|
1985
|
+
let X = n[0] & b, R = {}, oe, V, J;
|
|
1986
1986
|
S(a);
|
|
1987
1987
|
for (let B = n.length, E = 1; E < B; ++E)
|
|
1988
|
-
if (J = n[E] & b,
|
|
1988
|
+
if (J = n[E] & b, oe = X << 8 | J, V = R[oe], V === void 0) {
|
|
1989
1989
|
for (K |= X << L, L += G; L >= 8; )
|
|
1990
1990
|
p(K & 255), K >>= 8, L -= 8, y(h) === 256 && (p(255, h), h = f(), p(0));
|
|
1991
|
-
x === 4096 ? (S(a), x = w + 1, G = t + 1, R = {}) : (x >= 1 << G && ++G, R[
|
|
1991
|
+
x === 4096 ? (S(a), x = w + 1, G = t + 1, R = {}) : (x >= 1 << G && ++G, R[oe] = x++), X = J;
|
|
1992
1992
|
} else
|
|
1993
1993
|
X = V;
|
|
1994
1994
|
S(X), S(w), I(1), y(h) === 1 ? p(0, h) : (p(y(h) - 1, h), p(0));
|
|
@@ -2021,14 +2021,14 @@ function Zr(t) {
|
|
|
2021
2021
|
throw new Error("Width invalid.");
|
|
2022
2022
|
if (L <= 0 || L > 65535)
|
|
2023
2023
|
throw new Error("Height invalid.");
|
|
2024
|
-
let
|
|
2024
|
+
let oe = 8, V = I ? I.length : 0;
|
|
2025
2025
|
if (V) {
|
|
2026
2026
|
if (V < 2 || V > 256 || V & V - 1)
|
|
2027
2027
|
throw new Error("Invalid color table length, must be power of 2 and 2 .. 256.");
|
|
2028
2028
|
for (; V >>= 1; )
|
|
2029
|
-
++
|
|
2029
|
+
++oe;
|
|
2030
2030
|
}
|
|
2031
|
-
return y(ln), y(ur), y(hr), X ? S || (S = 2) : R = 0, y(parseInt(`000${Number(S & 7).toString(2).padStart(3, "0")}0${X ? 1 : 0}`, 2)), a(K / 10), y(R), y(0), y(lr), a(w), a(x), a(G), a(L), I != null && I.length ? (y(parseInt(`10000${(
|
|
2031
|
+
return y(ln), y(ur), y(hr), X ? S || (S = 2) : R = 0, y(parseInt(`000${Number(S & 7).toString(2).padStart(3, "0")}0${X ? 1 : 0}`, 2)), a(K / 10), y(R), y(0), y(lr), a(w), a(x), a(G), a(L), I != null && I.length ? (y(parseInt(`10000${(oe - 1).toString(2).padStart(3, "0")}`, 2)), h(I.flat())) : y(0), Sr(oe, t.imageData, f), b();
|
|
2032
2032
|
}
|
|
2033
2033
|
function Nr(t) {
|
|
2034
2034
|
const {
|
|
@@ -2167,7 +2167,7 @@ function Dr(t) {
|
|
|
2167
2167
|
}
|
|
2168
2168
|
S = p, p = x;
|
|
2169
2169
|
}
|
|
2170
|
-
const X = K + 1 - G, R = I + 1 - L,
|
|
2170
|
+
const X = K + 1 - G, R = I + 1 - L, oe = vr(
|
|
2171
2171
|
x,
|
|
2172
2172
|
{
|
|
2173
2173
|
left: G,
|
|
@@ -2188,7 +2188,7 @@ function Dr(t) {
|
|
|
2188
2188
|
width: X,
|
|
2189
2189
|
height: R,
|
|
2190
2190
|
disposal: w && h !== f - 1 ? 2 : 1,
|
|
2191
|
-
imageData:
|
|
2191
|
+
imageData: oe
|
|
2192
2192
|
};
|
|
2193
2193
|
});
|
|
2194
2194
|
}
|
|
@@ -2256,11 +2256,11 @@ function Lr(t) {
|
|
|
2256
2256
|
encodeId: 0,
|
|
2257
2257
|
encode(S) {
|
|
2258
2258
|
return Ie(this, null, function* () {
|
|
2259
|
-
const { log: X, frames: R, encodeId:
|
|
2259
|
+
const { log: X, frames: R, encodeId: oe, width: V, height: J } = w;
|
|
2260
2260
|
w.encodeId++;
|
|
2261
2261
|
const { width: B = V, height: E = J } = S;
|
|
2262
2262
|
let { imageData: se } = S;
|
|
2263
|
-
X.time(`palette:sample-${
|
|
2263
|
+
X.time(`palette:sample-${oe}`);
|
|
2264
2264
|
try {
|
|
2265
2265
|
se = typeof se == "string" ? yield xr(se) : se;
|
|
2266
2266
|
const me = wr(se, "uint8ClampedArray", {
|
|
@@ -2274,13 +2274,13 @@ function Lr(t) {
|
|
|
2274
2274
|
imageData: me
|
|
2275
2275
|
})), yield x(me);
|
|
2276
2276
|
} finally {
|
|
2277
|
-
X.timeEnd(`palette:sample-${
|
|
2277
|
+
X.timeEnd(`palette:sample-${oe}`);
|
|
2278
2278
|
}
|
|
2279
2279
|
});
|
|
2280
2280
|
},
|
|
2281
2281
|
flush() {
|
|
2282
2282
|
return Ie(this, null, function* () {
|
|
2283
|
-
const { log: S, frames: X, width: R, height:
|
|
2283
|
+
const { log: S, frames: X, width: R, height: oe, maxColors: V, palette: J } = w;
|
|
2284
2284
|
S.time("palette:generate");
|
|
2285
2285
|
const B = yield G(V), E = Jt(B).getColors("rgb").map((W) => W.value);
|
|
2286
2286
|
S.debug("palette:maxColors", V);
|
|
@@ -2324,7 +2324,7 @@ function Lr(t) {
|
|
|
2324
2324
|
colorTable: E,
|
|
2325
2325
|
backgroundColorIndex: h,
|
|
2326
2326
|
width: R,
|
|
2327
|
-
height:
|
|
2327
|
+
height: oe
|
|
2328
2328
|
})), Ye = fr(Le), Y = new Uint8Array(ge.length + Ye.byteLength + 1);
|
|
2329
2329
|
return Y.set(ge), Y.set(Ye, ge.byteLength), Y[Y.length - 1] = mr, S.timeEnd("output"), J.reset(), w.frames = [], w.encodeId = 0, Y;
|
|
2330
2330
|
});
|
|
@@ -2648,12 +2648,12 @@ function Ht({
|
|
|
2648
2648
|
n === fe.DESKTOP ? "attributes.src" : "mobileAttributes.src",
|
|
2649
2649
|
R
|
|
2650
2650
|
);
|
|
2651
|
-
const
|
|
2651
|
+
const oe = Ve(y);
|
|
2652
2652
|
Ze(
|
|
2653
|
-
|
|
2653
|
+
oe,
|
|
2654
2654
|
n === fe.DESKTOP ? "attributes.src" : "mobileAttributes.src",
|
|
2655
2655
|
R
|
|
2656
|
-
), w.current =
|
|
2656
|
+
), w.current = oe;
|
|
2657
2657
|
} catch (G) {
|
|
2658
2658
|
console.error(G), Wt.error(String(G));
|
|
2659
2659
|
} finally {
|
|
@@ -2868,25 +2868,25 @@ var yt = {}, Xr = {
|
|
|
2868
2868
|
for (var $ = 0, le = 0, H = 0, ee = new Array(_.length), q = new Array(_.length), te = 0; te < _.length; te += 1) {
|
|
2869
2869
|
var xe = _[te].dataCount, de = _[te].totalCount - xe;
|
|
2870
2870
|
le = Math.max(le, xe), H = Math.max(H, de), ee[te] = new Array(xe);
|
|
2871
|
-
for (var
|
|
2872
|
-
ee[te][
|
|
2871
|
+
for (var re = 0; re < ee[te].length; re += 1)
|
|
2872
|
+
ee[te][re] = 255 & F.getBuffer()[re + $];
|
|
2873
2873
|
$ += xe;
|
|
2874
2874
|
var ue = R.getErrorCorrectPolynomial(de), ce = V(ee[te], ue.getLength() - 1).mod(ue);
|
|
2875
|
-
for (q[te] = new Array(ue.getLength() - 1),
|
|
2876
|
-
var he =
|
|
2877
|
-
q[te][
|
|
2875
|
+
for (q[te] = new Array(ue.getLength() - 1), re = 0; re < q[te].length; re += 1) {
|
|
2876
|
+
var he = re + ce.getLength() - q[te].length;
|
|
2877
|
+
q[te][re] = he >= 0 ? ce.getAt(he) : 0;
|
|
2878
2878
|
}
|
|
2879
2879
|
}
|
|
2880
2880
|
var be = 0;
|
|
2881
|
-
for (
|
|
2882
|
-
be += _[
|
|
2881
|
+
for (re = 0; re < _.length; re += 1)
|
|
2882
|
+
be += _[re].totalCount;
|
|
2883
2883
|
var ye = new Array(be), we = 0;
|
|
2884
|
-
for (
|
|
2884
|
+
for (re = 0; re < le; re += 1)
|
|
2885
2885
|
for (te = 0; te < _.length; te += 1)
|
|
2886
|
-
|
|
2887
|
-
for (
|
|
2886
|
+
re < ee[te].length && (ye[we] = ee[te][re], we += 1);
|
|
2887
|
+
for (re = 0; re < H; re += 1)
|
|
2888
2888
|
for (te = 0; te < _.length; te += 1)
|
|
2889
|
-
|
|
2889
|
+
re < q[te].length && (ye[we] = q[te][re], we += 1);
|
|
2890
2890
|
return ye;
|
|
2891
2891
|
}(v, g);
|
|
2892
2892
|
};
|
|
@@ -2998,10 +2998,10 @@ var yt = {}, Xr = {
|
|
|
2998
2998
|
if ((s = s || 1) < 2)
|
|
2999
2999
|
return function(ee) {
|
|
3000
3000
|
ee = ee === void 0 ? 2 : ee;
|
|
3001
|
-
var q, te, xe, de,
|
|
3001
|
+
var q, te, xe, de, re, ue = 1 * U.getModuleCount() + 2 * ee, ce = ee, he = ue - ee, be = { "██": "█", "█ ": "▀", " █": "▄", " ": " " }, ye = { "██": "▀", "█ ": "▀", " █": " ", " ": " " }, we = "";
|
|
3002
3002
|
for (q = 0; q < ue; q += 2) {
|
|
3003
3003
|
for (xe = Math.floor((q - ce) / 1), de = Math.floor((q + 1 - ce) / 1), te = 0; te < ue; te += 1)
|
|
3004
|
-
|
|
3004
|
+
re = "█", ce <= te && te < he && ce <= q && q < he && U.isDark(xe, Math.floor((te - ce) / 1)) && (re = " "), ce <= te && te < he && ce <= q + 1 && q + 1 < he && U.isDark(de, Math.floor((te - ce) / 1)) ? re += " " : re += "█", we += ee < 1 && q + 1 >= he ? ye[re] : be[re];
|
|
3005
3005
|
we += `
|
|
3006
3006
|
`;
|
|
3007
3007
|
}
|
|
@@ -3114,7 +3114,7 @@ var yt = {}, Xr = {
|
|
|
3114
3114
|
}
|
|
3115
3115
|
}, I.getErrorCorrectPolynomial = function(Y) {
|
|
3116
3116
|
for (var W = V([1], 0), C = 0; C < Y; C += 1)
|
|
3117
|
-
W = W.multiply(V([1,
|
|
3117
|
+
W = W.multiply(V([1, oe.gexp(C)], 0));
|
|
3118
3118
|
return W;
|
|
3119
3119
|
}, I.getLengthInBits = function(Y, W) {
|
|
3120
3120
|
if (1 <= W && W < 10)
|
|
@@ -3183,7 +3183,7 @@ var yt = {}, Xr = {
|
|
|
3183
3183
|
for (D = 0; D < W; D += 1)
|
|
3184
3184
|
Y.isDark(D, M) && (Z += 1);
|
|
3185
3185
|
return C + Math.abs(100 * Z / W / W - 50) / 5 * 10;
|
|
3186
|
-
}, I),
|
|
3186
|
+
}, I), oe = function() {
|
|
3187
3187
|
for (var Y = new Array(256), W = new Array(256), C = 0; C < 8; C += 1)
|
|
3188
3188
|
Y[C] = 1 << C;
|
|
3189
3189
|
for (C = 8; C < 256; C += 1)
|
|
@@ -3218,15 +3218,15 @@ var yt = {}, Xr = {
|
|
|
3218
3218
|
}, multiply: function(M) {
|
|
3219
3219
|
for (var z = new Array(D.getLength() + M.getLength() - 1), Q = 0; Q < D.getLength(); Q += 1)
|
|
3220
3220
|
for (var j = 0; j < M.getLength(); j += 1)
|
|
3221
|
-
z[Q + j] ^=
|
|
3221
|
+
z[Q + j] ^= oe.gexp(oe.glog(D.getAt(Q)) + oe.glog(M.getAt(j)));
|
|
3222
3222
|
return V(z, 0);
|
|
3223
3223
|
}, mod: function(M) {
|
|
3224
3224
|
if (D.getLength() - M.getLength() < 0)
|
|
3225
3225
|
return D;
|
|
3226
|
-
for (var z =
|
|
3226
|
+
for (var z = oe.glog(D.getAt(0)) - oe.glog(M.getAt(0)), Q = new Array(D.getLength()), j = 0; j < D.getLength(); j += 1)
|
|
3227
3227
|
Q[j] = D.getAt(j);
|
|
3228
3228
|
for (j = 0; j < M.getLength(); j += 1)
|
|
3229
|
-
Q[j] ^=
|
|
3229
|
+
Q[j] ^= oe.gexp(oe.glog(M.getAt(j)) + z);
|
|
3230
3230
|
return V(Q, 0).mod(M);
|
|
3231
3231
|
} };
|
|
3232
3232
|
return D;
|
|
@@ -3775,7 +3775,7 @@ var yt = {}, Xr = {
|
|
|
3775
3775
|
return Z;
|
|
3776
3776
|
}).apply(this, arguments);
|
|
3777
3777
|
};
|
|
3778
|
-
const
|
|
3778
|
+
const oe = function() {
|
|
3779
3779
|
function Z(e) {
|
|
3780
3780
|
var o = e.svg, r = e.type;
|
|
3781
3781
|
this._svg = o, this._type = r;
|
|
@@ -4014,12 +4014,12 @@ var yt = {}, Xr = {
|
|
|
4014
4014
|
var N = Math.min(m.width, m.height) - 2 * m.margin, s = m.shape === B ? N / Math.sqrt(2) : N, c = Math.floor(s / u), i = Math.floor((m.width - u * c) / 2), g = Math.floor((m.height - u * c) / 2), v = new X({ svg: this._element, type: m.dotsOptions.type });
|
|
4015
4015
|
this._dotsClipPath = document.createElementNS("http://www.w3.org/2000/svg", "clipPath"), this._dotsClipPath.setAttribute("id", "clip-path-dot-color"), this._defs.appendChild(this._dotsClipPath), this._createColor({ options: (o = m.dotsOptions) === null || o === void 0 ? void 0 : o.gradient, color: m.dotsOptions.color, additionalRotation: 0, x: 0, y: 0, height: m.height, width: m.width, name: "dot-color" });
|
|
4016
4016
|
for (var O = function(de) {
|
|
4017
|
-
for (var
|
|
4017
|
+
for (var re = function(ce) {
|
|
4018
4018
|
return e && !e(de, ce) ? "continue" : !((r = P._qr) === null || r === void 0) && r.isDark(de, ce) ? (v.draw(i + de * c, g + ce * c, c, function(he, be) {
|
|
4019
4019
|
return !(de + he < 0 || ce + be < 0 || de + he >= u || ce + be >= u) && !(e && !e(de + he, ce + be)) && !!l._qr && l._qr.isDark(de + he, ce + be);
|
|
4020
4020
|
}), void (v._element && P._dotsClipPath && P._dotsClipPath.appendChild(v._element))) : "continue";
|
|
4021
4021
|
}, ue = 0; ue < u; ue++)
|
|
4022
|
-
|
|
4022
|
+
re(ue);
|
|
4023
4023
|
}, P = this, k = 0; k < u; k++)
|
|
4024
4024
|
O(k);
|
|
4025
4025
|
if (m.shape === B) {
|
|
@@ -4030,7 +4030,7 @@ var yt = {}, Xr = {
|
|
|
4030
4030
|
k >= F - 1 && k <= _ - F && q >= F - 1 && q <= _ - F || Math.sqrt((k - ee) * (k - ee) + (q - ee) * (q - ee)) > ee ? H[k][q] = 0 : H[k][q] = this._qr.isDark(q - 2 * F < 0 ? q : q >= u ? q - 2 * F : q - F, k - 2 * F < 0 ? k : k >= u ? k - 2 * F : k - F) ? 1 : 0;
|
|
4031
4031
|
}
|
|
4032
4032
|
var te = function(de) {
|
|
4033
|
-
for (var
|
|
4033
|
+
for (var re = function(ce) {
|
|
4034
4034
|
if (!H[de][ce])
|
|
4035
4035
|
return "continue";
|
|
4036
4036
|
v.draw($ + de * c, le + ce * c, c, function(he, be) {
|
|
@@ -4038,7 +4038,7 @@ var yt = {}, Xr = {
|
|
|
4038
4038
|
return !!(!((ye = H[de + he]) === null || ye === void 0) && ye[ce + be]);
|
|
4039
4039
|
}), v._element && xe._dotsClipPath && xe._dotsClipPath.appendChild(v._element);
|
|
4040
4040
|
}, ue = 0; ue < _; ue++)
|
|
4041
|
-
|
|
4041
|
+
re(ue);
|
|
4042
4042
|
}, xe = this;
|
|
4043
4043
|
for (k = 0; k < _; k++)
|
|
4044
4044
|
te(k);
|
|
@@ -4052,9 +4052,9 @@ var yt = {}, Xr = {
|
|
|
4052
4052
|
throw "Element code is not defined";
|
|
4053
4053
|
var l = this._qr.getModuleCount(), m = Math.min(r.width, r.height) - 2 * r.margin, u = r.shape === B ? m / Math.sqrt(2) : m, N = Math.floor(u / l), s = 7 * N, c = 3 * N, i = Math.floor((r.width - l * N) / 2), g = Math.floor((r.height - l * N) / 2);
|
|
4054
4054
|
[[0, 0, 0], [1, 0, Math.PI / 2], [0, 1, -Math.PI / 2]].forEach(function(v) {
|
|
4055
|
-
var O, P, k, F, _, $, le, H, ee, q, te, xe, de = v[0],
|
|
4056
|
-
if ((!((O = r.cornersSquareOptions) === null || O === void 0) && O.gradient || !((P = r.cornersSquareOptions) === null || P === void 0) && P.color) && ((be = document.createElementNS("http://www.w3.org/2000/svg", "clipPath")).setAttribute("id", "clip-path-corners-square-color-" + de + "-" +
|
|
4057
|
-
var we = new
|
|
4055
|
+
var O, P, k, F, _, $, le, H, ee, q, te, xe, de = v[0], re = v[1], ue = v[2], ce = i + de * N * (l - 7), he = g + re * N * (l - 7), be = e._dotsClipPath, ye = e._dotsClipPath;
|
|
4056
|
+
if ((!((O = r.cornersSquareOptions) === null || O === void 0) && O.gradient || !((P = r.cornersSquareOptions) === null || P === void 0) && P.color) && ((be = document.createElementNS("http://www.w3.org/2000/svg", "clipPath")).setAttribute("id", "clip-path-corners-square-color-" + de + "-" + re), e._defs.appendChild(be), e._cornersSquareClipPath = e._cornersDotClipPath = ye = be, e._createColor({ options: (k = r.cornersSquareOptions) === null || k === void 0 ? void 0 : k.gradient, color: (F = r.cornersSquareOptions) === null || F === void 0 ? void 0 : F.color, additionalRotation: ue, x: ce, y: he, height: s, width: s, name: "corners-square-color-" + de + "-" + re })), (_ = r.cornersSquareOptions) === null || _ === void 0 ? void 0 : _.type) {
|
|
4057
|
+
var we = new oe({ svg: e._element, type: r.cornersSquareOptions.type });
|
|
4058
4058
|
we.draw(ce, he, s, ue), we._element && be && be.appendChild(we._element);
|
|
4059
4059
|
} else
|
|
4060
4060
|
for (var Ge = new X({ svg: e._element, type: r.dotsOptions.type }), un = function(De) {
|
|
@@ -4069,7 +4069,7 @@ var yt = {}, Xr = {
|
|
|
4069
4069
|
rt(ze);
|
|
4070
4070
|
}, Ee = 0; Ee < me.length; Ee++)
|
|
4071
4071
|
un(Ee);
|
|
4072
|
-
if ((!((le = r.cornersDotOptions) === null || le === void 0) && le.gradient || !((H = r.cornersDotOptions) === null || H === void 0) && H.color) && ((ye = document.createElementNS("http://www.w3.org/2000/svg", "clipPath")).setAttribute("id", "clip-path-corners-dot-color-" + de + "-" +
|
|
4072
|
+
if ((!((le = r.cornersDotOptions) === null || le === void 0) && le.gradient || !((H = r.cornersDotOptions) === null || H === void 0) && H.color) && ((ye = document.createElementNS("http://www.w3.org/2000/svg", "clipPath")).setAttribute("id", "clip-path-corners-dot-color-" + de + "-" + re), e._defs.appendChild(ye), e._cornersDotClipPath = ye, e._createColor({ options: (ee = r.cornersDotOptions) === null || ee === void 0 ? void 0 : ee.gradient, color: (q = r.cornersDotOptions) === null || q === void 0 ? void 0 : q.color, additionalRotation: ue, x: ce + 2 * N, y: he + 2 * N, height: c, width: c, name: "corners-dot-color-" + de + "-" + re })), (te = r.cornersDotOptions) === null || te === void 0 ? void 0 : te.type) {
|
|
4073
4073
|
var nt = new J({ svg: e._element, type: r.cornersDotOptions.type });
|
|
4074
4074
|
nt.draw(ce + 2 * N, he + 2 * N, c, ue), nt._element && ye && ye.appendChild(nt._element);
|
|
4075
4075
|
} else {
|
|
@@ -4393,7 +4393,7 @@ function _t({
|
|
|
4393
4393
|
) !== "single", R = a && y(
|
|
4394
4394
|
a,
|
|
4395
4395
|
n === fe.DESKTOP ? "attributes.corner-square-color-type" : "mobileAttributes.corner-square-color-type"
|
|
4396
|
-
) !== "single",
|
|
4396
|
+
) !== "single", oe = xn(() => {
|
|
4397
4397
|
const E = n === fe.DESKTOP ? h == null ? void 0 : h.attributes : Mn({}, h == null ? void 0 : h.attributes, h == null ? void 0 : h.mobileAttributes);
|
|
4398
4398
|
if (!E)
|
|
4399
4399
|
return {};
|
|
@@ -4479,7 +4479,7 @@ function _t({
|
|
|
4479
4479
|
qe(() => {
|
|
4480
4480
|
if (!w)
|
|
4481
4481
|
return;
|
|
4482
|
-
|
|
4482
|
+
I.current.update(oe);
|
|
4483
4483
|
const B = document.createElement("div");
|
|
4484
4484
|
document.body.appendChild(B), B.style.position = "absolute", B.style.left = "-9999px", I.current.append(B), I.current.getRawData("png").then((E) => Se(this, null, function* () {
|
|
4485
4485
|
if (E) {
|
|
@@ -4495,7 +4495,7 @@ function _t({
|
|
|
4495
4495
|
})).finally(() => {
|
|
4496
4496
|
B.remove();
|
|
4497
4497
|
});
|
|
4498
|
-
}, [d, w, n, t,
|
|
4498
|
+
}, [d, w, n, t, oe, f]);
|
|
4499
4499
|
const V = T.useRef();
|
|
4500
4500
|
V.current || (V.current = Ve(h)), qe(() => {
|
|
4501
4501
|
_e(V.current, h) ? b(!1) : b(!0);
|