reacthub-pixitweenjs 0.2.33 → 0.2.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +831 -827
- package/dist/index.umd.js +43 -43
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -539,78 +539,78 @@ Hn.exports;
|
|
|
539
539
|
function w(P) {
|
|
540
540
|
throw new RangeError(_[P]);
|
|
541
541
|
}
|
|
542
|
-
function N(P,
|
|
542
|
+
function N(P, I) {
|
|
543
543
|
for (var k = P.length, L = []; k--; )
|
|
544
|
-
L[k] =
|
|
544
|
+
L[k] = I(P[k]);
|
|
545
545
|
return L;
|
|
546
546
|
}
|
|
547
|
-
function A(P,
|
|
547
|
+
function A(P, I) {
|
|
548
548
|
var k = P.split("@"), L = "";
|
|
549
549
|
k.length > 1 && (L = k[0] + "@", P = k[1]), P = P.replace(g, ".");
|
|
550
|
-
var $ = P.split("."),
|
|
551
|
-
return L +
|
|
550
|
+
var $ = P.split("."), D = N($, I).join(".");
|
|
551
|
+
return L + D;
|
|
552
552
|
}
|
|
553
553
|
function T(P) {
|
|
554
|
-
for (var
|
|
555
|
-
$ = P.charCodeAt(k++), $ >= 55296 && $ <= 56319 && k < L ? (
|
|
556
|
-
return
|
|
554
|
+
for (var I = [], k = 0, L = P.length, $, D; k < L; )
|
|
555
|
+
$ = P.charCodeAt(k++), $ >= 55296 && $ <= 56319 && k < L ? (D = P.charCodeAt(k++), (D & 64512) == 56320 ? I.push((($ & 1023) << 10) + (D & 1023) + 65536) : (I.push($), k--)) : I.push($);
|
|
556
|
+
return I;
|
|
557
557
|
}
|
|
558
558
|
function S(P) {
|
|
559
|
-
return N(P, function(
|
|
559
|
+
return N(P, function(I) {
|
|
560
560
|
var k = "";
|
|
561
|
-
return
|
|
561
|
+
return I > 65535 && (I -= 65536, k += O(I >>> 10 & 1023 | 55296), I = 56320 | I & 1023), k += O(I), k;
|
|
562
562
|
}).join("");
|
|
563
563
|
}
|
|
564
|
-
function
|
|
564
|
+
function R(P) {
|
|
565
565
|
return P - 48 < 10 ? P - 22 : P - 65 < 26 ? P - 65 : P - 97 < 26 ? P - 97 : l;
|
|
566
566
|
}
|
|
567
|
-
function C(P,
|
|
568
|
-
return P + 22 + 75 * (P < 26) - ((
|
|
567
|
+
function C(P, I) {
|
|
568
|
+
return P + 22 + 75 * (P < 26) - ((I != 0) << 5);
|
|
569
569
|
}
|
|
570
|
-
function F(P,
|
|
570
|
+
function F(P, I, k) {
|
|
571
571
|
var L = 0;
|
|
572
|
-
for (P = k ? x(P / u) : P >> 1, P += x(P /
|
|
572
|
+
for (P = k ? x(P / u) : P >> 1, P += x(P / I); P > y * f >> 1; L += l)
|
|
573
573
|
P = x(P / y);
|
|
574
574
|
return x(L + (y + 1) * P / (P + h));
|
|
575
575
|
}
|
|
576
576
|
function G(P) {
|
|
577
|
-
var
|
|
577
|
+
var I = [], k = P.length, L, $ = 0, D = p, M = d, B, q, H, z, K, J, et, st, ot;
|
|
578
578
|
for (B = P.lastIndexOf(m), B < 0 && (B = 0), q = 0; q < B; ++q)
|
|
579
|
-
P.charCodeAt(q) >= 128 && w("not-basic"),
|
|
579
|
+
P.charCodeAt(q) >= 128 && w("not-basic"), I.push(P.charCodeAt(q));
|
|
580
580
|
for (H = B > 0 ? B + 1 : 0; H < k; ) {
|
|
581
|
-
for (z = $, K = 1, J = l; H >= k && w("invalid-input"), et =
|
|
581
|
+
for (z = $, K = 1, J = l; H >= k && w("invalid-input"), et = R(P.charCodeAt(H++)), (et >= l || et > x((o - $) / K)) && w("overflow"), $ += et * K, st = J <= M ? c : J >= M + f ? f : J - M, !(et < st); J += l)
|
|
582
582
|
ot = l - st, K > x(o / ot) && w("overflow"), K *= ot;
|
|
583
|
-
L =
|
|
583
|
+
L = I.length + 1, M = F($ - z, L, z == 0), x($ / L) > o - D && w("overflow"), D += x($ / L), $ %= L, I.splice($++, 0, D);
|
|
584
584
|
}
|
|
585
|
-
return S(
|
|
585
|
+
return S(I);
|
|
586
586
|
}
|
|
587
|
-
function
|
|
588
|
-
var
|
|
589
|
-
for (P = T(P), et = P.length,
|
|
587
|
+
function U(P) {
|
|
588
|
+
var I, k, L, $, D, M, B, q, H, z, K, J = [], et, st, ot, It;
|
|
589
|
+
for (P = T(P), et = P.length, I = p, k = 0, D = d, M = 0; M < et; ++M)
|
|
590
590
|
K = P[M], K < 128 && J.push(O(K));
|
|
591
591
|
for (L = $ = J.length, $ && J.push(m); L < et; ) {
|
|
592
592
|
for (B = o, M = 0; M < et; ++M)
|
|
593
|
-
K = P[M], K >=
|
|
594
|
-
for (st = L + 1, B -
|
|
595
|
-
if (K = P[M], K <
|
|
596
|
-
for (q = k, H = l; z = H <=
|
|
593
|
+
K = P[M], K >= I && K < B && (B = K);
|
|
594
|
+
for (st = L + 1, B - I > x((o - k) / st) && w("overflow"), k += (B - I) * st, I = B, M = 0; M < et; ++M)
|
|
595
|
+
if (K = P[M], K < I && ++k > o && w("overflow"), K == I) {
|
|
596
|
+
for (q = k, H = l; z = H <= D ? c : H >= D + f ? f : H - D, !(q < z); H += l)
|
|
597
597
|
It = q - z, ot = l - z, J.push(
|
|
598
598
|
O(C(z + It % ot, 0))
|
|
599
599
|
), q = x(It / ot);
|
|
600
|
-
J.push(O(C(q, 0))),
|
|
600
|
+
J.push(O(C(q, 0))), D = F(k, st, L == $), k = 0, ++L;
|
|
601
601
|
}
|
|
602
|
-
++k, ++
|
|
602
|
+
++k, ++I;
|
|
603
603
|
}
|
|
604
604
|
return J.join("");
|
|
605
605
|
}
|
|
606
606
|
function X(P) {
|
|
607
|
-
return A(P, function(
|
|
608
|
-
return b.test(
|
|
607
|
+
return A(P, function(I) {
|
|
608
|
+
return b.test(I) ? G(I.slice(4).toLowerCase()) : I;
|
|
609
609
|
});
|
|
610
610
|
}
|
|
611
|
-
function
|
|
612
|
-
return A(P, function(
|
|
613
|
-
return v.test(
|
|
611
|
+
function j(P) {
|
|
612
|
+
return A(P, function(I) {
|
|
613
|
+
return v.test(I) ? "xn--" + U(I) : I;
|
|
614
614
|
});
|
|
615
615
|
}
|
|
616
616
|
if (a = {
|
|
@@ -632,8 +632,8 @@ Hn.exports;
|
|
|
632
632
|
encode: S
|
|
633
633
|
},
|
|
634
634
|
decode: G,
|
|
635
|
-
encode:
|
|
636
|
-
toASCII:
|
|
635
|
+
encode: U,
|
|
636
|
+
toASCII: j,
|
|
637
637
|
toUnicode: X
|
|
638
638
|
}, n && i)
|
|
639
639
|
if (e.exports == n)
|
|
@@ -1011,14 +1011,14 @@ var gs = If, Qa = gs.custom, Ja = Dl(Qa) ? Qa : null, Uf = function e(t, r, n, i
|
|
|
1011
1011
|
i = [];
|
|
1012
1012
|
else if ($l(i, t) >= 0)
|
|
1013
1013
|
return "[Circular]";
|
|
1014
|
-
function u(
|
|
1014
|
+
function u(R, C, F) {
|
|
1015
1015
|
if (C && (i = Bf.call(i), i.push(C)), F) {
|
|
1016
1016
|
var G = {
|
|
1017
1017
|
depth: s.depth
|
|
1018
1018
|
};
|
|
1019
|
-
return ke(s, "quoteStyle") && (G.quoteStyle = s.quoteStyle), e(
|
|
1019
|
+
return ke(s, "quoteStyle") && (G.quoteStyle = s.quoteStyle), e(R, G, n + 1, i);
|
|
1020
1020
|
}
|
|
1021
|
-
return e(
|
|
1021
|
+
return e(R, s, n + 1, i);
|
|
1022
1022
|
}
|
|
1023
1023
|
if (typeof t == "function" && !to(t)) {
|
|
1024
1024
|
var d = Xf(t), p = _n(t, u);
|
|
@@ -1051,14 +1051,14 @@ var gs = If, Qa = gs.custom, Ja = Dl(Qa) ? Qa : null, Uf = function e(t, r, n, i
|
|
|
1051
1051
|
}
|
|
1052
1052
|
if (Wf(t)) {
|
|
1053
1053
|
var x = [];
|
|
1054
|
-
return Ha && Ha.call(t, function(
|
|
1055
|
-
x.push(u(C, t, !0) + " => " + u(
|
|
1054
|
+
return Ha && Ha.call(t, function(R, C) {
|
|
1055
|
+
x.push(u(C, t, !0) + " => " + u(R, t));
|
|
1056
1056
|
}), eo("Map", Xn.call(t), x, h);
|
|
1057
1057
|
}
|
|
1058
1058
|
if (Zf(t)) {
|
|
1059
1059
|
var O = [];
|
|
1060
|
-
return Va && Va.call(t, function(
|
|
1061
|
-
O.push(u(
|
|
1060
|
+
return Va && Va.call(t, function(R) {
|
|
1061
|
+
O.push(u(R, t));
|
|
1062
1062
|
}), eo("Set", Wn.call(t), O, h);
|
|
1063
1063
|
}
|
|
1064
1064
|
if (Yf(t))
|
|
@@ -1551,13 +1551,13 @@ var ta = Ks, Pr = Af, nh = Uf, ih = ta("%TypeError%"), xn = ta("%WeakMap%", !0),
|
|
|
1551
1551
|
w = c ? N.sort(c) : N;
|
|
1552
1552
|
}
|
|
1553
1553
|
for (var A = i && Te(v) && v.length === 1 ? r + "[]" : r, T = 0; T < w.length; ++T) {
|
|
1554
|
-
var S = w[T],
|
|
1555
|
-
if (!(a &&
|
|
1554
|
+
var S = w[T], R = typeof S == "object" && typeof S.value < "u" ? S.value : v[S];
|
|
1555
|
+
if (!(a && R === null)) {
|
|
1556
1556
|
var C = Te(v) ? typeof n == "function" ? n(A, S) : A : A + (f ? "." + S : "[" + S + "]");
|
|
1557
1557
|
b.set(t, _);
|
|
1558
1558
|
var F = Hl();
|
|
1559
1559
|
F.set(ji, b), Vl(E, e(
|
|
1560
|
-
|
|
1560
|
+
R,
|
|
1561
1561
|
C,
|
|
1562
1562
|
n,
|
|
1563
1563
|
i,
|
|
@@ -1860,18 +1860,18 @@ oe.prototype.parse = function(e, t, r) {
|
|
|
1860
1860
|
}
|
|
1861
1861
|
if (!rd[f])
|
|
1862
1862
|
for (var d = 0, _ = Es.length; d < _; d++) {
|
|
1863
|
-
var
|
|
1864
|
-
if (o.indexOf(
|
|
1865
|
-
var C = encodeURIComponent(
|
|
1866
|
-
C ===
|
|
1863
|
+
var R = Es[d];
|
|
1864
|
+
if (o.indexOf(R) !== -1) {
|
|
1865
|
+
var C = encodeURIComponent(R);
|
|
1866
|
+
C === R && (C = escape(R)), o = o.split(R).join(C);
|
|
1867
1867
|
}
|
|
1868
1868
|
}
|
|
1869
1869
|
var F = o.indexOf("#");
|
|
1870
1870
|
F !== -1 && (this.hash = o.substr(F), o = o.slice(0, F));
|
|
1871
1871
|
var G = o.indexOf("?");
|
|
1872
1872
|
if (G !== -1 ? (this.search = o.substr(G), this.query = o.substr(G + 1), t && (this.query = ws.parse(this.query)), o = o.slice(0, G)) : t && (this.search = "", this.query = {}), o && (this.pathname = o), _r[f] && this.hostname && !this.pathname && (this.pathname = "/"), this.pathname || this.search) {
|
|
1873
|
-
var T = this.pathname || "",
|
|
1874
|
-
this.path = T +
|
|
1873
|
+
var T = this.pathname || "", U = this.search || "";
|
|
1874
|
+
this.path = T + U;
|
|
1875
1875
|
}
|
|
1876
1876
|
return this.href = this.format(), this;
|
|
1877
1877
|
};
|
|
@@ -8079,94 +8079,98 @@ const Qt = /* @__PURE__ */ Cr(Bm), Um = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1,
|
|
|
8079
8079
|
uniqueId: u,
|
|
8080
8080
|
startAt: d,
|
|
8081
8081
|
endAt: p,
|
|
8082
|
-
|
|
8083
|
-
|
|
8082
|
+
initialAlpha: m,
|
|
8083
|
+
transformation: { x: b, y: v, width: g, height: _, colorCorrection: y, animation: x, effect: O },
|
|
8084
|
+
applyTransformer: E
|
|
8084
8085
|
} = h;
|
|
8085
8086
|
console.log("all abstract props", e);
|
|
8086
8087
|
const {
|
|
8087
|
-
contrast:
|
|
8088
|
-
saturation:
|
|
8089
|
-
brightness:
|
|
8090
|
-
alpha:
|
|
8091
|
-
blurRadius:
|
|
8092
|
-
} =
|
|
8093
|
-
...
|
|
8094
|
-
...
|
|
8095
|
-
...
|
|
8096
|
-
...
|
|
8088
|
+
contrast: w = 1,
|
|
8089
|
+
saturation: N = 1,
|
|
8090
|
+
brightness: A = 1,
|
|
8091
|
+
alpha: T = 1,
|
|
8092
|
+
blurRadius: S = 0
|
|
8093
|
+
} = y || {}, R = {
|
|
8094
|
+
...A > 1 && { brightness: A },
|
|
8095
|
+
...w > 1 && { contrast: w },
|
|
8096
|
+
...N > 1 && { saturation: N },
|
|
8097
|
+
...T !== 0 && { alpha: T }
|
|
8097
8098
|
};
|
|
8098
8099
|
it.useEffect(() => {
|
|
8099
8100
|
s.current && r(!0);
|
|
8100
8101
|
}, []);
|
|
8101
|
-
const
|
|
8102
|
-
c.current =
|
|
8103
|
-
},
|
|
8104
|
-
c.current =
|
|
8102
|
+
const C = (I) => {
|
|
8103
|
+
c.current = I.alpha;
|
|
8104
|
+
}, F = (I) => {
|
|
8105
|
+
c.current = I.alpha;
|
|
8106
|
+
}, G = () => {
|
|
8107
|
+
console.log("reverse complete"), c.current = m;
|
|
8105
8108
|
};
|
|
8106
8109
|
it.useEffect(() => {
|
|
8107
|
-
let
|
|
8110
|
+
let I = ge.context(() => {
|
|
8108
8111
|
});
|
|
8109
8112
|
if (s.current && f.current) {
|
|
8110
|
-
const
|
|
8113
|
+
const k = {
|
|
8111
8114
|
duration: Number(p) - Number(d)
|
|
8112
|
-
},
|
|
8113
|
-
onStart:
|
|
8115
|
+
}, L = {
|
|
8116
|
+
onStart: C,
|
|
8117
|
+
onReverseComplete: G,
|
|
8114
8118
|
onStartParams: [{ alpha: 1 }]
|
|
8115
|
-
},
|
|
8116
|
-
onComplete:
|
|
8119
|
+
}, $ = {
|
|
8120
|
+
onComplete: F,
|
|
8117
8121
|
onCompleteParams: [{ alpha: 0 }]
|
|
8118
|
-
},
|
|
8119
|
-
|
|
8120
|
-
var
|
|
8122
|
+
}, D = fa(x || "None");
|
|
8123
|
+
I = ge.context(() => {
|
|
8124
|
+
var M, B;
|
|
8121
8125
|
f.current.to(
|
|
8122
8126
|
s.current,
|
|
8123
|
-
{ alpha: 1, duration: 0.1, ...
|
|
8127
|
+
{ alpha: 1, duration: 0.1, ...L },
|
|
8124
8128
|
d
|
|
8125
|
-
).from(s.current, { ...
|
|
8129
|
+
).from(s.current, { ...k }, d).to(
|
|
8126
8130
|
s.current,
|
|
8127
|
-
{ alpha: 0, duration: 0.1,
|
|
8128
|
-
Number(p) - 0.
|
|
8129
|
-
), Qt(
|
|
8131
|
+
{ alpha: 0, duration: 0.1, ...$ },
|
|
8132
|
+
Number(p) - 0.09
|
|
8133
|
+
), Qt(D.from) ? Qt(D.to) ? Qt(D.fromTo) || f.current.fromTo(
|
|
8130
8134
|
s.current,
|
|
8131
|
-
(
|
|
8132
|
-
(
|
|
8135
|
+
(M = D.fromTo) == null ? void 0 : M.from,
|
|
8136
|
+
(B = D.fromTo) == null ? void 0 : B.to,
|
|
8133
8137
|
d
|
|
8134
|
-
) : f.current.to(s.current, { ...
|
|
8138
|
+
) : f.current.to(s.current, { ...D.to }, d) : f.current.from(s.current, { ...D.from }, d);
|
|
8135
8139
|
});
|
|
8136
8140
|
}
|
|
8137
|
-
return () =>
|
|
8138
|
-
}, [
|
|
8139
|
-
const
|
|
8141
|
+
return () => I.revert();
|
|
8142
|
+
}, [x, d, p]);
|
|
8143
|
+
const U = it.useCallback(() => {
|
|
8140
8144
|
n(!0);
|
|
8141
|
-
}, []),
|
|
8142
|
-
(
|
|
8143
|
-
console.log("changeEnd",
|
|
8145
|
+
}, []), X = it.useCallback(
|
|
8146
|
+
(I) => {
|
|
8147
|
+
console.log("changeEnd", I), e.onAnchorTransformationEnd && (console.log("running onAnchorTransformationEnd"), e.onAnchorTransformationEnd(I));
|
|
8144
8148
|
},
|
|
8145
8149
|
[]
|
|
8146
|
-
),
|
|
8147
|
-
...
|
|
8148
|
-
...!Qt(
|
|
8150
|
+
), j = Vs(Mt, {
|
|
8151
|
+
...S > 0 && { blur: ce.filters.BlurFilter },
|
|
8152
|
+
...!Qt(R) && { adjust: ua },
|
|
8149
8153
|
matrix: ce.filters.ColorMatrixFilter
|
|
8150
|
-
}),
|
|
8154
|
+
}), P = (y == null ? void 0 : y.enabled) || O && O !== We.Normal;
|
|
8151
8155
|
return console.log("Alpha ref", c.current), /* @__PURE__ */ dt.jsxs(Mt, { ref: a, children: [
|
|
8152
8156
|
/* @__PURE__ */ dt.jsx(
|
|
8153
8157
|
Mt,
|
|
8154
8158
|
{
|
|
8155
8159
|
ref: s,
|
|
8156
8160
|
alpha: c.current,
|
|
8157
|
-
position: [
|
|
8158
|
-
pivot: [
|
|
8159
|
-
width:
|
|
8160
|
-
height:
|
|
8161
|
+
position: [b, v],
|
|
8162
|
+
pivot: [b, v],
|
|
8163
|
+
width: g,
|
|
8164
|
+
height: _,
|
|
8161
8165
|
children: /* @__PURE__ */ dt.jsxs(Mt, { children: [
|
|
8162
|
-
|
|
8163
|
-
|
|
8166
|
+
P && /* @__PURE__ */ dt.jsx(
|
|
8167
|
+
j,
|
|
8164
8168
|
{
|
|
8165
8169
|
scale: 1,
|
|
8166
|
-
blur: { blur:
|
|
8167
|
-
adjust:
|
|
8168
|
-
apply: ({ matrix:
|
|
8169
|
-
|
|
8170
|
+
blur: { blur: S, quality: 4 },
|
|
8171
|
+
adjust: R,
|
|
8172
|
+
apply: ({ matrix: I }) => {
|
|
8173
|
+
O === We.BlackAndWhite ? I.desaturate() : O === We.Sepia ? I.sepia() : O === We.RetroVintage || O === We.NightVision ? I.negative() : O === We.Normal && I.reset();
|
|
8170
8174
|
},
|
|
8171
8175
|
matrix: {
|
|
8172
8176
|
enabled: !0,
|
|
@@ -8176,18 +8180,18 @@ const Qt = /* @__PURE__ */ Cr(Bm), Um = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1,
|
|
|
8176
8180
|
children: /* @__PURE__ */ dt.jsx(Mt, { ref: o, children: e.children })
|
|
8177
8181
|
}
|
|
8178
8182
|
),
|
|
8179
|
-
!
|
|
8183
|
+
!P && /* @__PURE__ */ dt.jsx(Mt, { ref: o, children: e.children })
|
|
8180
8184
|
] })
|
|
8181
8185
|
}
|
|
8182
8186
|
),
|
|
8183
|
-
|
|
8187
|
+
E && /* @__PURE__ */ dt.jsx(
|
|
8184
8188
|
ca,
|
|
8185
8189
|
{
|
|
8186
8190
|
pixiTransformerRef: l,
|
|
8187
8191
|
imageRef: s,
|
|
8188
8192
|
isMounted: t,
|
|
8189
|
-
transformCommit:
|
|
8190
|
-
transformChange:
|
|
8193
|
+
transformCommit: X,
|
|
8194
|
+
transformChange: U,
|
|
8191
8195
|
mouseoverEvent: i,
|
|
8192
8196
|
uniqueId: u
|
|
8193
8197
|
}
|
|
@@ -8457,24 +8461,24 @@ function Gm(e, t) {
|
|
|
8457
8461
|
const s = e.lineStyle, a = new jt(n[0], n[1]), o = new jt(n[n.length - 2], n[n.length - 1]), l = r.type !== Gt.POLY || r.closeStroke, c = Math.abs(a.x - o.x) < i && Math.abs(a.y - o.y) < i;
|
|
8458
8462
|
if (l) {
|
|
8459
8463
|
n = n.slice(), c && (n.pop(), n.pop(), o.set(n[n.length - 2], n[n.length - 1]));
|
|
8460
|
-
const
|
|
8461
|
-
n.unshift(
|
|
8464
|
+
const U = (a.x + o.x) * 0.5, X = (o.y + a.y) * 0.5;
|
|
8465
|
+
n.unshift(U, X), n.push(U, X);
|
|
8462
8466
|
}
|
|
8463
8467
|
const f = t.points, h = n.length / 2;
|
|
8464
8468
|
let u = n.length;
|
|
8465
8469
|
const d = f.length / 2, p = s.width / 2, m = p * p, b = s.miterLimit * s.miterLimit;
|
|
8466
8470
|
let v = n[0], g = n[1], _ = n[2], y = n[3], x = 0, O = 0, E = -(g - y), w = v - _, N = 0, A = 0, T = Math.sqrt(E * E + w * w);
|
|
8467
8471
|
E /= T, w /= T, E *= p, w *= p;
|
|
8468
|
-
const S = s.alignment,
|
|
8469
|
-
l || (s.cap === Qe.ROUND ? u += Ge(v - E * (
|
|
8470
|
-
for (let
|
|
8471
|
-
v = n[(
|
|
8472
|
-
const X = _ - v,
|
|
8472
|
+
const S = s.alignment, R = (1 - S) * 2, C = S * 2;
|
|
8473
|
+
l || (s.cap === Qe.ROUND ? u += Ge(v - E * (R - C) * 0.5, g - w * (R - C) * 0.5, v - E * R, g - w * R, v + E * C, g + w * C, f, !0) + 2 : s.cap === Qe.SQUARE && (u += zo(v, g, E, w, R, C, !0, f))), f.push(v - E * R, g - w * R, v + E * C, g + w * C);
|
|
8474
|
+
for (let U = 1; U < h - 1; ++U) {
|
|
8475
|
+
v = n[(U - 1) * 2], g = n[(U - 1) * 2 + 1], _ = n[U * 2], y = n[U * 2 + 1], x = n[(U + 1) * 2], O = n[(U + 1) * 2 + 1], E = -(g - y), w = v - _, T = Math.sqrt(E * E + w * w), E /= T, w /= T, E *= p, w *= p, N = -(y - O), A = _ - x, T = Math.sqrt(N * N + A * A), N /= T, A /= T, N *= p, A *= p;
|
|
8476
|
+
const X = _ - v, j = g - y, P = _ - x, I = O - y, k = X * P + j * I, L = j * P - I * X, $ = L < 0;
|
|
8473
8477
|
if (Math.abs(L) < 1e-3 * Math.abs(k)) {
|
|
8474
|
-
f.push(_ - E *
|
|
8478
|
+
f.push(_ - E * R, y - w * R, _ + E * C, y + w * C), k >= 0 && (s.join === ee.ROUND ? u += Ge(_, y, _ - E * R, y - w * R, _ - N * R, y - A * R, f, !1) + 4 : u += 2, f.push(_ - N * C, y - A * C, _ + N * R, y + A * R));
|
|
8475
8479
|
continue;
|
|
8476
8480
|
}
|
|
8477
|
-
const
|
|
8481
|
+
const D = (-E + v) * (-w + y) - (-E + _) * (-w + g), M = (-N + x) * (-A + y) - (-N + _) * (-A + O), B = (X * M - P * D) / L, q = (I * D - j * M) / L, H = (B - _) * (B - _) + (q - y) * (q - y), z = _ + (B - _) * R, K = y + (q - y) * R, J = _ - (B - _) * C, et = y - (q - y) * C, st = Math.min(X * X + j * j, P * P + I * I), ot = $ ? R : C, It = st + ot * ot * m, St = H <= It;
|
|
8478
8482
|
let V = s.join;
|
|
8479
8483
|
if (V === ee.MITER && H / m > b && (V = ee.BEVEL), St)
|
|
8480
8484
|
switch (V) {
|
|
@@ -8483,32 +8487,32 @@ function Gm(e, t) {
|
|
|
8483
8487
|
break;
|
|
8484
8488
|
}
|
|
8485
8489
|
case ee.BEVEL: {
|
|
8486
|
-
$ ? f.push(z, K, _ + E * C, y + w * C, z, K, _ + N * C, y + A * C) : f.push(_ - E *
|
|
8490
|
+
$ ? f.push(z, K, _ + E * C, y + w * C, z, K, _ + N * C, y + A * C) : f.push(_ - E * R, y - w * R, J, et, _ - N * R, y - A * R, J, et), u += 2;
|
|
8487
8491
|
break;
|
|
8488
8492
|
}
|
|
8489
8493
|
case ee.ROUND: {
|
|
8490
|
-
$ ? (f.push(z, K, _ + E * C, y + w * C), u += Ge(_, y, _ + E * C, y + w * C, _ + N * C, y + A * C, f, !0) + 4, f.push(z, K, _ + N * C, y + A * C)) : (f.push(_ - E *
|
|
8494
|
+
$ ? (f.push(z, K, _ + E * C, y + w * C), u += Ge(_, y, _ + E * C, y + w * C, _ + N * C, y + A * C, f, !0) + 4, f.push(z, K, _ + N * C, y + A * C)) : (f.push(_ - E * R, y - w * R, J, et), u += Ge(_, y, _ - E * R, y - w * R, _ - N * R, y - A * R, f, !1) + 4, f.push(_ - N * R, y - A * R, J, et));
|
|
8491
8495
|
break;
|
|
8492
8496
|
}
|
|
8493
8497
|
}
|
|
8494
8498
|
else {
|
|
8495
|
-
switch (f.push(_ - E *
|
|
8499
|
+
switch (f.push(_ - E * R, y - w * R, _ + E * C, y + w * C), V) {
|
|
8496
8500
|
case ee.MITER: {
|
|
8497
8501
|
$ ? f.push(J, et, J, et) : f.push(z, K, z, K), u += 2;
|
|
8498
8502
|
break;
|
|
8499
8503
|
}
|
|
8500
8504
|
case ee.ROUND: {
|
|
8501
|
-
$ ? u += Ge(_, y, _ + E * C, y + w * C, _ + N * C, y + A * C, f, !0) + 2 : u += Ge(_, y, _ - E *
|
|
8505
|
+
$ ? u += Ge(_, y, _ + E * C, y + w * C, _ + N * C, y + A * C, f, !0) + 2 : u += Ge(_, y, _ - E * R, y - w * R, _ - N * R, y - A * R, f, !1) + 2;
|
|
8502
8506
|
break;
|
|
8503
8507
|
}
|
|
8504
8508
|
}
|
|
8505
|
-
f.push(_ - N *
|
|
8509
|
+
f.push(_ - N * R, y - A * R, _ + N * C, y + A * C), u += 2;
|
|
8506
8510
|
}
|
|
8507
8511
|
}
|
|
8508
|
-
v = n[(h - 2) * 2], g = n[(h - 2) * 2 + 1], _ = n[(h - 1) * 2], y = n[(h - 1) * 2 + 1], E = -(g - y), w = v - _, T = Math.sqrt(E * E + w * w), E /= T, w /= T, E *= p, w *= p, f.push(_ - E *
|
|
8512
|
+
v = n[(h - 2) * 2], g = n[(h - 2) * 2 + 1], _ = n[(h - 1) * 2], y = n[(h - 1) * 2 + 1], E = -(g - y), w = v - _, T = Math.sqrt(E * E + w * w), E /= T, w /= T, E *= p, w *= p, f.push(_ - E * R, y - w * R, _ + E * C, y + w * C), l || (s.cap === Qe.ROUND ? u += Ge(_ - E * (R - C) * 0.5, y - w * (R - C) * 0.5, _ - E * R, y - w * R, _ + E * C, y + w * C, f, !1) + 2 : s.cap === Qe.SQUARE && (u += zo(_, y, E, w, R, C, !1, f)));
|
|
8509
8513
|
const F = t.indices, G = Or.epsilon * Or.epsilon;
|
|
8510
|
-
for (let
|
|
8511
|
-
v = f[
|
|
8514
|
+
for (let U = d; U < u + d - 2; ++U)
|
|
8515
|
+
v = f[U * 2], g = f[U * 2 + 1], _ = f[(U + 1) * 2], y = f[(U + 1) * 2 + 1], x = f[(U + 2) * 2], O = f[(U + 2) * 2 + 1], !(Math.abs(v * (y - O) + _ * (O - g) + x * (g - y)) < G) && F.push(U, U + 1, U + 2);
|
|
8512
8516
|
}
|
|
8513
8517
|
function qm(e, t) {
|
|
8514
8518
|
let r = 0;
|
|
@@ -10329,9 +10333,9 @@ var bg = function() {
|
|
|
10329
10333
|
N /= T;
|
|
10330
10334
|
for (var S = 0; S < T; S++)
|
|
10331
10335
|
p.push(_g(w, N)), w += N;
|
|
10332
|
-
return p.map(function(
|
|
10333
|
-
var C = os(
|
|
10334
|
-
return { x1: F, y1: G, x2: X, y2:
|
|
10336
|
+
return p.map(function(R) {
|
|
10337
|
+
var C = os(R[0], a, o, b, m, O, E), F = C.x, G = C.y, U = os(R[1], a, o, b, m, O, E), X = U.x, j = U.y, P = os(R[2], a, o, b, m, O, E), I = P.x, k = P.y;
|
|
10338
|
+
return { x1: F, y1: G, x2: X, y2: j, x: I, y: k };
|
|
10335
10339
|
});
|
|
10336
10340
|
};
|
|
10337
10341
|
class Eg extends xa {
|
|
@@ -12424,21 +12428,21 @@ const OT = (e) => ({
|
|
|
12424
12428
|
src: A,
|
|
12425
12429
|
startAt: T,
|
|
12426
12430
|
endAt: S,
|
|
12427
|
-
locked:
|
|
12431
|
+
locked: R,
|
|
12428
12432
|
loop: C,
|
|
12429
12433
|
transformation: {
|
|
12430
12434
|
width: F = 0,
|
|
12431
12435
|
height: G = 0,
|
|
12432
|
-
x:
|
|
12436
|
+
x: U,
|
|
12433
12437
|
y: X,
|
|
12434
|
-
rotation:
|
|
12438
|
+
rotation: j = 0,
|
|
12435
12439
|
scale: P,
|
|
12436
|
-
animation:
|
|
12440
|
+
animation: I,
|
|
12437
12441
|
colorCorrection: k,
|
|
12438
12442
|
effect: L
|
|
12439
12443
|
},
|
|
12440
12444
|
pointerdown: $,
|
|
12441
|
-
pointerup:
|
|
12445
|
+
pointerup: D,
|
|
12442
12446
|
mousedown: M,
|
|
12443
12447
|
mouseup: B,
|
|
12444
12448
|
pointerover: q,
|
|
@@ -12520,7 +12524,7 @@ const OT = (e) => ({
|
|
|
12520
12524
|
}, he = {
|
|
12521
12525
|
onComplete: xt,
|
|
12522
12526
|
onCompleteParams: [{ alpha: 0 }]
|
|
12523
|
-
}, kt = fa(
|
|
12527
|
+
}, kt = fa(I || "None");
|
|
12524
12528
|
lt = ge.context(() => {
|
|
12525
12529
|
var $r, yn;
|
|
12526
12530
|
x.current.to(
|
|
@@ -12530,7 +12534,7 @@ const OT = (e) => ({
|
|
|
12530
12534
|
).from(m.current, { ...Ne }, T).to(
|
|
12531
12535
|
m.current,
|
|
12532
12536
|
{ alpha: 0, duration: 0.1, ...he },
|
|
12533
|
-
Number(S) - 0.
|
|
12537
|
+
Number(S) - 0.09
|
|
12534
12538
|
), Qt(kt.from) ? Qt(kt.to) ? Qt(kt.fromTo) || x.current.fromTo(
|
|
12535
12539
|
m.current,
|
|
12536
12540
|
($r = kt.fromTo) == null ? void 0 : $r.from,
|
|
@@ -12544,7 +12548,7 @@ const OT = (e) => ({
|
|
|
12544
12548
|
});
|
|
12545
12549
|
}
|
|
12546
12550
|
return () => lt.revert();
|
|
12547
|
-
}, [
|
|
12551
|
+
}, [I, T, S]);
|
|
12548
12552
|
const Re = it.useCallback(() => {
|
|
12549
12553
|
c(!0);
|
|
12550
12554
|
}, []);
|
|
@@ -12562,13 +12566,13 @@ const OT = (e) => ({
|
|
|
12562
12566
|
{
|
|
12563
12567
|
ref: m,
|
|
12564
12568
|
alpha: y.current,
|
|
12565
|
-
position: [
|
|
12566
|
-
pivot: [
|
|
12569
|
+
position: [U, X],
|
|
12570
|
+
pivot: [U, X],
|
|
12567
12571
|
width: F,
|
|
12568
12572
|
height: G,
|
|
12569
12573
|
children: /* @__PURE__ */ dt.jsxs(Mt, { ref: v, children: [
|
|
12570
12574
|
!w && // @ts-ignore
|
|
12571
|
-
/* @__PURE__ */ dt.jsx(Mt, { anchor: 0.5, position: [F / 2, G / 2], children: /* @__PURE__ */ dt.jsx(bc, { x:
|
|
12575
|
+
/* @__PURE__ */ dt.jsx(Mt, { anchor: 0.5, position: [F / 2, G / 2], children: /* @__PURE__ */ dt.jsx(bc, { x: U, y: X, ref: d, draw: yt }) }),
|
|
12572
12576
|
t && t.length > 0 && /* @__PURE__ */ dt.jsx(
|
|
12573
12577
|
LT,
|
|
12574
12578
|
{
|
|
@@ -12586,24 +12590,24 @@ const OT = (e) => ({
|
|
|
12586
12590
|
children: /* @__PURE__ */ dt.jsx(
|
|
12587
12591
|
MT,
|
|
12588
12592
|
{
|
|
12589
|
-
x:
|
|
12593
|
+
x: U,
|
|
12590
12594
|
y: X,
|
|
12591
12595
|
width: F,
|
|
12592
12596
|
height: G,
|
|
12593
|
-
rotation:
|
|
12597
|
+
rotation: j,
|
|
12594
12598
|
animationSpeed: 1,
|
|
12595
12599
|
loop: C,
|
|
12596
12600
|
textures: i,
|
|
12597
12601
|
onComplete: rt,
|
|
12598
12602
|
onFrameChange: (lt) => a(lt),
|
|
12599
12603
|
anchor: 0.5,
|
|
12600
|
-
...!
|
|
12604
|
+
...!R && !l && {
|
|
12601
12605
|
interactive: !0,
|
|
12602
12606
|
buttonMode: !0,
|
|
12603
12607
|
pointerdown: $,
|
|
12604
12608
|
pointerover: q,
|
|
12605
12609
|
pointerout: K,
|
|
12606
|
-
pointerup:
|
|
12610
|
+
pointerup: D,
|
|
12607
12611
|
mousedown: M,
|
|
12608
12612
|
mouseup: B,
|
|
12609
12613
|
mouseover: H,
|
|
@@ -13030,26 +13034,26 @@ var vc = { exports: {} };
|
|
|
13030
13034
|
value: !0
|
|
13031
13035
|
}), n.default = n.BlockEmbed = n.bubbleFormats = void 0;
|
|
13032
13036
|
var s = function() {
|
|
13033
|
-
function T(S,
|
|
13034
|
-
for (var C = 0; C <
|
|
13035
|
-
var F =
|
|
13037
|
+
function T(S, R) {
|
|
13038
|
+
for (var C = 0; C < R.length; C++) {
|
|
13039
|
+
var F = R[C];
|
|
13036
13040
|
F.enumerable = F.enumerable || !1, F.configurable = !0, "value" in F && (F.writable = !0), Object.defineProperty(S, F.key, F);
|
|
13037
13041
|
}
|
|
13038
13042
|
}
|
|
13039
|
-
return function(S,
|
|
13040
|
-
return
|
|
13043
|
+
return function(S, R, C) {
|
|
13044
|
+
return R && T(S.prototype, R), C && T(S, C), S;
|
|
13041
13045
|
};
|
|
13042
|
-
}(), a = function T(S,
|
|
13046
|
+
}(), a = function T(S, R, C) {
|
|
13043
13047
|
S === null && (S = Function.prototype);
|
|
13044
|
-
var F = Object.getOwnPropertyDescriptor(S,
|
|
13048
|
+
var F = Object.getOwnPropertyDescriptor(S, R);
|
|
13045
13049
|
if (F === void 0) {
|
|
13046
13050
|
var G = Object.getPrototypeOf(S);
|
|
13047
|
-
return G === null ? void 0 : T(G,
|
|
13051
|
+
return G === null ? void 0 : T(G, R, C);
|
|
13048
13052
|
} else {
|
|
13049
13053
|
if ("value" in F)
|
|
13050
13054
|
return F.value;
|
|
13051
|
-
var
|
|
13052
|
-
return
|
|
13055
|
+
var U = F.get;
|
|
13056
|
+
return U === void 0 ? void 0 : U.call(C);
|
|
13053
13057
|
}
|
|
13054
13058
|
}, o = i(3), l = _(o), c = i(2), f = _(c), h = i(0), u = _(h), d = i(16), p = _(d), m = i(6), b = _(m), v = i(7), g = _(v);
|
|
13055
13059
|
function _(T) {
|
|
@@ -13092,16 +13096,16 @@ var vc = { exports: {} };
|
|
|
13092
13096
|
}
|
|
13093
13097
|
}, {
|
|
13094
13098
|
key: "formatAt",
|
|
13095
|
-
value: function(C, F, G,
|
|
13096
|
-
this.format(G,
|
|
13099
|
+
value: function(C, F, G, U) {
|
|
13100
|
+
this.format(G, U);
|
|
13097
13101
|
}
|
|
13098
13102
|
}, {
|
|
13099
13103
|
key: "insertAt",
|
|
13100
13104
|
value: function(C, F, G) {
|
|
13101
13105
|
if (typeof F == "string" && F.endsWith(`
|
|
13102
13106
|
`)) {
|
|
13103
|
-
var
|
|
13104
|
-
this.parent.insertBefore(
|
|
13107
|
+
var U = u.default.create(N.blotName);
|
|
13108
|
+
this.parent.insertBefore(U, C === 0 ? this : this.next), U.insertAt(0, F.slice(0, -1));
|
|
13105
13109
|
} else
|
|
13106
13110
|
a(S.prototype.__proto__ || Object.getPrototypeOf(S.prototype), "insertAt", this).call(this, C, F, G);
|
|
13107
13111
|
}
|
|
@@ -13110,9 +13114,9 @@ var vc = { exports: {} };
|
|
|
13110
13114
|
w.scope = u.default.Scope.BLOCK_BLOT;
|
|
13111
13115
|
var N = function(T) {
|
|
13112
13116
|
O(S, T);
|
|
13113
|
-
function S(
|
|
13117
|
+
function S(R) {
|
|
13114
13118
|
y(this, S);
|
|
13115
|
-
var C = x(this, (S.__proto__ || Object.getPrototypeOf(S)).call(this,
|
|
13119
|
+
var C = x(this, (S.__proto__ || Object.getPrototypeOf(S)).call(this, R));
|
|
13116
13120
|
return C.cache = {}, C;
|
|
13117
13121
|
}
|
|
13118
13122
|
return s(S, [{
|
|
@@ -13130,8 +13134,8 @@ var vc = { exports: {} };
|
|
|
13130
13134
|
}
|
|
13131
13135
|
}, {
|
|
13132
13136
|
key: "formatAt",
|
|
13133
|
-
value: function(C, F, G,
|
|
13134
|
-
F <= 0 || (u.default.query(G, u.default.Scope.BLOCK) ? C + F === this.length() && this.format(G,
|
|
13137
|
+
value: function(C, F, G, U) {
|
|
13138
|
+
F <= 0 || (u.default.query(G, u.default.Scope.BLOCK) ? C + F === this.length() && this.format(G, U) : a(S.prototype.__proto__ || Object.getPrototypeOf(S.prototype), "formatAt", this).call(this, C, Math.min(F, this.length() - C - 1), G, U), this.cache = {});
|
|
13135
13139
|
}
|
|
13136
13140
|
}, {
|
|
13137
13141
|
key: "insertAt",
|
|
@@ -13139,12 +13143,12 @@ var vc = { exports: {} };
|
|
|
13139
13143
|
if (G != null)
|
|
13140
13144
|
return a(S.prototype.__proto__ || Object.getPrototypeOf(S.prototype), "insertAt", this).call(this, C, F, G);
|
|
13141
13145
|
if (F.length !== 0) {
|
|
13142
|
-
var
|
|
13143
|
-
`), X =
|
|
13146
|
+
var U = F.split(`
|
|
13147
|
+
`), X = U.shift();
|
|
13144
13148
|
X.length > 0 && (C < this.length() - 1 || this.children.tail == null ? a(S.prototype.__proto__ || Object.getPrototypeOf(S.prototype), "insertAt", this).call(this, Math.min(C, this.length() - 1), X) : this.children.tail.insertAt(this.children.tail.length(), X), this.cache = {});
|
|
13145
|
-
var
|
|
13146
|
-
|
|
13147
|
-
return
|
|
13149
|
+
var j = this;
|
|
13150
|
+
U.reduce(function(P, I) {
|
|
13151
|
+
return j = j.split(P, !0), j.insertAt(0, I), I.length;
|
|
13148
13152
|
}, C + X.length);
|
|
13149
13153
|
}
|
|
13150
13154
|
}
|
|
@@ -13187,8 +13191,8 @@ var vc = { exports: {} };
|
|
|
13187
13191
|
var G = this.clone();
|
|
13188
13192
|
return C === 0 ? (this.parent.insertBefore(G, this), this) : (this.parent.insertBefore(G, this.next), G);
|
|
13189
13193
|
} else {
|
|
13190
|
-
var
|
|
13191
|
-
return this.cache = {},
|
|
13194
|
+
var U = a(S.prototype.__proto__ || Object.getPrototypeOf(S.prototype), "split", this).call(this, C, F);
|
|
13195
|
+
return this.cache = {}, U;
|
|
13192
13196
|
}
|
|
13193
13197
|
}
|
|
13194
13198
|
}]), S;
|
|
@@ -13206,116 +13210,116 @@ var vc = { exports: {} };
|
|
|
13206
13210
|
Object.defineProperty(n, "__esModule", {
|
|
13207
13211
|
value: !0
|
|
13208
13212
|
}), n.default = n.overload = n.expandConfig = void 0;
|
|
13209
|
-
var s = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(
|
|
13210
|
-
return typeof
|
|
13211
|
-
} : function(
|
|
13212
|
-
return
|
|
13213
|
+
var s = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(j) {
|
|
13214
|
+
return typeof j;
|
|
13215
|
+
} : function(j) {
|
|
13216
|
+
return j && typeof Symbol == "function" && j.constructor === Symbol && j !== Symbol.prototype ? "symbol" : typeof j;
|
|
13213
13217
|
}, a = function() {
|
|
13214
|
-
function
|
|
13215
|
-
var k = [], L = !0, $ = !1,
|
|
13218
|
+
function j(P, I) {
|
|
13219
|
+
var k = [], L = !0, $ = !1, D = void 0;
|
|
13216
13220
|
try {
|
|
13217
|
-
for (var M = P[Symbol.iterator](), B; !(L = (B = M.next()).done) && (k.push(B.value), !(
|
|
13221
|
+
for (var M = P[Symbol.iterator](), B; !(L = (B = M.next()).done) && (k.push(B.value), !(I && k.length === I)); L = !0)
|
|
13218
13222
|
;
|
|
13219
13223
|
} catch (q) {
|
|
13220
|
-
$ = !0,
|
|
13224
|
+
$ = !0, D = q;
|
|
13221
13225
|
} finally {
|
|
13222
13226
|
try {
|
|
13223
13227
|
!L && M.return && M.return();
|
|
13224
13228
|
} finally {
|
|
13225
13229
|
if ($)
|
|
13226
|
-
throw
|
|
13230
|
+
throw D;
|
|
13227
13231
|
}
|
|
13228
13232
|
}
|
|
13229
13233
|
return k;
|
|
13230
13234
|
}
|
|
13231
|
-
return function(P,
|
|
13235
|
+
return function(P, I) {
|
|
13232
13236
|
if (Array.isArray(P))
|
|
13233
13237
|
return P;
|
|
13234
13238
|
if (Symbol.iterator in Object(P))
|
|
13235
|
-
return
|
|
13239
|
+
return j(P, I);
|
|
13236
13240
|
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
|
13237
13241
|
};
|
|
13238
13242
|
}(), o = function() {
|
|
13239
|
-
function
|
|
13240
|
-
for (var k = 0; k <
|
|
13241
|
-
var L =
|
|
13243
|
+
function j(P, I) {
|
|
13244
|
+
for (var k = 0; k < I.length; k++) {
|
|
13245
|
+
var L = I[k];
|
|
13242
13246
|
L.enumerable = L.enumerable || !1, L.configurable = !0, "value" in L && (L.writable = !0), Object.defineProperty(P, L.key, L);
|
|
13243
13247
|
}
|
|
13244
13248
|
}
|
|
13245
|
-
return function(P,
|
|
13246
|
-
return
|
|
13249
|
+
return function(P, I, k) {
|
|
13250
|
+
return I && j(P.prototype, I), k && j(P, k), P;
|
|
13247
13251
|
};
|
|
13248
13252
|
}();
|
|
13249
13253
|
i(50);
|
|
13250
13254
|
var l = i(2), c = A(l), f = i(14), h = A(f), u = i(8), d = A(u), p = i(9), m = A(p), b = i(0), v = A(b), g = i(15), _ = A(g), y = i(3), x = A(y), O = i(10), E = A(O), w = i(34), N = A(w);
|
|
13251
|
-
function A(
|
|
13252
|
-
return
|
|
13255
|
+
function A(j) {
|
|
13256
|
+
return j && j.__esModule ? j : { default: j };
|
|
13253
13257
|
}
|
|
13254
|
-
function T(
|
|
13255
|
-
return P in
|
|
13258
|
+
function T(j, P, I) {
|
|
13259
|
+
return P in j ? Object.defineProperty(j, P, { value: I, enumerable: !0, configurable: !0, writable: !0 }) : j[P] = I, j;
|
|
13256
13260
|
}
|
|
13257
|
-
function S(
|
|
13258
|
-
if (!(
|
|
13261
|
+
function S(j, P) {
|
|
13262
|
+
if (!(j instanceof P))
|
|
13259
13263
|
throw new TypeError("Cannot call a class as a function");
|
|
13260
13264
|
}
|
|
13261
|
-
var
|
|
13262
|
-
o(
|
|
13265
|
+
var R = (0, E.default)("quill"), C = function() {
|
|
13266
|
+
o(j, null, [{
|
|
13263
13267
|
key: "debug",
|
|
13264
|
-
value: function(
|
|
13265
|
-
|
|
13268
|
+
value: function(I) {
|
|
13269
|
+
I === !0 && (I = "log"), E.default.level(I);
|
|
13266
13270
|
}
|
|
13267
13271
|
}, {
|
|
13268
13272
|
key: "find",
|
|
13269
|
-
value: function(
|
|
13270
|
-
return
|
|
13273
|
+
value: function(I) {
|
|
13274
|
+
return I.__quill || v.default.find(I);
|
|
13271
13275
|
}
|
|
13272
13276
|
}, {
|
|
13273
13277
|
key: "import",
|
|
13274
|
-
value: function(
|
|
13275
|
-
return this.imports[
|
|
13278
|
+
value: function(I) {
|
|
13279
|
+
return this.imports[I] == null && R.error("Cannot import " + I + ". Are you sure it was registered?"), this.imports[I];
|
|
13276
13280
|
}
|
|
13277
13281
|
}, {
|
|
13278
13282
|
key: "register",
|
|
13279
|
-
value: function(
|
|
13283
|
+
value: function(I, k) {
|
|
13280
13284
|
var L = this, $ = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
|
|
13281
|
-
if (typeof
|
|
13282
|
-
var
|
|
13283
|
-
typeof
|
|
13284
|
-
L.register(M,
|
|
13285
|
+
if (typeof I != "string") {
|
|
13286
|
+
var D = I.attrName || I.blotName;
|
|
13287
|
+
typeof D == "string" ? this.register("formats/" + D, I, k) : Object.keys(I).forEach(function(M) {
|
|
13288
|
+
L.register(M, I[M], k);
|
|
13285
13289
|
});
|
|
13286
13290
|
} else
|
|
13287
|
-
this.imports[
|
|
13291
|
+
this.imports[I] != null && !$ && R.warn("Overwriting " + I + " with", k), this.imports[I] = k, (I.startsWith("blots/") || I.startsWith("formats/")) && k.blotName !== "abstract" ? v.default.register(k) : I.startsWith("modules") && typeof k.register == "function" && k.register();
|
|
13288
13292
|
}
|
|
13289
13293
|
}]);
|
|
13290
|
-
function
|
|
13291
|
-
var
|
|
13292
|
-
if (S(this,
|
|
13293
|
-
return
|
|
13294
|
-
this.options.debug &&
|
|
13294
|
+
function j(P) {
|
|
13295
|
+
var I = this, k = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
13296
|
+
if (S(this, j), this.options = F(P, k), this.container = this.options.container, this.container == null)
|
|
13297
|
+
return R.error("Invalid Quill container", P);
|
|
13298
|
+
this.options.debug && j.debug(this.options.debug);
|
|
13295
13299
|
var L = this.container.innerHTML.trim();
|
|
13296
13300
|
this.container.classList.add("ql-container"), this.container.innerHTML = "", this.container.__quill = this, this.root = this.addContainer("ql-editor"), this.root.classList.add("ql-blank"), this.root.setAttribute("data-gramm", !1), this.scrollingContainer = this.options.scrollingContainer || this.root, this.emitter = new d.default(), this.scroll = v.default.create(this.root, {
|
|
13297
13301
|
emitter: this.emitter,
|
|
13298
13302
|
whitelist: this.options.formats
|
|
13299
|
-
}), this.editor = new h.default(this.scroll), this.selection = new _.default(this.scroll, this.emitter), this.theme = new this.options.theme(this, this.options), this.keyboard = this.theme.addModule("keyboard"), this.clipboard = this.theme.addModule("clipboard"), this.history = this.theme.addModule("history"), this.theme.init(), this.emitter.on(d.default.events.EDITOR_CHANGE, function(
|
|
13300
|
-
|
|
13301
|
-
}), this.emitter.on(d.default.events.SCROLL_UPDATE, function(
|
|
13302
|
-
var B =
|
|
13303
|
-
G.call(
|
|
13304
|
-
return
|
|
13305
|
-
},
|
|
13303
|
+
}), this.editor = new h.default(this.scroll), this.selection = new _.default(this.scroll, this.emitter), this.theme = new this.options.theme(this, this.options), this.keyboard = this.theme.addModule("keyboard"), this.clipboard = this.theme.addModule("clipboard"), this.history = this.theme.addModule("history"), this.theme.init(), this.emitter.on(d.default.events.EDITOR_CHANGE, function(D) {
|
|
13304
|
+
D === d.default.events.TEXT_CHANGE && I.root.classList.toggle("ql-blank", I.editor.isBlank());
|
|
13305
|
+
}), this.emitter.on(d.default.events.SCROLL_UPDATE, function(D, M) {
|
|
13306
|
+
var B = I.selection.lastRange, q = B && B.length === 0 ? B.index : void 0;
|
|
13307
|
+
G.call(I, function() {
|
|
13308
|
+
return I.editor.update(null, M, q);
|
|
13309
|
+
}, D);
|
|
13306
13310
|
});
|
|
13307
13311
|
var $ = this.clipboard.convert(`<div class='ql-editor' style="white-space: normal;">` + L + "<p><br></p></div>");
|
|
13308
13312
|
this.setContents($), this.history.clear(), this.options.placeholder && this.root.setAttribute("data-placeholder", this.options.placeholder), this.options.readOnly && this.disable();
|
|
13309
13313
|
}
|
|
13310
|
-
return o(
|
|
13314
|
+
return o(j, [{
|
|
13311
13315
|
key: "addContainer",
|
|
13312
|
-
value: function(
|
|
13316
|
+
value: function(I) {
|
|
13313
13317
|
var k = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null;
|
|
13314
|
-
if (typeof
|
|
13315
|
-
var L =
|
|
13316
|
-
|
|
13318
|
+
if (typeof I == "string") {
|
|
13319
|
+
var L = I;
|
|
13320
|
+
I = document.createElement("div"), I.classList.add(L);
|
|
13317
13321
|
}
|
|
13318
|
-
return this.container.insertBefore(
|
|
13322
|
+
return this.container.insertBefore(I, k), I;
|
|
13319
13323
|
}
|
|
13320
13324
|
}, {
|
|
13321
13325
|
key: "blur",
|
|
@@ -13324,11 +13328,11 @@ var vc = { exports: {} };
|
|
|
13324
13328
|
}
|
|
13325
13329
|
}, {
|
|
13326
13330
|
key: "deleteText",
|
|
13327
|
-
value: function(
|
|
13328
|
-
var $ = this,
|
|
13329
|
-
return
|
|
13330
|
-
return $.editor.deleteText(
|
|
13331
|
-
}, L,
|
|
13331
|
+
value: function(I, k, L) {
|
|
13332
|
+
var $ = this, D = U(I, k, L), M = a(D, 4);
|
|
13333
|
+
return I = M[0], k = M[1], L = M[3], G.call(this, function() {
|
|
13334
|
+
return $.editor.deleteText(I, k);
|
|
13335
|
+
}, L, I, -1 * k);
|
|
13332
13336
|
}
|
|
13333
13337
|
}, {
|
|
13334
13338
|
key: "disable",
|
|
@@ -13338,54 +13342,54 @@ var vc = { exports: {} };
|
|
|
13338
13342
|
}, {
|
|
13339
13343
|
key: "enable",
|
|
13340
13344
|
value: function() {
|
|
13341
|
-
var
|
|
13342
|
-
this.scroll.enable(
|
|
13345
|
+
var I = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0;
|
|
13346
|
+
this.scroll.enable(I), this.container.classList.toggle("ql-disabled", !I);
|
|
13343
13347
|
}
|
|
13344
13348
|
}, {
|
|
13345
13349
|
key: "focus",
|
|
13346
13350
|
value: function() {
|
|
13347
|
-
var
|
|
13348
|
-
this.selection.focus(), this.scrollingContainer.scrollTop =
|
|
13351
|
+
var I = this.scrollingContainer.scrollTop;
|
|
13352
|
+
this.selection.focus(), this.scrollingContainer.scrollTop = I, this.scrollIntoView();
|
|
13349
13353
|
}
|
|
13350
13354
|
}, {
|
|
13351
13355
|
key: "format",
|
|
13352
|
-
value: function(
|
|
13356
|
+
value: function(I, k) {
|
|
13353
13357
|
var L = this, $ = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : d.default.sources.API;
|
|
13354
13358
|
return G.call(this, function() {
|
|
13355
|
-
var
|
|
13356
|
-
if (
|
|
13359
|
+
var D = L.getSelection(!0), M = new c.default();
|
|
13360
|
+
if (D == null)
|
|
13357
13361
|
return M;
|
|
13358
|
-
if (v.default.query(
|
|
13359
|
-
M = L.editor.formatLine(
|
|
13362
|
+
if (v.default.query(I, v.default.Scope.BLOCK))
|
|
13363
|
+
M = L.editor.formatLine(D.index, D.length, T({}, I, k));
|
|
13360
13364
|
else {
|
|
13361
|
-
if (
|
|
13362
|
-
return L.selection.format(
|
|
13363
|
-
M = L.editor.formatText(
|
|
13365
|
+
if (D.length === 0)
|
|
13366
|
+
return L.selection.format(I, k), M;
|
|
13367
|
+
M = L.editor.formatText(D.index, D.length, T({}, I, k));
|
|
13364
13368
|
}
|
|
13365
|
-
return L.setSelection(
|
|
13369
|
+
return L.setSelection(D, d.default.sources.SILENT), M;
|
|
13366
13370
|
}, $);
|
|
13367
13371
|
}
|
|
13368
13372
|
}, {
|
|
13369
13373
|
key: "formatLine",
|
|
13370
|
-
value: function(
|
|
13371
|
-
var M = this, B = void 0, q =
|
|
13372
|
-
return
|
|
13373
|
-
return M.editor.formatLine(
|
|
13374
|
-
},
|
|
13374
|
+
value: function(I, k, L, $, D) {
|
|
13375
|
+
var M = this, B = void 0, q = U(I, k, L, $, D), H = a(q, 4);
|
|
13376
|
+
return I = H[0], k = H[1], B = H[2], D = H[3], G.call(this, function() {
|
|
13377
|
+
return M.editor.formatLine(I, k, B);
|
|
13378
|
+
}, D, I, 0);
|
|
13375
13379
|
}
|
|
13376
13380
|
}, {
|
|
13377
13381
|
key: "formatText",
|
|
13378
|
-
value: function(
|
|
13379
|
-
var M = this, B = void 0, q =
|
|
13380
|
-
return
|
|
13381
|
-
return M.editor.formatText(
|
|
13382
|
-
},
|
|
13382
|
+
value: function(I, k, L, $, D) {
|
|
13383
|
+
var M = this, B = void 0, q = U(I, k, L, $, D), H = a(q, 4);
|
|
13384
|
+
return I = H[0], k = H[1], B = H[2], D = H[3], G.call(this, function() {
|
|
13385
|
+
return M.editor.formatText(I, k, B);
|
|
13386
|
+
}, D, I, 0);
|
|
13383
13387
|
}
|
|
13384
13388
|
}, {
|
|
13385
13389
|
key: "getBounds",
|
|
13386
|
-
value: function(
|
|
13390
|
+
value: function(I) {
|
|
13387
13391
|
var k = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, L = void 0;
|
|
13388
|
-
typeof
|
|
13392
|
+
typeof I == "number" ? L = this.selection.getBounds(I, k) : L = this.selection.getBounds(I.index, I.length);
|
|
13389
13393
|
var $ = this.container.getBoundingClientRect();
|
|
13390
13394
|
return {
|
|
13391
13395
|
bottom: L.bottom - $.top,
|
|
@@ -13399,19 +13403,19 @@ var vc = { exports: {} };
|
|
|
13399
13403
|
}, {
|
|
13400
13404
|
key: "getContents",
|
|
13401
13405
|
value: function() {
|
|
13402
|
-
var
|
|
13403
|
-
return
|
|
13406
|
+
var I = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0, k = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.getLength() - I, L = U(I, k), $ = a(L, 2);
|
|
13407
|
+
return I = $[0], k = $[1], this.editor.getContents(I, k);
|
|
13404
13408
|
}
|
|
13405
13409
|
}, {
|
|
13406
13410
|
key: "getFormat",
|
|
13407
13411
|
value: function() {
|
|
13408
|
-
var
|
|
13409
|
-
return typeof
|
|
13412
|
+
var I = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.getSelection(!0), k = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
|
|
13413
|
+
return typeof I == "number" ? this.editor.getFormat(I, k) : this.editor.getFormat(I.index, I.length);
|
|
13410
13414
|
}
|
|
13411
13415
|
}, {
|
|
13412
13416
|
key: "getIndex",
|
|
13413
|
-
value: function(
|
|
13414
|
-
return
|
|
13417
|
+
value: function(I) {
|
|
13418
|
+
return I.offset(this.scroll);
|
|
13415
13419
|
}
|
|
13416
13420
|
}, {
|
|
13417
13421
|
key: "getLength",
|
|
@@ -13420,36 +13424,36 @@ var vc = { exports: {} };
|
|
|
13420
13424
|
}
|
|
13421
13425
|
}, {
|
|
13422
13426
|
key: "getLeaf",
|
|
13423
|
-
value: function(
|
|
13424
|
-
return this.scroll.leaf(
|
|
13427
|
+
value: function(I) {
|
|
13428
|
+
return this.scroll.leaf(I);
|
|
13425
13429
|
}
|
|
13426
13430
|
}, {
|
|
13427
13431
|
key: "getLine",
|
|
13428
|
-
value: function(
|
|
13429
|
-
return this.scroll.line(
|
|
13432
|
+
value: function(I) {
|
|
13433
|
+
return this.scroll.line(I);
|
|
13430
13434
|
}
|
|
13431
13435
|
}, {
|
|
13432
13436
|
key: "getLines",
|
|
13433
13437
|
value: function() {
|
|
13434
|
-
var
|
|
13435
|
-
return typeof
|
|
13438
|
+
var I = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0, k = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Number.MAX_VALUE;
|
|
13439
|
+
return typeof I != "number" ? this.scroll.lines(I.index, I.length) : this.scroll.lines(I, k);
|
|
13436
13440
|
}
|
|
13437
13441
|
}, {
|
|
13438
13442
|
key: "getModule",
|
|
13439
|
-
value: function(
|
|
13440
|
-
return this.theme.modules[
|
|
13443
|
+
value: function(I) {
|
|
13444
|
+
return this.theme.modules[I];
|
|
13441
13445
|
}
|
|
13442
13446
|
}, {
|
|
13443
13447
|
key: "getSelection",
|
|
13444
13448
|
value: function() {
|
|
13445
|
-
var
|
|
13446
|
-
return
|
|
13449
|
+
var I = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
|
|
13450
|
+
return I && this.focus(), this.update(), this.selection.getRange()[0];
|
|
13447
13451
|
}
|
|
13448
13452
|
}, {
|
|
13449
13453
|
key: "getText",
|
|
13450
13454
|
value: function() {
|
|
13451
|
-
var
|
|
13452
|
-
return
|
|
13455
|
+
var I = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0, k = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.getLength() - I, L = U(I, k), $ = a(L, 2);
|
|
13456
|
+
return I = $[0], k = $[1], this.editor.getText(I, k);
|
|
13453
13457
|
}
|
|
13454
13458
|
}, {
|
|
13455
13459
|
key: "hasFocus",
|
|
@@ -13458,19 +13462,19 @@ var vc = { exports: {} };
|
|
|
13458
13462
|
}
|
|
13459
13463
|
}, {
|
|
13460
13464
|
key: "insertEmbed",
|
|
13461
|
-
value: function(
|
|
13462
|
-
var $ = this,
|
|
13465
|
+
value: function(I, k, L) {
|
|
13466
|
+
var $ = this, D = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : j.sources.API;
|
|
13463
13467
|
return G.call(this, function() {
|
|
13464
|
-
return $.editor.insertEmbed(
|
|
13465
|
-
},
|
|
13468
|
+
return $.editor.insertEmbed(I, k, L);
|
|
13469
|
+
}, D, I);
|
|
13466
13470
|
}
|
|
13467
13471
|
}, {
|
|
13468
13472
|
key: "insertText",
|
|
13469
|
-
value: function(
|
|
13470
|
-
var M = this, B = void 0, q =
|
|
13471
|
-
return
|
|
13472
|
-
return M.editor.insertText(
|
|
13473
|
-
},
|
|
13473
|
+
value: function(I, k, L, $, D) {
|
|
13474
|
+
var M = this, B = void 0, q = U(I, 0, L, $, D), H = a(q, 4);
|
|
13475
|
+
return I = H[0], B = H[2], D = H[3], G.call(this, function() {
|
|
13476
|
+
return M.editor.insertText(I, k, B);
|
|
13477
|
+
}, D, I, k.length);
|
|
13474
13478
|
}
|
|
13475
13479
|
}, {
|
|
13476
13480
|
key: "isEnabled",
|
|
@@ -13494,16 +13498,16 @@ var vc = { exports: {} };
|
|
|
13494
13498
|
}
|
|
13495
13499
|
}, {
|
|
13496
13500
|
key: "pasteHTML",
|
|
13497
|
-
value: function(
|
|
13498
|
-
this.clipboard.dangerouslyPasteHTML(
|
|
13501
|
+
value: function(I, k, L) {
|
|
13502
|
+
this.clipboard.dangerouslyPasteHTML(I, k, L);
|
|
13499
13503
|
}
|
|
13500
13504
|
}, {
|
|
13501
13505
|
key: "removeFormat",
|
|
13502
|
-
value: function(
|
|
13503
|
-
var $ = this,
|
|
13504
|
-
return
|
|
13505
|
-
return $.editor.removeFormat(
|
|
13506
|
-
}, L,
|
|
13506
|
+
value: function(I, k, L) {
|
|
13507
|
+
var $ = this, D = U(I, k, L), M = a(D, 4);
|
|
13508
|
+
return I = M[0], k = M[1], L = M[3], G.call(this, function() {
|
|
13509
|
+
return $.editor.removeFormat(I, k);
|
|
13510
|
+
}, L, I);
|
|
13507
13511
|
}
|
|
13508
13512
|
}, {
|
|
13509
13513
|
key: "scrollIntoView",
|
|
@@ -13512,48 +13516,48 @@ var vc = { exports: {} };
|
|
|
13512
13516
|
}
|
|
13513
13517
|
}, {
|
|
13514
13518
|
key: "setContents",
|
|
13515
|
-
value: function(
|
|
13519
|
+
value: function(I) {
|
|
13516
13520
|
var k = this, L = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : d.default.sources.API;
|
|
13517
13521
|
return G.call(this, function() {
|
|
13518
|
-
|
|
13519
|
-
var $ = k.getLength(),
|
|
13522
|
+
I = new c.default(I);
|
|
13523
|
+
var $ = k.getLength(), D = k.editor.deleteText(0, $), M = k.editor.applyDelta(I), B = M.ops[M.ops.length - 1];
|
|
13520
13524
|
B != null && typeof B.insert == "string" && B.insert[B.insert.length - 1] === `
|
|
13521
13525
|
` && (k.editor.deleteText(k.getLength() - 1, 1), M.delete(1));
|
|
13522
|
-
var q =
|
|
13526
|
+
var q = D.compose(M);
|
|
13523
13527
|
return q;
|
|
13524
13528
|
}, L);
|
|
13525
13529
|
}
|
|
13526
13530
|
}, {
|
|
13527
13531
|
key: "setSelection",
|
|
13528
|
-
value: function(
|
|
13529
|
-
if (
|
|
13530
|
-
this.selection.setRange(null, k ||
|
|
13532
|
+
value: function(I, k, L) {
|
|
13533
|
+
if (I == null)
|
|
13534
|
+
this.selection.setRange(null, k || j.sources.API);
|
|
13531
13535
|
else {
|
|
13532
|
-
var $ =
|
|
13533
|
-
|
|
13536
|
+
var $ = U(I, k, L), D = a($, 4);
|
|
13537
|
+
I = D[0], k = D[1], L = D[3], this.selection.setRange(new g.Range(I, k), L), L !== d.default.sources.SILENT && this.selection.scrollIntoView(this.scrollingContainer);
|
|
13534
13538
|
}
|
|
13535
13539
|
}
|
|
13536
13540
|
}, {
|
|
13537
13541
|
key: "setText",
|
|
13538
|
-
value: function(
|
|
13539
|
-
var k = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : d.default.sources.API, L = new c.default().insert(
|
|
13542
|
+
value: function(I) {
|
|
13543
|
+
var k = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : d.default.sources.API, L = new c.default().insert(I);
|
|
13540
13544
|
return this.setContents(L, k);
|
|
13541
13545
|
}
|
|
13542
13546
|
}, {
|
|
13543
13547
|
key: "update",
|
|
13544
13548
|
value: function() {
|
|
13545
|
-
var
|
|
13546
|
-
return this.selection.update(
|
|
13549
|
+
var I = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : d.default.sources.USER, k = this.scroll.update(I);
|
|
13550
|
+
return this.selection.update(I), k;
|
|
13547
13551
|
}
|
|
13548
13552
|
}, {
|
|
13549
13553
|
key: "updateContents",
|
|
13550
|
-
value: function(
|
|
13554
|
+
value: function(I) {
|
|
13551
13555
|
var k = this, L = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : d.default.sources.API;
|
|
13552
13556
|
return G.call(this, function() {
|
|
13553
|
-
return
|
|
13557
|
+
return I = new c.default(I), k.editor.applyDelta(I, L);
|
|
13554
13558
|
}, L, !0);
|
|
13555
13559
|
}
|
|
13556
|
-
}]),
|
|
13560
|
+
}]), j;
|
|
13557
13561
|
}();
|
|
13558
13562
|
C.DEFAULTS = {
|
|
13559
13563
|
bounds: null,
|
|
@@ -13570,9 +13574,9 @@ var vc = { exports: {} };
|
|
|
13570
13574
|
"core/module": m.default,
|
|
13571
13575
|
"core/theme": N.default
|
|
13572
13576
|
};
|
|
13573
|
-
function F(
|
|
13577
|
+
function F(j, P) {
|
|
13574
13578
|
if (P = (0, x.default)(!0, {
|
|
13575
|
-
container:
|
|
13579
|
+
container: j,
|
|
13576
13580
|
modules: {
|
|
13577
13581
|
clipboard: !0,
|
|
13578
13582
|
keyboard: !0,
|
|
@@ -13582,59 +13586,59 @@ var vc = { exports: {} };
|
|
|
13582
13586
|
P.theme = N.default;
|
|
13583
13587
|
else if (P.theme = C.import("themes/" + P.theme), P.theme == null)
|
|
13584
13588
|
throw new Error("Invalid theme " + P.theme + ". Did you register it?");
|
|
13585
|
-
var
|
|
13586
|
-
[
|
|
13587
|
-
$.modules = $.modules || {}, Object.keys($.modules).forEach(function(
|
|
13588
|
-
$.modules[
|
|
13589
|
+
var I = (0, x.default)(!0, {}, P.theme.DEFAULTS);
|
|
13590
|
+
[I, P].forEach(function($) {
|
|
13591
|
+
$.modules = $.modules || {}, Object.keys($.modules).forEach(function(D) {
|
|
13592
|
+
$.modules[D] === !0 && ($.modules[D] = {});
|
|
13589
13593
|
});
|
|
13590
13594
|
});
|
|
13591
|
-
var k = Object.keys(
|
|
13592
|
-
var M = C.import("modules/" +
|
|
13593
|
-
return M == null ?
|
|
13595
|
+
var k = Object.keys(I.modules).concat(Object.keys(P.modules)), L = k.reduce(function($, D) {
|
|
13596
|
+
var M = C.import("modules/" + D);
|
|
13597
|
+
return M == null ? R.error("Cannot load " + D + " module. Are you sure you registered it?") : $[D] = M.DEFAULTS || {}, $;
|
|
13594
13598
|
}, {});
|
|
13595
13599
|
return P.modules != null && P.modules.toolbar && P.modules.toolbar.constructor !== Object && (P.modules.toolbar = {
|
|
13596
13600
|
container: P.modules.toolbar
|
|
13597
|
-
}), P = (0, x.default)(!0, {}, C.DEFAULTS, { modules: L },
|
|
13601
|
+
}), P = (0, x.default)(!0, {}, C.DEFAULTS, { modules: L }, I, P), ["bounds", "container", "scrollingContainer"].forEach(function($) {
|
|
13598
13602
|
typeof P[$] == "string" && (P[$] = document.querySelector(P[$]));
|
|
13599
|
-
}), P.modules = Object.keys(P.modules).reduce(function($,
|
|
13600
|
-
return P.modules[
|
|
13603
|
+
}), P.modules = Object.keys(P.modules).reduce(function($, D) {
|
|
13604
|
+
return P.modules[D] && ($[D] = P.modules[D]), $;
|
|
13601
13605
|
}, {}), P;
|
|
13602
13606
|
}
|
|
13603
|
-
function G(
|
|
13607
|
+
function G(j, P, I, k) {
|
|
13604
13608
|
if (this.options.strict && !this.isEnabled() && P === d.default.sources.USER)
|
|
13605
13609
|
return new c.default();
|
|
13606
|
-
var L =
|
|
13607
|
-
if (L != null && (
|
|
13608
|
-
var M, B = [d.default.events.TEXT_CHANGE,
|
|
13610
|
+
var L = I == null ? null : this.getSelection(), $ = this.editor.delta, D = j();
|
|
13611
|
+
if (L != null && (I === !0 && (I = L.index), k == null ? L = X(L, D, P) : k !== 0 && (L = X(L, I, k, P)), this.setSelection(L, d.default.sources.SILENT)), D.length() > 0) {
|
|
13612
|
+
var M, B = [d.default.events.TEXT_CHANGE, D, $, P];
|
|
13609
13613
|
if ((M = this.emitter).emit.apply(M, [d.default.events.EDITOR_CHANGE].concat(B)), P !== d.default.sources.SILENT) {
|
|
13610
13614
|
var q;
|
|
13611
13615
|
(q = this.emitter).emit.apply(q, B);
|
|
13612
13616
|
}
|
|
13613
13617
|
}
|
|
13614
|
-
return
|
|
13618
|
+
return D;
|
|
13615
13619
|
}
|
|
13616
|
-
function
|
|
13620
|
+
function U(j, P, I, k, L) {
|
|
13617
13621
|
var $ = {};
|
|
13618
|
-
return typeof
|
|
13622
|
+
return typeof j.index == "number" && typeof j.length == "number" ? typeof P != "number" ? (L = k, k = I, I = P, P = j.length, j = j.index) : (P = j.length, j = j.index) : typeof P != "number" && (L = k, k = I, I = P, P = 0), (typeof I > "u" ? "undefined" : s(I)) === "object" ? ($ = I, L = k) : typeof I == "string" && (k != null ? $[I] = k : L = I), L = L || d.default.sources.API, [j, P, $, L];
|
|
13619
13623
|
}
|
|
13620
|
-
function X(
|
|
13621
|
-
if (
|
|
13624
|
+
function X(j, P, I, k) {
|
|
13625
|
+
if (j == null)
|
|
13622
13626
|
return null;
|
|
13623
13627
|
var L = void 0, $ = void 0;
|
|
13624
13628
|
if (P instanceof c.default) {
|
|
13625
|
-
var
|
|
13629
|
+
var D = [j.index, j.index + j.length].map(function(H) {
|
|
13626
13630
|
return P.transformPosition(H, k !== d.default.sources.USER);
|
|
13627
|
-
}), M = a(
|
|
13631
|
+
}), M = a(D, 2);
|
|
13628
13632
|
L = M[0], $ = M[1];
|
|
13629
13633
|
} else {
|
|
13630
|
-
var B = [
|
|
13631
|
-
return H < P || H === P && k === d.default.sources.USER ? H :
|
|
13634
|
+
var B = [j.index, j.index + j.length].map(function(H) {
|
|
13635
|
+
return H < P || H === P && k === d.default.sources.USER ? H : I >= 0 ? H + I : Math.max(P, H + I);
|
|
13632
13636
|
}), q = a(B, 2);
|
|
13633
13637
|
L = q[0], $ = q[1];
|
|
13634
13638
|
}
|
|
13635
13639
|
return new g.Range(L, $ - L);
|
|
13636
13640
|
}
|
|
13637
|
-
n.expandConfig = F, n.overload =
|
|
13641
|
+
n.expandConfig = F, n.overload = U, n.default = C;
|
|
13638
13642
|
},
|
|
13639
13643
|
/* 6 */
|
|
13640
13644
|
/***/
|
|
@@ -13980,17 +13984,17 @@ var vc = { exports: {} };
|
|
|
13980
13984
|
}), n.default = n.Code = void 0;
|
|
13981
13985
|
var s = function() {
|
|
13982
13986
|
function w(N, A) {
|
|
13983
|
-
var T = [], S = !0,
|
|
13987
|
+
var T = [], S = !0, R = !1, C = void 0;
|
|
13984
13988
|
try {
|
|
13985
13989
|
for (var F = N[Symbol.iterator](), G; !(S = (G = F.next()).done) && (T.push(G.value), !(A && T.length === A)); S = !0)
|
|
13986
13990
|
;
|
|
13987
|
-
} catch (
|
|
13988
|
-
|
|
13991
|
+
} catch (U) {
|
|
13992
|
+
R = !0, C = U;
|
|
13989
13993
|
} finally {
|
|
13990
13994
|
try {
|
|
13991
13995
|
!S && F.return && F.return();
|
|
13992
13996
|
} finally {
|
|
13993
|
-
if (
|
|
13997
|
+
if (R)
|
|
13994
13998
|
throw C;
|
|
13995
13999
|
}
|
|
13996
14000
|
}
|
|
@@ -14017,8 +14021,8 @@ var vc = { exports: {} };
|
|
|
14017
14021
|
N === null && (N = Function.prototype);
|
|
14018
14022
|
var S = Object.getOwnPropertyDescriptor(N, A);
|
|
14019
14023
|
if (S === void 0) {
|
|
14020
|
-
var
|
|
14021
|
-
return
|
|
14024
|
+
var R = Object.getPrototypeOf(N);
|
|
14025
|
+
return R === null ? void 0 : w(R, A, T);
|
|
14022
14026
|
} else {
|
|
14023
14027
|
if ("value" in S)
|
|
14024
14028
|
return S.value;
|
|
@@ -14062,8 +14066,8 @@ var vc = { exports: {} };
|
|
|
14062
14066
|
var T = this, S = this.domNode.textContent;
|
|
14063
14067
|
return S.endsWith(`
|
|
14064
14068
|
`) && (S = S.slice(0, -1)), S.split(`
|
|
14065
|
-
`).reduce(function(
|
|
14066
|
-
return
|
|
14069
|
+
`).reduce(function(R, C) {
|
|
14070
|
+
return R.insert(C).insert(`
|
|
14067
14071
|
`, T.formats());
|
|
14068
14072
|
}, new c.default());
|
|
14069
14073
|
}
|
|
@@ -14071,27 +14075,27 @@ var vc = { exports: {} };
|
|
|
14071
14075
|
key: "format",
|
|
14072
14076
|
value: function(T, S) {
|
|
14073
14077
|
if (!(T === this.statics.blotName && S)) {
|
|
14074
|
-
var
|
|
14078
|
+
var R = this.descendant(v.default, this.length() - 1), C = s(R, 1), F = C[0];
|
|
14075
14079
|
F != null && F.deleteAt(F.length() - 1, 1), o(N.prototype.__proto__ || Object.getPrototypeOf(N.prototype), "format", this).call(this, T, S);
|
|
14076
14080
|
}
|
|
14077
14081
|
}
|
|
14078
14082
|
}, {
|
|
14079
14083
|
key: "formatAt",
|
|
14080
|
-
value: function(T, S,
|
|
14081
|
-
if (S !== 0 && !(h.default.query(
|
|
14084
|
+
value: function(T, S, R, C) {
|
|
14085
|
+
if (S !== 0 && !(h.default.query(R, h.default.Scope.BLOCK) == null || R === this.statics.blotName && C === this.statics.formats(this.domNode))) {
|
|
14082
14086
|
var F = this.newlineIndex(T);
|
|
14083
14087
|
if (!(F < 0 || F >= T + S)) {
|
|
14084
|
-
var G = this.newlineIndex(T, !0) + 1,
|
|
14085
|
-
X.format(
|
|
14088
|
+
var G = this.newlineIndex(T, !0) + 1, U = F - G + 1, X = this.isolate(G, U), j = X.next;
|
|
14089
|
+
X.format(R, C), j instanceof N && j.formatAt(0, T - G + S - U, R, C);
|
|
14086
14090
|
}
|
|
14087
14091
|
}
|
|
14088
14092
|
}
|
|
14089
14093
|
}, {
|
|
14090
14094
|
key: "insertAt",
|
|
14091
|
-
value: function(T, S,
|
|
14092
|
-
if (
|
|
14093
|
-
var C = this.descendant(v.default, T), F = s(C, 2), G = F[0],
|
|
14094
|
-
G.insertAt(
|
|
14095
|
+
value: function(T, S, R) {
|
|
14096
|
+
if (R == null) {
|
|
14097
|
+
var C = this.descendant(v.default, T), F = s(C, 2), G = F[0], U = F[1];
|
|
14098
|
+
G.insertAt(U, S);
|
|
14095
14099
|
}
|
|
14096
14100
|
}
|
|
14097
14101
|
}, {
|
|
@@ -14108,9 +14112,9 @@ var vc = { exports: {} };
|
|
|
14108
14112
|
if (S)
|
|
14109
14113
|
return this.domNode.textContent.slice(0, T).lastIndexOf(`
|
|
14110
14114
|
`);
|
|
14111
|
-
var
|
|
14115
|
+
var R = this.domNode.textContent.slice(T).indexOf(`
|
|
14112
14116
|
`);
|
|
14113
|
-
return
|
|
14117
|
+
return R > -1 ? T + R : -1;
|
|
14114
14118
|
}
|
|
14115
14119
|
}, {
|
|
14116
14120
|
key: "optimize",
|
|
@@ -14125,8 +14129,8 @@ var vc = { exports: {} };
|
|
|
14125
14129
|
key: "replace",
|
|
14126
14130
|
value: function(T) {
|
|
14127
14131
|
o(N.prototype.__proto__ || Object.getPrototypeOf(N.prototype), "replace", this).call(this, T), [].slice.call(this.domNode.querySelectorAll("*")).forEach(function(S) {
|
|
14128
|
-
var
|
|
14129
|
-
|
|
14132
|
+
var R = h.default.find(S);
|
|
14133
|
+
R == null ? S.parentNode.removeChild(S) : R instanceof h.default.Embed ? R.remove() : R.unwrap();
|
|
14130
14134
|
});
|
|
14131
14135
|
}
|
|
14132
14136
|
}], [{
|
|
@@ -14150,75 +14154,75 @@ var vc = { exports: {} };
|
|
|
14150
14154
|
Object.defineProperty(n, "__esModule", {
|
|
14151
14155
|
value: !0
|
|
14152
14156
|
});
|
|
14153
|
-
var s = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(
|
|
14154
|
-
return typeof
|
|
14155
|
-
} : function(
|
|
14156
|
-
return
|
|
14157
|
+
var s = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(j) {
|
|
14158
|
+
return typeof j;
|
|
14159
|
+
} : function(j) {
|
|
14160
|
+
return j && typeof Symbol == "function" && j.constructor === Symbol && j !== Symbol.prototype ? "symbol" : typeof j;
|
|
14157
14161
|
}, a = function() {
|
|
14158
|
-
function
|
|
14159
|
-
var k = [], L = !0, $ = !1,
|
|
14162
|
+
function j(P, I) {
|
|
14163
|
+
var k = [], L = !0, $ = !1, D = void 0;
|
|
14160
14164
|
try {
|
|
14161
|
-
for (var M = P[Symbol.iterator](), B; !(L = (B = M.next()).done) && (k.push(B.value), !(
|
|
14165
|
+
for (var M = P[Symbol.iterator](), B; !(L = (B = M.next()).done) && (k.push(B.value), !(I && k.length === I)); L = !0)
|
|
14162
14166
|
;
|
|
14163
14167
|
} catch (q) {
|
|
14164
|
-
$ = !0,
|
|
14168
|
+
$ = !0, D = q;
|
|
14165
14169
|
} finally {
|
|
14166
14170
|
try {
|
|
14167
14171
|
!L && M.return && M.return();
|
|
14168
14172
|
} finally {
|
|
14169
14173
|
if ($)
|
|
14170
|
-
throw
|
|
14174
|
+
throw D;
|
|
14171
14175
|
}
|
|
14172
14176
|
}
|
|
14173
14177
|
return k;
|
|
14174
14178
|
}
|
|
14175
|
-
return function(P,
|
|
14179
|
+
return function(P, I) {
|
|
14176
14180
|
if (Array.isArray(P))
|
|
14177
14181
|
return P;
|
|
14178
14182
|
if (Symbol.iterator in Object(P))
|
|
14179
|
-
return
|
|
14183
|
+
return j(P, I);
|
|
14180
14184
|
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
|
14181
14185
|
};
|
|
14182
14186
|
}(), o = function() {
|
|
14183
|
-
function
|
|
14184
|
-
for (var k = 0; k <
|
|
14185
|
-
var L =
|
|
14187
|
+
function j(P, I) {
|
|
14188
|
+
for (var k = 0; k < I.length; k++) {
|
|
14189
|
+
var L = I[k];
|
|
14186
14190
|
L.enumerable = L.enumerable || !1, L.configurable = !0, "value" in L && (L.writable = !0), Object.defineProperty(P, L.key, L);
|
|
14187
14191
|
}
|
|
14188
14192
|
}
|
|
14189
|
-
return function(P,
|
|
14190
|
-
return
|
|
14193
|
+
return function(P, I, k) {
|
|
14194
|
+
return I && j(P.prototype, I), k && j(P, k), P;
|
|
14191
14195
|
};
|
|
14192
14196
|
}(), l = i(2), c = S(l), f = i(20), h = S(f), u = i(0), d = S(u), p = i(13), m = S(p), b = i(24), v = S(b), g = i(4), _ = S(g), y = i(16), x = S(y), O = i(21), E = S(O), w = i(11), N = S(w), A = i(3), T = S(A);
|
|
14193
|
-
function S(
|
|
14194
|
-
return
|
|
14197
|
+
function S(j) {
|
|
14198
|
+
return j && j.__esModule ? j : { default: j };
|
|
14195
14199
|
}
|
|
14196
|
-
function
|
|
14197
|
-
return P in
|
|
14200
|
+
function R(j, P, I) {
|
|
14201
|
+
return P in j ? Object.defineProperty(j, P, { value: I, enumerable: !0, configurable: !0, writable: !0 }) : j[P] = I, j;
|
|
14198
14202
|
}
|
|
14199
|
-
function C(
|
|
14200
|
-
if (!(
|
|
14203
|
+
function C(j, P) {
|
|
14204
|
+
if (!(j instanceof P))
|
|
14201
14205
|
throw new TypeError("Cannot call a class as a function");
|
|
14202
14206
|
}
|
|
14203
14207
|
var F = /^[ -~]*$/, G = function() {
|
|
14204
|
-
function
|
|
14205
|
-
C(this,
|
|
14208
|
+
function j(P) {
|
|
14209
|
+
C(this, j), this.scroll = P, this.delta = this.getDelta();
|
|
14206
14210
|
}
|
|
14207
|
-
return o(
|
|
14211
|
+
return o(j, [{
|
|
14208
14212
|
key: "applyDelta",
|
|
14209
|
-
value: function(
|
|
14213
|
+
value: function(I) {
|
|
14210
14214
|
var k = this, L = !1;
|
|
14211
14215
|
this.scroll.update();
|
|
14212
14216
|
var $ = this.scroll.length();
|
|
14213
|
-
return this.scroll.batchStart(),
|
|
14217
|
+
return this.scroll.batchStart(), I = X(I), I.reduce(function(D, M) {
|
|
14214
14218
|
var B = M.retain || M.delete || M.insert.length || 1, q = M.attributes || {};
|
|
14215
14219
|
if (M.insert != null) {
|
|
14216
14220
|
if (typeof M.insert == "string") {
|
|
14217
14221
|
var H = M.insert;
|
|
14218
14222
|
H.endsWith(`
|
|
14219
|
-
`) && L && (L = !1, H = H.slice(0, -1)),
|
|
14220
|
-
`) && (L = !0), k.scroll.insertAt(
|
|
14221
|
-
var z = k.scroll.line(
|
|
14223
|
+
`) && L && (L = !1, H = H.slice(0, -1)), D >= $ && !H.endsWith(`
|
|
14224
|
+
`) && (L = !0), k.scroll.insertAt(D, H);
|
|
14225
|
+
var z = k.scroll.line(D), K = a(z, 2), J = K[0], et = K[1], st = (0, T.default)({}, (0, g.bubbleFormats)(J));
|
|
14222
14226
|
if (J instanceof _.default) {
|
|
14223
14227
|
var ot = J.descendant(d.default.Leaf, et), It = a(ot, 1), St = It[0];
|
|
14224
14228
|
st = (0, T.default)(st, (0, g.bubbleFormats)(St));
|
|
@@ -14227,88 +14231,88 @@ var vc = { exports: {} };
|
|
|
14227
14231
|
} else if (s(M.insert) === "object") {
|
|
14228
14232
|
var V = Object.keys(M.insert)[0];
|
|
14229
14233
|
if (V == null)
|
|
14230
|
-
return
|
|
14231
|
-
k.scroll.insertAt(
|
|
14234
|
+
return D;
|
|
14235
|
+
k.scroll.insertAt(D, V, M.insert[V]);
|
|
14232
14236
|
}
|
|
14233
14237
|
$ += B;
|
|
14234
14238
|
}
|
|
14235
14239
|
return Object.keys(q).forEach(function(W) {
|
|
14236
|
-
k.scroll.formatAt(
|
|
14237
|
-
}),
|
|
14238
|
-
}, 0),
|
|
14239
|
-
return typeof M.delete == "number" ? (k.scroll.deleteAt(
|
|
14240
|
-
}, 0), this.scroll.batchEnd(), this.update(
|
|
14240
|
+
k.scroll.formatAt(D, B, W, q[W]);
|
|
14241
|
+
}), D + B;
|
|
14242
|
+
}, 0), I.reduce(function(D, M) {
|
|
14243
|
+
return typeof M.delete == "number" ? (k.scroll.deleteAt(D, M.delete), D) : D + (M.retain || M.insert.length || 1);
|
|
14244
|
+
}, 0), this.scroll.batchEnd(), this.update(I);
|
|
14241
14245
|
}
|
|
14242
14246
|
}, {
|
|
14243
14247
|
key: "deleteText",
|
|
14244
|
-
value: function(
|
|
14245
|
-
return this.scroll.deleteAt(
|
|
14248
|
+
value: function(I, k) {
|
|
14249
|
+
return this.scroll.deleteAt(I, k), this.update(new c.default().retain(I).delete(k));
|
|
14246
14250
|
}
|
|
14247
14251
|
}, {
|
|
14248
14252
|
key: "formatLine",
|
|
14249
|
-
value: function(
|
|
14253
|
+
value: function(I, k) {
|
|
14250
14254
|
var L = this, $ = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
14251
|
-
return this.scroll.update(), Object.keys($).forEach(function(
|
|
14252
|
-
if (!(L.scroll.whitelist != null && !L.scroll.whitelist[
|
|
14253
|
-
var M = L.scroll.lines(
|
|
14255
|
+
return this.scroll.update(), Object.keys($).forEach(function(D) {
|
|
14256
|
+
if (!(L.scroll.whitelist != null && !L.scroll.whitelist[D])) {
|
|
14257
|
+
var M = L.scroll.lines(I, Math.max(k, 1)), B = k;
|
|
14254
14258
|
M.forEach(function(q) {
|
|
14255
14259
|
var H = q.length();
|
|
14256
14260
|
if (!(q instanceof m.default))
|
|
14257
|
-
q.format(
|
|
14261
|
+
q.format(D, $[D]);
|
|
14258
14262
|
else {
|
|
14259
|
-
var z =
|
|
14260
|
-
q.formatAt(z, K,
|
|
14263
|
+
var z = I - q.offset(L.scroll), K = q.newlineIndex(z + B) - z + 1;
|
|
14264
|
+
q.formatAt(z, K, D, $[D]);
|
|
14261
14265
|
}
|
|
14262
14266
|
B -= H;
|
|
14263
14267
|
});
|
|
14264
14268
|
}
|
|
14265
|
-
}), this.scroll.optimize(), this.update(new c.default().retain(
|
|
14269
|
+
}), this.scroll.optimize(), this.update(new c.default().retain(I).retain(k, (0, E.default)($)));
|
|
14266
14270
|
}
|
|
14267
14271
|
}, {
|
|
14268
14272
|
key: "formatText",
|
|
14269
|
-
value: function(
|
|
14273
|
+
value: function(I, k) {
|
|
14270
14274
|
var L = this, $ = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
14271
|
-
return Object.keys($).forEach(function(
|
|
14272
|
-
L.scroll.formatAt(
|
|
14273
|
-
}), this.update(new c.default().retain(
|
|
14275
|
+
return Object.keys($).forEach(function(D) {
|
|
14276
|
+
L.scroll.formatAt(I, k, D, $[D]);
|
|
14277
|
+
}), this.update(new c.default().retain(I).retain(k, (0, E.default)($)));
|
|
14274
14278
|
}
|
|
14275
14279
|
}, {
|
|
14276
14280
|
key: "getContents",
|
|
14277
|
-
value: function(
|
|
14278
|
-
return this.delta.slice(
|
|
14281
|
+
value: function(I, k) {
|
|
14282
|
+
return this.delta.slice(I, I + k);
|
|
14279
14283
|
}
|
|
14280
14284
|
}, {
|
|
14281
14285
|
key: "getDelta",
|
|
14282
14286
|
value: function() {
|
|
14283
|
-
return this.scroll.lines().reduce(function(
|
|
14284
|
-
return
|
|
14287
|
+
return this.scroll.lines().reduce(function(I, k) {
|
|
14288
|
+
return I.concat(k.delta());
|
|
14285
14289
|
}, new c.default());
|
|
14286
14290
|
}
|
|
14287
14291
|
}, {
|
|
14288
14292
|
key: "getFormat",
|
|
14289
|
-
value: function(
|
|
14293
|
+
value: function(I) {
|
|
14290
14294
|
var k = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, L = [], $ = [];
|
|
14291
|
-
k === 0 ? this.scroll.path(
|
|
14295
|
+
k === 0 ? this.scroll.path(I).forEach(function(M) {
|
|
14292
14296
|
var B = a(M, 1), q = B[0];
|
|
14293
14297
|
q instanceof _.default ? L.push(q) : q instanceof d.default.Leaf && $.push(q);
|
|
14294
|
-
}) : (L = this.scroll.lines(
|
|
14295
|
-
var
|
|
14298
|
+
}) : (L = this.scroll.lines(I, k), $ = this.scroll.descendants(d.default.Leaf, I, k));
|
|
14299
|
+
var D = [L, $].map(function(M) {
|
|
14296
14300
|
if (M.length === 0)
|
|
14297
14301
|
return {};
|
|
14298
14302
|
for (var B = (0, g.bubbleFormats)(M.shift()); Object.keys(B).length > 0; ) {
|
|
14299
14303
|
var q = M.shift();
|
|
14300
14304
|
if (q == null)
|
|
14301
14305
|
return B;
|
|
14302
|
-
B =
|
|
14306
|
+
B = U((0, g.bubbleFormats)(q), B);
|
|
14303
14307
|
}
|
|
14304
14308
|
return B;
|
|
14305
14309
|
});
|
|
14306
|
-
return T.default.apply(T.default,
|
|
14310
|
+
return T.default.apply(T.default, D);
|
|
14307
14311
|
}
|
|
14308
14312
|
}, {
|
|
14309
14313
|
key: "getText",
|
|
14310
|
-
value: function(
|
|
14311
|
-
return this.getContents(
|
|
14314
|
+
value: function(I, k) {
|
|
14315
|
+
return this.getContents(I, k).filter(function(L) {
|
|
14312
14316
|
return typeof L.insert == "string";
|
|
14313
14317
|
}).map(function(L) {
|
|
14314
14318
|
return L.insert;
|
|
@@ -14316,18 +14320,18 @@ var vc = { exports: {} };
|
|
|
14316
14320
|
}
|
|
14317
14321
|
}, {
|
|
14318
14322
|
key: "insertEmbed",
|
|
14319
|
-
value: function(
|
|
14320
|
-
return this.scroll.insertAt(
|
|
14323
|
+
value: function(I, k, L) {
|
|
14324
|
+
return this.scroll.insertAt(I, k, L), this.update(new c.default().retain(I).insert(R({}, k, L)));
|
|
14321
14325
|
}
|
|
14322
14326
|
}, {
|
|
14323
14327
|
key: "insertText",
|
|
14324
|
-
value: function(
|
|
14328
|
+
value: function(I, k) {
|
|
14325
14329
|
var L = this, $ = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
14326
14330
|
return k = k.replace(/\r\n/g, `
|
|
14327
14331
|
`).replace(/\r/g, `
|
|
14328
|
-
`), this.scroll.insertAt(
|
|
14329
|
-
L.scroll.formatAt(
|
|
14330
|
-
}), this.update(new c.default().retain(
|
|
14332
|
+
`), this.scroll.insertAt(I, k), Object.keys($).forEach(function(D) {
|
|
14333
|
+
L.scroll.formatAt(I, k.length, D, $[D]);
|
|
14334
|
+
}), this.update(new c.default().retain(I).insert(k, (0, E.default)($)));
|
|
14331
14335
|
}
|
|
14332
14336
|
}, {
|
|
14333
14337
|
key: "isBlank",
|
|
@@ -14336,51 +14340,51 @@ var vc = { exports: {} };
|
|
|
14336
14340
|
return !0;
|
|
14337
14341
|
if (this.scroll.children.length > 1)
|
|
14338
14342
|
return !1;
|
|
14339
|
-
var
|
|
14340
|
-
return
|
|
14343
|
+
var I = this.scroll.children.head;
|
|
14344
|
+
return I.statics.blotName !== _.default.blotName || I.children.length > 1 ? !1 : I.children.head instanceof x.default;
|
|
14341
14345
|
}
|
|
14342
14346
|
}, {
|
|
14343
14347
|
key: "removeFormat",
|
|
14344
|
-
value: function(
|
|
14345
|
-
var L = this.getText(
|
|
14348
|
+
value: function(I, k) {
|
|
14349
|
+
var L = this.getText(I, k), $ = this.scroll.line(I + k), D = a($, 2), M = D[0], B = D[1], q = 0, H = new c.default();
|
|
14346
14350
|
M != null && (M instanceof m.default ? q = M.newlineIndex(B) - B + 1 : q = M.length() - B, H = M.delta().slice(B, B + q - 1).insert(`
|
|
14347
14351
|
`));
|
|
14348
|
-
var z = this.getContents(
|
|
14352
|
+
var z = this.getContents(I, k + q), K = z.diff(new c.default().insert(L).concat(H)), J = new c.default().retain(I).concat(K);
|
|
14349
14353
|
return this.applyDelta(J);
|
|
14350
14354
|
}
|
|
14351
14355
|
}, {
|
|
14352
14356
|
key: "update",
|
|
14353
|
-
value: function(
|
|
14357
|
+
value: function(I) {
|
|
14354
14358
|
var k = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [], L = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : void 0, $ = this.delta;
|
|
14355
14359
|
if (k.length === 1 && k[0].type === "characterData" && k[0].target.data.match(F) && d.default.find(k[0].target)) {
|
|
14356
|
-
var
|
|
14357
|
-
|
|
14360
|
+
var D = d.default.find(k[0].target), M = (0, g.bubbleFormats)(D), B = D.offset(this.scroll), q = k[0].oldValue.replace(v.default.CONTENTS, ""), H = new c.default().insert(q), z = new c.default().insert(D.value()), K = new c.default().retain(B).concat(H.diff(z, L));
|
|
14361
|
+
I = K.reduce(function(J, et) {
|
|
14358
14362
|
return et.insert ? J.insert(et.insert, M) : J.push(et);
|
|
14359
|
-
}, new c.default()), this.delta = $.compose(
|
|
14363
|
+
}, new c.default()), this.delta = $.compose(I);
|
|
14360
14364
|
} else
|
|
14361
|
-
this.delta = this.getDelta(), (!
|
|
14362
|
-
return
|
|
14365
|
+
this.delta = this.getDelta(), (!I || !(0, N.default)($.compose(I), this.delta)) && (I = $.diff(this.delta, L));
|
|
14366
|
+
return I;
|
|
14363
14367
|
}
|
|
14364
|
-
}]),
|
|
14368
|
+
}]), j;
|
|
14365
14369
|
}();
|
|
14366
|
-
function
|
|
14367
|
-
return Object.keys(P).reduce(function(
|
|
14368
|
-
return
|
|
14370
|
+
function U(j, P) {
|
|
14371
|
+
return Object.keys(P).reduce(function(I, k) {
|
|
14372
|
+
return j[k] == null || (P[k] === j[k] ? I[k] = P[k] : Array.isArray(P[k]) ? P[k].indexOf(j[k]) < 0 && (I[k] = P[k].concat([j[k]])) : I[k] = [P[k], j[k]]), I;
|
|
14369
14373
|
}, {});
|
|
14370
14374
|
}
|
|
14371
|
-
function X(
|
|
14372
|
-
return
|
|
14373
|
-
if (
|
|
14374
|
-
var k = (0, E.default)(
|
|
14375
|
-
return delete k.image, P.insert({ image:
|
|
14376
|
-
}
|
|
14377
|
-
if (
|
|
14378
|
-
var L =
|
|
14375
|
+
function X(j) {
|
|
14376
|
+
return j.reduce(function(P, I) {
|
|
14377
|
+
if (I.insert === 1) {
|
|
14378
|
+
var k = (0, E.default)(I.attributes);
|
|
14379
|
+
return delete k.image, P.insert({ image: I.attributes.image }, k);
|
|
14380
|
+
}
|
|
14381
|
+
if (I.attributes != null && (I.attributes.list === !0 || I.attributes.bullet === !0) && (I = (0, E.default)(I), I.attributes.list ? I.attributes.list = "ordered" : (I.attributes.list = "bullet", delete I.attributes.bullet)), typeof I.insert == "string") {
|
|
14382
|
+
var L = I.insert.replace(/\r\n/g, `
|
|
14379
14383
|
`).replace(/\r/g, `
|
|
14380
14384
|
`);
|
|
14381
|
-
return P.insert(L,
|
|
14385
|
+
return P.insert(L, I.attributes);
|
|
14382
14386
|
}
|
|
14383
|
-
return P.push(
|
|
14387
|
+
return P.push(I);
|
|
14384
14388
|
}, new c.default());
|
|
14385
14389
|
}
|
|
14386
14390
|
n.default = G;
|
|
@@ -14393,17 +14397,17 @@ var vc = { exports: {} };
|
|
|
14393
14397
|
}), n.default = n.Range = void 0;
|
|
14394
14398
|
var s = function() {
|
|
14395
14399
|
function w(N, A) {
|
|
14396
|
-
var T = [], S = !0,
|
|
14400
|
+
var T = [], S = !0, R = !1, C = void 0;
|
|
14397
14401
|
try {
|
|
14398
14402
|
for (var F = N[Symbol.iterator](), G; !(S = (G = F.next()).done) && (T.push(G.value), !(A && T.length === A)); S = !0)
|
|
14399
14403
|
;
|
|
14400
|
-
} catch (
|
|
14401
|
-
|
|
14404
|
+
} catch (U) {
|
|
14405
|
+
R = !0, C = U;
|
|
14402
14406
|
} finally {
|
|
14403
14407
|
try {
|
|
14404
14408
|
!S && F.return && F.return();
|
|
14405
14409
|
} finally {
|
|
14406
|
-
if (
|
|
14410
|
+
if (R)
|
|
14407
14411
|
throw C;
|
|
14408
14412
|
}
|
|
14409
14413
|
}
|
|
@@ -14450,8 +14454,8 @@ var vc = { exports: {} };
|
|
|
14450
14454
|
var T = this;
|
|
14451
14455
|
_(this, w), this.emitter = A, this.scroll = N, this.composing = !1, this.mouseDown = !1, this.root = this.scroll.domNode, this.cursor = l.default.create("cursor", this), this.lastRange = this.savedRange = new x(0, 0), this.handleComposition(), this.handleDragging(), this.emitter.listenDOM("selectionchange", document, function() {
|
|
14452
14456
|
T.mouseDown || setTimeout(T.update.bind(T, p.default.sources.USER), 1);
|
|
14453
|
-
}), this.emitter.on(p.default.events.EDITOR_CHANGE, function(S,
|
|
14454
|
-
S === p.default.events.TEXT_CHANGE &&
|
|
14457
|
+
}), this.emitter.on(p.default.events.EDITOR_CHANGE, function(S, R) {
|
|
14458
|
+
S === p.default.events.TEXT_CHANGE && R.length() > 0 && T.update(p.default.sources.SILENT);
|
|
14455
14459
|
}), this.emitter.on(p.default.events.SCROLL_BEFORE_UPDATE, function() {
|
|
14456
14460
|
if (T.hasFocus()) {
|
|
14457
14461
|
var S = T.getNativeRange();
|
|
@@ -14462,10 +14466,10 @@ var vc = { exports: {} };
|
|
|
14462
14466
|
}
|
|
14463
14467
|
});
|
|
14464
14468
|
}
|
|
14465
|
-
}), this.emitter.on(p.default.events.SCROLL_OPTIMIZE, function(S,
|
|
14466
|
-
if (
|
|
14467
|
-
var C =
|
|
14468
|
-
T.setNativeRange(F, G,
|
|
14469
|
+
}), this.emitter.on(p.default.events.SCROLL_OPTIMIZE, function(S, R) {
|
|
14470
|
+
if (R.range) {
|
|
14471
|
+
var C = R.range, F = C.startNode, G = C.startOffset, U = C.endNode, X = C.endOffset;
|
|
14472
|
+
T.setNativeRange(F, G, U, X);
|
|
14469
14473
|
}
|
|
14470
14474
|
}), this.update(p.default.sources.SILENT);
|
|
14471
14475
|
}
|
|
@@ -14509,14 +14513,14 @@ var vc = { exports: {} };
|
|
|
14509
14513
|
var S = this.getNativeRange();
|
|
14510
14514
|
if (!(S == null || !S.native.collapsed || l.default.query(A, l.default.Scope.BLOCK))) {
|
|
14511
14515
|
if (S.start.node !== this.cursor.textNode) {
|
|
14512
|
-
var
|
|
14513
|
-
if (
|
|
14516
|
+
var R = l.default.find(S.start.node, !1);
|
|
14517
|
+
if (R == null)
|
|
14514
14518
|
return;
|
|
14515
|
-
if (
|
|
14516
|
-
var C =
|
|
14517
|
-
|
|
14519
|
+
if (R instanceof l.default.Leaf) {
|
|
14520
|
+
var C = R.split(S.start.offset);
|
|
14521
|
+
R.parent.insertBefore(this.cursor, C);
|
|
14518
14522
|
} else
|
|
14519
|
-
|
|
14523
|
+
R.insertBefore(this.cursor, S.start.node);
|
|
14520
14524
|
this.cursor.attach();
|
|
14521
14525
|
}
|
|
14522
14526
|
this.cursor.format(A, T), this.scroll.optimize(), this.setNativeRange(this.cursor.textNode, this.cursor.textNode.data.length), this.update();
|
|
@@ -14528,26 +14532,26 @@ var vc = { exports: {} };
|
|
|
14528
14532
|
value: function(A) {
|
|
14529
14533
|
var T = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, S = this.scroll.length();
|
|
14530
14534
|
A = Math.min(A, S - 1), T = Math.min(A + T, S - 1) - A;
|
|
14531
|
-
var
|
|
14535
|
+
var R = void 0, C = this.scroll.leaf(A), F = s(C, 2), G = F[0], U = F[1];
|
|
14532
14536
|
if (G == null)
|
|
14533
14537
|
return null;
|
|
14534
|
-
var X = G.position(
|
|
14535
|
-
|
|
14538
|
+
var X = G.position(U, !0), j = s(X, 2);
|
|
14539
|
+
R = j[0], U = j[1];
|
|
14536
14540
|
var P = document.createRange();
|
|
14537
14541
|
if (T > 0) {
|
|
14538
|
-
P.setStart(
|
|
14539
|
-
var
|
|
14540
|
-
if (G = k[0],
|
|
14542
|
+
P.setStart(R, U);
|
|
14543
|
+
var I = this.scroll.leaf(A + T), k = s(I, 2);
|
|
14544
|
+
if (G = k[0], U = k[1], G == null)
|
|
14541
14545
|
return null;
|
|
14542
|
-
var L = G.position(
|
|
14543
|
-
return
|
|
14546
|
+
var L = G.position(U, !0), $ = s(L, 2);
|
|
14547
|
+
return R = $[0], U = $[1], P.setEnd(R, U), P.getBoundingClientRect();
|
|
14544
14548
|
} else {
|
|
14545
|
-
var
|
|
14546
|
-
return
|
|
14549
|
+
var D = "left", M = void 0;
|
|
14550
|
+
return R instanceof Text ? (U < R.data.length ? (P.setStart(R, U), P.setEnd(R, U + 1)) : (P.setStart(R, U - 1), P.setEnd(R, U), D = "right"), M = P.getBoundingClientRect()) : (M = G.domNode.getBoundingClientRect(), U > 0 && (D = "right")), {
|
|
14547
14551
|
bottom: M.top + M.height,
|
|
14548
14552
|
height: M.height,
|
|
14549
|
-
left: M[
|
|
14550
|
-
right: M[
|
|
14553
|
+
left: M[D],
|
|
14554
|
+
right: M[D],
|
|
14551
14555
|
top: M.top,
|
|
14552
14556
|
width: 0
|
|
14553
14557
|
};
|
|
@@ -14584,10 +14588,10 @@ var vc = { exports: {} };
|
|
|
14584
14588
|
value: function(A) {
|
|
14585
14589
|
var T = this, S = [[A.start.node, A.start.offset]];
|
|
14586
14590
|
A.native.collapsed || S.push([A.end.node, A.end.offset]);
|
|
14587
|
-
var
|
|
14588
|
-
var
|
|
14589
|
-
return
|
|
14590
|
-
}), C = Math.min(Math.max.apply(Math, g(
|
|
14591
|
+
var R = S.map(function(G) {
|
|
14592
|
+
var U = s(G, 2), X = U[0], j = U[1], P = l.default.find(X, !0), I = P.offset(T.scroll);
|
|
14593
|
+
return j === 0 ? I : P instanceof l.default.Container ? I + P.length() : I + P.index(X, j);
|
|
14594
|
+
}), C = Math.min(Math.max.apply(Math, g(R)), this.scroll.length() - 1), F = Math.min.apply(Math, [C].concat(g(R)));
|
|
14591
14595
|
return new x(F, C - F);
|
|
14592
14596
|
}
|
|
14593
14597
|
}, {
|
|
@@ -14601,25 +14605,25 @@ var vc = { exports: {} };
|
|
|
14601
14605
|
native: A
|
|
14602
14606
|
};
|
|
14603
14607
|
return [T.start, T.end].forEach(function(S) {
|
|
14604
|
-
for (var
|
|
14605
|
-
if (
|
|
14606
|
-
|
|
14607
|
-
else if (
|
|
14608
|
-
|
|
14608
|
+
for (var R = S.node, C = S.offset; !(R instanceof Text) && R.childNodes.length > 0; )
|
|
14609
|
+
if (R.childNodes.length > C)
|
|
14610
|
+
R = R.childNodes[C], C = 0;
|
|
14611
|
+
else if (R.childNodes.length === C)
|
|
14612
|
+
R = R.lastChild, C = R instanceof Text ? R.data.length : R.childNodes.length + 1;
|
|
14609
14613
|
else
|
|
14610
14614
|
break;
|
|
14611
|
-
S.node =
|
|
14615
|
+
S.node = R, S.offset = C;
|
|
14612
14616
|
}), T;
|
|
14613
14617
|
}
|
|
14614
14618
|
}, {
|
|
14615
14619
|
key: "rangeToNative",
|
|
14616
14620
|
value: function(A) {
|
|
14617
|
-
var T = this, S = A.collapsed ? [A.index] : [A.index, A.index + A.length],
|
|
14621
|
+
var T = this, S = A.collapsed ? [A.index] : [A.index, A.index + A.length], R = [], C = this.scroll.length();
|
|
14618
14622
|
return S.forEach(function(F, G) {
|
|
14619
14623
|
F = Math.min(C - 1, F);
|
|
14620
|
-
var
|
|
14621
|
-
|
|
14622
|
-
}),
|
|
14624
|
+
var U = void 0, X = T.scroll.leaf(F), j = s(X, 2), P = j[0], I = j[1], k = P.position(I, G !== 0), L = s(k, 2);
|
|
14625
|
+
U = L[0], I = L[1], R.push(U, I);
|
|
14626
|
+
}), R.length < 2 && (R = R.concat(R)), R;
|
|
14623
14627
|
}
|
|
14624
14628
|
}, {
|
|
14625
14629
|
key: "scrollIntoView",
|
|
@@ -14628,12 +14632,12 @@ var vc = { exports: {} };
|
|
|
14628
14632
|
if (T != null) {
|
|
14629
14633
|
var S = this.getBounds(T.index, T.length);
|
|
14630
14634
|
if (S != null) {
|
|
14631
|
-
var
|
|
14635
|
+
var R = this.scroll.length() - 1, C = this.scroll.line(Math.min(T.index, R)), F = s(C, 1), G = F[0], U = G;
|
|
14632
14636
|
if (T.length > 0) {
|
|
14633
|
-
var X = this.scroll.line(Math.min(T.index + T.length,
|
|
14634
|
-
|
|
14637
|
+
var X = this.scroll.line(Math.min(T.index + T.length, R)), j = s(X, 1);
|
|
14638
|
+
U = j[0];
|
|
14635
14639
|
}
|
|
14636
|
-
if (!(G == null ||
|
|
14640
|
+
if (!(G == null || U == null)) {
|
|
14637
14641
|
var P = A.getBoundingClientRect();
|
|
14638
14642
|
S.top < P.top ? A.scrollTop -= P.top - S.top : S.bottom > P.bottom && (A.scrollTop += S.bottom - P.bottom);
|
|
14639
14643
|
}
|
|
@@ -14643,17 +14647,17 @@ var vc = { exports: {} };
|
|
|
14643
14647
|
}, {
|
|
14644
14648
|
key: "setNativeRange",
|
|
14645
14649
|
value: function(A, T) {
|
|
14646
|
-
var S = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : A,
|
|
14647
|
-
if (y.info("setNativeRange", A, T, S,
|
|
14650
|
+
var S = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : A, R = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : T, C = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !1;
|
|
14651
|
+
if (y.info("setNativeRange", A, T, S, R), !(A != null && (this.root.parentNode == null || A.parentNode == null || S.parentNode == null))) {
|
|
14648
14652
|
var F = document.getSelection();
|
|
14649
14653
|
if (F != null)
|
|
14650
14654
|
if (A != null) {
|
|
14651
14655
|
this.hasFocus() || this.root.focus();
|
|
14652
14656
|
var G = (this.getNativeRange() || {}).native;
|
|
14653
|
-
if (G == null || C || A !== G.startContainer || T !== G.startOffset || S !== G.endContainer ||
|
|
14654
|
-
A.tagName == "BR" && (T = [].indexOf.call(A.parentNode.childNodes, A), A = A.parentNode), S.tagName == "BR" && (
|
|
14655
|
-
var
|
|
14656
|
-
|
|
14657
|
+
if (G == null || C || A !== G.startContainer || T !== G.startOffset || S !== G.endContainer || R !== G.endOffset) {
|
|
14658
|
+
A.tagName == "BR" && (T = [].indexOf.call(A.parentNode.childNodes, A), A = A.parentNode), S.tagName == "BR" && (R = [].indexOf.call(S.parentNode.childNodes, S), S = S.parentNode);
|
|
14659
|
+
var U = document.createRange();
|
|
14660
|
+
U.setStart(A, T), U.setEnd(S, R), F.removeAllRanges(), F.addRange(U);
|
|
14657
14661
|
}
|
|
14658
14662
|
} else
|
|
14659
14663
|
F.removeAllRanges(), this.root.blur(), document.body.focus();
|
|
@@ -14664,8 +14668,8 @@ var vc = { exports: {} };
|
|
|
14664
14668
|
value: function(A) {
|
|
14665
14669
|
var T = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, S = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : p.default.sources.API;
|
|
14666
14670
|
if (typeof T == "string" && (S = T, T = !1), y.info("setRange", A), A != null) {
|
|
14667
|
-
var
|
|
14668
|
-
this.setNativeRange.apply(this, g(
|
|
14671
|
+
var R = this.rangeToNative(A);
|
|
14672
|
+
this.setNativeRange.apply(this, g(R).concat([T]));
|
|
14669
14673
|
} else
|
|
14670
14674
|
this.setNativeRange(null);
|
|
14671
14675
|
this.update(S);
|
|
@@ -14673,14 +14677,14 @@ var vc = { exports: {} };
|
|
|
14673
14677
|
}, {
|
|
14674
14678
|
key: "update",
|
|
14675
14679
|
value: function() {
|
|
14676
|
-
var A = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : p.default.sources.USER, T = this.lastRange, S = this.getRange(),
|
|
14680
|
+
var A = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : p.default.sources.USER, T = this.lastRange, S = this.getRange(), R = s(S, 2), C = R[0], F = R[1];
|
|
14677
14681
|
if (this.lastRange = C, this.lastRange != null && (this.savedRange = this.lastRange), !(0, u.default)(T, this.lastRange)) {
|
|
14678
14682
|
var G;
|
|
14679
14683
|
!this.composing && F != null && F.native.collapsed && F.start.node !== this.cursor.textNode && this.cursor.restore();
|
|
14680
|
-
var
|
|
14681
|
-
if ((G = this.emitter).emit.apply(G, [p.default.events.EDITOR_CHANGE].concat(
|
|
14684
|
+
var U = [p.default.events.SELECTION_CHANGE, (0, f.default)(this.lastRange), (0, f.default)(T), A];
|
|
14685
|
+
if ((G = this.emitter).emit.apply(G, [p.default.events.EDITOR_CHANGE].concat(U)), A !== p.default.sources.SILENT) {
|
|
14682
14686
|
var X;
|
|
14683
|
-
(X = this.emitter).emit.apply(X,
|
|
14687
|
+
(X = this.emitter).emit.apply(X, U);
|
|
14684
14688
|
}
|
|
14685
14689
|
}
|
|
14686
14690
|
}
|
|
@@ -15139,11 +15143,11 @@ var vc = { exports: {} };
|
|
|
15139
15143
|
else if (s(w, o))
|
|
15140
15144
|
A = new o();
|
|
15141
15145
|
else if (s(w, l))
|
|
15142
|
-
A = new l(function(P,
|
|
15146
|
+
A = new l(function(P, I) {
|
|
15143
15147
|
w.then(function(k) {
|
|
15144
15148
|
P(E(k, N - 1));
|
|
15145
15149
|
}, function(k) {
|
|
15146
|
-
|
|
15150
|
+
I(E(k, N - 1));
|
|
15147
15151
|
});
|
|
15148
15152
|
});
|
|
15149
15153
|
else if (c.__isArray(w))
|
|
@@ -15163,28 +15167,28 @@ var vc = { exports: {} };
|
|
|
15163
15167
|
return x[S];
|
|
15164
15168
|
y.push(w), x.push(A);
|
|
15165
15169
|
}
|
|
15166
|
-
s(w, a) && w.forEach(function(P,
|
|
15167
|
-
var k = E(
|
|
15170
|
+
s(w, a) && w.forEach(function(P, I) {
|
|
15171
|
+
var k = E(I, N - 1), L = E(P, N - 1);
|
|
15168
15172
|
A.set(k, L);
|
|
15169
15173
|
}), s(w, o) && w.forEach(function(P) {
|
|
15170
|
-
var
|
|
15171
|
-
A.add(
|
|
15174
|
+
var I = E(P, N - 1);
|
|
15175
|
+
A.add(I);
|
|
15172
15176
|
});
|
|
15173
|
-
for (var
|
|
15177
|
+
for (var R in w) {
|
|
15174
15178
|
var C;
|
|
15175
|
-
T && (C = Object.getOwnPropertyDescriptor(T,
|
|
15179
|
+
T && (C = Object.getOwnPropertyDescriptor(T, R)), !(C && C.set == null) && (A[R] = E(w[R], N - 1));
|
|
15176
15180
|
}
|
|
15177
15181
|
if (Object.getOwnPropertySymbols)
|
|
15178
|
-
for (var F = Object.getOwnPropertySymbols(w),
|
|
15179
|
-
var G = F[
|
|
15180
|
-
|
|
15182
|
+
for (var F = Object.getOwnPropertySymbols(w), R = 0; R < F.length; R++) {
|
|
15183
|
+
var G = F[R], U = Object.getOwnPropertyDescriptor(w, G);
|
|
15184
|
+
U && !U.enumerable && !_ || (A[G] = E(w[G], N - 1), U.enumerable || Object.defineProperty(A, G, {
|
|
15181
15185
|
enumerable: !1
|
|
15182
15186
|
}));
|
|
15183
15187
|
}
|
|
15184
15188
|
if (_)
|
|
15185
|
-
for (var X = Object.getOwnPropertyNames(w),
|
|
15186
|
-
var
|
|
15187
|
-
|
|
15189
|
+
for (var X = Object.getOwnPropertyNames(w), R = 0; R < X.length; R++) {
|
|
15190
|
+
var j = X[R], U = Object.getOwnPropertyDescriptor(w, j);
|
|
15191
|
+
U && U.enumerable || (A[j] = E(w[j], N - 1), Object.defineProperty(A, j, {
|
|
15188
15192
|
enumerable: !1
|
|
15189
15193
|
}));
|
|
15190
15194
|
}
|
|
@@ -15231,21 +15235,21 @@ var vc = { exports: {} };
|
|
|
15231
15235
|
});
|
|
15232
15236
|
var s = function() {
|
|
15233
15237
|
function A(T, S) {
|
|
15234
|
-
var
|
|
15238
|
+
var R = [], C = !0, F = !1, G = void 0;
|
|
15235
15239
|
try {
|
|
15236
|
-
for (var
|
|
15240
|
+
for (var U = T[Symbol.iterator](), X; !(C = (X = U.next()).done) && (R.push(X.value), !(S && R.length === S)); C = !0)
|
|
15237
15241
|
;
|
|
15238
|
-
} catch (
|
|
15239
|
-
F = !0, G =
|
|
15242
|
+
} catch (j) {
|
|
15243
|
+
F = !0, G = j;
|
|
15240
15244
|
} finally {
|
|
15241
15245
|
try {
|
|
15242
|
-
!C &&
|
|
15246
|
+
!C && U.return && U.return();
|
|
15243
15247
|
} finally {
|
|
15244
15248
|
if (F)
|
|
15245
15249
|
throw G;
|
|
15246
15250
|
}
|
|
15247
15251
|
}
|
|
15248
|
-
return
|
|
15252
|
+
return R;
|
|
15249
15253
|
}
|
|
15250
15254
|
return function(T, S) {
|
|
15251
15255
|
if (Array.isArray(T))
|
|
@@ -15256,25 +15260,25 @@ var vc = { exports: {} };
|
|
|
15256
15260
|
};
|
|
15257
15261
|
}(), a = function() {
|
|
15258
15262
|
function A(T, S) {
|
|
15259
|
-
for (var
|
|
15260
|
-
var C = S[
|
|
15263
|
+
for (var R = 0; R < S.length; R++) {
|
|
15264
|
+
var C = S[R];
|
|
15261
15265
|
C.enumerable = C.enumerable || !1, C.configurable = !0, "value" in C && (C.writable = !0), Object.defineProperty(T, C.key, C);
|
|
15262
15266
|
}
|
|
15263
15267
|
}
|
|
15264
|
-
return function(T, S,
|
|
15265
|
-
return S && A(T.prototype, S),
|
|
15268
|
+
return function(T, S, R) {
|
|
15269
|
+
return S && A(T.prototype, S), R && A(T, R), T;
|
|
15266
15270
|
};
|
|
15267
|
-
}(), o = function A(T, S,
|
|
15271
|
+
}(), o = function A(T, S, R) {
|
|
15268
15272
|
T === null && (T = Function.prototype);
|
|
15269
15273
|
var C = Object.getOwnPropertyDescriptor(T, S);
|
|
15270
15274
|
if (C === void 0) {
|
|
15271
15275
|
var F = Object.getPrototypeOf(T);
|
|
15272
|
-
return F === null ? void 0 : A(F, S,
|
|
15276
|
+
return F === null ? void 0 : A(F, S, R);
|
|
15273
15277
|
} else {
|
|
15274
15278
|
if ("value" in C)
|
|
15275
15279
|
return C.value;
|
|
15276
15280
|
var G = C.get;
|
|
15277
|
-
return G === void 0 ? void 0 : G.call(
|
|
15281
|
+
return G === void 0 ? void 0 : G.call(R);
|
|
15278
15282
|
}
|
|
15279
15283
|
}, l = i(0), c = y(l), f = i(8), h = y(f), u = i(4), d = y(u), p = i(16), m = y(p), b = i(13), v = y(b), g = i(25), _ = y(g);
|
|
15280
15284
|
function y(A) {
|
|
@@ -15299,10 +15303,10 @@ var vc = { exports: {} };
|
|
|
15299
15303
|
}
|
|
15300
15304
|
var N = function(A) {
|
|
15301
15305
|
E(T, A);
|
|
15302
|
-
function T(S,
|
|
15306
|
+
function T(S, R) {
|
|
15303
15307
|
x(this, T);
|
|
15304
15308
|
var C = O(this, (T.__proto__ || Object.getPrototypeOf(T)).call(this, S));
|
|
15305
|
-
return C.emitter =
|
|
15309
|
+
return C.emitter = R.emitter, Array.isArray(R.whitelist) && (C.whitelist = R.whitelist.reduce(function(F, G) {
|
|
15306
15310
|
return F[G] = !0, F;
|
|
15307
15311
|
}, {})), C.domNode.addEventListener("DOMNodeInserted", function() {
|
|
15308
15312
|
}), C.optimize(), C.enable(), C;
|
|
@@ -15319,104 +15323,104 @@ var vc = { exports: {} };
|
|
|
15319
15323
|
}
|
|
15320
15324
|
}, {
|
|
15321
15325
|
key: "deleteAt",
|
|
15322
|
-
value: function(
|
|
15323
|
-
var F = this.line(
|
|
15324
|
-
if (o(T.prototype.__proto__ || Object.getPrototypeOf(T.prototype), "deleteAt", this).call(this,
|
|
15325
|
-
if (
|
|
15326
|
+
value: function(R, C) {
|
|
15327
|
+
var F = this.line(R), G = s(F, 2), U = G[0], X = G[1], j = this.line(R + C), P = s(j, 1), I = P[0];
|
|
15328
|
+
if (o(T.prototype.__proto__ || Object.getPrototypeOf(T.prototype), "deleteAt", this).call(this, R, C), I != null && U !== I && X > 0) {
|
|
15329
|
+
if (U instanceof u.BlockEmbed || I instanceof u.BlockEmbed) {
|
|
15326
15330
|
this.optimize();
|
|
15327
15331
|
return;
|
|
15328
15332
|
}
|
|
15329
|
-
if (
|
|
15330
|
-
var k =
|
|
15331
|
-
if (k > -1 && (
|
|
15333
|
+
if (U instanceof v.default) {
|
|
15334
|
+
var k = U.newlineIndex(U.length(), !0);
|
|
15335
|
+
if (k > -1 && (U = U.split(k + 1), U === I)) {
|
|
15332
15336
|
this.optimize();
|
|
15333
15337
|
return;
|
|
15334
15338
|
}
|
|
15335
|
-
} else if (
|
|
15336
|
-
var L =
|
|
15337
|
-
L > -1 &&
|
|
15339
|
+
} else if (I instanceof v.default) {
|
|
15340
|
+
var L = I.newlineIndex(0);
|
|
15341
|
+
L > -1 && I.split(L + 1);
|
|
15338
15342
|
}
|
|
15339
|
-
var $ =
|
|
15340
|
-
|
|
15343
|
+
var $ = I.children.head instanceof m.default ? null : I.children.head;
|
|
15344
|
+
U.moveChildren(I, $), U.remove();
|
|
15341
15345
|
}
|
|
15342
15346
|
this.optimize();
|
|
15343
15347
|
}
|
|
15344
15348
|
}, {
|
|
15345
15349
|
key: "enable",
|
|
15346
15350
|
value: function() {
|
|
15347
|
-
var
|
|
15348
|
-
this.domNode.setAttribute("contenteditable",
|
|
15351
|
+
var R = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0;
|
|
15352
|
+
this.domNode.setAttribute("contenteditable", R);
|
|
15349
15353
|
}
|
|
15350
15354
|
}, {
|
|
15351
15355
|
key: "formatAt",
|
|
15352
|
-
value: function(
|
|
15353
|
-
this.whitelist != null && !this.whitelist[F] || (o(T.prototype.__proto__ || Object.getPrototypeOf(T.prototype), "formatAt", this).call(this,
|
|
15356
|
+
value: function(R, C, F, G) {
|
|
15357
|
+
this.whitelist != null && !this.whitelist[F] || (o(T.prototype.__proto__ || Object.getPrototypeOf(T.prototype), "formatAt", this).call(this, R, C, F, G), this.optimize());
|
|
15354
15358
|
}
|
|
15355
15359
|
}, {
|
|
15356
15360
|
key: "insertAt",
|
|
15357
|
-
value: function(
|
|
15361
|
+
value: function(R, C, F) {
|
|
15358
15362
|
if (!(F != null && this.whitelist != null && !this.whitelist[C])) {
|
|
15359
|
-
if (
|
|
15363
|
+
if (R >= this.length())
|
|
15360
15364
|
if (F == null || c.default.query(C, c.default.Scope.BLOCK) == null) {
|
|
15361
15365
|
var G = c.default.create(this.statics.defaultChild);
|
|
15362
15366
|
this.appendChild(G), F == null && C.endsWith(`
|
|
15363
15367
|
`) && (C = C.slice(0, -1)), G.insertAt(0, C, F);
|
|
15364
15368
|
} else {
|
|
15365
|
-
var
|
|
15366
|
-
this.appendChild(
|
|
15369
|
+
var U = c.default.create(C, F);
|
|
15370
|
+
this.appendChild(U);
|
|
15367
15371
|
}
|
|
15368
15372
|
else
|
|
15369
|
-
o(T.prototype.__proto__ || Object.getPrototypeOf(T.prototype), "insertAt", this).call(this,
|
|
15373
|
+
o(T.prototype.__proto__ || Object.getPrototypeOf(T.prototype), "insertAt", this).call(this, R, C, F);
|
|
15370
15374
|
this.optimize();
|
|
15371
15375
|
}
|
|
15372
15376
|
}
|
|
15373
15377
|
}, {
|
|
15374
15378
|
key: "insertBefore",
|
|
15375
|
-
value: function(
|
|
15376
|
-
if (
|
|
15379
|
+
value: function(R, C) {
|
|
15380
|
+
if (R.statics.scope === c.default.Scope.INLINE_BLOT) {
|
|
15377
15381
|
var F = c.default.create(this.statics.defaultChild);
|
|
15378
|
-
F.appendChild(
|
|
15382
|
+
F.appendChild(R), R = F;
|
|
15379
15383
|
}
|
|
15380
|
-
o(T.prototype.__proto__ || Object.getPrototypeOf(T.prototype), "insertBefore", this).call(this,
|
|
15384
|
+
o(T.prototype.__proto__ || Object.getPrototypeOf(T.prototype), "insertBefore", this).call(this, R, C);
|
|
15381
15385
|
}
|
|
15382
15386
|
}, {
|
|
15383
15387
|
key: "leaf",
|
|
15384
|
-
value: function(
|
|
15385
|
-
return this.path(
|
|
15388
|
+
value: function(R) {
|
|
15389
|
+
return this.path(R).pop() || [null, -1];
|
|
15386
15390
|
}
|
|
15387
15391
|
}, {
|
|
15388
15392
|
key: "line",
|
|
15389
|
-
value: function(
|
|
15390
|
-
return
|
|
15393
|
+
value: function(R) {
|
|
15394
|
+
return R === this.length() ? this.line(R - 1) : this.descendant(w, R);
|
|
15391
15395
|
}
|
|
15392
15396
|
}, {
|
|
15393
15397
|
key: "lines",
|
|
15394
15398
|
value: function() {
|
|
15395
|
-
var
|
|
15396
|
-
var P = [],
|
|
15397
|
-
return
|
|
15398
|
-
w(k) ? P.push(k) : k instanceof c.default.Container && (P = P.concat(G(k, L,
|
|
15399
|
+
var R = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0, C = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Number.MAX_VALUE, F = function G(U, X, j) {
|
|
15400
|
+
var P = [], I = j;
|
|
15401
|
+
return U.children.forEachAt(X, j, function(k, L, $) {
|
|
15402
|
+
w(k) ? P.push(k) : k instanceof c.default.Container && (P = P.concat(G(k, L, I))), I -= $;
|
|
15399
15403
|
}), P;
|
|
15400
15404
|
};
|
|
15401
|
-
return F(this,
|
|
15405
|
+
return F(this, R, C);
|
|
15402
15406
|
}
|
|
15403
15407
|
}, {
|
|
15404
15408
|
key: "optimize",
|
|
15405
15409
|
value: function() {
|
|
15406
|
-
var
|
|
15407
|
-
this.batch !== !0 && (o(T.prototype.__proto__ || Object.getPrototypeOf(T.prototype), "optimize", this).call(this,
|
|
15410
|
+
var R = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], C = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
15411
|
+
this.batch !== !0 && (o(T.prototype.__proto__ || Object.getPrototypeOf(T.prototype), "optimize", this).call(this, R, C), R.length > 0 && this.emitter.emit(h.default.events.SCROLL_OPTIMIZE, R, C));
|
|
15408
15412
|
}
|
|
15409
15413
|
}, {
|
|
15410
15414
|
key: "path",
|
|
15411
|
-
value: function(
|
|
15412
|
-
return o(T.prototype.__proto__ || Object.getPrototypeOf(T.prototype), "path", this).call(this,
|
|
15415
|
+
value: function(R) {
|
|
15416
|
+
return o(T.prototype.__proto__ || Object.getPrototypeOf(T.prototype), "path", this).call(this, R).slice(1);
|
|
15413
15417
|
}
|
|
15414
15418
|
}, {
|
|
15415
15419
|
key: "update",
|
|
15416
|
-
value: function(
|
|
15420
|
+
value: function(R) {
|
|
15417
15421
|
if (this.batch !== !0) {
|
|
15418
15422
|
var C = h.default.sources.USER;
|
|
15419
|
-
typeof
|
|
15423
|
+
typeof R == "string" && (C = R), Array.isArray(R) || (R = this.observer.takeRecords()), R.length > 0 && this.emitter.emit(h.default.events.SCROLL_BEFORE_UPDATE, C, R), o(T.prototype.__proto__ || Object.getPrototypeOf(T.prototype), "update", this).call(this, R.concat([])), R.length > 0 && this.emitter.emit(h.default.events.SCROLL_UPDATE, C, R);
|
|
15420
15424
|
}
|
|
15421
15425
|
}
|
|
15422
15426
|
}]), T;
|
|
@@ -15479,7 +15483,7 @@ var vc = { exports: {} };
|
|
|
15479
15483
|
if (!(M instanceof B))
|
|
15480
15484
|
throw new TypeError("Cannot call a class as a function");
|
|
15481
15485
|
}
|
|
15482
|
-
function
|
|
15486
|
+
function R(M, B) {
|
|
15483
15487
|
if (!M)
|
|
15484
15488
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
15485
15489
|
return B && (typeof B == "object" || typeof B == "function") ? B : M;
|
|
@@ -15489,27 +15493,27 @@ var vc = { exports: {} };
|
|
|
15489
15493
|
throw new TypeError("Super expression must either be null or a function, not " + typeof B);
|
|
15490
15494
|
M.prototype = Object.create(B && B.prototype, { constructor: { value: M, enumerable: !1, writable: !0, configurable: !0 } }), B && (Object.setPrototypeOf ? Object.setPrototypeOf(M, B) : M.__proto__ = B);
|
|
15491
15495
|
}
|
|
15492
|
-
var F = (0, E.default)("quill:keyboard"), G = /Mac/i.test(navigator.platform) ? "metaKey" : "ctrlKey",
|
|
15496
|
+
var F = (0, E.default)("quill:keyboard"), G = /Mac/i.test(navigator.platform) ? "metaKey" : "ctrlKey", U = function(M) {
|
|
15493
15497
|
C(B, M), o(B, null, [{
|
|
15494
15498
|
key: "match",
|
|
15495
15499
|
value: function(H, z) {
|
|
15496
|
-
return z =
|
|
15500
|
+
return z = D(z), ["altKey", "ctrlKey", "metaKey", "shiftKey"].some(function(K) {
|
|
15497
15501
|
return !!z[K] !== H[K] && z[K] !== null;
|
|
15498
15502
|
}) ? !1 : z.key === (H.which || H.keyCode);
|
|
15499
15503
|
}
|
|
15500
15504
|
}]);
|
|
15501
15505
|
function B(q, H) {
|
|
15502
15506
|
S(this, B);
|
|
15503
|
-
var z =
|
|
15507
|
+
var z = R(this, (B.__proto__ || Object.getPrototypeOf(B)).call(this, q, H));
|
|
15504
15508
|
return z.bindings = {}, Object.keys(z.options.bindings).forEach(function(K) {
|
|
15505
15509
|
K === "list autofill" && q.scroll.whitelist != null && !q.scroll.whitelist.list || z.options.bindings[K] && z.addBinding(z.options.bindings[K]);
|
|
15506
15510
|
}), z.addBinding({ key: B.keys.ENTER, shiftKey: null }, k), z.addBinding({ key: B.keys.ENTER, metaKey: null, ctrlKey: null, altKey: null }, function() {
|
|
15507
|
-
}), /Firefox/i.test(navigator.userAgent) ? (z.addBinding({ key: B.keys.BACKSPACE }, { collapsed: !0 },
|
|
15511
|
+
}), /Firefox/i.test(navigator.userAgent) ? (z.addBinding({ key: B.keys.BACKSPACE }, { collapsed: !0 }, j), z.addBinding({ key: B.keys.DELETE }, { collapsed: !0 }, P)) : (z.addBinding({ key: B.keys.BACKSPACE }, { collapsed: !0, prefix: /^.?$/ }, j), z.addBinding({ key: B.keys.DELETE }, { collapsed: !0, suffix: /^.?$/ }, P)), z.addBinding({ key: B.keys.BACKSPACE }, { collapsed: !1 }, I), z.addBinding({ key: B.keys.DELETE }, { collapsed: !1 }, I), z.addBinding({ key: B.keys.BACKSPACE, altKey: null, ctrlKey: null, metaKey: null, shiftKey: null }, { collapsed: !0, offset: 0 }, j), z.listen(), z;
|
|
15508
15512
|
}
|
|
15509
15513
|
return o(B, [{
|
|
15510
15514
|
key: "addBinding",
|
|
15511
15515
|
value: function(H) {
|
|
15512
|
-
var z = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, K = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, J =
|
|
15516
|
+
var z = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, K = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, J = D(H);
|
|
15513
15517
|
if (J == null || J.key == null)
|
|
15514
15518
|
return F.warn("Attempted to add invalid keyboard binding", J);
|
|
15515
15519
|
typeof z == "function" && (z = { handler: z }), typeof K == "function" && (K = { handler: K }), J = (0, d.default)(J, z, K), this.bindings[J.key] = this.bindings[J.key] || [], this.bindings[J.key].push(J);
|
|
@@ -15555,7 +15559,7 @@ var vc = { exports: {} };
|
|
|
15555
15559
|
}
|
|
15556
15560
|
}]), B;
|
|
15557
15561
|
}(N.default);
|
|
15558
|
-
|
|
15562
|
+
U.keys = {
|
|
15559
15563
|
BACKSPACE: 8,
|
|
15560
15564
|
TAB: 9,
|
|
15561
15565
|
ENTER: 13,
|
|
@@ -15565,14 +15569,14 @@ var vc = { exports: {} };
|
|
|
15565
15569
|
RIGHT: 39,
|
|
15566
15570
|
DOWN: 40,
|
|
15567
15571
|
DELETE: 46
|
|
15568
|
-
},
|
|
15572
|
+
}, U.DEFAULTS = {
|
|
15569
15573
|
bindings: {
|
|
15570
15574
|
bold: $("bold"),
|
|
15571
15575
|
italic: $("italic"),
|
|
15572
15576
|
underline: $("underline"),
|
|
15573
15577
|
indent: {
|
|
15574
15578
|
// highlight tab or tab at beginning of list, indent or blockquote
|
|
15575
|
-
key:
|
|
15579
|
+
key: U.keys.TAB,
|
|
15576
15580
|
format: ["blockquote", "indent", "list"],
|
|
15577
15581
|
handler: function(B, q) {
|
|
15578
15582
|
if (q.collapsed && q.offset !== 0)
|
|
@@ -15581,7 +15585,7 @@ var vc = { exports: {} };
|
|
|
15581
15585
|
}
|
|
15582
15586
|
},
|
|
15583
15587
|
outdent: {
|
|
15584
|
-
key:
|
|
15588
|
+
key: U.keys.TAB,
|
|
15585
15589
|
shiftKey: !0,
|
|
15586
15590
|
format: ["blockquote", "indent", "list"],
|
|
15587
15591
|
// highlight tab or tab at beginning of list, indent or blockquote
|
|
@@ -15592,7 +15596,7 @@ var vc = { exports: {} };
|
|
|
15592
15596
|
}
|
|
15593
15597
|
},
|
|
15594
15598
|
"outdent backspace": {
|
|
15595
|
-
key:
|
|
15599
|
+
key: U.keys.BACKSPACE,
|
|
15596
15600
|
collapsed: !0,
|
|
15597
15601
|
shiftKey: null,
|
|
15598
15602
|
metaKey: null,
|
|
@@ -15607,7 +15611,7 @@ var vc = { exports: {} };
|
|
|
15607
15611
|
"indent code-block": L(!0),
|
|
15608
15612
|
"outdent code-block": L(!1),
|
|
15609
15613
|
"remove tab": {
|
|
15610
|
-
key:
|
|
15614
|
+
key: U.keys.TAB,
|
|
15611
15615
|
shiftKey: !0,
|
|
15612
15616
|
collapsed: !0,
|
|
15613
15617
|
prefix: /\t$/,
|
|
@@ -15616,7 +15620,7 @@ var vc = { exports: {} };
|
|
|
15616
15620
|
}
|
|
15617
15621
|
},
|
|
15618
15622
|
tab: {
|
|
15619
|
-
key:
|
|
15623
|
+
key: U.keys.TAB,
|
|
15620
15624
|
handler: function(B) {
|
|
15621
15625
|
this.quill.history.cutoff();
|
|
15622
15626
|
var q = new m.default().retain(B.index).delete(B.length).insert(" ");
|
|
@@ -15624,7 +15628,7 @@ var vc = { exports: {} };
|
|
|
15624
15628
|
}
|
|
15625
15629
|
},
|
|
15626
15630
|
"list empty enter": {
|
|
15627
|
-
key:
|
|
15631
|
+
key: U.keys.ENTER,
|
|
15628
15632
|
collapsed: !0,
|
|
15629
15633
|
format: ["list"],
|
|
15630
15634
|
empty: !0,
|
|
@@ -15633,7 +15637,7 @@ var vc = { exports: {} };
|
|
|
15633
15637
|
}
|
|
15634
15638
|
},
|
|
15635
15639
|
"checklist enter": {
|
|
15636
|
-
key:
|
|
15640
|
+
key: U.keys.ENTER,
|
|
15637
15641
|
collapsed: !0,
|
|
15638
15642
|
format: { list: "checked" },
|
|
15639
15643
|
handler: function(B) {
|
|
@@ -15643,7 +15647,7 @@ var vc = { exports: {} };
|
|
|
15643
15647
|
}
|
|
15644
15648
|
},
|
|
15645
15649
|
"header enter": {
|
|
15646
|
-
key:
|
|
15650
|
+
key: U.keys.ENTER,
|
|
15647
15651
|
collapsed: !0,
|
|
15648
15652
|
format: ["header"],
|
|
15649
15653
|
suffix: /^$/,
|
|
@@ -15684,7 +15688,7 @@ var vc = { exports: {} };
|
|
|
15684
15688
|
}
|
|
15685
15689
|
},
|
|
15686
15690
|
"code exit": {
|
|
15687
|
-
key:
|
|
15691
|
+
key: U.keys.ENTER,
|
|
15688
15692
|
collapsed: !0,
|
|
15689
15693
|
format: ["code-block"],
|
|
15690
15694
|
prefix: /\n\n$/,
|
|
@@ -15694,26 +15698,26 @@ var vc = { exports: {} };
|
|
|
15694
15698
|
this.quill.updateContents(J, x.default.sources.USER);
|
|
15695
15699
|
}
|
|
15696
15700
|
},
|
|
15697
|
-
"embed left": X(
|
|
15698
|
-
"embed left shift": X(
|
|
15699
|
-
"embed right": X(
|
|
15700
|
-
"embed right shift": X(
|
|
15701
|
+
"embed left": X(U.keys.LEFT, !1),
|
|
15702
|
+
"embed left shift": X(U.keys.LEFT, !0),
|
|
15703
|
+
"embed right": X(U.keys.RIGHT, !1),
|
|
15704
|
+
"embed right shift": X(U.keys.RIGHT, !0)
|
|
15701
15705
|
}
|
|
15702
15706
|
};
|
|
15703
15707
|
function X(M, B) {
|
|
15704
|
-
var q, H = M ===
|
|
15708
|
+
var q, H = M === U.keys.LEFT ? "prefix" : "suffix";
|
|
15705
15709
|
return q = {
|
|
15706
15710
|
key: M,
|
|
15707
15711
|
shiftKey: B,
|
|
15708
15712
|
altKey: null
|
|
15709
15713
|
}, T(q, H, /^$/), T(q, "handler", function(K) {
|
|
15710
15714
|
var J = K.index;
|
|
15711
|
-
M ===
|
|
15715
|
+
M === U.keys.RIGHT && (J += K.length + 1);
|
|
15712
15716
|
var et = this.quill.getLeaf(J), st = a(et, 1), ot = st[0];
|
|
15713
|
-
return ot instanceof _.default.Embed ? (M ===
|
|
15717
|
+
return ot instanceof _.default.Embed ? (M === U.keys.LEFT ? B ? this.quill.setSelection(K.index - 1, K.length + 1, x.default.sources.USER) : this.quill.setSelection(K.index - 1, x.default.sources.USER) : B ? this.quill.setSelection(K.index, K.length + 1, x.default.sources.USER) : this.quill.setSelection(K.index + K.length + 1, x.default.sources.USER), !1) : !0;
|
|
15714
15718
|
}), q;
|
|
15715
15719
|
}
|
|
15716
|
-
function
|
|
15720
|
+
function j(M, B) {
|
|
15717
15721
|
if (!(M.index === 0 || this.quill.getLength() <= 1)) {
|
|
15718
15722
|
var q = this.quill.getLine(M.index), H = a(q, 1), z = H[0], K = {};
|
|
15719
15723
|
if (B.offset === 0) {
|
|
@@ -15741,7 +15745,7 @@ var vc = { exports: {} };
|
|
|
15741
15745
|
this.quill.deleteText(M.index, q, x.default.sources.USER), Object.keys(H).length > 0 && this.quill.formatLine(M.index + z - 1, q, H, x.default.sources.USER);
|
|
15742
15746
|
}
|
|
15743
15747
|
}
|
|
15744
|
-
function
|
|
15748
|
+
function I(M) {
|
|
15745
15749
|
var B = this.quill.getLines(M), q = {};
|
|
15746
15750
|
if (B.length > 1) {
|
|
15747
15751
|
var H = B[0].formats(), z = B[B.length - 1].formats();
|
|
@@ -15762,7 +15766,7 @@ var vc = { exports: {} };
|
|
|
15762
15766
|
}
|
|
15763
15767
|
function L(M) {
|
|
15764
15768
|
return {
|
|
15765
|
-
key:
|
|
15769
|
+
key: U.keys.TAB,
|
|
15766
15770
|
shiftKey: !M,
|
|
15767
15771
|
format: { "code-block": !0 },
|
|
15768
15772
|
handler: function(q) {
|
|
@@ -15786,19 +15790,19 @@ var vc = { exports: {} };
|
|
|
15786
15790
|
}
|
|
15787
15791
|
};
|
|
15788
15792
|
}
|
|
15789
|
-
function
|
|
15793
|
+
function D(M) {
|
|
15790
15794
|
if (typeof M == "string" || typeof M == "number")
|
|
15791
|
-
return
|
|
15795
|
+
return D({ key: M });
|
|
15792
15796
|
if ((typeof M > "u" ? "undefined" : s(M)) === "object" && (M = (0, c.default)(M, !1)), typeof M.key == "string")
|
|
15793
|
-
if (
|
|
15794
|
-
M.key =
|
|
15797
|
+
if (U.keys[M.key.toUpperCase()] != null)
|
|
15798
|
+
M.key = U.keys[M.key.toUpperCase()];
|
|
15795
15799
|
else if (M.key.length === 1)
|
|
15796
15800
|
M.key = M.key.toUpperCase().charCodeAt(0);
|
|
15797
15801
|
else
|
|
15798
15802
|
return null;
|
|
15799
15803
|
return M.shortKey && (M[G] = M.shortKey, delete M.shortKey), M;
|
|
15800
15804
|
}
|
|
15801
|
-
n.default =
|
|
15805
|
+
n.default = U, n.SHORTKEY = G;
|
|
15802
15806
|
},
|
|
15803
15807
|
/* 24 */
|
|
15804
15808
|
/***/
|
|
@@ -15932,8 +15936,8 @@ var vc = { exports: {} };
|
|
|
15932
15936
|
this.next instanceof h.default ? (O = this.next.domNode, this.next.insertAt(0, A), this.textNode.data = g.CONTENTS) : (this.textNode.data = A, this.parent.insertBefore(c.default.create(this.textNode), this), this.textNode = document.createTextNode(g.CONTENTS), this.domNode.appendChild(this.textNode));
|
|
15933
15937
|
}
|
|
15934
15938
|
if (this.remove(), E != null) {
|
|
15935
|
-
var T = [E, w].map(function(
|
|
15936
|
-
return Math.max(0, Math.min(O.data.length,
|
|
15939
|
+
var T = [E, w].map(function(R) {
|
|
15940
|
+
return Math.max(0, Math.min(O.data.length, R - 1));
|
|
15937
15941
|
}), S = s(T, 2);
|
|
15938
15942
|
return E = S[0], w = S[1], {
|
|
15939
15943
|
startNode: O,
|
|
@@ -16291,7 +16295,7 @@ var vc = { exports: {} };
|
|
|
16291
16295
|
Object.defineProperty(n, "__esModule", {
|
|
16292
16296
|
value: !0
|
|
16293
16297
|
});
|
|
16294
|
-
var s = i(0), a = F(s), o = i(5), l = F(o), c = i(4), f = F(c), h = i(16), u = F(h), d = i(25), p = F(d), m = i(24), b = F(m), v = i(35), g = F(v), _ = i(6), y = F(_), x = i(22), O = F(x), E = i(7), w = F(E), N = i(55), A = F(N), T = i(42), S = F(T),
|
|
16298
|
+
var s = i(0), a = F(s), o = i(5), l = F(o), c = i(4), f = F(c), h = i(16), u = F(h), d = i(25), p = F(d), m = i(24), b = F(m), v = i(35), g = F(v), _ = i(6), y = F(_), x = i(22), O = F(x), E = i(7), w = F(E), N = i(55), A = F(N), T = i(42), S = F(T), R = i(23), C = F(R);
|
|
16295
16299
|
function F(G) {
|
|
16296
16300
|
return G && G.__esModule ? G : { default: G };
|
|
16297
16301
|
}
|
|
@@ -16988,25 +16992,25 @@ var vc = { exports: {} };
|
|
|
16988
16992
|
}), n.default = n.BaseTooltip = void 0;
|
|
16989
16993
|
var s = function() {
|
|
16990
16994
|
function k(L, $) {
|
|
16991
|
-
for (var
|
|
16992
|
-
var M = $[
|
|
16995
|
+
for (var D = 0; D < $.length; D++) {
|
|
16996
|
+
var M = $[D];
|
|
16993
16997
|
M.enumerable = M.enumerable || !1, M.configurable = !0, "value" in M && (M.writable = !0), Object.defineProperty(L, M.key, M);
|
|
16994
16998
|
}
|
|
16995
16999
|
}
|
|
16996
|
-
return function(L, $,
|
|
16997
|
-
return $ && k(L.prototype, $),
|
|
17000
|
+
return function(L, $, D) {
|
|
17001
|
+
return $ && k(L.prototype, $), D && k(L, D), L;
|
|
16998
17002
|
};
|
|
16999
|
-
}(), a = function k(L, $,
|
|
17003
|
+
}(), a = function k(L, $, D) {
|
|
17000
17004
|
L === null && (L = Function.prototype);
|
|
17001
17005
|
var M = Object.getOwnPropertyDescriptor(L, $);
|
|
17002
17006
|
if (M === void 0) {
|
|
17003
17007
|
var B = Object.getPrototypeOf(L);
|
|
17004
|
-
return B === null ? void 0 : k(B, $,
|
|
17008
|
+
return B === null ? void 0 : k(B, $, D);
|
|
17005
17009
|
} else {
|
|
17006
17010
|
if ("value" in M)
|
|
17007
17011
|
return M.value;
|
|
17008
17012
|
var q = M.get;
|
|
17009
|
-
return q === void 0 ? void 0 : q.call(
|
|
17013
|
+
return q === void 0 ? void 0 : q.call(D);
|
|
17010
17014
|
}
|
|
17011
17015
|
}, o = i(3), l = N(o), c = i(2), f = N(c), h = i(8), u = N(h), d = i(23), p = N(d), m = i(34), b = N(m), v = i(59), g = N(v), _ = i(60), y = N(_), x = i(28), O = N(x), E = i(61), w = N(E);
|
|
17012
17016
|
function N(k) {
|
|
@@ -17026,11 +17030,11 @@ var vc = { exports: {} };
|
|
|
17026
17030
|
throw new TypeError("Super expression must either be null or a function, not " + typeof L);
|
|
17027
17031
|
k.prototype = Object.create(L && L.prototype, { constructor: { value: k, enumerable: !1, writable: !0, configurable: !0 } }), L && (Object.setPrototypeOf ? Object.setPrototypeOf(k, L) : k.__proto__ = L);
|
|
17028
17032
|
}
|
|
17029
|
-
var
|
|
17033
|
+
var R = [!1, "center", "right", "justify"], C = ["#000000", "#e60000", "#ff9900", "#ffff00", "#008a00", "#0066cc", "#9933ff", "#ffffff", "#facccc", "#ffebcc", "#ffffcc", "#cce8cc", "#cce0f5", "#ebd6ff", "#bbbbbb", "#f06666", "#ffc266", "#ffff66", "#66b966", "#66a3e0", "#c285ff", "#888888", "#a10000", "#b26b00", "#b2b200", "#006100", "#0047b2", "#6b24b2", "#444444", "#5c0000", "#663d00", "#666600", "#003700", "#002966", "#3d1466"], F = [!1, "serif", "monospace"], G = ["1", "2", "3", !1], U = ["small", !1, "large", "huge"], X = function(k) {
|
|
17030
17034
|
S(L, k);
|
|
17031
|
-
function L($,
|
|
17035
|
+
function L($, D) {
|
|
17032
17036
|
A(this, L);
|
|
17033
|
-
var M = T(this, (L.__proto__ || Object.getPrototypeOf(L)).call(this, $,
|
|
17037
|
+
var M = T(this, (L.__proto__ || Object.getPrototypeOf(L)).call(this, $, D)), B = function q(H) {
|
|
17034
17038
|
if (!document.body.contains($.root))
|
|
17035
17039
|
return document.body.removeEventListener("click", q);
|
|
17036
17040
|
M.tooltip != null && !M.tooltip.root.contains(H.target) && document.activeElement !== M.tooltip.textbox && !M.quill.hasFocus() && M.tooltip.hide(), M.pickers != null && M.pickers.forEach(function(z) {
|
|
@@ -17041,14 +17045,14 @@ var vc = { exports: {} };
|
|
|
17041
17045
|
}
|
|
17042
17046
|
return s(L, [{
|
|
17043
17047
|
key: "addModule",
|
|
17044
|
-
value: function(
|
|
17045
|
-
var M = a(L.prototype.__proto__ || Object.getPrototypeOf(L.prototype), "addModule", this).call(this,
|
|
17046
|
-
return
|
|
17048
|
+
value: function(D) {
|
|
17049
|
+
var M = a(L.prototype.__proto__ || Object.getPrototypeOf(L.prototype), "addModule", this).call(this, D);
|
|
17050
|
+
return D === "toolbar" && this.extendToolbar(M), M;
|
|
17047
17051
|
}
|
|
17048
17052
|
}, {
|
|
17049
17053
|
key: "buildButtons",
|
|
17050
|
-
value: function(
|
|
17051
|
-
|
|
17054
|
+
value: function(D, M) {
|
|
17055
|
+
D.forEach(function(B) {
|
|
17052
17056
|
var q = B.getAttribute("class") || "";
|
|
17053
17057
|
q.split(/\s+/).forEach(function(H) {
|
|
17054
17058
|
if (H.startsWith("ql-") && (H = H.slice(3), M[H] != null))
|
|
@@ -17065,16 +17069,16 @@ var vc = { exports: {} };
|
|
|
17065
17069
|
}
|
|
17066
17070
|
}, {
|
|
17067
17071
|
key: "buildPickers",
|
|
17068
|
-
value: function(
|
|
17072
|
+
value: function(D, M) {
|
|
17069
17073
|
var B = this;
|
|
17070
|
-
this.pickers =
|
|
17074
|
+
this.pickers = D.map(function(H) {
|
|
17071
17075
|
if (H.classList.contains("ql-align"))
|
|
17072
|
-
return H.querySelector("option") == null &&
|
|
17076
|
+
return H.querySelector("option") == null && I(H, R), new y.default(H, M.align);
|
|
17073
17077
|
if (H.classList.contains("ql-background") || H.classList.contains("ql-color")) {
|
|
17074
17078
|
var z = H.classList.contains("ql-background") ? "background" : "color";
|
|
17075
|
-
return H.querySelector("option") == null &&
|
|
17079
|
+
return H.querySelector("option") == null && I(H, C, z === "background" ? "#ffffff" : "#000000"), new g.default(H, M[z]);
|
|
17076
17080
|
} else
|
|
17077
|
-
return H.querySelector("option") == null && (H.classList.contains("ql-font") ?
|
|
17081
|
+
return H.querySelector("option") == null && (H.classList.contains("ql-font") ? I(H, F) : H.classList.contains("ql-header") ? I(H, G) : H.classList.contains("ql-size") && I(H, U)), new O.default(H);
|
|
17078
17082
|
});
|
|
17079
17083
|
var q = function() {
|
|
17080
17084
|
B.pickers.forEach(function(z) {
|
|
@@ -17096,11 +17100,11 @@ var vc = { exports: {} };
|
|
|
17096
17100
|
var L = this, $ = this.container.querySelector("input.ql-image[type=file]");
|
|
17097
17101
|
$ == null && ($ = document.createElement("input"), $.setAttribute("type", "file"), $.setAttribute("accept", "image/png, image/gif, image/jpeg, image/bmp, image/x-icon"), $.classList.add("ql-image"), $.addEventListener("change", function() {
|
|
17098
17102
|
if ($.files != null && $.files[0] != null) {
|
|
17099
|
-
var
|
|
17100
|
-
|
|
17103
|
+
var D = new FileReader();
|
|
17104
|
+
D.onload = function(M) {
|
|
17101
17105
|
var B = L.quill.getSelection(!0);
|
|
17102
17106
|
L.quill.updateContents(new f.default().retain(B.index).delete(B.length).insert({ image: M.target.result }), u.default.sources.USER), L.quill.setSelection(B.index + 1, u.default.sources.SILENT), $.value = "";
|
|
17103
|
-
},
|
|
17107
|
+
}, D.readAsDataURL($.files[0]);
|
|
17104
17108
|
}
|
|
17105
17109
|
}), this.container.appendChild($)), $.click();
|
|
17106
17110
|
},
|
|
@@ -17111,19 +17115,19 @@ var vc = { exports: {} };
|
|
|
17111
17115
|
}
|
|
17112
17116
|
}
|
|
17113
17117
|
});
|
|
17114
|
-
var
|
|
17118
|
+
var j = function(k) {
|
|
17115
17119
|
S(L, k);
|
|
17116
|
-
function L($,
|
|
17120
|
+
function L($, D) {
|
|
17117
17121
|
A(this, L);
|
|
17118
|
-
var M = T(this, (L.__proto__ || Object.getPrototypeOf(L)).call(this, $,
|
|
17122
|
+
var M = T(this, (L.__proto__ || Object.getPrototypeOf(L)).call(this, $, D));
|
|
17119
17123
|
return M.textbox = M.root.querySelector('input[type="text"]'), M.listen(), M;
|
|
17120
17124
|
}
|
|
17121
17125
|
return s(L, [{
|
|
17122
17126
|
key: "listen",
|
|
17123
17127
|
value: function() {
|
|
17124
|
-
var
|
|
17128
|
+
var D = this;
|
|
17125
17129
|
this.textbox.addEventListener("keydown", function(M) {
|
|
17126
|
-
p.default.match(M, "enter") ? (
|
|
17130
|
+
p.default.match(M, "enter") ? (D.save(), M.preventDefault()) : p.default.match(M, "escape") && (D.cancel(), M.preventDefault());
|
|
17127
17131
|
});
|
|
17128
17132
|
}
|
|
17129
17133
|
}, {
|
|
@@ -17134,34 +17138,34 @@ var vc = { exports: {} };
|
|
|
17134
17138
|
}, {
|
|
17135
17139
|
key: "edit",
|
|
17136
17140
|
value: function() {
|
|
17137
|
-
var
|
|
17138
|
-
this.root.classList.remove("ql-hidden"), this.root.classList.add("ql-editing"), M != null ? this.textbox.value = M :
|
|
17141
|
+
var D = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "link", M = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null;
|
|
17142
|
+
this.root.classList.remove("ql-hidden"), this.root.classList.add("ql-editing"), M != null ? this.textbox.value = M : D !== this.root.getAttribute("data-mode") && (this.textbox.value = ""), this.position(this.quill.getBounds(this.quill.selection.savedRange)), this.textbox.select(), this.textbox.setAttribute("placeholder", this.textbox.getAttribute("data-" + D) || ""), this.root.setAttribute("data-mode", D);
|
|
17139
17143
|
}
|
|
17140
17144
|
}, {
|
|
17141
17145
|
key: "restoreFocus",
|
|
17142
17146
|
value: function() {
|
|
17143
|
-
var
|
|
17144
|
-
this.quill.focus(), this.quill.scrollingContainer.scrollTop =
|
|
17147
|
+
var D = this.quill.scrollingContainer.scrollTop;
|
|
17148
|
+
this.quill.focus(), this.quill.scrollingContainer.scrollTop = D;
|
|
17145
17149
|
}
|
|
17146
17150
|
}, {
|
|
17147
17151
|
key: "save",
|
|
17148
17152
|
value: function() {
|
|
17149
|
-
var
|
|
17153
|
+
var D = this.textbox.value;
|
|
17150
17154
|
switch (this.root.getAttribute("data-mode")) {
|
|
17151
17155
|
case "link": {
|
|
17152
17156
|
var M = this.quill.root.scrollTop;
|
|
17153
|
-
this.linkRange ? (this.quill.formatText(this.linkRange, "link",
|
|
17157
|
+
this.linkRange ? (this.quill.formatText(this.linkRange, "link", D, u.default.sources.USER), delete this.linkRange) : (this.restoreFocus(), this.quill.format("link", D, u.default.sources.USER)), this.quill.root.scrollTop = M;
|
|
17154
17158
|
break;
|
|
17155
17159
|
}
|
|
17156
17160
|
case "video":
|
|
17157
|
-
|
|
17161
|
+
D = P(D);
|
|
17158
17162
|
case "formula": {
|
|
17159
|
-
if (!
|
|
17163
|
+
if (!D)
|
|
17160
17164
|
break;
|
|
17161
17165
|
var B = this.quill.getSelection(!0);
|
|
17162
17166
|
if (B != null) {
|
|
17163
17167
|
var q = B.index + B.length;
|
|
17164
|
-
this.quill.insertEmbed(q, this.root.getAttribute("data-mode"),
|
|
17168
|
+
this.quill.insertEmbed(q, this.root.getAttribute("data-mode"), D, u.default.sources.USER), this.root.getAttribute("data-mode") === "formula" && this.quill.insertText(q + 1, " ", u.default.sources.USER), this.quill.setSelection(q + 2, u.default.sources.USER);
|
|
17165
17169
|
}
|
|
17166
17170
|
break;
|
|
17167
17171
|
}
|
|
@@ -17174,14 +17178,14 @@ var vc = { exports: {} };
|
|
|
17174
17178
|
var L = k.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/) || k.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);
|
|
17175
17179
|
return L ? (L[1] || "https") + "://www.youtube.com/embed/" + L[2] + "?showinfo=0" : (L = k.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/)) ? (L[1] || "https") + "://player.vimeo.com/video/" + L[2] + "/" : k;
|
|
17176
17180
|
}
|
|
17177
|
-
function
|
|
17181
|
+
function I(k, L) {
|
|
17178
17182
|
var $ = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
|
|
17179
|
-
L.forEach(function(
|
|
17183
|
+
L.forEach(function(D) {
|
|
17180
17184
|
var M = document.createElement("option");
|
|
17181
|
-
|
|
17185
|
+
D === $ ? M.setAttribute("selected", "selected") : M.setAttribute("value", D), k.appendChild(M);
|
|
17182
17186
|
});
|
|
17183
17187
|
}
|
|
17184
|
-
n.BaseTooltip =
|
|
17188
|
+
n.BaseTooltip = j, n.default = X;
|
|
17185
17189
|
},
|
|
17186
17190
|
/* 44 */
|
|
17187
17191
|
/***/
|
|
@@ -17608,41 +17612,41 @@ var vc = { exports: {} };
|
|
|
17608
17612
|
return [[i, y], [s, x]];
|
|
17609
17613
|
var A = d(y, x);
|
|
17610
17614
|
if (A) {
|
|
17611
|
-
var T = A[0], S = A[1],
|
|
17612
|
-
return G.concat([[a, F]],
|
|
17615
|
+
var T = A[0], S = A[1], R = A[2], C = A[3], F = A[4], G = o(T, R), U = o(S, C);
|
|
17616
|
+
return G.concat([[a, F]], U);
|
|
17613
17617
|
}
|
|
17614
17618
|
return c(y, x);
|
|
17615
17619
|
}
|
|
17616
17620
|
function c(y, x) {
|
|
17617
|
-
for (var O = y.length, E = x.length, w = Math.ceil((O + E) / 2), N = w, A = 2 * w, T = new Array(A), S = new Array(A),
|
|
17618
|
-
T[
|
|
17621
|
+
for (var O = y.length, E = x.length, w = Math.ceil((O + E) / 2), N = w, A = 2 * w, T = new Array(A), S = new Array(A), R = 0; R < A; R++)
|
|
17622
|
+
T[R] = -1, S[R] = -1;
|
|
17619
17623
|
T[N + 1] = 0, S[N + 1] = 0;
|
|
17620
|
-
for (var C = O - E, F = C % 2 != 0, G = 0,
|
|
17621
|
-
for (var
|
|
17622
|
-
var k = N +
|
|
17623
|
-
|
|
17624
|
-
for (var $ = L -
|
|
17624
|
+
for (var C = O - E, F = C % 2 != 0, G = 0, U = 0, X = 0, j = 0, P = 0; P < w; P++) {
|
|
17625
|
+
for (var I = -P + G; I <= P - U; I += 2) {
|
|
17626
|
+
var k = N + I, L;
|
|
17627
|
+
I == -P || I != P && T[k - 1] < T[k + 1] ? L = T[k + 1] : L = T[k - 1] + 1;
|
|
17628
|
+
for (var $ = L - I; L < O && $ < E && y.charAt(L) == x.charAt($); )
|
|
17625
17629
|
L++, $++;
|
|
17626
17630
|
if (T[k] = L, L > O)
|
|
17627
|
-
|
|
17631
|
+
U += 2;
|
|
17628
17632
|
else if ($ > E)
|
|
17629
17633
|
G += 2;
|
|
17630
17634
|
else if (F) {
|
|
17631
|
-
var
|
|
17632
|
-
if (
|
|
17633
|
-
var M = O - S[
|
|
17635
|
+
var D = N + C - I;
|
|
17636
|
+
if (D >= 0 && D < A && S[D] != -1) {
|
|
17637
|
+
var M = O - S[D];
|
|
17634
17638
|
if (L >= M)
|
|
17635
17639
|
return f(y, x, L, $);
|
|
17636
17640
|
}
|
|
17637
17641
|
}
|
|
17638
17642
|
}
|
|
17639
|
-
for (var B = -P + X; B <= P -
|
|
17640
|
-
var
|
|
17641
|
-
B == -P || B != P && S[
|
|
17643
|
+
for (var B = -P + X; B <= P - j; B += 2) {
|
|
17644
|
+
var D = N + B, M;
|
|
17645
|
+
B == -P || B != P && S[D - 1] < S[D + 1] ? M = S[D + 1] : M = S[D - 1] + 1;
|
|
17642
17646
|
for (var q = M - B; M < O && q < E && y.charAt(O - M - 1) == x.charAt(E - q - 1); )
|
|
17643
17647
|
M++, q++;
|
|
17644
|
-
if (S[
|
|
17645
|
-
|
|
17648
|
+
if (S[D] = M, M > O)
|
|
17649
|
+
j += 2;
|
|
17646
17650
|
else if (q > E)
|
|
17647
17651
|
X += 2;
|
|
17648
17652
|
else if (!F) {
|
|
@@ -17658,8 +17662,8 @@ var vc = { exports: {} };
|
|
|
17658
17662
|
return [[i, y], [s, x]];
|
|
17659
17663
|
}
|
|
17660
17664
|
function f(y, x, O, E) {
|
|
17661
|
-
var w = y.substring(0, O), N = x.substring(0, E), A = y.substring(O), T = x.substring(E), S = o(w, N),
|
|
17662
|
-
return S.concat(
|
|
17665
|
+
var w = y.substring(0, O), N = x.substring(0, E), A = y.substring(O), T = x.substring(E), S = o(w, N), R = o(A, T);
|
|
17666
|
+
return S.concat(R);
|
|
17663
17667
|
}
|
|
17664
17668
|
function h(y, x) {
|
|
17665
17669
|
if (!y || !x || y.charAt(0) != x.charAt(0))
|
|
@@ -17679,21 +17683,21 @@ var vc = { exports: {} };
|
|
|
17679
17683
|
var O = y.length > x.length ? y : x, E = y.length > x.length ? x : y;
|
|
17680
17684
|
if (O.length < 4 || E.length * 2 < O.length)
|
|
17681
17685
|
return null;
|
|
17682
|
-
function w(
|
|
17683
|
-
for (var P =
|
|
17686
|
+
function w(U, X, j) {
|
|
17687
|
+
for (var P = U.substring(j, j + Math.floor(U.length / 4)), I = -1, k = "", L, $, D, M; (I = X.indexOf(P, I + 1)) != -1; ) {
|
|
17684
17688
|
var B = h(
|
|
17685
|
-
|
|
17686
|
-
X.substring(
|
|
17689
|
+
U.substring(j),
|
|
17690
|
+
X.substring(I)
|
|
17687
17691
|
), q = u(
|
|
17688
|
-
|
|
17689
|
-
X.substring(0,
|
|
17692
|
+
U.substring(0, j),
|
|
17693
|
+
X.substring(0, I)
|
|
17690
17694
|
);
|
|
17691
|
-
k.length < q + B && (k = X.substring(
|
|
17695
|
+
k.length < q + B && (k = X.substring(I - q, I) + X.substring(I, I + B), L = U.substring(0, j - q), $ = U.substring(j + B), D = X.substring(0, I - q), M = X.substring(I + B));
|
|
17692
17696
|
}
|
|
17693
|
-
return k.length * 2 >=
|
|
17697
|
+
return k.length * 2 >= U.length ? [
|
|
17694
17698
|
L,
|
|
17695
17699
|
$,
|
|
17696
|
-
|
|
17700
|
+
D,
|
|
17697
17701
|
M,
|
|
17698
17702
|
k
|
|
17699
17703
|
] : null;
|
|
@@ -17710,10 +17714,10 @@ var vc = { exports: {} };
|
|
|
17710
17714
|
if (!N && !A)
|
|
17711
17715
|
return null;
|
|
17712
17716
|
A ? N ? T = N[4].length > A[4].length ? N : A : T = A : T = N;
|
|
17713
|
-
var S,
|
|
17714
|
-
y.length > x.length ? (S = T[0],
|
|
17717
|
+
var S, R, C, F;
|
|
17718
|
+
y.length > x.length ? (S = T[0], R = T[1], C = T[2], F = T[3]) : (C = T[0], F = T[1], S = T[2], R = T[3]);
|
|
17715
17719
|
var G = T[4];
|
|
17716
|
-
return [S,
|
|
17720
|
+
return [S, R, C, F, G];
|
|
17717
17721
|
}
|
|
17718
17722
|
function p(y) {
|
|
17719
17723
|
y.push([a, ""]);
|
|
@@ -17990,7 +17994,7 @@ var vc = { exports: {} };
|
|
|
17990
17994
|
function S(V) {
|
|
17991
17995
|
return V && V.__esModule ? V : { default: V };
|
|
17992
17996
|
}
|
|
17993
|
-
function
|
|
17997
|
+
function R(V, W, Z) {
|
|
17994
17998
|
return W in V ? Object.defineProperty(V, W, { value: Z, enumerable: !0, configurable: !0, writable: !0 }) : V[W] = Z, V;
|
|
17995
17999
|
}
|
|
17996
18000
|
function C(V, W) {
|
|
@@ -18007,16 +18011,16 @@ var vc = { exports: {} };
|
|
|
18007
18011
|
throw new TypeError("Super expression must either be null or a function, not " + typeof W);
|
|
18008
18012
|
V.prototype = Object.create(W && W.prototype, { constructor: { value: V, enumerable: !1, writable: !0, configurable: !0 } }), W && (Object.setPrototypeOf ? Object.setPrototypeOf(V, W) : V.__proto__ = W);
|
|
18009
18013
|
}
|
|
18010
|
-
var
|
|
18014
|
+
var U = (0, v.default)("quill:clipboard"), X = "__ql-matcher", j = [[Node.TEXT_NODE, St], [Node.TEXT_NODE, st], ["br", K], [Node.ELEMENT_NODE, st], [Node.ELEMENT_NODE, z], [Node.ELEMENT_NODE, ot], [Node.ELEMENT_NODE, H], [Node.ELEMENT_NODE, It], ["li", et], ["b", q.bind(q, "bold")], ["i", q.bind(q, "italic")], ["style", J]], P = [y.AlignAttribute, N.DirectionAttribute].reduce(function(V, W) {
|
|
18011
18015
|
return V[W.keyName] = W, V;
|
|
18012
|
-
}, {}),
|
|
18016
|
+
}, {}), I = [y.AlignStyle, x.BackgroundStyle, w.ColorStyle, N.DirectionStyle, A.FontStyle, T.SizeStyle].reduce(function(V, W) {
|
|
18013
18017
|
return V[W.keyName] = W, V;
|
|
18014
18018
|
}, {}), k = function(V) {
|
|
18015
18019
|
G(W, V);
|
|
18016
18020
|
function W(Z, Q) {
|
|
18017
18021
|
C(this, W);
|
|
18018
18022
|
var Y = F(this, (W.__proto__ || Object.getPrototypeOf(W)).call(this, Z, Q));
|
|
18019
|
-
return Y.quill.root.addEventListener("paste", Y.onPaste.bind(Y)), Y.container = Y.quill.addContainer("ql-clipboard"), Y.container.setAttribute("contenteditable", !0), Y.container.setAttribute("tabindex", -1), Y.matchers = [],
|
|
18023
|
+
return Y.quill.root.addEventListener("paste", Y.onPaste.bind(Y)), Y.container = Y.quill.addContainer("ql-clipboard"), Y.container.setAttribute("contenteditable", !0), Y.container.setAttribute("tabindex", -1), Y.matchers = [], j.concat(Y.options.matchers).forEach(function(ut) {
|
|
18020
18024
|
var ct = a(ut, 2), ft = ct[0], rt = ct[1];
|
|
18021
18025
|
!Q.matchVisual && rt === ot || Y.addMatcher(ft, rt);
|
|
18022
18026
|
}), Y;
|
|
@@ -18034,11 +18038,11 @@ var vc = { exports: {} };
|
|
|
18034
18038
|
var Y = this.quill.getFormat(this.quill.selection.savedRange.index);
|
|
18035
18039
|
if (Y[E.default.blotName]) {
|
|
18036
18040
|
var ut = this.container.innerText;
|
|
18037
|
-
return this.container.innerHTML = "", new h.default().insert(ut,
|
|
18041
|
+
return this.container.innerHTML = "", new h.default().insert(ut, R({}, E.default.blotName, Y[E.default.blotName]));
|
|
18038
18042
|
}
|
|
18039
18043
|
var ct = this.prepareMatching(), ft = a(ct, 2), rt = ft[0], At = ft[1], xt = B(this.container, rt, At);
|
|
18040
|
-
return
|
|
18041
|
-
`) && xt.ops[xt.ops.length - 1].attributes == null && (xt = xt.compose(new h.default().retain(xt.length() - 1).delete(1))),
|
|
18044
|
+
return D(xt, `
|
|
18045
|
+
`) && xt.ops[xt.ops.length - 1].attributes == null && (xt = xt.compose(new h.default().retain(xt.length() - 1).delete(1))), U.log("convert", this.container.innerHTML, xt), this.container.innerHTML = "", xt;
|
|
18042
18046
|
}
|
|
18043
18047
|
}, {
|
|
18044
18048
|
key: "dangerouslyPasteHTML",
|
|
@@ -18093,7 +18097,7 @@ var vc = { exports: {} };
|
|
|
18093
18097
|
return (typeof W > "u" ? "undefined" : s(W)) === "object" ? Object.keys(W).reduce(function(Q, Y) {
|
|
18094
18098
|
return L(Q, Y, W[Y]);
|
|
18095
18099
|
}, V) : V.reduce(function(Q, Y) {
|
|
18096
|
-
return Y.attributes && Y.attributes[W] ? Q.push(Y) : Q.insert(Y.insert, (0, c.default)({},
|
|
18100
|
+
return Y.attributes && Y.attributes[W] ? Q.push(Y) : Q.insert(Y.insert, (0, c.default)({}, R({}, W, Z), Y.attributes));
|
|
18097
18101
|
}, new h.default());
|
|
18098
18102
|
}
|
|
18099
18103
|
function $(V) {
|
|
@@ -18102,7 +18106,7 @@ var vc = { exports: {} };
|
|
|
18102
18106
|
var W = "__ql-computed-style";
|
|
18103
18107
|
return V[W] || (V[W] = window.getComputedStyle(V));
|
|
18104
18108
|
}
|
|
18105
|
-
function
|
|
18109
|
+
function D(V, W) {
|
|
18106
18110
|
for (var Z = "", Q = V.ops.length - 1; Q >= 0 && Z.length < W.length; --Q) {
|
|
18107
18111
|
var Y = V.ops[Q];
|
|
18108
18112
|
if (typeof Y.insert != "string")
|
|
@@ -18136,7 +18140,7 @@ var vc = { exports: {} };
|
|
|
18136
18140
|
var Z = d.default.Attributor.Attribute.keys(V), Q = d.default.Attributor.Class.keys(V), Y = d.default.Attributor.Style.keys(V), ut = {};
|
|
18137
18141
|
return Z.concat(Q).concat(Y).forEach(function(ct) {
|
|
18138
18142
|
var ft = d.default.query(ct, d.default.Scope.ATTRIBUTE);
|
|
18139
|
-
ft != null && (ut[ft.attrName] = ft.value(V), ut[ft.attrName]) || (ft = P[ct], ft != null && (ft.attrName === ct || ft.keyName === ct) && (ut[ft.attrName] = ft.value(V) || void 0), ft =
|
|
18143
|
+
ft != null && (ut[ft.attrName] = ft.value(V), ut[ft.attrName]) || (ft = P[ct], ft != null && (ft.attrName === ct || ft.keyName === ct) && (ut[ft.attrName] = ft.value(V) || void 0), ft = I[ct], ft != null && (ft.attrName === ct || ft.keyName === ct) && (ft = I[ct], ut[ft.attrName] = ft.value(V) || void 0));
|
|
18140
18144
|
}), Object.keys(ut).length > 0 && (W = L(W, ut)), W;
|
|
18141
18145
|
}
|
|
18142
18146
|
function z(V, W) {
|
|
@@ -18151,7 +18155,7 @@ var vc = { exports: {} };
|
|
|
18151
18155
|
return W;
|
|
18152
18156
|
}
|
|
18153
18157
|
function K(V, W) {
|
|
18154
|
-
return
|
|
18158
|
+
return D(W, `
|
|
18155
18159
|
`) || W.insert(`
|
|
18156
18160
|
`), W;
|
|
18157
18161
|
}
|
|
@@ -18160,7 +18164,7 @@ var vc = { exports: {} };
|
|
|
18160
18164
|
}
|
|
18161
18165
|
function et(V, W) {
|
|
18162
18166
|
var Z = d.default.query(V);
|
|
18163
|
-
if (Z == null || Z.blotName !== "list-item" || !
|
|
18167
|
+
if (Z == null || Z.blotName !== "list-item" || !D(W, `
|
|
18164
18168
|
`))
|
|
18165
18169
|
return W;
|
|
18166
18170
|
for (var Q = -1, Y = V.parentNode; !Y.classList.contains("ql-clipboard"); )
|
|
@@ -18168,12 +18172,12 @@ var vc = { exports: {} };
|
|
|
18168
18172
|
return Q <= 0 ? W : W.compose(new h.default().retain(W.length() - 1).retain(1, { indent: Q }));
|
|
18169
18173
|
}
|
|
18170
18174
|
function st(V, W) {
|
|
18171
|
-
return
|
|
18175
|
+
return D(W, `
|
|
18172
18176
|
`) || (M(V) || W.length() > 0 && V.nextSibling && M(V.nextSibling)) && W.insert(`
|
|
18173
18177
|
`), W;
|
|
18174
18178
|
}
|
|
18175
18179
|
function ot(V, W) {
|
|
18176
|
-
if (M(V) && V.nextElementSibling != null && !
|
|
18180
|
+
if (M(V) && V.nextElementSibling != null && !D(W, `
|
|
18177
18181
|
|
|
18178
18182
|
`)) {
|
|
18179
18183
|
var Z = V.offsetHeight + parseFloat($(V).marginTop) + parseFloat($(V).marginBottom);
|
|
@@ -18279,46 +18283,46 @@ var vc = { exports: {} };
|
|
|
18279
18283
|
value: !0
|
|
18280
18284
|
}), n.addControls = n.default = void 0;
|
|
18281
18285
|
var s = function() {
|
|
18282
|
-
function T(S,
|
|
18283
|
-
var C = [], F = !0, G = !1,
|
|
18286
|
+
function T(S, R) {
|
|
18287
|
+
var C = [], F = !0, G = !1, U = void 0;
|
|
18284
18288
|
try {
|
|
18285
|
-
for (var X = S[Symbol.iterator](),
|
|
18289
|
+
for (var X = S[Symbol.iterator](), j; !(F = (j = X.next()).done) && (C.push(j.value), !(R && C.length === R)); F = !0)
|
|
18286
18290
|
;
|
|
18287
18291
|
} catch (P) {
|
|
18288
|
-
G = !0,
|
|
18292
|
+
G = !0, U = P;
|
|
18289
18293
|
} finally {
|
|
18290
18294
|
try {
|
|
18291
18295
|
!F && X.return && X.return();
|
|
18292
18296
|
} finally {
|
|
18293
18297
|
if (G)
|
|
18294
|
-
throw
|
|
18298
|
+
throw U;
|
|
18295
18299
|
}
|
|
18296
18300
|
}
|
|
18297
18301
|
return C;
|
|
18298
18302
|
}
|
|
18299
|
-
return function(S,
|
|
18303
|
+
return function(S, R) {
|
|
18300
18304
|
if (Array.isArray(S))
|
|
18301
18305
|
return S;
|
|
18302
18306
|
if (Symbol.iterator in Object(S))
|
|
18303
|
-
return T(S,
|
|
18307
|
+
return T(S, R);
|
|
18304
18308
|
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
|
18305
18309
|
};
|
|
18306
18310
|
}(), a = function() {
|
|
18307
|
-
function T(S,
|
|
18308
|
-
for (var C = 0; C <
|
|
18309
|
-
var F =
|
|
18311
|
+
function T(S, R) {
|
|
18312
|
+
for (var C = 0; C < R.length; C++) {
|
|
18313
|
+
var F = R[C];
|
|
18310
18314
|
F.enumerable = F.enumerable || !1, F.configurable = !0, "value" in F && (F.writable = !0), Object.defineProperty(S, F.key, F);
|
|
18311
18315
|
}
|
|
18312
18316
|
}
|
|
18313
|
-
return function(S,
|
|
18314
|
-
return
|
|
18317
|
+
return function(S, R, C) {
|
|
18318
|
+
return R && T(S.prototype, R), C && T(S, C), S;
|
|
18315
18319
|
};
|
|
18316
18320
|
}(), o = i(2), l = v(o), c = i(0), f = v(c), h = i(5), u = v(h), d = i(10), p = v(d), m = i(9), b = v(m);
|
|
18317
18321
|
function v(T) {
|
|
18318
18322
|
return T && T.__esModule ? T : { default: T };
|
|
18319
18323
|
}
|
|
18320
|
-
function g(T, S,
|
|
18321
|
-
return S in T ? Object.defineProperty(T, S, { value:
|
|
18324
|
+
function g(T, S, R) {
|
|
18325
|
+
return S in T ? Object.defineProperty(T, S, { value: R, enumerable: !0, configurable: !0, writable: !0 }) : T[S] = R, T;
|
|
18322
18326
|
}
|
|
18323
18327
|
function _(T, S) {
|
|
18324
18328
|
if (!(T instanceof S))
|
|
@@ -18336,26 +18340,26 @@ var vc = { exports: {} };
|
|
|
18336
18340
|
}
|
|
18337
18341
|
var O = (0, p.default)("quill:toolbar"), E = function(T) {
|
|
18338
18342
|
x(S, T);
|
|
18339
|
-
function S(
|
|
18343
|
+
function S(R, C) {
|
|
18340
18344
|
_(this, S);
|
|
18341
|
-
var F = y(this, (S.__proto__ || Object.getPrototypeOf(S)).call(this,
|
|
18345
|
+
var F = y(this, (S.__proto__ || Object.getPrototypeOf(S)).call(this, R, C));
|
|
18342
18346
|
if (Array.isArray(F.options.container)) {
|
|
18343
18347
|
var G = document.createElement("div");
|
|
18344
|
-
N(G, F.options.container),
|
|
18348
|
+
N(G, F.options.container), R.container.parentNode.insertBefore(G, R.container), F.container = G;
|
|
18345
18349
|
} else
|
|
18346
18350
|
typeof F.options.container == "string" ? F.container = document.querySelector(F.options.container) : F.container = F.options.container;
|
|
18347
18351
|
if (!(F.container instanceof HTMLElement)) {
|
|
18348
|
-
var
|
|
18349
|
-
return
|
|
18352
|
+
var U;
|
|
18353
|
+
return U = O.error("Container required for toolbar", F.options), y(F, U);
|
|
18350
18354
|
}
|
|
18351
18355
|
return F.container.classList.add("ql-toolbar"), F.controls = [], F.handlers = {}, Object.keys(F.options.handlers).forEach(function(X) {
|
|
18352
18356
|
F.addHandler(X, F.options.handlers[X]);
|
|
18353
18357
|
}), [].forEach.call(F.container.querySelectorAll("button, select"), function(X) {
|
|
18354
18358
|
F.attach(X);
|
|
18355
|
-
}), F.quill.on(u.default.events.EDITOR_CHANGE, function(X,
|
|
18356
|
-
X === u.default.events.SELECTION_CHANGE && F.update(
|
|
18359
|
+
}), F.quill.on(u.default.events.EDITOR_CHANGE, function(X, j) {
|
|
18360
|
+
X === u.default.events.SELECTION_CHANGE && F.update(j);
|
|
18357
18361
|
}), F.quill.on(u.default.events.SCROLL_OPTIMIZE, function() {
|
|
18358
|
-
var X = F.quill.selection.getRange(),
|
|
18362
|
+
var X = F.quill.selection.getRange(), j = s(X, 1), P = j[0];
|
|
18359
18363
|
F.update(P);
|
|
18360
18364
|
}), F;
|
|
18361
18365
|
}
|
|
@@ -18381,26 +18385,26 @@ var vc = { exports: {} };
|
|
|
18381
18385
|
return;
|
|
18382
18386
|
}
|
|
18383
18387
|
}
|
|
18384
|
-
var
|
|
18385
|
-
C.addEventListener(
|
|
18386
|
-
var
|
|
18388
|
+
var U = C.tagName === "SELECT" ? "change" : "click";
|
|
18389
|
+
C.addEventListener(U, function(X) {
|
|
18390
|
+
var j = void 0;
|
|
18387
18391
|
if (C.tagName === "SELECT") {
|
|
18388
18392
|
if (C.selectedIndex < 0)
|
|
18389
18393
|
return;
|
|
18390
18394
|
var P = C.options[C.selectedIndex];
|
|
18391
|
-
P.hasAttribute("selected") ?
|
|
18395
|
+
P.hasAttribute("selected") ? j = !1 : j = P.value || !1;
|
|
18392
18396
|
} else
|
|
18393
|
-
C.classList.contains("ql-active") ?
|
|
18397
|
+
C.classList.contains("ql-active") ? j = !1 : j = C.value || !C.hasAttribute("value"), X.preventDefault();
|
|
18394
18398
|
F.quill.focus();
|
|
18395
|
-
var
|
|
18399
|
+
var I = F.quill.selection.getRange(), k = s(I, 1), L = k[0];
|
|
18396
18400
|
if (F.handlers[G] != null)
|
|
18397
|
-
F.handlers[G].call(F,
|
|
18401
|
+
F.handlers[G].call(F, j);
|
|
18398
18402
|
else if (f.default.query(G).prototype instanceof f.default.Embed) {
|
|
18399
|
-
if (
|
|
18403
|
+
if (j = prompt("Enter " + G), !j)
|
|
18400
18404
|
return;
|
|
18401
|
-
F.quill.updateContents(new l.default().retain(L.index).delete(L.length).insert(g({}, G,
|
|
18405
|
+
F.quill.updateContents(new l.default().retain(L.index).delete(L.length).insert(g({}, G, j)), u.default.sources.USER);
|
|
18402
18406
|
} else
|
|
18403
|
-
F.quill.format(G,
|
|
18407
|
+
F.quill.format(G, j, u.default.sources.USER);
|
|
18404
18408
|
F.update(L);
|
|
18405
18409
|
}), this.controls.push([G, C]);
|
|
18406
18410
|
}
|
|
@@ -18410,50 +18414,50 @@ var vc = { exports: {} };
|
|
|
18410
18414
|
value: function(C) {
|
|
18411
18415
|
var F = C == null ? {} : this.quill.getFormat(C);
|
|
18412
18416
|
this.controls.forEach(function(G) {
|
|
18413
|
-
var
|
|
18414
|
-
if (
|
|
18417
|
+
var U = s(G, 2), X = U[0], j = U[1];
|
|
18418
|
+
if (j.tagName === "SELECT") {
|
|
18415
18419
|
var P = void 0;
|
|
18416
18420
|
if (C == null)
|
|
18417
18421
|
P = null;
|
|
18418
18422
|
else if (F[X] == null)
|
|
18419
|
-
P =
|
|
18423
|
+
P = j.querySelector("option[selected]");
|
|
18420
18424
|
else if (!Array.isArray(F[X])) {
|
|
18421
|
-
var
|
|
18422
|
-
typeof
|
|
18425
|
+
var I = F[X];
|
|
18426
|
+
typeof I == "string" && (I = I.replace(/\"/g, '\\"')), P = j.querySelector('option[value="' + I + '"]');
|
|
18423
18427
|
}
|
|
18424
|
-
P == null ? (
|
|
18428
|
+
P == null ? (j.value = "", j.selectedIndex = -1) : P.selected = !0;
|
|
18425
18429
|
} else if (C == null)
|
|
18426
|
-
|
|
18427
|
-
else if (
|
|
18428
|
-
var k = F[X] ===
|
|
18429
|
-
|
|
18430
|
+
j.classList.remove("ql-active");
|
|
18431
|
+
else if (j.hasAttribute("value")) {
|
|
18432
|
+
var k = F[X] === j.getAttribute("value") || F[X] != null && F[X].toString() === j.getAttribute("value") || F[X] == null && !j.getAttribute("value");
|
|
18433
|
+
j.classList.toggle("ql-active", k);
|
|
18430
18434
|
} else
|
|
18431
|
-
|
|
18435
|
+
j.classList.toggle("ql-active", F[X] != null);
|
|
18432
18436
|
});
|
|
18433
18437
|
}
|
|
18434
18438
|
}]), S;
|
|
18435
18439
|
}(b.default);
|
|
18436
18440
|
E.DEFAULTS = {};
|
|
18437
|
-
function w(T, S,
|
|
18441
|
+
function w(T, S, R) {
|
|
18438
18442
|
var C = document.createElement("button");
|
|
18439
|
-
C.setAttribute("type", "button"), C.classList.add("ql-" + S),
|
|
18443
|
+
C.setAttribute("type", "button"), C.classList.add("ql-" + S), R != null && (C.value = R), T.appendChild(C);
|
|
18440
18444
|
}
|
|
18441
18445
|
function N(T, S) {
|
|
18442
|
-
Array.isArray(S[0]) || (S = [S]), S.forEach(function(
|
|
18446
|
+
Array.isArray(S[0]) || (S = [S]), S.forEach(function(R) {
|
|
18443
18447
|
var C = document.createElement("span");
|
|
18444
|
-
C.classList.add("ql-formats"),
|
|
18448
|
+
C.classList.add("ql-formats"), R.forEach(function(F) {
|
|
18445
18449
|
if (typeof F == "string")
|
|
18446
18450
|
w(C, F);
|
|
18447
18451
|
else {
|
|
18448
|
-
var G = Object.keys(F)[0],
|
|
18449
|
-
Array.isArray(
|
|
18452
|
+
var G = Object.keys(F)[0], U = F[G];
|
|
18453
|
+
Array.isArray(U) ? A(C, G, U) : w(C, G, U);
|
|
18450
18454
|
}
|
|
18451
18455
|
}), T.appendChild(C);
|
|
18452
18456
|
});
|
|
18453
18457
|
}
|
|
18454
|
-
function A(T, S,
|
|
18458
|
+
function A(T, S, R) {
|
|
18455
18459
|
var C = document.createElement("select");
|
|
18456
|
-
C.classList.add("ql-" + S),
|
|
18460
|
+
C.classList.add("ql-" + S), R.forEach(function(F) {
|
|
18457
18461
|
var G = document.createElement("option");
|
|
18458
18462
|
F !== !1 ? G.setAttribute("value", F) : G.setAttribute("selected", "selected"), C.appendChild(G);
|
|
18459
18463
|
}), T.appendChild(C);
|
|
@@ -18462,22 +18466,22 @@ var vc = { exports: {} };
|
|
|
18462
18466
|
container: null,
|
|
18463
18467
|
handlers: {
|
|
18464
18468
|
clean: function() {
|
|
18465
|
-
var S = this,
|
|
18466
|
-
if (
|
|
18467
|
-
if (
|
|
18469
|
+
var S = this, R = this.quill.getSelection();
|
|
18470
|
+
if (R != null)
|
|
18471
|
+
if (R.length == 0) {
|
|
18468
18472
|
var C = this.quill.getFormat();
|
|
18469
18473
|
Object.keys(C).forEach(function(F) {
|
|
18470
18474
|
f.default.query(F, f.default.Scope.INLINE) != null && S.quill.format(F, !1);
|
|
18471
18475
|
});
|
|
18472
18476
|
} else
|
|
18473
|
-
this.quill.removeFormat(
|
|
18477
|
+
this.quill.removeFormat(R, u.default.sources.USER);
|
|
18474
18478
|
},
|
|
18475
18479
|
direction: function(S) {
|
|
18476
|
-
var
|
|
18477
|
-
S === "rtl" &&
|
|
18480
|
+
var R = this.quill.getFormat().align;
|
|
18481
|
+
S === "rtl" && R == null ? this.quill.format("align", "right", u.default.sources.USER) : !S && R === "right" && this.quill.format("align", !1, u.default.sources.USER), this.quill.format("direction", S, u.default.sources.USER);
|
|
18478
18482
|
},
|
|
18479
18483
|
indent: function(S) {
|
|
18480
|
-
var
|
|
18484
|
+
var R = this.quill.getSelection(), C = this.quill.getFormat(R), F = parseInt(C.indent || 0);
|
|
18481
18485
|
if (S === "+1" || S === "-1") {
|
|
18482
18486
|
var G = S === "+1" ? 1 : -1;
|
|
18483
18487
|
C.direction === "rtl" && (G *= -1), this.quill.format("indent", F + G, u.default.sources.USER);
|
|
@@ -18487,7 +18491,7 @@ var vc = { exports: {} };
|
|
|
18487
18491
|
S === !0 && (S = prompt("Enter link URL:")), this.quill.format("link", S, u.default.sources.USER);
|
|
18488
18492
|
},
|
|
18489
18493
|
list: function(S) {
|
|
18490
|
-
var
|
|
18494
|
+
var R = this.quill.getSelection(), C = this.quill.getFormat(R);
|
|
18491
18495
|
S === "check" ? C.list === "checked" || C.list === "unchecked" ? this.quill.format("list", !1, u.default.sources.USER) : this.quill.format("list", "unchecked", u.default.sources.USER) : this.quill.format("list", S, u.default.sources.USER);
|
|
18492
18496
|
}
|
|
18493
18497
|
}
|
|
@@ -18696,21 +18700,21 @@ var vc = { exports: {} };
|
|
|
18696
18700
|
});
|
|
18697
18701
|
var s = function() {
|
|
18698
18702
|
function A(T, S) {
|
|
18699
|
-
var
|
|
18703
|
+
var R = [], C = !0, F = !1, G = void 0;
|
|
18700
18704
|
try {
|
|
18701
|
-
for (var
|
|
18705
|
+
for (var U = T[Symbol.iterator](), X; !(C = (X = U.next()).done) && (R.push(X.value), !(S && R.length === S)); C = !0)
|
|
18702
18706
|
;
|
|
18703
|
-
} catch (
|
|
18704
|
-
F = !0, G =
|
|
18707
|
+
} catch (j) {
|
|
18708
|
+
F = !0, G = j;
|
|
18705
18709
|
} finally {
|
|
18706
18710
|
try {
|
|
18707
|
-
!C &&
|
|
18711
|
+
!C && U.return && U.return();
|
|
18708
18712
|
} finally {
|
|
18709
18713
|
if (F)
|
|
18710
18714
|
throw G;
|
|
18711
18715
|
}
|
|
18712
18716
|
}
|
|
18713
|
-
return
|
|
18717
|
+
return R;
|
|
18714
18718
|
}
|
|
18715
18719
|
return function(T, S) {
|
|
18716
18720
|
if (Array.isArray(T))
|
|
@@ -18719,27 +18723,27 @@ var vc = { exports: {} };
|
|
|
18719
18723
|
return A(T, S);
|
|
18720
18724
|
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
|
18721
18725
|
};
|
|
18722
|
-
}(), a = function A(T, S,
|
|
18726
|
+
}(), a = function A(T, S, R) {
|
|
18723
18727
|
T === null && (T = Function.prototype);
|
|
18724
18728
|
var C = Object.getOwnPropertyDescriptor(T, S);
|
|
18725
18729
|
if (C === void 0) {
|
|
18726
18730
|
var F = Object.getPrototypeOf(T);
|
|
18727
|
-
return F === null ? void 0 : A(F, S,
|
|
18731
|
+
return F === null ? void 0 : A(F, S, R);
|
|
18728
18732
|
} else {
|
|
18729
18733
|
if ("value" in C)
|
|
18730
18734
|
return C.value;
|
|
18731
18735
|
var G = C.get;
|
|
18732
|
-
return G === void 0 ? void 0 : G.call(
|
|
18736
|
+
return G === void 0 ? void 0 : G.call(R);
|
|
18733
18737
|
}
|
|
18734
18738
|
}, o = function() {
|
|
18735
18739
|
function A(T, S) {
|
|
18736
|
-
for (var
|
|
18737
|
-
var C = S[
|
|
18740
|
+
for (var R = 0; R < S.length; R++) {
|
|
18741
|
+
var C = S[R];
|
|
18738
18742
|
C.enumerable = C.enumerable || !1, C.configurable = !0, "value" in C && (C.writable = !0), Object.defineProperty(T, C.key, C);
|
|
18739
18743
|
}
|
|
18740
18744
|
}
|
|
18741
|
-
return function(T, S,
|
|
18742
|
-
return S && A(T.prototype, S),
|
|
18745
|
+
return function(T, S, R) {
|
|
18746
|
+
return S && A(T.prototype, S), R && A(T, R), T;
|
|
18743
18747
|
};
|
|
18744
18748
|
}(), l = i(3), c = _(l), f = i(8), h = _(f), u = i(43), d = _(u), p = i(27), m = _(p), b = i(15), v = i(41), g = _(v);
|
|
18745
18749
|
function _(A) {
|
|
@@ -18761,16 +18765,16 @@ var vc = { exports: {} };
|
|
|
18761
18765
|
}
|
|
18762
18766
|
var E = [[{ header: ["1", "2", "3", !1] }], ["bold", "italic", "underline", "link"], [{ list: "ordered" }, { list: "bullet" }], ["clean"]], w = function(A) {
|
|
18763
18767
|
O(T, A);
|
|
18764
|
-
function T(S,
|
|
18765
|
-
y(this, T),
|
|
18766
|
-
var C = x(this, (T.__proto__ || Object.getPrototypeOf(T)).call(this, S,
|
|
18768
|
+
function T(S, R) {
|
|
18769
|
+
y(this, T), R.modules.toolbar != null && R.modules.toolbar.container == null && (R.modules.toolbar.container = E);
|
|
18770
|
+
var C = x(this, (T.__proto__ || Object.getPrototypeOf(T)).call(this, S, R));
|
|
18767
18771
|
return C.quill.container.classList.add("ql-snow"), C;
|
|
18768
18772
|
}
|
|
18769
18773
|
return o(T, [{
|
|
18770
18774
|
key: "extendToolbar",
|
|
18771
|
-
value: function(
|
|
18772
|
-
|
|
18773
|
-
|
|
18775
|
+
value: function(R) {
|
|
18776
|
+
R.container.classList.add("ql-snow"), this.buildButtons([].slice.call(R.container.querySelectorAll("button")), g.default), this.buildPickers([].slice.call(R.container.querySelectorAll("select")), g.default), this.tooltip = new N(this.quill, this.options.bounds), R.container.querySelector(".ql-link") && this.quill.keyboard.addBinding({ key: "K", shortKey: !0 }, function(C, F) {
|
|
18777
|
+
R.handlers.link.call(R, !F.format.link);
|
|
18774
18778
|
});
|
|
18775
18779
|
}
|
|
18776
18780
|
}]), T;
|
|
@@ -18784,10 +18788,10 @@ var vc = { exports: {} };
|
|
|
18784
18788
|
var S = this.quill.getSelection();
|
|
18785
18789
|
if (S == null || S.length == 0)
|
|
18786
18790
|
return;
|
|
18787
|
-
var
|
|
18788
|
-
/^\S+@\S+\.\S+$/.test(
|
|
18791
|
+
var R = this.quill.getText(S);
|
|
18792
|
+
/^\S+@\S+\.\S+$/.test(R) && R.indexOf("mailto:") !== 0 && (R = "mailto:" + R);
|
|
18789
18793
|
var C = this.quill.theme.tooltip;
|
|
18790
|
-
C.edit("link",
|
|
18794
|
+
C.edit("link", R);
|
|
18791
18795
|
} else
|
|
18792
18796
|
this.quill.format("link", !1);
|
|
18793
18797
|
}
|
|
@@ -18797,36 +18801,36 @@ var vc = { exports: {} };
|
|
|
18797
18801
|
});
|
|
18798
18802
|
var N = function(A) {
|
|
18799
18803
|
O(T, A);
|
|
18800
|
-
function T(S,
|
|
18804
|
+
function T(S, R) {
|
|
18801
18805
|
y(this, T);
|
|
18802
|
-
var C = x(this, (T.__proto__ || Object.getPrototypeOf(T)).call(this, S,
|
|
18806
|
+
var C = x(this, (T.__proto__ || Object.getPrototypeOf(T)).call(this, S, R));
|
|
18803
18807
|
return C.preview = C.root.querySelector("a.ql-preview"), C;
|
|
18804
18808
|
}
|
|
18805
18809
|
return o(T, [{
|
|
18806
18810
|
key: "listen",
|
|
18807
18811
|
value: function() {
|
|
18808
|
-
var
|
|
18812
|
+
var R = this;
|
|
18809
18813
|
a(T.prototype.__proto__ || Object.getPrototypeOf(T.prototype), "listen", this).call(this), this.root.querySelector("a.ql-action").addEventListener("click", function(C) {
|
|
18810
|
-
|
|
18814
|
+
R.root.classList.contains("ql-editing") ? R.save() : R.edit("link", R.preview.textContent), C.preventDefault();
|
|
18811
18815
|
}), this.root.querySelector("a.ql-remove").addEventListener("click", function(C) {
|
|
18812
|
-
if (
|
|
18813
|
-
var F =
|
|
18814
|
-
|
|
18816
|
+
if (R.linkRange != null) {
|
|
18817
|
+
var F = R.linkRange;
|
|
18818
|
+
R.restoreFocus(), R.quill.formatText(F, "link", !1, h.default.sources.USER), delete R.linkRange;
|
|
18815
18819
|
}
|
|
18816
|
-
C.preventDefault(),
|
|
18820
|
+
C.preventDefault(), R.hide();
|
|
18817
18821
|
}), this.quill.on(h.default.events.SELECTION_CHANGE, function(C, F, G) {
|
|
18818
18822
|
if (C != null) {
|
|
18819
18823
|
if (C.length === 0 && G === h.default.sources.USER) {
|
|
18820
|
-
var
|
|
18821
|
-
if (
|
|
18822
|
-
|
|
18823
|
-
var
|
|
18824
|
-
|
|
18824
|
+
var U = R.quill.scroll.descendant(m.default, C.index), X = s(U, 2), j = X[0], P = X[1];
|
|
18825
|
+
if (j != null) {
|
|
18826
|
+
R.linkRange = new b.Range(C.index - P, j.length());
|
|
18827
|
+
var I = m.default.formats(j.domNode);
|
|
18828
|
+
R.preview.textContent = I, R.preview.setAttribute("href", I), R.show(), R.position(R.quill.getBounds(R.linkRange));
|
|
18825
18829
|
return;
|
|
18826
18830
|
}
|
|
18827
18831
|
} else
|
|
18828
|
-
delete
|
|
18829
|
-
|
|
18832
|
+
delete R.linkRange;
|
|
18833
|
+
R.hide();
|
|
18830
18834
|
}
|
|
18831
18835
|
});
|
|
18832
18836
|
}
|
|
@@ -18845,7 +18849,7 @@ var vc = { exports: {} };
|
|
|
18845
18849
|
Object.defineProperty(n, "__esModule", {
|
|
18846
18850
|
value: !0
|
|
18847
18851
|
});
|
|
18848
|
-
var s = i(29), a = Y(s), o = i(36), l = i(38), c = i(64), f = i(65), h = Y(f), u = i(66), d = Y(u), p = i(67), m = Y(p), b = i(37), v = i(26), g = i(39), _ = i(40), y = i(56), x = Y(y), O = i(68), E = Y(O), w = i(27), N = Y(w), A = i(69), T = Y(A), S = i(70),
|
|
18852
|
+
var s = i(29), a = Y(s), o = i(36), l = i(38), c = i(64), f = i(65), h = Y(f), u = i(66), d = Y(u), p = i(67), m = Y(p), b = i(37), v = i(26), g = i(39), _ = i(40), y = i(56), x = Y(y), O = i(68), E = Y(O), w = i(27), N = Y(w), A = i(69), T = Y(A), S = i(70), R = Y(S), C = i(71), F = Y(C), G = i(72), U = Y(G), X = i(73), j = Y(X), P = i(13), I = Y(P), k = i(74), L = Y(k), $ = i(75), D = Y($), M = i(57), B = Y(M), q = i(41), H = Y(q), z = i(28), K = Y(z), J = i(59), et = Y(J), st = i(60), ot = Y(st), It = i(61), St = Y(It), V = i(108), W = Y(V), Z = i(62), Q = Y(Z);
|
|
18849
18853
|
function Y(ut) {
|
|
18850
18854
|
return ut && ut.__esModule ? ut : { default: ut };
|
|
18851
18855
|
}
|
|
@@ -18872,7 +18876,7 @@ var vc = { exports: {} };
|
|
|
18872
18876
|
"formats/font": g.FontClass,
|
|
18873
18877
|
"formats/size": _.SizeClass,
|
|
18874
18878
|
"formats/blockquote": h.default,
|
|
18875
|
-
"formats/code-block":
|
|
18879
|
+
"formats/code-block": I.default,
|
|
18876
18880
|
"formats/header": d.default,
|
|
18877
18881
|
"formats/list": m.default,
|
|
18878
18882
|
"formats/bold": x.default,
|
|
@@ -18880,13 +18884,13 @@ var vc = { exports: {} };
|
|
|
18880
18884
|
"formats/italic": E.default,
|
|
18881
18885
|
"formats/link": N.default,
|
|
18882
18886
|
"formats/script": T.default,
|
|
18883
|
-
"formats/strike":
|
|
18887
|
+
"formats/strike": R.default,
|
|
18884
18888
|
"formats/underline": F.default,
|
|
18885
|
-
"formats/image":
|
|
18886
|
-
"formats/video":
|
|
18889
|
+
"formats/image": U.default,
|
|
18890
|
+
"formats/video": j.default,
|
|
18887
18891
|
"formats/list/item": p.ListItem,
|
|
18888
18892
|
"modules/formula": L.default,
|
|
18889
|
-
"modules/syntax":
|
|
18893
|
+
"modules/syntax": D.default,
|
|
18890
18894
|
"modules/toolbar": B.default,
|
|
18891
18895
|
"themes/bubble": W.default,
|
|
18892
18896
|
"themes/snow": Q.default,
|
|
@@ -19907,8 +19911,8 @@ var vc = { exports: {} };
|
|
|
19907
19911
|
} else {
|
|
19908
19912
|
if ("value" in T)
|
|
19909
19913
|
return T.value;
|
|
19910
|
-
var
|
|
19911
|
-
return
|
|
19914
|
+
var R = T.get;
|
|
19915
|
+
return R === void 0 ? void 0 : R.call(A);
|
|
19912
19916
|
}
|
|
19913
19917
|
}, a = function() {
|
|
19914
19918
|
function E(w, N) {
|
|
@@ -19968,15 +19972,15 @@ var vc = { exports: {} };
|
|
|
19968
19972
|
function w(N, A) {
|
|
19969
19973
|
v(this, w);
|
|
19970
19974
|
var T = g(this, (w.__proto__ || Object.getPrototypeOf(w)).call(this, N, A));
|
|
19971
|
-
return T.quill.on(f.default.events.EDITOR_CHANGE, function(S,
|
|
19975
|
+
return T.quill.on(f.default.events.EDITOR_CHANGE, function(S, R, C, F) {
|
|
19972
19976
|
if (S === f.default.events.SELECTION_CHANGE)
|
|
19973
|
-
if (
|
|
19977
|
+
if (R != null && R.length > 0 && F === f.default.sources.USER) {
|
|
19974
19978
|
T.show(), T.root.style.left = "0px", T.root.style.width = "", T.root.style.width = T.root.offsetWidth + "px";
|
|
19975
|
-
var G = T.quill.getLines(
|
|
19979
|
+
var G = T.quill.getLines(R.index, R.length);
|
|
19976
19980
|
if (G.length === 1)
|
|
19977
|
-
T.position(T.quill.getBounds(
|
|
19981
|
+
T.position(T.quill.getBounds(R));
|
|
19978
19982
|
else {
|
|
19979
|
-
var
|
|
19983
|
+
var U = G[G.length - 1], X = T.quill.getIndex(U), j = Math.min(U.length() - 1, R.index + R.length - X), P = T.quill.getBounds(new d.Range(X, j));
|
|
19980
19984
|
T.position(P);
|
|
19981
19985
|
}
|
|
19982
19986
|
} else
|
|
@@ -20054,28 +20058,28 @@ const ew = (e) => {
|
|
|
20054
20058
|
fontStyle: T = "normal",
|
|
20055
20059
|
fontSize: S = 16,
|
|
20056
20060
|
// fill
|
|
20057
|
-
fill:
|
|
20061
|
+
fill: R = "black",
|
|
20058
20062
|
// stroke
|
|
20059
20063
|
stroke: C,
|
|
20060
20064
|
strokeThickness: F,
|
|
20061
20065
|
// drop shadow
|
|
20062
20066
|
blurRadius: G = 0,
|
|
20063
|
-
blurEnabled:
|
|
20067
|
+
blurEnabled: U = !1,
|
|
20064
20068
|
dropShadowColor: X = null,
|
|
20065
20069
|
// multiline
|
|
20066
|
-
wordWrapWidth:
|
|
20070
|
+
wordWrapWidth: j = 5e7,
|
|
20067
20071
|
leading: P = 0,
|
|
20068
|
-
letterSpacing:
|
|
20072
|
+
letterSpacing: I
|
|
20069
20073
|
} = u;
|
|
20070
20074
|
it.useEffect(() => {
|
|
20071
20075
|
o.current = Number(S);
|
|
20072
20076
|
}, [S]);
|
|
20073
20077
|
const k = ["italic", "oblique"].includes(T) ? T : void 0, L = ["bold", "lighter", "100", "200", "300"].includes(
|
|
20074
20078
|
A
|
|
20075
|
-
) ? A : void 0, $ = Number(
|
|
20079
|
+
) ? A : void 0, $ = Number(I) > 0 ? I : void 0, D = it.useMemo(() => new ce.TextStyle({
|
|
20076
20080
|
fontFamily: N,
|
|
20077
20081
|
fontSize: S,
|
|
20078
|
-
fill:
|
|
20082
|
+
fill: R || "white",
|
|
20079
20083
|
//[color, '#00ff99'], // gradient
|
|
20080
20084
|
stroke: C,
|
|
20081
20085
|
strokeThickness: F,
|
|
@@ -20086,7 +20090,7 @@ const ew = (e) => {
|
|
|
20086
20090
|
fontWeight: L
|
|
20087
20091
|
},
|
|
20088
20092
|
...$ && { letterSpacing: $ },
|
|
20089
|
-
...
|
|
20093
|
+
...U && {
|
|
20090
20094
|
dropShadow: !0,
|
|
20091
20095
|
dropShadowBlur: Number(G),
|
|
20092
20096
|
dropShadowColor: (X == null ? void 0 : X.toString()) || "black",
|
|
@@ -20095,13 +20099,13 @@ const ew = (e) => {
|
|
|
20095
20099
|
},
|
|
20096
20100
|
wordWrap: !0,
|
|
20097
20101
|
breakWords: !0,
|
|
20098
|
-
wordWrapWidth:
|
|
20102
|
+
wordWrapWidth: j || 500,
|
|
20099
20103
|
leading: P || 0
|
|
20100
20104
|
// lineHeight: lineHeight,
|
|
20101
20105
|
}), [
|
|
20102
|
-
|
|
20106
|
+
U,
|
|
20103
20107
|
G,
|
|
20104
|
-
|
|
20108
|
+
R,
|
|
20105
20109
|
N,
|
|
20106
20110
|
S,
|
|
20107
20111
|
P,
|
|
@@ -20111,7 +20115,7 @@ const ew = (e) => {
|
|
|
20111
20115
|
X,
|
|
20112
20116
|
C,
|
|
20113
20117
|
F,
|
|
20114
|
-
|
|
20118
|
+
j
|
|
20115
20119
|
]);
|
|
20116
20120
|
it.useEffect(() => {
|
|
20117
20121
|
l.current = {
|
|
@@ -20170,7 +20174,7 @@ const ew = (e) => {
|
|
|
20170
20174
|
/* @__PURE__ */ dt.jsx(Mt, { alpha: t ? 0 : 1, ref: a, children: /* @__PURE__ */ dt.jsx(
|
|
20171
20175
|
_c,
|
|
20172
20176
|
{
|
|
20173
|
-
style:
|
|
20177
|
+
style: D,
|
|
20174
20178
|
x: O,
|
|
20175
20179
|
y: E,
|
|
20176
20180
|
rotation: w,
|
|
@@ -20224,20 +20228,20 @@ const ew = (e) => {
|
|
|
20224
20228
|
frameEndAt: T,
|
|
20225
20229
|
transformation: {
|
|
20226
20230
|
x: S,
|
|
20227
|
-
y:
|
|
20231
|
+
y: R,
|
|
20228
20232
|
width: C,
|
|
20229
20233
|
height: F,
|
|
20230
20234
|
scale: G,
|
|
20231
|
-
rotation:
|
|
20235
|
+
rotation: U,
|
|
20232
20236
|
animation: X,
|
|
20233
|
-
colorCorrection:
|
|
20237
|
+
colorCorrection: j,
|
|
20234
20238
|
effect: P
|
|
20235
20239
|
},
|
|
20236
|
-
pointerdown:
|
|
20240
|
+
pointerdown: I,
|
|
20237
20241
|
pointerup: k,
|
|
20238
20242
|
mousedown: L,
|
|
20239
20243
|
mouseup: $,
|
|
20240
|
-
pointerover:
|
|
20244
|
+
pointerover: D,
|
|
20241
20245
|
mouseover: M,
|
|
20242
20246
|
mouseout: B,
|
|
20243
20247
|
applyTransformer: q,
|
|
@@ -20248,7 +20252,7 @@ const ew = (e) => {
|
|
|
20248
20252
|
exposure: et = 1,
|
|
20249
20253
|
blurRadius: st = 0,
|
|
20250
20254
|
alpha: ot = 1
|
|
20251
|
-
} =
|
|
20255
|
+
} = j || {}, It = {
|
|
20252
20256
|
brightness: et,
|
|
20253
20257
|
contrast: K,
|
|
20254
20258
|
saturation: J,
|
|
@@ -20324,7 +20328,7 @@ const ew = (e) => {
|
|
|
20324
20328
|
).from(f.current, { ...At }, w).to(
|
|
20325
20329
|
f.current,
|
|
20326
20330
|
{ alpha: 0, duration: 0.1, ...Re },
|
|
20327
|
-
Number(N) - 0.
|
|
20331
|
+
Number(N) - 0.09
|
|
20328
20332
|
), Qt(yt.from) ? Qt(yt.to) ? Qt(yt.fromTo) || v.current.fromTo(
|
|
20329
20333
|
f.current,
|
|
20330
20334
|
(lt = yt.fromTo) == null ? void 0 : lt.from,
|
|
@@ -20385,8 +20389,8 @@ const ew = (e) => {
|
|
|
20385
20389
|
{
|
|
20386
20390
|
ref: f,
|
|
20387
20391
|
alpha: b.current,
|
|
20388
|
-
position: [S,
|
|
20389
|
-
pivot: [S,
|
|
20392
|
+
position: [S, R],
|
|
20393
|
+
pivot: [S, R],
|
|
20390
20394
|
width: C,
|
|
20391
20395
|
height: F,
|
|
20392
20396
|
children: /* @__PURE__ */ dt.jsx(
|
|
@@ -20411,12 +20415,12 @@ const ew = (e) => {
|
|
|
20411
20415
|
height: F,
|
|
20412
20416
|
anchor: 0.5,
|
|
20413
20417
|
x: S,
|
|
20414
|
-
y:
|
|
20418
|
+
y: R,
|
|
20415
20419
|
...!O && !o && {
|
|
20416
20420
|
interactive: !0,
|
|
20417
20421
|
buttonMode: !0,
|
|
20418
|
-
pointerdown:
|
|
20419
|
-
pointerover:
|
|
20422
|
+
pointerdown: I,
|
|
20423
|
+
pointerover: D,
|
|
20420
20424
|
pointerout: B,
|
|
20421
20425
|
mousedown: L,
|
|
20422
20426
|
mouseover: M,
|
|
@@ -20426,7 +20430,7 @@ const ew = (e) => {
|
|
|
20426
20430
|
},
|
|
20427
20431
|
ref: c,
|
|
20428
20432
|
scale: G,
|
|
20429
|
-
rotation:
|
|
20433
|
+
rotation: U
|
|
20430
20434
|
}
|
|
20431
20435
|
) })
|
|
20432
20436
|
}
|