@leaflink/stash 51.12.7 → 51.12.9
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/DataViewToolbar.js +182 -82
- package/dist/DataViewToolbar.js.map +1 -1
- package/dist/DataViewToolbar.vue.d.ts +10 -0
- package/dist/MenuItem.js +27 -15
- package/dist/MenuItem.js.map +1 -1
- package/dist/MenuItem.vue.d.ts +38 -1
- package/dist/MoreActions.js +324 -346
- package/dist/MoreActions.js.map +1 -1
- package/dist/MoreActions.vue.d.ts +12 -37
- package/dist/PageNavigation.js +73 -40
- package/dist/PageNavigation.js.map +1 -1
- package/dist/Tab.js +1 -1
- package/dist/Tabs.js +3 -9
- package/dist/Tabs.js.map +1 -1
- package/dist/Tabs.vue.d.ts +1 -0
- package/dist/Tabs.vue_vue_type_script_setup_true_lang-B3Irnlcd.js +130 -0
- package/dist/Tabs.vue_vue_type_script_setup_true_lang-B3Irnlcd.js.map +1 -0
- package/dist/TextEditor.js +657 -654
- package/dist/TextEditor.js.map +1 -1
- package/dist/Tooltip.js +1 -1
- package/dist/components.css +1 -1
- package/dist/{index-DA_ft08e.js → index-C14LhAwV.js} +6 -6
- package/dist/{index-DA_ft08e.js.map → index-C14LhAwV.js.map} +1 -1
- package/dist/useSortable.js +1 -1
- package/package.json +1 -1
- package/dist/Tabs.vue_vue_type_script_setup_true_lang-CmnBP4i1.js +0 -159
- package/dist/Tabs.vue_vue_type_script_setup_true_lang-CmnBP4i1.js.map +0 -1
package/dist/TextEditor.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var ul = Object.defineProperty;
|
|
2
2
|
var hl = (i, t, e) => t in i ? ul(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
|
|
3
|
-
var
|
|
3
|
+
var _ = (i, t, e) => hl(i, typeof t != "symbol" ? t + "" : t, e);
|
|
4
4
|
import { defineComponent as fl, useCssModule as dl, ref as Vr, computed as tr, onMounted as gl, watch as Kr, onBeforeUnmount as pl, createBlock as hs, openBlock as Kt, mergeProps as ml, unref as Be, withCtx as er, createElementBlock as fs, createCommentVNode as sr, createElementVNode as bl, normalizeClass as ds, Fragment as nr, renderList as Gr } from "vue";
|
|
5
5
|
import { isEqual as _r, cloneDeep as He, merge as he } from "lodash-es";
|
|
6
6
|
import { c as ae, g as Si } from "./_commonjsHelpers-DaMA6jEr.js";
|
|
@@ -768,8 +768,8 @@ const wt = _l, Ol = {
|
|
|
768
768
|
throw new Error("[Parchment] Maximum optimize iterations reached");
|
|
769
769
|
for (c.forEach((h) => {
|
|
770
770
|
const m = this.find(h.target, !0);
|
|
771
|
-
m != null && (m.domNode === h.target && (h.type === "childList" ? (l(this.find(h.previousSibling, !1)), Array.from(h.addedNodes).forEach((
|
|
772
|
-
const g = this.find(
|
|
771
|
+
m != null && (m.domNode === h.target && (h.type === "childList" ? (l(this.find(h.previousSibling, !1)), Array.from(h.addedNodes).forEach((v) => {
|
|
772
|
+
const g = this.find(v, !1);
|
|
773
773
|
l(g, !1), g instanceof Dt && g.children.forEach((p) => {
|
|
774
774
|
l(p, !1);
|
|
775
775
|
});
|
|
@@ -860,20 +860,20 @@ function Dl() {
|
|
|
860
860
|
if (Qr) return ir;
|
|
861
861
|
Qr = 1;
|
|
862
862
|
var i = -1, t = 1, e = 0;
|
|
863
|
-
function s(d, L, b,
|
|
863
|
+
function s(d, L, b, C, S) {
|
|
864
864
|
if (d === L)
|
|
865
865
|
return d ? [[e, d]] : [];
|
|
866
866
|
if (b != null) {
|
|
867
|
-
var
|
|
868
|
-
if (
|
|
869
|
-
return
|
|
867
|
+
var w = _t(d, L, b);
|
|
868
|
+
if (w)
|
|
869
|
+
return w;
|
|
870
870
|
}
|
|
871
|
-
var
|
|
872
|
-
d = d.substring(
|
|
873
|
-
var U = d.substring(d.length -
|
|
874
|
-
d = d.substring(0, d.length -
|
|
875
|
-
var
|
|
876
|
-
return B &&
|
|
871
|
+
var k = c(d, L), B = d.substring(0, k);
|
|
872
|
+
d = d.substring(k), L = L.substring(k), k = h(d, L);
|
|
873
|
+
var U = d.substring(d.length - k);
|
|
874
|
+
d = d.substring(0, d.length - k), L = L.substring(0, L.length - k);
|
|
875
|
+
var O = n(d, L);
|
|
876
|
+
return B && O.unshift([e, B]), U && O.push([e, U]), q(O, S), C && v(O), O;
|
|
877
877
|
}
|
|
878
878
|
function n(d, L) {
|
|
879
879
|
var b;
|
|
@@ -881,42 +881,42 @@ function Dl() {
|
|
|
881
881
|
return [[t, L]];
|
|
882
882
|
if (!L)
|
|
883
883
|
return [[i, d]];
|
|
884
|
-
var
|
|
885
|
-
if (
|
|
884
|
+
var C = d.length > L.length ? d : L, S = d.length > L.length ? L : d, w = C.indexOf(S);
|
|
885
|
+
if (w !== -1)
|
|
886
886
|
return b = [
|
|
887
|
-
[t,
|
|
888
|
-
[e,
|
|
889
|
-
[t,
|
|
887
|
+
[t, C.substring(0, w)],
|
|
888
|
+
[e, S],
|
|
889
|
+
[t, C.substring(w + S.length)]
|
|
890
890
|
], d.length > L.length && (b[0][0] = b[2][0] = i), b;
|
|
891
|
-
if (
|
|
891
|
+
if (S.length === 1)
|
|
892
892
|
return [
|
|
893
893
|
[i, d],
|
|
894
894
|
[t, L]
|
|
895
895
|
];
|
|
896
|
-
var
|
|
897
|
-
if (
|
|
898
|
-
var B =
|
|
899
|
-
return G.concat([[e,
|
|
896
|
+
var k = m(d, L);
|
|
897
|
+
if (k) {
|
|
898
|
+
var B = k[0], U = k[1], O = k[2], V = k[3], F = k[4], G = s(B, O), Z = s(U, V);
|
|
899
|
+
return G.concat([[e, F]], Z);
|
|
900
900
|
}
|
|
901
901
|
return l(d, L);
|
|
902
902
|
}
|
|
903
903
|
function l(d, L) {
|
|
904
|
-
for (var b = d.length,
|
|
905
|
-
B[
|
|
906
|
-
B[
|
|
907
|
-
for (var
|
|
908
|
-
for (var
|
|
909
|
-
var Q =
|
|
910
|
-
|
|
911
|
-
for (var J = Y -
|
|
904
|
+
for (var b = d.length, C = L.length, S = Math.ceil((b + C) / 2), w = S, k = 2 * S, B = new Array(k), U = new Array(k), O = 0; O < k; O++)
|
|
905
|
+
B[O] = -1, U[O] = -1;
|
|
906
|
+
B[w + 1] = 0, U[w + 1] = 0;
|
|
907
|
+
for (var V = b - C, F = V % 2 !== 0, G = 0, Z = 0, j = 0, rt = 0, it = 0; it < S; it++) {
|
|
908
|
+
for (var K = -it + G; K <= it - Z; K += 2) {
|
|
909
|
+
var Q = w + K, Y;
|
|
910
|
+
K === -it || K !== it && B[Q - 1] < B[Q + 1] ? Y = B[Q + 1] : Y = B[Q - 1] + 1;
|
|
911
|
+
for (var J = Y - K; Y < b && J < C && d.charAt(Y) === L.charAt(J); )
|
|
912
912
|
Y++, J++;
|
|
913
913
|
if (B[Q] = Y, Y > b)
|
|
914
914
|
Z += 2;
|
|
915
|
-
else if (J >
|
|
915
|
+
else if (J > C)
|
|
916
916
|
G += 2;
|
|
917
|
-
else if (
|
|
918
|
-
var et =
|
|
919
|
-
if (et >= 0 && et <
|
|
917
|
+
else if (F) {
|
|
918
|
+
var et = w + V - K;
|
|
919
|
+
if (et >= 0 && et < k && U[et] !== -1) {
|
|
920
920
|
var st = b - U[et];
|
|
921
921
|
if (Y >= st)
|
|
922
922
|
return o(d, L, Y, J);
|
|
@@ -924,18 +924,18 @@ function Dl() {
|
|
|
924
924
|
}
|
|
925
925
|
}
|
|
926
926
|
for (var ot = -it + j; ot <= it - rt; ot += 2) {
|
|
927
|
-
var et =
|
|
927
|
+
var et = w + ot, st;
|
|
928
928
|
ot === -it || ot !== it && U[et - 1] < U[et + 1] ? st = U[et + 1] : st = U[et - 1] + 1;
|
|
929
|
-
for (var gt = st - ot; st < b && gt <
|
|
929
|
+
for (var gt = st - ot; st < b && gt < C && d.charAt(b - st - 1) === L.charAt(C - gt - 1); )
|
|
930
930
|
st++, gt++;
|
|
931
931
|
if (U[et] = st, st > b)
|
|
932
932
|
rt += 2;
|
|
933
|
-
else if (gt >
|
|
933
|
+
else if (gt > C)
|
|
934
934
|
j += 2;
|
|
935
|
-
else if (
|
|
936
|
-
var Q =
|
|
937
|
-
if (Q >= 0 && Q <
|
|
938
|
-
var Y = B[Q], J =
|
|
935
|
+
else if (!F) {
|
|
936
|
+
var Q = w + V - ot;
|
|
937
|
+
if (Q >= 0 && Q < k && B[Q] !== -1) {
|
|
938
|
+
var Y = B[Q], J = w + Y - Q;
|
|
939
939
|
if (st = b - st, Y >= st)
|
|
940
940
|
return o(d, L, Y, J);
|
|
941
941
|
}
|
|
@@ -947,53 +947,53 @@ function Dl() {
|
|
|
947
947
|
[t, L]
|
|
948
948
|
];
|
|
949
949
|
}
|
|
950
|
-
function o(d, L, b,
|
|
951
|
-
var
|
|
952
|
-
return U.concat(
|
|
950
|
+
function o(d, L, b, C) {
|
|
951
|
+
var S = d.substring(0, b), w = L.substring(0, C), k = d.substring(b), B = L.substring(C), U = s(S, w), O = s(k, B);
|
|
952
|
+
return U.concat(O);
|
|
953
953
|
}
|
|
954
954
|
function c(d, L) {
|
|
955
955
|
if (!d || !L || d.charAt(0) !== L.charAt(0))
|
|
956
956
|
return 0;
|
|
957
|
-
for (var b = 0,
|
|
958
|
-
d.substring(
|
|
959
|
-
return
|
|
957
|
+
for (var b = 0, C = Math.min(d.length, L.length), S = C, w = 0; b < S; )
|
|
958
|
+
d.substring(w, S) == L.substring(w, S) ? (b = S, w = b) : C = S, S = Math.floor((C - b) / 2 + b);
|
|
959
|
+
return R(d.charCodeAt(S - 1)) && S--, S;
|
|
960
960
|
}
|
|
961
961
|
function u(d, L) {
|
|
962
|
-
var b = d.length,
|
|
963
|
-
if (b == 0 ||
|
|
962
|
+
var b = d.length, C = L.length;
|
|
963
|
+
if (b == 0 || C == 0)
|
|
964
964
|
return 0;
|
|
965
|
-
b >
|
|
966
|
-
var
|
|
965
|
+
b > C ? d = d.substring(b - C) : b < C && (L = L.substring(0, b));
|
|
966
|
+
var S = Math.min(b, C);
|
|
967
967
|
if (d == L)
|
|
968
|
-
return
|
|
969
|
-
for (var
|
|
970
|
-
var B = d.substring(
|
|
968
|
+
return S;
|
|
969
|
+
for (var w = 0, k = 1; ; ) {
|
|
970
|
+
var B = d.substring(S - k), U = L.indexOf(B);
|
|
971
971
|
if (U == -1)
|
|
972
|
-
return
|
|
973
|
-
|
|
972
|
+
return w;
|
|
973
|
+
k += U, (U == 0 || d.substring(S - k) == L.substring(0, k)) && (w = k, k++);
|
|
974
974
|
}
|
|
975
975
|
}
|
|
976
976
|
function h(d, L) {
|
|
977
977
|
if (!d || !L || d.slice(-1) !== L.slice(-1))
|
|
978
978
|
return 0;
|
|
979
|
-
for (var b = 0,
|
|
980
|
-
d.substring(d.length -
|
|
981
|
-
return
|
|
979
|
+
for (var b = 0, C = Math.min(d.length, L.length), S = C, w = 0; b < S; )
|
|
980
|
+
d.substring(d.length - S, d.length - w) == L.substring(L.length - S, L.length - w) ? (b = S, w = b) : C = S, S = Math.floor((C - b) / 2 + b);
|
|
981
|
+
return $(d.charCodeAt(d.length - S)) && S--, S;
|
|
982
982
|
}
|
|
983
983
|
function m(d, L) {
|
|
984
|
-
var b = d.length > L.length ? d : L,
|
|
985
|
-
if (b.length < 4 ||
|
|
984
|
+
var b = d.length > L.length ? d : L, C = d.length > L.length ? L : d;
|
|
985
|
+
if (b.length < 4 || C.length * 2 < b.length)
|
|
986
986
|
return null;
|
|
987
|
-
function
|
|
988
|
-
for (var it = Z.substring(rt, rt + Math.floor(Z.length / 4)),
|
|
987
|
+
function S(Z, j, rt) {
|
|
988
|
+
for (var it = Z.substring(rt, rt + Math.floor(Z.length / 4)), K = -1, Q = "", Y, J, et, st; (K = j.indexOf(it, K + 1)) !== -1; ) {
|
|
989
989
|
var ot = c(
|
|
990
990
|
Z.substring(rt),
|
|
991
|
-
j.substring(
|
|
991
|
+
j.substring(K)
|
|
992
992
|
), gt = h(
|
|
993
993
|
Z.substring(0, rt),
|
|
994
|
-
j.substring(0,
|
|
994
|
+
j.substring(0, K)
|
|
995
995
|
);
|
|
996
|
-
Q.length < gt + ot && (Q = j.substring(
|
|
996
|
+
Q.length < gt + ot && (Q = j.substring(K - gt, K) + j.substring(K, K + ot), Y = Z.substring(0, rt - gt), J = Z.substring(rt + ot), et = j.substring(0, K - gt), st = j.substring(K + ot));
|
|
997
997
|
}
|
|
998
998
|
return Q.length * 2 >= Z.length ? [
|
|
999
999
|
Y,
|
|
@@ -1003,134 +1003,134 @@ function Dl() {
|
|
|
1003
1003
|
Q
|
|
1004
1004
|
] : null;
|
|
1005
1005
|
}
|
|
1006
|
-
var
|
|
1006
|
+
var w = S(
|
|
1007
1007
|
b,
|
|
1008
|
-
|
|
1008
|
+
C,
|
|
1009
1009
|
Math.ceil(b.length / 4)
|
|
1010
|
-
),
|
|
1010
|
+
), k = S(
|
|
1011
1011
|
b,
|
|
1012
|
-
|
|
1012
|
+
C,
|
|
1013
1013
|
Math.ceil(b.length / 2)
|
|
1014
1014
|
), B;
|
|
1015
|
-
if (!
|
|
1015
|
+
if (!w && !k)
|
|
1016
1016
|
return null;
|
|
1017
|
-
|
|
1018
|
-
var U,
|
|
1019
|
-
d.length > L.length ? (U = B[0],
|
|
1017
|
+
k ? w ? B = w[4].length > k[4].length ? w : k : B = k : B = w;
|
|
1018
|
+
var U, O, V, F;
|
|
1019
|
+
d.length > L.length ? (U = B[0], O = B[1], V = B[2], F = B[3]) : (V = B[0], F = B[1], U = B[2], O = B[3]);
|
|
1020
1020
|
var G = B[4];
|
|
1021
|
-
return [U,
|
|
1021
|
+
return [U, O, V, F, G];
|
|
1022
1022
|
}
|
|
1023
|
-
function
|
|
1024
|
-
for (var L = !1, b = [],
|
|
1025
|
-
d[
|
|
1023
|
+
function v(d) {
|
|
1024
|
+
for (var L = !1, b = [], C = 0, S = null, w = 0, k = 0, B = 0, U = 0, O = 0; w < d.length; )
|
|
1025
|
+
d[w][0] == e ? (b[C++] = w, k = U, B = O, U = 0, O = 0, S = d[w][1]) : (d[w][0] == t ? U += d[w][1].length : O += d[w][1].length, S && S.length <= Math.max(k, B) && S.length <= Math.max(U, O) && (d.splice(b[C - 1], 0, [
|
|
1026
1026
|
i,
|
|
1027
|
-
|
|
1028
|
-
]), d[b[
|
|
1029
|
-
for (L &&
|
|
1030
|
-
if (d[
|
|
1031
|
-
var
|
|
1032
|
-
G >= Z ? (G >=
|
|
1027
|
+
S
|
|
1028
|
+
]), d[b[C - 1] + 1][0] = t, C--, C--, w = C > 0 ? b[C - 1] : -1, k = 0, B = 0, U = 0, O = 0, S = null, L = !0)), w++;
|
|
1029
|
+
for (L && q(d), x(d), w = 1; w < d.length; ) {
|
|
1030
|
+
if (d[w - 1][0] == i && d[w][0] == t) {
|
|
1031
|
+
var V = d[w - 1][1], F = d[w][1], G = u(V, F), Z = u(F, V);
|
|
1032
|
+
G >= Z ? (G >= V.length / 2 || G >= F.length / 2) && (d.splice(w, 0, [
|
|
1033
1033
|
e,
|
|
1034
|
-
|
|
1035
|
-
]), d[
|
|
1034
|
+
F.substring(0, G)
|
|
1035
|
+
]), d[w - 1][1] = V.substring(
|
|
1036
1036
|
0,
|
|
1037
|
-
|
|
1038
|
-
), d[
|
|
1037
|
+
V.length - G
|
|
1038
|
+
), d[w + 1][1] = F.substring(G), w++) : (Z >= V.length / 2 || Z >= F.length / 2) && (d.splice(w, 0, [
|
|
1039
1039
|
e,
|
|
1040
|
-
|
|
1041
|
-
]), d[
|
|
1040
|
+
V.substring(0, Z)
|
|
1041
|
+
]), d[w - 1][0] = t, d[w - 1][1] = F.substring(
|
|
1042
1042
|
0,
|
|
1043
|
-
|
|
1044
|
-
), d[
|
|
1043
|
+
F.length - Z
|
|
1044
|
+
), d[w + 1][0] = i, d[w + 1][1] = V.substring(Z), w++), w++;
|
|
1045
1045
|
}
|
|
1046
|
-
|
|
1046
|
+
w++;
|
|
1047
1047
|
}
|
|
1048
1048
|
}
|
|
1049
|
-
var g = /[^a-zA-Z0-9]/, p = /\s/,
|
|
1050
|
-
function
|
|
1049
|
+
var g = /[^a-zA-Z0-9]/, p = /\s/, E = /[\r\n]/, T = /\n\r?\n$/, y = /^\r?\n\r?\n/;
|
|
1050
|
+
function x(d) {
|
|
1051
1051
|
function L(Z, j) {
|
|
1052
1052
|
if (!Z || !j)
|
|
1053
1053
|
return 6;
|
|
1054
|
-
var rt = Z.charAt(Z.length - 1), it = j.charAt(0),
|
|
1055
|
-
return ot || gt ? 5 : et || st ? 4 :
|
|
1054
|
+
var rt = Z.charAt(Z.length - 1), it = j.charAt(0), K = rt.match(g), Q = it.match(g), Y = K && rt.match(p), J = Q && it.match(p), et = Y && rt.match(E), st = J && it.match(E), ot = et && Z.match(T), gt = st && j.match(y);
|
|
1055
|
+
return ot || gt ? 5 : et || st ? 4 : K && !Y && J ? 3 : Y || J ? 2 : K || Q ? 1 : 0;
|
|
1056
1056
|
}
|
|
1057
1057
|
for (var b = 1; b < d.length - 1; ) {
|
|
1058
1058
|
if (d[b - 1][0] == e && d[b + 1][0] == e) {
|
|
1059
|
-
var
|
|
1060
|
-
if (
|
|
1061
|
-
var B =
|
|
1062
|
-
|
|
1059
|
+
var C = d[b - 1][1], S = d[b][1], w = d[b + 1][1], k = h(C, S);
|
|
1060
|
+
if (k) {
|
|
1061
|
+
var B = S.substring(S.length - k);
|
|
1062
|
+
C = C.substring(0, C.length - k), S = B + S.substring(0, S.length - k), w = B + w;
|
|
1063
1063
|
}
|
|
1064
|
-
for (var U =
|
|
1065
|
-
|
|
1066
|
-
var G = L(
|
|
1067
|
-
G >=
|
|
1064
|
+
for (var U = C, O = S, V = w, F = L(C, S) + L(S, w); S.charAt(0) === w.charAt(0); ) {
|
|
1065
|
+
C += S.charAt(0), S = S.substring(1) + w.charAt(0), w = w.substring(1);
|
|
1066
|
+
var G = L(C, S) + L(S, w);
|
|
1067
|
+
G >= F && (F = G, U = C, O = S, V = w);
|
|
1068
1068
|
}
|
|
1069
|
-
d[b - 1][1] != U && (U ? d[b - 1][1] = U : (d.splice(b - 1, 1), b--), d[b][1] =
|
|
1069
|
+
d[b - 1][1] != U && (U ? d[b - 1][1] = U : (d.splice(b - 1, 1), b--), d[b][1] = O, V ? d[b + 1][1] = V : (d.splice(b + 1, 1), b--));
|
|
1070
1070
|
}
|
|
1071
1071
|
b++;
|
|
1072
1072
|
}
|
|
1073
1073
|
}
|
|
1074
|
-
function
|
|
1074
|
+
function q(d, L) {
|
|
1075
1075
|
d.push([e, ""]);
|
|
1076
|
-
for (var b = 0,
|
|
1076
|
+
for (var b = 0, C = 0, S = 0, w = "", k = "", B; b < d.length; ) {
|
|
1077
1077
|
if (b < d.length - 1 && !d[b][1]) {
|
|
1078
1078
|
d.splice(b, 1);
|
|
1079
1079
|
continue;
|
|
1080
1080
|
}
|
|
1081
1081
|
switch (d[b][0]) {
|
|
1082
1082
|
case t:
|
|
1083
|
-
|
|
1083
|
+
S++, k += d[b][1], b++;
|
|
1084
1084
|
break;
|
|
1085
1085
|
case i:
|
|
1086
|
-
|
|
1086
|
+
C++, w += d[b][1], b++;
|
|
1087
1087
|
break;
|
|
1088
1088
|
case e:
|
|
1089
|
-
var U = b -
|
|
1089
|
+
var U = b - S - C - 1;
|
|
1090
1090
|
if (L) {
|
|
1091
1091
|
if (U >= 0 && nt(d[U][1])) {
|
|
1092
|
-
var
|
|
1092
|
+
var O = d[U][1].slice(-1);
|
|
1093
1093
|
if (d[U][1] = d[U][1].slice(
|
|
1094
1094
|
0,
|
|
1095
1095
|
-1
|
|
1096
|
-
),
|
|
1096
|
+
), w = O + w, k = O + k, !d[U][1]) {
|
|
1097
1097
|
d.splice(U, 1), b--;
|
|
1098
|
-
var
|
|
1099
|
-
d[
|
|
1098
|
+
var V = U - 1;
|
|
1099
|
+
d[V] && d[V][0] === t && (S++, k = d[V][1] + k, V--), d[V] && d[V][0] === i && (C++, w = d[V][1] + w, V--), U = V;
|
|
1100
1100
|
}
|
|
1101
1101
|
}
|
|
1102
1102
|
if (H(d[b][1])) {
|
|
1103
|
-
var
|
|
1104
|
-
d[b][1] = d[b][1].slice(1),
|
|
1103
|
+
var O = d[b][1].charAt(0);
|
|
1104
|
+
d[b][1] = d[b][1].slice(1), w += O, k += O;
|
|
1105
1105
|
}
|
|
1106
1106
|
}
|
|
1107
1107
|
if (b < d.length - 1 && !d[b][1]) {
|
|
1108
1108
|
d.splice(b, 1);
|
|
1109
1109
|
break;
|
|
1110
1110
|
}
|
|
1111
|
-
if (
|
|
1112
|
-
|
|
1111
|
+
if (w.length > 0 || k.length > 0) {
|
|
1112
|
+
w.length > 0 && k.length > 0 && (B = c(k, w), B !== 0 && (U >= 0 ? d[U][1] += k.substring(
|
|
1113
1113
|
0,
|
|
1114
1114
|
B
|
|
1115
1115
|
) : (d.splice(0, 0, [
|
|
1116
1116
|
e,
|
|
1117
|
-
|
|
1118
|
-
]), b++),
|
|
1117
|
+
k.substring(0, B)
|
|
1118
|
+
]), b++), k = k.substring(B), w = w.substring(B)), B = h(k, w), B !== 0 && (d[b][1] = k.substring(k.length - B) + d[b][1], k = k.substring(
|
|
1119
1119
|
0,
|
|
1120
|
-
|
|
1121
|
-
),
|
|
1120
|
+
k.length - B
|
|
1121
|
+
), w = w.substring(
|
|
1122
1122
|
0,
|
|
1123
|
-
|
|
1123
|
+
w.length - B
|
|
1124
1124
|
)));
|
|
1125
|
-
var
|
|
1126
|
-
|
|
1127
|
-
b -
|
|
1128
|
-
|
|
1129
|
-
[i,
|
|
1130
|
-
[t,
|
|
1131
|
-
), b = b -
|
|
1125
|
+
var F = S + C;
|
|
1126
|
+
w.length === 0 && k.length === 0 ? (d.splice(b - F, F), b = b - F) : w.length === 0 ? (d.splice(b - F, F, [t, k]), b = b - F + 1) : k.length === 0 ? (d.splice(b - F, F, [i, w]), b = b - F + 1) : (d.splice(
|
|
1127
|
+
b - F,
|
|
1128
|
+
F,
|
|
1129
|
+
[i, w],
|
|
1130
|
+
[t, k]
|
|
1131
|
+
), b = b - F + 2);
|
|
1132
1132
|
}
|
|
1133
|
-
b !== 0 && d[b - 1][0] === e ? (d[b - 1][1] += d[b][1], d.splice(b, 1)) : b++,
|
|
1133
|
+
b !== 0 && d[b - 1][0] === e ? (d[b - 1][1] += d[b][1], d.splice(b, 1)) : b++, S = 0, C = 0, w = "", k = "";
|
|
1134
1134
|
break;
|
|
1135
1135
|
}
|
|
1136
1136
|
}
|
|
@@ -1143,78 +1143,78 @@ function Dl() {
|
|
|
1143
1143
|
0,
|
|
1144
1144
|
d[b][1].length - d[b - 1][1].length
|
|
1145
1145
|
), d[b + 1][1] = d[b - 1][1] + d[b + 1][1], d.splice(b - 1, 1), G = !0) : d[b][1].substring(0, d[b + 1][1].length) == d[b + 1][1] && (d[b - 1][1] += d[b + 1][1], d[b][1] = d[b][1].substring(d[b + 1][1].length) + d[b + 1][1], d.splice(b + 1, 1), G = !0)), b++;
|
|
1146
|
-
G &&
|
|
1146
|
+
G && q(d, L);
|
|
1147
1147
|
}
|
|
1148
|
-
function
|
|
1148
|
+
function R(d) {
|
|
1149
1149
|
return d >= 55296 && d <= 56319;
|
|
1150
1150
|
}
|
|
1151
|
-
function
|
|
1151
|
+
function $(d) {
|
|
1152
1152
|
return d >= 56320 && d <= 57343;
|
|
1153
1153
|
}
|
|
1154
1154
|
function H(d) {
|
|
1155
|
-
return
|
|
1155
|
+
return $(d.charCodeAt(0));
|
|
1156
1156
|
}
|
|
1157
1157
|
function nt(d) {
|
|
1158
|
-
return
|
|
1158
|
+
return R(d.charCodeAt(d.length - 1));
|
|
1159
1159
|
}
|
|
1160
1160
|
function lt(d) {
|
|
1161
1161
|
for (var L = [], b = 0; b < d.length; b++)
|
|
1162
1162
|
d[b][1].length > 0 && L.push(d[b]);
|
|
1163
1163
|
return L;
|
|
1164
1164
|
}
|
|
1165
|
-
function ut(d, L, b,
|
|
1166
|
-
return nt(d) || H(
|
|
1165
|
+
function ut(d, L, b, C) {
|
|
1166
|
+
return nt(d) || H(C) ? null : lt([
|
|
1167
1167
|
[e, d],
|
|
1168
1168
|
[i, L],
|
|
1169
1169
|
[t, b],
|
|
1170
|
-
[e,
|
|
1170
|
+
[e, C]
|
|
1171
1171
|
]);
|
|
1172
1172
|
}
|
|
1173
1173
|
function _t(d, L, b) {
|
|
1174
|
-
var
|
|
1175
|
-
if (
|
|
1176
|
-
var B =
|
|
1174
|
+
var C = typeof b == "number" ? { index: b, length: 0 } : b.oldRange, S = typeof b == "number" ? null : b.newRange, w = d.length, k = L.length;
|
|
1175
|
+
if (C.length === 0 && (S === null || S.length === 0)) {
|
|
1176
|
+
var B = C.index, U = d.slice(0, B), O = d.slice(B), V = S ? S.index : null;
|
|
1177
1177
|
t: {
|
|
1178
|
-
var
|
|
1179
|
-
if (
|
|
1178
|
+
var F = B + k - w;
|
|
1179
|
+
if (V !== null && V !== F || F < 0 || F > k)
|
|
1180
1180
|
break t;
|
|
1181
|
-
var G = L.slice(0,
|
|
1182
|
-
if (Z !==
|
|
1181
|
+
var G = L.slice(0, F), Z = L.slice(F);
|
|
1182
|
+
if (Z !== O)
|
|
1183
1183
|
break t;
|
|
1184
|
-
var j = Math.min(B,
|
|
1184
|
+
var j = Math.min(B, F), rt = U.slice(0, j), it = G.slice(0, j);
|
|
1185
1185
|
if (rt !== it)
|
|
1186
1186
|
break t;
|
|
1187
|
-
var
|
|
1188
|
-
return ut(rt,
|
|
1187
|
+
var K = U.slice(j), Q = G.slice(j);
|
|
1188
|
+
return ut(rt, K, Q, O);
|
|
1189
1189
|
}
|
|
1190
1190
|
t: {
|
|
1191
|
-
if (
|
|
1191
|
+
if (V !== null && V !== B)
|
|
1192
1192
|
break t;
|
|
1193
1193
|
var Y = B, G = L.slice(0, Y), Z = L.slice(Y);
|
|
1194
1194
|
if (G !== U)
|
|
1195
1195
|
break t;
|
|
1196
|
-
var J = Math.min(
|
|
1196
|
+
var J = Math.min(w - Y, k - Y), et = O.slice(O.length - J), st = Z.slice(Z.length - J);
|
|
1197
1197
|
if (et !== st)
|
|
1198
1198
|
break t;
|
|
1199
|
-
var
|
|
1200
|
-
return ut(U,
|
|
1199
|
+
var K = O.slice(0, O.length - J), Q = Z.slice(0, Z.length - J);
|
|
1200
|
+
return ut(U, K, Q, et);
|
|
1201
1201
|
}
|
|
1202
1202
|
}
|
|
1203
|
-
if (
|
|
1203
|
+
if (C.length > 0 && S && S.length === 0)
|
|
1204
1204
|
t: {
|
|
1205
|
-
var rt = d.slice(0,
|
|
1206
|
-
if (
|
|
1205
|
+
var rt = d.slice(0, C.index), et = d.slice(C.index + C.length), j = rt.length, J = et.length;
|
|
1206
|
+
if (k < j + J)
|
|
1207
1207
|
break t;
|
|
1208
|
-
var it = L.slice(0, j), st = L.slice(
|
|
1208
|
+
var it = L.slice(0, j), st = L.slice(k - J);
|
|
1209
1209
|
if (rt !== it || et !== st)
|
|
1210
1210
|
break t;
|
|
1211
|
-
var
|
|
1212
|
-
return ut(rt,
|
|
1211
|
+
var K = d.slice(j, w - J), Q = L.slice(j, k - J);
|
|
1212
|
+
return ut(rt, K, Q, et);
|
|
1213
1213
|
}
|
|
1214
1214
|
return null;
|
|
1215
1215
|
}
|
|
1216
|
-
function xt(d, L, b,
|
|
1217
|
-
return s(d, L, b,
|
|
1216
|
+
function xt(d, L, b, C) {
|
|
1217
|
+
return s(d, L, b, C, !0);
|
|
1218
1218
|
}
|
|
1219
1219
|
return xt.INSERT = t, xt.DELETE = i, xt.EQUAL = e, ir = xt, ir;
|
|
1220
1220
|
}
|
|
@@ -1223,13 +1223,13 @@ ps.exports;
|
|
|
1223
1223
|
var Jr;
|
|
1224
1224
|
function Bi() {
|
|
1225
1225
|
return Jr || (Jr = 1, (function(i, t) {
|
|
1226
|
-
var e = 200, s = "__lodash_hash_undefined__", n = 9007199254740991, l = "[object Arguments]", o = "[object Array]", c = "[object Boolean]", u = "[object Date]", h = "[object Error]", m = "[object Function]",
|
|
1227
|
-
|
|
1228
|
-
var
|
|
1226
|
+
var e = 200, s = "__lodash_hash_undefined__", n = 9007199254740991, l = "[object Arguments]", o = "[object Array]", c = "[object Boolean]", u = "[object Date]", h = "[object Error]", m = "[object Function]", v = "[object GeneratorFunction]", g = "[object Map]", p = "[object Number]", E = "[object Object]", T = "[object Promise]", y = "[object RegExp]", x = "[object Set]", q = "[object String]", R = "[object Symbol]", $ = "[object WeakMap]", H = "[object ArrayBuffer]", nt = "[object DataView]", lt = "[object Float32Array]", ut = "[object Float64Array]", _t = "[object Int8Array]", xt = "[object Int16Array]", d = "[object Int32Array]", L = "[object Uint8Array]", b = "[object Uint8ClampedArray]", C = "[object Uint16Array]", S = "[object Uint32Array]", w = /[\\^$.*+?()[\]{}|]/g, k = /\w*$/, B = /^\[object .+?Constructor\]$/, U = /^(?:0|[1-9]\d*)$/, O = {};
|
|
1227
|
+
O[l] = O[o] = O[H] = O[nt] = O[c] = O[u] = O[lt] = O[ut] = O[_t] = O[xt] = O[d] = O[g] = O[p] = O[E] = O[y] = O[x] = O[q] = O[R] = O[L] = O[b] = O[C] = O[S] = !0, O[h] = O[m] = O[$] = !1;
|
|
1228
|
+
var V = typeof ae == "object" && ae && ae.Object === Object && ae, F = typeof self == "object" && self && self.Object === Object && self, G = V || F || Function("return this")(), Z = t && !t.nodeType && t, j = Z && !0 && i && !i.nodeType && i, rt = j && j.exports === Z;
|
|
1229
1229
|
function it(r, a) {
|
|
1230
1230
|
return r.set(a[0], a[1]), r;
|
|
1231
1231
|
}
|
|
1232
|
-
function
|
|
1232
|
+
function K(r, a) {
|
|
1233
1233
|
return r.add(a), r;
|
|
1234
1234
|
}
|
|
1235
1235
|
function Q(r, a) {
|
|
@@ -1238,13 +1238,13 @@ function Bi() {
|
|
|
1238
1238
|
return r;
|
|
1239
1239
|
}
|
|
1240
1240
|
function Y(r, a) {
|
|
1241
|
-
for (var f = -1, N = a.length,
|
|
1242
|
-
r[
|
|
1241
|
+
for (var f = -1, N = a.length, z = r.length; ++f < N; )
|
|
1242
|
+
r[z + f] = a[f];
|
|
1243
1243
|
return r;
|
|
1244
1244
|
}
|
|
1245
1245
|
function J(r, a, f, N) {
|
|
1246
|
-
for (var
|
|
1247
|
-
f = a(f, r[
|
|
1246
|
+
for (var z = -1, P = r ? r.length : 0; ++z < P; )
|
|
1247
|
+
f = a(f, r[z], z, r);
|
|
1248
1248
|
return f;
|
|
1249
1249
|
}
|
|
1250
1250
|
function et(r, a) {
|
|
@@ -1266,8 +1266,8 @@ function Bi() {
|
|
|
1266
1266
|
}
|
|
1267
1267
|
function gt(r) {
|
|
1268
1268
|
var a = -1, f = Array(r.size);
|
|
1269
|
-
return r.forEach(function(N,
|
|
1270
|
-
f[++a] = [
|
|
1269
|
+
return r.forEach(function(N, z) {
|
|
1270
|
+
f[++a] = [z, N];
|
|
1271
1271
|
}), f;
|
|
1272
1272
|
}
|
|
1273
1273
|
function We(r, a) {
|
|
@@ -1285,7 +1285,7 @@ function Bi() {
|
|
|
1285
1285
|
var r = /[^.]+$/.exec(Xe && Xe.keys && Xe.keys.IE_PROTO || "");
|
|
1286
1286
|
return r ? "Symbol(src)_1." + r : "";
|
|
1287
1287
|
})(), _s = gn.toString, Ht = we.hasOwnProperty, Te = we.toString, pn = RegExp(
|
|
1288
|
-
"^" + _s.call(Ht).replace(
|
|
1288
|
+
"^" + _s.call(Ht).replace(w, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
1289
1289
|
), de = rt ? G.Buffer : void 0, Le = G.Symbol, Ye = G.Uint8Array, Tt = We(Object.getPrototypeOf, Object), Os = Object.create, Is = we.propertyIsEnumerable, mn = dn.splice, Qe = Object.getOwnPropertySymbols, qe = de ? de.isBuffer : void 0, Rs = We(Object.keys, Object), Se = It(G, "DataView"), ge = It(G, "Map"), Ot = It(G, "Promise"), ke = It(G, "Set"), Je = It(G, "WeakMap"), pe = It(Object, "create"), ts = Et(Se), me = Et(ge), es = Et(Ot), ss = Et(ke), ns = Et(Je), ie = Le ? Le.prototype : void 0, Bs = ie ? ie.valueOf : void 0;
|
|
1290
1290
|
function Yt(r) {
|
|
1291
1291
|
var a = -1, f = r ? r.length : 0;
|
|
@@ -1400,9 +1400,9 @@ function Bi() {
|
|
|
1400
1400
|
}
|
|
1401
1401
|
Nt.prototype.clear = Cn, Nt.prototype.delete = _n, Nt.prototype.get = On, Nt.prototype.has = In, Nt.prototype.set = Rn;
|
|
1402
1402
|
function Ce(r, a) {
|
|
1403
|
-
var f = as(r) || Ie(r) ? et(r.length, String) : [], N = f.length,
|
|
1403
|
+
var f = as(r) || Ie(r) ? et(r.length, String) : [], N = f.length, z = !!N;
|
|
1404
1404
|
for (var P in r)
|
|
1405
|
-
Ht.call(r, P) && !(
|
|
1405
|
+
Ht.call(r, P) && !(z && (P == "length" || Zn(P, N))) && f.push(P);
|
|
1406
1406
|
return f;
|
|
1407
1407
|
}
|
|
1408
1408
|
function Ds(r, a, f) {
|
|
@@ -1418,9 +1418,9 @@ function Bi() {
|
|
|
1418
1418
|
function Ft(r, a) {
|
|
1419
1419
|
return r && os(a, us(a), r);
|
|
1420
1420
|
}
|
|
1421
|
-
function is(r, a, f, N,
|
|
1421
|
+
function is(r, a, f, N, z, P, X) {
|
|
1422
1422
|
var W;
|
|
1423
|
-
if (N && (W = P ? N(r,
|
|
1423
|
+
if (N && (W = P ? N(r, z, P, X) : N(r)), W !== void 0)
|
|
1424
1424
|
return W;
|
|
1425
1425
|
if (!Vt(r))
|
|
1426
1426
|
return r;
|
|
@@ -1429,16 +1429,16 @@ function Bi() {
|
|
|
1429
1429
|
if (W = Kn(r), !a)
|
|
1430
1430
|
return Fn(r, W);
|
|
1431
1431
|
} else {
|
|
1432
|
-
var tt = Jt(r), mt = tt == m || tt ==
|
|
1432
|
+
var tt = Jt(r), mt = tt == m || tt == v;
|
|
1433
1433
|
if (Fs(r))
|
|
1434
1434
|
return Oe(r, a);
|
|
1435
|
-
if (tt ==
|
|
1435
|
+
if (tt == E || tt == l || mt && !P) {
|
|
1436
1436
|
if (ot(r))
|
|
1437
1437
|
return P ? r : {};
|
|
1438
1438
|
if (W = zt(mt ? {} : r), !a)
|
|
1439
1439
|
return zn(r, Ft(W, r));
|
|
1440
1440
|
} else {
|
|
1441
|
-
if (!
|
|
1441
|
+
if (!O[tt])
|
|
1442
1442
|
return P ? r : {};
|
|
1443
1443
|
W = Gn(r, tt, is, a);
|
|
1444
1444
|
}
|
|
@@ -1496,12 +1496,12 @@ function Bi() {
|
|
|
1496
1496
|
return J(N, it, new r.constructor());
|
|
1497
1497
|
}
|
|
1498
1498
|
function Ps(r) {
|
|
1499
|
-
var a = new r.constructor(r.source,
|
|
1499
|
+
var a = new r.constructor(r.source, k.exec(r));
|
|
1500
1500
|
return a.lastIndex = r.lastIndex, a;
|
|
1501
1501
|
}
|
|
1502
1502
|
function jn(r, a, f) {
|
|
1503
1503
|
var N = a ? f(ks(r), !0) : ks(r);
|
|
1504
|
-
return J(N,
|
|
1504
|
+
return J(N, K, new r.constructor());
|
|
1505
1505
|
}
|
|
1506
1506
|
function $n(r) {
|
|
1507
1507
|
return Bs ? Object(Bs.call(r)) : {};
|
|
@@ -1518,8 +1518,8 @@ function Bi() {
|
|
|
1518
1518
|
}
|
|
1519
1519
|
function os(r, a, f, N) {
|
|
1520
1520
|
f || (f = {});
|
|
1521
|
-
for (var
|
|
1522
|
-
var X = a[
|
|
1521
|
+
for (var z = -1, P = a.length; ++z < P; ) {
|
|
1522
|
+
var X = a[z], W = void 0;
|
|
1523
1523
|
Ds(f, X, W === void 0 ? r[X] : W);
|
|
1524
1524
|
}
|
|
1525
1525
|
return f;
|
|
@@ -1539,8 +1539,8 @@ function Bi() {
|
|
|
1539
1539
|
return Un(f) ? f : void 0;
|
|
1540
1540
|
}
|
|
1541
1541
|
var Qt = Qe ? We(Qe, Object) : Qn, Jt = Dn;
|
|
1542
|
-
(Se && Jt(new Se(new ArrayBuffer(1))) != nt || ge && Jt(new ge()) != g || Ot && Jt(Ot.resolve()) !=
|
|
1543
|
-
var a = Te.call(r), f = a ==
|
|
1542
|
+
(Se && Jt(new Se(new ArrayBuffer(1))) != nt || ge && Jt(new ge()) != g || Ot && Jt(Ot.resolve()) != T || ke && Jt(new ke()) != x || Je && Jt(new Je()) != $) && (Jt = function(r) {
|
|
1543
|
+
var a = Te.call(r), f = a == E ? r.constructor : void 0, N = f ? Et(f) : void 0;
|
|
1544
1544
|
if (N)
|
|
1545
1545
|
switch (N) {
|
|
1546
1546
|
case ts:
|
|
@@ -1548,11 +1548,11 @@ function Bi() {
|
|
|
1548
1548
|
case me:
|
|
1549
1549
|
return g;
|
|
1550
1550
|
case es:
|
|
1551
|
-
return
|
|
1551
|
+
return T;
|
|
1552
1552
|
case ss:
|
|
1553
|
-
return
|
|
1553
|
+
return x;
|
|
1554
1554
|
case ns:
|
|
1555
|
-
return
|
|
1555
|
+
return $;
|
|
1556
1556
|
}
|
|
1557
1557
|
return a;
|
|
1558
1558
|
});
|
|
@@ -1564,13 +1564,13 @@ function Bi() {
|
|
|
1564
1564
|
return typeof r.constructor == "function" && !js(r) ? Bn(Tt(r)) : {};
|
|
1565
1565
|
}
|
|
1566
1566
|
function Gn(r, a, f, N) {
|
|
1567
|
-
var
|
|
1567
|
+
var z = r.constructor;
|
|
1568
1568
|
switch (a) {
|
|
1569
1569
|
case H:
|
|
1570
1570
|
return ls(r);
|
|
1571
1571
|
case c:
|
|
1572
1572
|
case u:
|
|
1573
|
-
return new
|
|
1573
|
+
return new z(+r);
|
|
1574
1574
|
case nt:
|
|
1575
1575
|
return be(r, N);
|
|
1576
1576
|
case lt:
|
|
@@ -1580,19 +1580,19 @@ function Bi() {
|
|
|
1580
1580
|
case d:
|
|
1581
1581
|
case L:
|
|
1582
1582
|
case b:
|
|
1583
|
-
case
|
|
1584
|
-
case
|
|
1583
|
+
case C:
|
|
1584
|
+
case S:
|
|
1585
1585
|
return Hn(r, N);
|
|
1586
1586
|
case g:
|
|
1587
1587
|
return Us(r, N, f);
|
|
1588
1588
|
case p:
|
|
1589
|
-
case
|
|
1590
|
-
return new
|
|
1591
|
-
case
|
|
1589
|
+
case q:
|
|
1590
|
+
return new z(r);
|
|
1591
|
+
case y:
|
|
1592
1592
|
return Ps(r);
|
|
1593
|
-
case
|
|
1593
|
+
case x:
|
|
1594
1594
|
return jn(r, N, f);
|
|
1595
|
-
case
|
|
1595
|
+
case R:
|
|
1596
1596
|
return $n(r);
|
|
1597
1597
|
}
|
|
1598
1598
|
}
|
|
@@ -1642,7 +1642,7 @@ function Bi() {
|
|
|
1642
1642
|
var Fs = qe || Jn;
|
|
1643
1643
|
function cs(r) {
|
|
1644
1644
|
var a = Vt(r) ? Te.call(r) : "";
|
|
1645
|
-
return a == m || a ==
|
|
1645
|
+
return a == m || a == v;
|
|
1646
1646
|
}
|
|
1647
1647
|
function zs(r) {
|
|
1648
1648
|
return typeof r == "number" && r > -1 && r % 1 == 0 && r <= n;
|
|
@@ -1671,24 +1671,24 @@ ms.exports;
|
|
|
1671
1671
|
var ti;
|
|
1672
1672
|
function Mi() {
|
|
1673
1673
|
return ti || (ti = 1, (function(i, t) {
|
|
1674
|
-
var e = 200, s = "__lodash_hash_undefined__", n = 1, l = 2, o = 9007199254740991, c = "[object Arguments]", u = "[object Array]", h = "[object AsyncFunction]", m = "[object Boolean]",
|
|
1675
|
-
j[b] = j[
|
|
1676
|
-
var rt = typeof ae == "object" && ae && ae.Object === Object && ae, it = typeof self == "object" && self && self.Object === Object && self,
|
|
1674
|
+
var e = 200, s = "__lodash_hash_undefined__", n = 1, l = 2, o = 9007199254740991, c = "[object Arguments]", u = "[object Array]", h = "[object AsyncFunction]", m = "[object Boolean]", v = "[object Date]", g = "[object Error]", p = "[object Function]", E = "[object GeneratorFunction]", T = "[object Map]", y = "[object Number]", x = "[object Null]", q = "[object Object]", R = "[object Promise]", $ = "[object Proxy]", H = "[object RegExp]", nt = "[object Set]", lt = "[object String]", ut = "[object Symbol]", _t = "[object Undefined]", xt = "[object WeakMap]", d = "[object ArrayBuffer]", L = "[object DataView]", b = "[object Float32Array]", C = "[object Float64Array]", S = "[object Int8Array]", w = "[object Int16Array]", k = "[object Int32Array]", B = "[object Uint8Array]", U = "[object Uint8ClampedArray]", O = "[object Uint16Array]", V = "[object Uint32Array]", F = /[\\^$.*+?()[\]{}|]/g, G = /^\[object .+?Constructor\]$/, Z = /^(?:0|[1-9]\d*)$/, j = {};
|
|
1675
|
+
j[b] = j[C] = j[S] = j[w] = j[k] = j[B] = j[U] = j[O] = j[V] = !0, j[c] = j[u] = j[d] = j[m] = j[L] = j[v] = j[g] = j[p] = j[T] = j[y] = j[q] = j[H] = j[nt] = j[lt] = j[xt] = !1;
|
|
1676
|
+
var rt = typeof ae == "object" && ae && ae.Object === Object && ae, it = typeof self == "object" && self && self.Object === Object && self, K = rt || it || Function("return this")(), Q = t && !t.nodeType && t, Y = Q && !0 && i && !i.nodeType && i, J = Y && Y.exports === Q, et = J && rt.process, st = (function() {
|
|
1677
1677
|
try {
|
|
1678
1678
|
return et && et.binding && et.binding("util");
|
|
1679
1679
|
} catch {
|
|
1680
1680
|
}
|
|
1681
1681
|
})(), ot = st && st.isTypedArray;
|
|
1682
1682
|
function gt(r, a) {
|
|
1683
|
-
for (var f = -1, N = r == null ? 0 : r.length,
|
|
1683
|
+
for (var f = -1, N = r == null ? 0 : r.length, z = 0, P = []; ++f < N; ) {
|
|
1684
1684
|
var X = r[f];
|
|
1685
|
-
a(X, f, r) && (P[
|
|
1685
|
+
a(X, f, r) && (P[z++] = X);
|
|
1686
1686
|
}
|
|
1687
1687
|
return P;
|
|
1688
1688
|
}
|
|
1689
1689
|
function We(r, a) {
|
|
1690
|
-
for (var f = -1, N = a.length,
|
|
1691
|
-
r[
|
|
1690
|
+
for (var f = -1, N = a.length, z = r.length; ++f < N; )
|
|
1691
|
+
r[z + f] = a[f];
|
|
1692
1692
|
return r;
|
|
1693
1693
|
}
|
|
1694
1694
|
function ks(r, a) {
|
|
@@ -1715,8 +1715,8 @@ function Mi() {
|
|
|
1715
1715
|
}
|
|
1716
1716
|
function Cs(r) {
|
|
1717
1717
|
var a = -1, f = Array(r.size);
|
|
1718
|
-
return r.forEach(function(N,
|
|
1719
|
-
f[++a] = [
|
|
1718
|
+
return r.forEach(function(N, z) {
|
|
1719
|
+
f[++a] = [z, N];
|
|
1720
1720
|
}), f;
|
|
1721
1721
|
}
|
|
1722
1722
|
function _s(r, a) {
|
|
@@ -1730,12 +1730,12 @@ function Mi() {
|
|
|
1730
1730
|
f[++a] = N;
|
|
1731
1731
|
}), f;
|
|
1732
1732
|
}
|
|
1733
|
-
var Te = Array.prototype, pn = Function.prototype, de = Object.prototype, Le =
|
|
1733
|
+
var Te = Array.prototype, pn = Function.prototype, de = Object.prototype, Le = K["__core-js_shared__"], Ye = pn.toString, Tt = de.hasOwnProperty, Os = (function() {
|
|
1734
1734
|
var r = /[^.]+$/.exec(Le && Le.keys && Le.keys.IE_PROTO || "");
|
|
1735
1735
|
return r ? "Symbol(src)_1." + r : "";
|
|
1736
1736
|
})(), Is = de.toString, mn = RegExp(
|
|
1737
|
-
"^" + Ye.call(Tt).replace(
|
|
1738
|
-
), Qe = J ?
|
|
1737
|
+
"^" + Ye.call(Tt).replace(F, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
1738
|
+
), Qe = J ? K.Buffer : void 0, qe = K.Symbol, Rs = K.Uint8Array, Se = de.propertyIsEnumerable, ge = Te.splice, Ot = qe ? qe.toStringTag : void 0, ke = Object.getOwnPropertySymbols, Je = Qe ? Qe.isBuffer : void 0, pe = _s(Object.keys, Object), ts = Qt(K, "DataView"), me = Qt(K, "Map"), es = Qt(K, "Promise"), ss = Qt(K, "Set"), ns = Qt(K, "WeakMap"), ie = Qt(Object, "create"), Bs = Et(ts), Yt = Et(me), bn = Et(es), yn = Et(ss), vn = Et(ns), Ms = qe ? qe.prototype : void 0, rs = Ms ? Ms.valueOf : void 0;
|
|
1739
1739
|
function ht(r) {
|
|
1740
1740
|
var a = -1, f = r == null ? 0 : r.length;
|
|
1741
1741
|
for (this.clear(); ++a < f; ) {
|
|
@@ -1866,11 +1866,11 @@ function Mi() {
|
|
|
1866
1866
|
}
|
|
1867
1867
|
Ft.prototype.clear = is, Ft.prototype.delete = Bn, Ft.prototype.get = Mn, Ft.prototype.has = Dn, Ft.prototype.set = Un;
|
|
1868
1868
|
function Pn(r, a) {
|
|
1869
|
-
var f = Ie(r), N = !f && Hs(r),
|
|
1869
|
+
var f = Ie(r), N = !f && Hs(r), z = !f && !N && Re(r), P = !f && !N && !z && Vs(r), X = f || N || z || P, W = X ? dn(r.length, String) : [], at = W.length;
|
|
1870
1870
|
for (var tt in r)
|
|
1871
1871
|
Tt.call(r, tt) && !(X && // Safari 9 has enumerable `arguments.length` in strict mode.
|
|
1872
1872
|
(tt == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
|
1873
|
-
|
|
1873
|
+
z && (tt == "offset" || tt == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
|
1874
1874
|
P && (tt == "buffer" || tt == "byteLength" || tt == "byteOffset") || // Skip index properties.
|
|
1875
1875
|
Gn(tt, at))) && W.push(tt);
|
|
1876
1876
|
return W;
|
|
@@ -1886,33 +1886,33 @@ function Mi() {
|
|
|
1886
1886
|
return Ie(r) ? N : We(N, f(r));
|
|
1887
1887
|
}
|
|
1888
1888
|
function be(r) {
|
|
1889
|
-
return r == null ? r === void 0 ? _t :
|
|
1889
|
+
return r == null ? r === void 0 ? _t : x : Ot && Ot in Object(r) ? Jt(r) : js(r);
|
|
1890
1890
|
}
|
|
1891
1891
|
function Us(r) {
|
|
1892
1892
|
return Vt(r) && be(r) == c;
|
|
1893
1893
|
}
|
|
1894
|
-
function Ps(r, a, f, N,
|
|
1895
|
-
return r === a ? !0 : r == null || a == null || !Vt(r) && !Vt(a) ? r !== r && a !== a : jn(r, a, f, N, Ps,
|
|
1894
|
+
function Ps(r, a, f, N, z) {
|
|
1895
|
+
return r === a ? !0 : r == null || a == null || !Vt(r) && !Vt(a) ? r !== r && a !== a : jn(r, a, f, N, Ps, z);
|
|
1896
1896
|
}
|
|
1897
|
-
function jn(r, a, f, N,
|
|
1897
|
+
function jn(r, a, f, N, z, P) {
|
|
1898
1898
|
var X = Ie(r), W = Ie(a), at = X ? u : zt(r), tt = W ? u : zt(a);
|
|
1899
|
-
at = at == c ?
|
|
1900
|
-
var mt = at ==
|
|
1899
|
+
at = at == c ? q : at, tt = tt == c ? q : tt;
|
|
1900
|
+
var mt = at == q, At = tt == q, ct = at == tt;
|
|
1901
1901
|
if (ct && Re(r)) {
|
|
1902
1902
|
if (!Re(a))
|
|
1903
1903
|
return !1;
|
|
1904
1904
|
X = !0, mt = !1;
|
|
1905
1905
|
}
|
|
1906
1906
|
if (ct && !mt)
|
|
1907
|
-
return P || (P = new Ft()), X || Vs(r) ? os(r, a, f, N,
|
|
1907
|
+
return P || (P = new Ft()), X || Vs(r) ? os(r, a, f, N, z, P) : zn(r, a, at, f, N, z, P);
|
|
1908
1908
|
if (!(f & n)) {
|
|
1909
1909
|
var bt = mt && Tt.call(r, "__wrapped__"), ft = At && Tt.call(a, "__wrapped__");
|
|
1910
1910
|
if (bt || ft) {
|
|
1911
1911
|
var le = bt ? r.value() : r, te = ft ? a.value() : a;
|
|
1912
|
-
return P || (P = new Ft()),
|
|
1912
|
+
return P || (P = new Ft()), z(le, te, f, N, P);
|
|
1913
1913
|
}
|
|
1914
1914
|
}
|
|
1915
|
-
return ct ? (P || (P = new Ft()), Vn(r, a, f, N,
|
|
1915
|
+
return ct ? (P || (P = new Ft()), Vn(r, a, f, N, z, P)) : !1;
|
|
1916
1916
|
}
|
|
1917
1917
|
function $n(r) {
|
|
1918
1918
|
if (!zs(r) || Wn(r))
|
|
@@ -1931,7 +1931,7 @@ function Mi() {
|
|
|
1931
1931
|
Tt.call(r, f) && f != "constructor" && a.push(f);
|
|
1932
1932
|
return a;
|
|
1933
1933
|
}
|
|
1934
|
-
function os(r, a, f, N,
|
|
1934
|
+
function os(r, a, f, N, z, P) {
|
|
1935
1935
|
var X = f & n, W = r.length, at = a.length;
|
|
1936
1936
|
if (W != at && !(X && at > W))
|
|
1937
1937
|
return !1;
|
|
@@ -1951,20 +1951,20 @@ function Mi() {
|
|
|
1951
1951
|
}
|
|
1952
1952
|
if (ct) {
|
|
1953
1953
|
if (!ks(a, function(te, ve) {
|
|
1954
|
-
if (!we(ct, ve) && (bt === te ||
|
|
1954
|
+
if (!we(ct, ve) && (bt === te || z(bt, te, f, N, P)))
|
|
1955
1955
|
return ct.push(ve);
|
|
1956
1956
|
})) {
|
|
1957
1957
|
At = !1;
|
|
1958
1958
|
break;
|
|
1959
1959
|
}
|
|
1960
|
-
} else if (!(bt === ft ||
|
|
1960
|
+
} else if (!(bt === ft || z(bt, ft, f, N, P))) {
|
|
1961
1961
|
At = !1;
|
|
1962
1962
|
break;
|
|
1963
1963
|
}
|
|
1964
1964
|
}
|
|
1965
1965
|
return P.delete(r), P.delete(a), At;
|
|
1966
1966
|
}
|
|
1967
|
-
function zn(r, a, f, N,
|
|
1967
|
+
function zn(r, a, f, N, z, P, X) {
|
|
1968
1968
|
switch (f) {
|
|
1969
1969
|
case L:
|
|
1970
1970
|
if (r.byteLength != a.byteLength || r.byteOffset != a.byteOffset)
|
|
@@ -1973,15 +1973,15 @@ function Mi() {
|
|
|
1973
1973
|
case d:
|
|
1974
1974
|
return !(r.byteLength != a.byteLength || !P(new Rs(r), new Rs(a)));
|
|
1975
1975
|
case m:
|
|
1976
|
-
case
|
|
1977
|
-
case
|
|
1976
|
+
case v:
|
|
1977
|
+
case y:
|
|
1978
1978
|
return $s(+r, +a);
|
|
1979
1979
|
case g:
|
|
1980
1980
|
return r.name == a.name && r.message == a.message;
|
|
1981
1981
|
case H:
|
|
1982
1982
|
case lt:
|
|
1983
1983
|
return r == a + "";
|
|
1984
|
-
case
|
|
1984
|
+
case T:
|
|
1985
1985
|
var W = Cs;
|
|
1986
1986
|
case nt:
|
|
1987
1987
|
var at = N & n;
|
|
@@ -1991,7 +1991,7 @@ function Mi() {
|
|
|
1991
1991
|
if (tt)
|
|
1992
1992
|
return tt == a;
|
|
1993
1993
|
N |= l, X.set(r, a);
|
|
1994
|
-
var mt = os(W(r), W(a), N,
|
|
1994
|
+
var mt = os(W(r), W(a), N, z, P, X);
|
|
1995
1995
|
return X.delete(r), mt;
|
|
1996
1996
|
case ut:
|
|
1997
1997
|
if (rs)
|
|
@@ -1999,7 +1999,7 @@ function Mi() {
|
|
|
1999
1999
|
}
|
|
2000
2000
|
return !1;
|
|
2001
2001
|
}
|
|
2002
|
-
function Vn(r, a, f, N,
|
|
2002
|
+
function Vn(r, a, f, N, z, P) {
|
|
2003
2003
|
var X = f & n, W = ye(r), at = W.length, tt = ye(a), mt = tt.length;
|
|
2004
2004
|
if (at != mt && !X)
|
|
2005
2005
|
return !1;
|
|
@@ -2018,7 +2018,7 @@ function Mi() {
|
|
|
2018
2018
|
var te = r[ct], ve = a[ct];
|
|
2019
2019
|
if (N)
|
|
2020
2020
|
var zr = X ? N(ve, te, ct, a, r, P) : N(te, ve, ct, r, a, P);
|
|
2021
|
-
if (!(zr === void 0 ? te === ve ||
|
|
2021
|
+
if (!(zr === void 0 ? te === ve || z(te, ve, f, N, P) : zr)) {
|
|
2022
2022
|
ft = !1;
|
|
2023
2023
|
break;
|
|
2024
2024
|
}
|
|
@@ -2048,24 +2048,24 @@ function Mi() {
|
|
|
2048
2048
|
var N = !0;
|
|
2049
2049
|
} catch {
|
|
2050
2050
|
}
|
|
2051
|
-
var
|
|
2052
|
-
return N && (a ? r[Ot] = f : delete r[Ot]),
|
|
2051
|
+
var z = Is.call(r);
|
|
2052
|
+
return N && (a ? r[Ot] = f : delete r[Ot]), z;
|
|
2053
2053
|
}
|
|
2054
2054
|
var Kn = ke ? function(r) {
|
|
2055
2055
|
return r == null ? [] : (r = Object(r), gt(ke(r), function(a) {
|
|
2056
2056
|
return Se.call(r, a);
|
|
2057
2057
|
}));
|
|
2058
2058
|
} : Qn, zt = be;
|
|
2059
|
-
(ts && zt(new ts(new ArrayBuffer(1))) != L || me && zt(new me()) !=
|
|
2060
|
-
var a = be(r), f = a ==
|
|
2059
|
+
(ts && zt(new ts(new ArrayBuffer(1))) != L || me && zt(new me()) != T || es && zt(es.resolve()) != R || ss && zt(new ss()) != nt || ns && zt(new ns()) != xt) && (zt = function(r) {
|
|
2060
|
+
var a = be(r), f = a == q ? r.constructor : void 0, N = f ? Et(f) : "";
|
|
2061
2061
|
if (N)
|
|
2062
2062
|
switch (N) {
|
|
2063
2063
|
case Bs:
|
|
2064
2064
|
return L;
|
|
2065
2065
|
case Yt:
|
|
2066
|
-
return
|
|
2066
|
+
return T;
|
|
2067
2067
|
case bn:
|
|
2068
|
-
return
|
|
2068
|
+
return R;
|
|
2069
2069
|
case yn:
|
|
2070
2070
|
return nt;
|
|
2071
2071
|
case vn:
|
|
@@ -2122,7 +2122,7 @@ function Mi() {
|
|
|
2122
2122
|
if (!zs(r))
|
|
2123
2123
|
return !1;
|
|
2124
2124
|
var a = be(r);
|
|
2125
|
-
return a == p || a ==
|
|
2125
|
+
return a == p || a == E || a == h || a == $;
|
|
2126
2126
|
}
|
|
2127
2127
|
function cs(r) {
|
|
2128
2128
|
return typeof r == "number" && r > -1 && r % 1 == 0 && r <= o;
|
|
@@ -2156,23 +2156,23 @@ function Ul() {
|
|
|
2156
2156
|
return (function(s) {
|
|
2157
2157
|
function n(u = {}, h = {}, m = !1) {
|
|
2158
2158
|
typeof u != "object" && (u = {}), typeof h != "object" && (h = {});
|
|
2159
|
-
let
|
|
2160
|
-
m || (
|
|
2159
|
+
let v = i(h);
|
|
2160
|
+
m || (v = Object.keys(v).reduce((g, p) => (v[p] != null && (g[p] = v[p]), g), {}));
|
|
2161
2161
|
for (const g in u)
|
|
2162
|
-
u[g] !== void 0 && h[g] === void 0 && (
|
|
2163
|
-
return Object.keys(
|
|
2162
|
+
u[g] !== void 0 && h[g] === void 0 && (v[g] = u[g]);
|
|
2163
|
+
return Object.keys(v).length > 0 ? v : void 0;
|
|
2164
2164
|
}
|
|
2165
2165
|
s.compose = n;
|
|
2166
2166
|
function l(u = {}, h = {}) {
|
|
2167
2167
|
typeof u != "object" && (u = {}), typeof h != "object" && (h = {});
|
|
2168
|
-
const m = Object.keys(u).concat(Object.keys(h)).reduce((
|
|
2168
|
+
const m = Object.keys(u).concat(Object.keys(h)).reduce((v, g) => (t(u[g], h[g]) || (v[g] = h[g] === void 0 ? null : h[g]), v), {});
|
|
2169
2169
|
return Object.keys(m).length > 0 ? m : void 0;
|
|
2170
2170
|
}
|
|
2171
2171
|
s.diff = l;
|
|
2172
2172
|
function o(u = {}, h = {}) {
|
|
2173
2173
|
u = u || {};
|
|
2174
|
-
const m = Object.keys(h).reduce((
|
|
2175
|
-
return Object.keys(u).reduce((
|
|
2174
|
+
const m = Object.keys(h).reduce((v, g) => (h[g] !== u[g] && u[g] !== void 0 && (v[g] = h[g]), v), {});
|
|
2175
|
+
return Object.keys(u).reduce((v, g) => (u[g] !== h[g] && h[g] === void 0 && (v[g] = null), v), m);
|
|
2176
2176
|
}
|
|
2177
2177
|
s.invert = o;
|
|
2178
2178
|
function c(u, h, m = !1) {
|
|
@@ -2182,8 +2182,8 @@ function Ul() {
|
|
|
2182
2182
|
return;
|
|
2183
2183
|
if (!m)
|
|
2184
2184
|
return h;
|
|
2185
|
-
const
|
|
2186
|
-
return Object.keys(
|
|
2185
|
+
const v = Object.keys(h).reduce((g, p) => (u[p] === void 0 && (g[p] = h[p]), g), {});
|
|
2186
|
+
return Object.keys(v).length > 0 ? v : void 0;
|
|
2187
2187
|
}
|
|
2188
2188
|
s.transform = c;
|
|
2189
2189
|
})(e || (e = {})), Ws.default = e, Ws;
|
|
@@ -2259,15 +2259,15 @@ function jl() {
|
|
|
2259
2259
|
t.Op = o.default;
|
|
2260
2260
|
const c = Pl();
|
|
2261
2261
|
t.OpIterator = c.default;
|
|
2262
|
-
const u = "\0", h = (
|
|
2263
|
-
if (typeof
|
|
2264
|
-
throw new Error(`cannot retain a ${typeof
|
|
2262
|
+
const u = "\0", h = (v, g) => {
|
|
2263
|
+
if (typeof v != "object" || v === null)
|
|
2264
|
+
throw new Error(`cannot retain a ${typeof v}`);
|
|
2265
2265
|
if (typeof g != "object" || g === null)
|
|
2266
2266
|
throw new Error(`cannot retain a ${typeof g}`);
|
|
2267
|
-
const p = Object.keys(
|
|
2267
|
+
const p = Object.keys(v)[0];
|
|
2268
2268
|
if (!p || p !== Object.keys(g)[0])
|
|
2269
2269
|
throw new Error(`embed types not matched: ${p} != ${Object.keys(g)[0]}`);
|
|
2270
|
-
return [p,
|
|
2270
|
+
return [p, v[p], g[p]];
|
|
2271
2271
|
};
|
|
2272
2272
|
class m {
|
|
2273
2273
|
constructor(g) {
|
|
@@ -2286,8 +2286,8 @@ function jl() {
|
|
|
2286
2286
|
return p;
|
|
2287
2287
|
}
|
|
2288
2288
|
insert(g, p) {
|
|
2289
|
-
const
|
|
2290
|
-
return typeof g == "string" && g.length === 0 ? this : (
|
|
2289
|
+
const E = {};
|
|
2290
|
+
return typeof g == "string" && g.length === 0 ? this : (E.insert = g, p != null && typeof p == "object" && Object.keys(p).length > 0 && (E.attributes = p), this.push(E));
|
|
2291
2291
|
}
|
|
2292
2292
|
delete(g) {
|
|
2293
2293
|
return g <= 0 ? this : this.push({ delete: g });
|
|
@@ -2295,21 +2295,21 @@ function jl() {
|
|
|
2295
2295
|
retain(g, p) {
|
|
2296
2296
|
if (typeof g == "number" && g <= 0)
|
|
2297
2297
|
return this;
|
|
2298
|
-
const
|
|
2299
|
-
return p != null && typeof p == "object" && Object.keys(p).length > 0 && (
|
|
2298
|
+
const E = { retain: g };
|
|
2299
|
+
return p != null && typeof p == "object" && Object.keys(p).length > 0 && (E.attributes = p), this.push(E);
|
|
2300
2300
|
}
|
|
2301
2301
|
push(g) {
|
|
2302
|
-
let p = this.ops.length,
|
|
2303
|
-
if (g = s(g), typeof
|
|
2304
|
-
if (typeof g.delete == "number" && typeof
|
|
2305
|
-
return this.ops[p - 1] = { delete:
|
|
2306
|
-
if (typeof
|
|
2302
|
+
let p = this.ops.length, E = this.ops[p - 1];
|
|
2303
|
+
if (g = s(g), typeof E == "object") {
|
|
2304
|
+
if (typeof g.delete == "number" && typeof E.delete == "number")
|
|
2305
|
+
return this.ops[p - 1] = { delete: E.delete + g.delete }, this;
|
|
2306
|
+
if (typeof E.delete == "number" && g.insert != null && (p -= 1, E = this.ops[p - 1], typeof E != "object"))
|
|
2307
2307
|
return this.ops.unshift(g), this;
|
|
2308
|
-
if (n(g.attributes,
|
|
2309
|
-
if (typeof g.insert == "string" && typeof
|
|
2310
|
-
return this.ops[p - 1] = { insert:
|
|
2311
|
-
if (typeof g.retain == "number" && typeof
|
|
2312
|
-
return this.ops[p - 1] = { retain:
|
|
2308
|
+
if (n(g.attributes, E.attributes)) {
|
|
2309
|
+
if (typeof g.insert == "string" && typeof E.insert == "string")
|
|
2310
|
+
return this.ops[p - 1] = { insert: E.insert + g.insert }, typeof g.attributes == "object" && (this.ops[p - 1].attributes = g.attributes), this;
|
|
2311
|
+
if (typeof g.retain == "number" && typeof E.retain == "number")
|
|
2312
|
+
return this.ops[p - 1] = { retain: E.retain + g.retain }, typeof g.attributes == "object" && (this.ops[p - 1].attributes = g.attributes), this;
|
|
2313
2313
|
}
|
|
2314
2314
|
}
|
|
2315
2315
|
return p === this.ops.length ? this.ops.push(g) : this.ops.splice(p, 0, g), this;
|
|
@@ -2328,10 +2328,10 @@ function jl() {
|
|
|
2328
2328
|
return this.ops.map(g);
|
|
2329
2329
|
}
|
|
2330
2330
|
partition(g) {
|
|
2331
|
-
const p = [],
|
|
2332
|
-
return this.forEach((
|
|
2333
|
-
(g(
|
|
2334
|
-
}), [p,
|
|
2331
|
+
const p = [], E = [];
|
|
2332
|
+
return this.forEach((T) => {
|
|
2333
|
+
(g(T) ? p : E).push(T);
|
|
2334
|
+
}), [p, E];
|
|
2335
2335
|
}
|
|
2336
2336
|
reduce(g, p) {
|
|
2337
2337
|
return this.ops.reduce(g, p);
|
|
@@ -2343,50 +2343,50 @@ function jl() {
|
|
|
2343
2343
|
return this.reduce((g, p) => g + o.default.length(p), 0);
|
|
2344
2344
|
}
|
|
2345
2345
|
slice(g = 0, p = 1 / 0) {
|
|
2346
|
-
const
|
|
2347
|
-
let
|
|
2348
|
-
for (;
|
|
2349
|
-
let
|
|
2350
|
-
|
|
2346
|
+
const E = [], T = new c.default(this.ops);
|
|
2347
|
+
let y = 0;
|
|
2348
|
+
for (; y < p && T.hasNext(); ) {
|
|
2349
|
+
let x;
|
|
2350
|
+
y < g ? x = T.next(g - y) : (x = T.next(p - y), E.push(x)), y += o.default.length(x);
|
|
2351
2351
|
}
|
|
2352
|
-
return new m(
|
|
2352
|
+
return new m(E);
|
|
2353
2353
|
}
|
|
2354
2354
|
compose(g) {
|
|
2355
|
-
const p = new c.default(this.ops),
|
|
2356
|
-
if (
|
|
2357
|
-
let
|
|
2358
|
-
for (; p.peekType() === "insert" && p.peekLength() <=
|
|
2359
|
-
|
|
2360
|
-
|
|
2355
|
+
const p = new c.default(this.ops), E = new c.default(g.ops), T = [], y = E.peek();
|
|
2356
|
+
if (y != null && typeof y.retain == "number" && y.attributes == null) {
|
|
2357
|
+
let q = y.retain;
|
|
2358
|
+
for (; p.peekType() === "insert" && p.peekLength() <= q; )
|
|
2359
|
+
q -= p.peekLength(), T.push(p.next());
|
|
2360
|
+
y.retain - q > 0 && E.next(y.retain - q);
|
|
2361
2361
|
}
|
|
2362
|
-
const
|
|
2363
|
-
for (; p.hasNext() ||
|
|
2364
|
-
if (
|
|
2365
|
-
|
|
2362
|
+
const x = new m(T);
|
|
2363
|
+
for (; p.hasNext() || E.hasNext(); )
|
|
2364
|
+
if (E.peekType() === "insert")
|
|
2365
|
+
x.push(E.next());
|
|
2366
2366
|
else if (p.peekType() === "delete")
|
|
2367
|
-
|
|
2367
|
+
x.push(p.next());
|
|
2368
2368
|
else {
|
|
2369
|
-
const
|
|
2370
|
-
if (
|
|
2369
|
+
const q = Math.min(p.peekLength(), E.peekLength()), R = p.next(q), $ = E.next(q);
|
|
2370
|
+
if ($.retain) {
|
|
2371
2371
|
const H = {};
|
|
2372
|
-
if (typeof
|
|
2373
|
-
H.retain = typeof
|
|
2374
|
-
else if (typeof
|
|
2375
|
-
|
|
2372
|
+
if (typeof R.retain == "number")
|
|
2373
|
+
H.retain = typeof $.retain == "number" ? q : $.retain;
|
|
2374
|
+
else if (typeof $.retain == "number")
|
|
2375
|
+
R.retain == null ? H.insert = R.insert : H.retain = R.retain;
|
|
2376
2376
|
else {
|
|
2377
|
-
const lt =
|
|
2377
|
+
const lt = R.retain == null ? "insert" : "retain", [ut, _t, xt] = h(R[lt], $.retain), d = m.getHandler(ut);
|
|
2378
2378
|
H[lt] = {
|
|
2379
2379
|
[ut]: d.compose(_t, xt, lt === "retain")
|
|
2380
2380
|
};
|
|
2381
2381
|
}
|
|
2382
|
-
const nt = l.default.compose(
|
|
2383
|
-
if (nt && (H.attributes = nt),
|
|
2382
|
+
const nt = l.default.compose(R.attributes, $.attributes, typeof R.retain == "number");
|
|
2383
|
+
if (nt && (H.attributes = nt), x.push(H), !E.hasNext() && n(x.ops[x.ops.length - 1], H)) {
|
|
2384
2384
|
const lt = new m(p.rest());
|
|
2385
|
-
return
|
|
2385
|
+
return x.concat(lt).chop();
|
|
2386
2386
|
}
|
|
2387
|
-
} else typeof
|
|
2387
|
+
} else typeof $.delete == "number" && (typeof R.retain == "number" || typeof R.retain == "object" && R.retain !== null) && x.push($);
|
|
2388
2388
|
}
|
|
2389
|
-
return
|
|
2389
|
+
return x.chop();
|
|
2390
2390
|
}
|
|
2391
2391
|
concat(g) {
|
|
2392
2392
|
const p = new m(this.ops.slice());
|
|
@@ -2395,92 +2395,92 @@ function jl() {
|
|
|
2395
2395
|
diff(g, p) {
|
|
2396
2396
|
if (this.ops === g.ops)
|
|
2397
2397
|
return new m();
|
|
2398
|
-
const
|
|
2399
|
-
if (
|
|
2400
|
-
return typeof
|
|
2401
|
-
const H =
|
|
2398
|
+
const E = [this, g].map((R) => R.map(($) => {
|
|
2399
|
+
if ($.insert != null)
|
|
2400
|
+
return typeof $.insert == "string" ? $.insert : u;
|
|
2401
|
+
const H = R === g ? "on" : "with";
|
|
2402
2402
|
throw new Error("diff() called " + H + " non-document");
|
|
2403
|
-
}).join("")),
|
|
2404
|
-
return
|
|
2405
|
-
let
|
|
2406
|
-
for (;
|
|
2403
|
+
}).join("")), T = new m(), y = e(E[0], E[1], p, !0), x = new c.default(this.ops), q = new c.default(g.ops);
|
|
2404
|
+
return y.forEach((R) => {
|
|
2405
|
+
let $ = R[1].length;
|
|
2406
|
+
for (; $ > 0; ) {
|
|
2407
2407
|
let H = 0;
|
|
2408
|
-
switch (
|
|
2408
|
+
switch (R[0]) {
|
|
2409
2409
|
case e.INSERT:
|
|
2410
|
-
H = Math.min(
|
|
2410
|
+
H = Math.min(q.peekLength(), $), T.push(q.next(H));
|
|
2411
2411
|
break;
|
|
2412
2412
|
case e.DELETE:
|
|
2413
|
-
H = Math.min(
|
|
2413
|
+
H = Math.min($, x.peekLength()), x.next(H), T.delete(H);
|
|
2414
2414
|
break;
|
|
2415
2415
|
case e.EQUAL:
|
|
2416
|
-
H = Math.min(
|
|
2417
|
-
const nt =
|
|
2418
|
-
n(nt.insert, lt.insert) ?
|
|
2416
|
+
H = Math.min(x.peekLength(), q.peekLength(), $);
|
|
2417
|
+
const nt = x.next(H), lt = q.next(H);
|
|
2418
|
+
n(nt.insert, lt.insert) ? T.retain(H, l.default.diff(nt.attributes, lt.attributes)) : T.push(lt).delete(H);
|
|
2419
2419
|
break;
|
|
2420
2420
|
}
|
|
2421
|
-
|
|
2421
|
+
$ -= H;
|
|
2422
2422
|
}
|
|
2423
|
-
}),
|
|
2423
|
+
}), T.chop();
|
|
2424
2424
|
}
|
|
2425
2425
|
eachLine(g, p = `
|
|
2426
2426
|
`) {
|
|
2427
|
-
const
|
|
2428
|
-
let
|
|
2429
|
-
for (;
|
|
2430
|
-
if (
|
|
2427
|
+
const E = new c.default(this.ops);
|
|
2428
|
+
let T = new m(), y = 0;
|
|
2429
|
+
for (; E.hasNext(); ) {
|
|
2430
|
+
if (E.peekType() !== "insert")
|
|
2431
2431
|
return;
|
|
2432
|
-
const
|
|
2433
|
-
if (
|
|
2434
|
-
|
|
2435
|
-
else if (
|
|
2436
|
-
|
|
2432
|
+
const x = E.peek(), q = o.default.length(x) - E.peekLength(), R = typeof x.insert == "string" ? x.insert.indexOf(p, q) - q : -1;
|
|
2433
|
+
if (R < 0)
|
|
2434
|
+
T.push(E.next());
|
|
2435
|
+
else if (R > 0)
|
|
2436
|
+
T.push(E.next(R));
|
|
2437
2437
|
else {
|
|
2438
|
-
if (g(
|
|
2438
|
+
if (g(T, E.next(1).attributes || {}, y) === !1)
|
|
2439
2439
|
return;
|
|
2440
|
-
|
|
2440
|
+
y += 1, T = new m();
|
|
2441
2441
|
}
|
|
2442
2442
|
}
|
|
2443
|
-
|
|
2443
|
+
T.length() > 0 && g(T, {}, y);
|
|
2444
2444
|
}
|
|
2445
2445
|
invert(g) {
|
|
2446
2446
|
const p = new m();
|
|
2447
|
-
return this.reduce((
|
|
2448
|
-
if (
|
|
2449
|
-
p.delete(o.default.length(
|
|
2447
|
+
return this.reduce((E, T) => {
|
|
2448
|
+
if (T.insert)
|
|
2449
|
+
p.delete(o.default.length(T));
|
|
2450
2450
|
else {
|
|
2451
|
-
if (typeof
|
|
2452
|
-
return p.retain(
|
|
2453
|
-
if (
|
|
2454
|
-
const
|
|
2455
|
-
return g.slice(
|
|
2456
|
-
|
|
2457
|
-
}),
|
|
2458
|
-
} else if (typeof
|
|
2459
|
-
const
|
|
2460
|
-
return p.retain({ [
|
|
2451
|
+
if (typeof T.retain == "number" && T.attributes == null)
|
|
2452
|
+
return p.retain(T.retain), E + T.retain;
|
|
2453
|
+
if (T.delete || typeof T.retain == "number") {
|
|
2454
|
+
const y = T.delete || T.retain;
|
|
2455
|
+
return g.slice(E, E + y).forEach((q) => {
|
|
2456
|
+
T.delete ? p.push(q) : T.retain && T.attributes && p.retain(o.default.length(q), l.default.invert(T.attributes, q.attributes));
|
|
2457
|
+
}), E + y;
|
|
2458
|
+
} else if (typeof T.retain == "object" && T.retain !== null) {
|
|
2459
|
+
const y = g.slice(E, E + 1), x = new c.default(y.ops).next(), [q, R, $] = h(T.retain, x.insert), H = m.getHandler(q);
|
|
2460
|
+
return p.retain({ [q]: H.invert(R, $) }, l.default.invert(T.attributes, x.attributes)), E + 1;
|
|
2461
2461
|
}
|
|
2462
2462
|
}
|
|
2463
|
-
return
|
|
2463
|
+
return E;
|
|
2464
2464
|
}, 0), p.chop();
|
|
2465
2465
|
}
|
|
2466
2466
|
transform(g, p = !1) {
|
|
2467
2467
|
if (p = !!p, typeof g == "number")
|
|
2468
2468
|
return this.transformPosition(g, p);
|
|
2469
|
-
const
|
|
2470
|
-
for (;
|
|
2471
|
-
if (
|
|
2472
|
-
|
|
2473
|
-
else if (
|
|
2474
|
-
|
|
2469
|
+
const E = g, T = new c.default(this.ops), y = new c.default(E.ops), x = new m();
|
|
2470
|
+
for (; T.hasNext() || y.hasNext(); )
|
|
2471
|
+
if (T.peekType() === "insert" && (p || y.peekType() !== "insert"))
|
|
2472
|
+
x.retain(o.default.length(T.next()));
|
|
2473
|
+
else if (y.peekType() === "insert")
|
|
2474
|
+
x.push(y.next());
|
|
2475
2475
|
else {
|
|
2476
|
-
const
|
|
2477
|
-
if (
|
|
2476
|
+
const q = Math.min(T.peekLength(), y.peekLength()), R = T.next(q), $ = y.next(q);
|
|
2477
|
+
if (R.delete)
|
|
2478
2478
|
continue;
|
|
2479
|
-
if (
|
|
2480
|
-
|
|
2479
|
+
if ($.delete)
|
|
2480
|
+
x.push($);
|
|
2481
2481
|
else {
|
|
2482
|
-
const H =
|
|
2483
|
-
let lt = typeof nt == "object" && nt !== null ? nt :
|
|
2482
|
+
const H = R.retain, nt = $.retain;
|
|
2483
|
+
let lt = typeof nt == "object" && nt !== null ? nt : q;
|
|
2484
2484
|
if (typeof H == "object" && H !== null && typeof nt == "object" && nt !== null) {
|
|
2485
2485
|
const ut = Object.keys(H)[0];
|
|
2486
2486
|
if (ut === Object.keys(nt)[0]) {
|
|
@@ -2490,22 +2490,22 @@ function jl() {
|
|
|
2490
2490
|
});
|
|
2491
2491
|
}
|
|
2492
2492
|
}
|
|
2493
|
-
|
|
2493
|
+
x.retain(lt, l.default.transform(R.attributes, $.attributes, p));
|
|
2494
2494
|
}
|
|
2495
2495
|
}
|
|
2496
|
-
return
|
|
2496
|
+
return x.chop();
|
|
2497
2497
|
}
|
|
2498
2498
|
transformPosition(g, p = !1) {
|
|
2499
2499
|
p = !!p;
|
|
2500
|
-
const
|
|
2501
|
-
let
|
|
2502
|
-
for (;
|
|
2503
|
-
const
|
|
2504
|
-
if (
|
|
2505
|
-
g -= Math.min(
|
|
2500
|
+
const E = new c.default(this.ops);
|
|
2501
|
+
let T = 0;
|
|
2502
|
+
for (; E.hasNext() && T <= g; ) {
|
|
2503
|
+
const y = E.peekLength(), x = E.peekType();
|
|
2504
|
+
if (E.next(), x === "delete") {
|
|
2505
|
+
g -= Math.min(y, g - T);
|
|
2506
2506
|
continue;
|
|
2507
|
-
} else
|
|
2508
|
-
|
|
2507
|
+
} else x === "insert" && (T < g || !p) && (g += y);
|
|
2508
|
+
T += y;
|
|
2509
2509
|
}
|
|
2510
2510
|
return g;
|
|
2511
2511
|
}
|
|
@@ -2561,8 +2561,8 @@ const Gt = class Gt extends Or {
|
|
|
2561
2561
|
}
|
|
2562
2562
|
}
|
|
2563
2563
|
};
|
|
2564
|
-
|
|
2565
|
-
|
|
2564
|
+
_(Gt, "allowedChildren", [Gt, jt, wt, Ut]), // Lower index means deeper in the DOM tree, since not found (-1) is for embeds
|
|
2565
|
+
_(Gt, "order", [
|
|
2566
2566
|
"cursor",
|
|
2567
2567
|
"inline",
|
|
2568
2568
|
// Must be lower
|
|
@@ -2581,7 +2581,7 @@ const ii = 1;
|
|
|
2581
2581
|
class dt extends Ns {
|
|
2582
2582
|
constructor() {
|
|
2583
2583
|
super(...arguments);
|
|
2584
|
-
|
|
2584
|
+
_(this, "cache", {});
|
|
2585
2585
|
}
|
|
2586
2586
|
delta() {
|
|
2587
2587
|
return this.cache.delta == null && (this.cache.delta = Ui(this)), this.cache.delta;
|
|
@@ -2735,13 +2735,13 @@ const Lt = class Lt extends wt {
|
|
|
2735
2735
|
u = this.scroll.create(h), this.parent.insertBefore(u, this);
|
|
2736
2736
|
}
|
|
2737
2737
|
if (this.remove(), t) {
|
|
2738
|
-
const h = (g, p) => e && g === e.domNode ? p : g === o ? s + p - 1 : n && g === n.domNode ? s + c.length + p : null, m = h(t.start.node, t.start.offset),
|
|
2739
|
-
if (m !== null &&
|
|
2738
|
+
const h = (g, p) => e && g === e.domNode ? p : g === o ? s + p - 1 : n && g === n.domNode ? s + c.length + p : null, m = h(t.start.node, t.start.offset), v = h(t.end.node, t.end.offset);
|
|
2739
|
+
if (m !== null && v !== null)
|
|
2740
2740
|
return {
|
|
2741
2741
|
startNode: u.domNode,
|
|
2742
2742
|
startOffset: m,
|
|
2743
2743
|
endNode: u.domNode,
|
|
2744
|
-
endOffset:
|
|
2744
|
+
endOffset: v
|
|
2745
2745
|
};
|
|
2746
2746
|
}
|
|
2747
2747
|
return null;
|
|
@@ -2779,7 +2779,7 @@ const Lt = class Lt extends wt {
|
|
|
2779
2779
|
return "";
|
|
2780
2780
|
}
|
|
2781
2781
|
};
|
|
2782
|
-
|
|
2782
|
+
_(Lt, "blotName", "cursor"), _(Lt, "className", "ql-cursor"), _(Lt, "tagName", "span"), _(Lt, "CONTENTS", "\uFEFF");
|
|
2783
2783
|
let Ke = Lt;
|
|
2784
2784
|
var lr = { exports: {} }, li;
|
|
2785
2785
|
function Hl() {
|
|
@@ -2791,11 +2791,11 @@ function Hl() {
|
|
|
2791
2791
|
function n(u, h, m) {
|
|
2792
2792
|
this.fn = u, this.context = h, this.once = m || !1;
|
|
2793
2793
|
}
|
|
2794
|
-
function l(u, h, m,
|
|
2794
|
+
function l(u, h, m, v, g) {
|
|
2795
2795
|
if (typeof m != "function")
|
|
2796
2796
|
throw new TypeError("The listener must be a function");
|
|
2797
|
-
var p = new n(m,
|
|
2798
|
-
return u._events[
|
|
2797
|
+
var p = new n(m, v || u, g), E = e ? e + h : h;
|
|
2798
|
+
return u._events[E] ? u._events[E].fn ? u._events[E] = [u._events[E], p] : u._events[E].push(p) : (u._events[E] = p, u._eventsCount++), u;
|
|
2799
2799
|
}
|
|
2800
2800
|
function o(u, h) {
|
|
2801
2801
|
--u._eventsCount === 0 ? u._events = new s() : delete u._events[h];
|
|
@@ -2804,82 +2804,82 @@ function Hl() {
|
|
|
2804
2804
|
this._events = new s(), this._eventsCount = 0;
|
|
2805
2805
|
}
|
|
2806
2806
|
c.prototype.eventNames = function() {
|
|
2807
|
-
var h = [], m,
|
|
2807
|
+
var h = [], m, v;
|
|
2808
2808
|
if (this._eventsCount === 0) return h;
|
|
2809
|
-
for (
|
|
2810
|
-
t.call(m,
|
|
2809
|
+
for (v in m = this._events)
|
|
2810
|
+
t.call(m, v) && h.push(e ? v.slice(1) : v);
|
|
2811
2811
|
return Object.getOwnPropertySymbols ? h.concat(Object.getOwnPropertySymbols(m)) : h;
|
|
2812
2812
|
}, c.prototype.listeners = function(h) {
|
|
2813
|
-
var m = e ? e + h : h,
|
|
2814
|
-
if (!
|
|
2815
|
-
if (
|
|
2816
|
-
for (var g = 0, p =
|
|
2817
|
-
|
|
2818
|
-
return
|
|
2813
|
+
var m = e ? e + h : h, v = this._events[m];
|
|
2814
|
+
if (!v) return [];
|
|
2815
|
+
if (v.fn) return [v.fn];
|
|
2816
|
+
for (var g = 0, p = v.length, E = new Array(p); g < p; g++)
|
|
2817
|
+
E[g] = v[g].fn;
|
|
2818
|
+
return E;
|
|
2819
2819
|
}, c.prototype.listenerCount = function(h) {
|
|
2820
|
-
var m = e ? e + h : h,
|
|
2821
|
-
return
|
|
2822
|
-
}, c.prototype.emit = function(h, m,
|
|
2823
|
-
var
|
|
2824
|
-
if (!this._events[
|
|
2825
|
-
var
|
|
2826
|
-
if (
|
|
2827
|
-
switch (
|
|
2820
|
+
var m = e ? e + h : h, v = this._events[m];
|
|
2821
|
+
return v ? v.fn ? 1 : v.length : 0;
|
|
2822
|
+
}, c.prototype.emit = function(h, m, v, g, p, E) {
|
|
2823
|
+
var T = e ? e + h : h;
|
|
2824
|
+
if (!this._events[T]) return !1;
|
|
2825
|
+
var y = this._events[T], x = arguments.length, q, R;
|
|
2826
|
+
if (y.fn) {
|
|
2827
|
+
switch (y.once && this.removeListener(h, y.fn, void 0, !0), x) {
|
|
2828
2828
|
case 1:
|
|
2829
|
-
return
|
|
2829
|
+
return y.fn.call(y.context), !0;
|
|
2830
2830
|
case 2:
|
|
2831
|
-
return
|
|
2831
|
+
return y.fn.call(y.context, m), !0;
|
|
2832
2832
|
case 3:
|
|
2833
|
-
return
|
|
2833
|
+
return y.fn.call(y.context, m, v), !0;
|
|
2834
2834
|
case 4:
|
|
2835
|
-
return
|
|
2835
|
+
return y.fn.call(y.context, m, v, g), !0;
|
|
2836
2836
|
case 5:
|
|
2837
|
-
return
|
|
2837
|
+
return y.fn.call(y.context, m, v, g, p), !0;
|
|
2838
2838
|
case 6:
|
|
2839
|
-
return
|
|
2839
|
+
return y.fn.call(y.context, m, v, g, p, E), !0;
|
|
2840
2840
|
}
|
|
2841
|
-
for (
|
|
2842
|
-
|
|
2843
|
-
|
|
2841
|
+
for (R = 1, q = new Array(x - 1); R < x; R++)
|
|
2842
|
+
q[R - 1] = arguments[R];
|
|
2843
|
+
y.fn.apply(y.context, q);
|
|
2844
2844
|
} else {
|
|
2845
|
-
var
|
|
2846
|
-
for (
|
|
2847
|
-
switch (
|
|
2845
|
+
var $ = y.length, H;
|
|
2846
|
+
for (R = 0; R < $; R++)
|
|
2847
|
+
switch (y[R].once && this.removeListener(h, y[R].fn, void 0, !0), x) {
|
|
2848
2848
|
case 1:
|
|
2849
|
-
|
|
2849
|
+
y[R].fn.call(y[R].context);
|
|
2850
2850
|
break;
|
|
2851
2851
|
case 2:
|
|
2852
|
-
|
|
2852
|
+
y[R].fn.call(y[R].context, m);
|
|
2853
2853
|
break;
|
|
2854
2854
|
case 3:
|
|
2855
|
-
|
|
2855
|
+
y[R].fn.call(y[R].context, m, v);
|
|
2856
2856
|
break;
|
|
2857
2857
|
case 4:
|
|
2858
|
-
|
|
2858
|
+
y[R].fn.call(y[R].context, m, v, g);
|
|
2859
2859
|
break;
|
|
2860
2860
|
default:
|
|
2861
|
-
if (!
|
|
2862
|
-
|
|
2863
|
-
|
|
2861
|
+
if (!q) for (H = 1, q = new Array(x - 1); H < x; H++)
|
|
2862
|
+
q[H - 1] = arguments[H];
|
|
2863
|
+
y[R].fn.apply(y[R].context, q);
|
|
2864
2864
|
}
|
|
2865
2865
|
}
|
|
2866
2866
|
return !0;
|
|
2867
|
-
}, c.prototype.on = function(h, m,
|
|
2868
|
-
return l(this, h, m,
|
|
2869
|
-
}, c.prototype.once = function(h, m,
|
|
2870
|
-
return l(this, h, m,
|
|
2871
|
-
}, c.prototype.removeListener = function(h, m,
|
|
2867
|
+
}, c.prototype.on = function(h, m, v) {
|
|
2868
|
+
return l(this, h, m, v, !1);
|
|
2869
|
+
}, c.prototype.once = function(h, m, v) {
|
|
2870
|
+
return l(this, h, m, v, !0);
|
|
2871
|
+
}, c.prototype.removeListener = function(h, m, v, g) {
|
|
2872
2872
|
var p = e ? e + h : h;
|
|
2873
2873
|
if (!this._events[p]) return this;
|
|
2874
2874
|
if (!m)
|
|
2875
2875
|
return o(this, p), this;
|
|
2876
|
-
var
|
|
2877
|
-
if (
|
|
2878
|
-
|
|
2876
|
+
var E = this._events[p];
|
|
2877
|
+
if (E.fn)
|
|
2878
|
+
E.fn === m && (!g || E.once) && (!v || E.context === v) && o(this, p);
|
|
2879
2879
|
else {
|
|
2880
|
-
for (var
|
|
2881
|
-
(
|
|
2882
|
-
|
|
2880
|
+
for (var T = 0, y = [], x = E.length; T < x; T++)
|
|
2881
|
+
(E[T].fn !== m || g && !E[T].once || v && E[T].context !== v) && y.push(E[T]);
|
|
2882
|
+
y.length ? this._events[p] = y.length === 1 ? y[0] : y : o(this, p);
|
|
2883
2883
|
}
|
|
2884
2884
|
return this;
|
|
2885
2885
|
}, c.prototype.removeAllListeners = function(h) {
|
|
@@ -2916,7 +2916,7 @@ Vl.forEach((i) => {
|
|
|
2916
2916
|
});
|
|
2917
2917
|
});
|
|
2918
2918
|
});
|
|
2919
|
-
class
|
|
2919
|
+
class I extends zl {
|
|
2920
2920
|
constructor() {
|
|
2921
2921
|
super(), this.domListeners = {}, this.on("error", or.error);
|
|
2922
2922
|
}
|
|
@@ -2943,7 +2943,7 @@ class R extends zl {
|
|
|
2943
2943
|
});
|
|
2944
2944
|
}
|
|
2945
2945
|
}
|
|
2946
|
-
|
|
2946
|
+
_(I, "events", {
|
|
2947
2947
|
EDITOR_CHANGE: "editor-change",
|
|
2948
2948
|
SCROLL_BEFORE_UPDATE: "scroll-before-update",
|
|
2949
2949
|
SCROLL_BLOT_MOUNT: "scroll-blot-mount",
|
|
@@ -2957,7 +2957,7 @@ C(R, "events", {
|
|
|
2957
2957
|
COMPOSITION_START: "composition-start",
|
|
2958
2958
|
COMPOSITION_BEFORE_END: "composition-before-end",
|
|
2959
2959
|
COMPOSITION_END: "composition-end"
|
|
2960
|
-
}),
|
|
2960
|
+
}), _(I, "sources", {
|
|
2961
2961
|
API: "api",
|
|
2962
2962
|
SILENT: "silent",
|
|
2963
2963
|
USER: "user"
|
|
@@ -2972,19 +2972,19 @@ class Ee {
|
|
|
2972
2972
|
class Kl {
|
|
2973
2973
|
constructor(t, e) {
|
|
2974
2974
|
this.emitter = e, this.scroll = t, this.composing = !1, this.mouseDown = !1, this.root = this.scroll.domNode, this.cursor = this.scroll.create("cursor", this), this.savedRange = new Ee(0, 0), this.lastRange = this.savedRange, this.lastNative = null, this.handleComposition(), this.handleDragging(), this.emitter.listenDOM("selectionchange", document, () => {
|
|
2975
|
-
!this.mouseDown && !this.composing && setTimeout(this.update.bind(this,
|
|
2976
|
-
}), this.emitter.on(
|
|
2975
|
+
!this.mouseDown && !this.composing && setTimeout(this.update.bind(this, I.sources.USER), 1);
|
|
2976
|
+
}), this.emitter.on(I.events.SCROLL_BEFORE_UPDATE, () => {
|
|
2977
2977
|
if (!this.hasFocus()) return;
|
|
2978
2978
|
const s = this.getNativeRange();
|
|
2979
|
-
s != null && s.start.node !== this.cursor.textNode && this.emitter.once(
|
|
2979
|
+
s != null && s.start.node !== this.cursor.textNode && this.emitter.once(I.events.SCROLL_UPDATE, (n, l) => {
|
|
2980
2980
|
try {
|
|
2981
2981
|
this.root.contains(s.start.node) && this.root.contains(s.end.node) && this.setNativeRange(s.start.node, s.start.offset, s.end.node, s.end.offset);
|
|
2982
2982
|
const o = l.some((c) => c.type === "characterData" || c.type === "childList" || c.type === "attributes" && c.target === this.root);
|
|
2983
|
-
this.update(o ?
|
|
2983
|
+
this.update(o ? I.sources.SILENT : n);
|
|
2984
2984
|
} catch {
|
|
2985
2985
|
}
|
|
2986
2986
|
});
|
|
2987
|
-
}), this.emitter.on(
|
|
2987
|
+
}), this.emitter.on(I.events.SCROLL_OPTIMIZE, (s, n) => {
|
|
2988
2988
|
if (n.range) {
|
|
2989
2989
|
const {
|
|
2990
2990
|
startNode: l,
|
|
@@ -2992,14 +2992,14 @@ class Kl {
|
|
|
2992
2992
|
endNode: c,
|
|
2993
2993
|
endOffset: u
|
|
2994
2994
|
} = n.range;
|
|
2995
|
-
this.setNativeRange(l, o, c, u), this.update(
|
|
2995
|
+
this.setNativeRange(l, o, c, u), this.update(I.sources.SILENT);
|
|
2996
2996
|
}
|
|
2997
|
-
}), this.update(
|
|
2997
|
+
}), this.update(I.sources.SILENT);
|
|
2998
2998
|
}
|
|
2999
2999
|
handleComposition() {
|
|
3000
|
-
this.emitter.on(
|
|
3000
|
+
this.emitter.on(I.events.COMPOSITION_BEFORE_START, () => {
|
|
3001
3001
|
this.composing = !0;
|
|
3002
|
-
}), this.emitter.on(
|
|
3002
|
+
}), this.emitter.on(I.events.COMPOSITION_END, () => {
|
|
3003
3003
|
if (this.composing = !1, this.cursor.parent) {
|
|
3004
3004
|
const t = this.cursor.restore();
|
|
3005
3005
|
if (!t) return;
|
|
@@ -3013,7 +3013,7 @@ class Kl {
|
|
|
3013
3013
|
this.emitter.listenDOM("mousedown", document.body, () => {
|
|
3014
3014
|
this.mouseDown = !0;
|
|
3015
3015
|
}), this.emitter.listenDOM("mouseup", document.body, () => {
|
|
3016
|
-
this.mouseDown = !1, this.update(
|
|
3016
|
+
this.mouseDown = !1, this.update(I.sources.USER);
|
|
3017
3017
|
});
|
|
3018
3018
|
}
|
|
3019
3019
|
focus() {
|
|
@@ -3047,8 +3047,8 @@ class Kl {
|
|
|
3047
3047
|
if (e > 0 && o === l.length()) {
|
|
3048
3048
|
const [m] = this.scroll.leaf(t + 1);
|
|
3049
3049
|
if (m) {
|
|
3050
|
-
const [
|
|
3051
|
-
|
|
3050
|
+
const [v] = this.scroll.line(t), [g] = this.scroll.line(t + 1);
|
|
3051
|
+
v === g && (l = m, o = 0);
|
|
3052
3052
|
}
|
|
3053
3053
|
}
|
|
3054
3054
|
[n, o] = l.position(o, !0);
|
|
@@ -3160,7 +3160,7 @@ class Kl {
|
|
|
3160
3160
|
o.removeAllRanges(), this.root.blur();
|
|
3161
3161
|
}
|
|
3162
3162
|
setRange(t) {
|
|
3163
|
-
let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] :
|
|
3163
|
+
let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : I.sources.API;
|
|
3164
3164
|
if (typeof e == "string" && (s = e, e = !1), ar.info("setRange", t), t != null) {
|
|
3165
3165
|
const n = this.rangeToNative(t);
|
|
3166
3166
|
this.setNativeRange(...n, e);
|
|
@@ -3169,15 +3169,15 @@ class Kl {
|
|
|
3169
3169
|
this.update(s);
|
|
3170
3170
|
}
|
|
3171
3171
|
update() {
|
|
3172
|
-
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] :
|
|
3172
|
+
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : I.sources.USER;
|
|
3173
3173
|
const e = this.lastRange, [s, n] = this.getRange();
|
|
3174
3174
|
if (this.lastRange = s, this.lastNative = n, this.lastRange != null && (this.savedRange = this.lastRange), !_r(e, this.lastRange)) {
|
|
3175
3175
|
if (!this.composing && n != null && n.native.collapsed && n.start.node !== this.cursor.textNode) {
|
|
3176
3176
|
const o = this.cursor.restore();
|
|
3177
3177
|
o && this.setNativeRange(o.startNode, o.startOffset, o.endNode, o.endOffset);
|
|
3178
3178
|
}
|
|
3179
|
-
const l = [
|
|
3180
|
-
this.emitter.emit(
|
|
3179
|
+
const l = [I.events.SELECTION_CHANGE, He(this.lastRange), He(e), t];
|
|
3180
|
+
this.emitter.emit(I.events.EDITOR_CHANGE, ...l), t !== I.sources.SILENT && this.emitter.emit(...l);
|
|
3181
3181
|
}
|
|
3182
3182
|
}
|
|
3183
3183
|
}
|
|
@@ -3201,48 +3201,48 @@ class Zl {
|
|
|
3201
3201
|
const s = oi(t), n = new M();
|
|
3202
3202
|
return Xl(s.ops.slice()).reduce((o, c) => {
|
|
3203
3203
|
const u = Ct.Op.length(c);
|
|
3204
|
-
let h = c.attributes || {}, m = !1,
|
|
3204
|
+
let h = c.attributes || {}, m = !1, v = !1;
|
|
3205
3205
|
if (c.insert != null) {
|
|
3206
3206
|
if (n.retain(u), typeof c.insert == "string") {
|
|
3207
|
-
const
|
|
3208
|
-
|
|
3209
|
-
`) && (e <= o || !!this.scroll.descendant(kt, o)[0]), this.scroll.insertAt(o,
|
|
3210
|
-
const [
|
|
3211
|
-
let
|
|
3212
|
-
if (
|
|
3213
|
-
const [
|
|
3214
|
-
|
|
3207
|
+
const E = c.insert;
|
|
3208
|
+
v = !E.endsWith(`
|
|
3209
|
+
`) && (e <= o || !!this.scroll.descendant(kt, o)[0]), this.scroll.insertAt(o, E);
|
|
3210
|
+
const [T, y] = this.scroll.line(o);
|
|
3211
|
+
let x = he({}, qt(T));
|
|
3212
|
+
if (T instanceof dt) {
|
|
3213
|
+
const [q] = T.descendant(yt, y);
|
|
3214
|
+
q && (x = he(x, qt(q)));
|
|
3215
3215
|
}
|
|
3216
|
-
h = Ct.AttributeMap.diff(
|
|
3216
|
+
h = Ct.AttributeMap.diff(x, h) || {};
|
|
3217
3217
|
} else if (typeof c.insert == "object") {
|
|
3218
|
-
const
|
|
3219
|
-
if (
|
|
3220
|
-
const
|
|
3221
|
-
if (
|
|
3222
|
-
(e <= o || this.scroll.descendant(kt, o)[0]) && (
|
|
3218
|
+
const E = Object.keys(c.insert)[0];
|
|
3219
|
+
if (E == null) return o;
|
|
3220
|
+
const T = this.scroll.query(E, D.INLINE) != null;
|
|
3221
|
+
if (T)
|
|
3222
|
+
(e <= o || this.scroll.descendant(kt, o)[0]) && (v = !0);
|
|
3223
3223
|
else if (o > 0) {
|
|
3224
|
-
const [
|
|
3225
|
-
|
|
3226
|
-
` && (m = !0) :
|
|
3224
|
+
const [y, x] = this.scroll.descendant(yt, o - 1);
|
|
3225
|
+
y instanceof Ut ? y.value()[x] !== `
|
|
3226
|
+
` && (m = !0) : y instanceof wt && y.statics.scope === D.INLINE_BLOT && (m = !0);
|
|
3227
3227
|
}
|
|
3228
|
-
if (this.scroll.insertAt(o,
|
|
3229
|
-
const [
|
|
3230
|
-
if (
|
|
3231
|
-
const
|
|
3232
|
-
h = Ct.AttributeMap.diff(
|
|
3228
|
+
if (this.scroll.insertAt(o, E, c.insert[E]), T) {
|
|
3229
|
+
const [y] = this.scroll.descendant(yt, o);
|
|
3230
|
+
if (y) {
|
|
3231
|
+
const x = he({}, qt(y));
|
|
3232
|
+
h = Ct.AttributeMap.diff(x, h) || {};
|
|
3233
3233
|
}
|
|
3234
3234
|
}
|
|
3235
3235
|
}
|
|
3236
3236
|
e += u;
|
|
3237
3237
|
} else if (n.push(c), c.retain !== null && typeof c.retain == "object") {
|
|
3238
|
-
const
|
|
3239
|
-
if (
|
|
3240
|
-
this.scroll.updateEmbedAt(o,
|
|
3238
|
+
const E = Object.keys(c.retain)[0];
|
|
3239
|
+
if (E == null) return o;
|
|
3240
|
+
this.scroll.updateEmbedAt(o, E, c.retain[E]);
|
|
3241
3241
|
}
|
|
3242
|
-
Object.keys(h).forEach((
|
|
3243
|
-
this.scroll.formatAt(o, u,
|
|
3242
|
+
Object.keys(h).forEach((E) => {
|
|
3243
|
+
this.scroll.formatAt(o, u, E, h[E]);
|
|
3244
3244
|
});
|
|
3245
|
-
const g = m ? 1 : 0, p =
|
|
3245
|
+
const g = m ? 1 : 0, p = v ? 1 : 0;
|
|
3246
3246
|
return e += g + p, n.retain(g), n.delete(p), o + u + g + p;
|
|
3247
3247
|
}, 0), n.reduce((o, c) => typeof c.delete == "number" ? (this.scroll.deleteAt(o, c.delete), o) : o + Ct.Op.length(c), 0), this.scroll.batchEnd(), this.scroll.optimize(), this.update(s);
|
|
3248
3248
|
}
|
|
@@ -3344,11 +3344,11 @@ class Zl {
|
|
|
3344
3344
|
const n = this.delta;
|
|
3345
3345
|
if (e.length === 1 && e[0].type === "characterData" && // @ts-expect-error Fix me later
|
|
3346
3346
|
e[0].target.data.match(Gl) && this.scroll.find(e[0].target)) {
|
|
3347
|
-
const l = this.scroll.find(e[0].target), o = qt(l), c = l.offset(this.scroll), u = e[0].oldValue.replace(Ke.CONTENTS, ""), h = new M().insert(u), m = new M().insert(l.value()),
|
|
3347
|
+
const l = this.scroll.find(e[0].target), o = qt(l), c = l.offset(this.scroll), u = e[0].oldValue.replace(Ke.CONTENTS, ""), h = new M().insert(u), m = new M().insert(l.value()), v = s && {
|
|
3348
3348
|
oldRange: ai(s.oldRange, -c),
|
|
3349
3349
|
newRange: ai(s.newRange, -c)
|
|
3350
3350
|
};
|
|
3351
|
-
t = new M().retain(c).concat(h.diff(m,
|
|
3351
|
+
t = new M().retain(c).concat(h.diff(m, v)).reduce((p, E) => E.insert ? p.insert(E.insert, o) : p.push(E), new M()), this.delta = n.compose(t);
|
|
3352
3352
|
} else
|
|
3353
3353
|
this.delta = this.getDelta(), (!t || !_r(n.compose(t), this.delta)) && (t = n.diff(this.delta, s));
|
|
3354
3354
|
return t;
|
|
@@ -3368,8 +3368,8 @@ function je(i, t, e) {
|
|
|
3368
3368
|
}, ...u] = i, [h, m] = ur(c);
|
|
3369
3369
|
if (o > t)
|
|
3370
3370
|
return e.push(c), o === t + 1 ? `<${h}><li${m}>${As(s, n, l)}${je(u, o, e)}` : `<${h}><li>${je(i, t + 1, e)}`;
|
|
3371
|
-
const
|
|
3372
|
-
if (o === t && c ===
|
|
3371
|
+
const v = e[e.length - 1];
|
|
3372
|
+
if (o === t && c === v)
|
|
3373
3373
|
return `</li><li${m}>${As(s, n, l)}${je(u, o, e)}`;
|
|
3374
3374
|
const [g] = ur(e.pop());
|
|
3375
3375
|
return `</li></${g}>${je(i, t - 1, e)}`;
|
|
@@ -3383,11 +3383,11 @@ function As(i, t, e) {
|
|
|
3383
3383
|
if (i instanceof Dt) {
|
|
3384
3384
|
if (i.statics.blotName === "list-container") {
|
|
3385
3385
|
const h = [];
|
|
3386
|
-
return i.children.forEachAt(t, e, (m,
|
|
3386
|
+
return i.children.forEachAt(t, e, (m, v, g) => {
|
|
3387
3387
|
const p = "formats" in m && typeof m.formats == "function" ? m.formats() : {};
|
|
3388
3388
|
h.push({
|
|
3389
3389
|
child: m,
|
|
3390
|
-
offset:
|
|
3390
|
+
offset: v,
|
|
3391
3391
|
length: g,
|
|
3392
3392
|
indent: p.indent || 0,
|
|
3393
3393
|
type: p.list
|
|
@@ -3395,8 +3395,8 @@ function As(i, t, e) {
|
|
|
3395
3395
|
}), je(h, -1, []);
|
|
3396
3396
|
}
|
|
3397
3397
|
const n = [];
|
|
3398
|
-
if (i.children.forEachAt(t, e, (h, m,
|
|
3399
|
-
n.push(As(h, m,
|
|
3398
|
+
if (i.children.forEachAt(t, e, (h, m, v) => {
|
|
3399
|
+
n.push(As(h, m, v));
|
|
3400
3400
|
}), s || i.statics.blotName === "list")
|
|
3401
3401
|
return n.join("");
|
|
3402
3402
|
const {
|
|
@@ -3465,7 +3465,7 @@ class $t {
|
|
|
3465
3465
|
this.quill = t, this.options = e;
|
|
3466
3466
|
}
|
|
3467
3467
|
}
|
|
3468
|
-
|
|
3468
|
+
_($t, "DEFAULTS", {});
|
|
3469
3469
|
const Qs = "\uFEFF";
|
|
3470
3470
|
class un extends wt {
|
|
3471
3471
|
constructor(t, e) {
|
|
@@ -3511,7 +3511,7 @@ class un extends wt {
|
|
|
3511
3511
|
}
|
|
3512
3512
|
class Yl {
|
|
3513
3513
|
constructor(t, e) {
|
|
3514
|
-
|
|
3514
|
+
_(this, "isComposing", !1);
|
|
3515
3515
|
this.scroll = t, this.emitter = e, this.setupListeners();
|
|
3516
3516
|
}
|
|
3517
3517
|
setupListeners() {
|
|
@@ -3525,15 +3525,15 @@ class Yl {
|
|
|
3525
3525
|
}
|
|
3526
3526
|
handleCompositionStart(t) {
|
|
3527
3527
|
const e = t.target instanceof Node ? this.scroll.find(t.target, !0) : null;
|
|
3528
|
-
e && !(e instanceof un) && (this.emitter.emit(
|
|
3528
|
+
e && !(e instanceof un) && (this.emitter.emit(I.events.COMPOSITION_BEFORE_START, t), this.scroll.batchStart(), this.emitter.emit(I.events.COMPOSITION_START, t), this.isComposing = !0);
|
|
3529
3529
|
}
|
|
3530
3530
|
handleCompositionEnd(t) {
|
|
3531
|
-
this.emitter.emit(
|
|
3531
|
+
this.emitter.emit(I.events.COMPOSITION_BEFORE_END, t), this.scroll.batchEnd(), this.emitter.emit(I.events.COMPOSITION_END, t), this.isComposing = !1;
|
|
3532
3532
|
}
|
|
3533
3533
|
}
|
|
3534
3534
|
const vs = class vs {
|
|
3535
3535
|
constructor(t, e) {
|
|
3536
|
-
|
|
3536
|
+
_(this, "modules", {});
|
|
3537
3537
|
this.quill = t, this.options = e;
|
|
3538
3538
|
}
|
|
3539
3539
|
init() {
|
|
@@ -3546,9 +3546,9 @@ const vs = class vs {
|
|
|
3546
3546
|
return this.modules[t] = new e(this.quill, this.options.modules[t] || {}), this.modules[t];
|
|
3547
3547
|
}
|
|
3548
3548
|
};
|
|
3549
|
-
|
|
3549
|
+
_(vs, "DEFAULTS", {
|
|
3550
3550
|
modules: {}
|
|
3551
|
-
}),
|
|
3551
|
+
}), _(vs, "themes", {
|
|
3552
3552
|
default: vs
|
|
3553
3553
|
});
|
|
3554
3554
|
let Ge = vs;
|
|
@@ -3573,22 +3573,22 @@ const Ql = (i) => i.parentElement || i.getRootNode().host || null, Jl = (i) => {
|
|
|
3573
3573
|
right: ((l = window.visualViewport) == null ? void 0 : l.width) ?? e.documentElement.clientWidth,
|
|
3574
3574
|
bottom: ((o = window.visualViewport) == null ? void 0 : o.height) ?? e.documentElement.clientHeight,
|
|
3575
3575
|
left: 0
|
|
3576
|
-
} : Jl(n), m = getComputedStyle(n),
|
|
3577
|
-
if (
|
|
3576
|
+
} : Jl(n), m = getComputedStyle(n), v = ci(s.left, s.right, h.left, h.right, Js(m.scrollPaddingLeft), Js(m.scrollPaddingRight)), g = ci(s.top, s.bottom, h.top, h.bottom, Js(m.scrollPaddingTop), Js(m.scrollPaddingBottom));
|
|
3577
|
+
if (v || g)
|
|
3578
3578
|
if (u)
|
|
3579
|
-
(c = e.defaultView) == null || c.scrollBy(
|
|
3579
|
+
(c = e.defaultView) == null || c.scrollBy(v, g);
|
|
3580
3580
|
else {
|
|
3581
3581
|
const {
|
|
3582
3582
|
scrollLeft: p,
|
|
3583
|
-
scrollTop:
|
|
3583
|
+
scrollTop: E
|
|
3584
3584
|
} = n;
|
|
3585
|
-
g && (n.scrollTop += g),
|
|
3586
|
-
const
|
|
3585
|
+
g && (n.scrollTop += g), v && (n.scrollLeft += v);
|
|
3586
|
+
const T = n.scrollLeft - p, y = n.scrollTop - E;
|
|
3587
3587
|
s = {
|
|
3588
|
-
left: s.left -
|
|
3589
|
-
top: s.top -
|
|
3590
|
-
right: s.right -
|
|
3591
|
-
bottom: s.bottom -
|
|
3588
|
+
left: s.left - T,
|
|
3589
|
+
top: s.top - y,
|
|
3590
|
+
right: s.right - T,
|
|
3591
|
+
bottom: s.bottom - y
|
|
3592
3592
|
};
|
|
3593
3593
|
}
|
|
3594
3594
|
n = u || m.position === "fixed" ? null : Ql(n);
|
|
@@ -3640,30 +3640,30 @@ const Bt = class Bt {
|
|
|
3640
3640
|
}
|
|
3641
3641
|
this.options.debug && Bt.debug(this.options.debug);
|
|
3642
3642
|
const s = this.container.innerHTML.trim();
|
|
3643
|
-
this.container.classList.add("ql-container"), this.container.innerHTML = "", vr.set(this.container, this), this.root = this.addContainer("ql-editor"), this.root.classList.add("ql-blank"), this.emitter = new
|
|
3643
|
+
this.container.classList.add("ql-container"), this.container.innerHTML = "", vr.set(this.container, this), this.root = this.addContainer("ql-editor"), this.root.classList.add("ql-blank"), this.emitter = new I();
|
|
3644
3644
|
const n = Ir.blotName, l = this.options.registry.query(n);
|
|
3645
3645
|
if (!l || !("blotName" in l))
|
|
3646
3646
|
throw new Error(`Cannot initialize Quill without "${n}" blot`);
|
|
3647
3647
|
if (this.scroll = new l(this.options.registry, this.root, {
|
|
3648
3648
|
emitter: this.emitter
|
|
3649
|
-
}), this.editor = new Zl(this.scroll), this.selection = new Kl(this.scroll, this.emitter), this.composition = new Yl(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.uploader = this.theme.addModule("uploader"), this.theme.addModule("input"), this.theme.addModule("uiNode"), this.theme.init(), this.emitter.on(
|
|
3650
|
-
o ===
|
|
3651
|
-
}), this.emitter.on(
|
|
3649
|
+
}), this.editor = new Zl(this.scroll), this.selection = new Kl(this.scroll, this.emitter), this.composition = new Yl(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.uploader = this.theme.addModule("uploader"), this.theme.addModule("input"), this.theme.addModule("uiNode"), this.theme.init(), this.emitter.on(I.events.EDITOR_CHANGE, (o) => {
|
|
3650
|
+
o === I.events.TEXT_CHANGE && this.root.classList.toggle("ql-blank", this.editor.isBlank());
|
|
3651
|
+
}), this.emitter.on(I.events.SCROLL_UPDATE, (o, c) => {
|
|
3652
3652
|
const u = this.selection.lastRange, [h] = this.selection.getRange(), m = u && h ? {
|
|
3653
3653
|
oldRange: u,
|
|
3654
3654
|
newRange: h
|
|
3655
3655
|
} : void 0;
|
|
3656
3656
|
Rt.call(this, () => this.editor.update(null, c, m), o);
|
|
3657
|
-
}), this.emitter.on(
|
|
3657
|
+
}), this.emitter.on(I.events.SCROLL_EMBED_UPDATE, (o, c) => {
|
|
3658
3658
|
const u = this.selection.lastRange, [h] = this.selection.getRange(), m = u && h ? {
|
|
3659
3659
|
oldRange: u,
|
|
3660
3660
|
newRange: h
|
|
3661
3661
|
} : void 0;
|
|
3662
3662
|
Rt.call(this, () => {
|
|
3663
|
-
const
|
|
3663
|
+
const v = new M().retain(o.offset(this)).retain({
|
|
3664
3664
|
[o.statics.blotName]: c
|
|
3665
3665
|
});
|
|
3666
|
-
return this.editor.update(
|
|
3666
|
+
return this.editor.update(v, [], m);
|
|
3667
3667
|
}, Bt.sources.USER);
|
|
3668
3668
|
}), s) {
|
|
3669
3669
|
const o = this.clipboard.convert({
|
|
@@ -3706,7 +3706,7 @@ const Bt = class Bt {
|
|
|
3706
3706
|
this.selection.focus(), t.preventScroll || this.scrollSelectionIntoView();
|
|
3707
3707
|
}
|
|
3708
3708
|
format(t, e) {
|
|
3709
|
-
let s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] :
|
|
3709
|
+
let s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : I.sources.API;
|
|
3710
3710
|
return Rt.call(this, () => {
|
|
3711
3711
|
const n = this.getSelection(!0);
|
|
3712
3712
|
let l = new M();
|
|
@@ -3722,7 +3722,7 @@ const Bt = class Bt {
|
|
|
3722
3722
|
[t]: e
|
|
3723
3723
|
});
|
|
3724
3724
|
}
|
|
3725
|
-
return this.setSelection(n,
|
|
3725
|
+
return this.setSelection(n, I.sources.SILENT), l;
|
|
3726
3726
|
}, s);
|
|
3727
3727
|
}
|
|
3728
3728
|
formatLine(t, e, s, n, l) {
|
|
@@ -3842,7 +3842,7 @@ const Bt = class Bt {
|
|
|
3842
3842
|
e && this.scrollRectIntoView(e);
|
|
3843
3843
|
}
|
|
3844
3844
|
setContents(t) {
|
|
3845
|
-
let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] :
|
|
3845
|
+
let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : I.sources.API;
|
|
3846
3846
|
return Rt.call(this, () => {
|
|
3847
3847
|
t = new M(t);
|
|
3848
3848
|
const s = this.getLength(), n = this.editor.deleteText(0, s), l = this.editor.insertContents(0, t), o = this.editor.deleteText(this.getLength() - 1, 1);
|
|
@@ -3850,24 +3850,24 @@ const Bt = class Bt {
|
|
|
3850
3850
|
}, e);
|
|
3851
3851
|
}
|
|
3852
3852
|
setSelection(t, e, s) {
|
|
3853
|
-
t == null ? this.selection.setRange(null, e || Bt.sources.API) : ([t, e, , s] = ee(t, e, s), this.selection.setRange(new Ee(Math.max(0, t), e), s), s !==
|
|
3853
|
+
t == null ? this.selection.setRange(null, e || Bt.sources.API) : ([t, e, , s] = ee(t, e, s), this.selection.setRange(new Ee(Math.max(0, t), e), s), s !== I.sources.SILENT && this.scrollSelectionIntoView());
|
|
3854
3854
|
}
|
|
3855
3855
|
setText(t) {
|
|
3856
|
-
let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] :
|
|
3856
|
+
let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : I.sources.API;
|
|
3857
3857
|
const s = new M().insert(t);
|
|
3858
3858
|
return this.setContents(s, e);
|
|
3859
3859
|
}
|
|
3860
3860
|
update() {
|
|
3861
|
-
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] :
|
|
3861
|
+
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : I.sources.USER;
|
|
3862
3862
|
const e = this.scroll.update(t);
|
|
3863
3863
|
return this.selection.update(t), e;
|
|
3864
3864
|
}
|
|
3865
3865
|
updateContents(t) {
|
|
3866
|
-
let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] :
|
|
3866
|
+
let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : I.sources.API;
|
|
3867
3867
|
return Rt.call(this, () => (t = new M(t), this.editor.applyDelta(t)), e, !0);
|
|
3868
3868
|
}
|
|
3869
3869
|
};
|
|
3870
|
-
|
|
3870
|
+
_(Bt, "DEFAULTS", {
|
|
3871
3871
|
bounds: null,
|
|
3872
3872
|
modules: {
|
|
3873
3873
|
clipboard: !0,
|
|
@@ -3879,7 +3879,7 @@ C(Bt, "DEFAULTS", {
|
|
|
3879
3879
|
readOnly: !1,
|
|
3880
3880
|
registry: tn,
|
|
3881
3881
|
theme: "default"
|
|
3882
|
-
}),
|
|
3882
|
+
}), _(Bt, "events", I.events), _(Bt, "sources", I.sources), _(Bt, "version", "2.0.3"), _(Bt, "imports", {
|
|
3883
3883
|
delta: M,
|
|
3884
3884
|
parchment: Ml,
|
|
3885
3885
|
"core/module": $t,
|
|
@@ -3922,44 +3922,44 @@ function ro(i, t) {
|
|
|
3922
3922
|
container: h.toolbar
|
|
3923
3923
|
}
|
|
3924
3924
|
});
|
|
3925
|
-
const m = he({}, hr(l), hr(c), h),
|
|
3925
|
+
const m = he({}, hr(l), hr(c), h), v = {
|
|
3926
3926
|
...o,
|
|
3927
3927
|
...hi(u),
|
|
3928
3928
|
...hi(t)
|
|
3929
3929
|
};
|
|
3930
3930
|
let g = t.registry;
|
|
3931
|
-
return g ? t.formats && ze.warn('Ignoring "formats" option because "registry" is specified') : g = t.formats ? no(t.formats,
|
|
3932
|
-
...
|
|
3931
|
+
return g ? t.formats && ze.warn('Ignoring "formats" option because "registry" is specified') : g = t.formats ? no(t.formats, v.registry, ze) : v.registry, {
|
|
3932
|
+
...v,
|
|
3933
3933
|
registry: g,
|
|
3934
3934
|
container: e,
|
|
3935
3935
|
theme: n,
|
|
3936
|
-
modules: Object.entries(m).reduce((p,
|
|
3937
|
-
let [
|
|
3938
|
-
if (!
|
|
3939
|
-
const
|
|
3940
|
-
return
|
|
3936
|
+
modules: Object.entries(m).reduce((p, E) => {
|
|
3937
|
+
let [T, y] = E;
|
|
3938
|
+
if (!y) return p;
|
|
3939
|
+
const x = A.import(`modules/${T}`);
|
|
3940
|
+
return x == null ? (ze.error(`Cannot load ${T} module. Are you sure you registered it?`), p) : {
|
|
3941
3941
|
...p,
|
|
3942
3942
|
// @ts-expect-error
|
|
3943
|
-
[
|
|
3943
|
+
[T]: he({}, x.DEFAULTS || {}, y)
|
|
3944
3944
|
};
|
|
3945
3945
|
}, {}),
|
|
3946
|
-
bounds: ui(
|
|
3946
|
+
bounds: ui(v.bounds)
|
|
3947
3947
|
};
|
|
3948
3948
|
}
|
|
3949
3949
|
function Rt(i, t, e, s) {
|
|
3950
|
-
if (!this.isEnabled() && t ===
|
|
3950
|
+
if (!this.isEnabled() && t === I.sources.USER && !this.allowReadOnlyEdits)
|
|
3951
3951
|
return new M();
|
|
3952
3952
|
let n = e == null ? null : this.getSelection();
|
|
3953
3953
|
const l = this.editor.delta, o = i();
|
|
3954
|
-
if (n != null && (e === !0 && (e = n.index), s == null ? n = fi(n, o, t) : s !== 0 && (n = fi(n, e, s, t)), this.setSelection(n,
|
|
3955
|
-
const c = [
|
|
3956
|
-
this.emitter.emit(
|
|
3954
|
+
if (n != null && (e === !0 && (e = n.index), s == null ? n = fi(n, o, t) : s !== 0 && (n = fi(n, e, s, t)), this.setSelection(n, I.sources.SILENT)), o.length() > 0) {
|
|
3955
|
+
const c = [I.events.TEXT_CHANGE, o, l, t];
|
|
3956
|
+
this.emitter.emit(I.events.EDITOR_CHANGE, ...c), t !== I.sources.SILENT && this.emitter.emit(...c);
|
|
3957
3957
|
}
|
|
3958
3958
|
return o;
|
|
3959
3959
|
}
|
|
3960
3960
|
function ee(i, t, e, s, n) {
|
|
3961
3961
|
let l = {};
|
|
3962
|
-
return typeof i.index == "number" && typeof i.length == "number" ? typeof t != "number" ? (n = s, s = e, e = t, t = i.length, i = i.index) : (t = i.length, i = i.index) : typeof t != "number" && (n = s, s = e, e = t, t = 0), typeof e == "object" ? (l = e, n = s) : typeof e == "string" && (s != null ? l[e] = s : n = e), n = n ||
|
|
3962
|
+
return typeof i.index == "number" && typeof i.length == "number" ? typeof t != "number" ? (n = s, s = e, e = t, t = i.length, i = i.index) : (t = i.length, i = i.index) : typeof t != "number" && (n = s, s = e, e = t, t = 0), typeof e == "object" ? (l = e, n = s) : typeof e == "string" && (s != null ? l[e] = s : n = e), n = n || I.sources.API, [i, t, l, n];
|
|
3963
3963
|
}
|
|
3964
3964
|
function fi(i, t, e, s) {
|
|
3965
3965
|
const n = typeof e == "number" ? e : 0;
|
|
@@ -3967,8 +3967,8 @@ function fi(i, t, e, s) {
|
|
|
3967
3967
|
let l, o;
|
|
3968
3968
|
return t && typeof t.transformPosition == "function" ? [l, o] = [i.index, i.index + i.length].map((c) => (
|
|
3969
3969
|
// @ts-expect-error -- TODO: add a better type guard around `index`
|
|
3970
|
-
t.transformPosition(c, s !==
|
|
3971
|
-
)) : [l, o] = [i.index, i.index + i.length].map((c) => c < t || c === t && s ===
|
|
3970
|
+
t.transformPosition(c, s !== I.sources.USER)
|
|
3971
|
+
)) : [l, o] = [i.index, i.index + i.length].map((c) => c < t || c === t && s === I.sources.USER ? c : n >= 0 ? c + n : Math.max(t, c + n)), new Ee(l, o - l);
|
|
3972
3972
|
}
|
|
3973
3973
|
class Ne extends an {
|
|
3974
3974
|
}
|
|
@@ -3994,13 +3994,13 @@ class $e extends Ir {
|
|
|
3994
3994
|
this.batch = !1, this.update(t);
|
|
3995
3995
|
}
|
|
3996
3996
|
emitMount(t) {
|
|
3997
|
-
this.emitter.emit(
|
|
3997
|
+
this.emitter.emit(I.events.SCROLL_BLOT_MOUNT, t);
|
|
3998
3998
|
}
|
|
3999
3999
|
emitUnmount(t) {
|
|
4000
|
-
this.emitter.emit(
|
|
4000
|
+
this.emitter.emit(I.events.SCROLL_BLOT_UNMOUNT, t);
|
|
4001
4001
|
}
|
|
4002
4002
|
emitEmbedUpdate(t, e) {
|
|
4003
|
-
this.emitter.emit(
|
|
4003
|
+
this.emitter.emit(I.events.SCROLL_EMBED_UPDATE, t, e);
|
|
4004
4004
|
}
|
|
4005
4005
|
deleteAt(t, e) {
|
|
4006
4006
|
const [s, n] = this.line(t), [l] = this.line(t + e);
|
|
@@ -4053,13 +4053,13 @@ class $e extends Ir {
|
|
|
4053
4053
|
[l.key]: l.value
|
|
4054
4054
|
});
|
|
4055
4055
|
fr(this, t, h);
|
|
4056
|
-
const m = l.type === "block" ? 1 : 0,
|
|
4057
|
-
u && this.insertAt(
|
|
4056
|
+
const m = l.type === "block" ? 1 : 0, v = t + h.length() + m;
|
|
4057
|
+
u && this.insertAt(v - 1, `
|
|
4058
4058
|
`);
|
|
4059
4059
|
const g = qt(this.line(t)[0]), p = Ct.AttributeMap.diff(g, l.attributes) || {};
|
|
4060
|
-
Object.keys(p).forEach((
|
|
4061
|
-
this.formatAt(
|
|
4062
|
-
}), t =
|
|
4060
|
+
Object.keys(p).forEach((E) => {
|
|
4061
|
+
this.formatAt(v - 1, 1, E, p[E]);
|
|
4062
|
+
}), t = v;
|
|
4063
4063
|
}
|
|
4064
4064
|
let [o, c] = this.children.find(t);
|
|
4065
4065
|
if (s.length && (o && (o = o.split(c), c = 0), s.forEach((u) => {
|
|
@@ -4095,15 +4095,15 @@ class $e extends Ir {
|
|
|
4095
4095
|
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0, e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Number.MAX_VALUE;
|
|
4096
4096
|
const s = (n, l, o) => {
|
|
4097
4097
|
let c = [], u = o;
|
|
4098
|
-
return n.children.forEachAt(l, o, (h, m,
|
|
4099
|
-
di(h) ? c.push(h) : h instanceof an && (c = c.concat(s(h, m, u))), u -=
|
|
4098
|
+
return n.children.forEachAt(l, o, (h, m, v) => {
|
|
4099
|
+
di(h) ? c.push(h) : h instanceof an && (c = c.concat(s(h, m, u))), u -= v;
|
|
4100
4100
|
}), c;
|
|
4101
4101
|
};
|
|
4102
4102
|
return s(this, t, e);
|
|
4103
4103
|
}
|
|
4104
4104
|
optimize() {
|
|
4105
4105
|
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
4106
|
-
this.batch || (super.optimize(t, e), t.length > 0 && this.emitter.emit(
|
|
4106
|
+
this.batch || (super.optimize(t, e), t.length > 0 && this.emitter.emit(I.events.SCROLL_OPTIMIZE, t, e));
|
|
4107
4107
|
}
|
|
4108
4108
|
path(t) {
|
|
4109
4109
|
return super.path(t).slice(1);
|
|
@@ -4115,14 +4115,14 @@ class $e extends Ir {
|
|
|
4115
4115
|
Array.isArray(t) && (this.batch = this.batch.concat(t));
|
|
4116
4116
|
return;
|
|
4117
4117
|
}
|
|
4118
|
-
let e =
|
|
4118
|
+
let e = I.sources.USER;
|
|
4119
4119
|
typeof t == "string" && (e = t), Array.isArray(t) || (t = this.observer.takeRecords()), t = t.filter((s) => {
|
|
4120
4120
|
let {
|
|
4121
4121
|
target: n
|
|
4122
4122
|
} = s;
|
|
4123
4123
|
const l = this.find(n, !0);
|
|
4124
4124
|
return l && !gi(l);
|
|
4125
|
-
}), t.length > 0 && this.emitter.emit(
|
|
4125
|
+
}), t.length > 0 && this.emitter.emit(I.events.SCROLL_BEFORE_UPDATE, e, t), super.update(t.concat([])), t.length > 0 && this.emitter.emit(I.events.SCROLL_UPDATE, e, t);
|
|
4126
4126
|
}
|
|
4127
4127
|
updateEmbedAt(t, e, s) {
|
|
4128
4128
|
const [n] = this.descendant((l) => l instanceof kt, t);
|
|
@@ -4185,7 +4185,7 @@ class $e extends Ir {
|
|
|
4185
4185
|
}), l;
|
|
4186
4186
|
}
|
|
4187
4187
|
}
|
|
4188
|
-
|
|
4188
|
+
_($e, "blotName", "scroll"), _($e, "className", "ql-editor"), _($e, "tagName", "DIV"), _($e, "defaultChild", dt), _($e, "allowedChildren", [dt, kt, Ne]);
|
|
4189
4189
|
function fr(i, t, e) {
|
|
4190
4190
|
e.reduce((s, n) => {
|
|
4191
4191
|
const l = Ct.Op.length(n);
|
|
@@ -4249,7 +4249,7 @@ class vt extends dt {
|
|
|
4249
4249
|
A.register(Ae);
|
|
4250
4250
|
}
|
|
4251
4251
|
}
|
|
4252
|
-
|
|
4252
|
+
_(vt, "TAB", " ");
|
|
4253
4253
|
class Dr extends Xt {
|
|
4254
4254
|
}
|
|
4255
4255
|
Dr.blotName = "code";
|
|
@@ -4359,13 +4359,13 @@ class hn extends $t {
|
|
|
4359
4359
|
listen() {
|
|
4360
4360
|
this.quill.root.addEventListener("keydown", (t) => {
|
|
4361
4361
|
if (t.defaultPrevented || t.isComposing || t.keyCode === 229 && (t.key === "Enter" || t.key === "Backspace")) return;
|
|
4362
|
-
const n = (this.bindings[t.key] || []).concat(this.bindings[t.which] || []).filter((
|
|
4362
|
+
const n = (this.bindings[t.key] || []).concat(this.bindings[t.which] || []).filter((x) => hn.match(t, x));
|
|
4363
4363
|
if (n.length === 0) return;
|
|
4364
4364
|
const l = A.find(t.target, !0);
|
|
4365
4365
|
if (l && l.scroll !== this.quill.scroll) return;
|
|
4366
4366
|
const o = this.quill.getSelection();
|
|
4367
4367
|
if (o == null || !this.quill.hasFocus()) return;
|
|
4368
|
-
const [c, u] = this.quill.getLine(o.index), [h, m] = this.quill.getLeaf(o.index), [
|
|
4368
|
+
const [c, u] = this.quill.getLine(o.index), [h, m] = this.quill.getLeaf(o.index), [v, g] = o.length === 0 ? [h, m] : this.quill.getLeaf(o.index + o.length), p = h instanceof ln ? h.value().slice(0, m) : "", E = v instanceof ln ? v.value().slice(g) : "", T = {
|
|
4369
4369
|
collapsed: o.length === 0,
|
|
4370
4370
|
// @ts-expect-error Fix me later
|
|
4371
4371
|
empty: o.length === 0 && c.length() <= 1,
|
|
@@ -4373,18 +4373,18 @@ class hn extends $t {
|
|
|
4373
4373
|
line: c,
|
|
4374
4374
|
offset: u,
|
|
4375
4375
|
prefix: p,
|
|
4376
|
-
suffix:
|
|
4376
|
+
suffix: E,
|
|
4377
4377
|
event: t
|
|
4378
4378
|
};
|
|
4379
|
-
n.some((
|
|
4380
|
-
if (
|
|
4379
|
+
n.some((x) => {
|
|
4380
|
+
if (x.collapsed != null && x.collapsed !== T.collapsed || x.empty != null && x.empty !== T.empty || x.offset != null && x.offset !== T.offset)
|
|
4381
4381
|
return !1;
|
|
4382
|
-
if (Array.isArray(
|
|
4383
|
-
if (
|
|
4382
|
+
if (Array.isArray(x.format)) {
|
|
4383
|
+
if (x.format.every((q) => T.format[q] == null))
|
|
4384
4384
|
return !1;
|
|
4385
|
-
} else if (typeof
|
|
4385
|
+
} else if (typeof x.format == "object" && !Object.keys(x.format).every((q) => x.format[q] === !0 ? T.format[q] != null : x.format[q] === !1 ? T.format[q] == null : _r(x.format[q], T.format[q])))
|
|
4386
4386
|
return !1;
|
|
4387
|
-
return
|
|
4387
|
+
return x.prefix != null && !x.prefix.test(T.prefix) || x.suffix != null && !x.suffix.test(T.suffix) ? !1 : x.handler.call(this, o, T, x) !== !0;
|
|
4388
4388
|
}) && t.preventDefault();
|
|
4389
4389
|
});
|
|
4390
4390
|
}
|
|
@@ -4399,8 +4399,8 @@ class hn extends $t {
|
|
|
4399
4399
|
if (c && !(c.statics.blotName === "block" && c.length() <= 1)) {
|
|
4400
4400
|
const h = l.formats(), m = this.quill.getFormat(t.index - 1, 1);
|
|
4401
4401
|
if (n = Ct.AttributeMap.diff(h, m) || {}, Object.keys(n).length > 0) {
|
|
4402
|
-
const
|
|
4403
|
-
o = o.compose(
|
|
4402
|
+
const v = new M().retain(t.index + l.length() - 2).retain(1, n);
|
|
4403
|
+
o = o.compose(v);
|
|
4404
4404
|
}
|
|
4405
4405
|
}
|
|
4406
4406
|
}
|
|
@@ -4809,17 +4809,17 @@ const Eo = /\bmso-list:[^;]*ignore/i, No = /\bmso-list:[^;]*\bl(\d+)/i, Ao = /\b
|
|
|
4809
4809
|
l[0].id === h.id ? l.shift() : null;
|
|
4810
4810
|
const m = document.createElement("ul");
|
|
4811
4811
|
u.forEach((p) => {
|
|
4812
|
-
const
|
|
4813
|
-
|
|
4812
|
+
const E = document.createElement("li");
|
|
4813
|
+
E.setAttribute("data-list", p.type), p.indent > 1 && E.setAttribute("class", `ql-indent-${p.indent - 1}`), E.innerHTML = p.element.innerHTML, m.appendChild(E);
|
|
4814
4814
|
});
|
|
4815
|
-
const
|
|
4815
|
+
const v = (c = u[0]) == null ? void 0 : c.element, {
|
|
4816
4816
|
parentNode: g
|
|
4817
|
-
} =
|
|
4818
|
-
|
|
4817
|
+
} = v ?? {};
|
|
4818
|
+
v && (g == null || g.replaceChild(m, v)), u.slice(1).forEach((p) => {
|
|
4819
4819
|
let {
|
|
4820
|
-
element:
|
|
4820
|
+
element: E
|
|
4821
4821
|
} = p;
|
|
4822
|
-
g == null || g.removeChild(
|
|
4822
|
+
g == null || g.removeChild(E);
|
|
4823
4823
|
});
|
|
4824
4824
|
}
|
|
4825
4825
|
};
|
|
@@ -4913,8 +4913,8 @@ class Yi extends $t {
|
|
|
4913
4913
|
const s = (o = t.clipboardData) == null ? void 0 : o.getData("text/html");
|
|
4914
4914
|
let n = (c = t.clipboardData) == null ? void 0 : c.getData("text/plain");
|
|
4915
4915
|
if (!s && !n) {
|
|
4916
|
-
const
|
|
4917
|
-
|
|
4916
|
+
const v = (u = t.clipboardData) == null ? void 0 : u.getData("text/uri-list");
|
|
4917
|
+
v && (n = this.normalizeURIList(v));
|
|
4918
4918
|
}
|
|
4919
4919
|
const l = Array.from(((h = t.clipboardData) == null ? void 0 : h.files) || []);
|
|
4920
4920
|
if (!s && l.length > 0) {
|
|
@@ -4922,8 +4922,8 @@ class Yi extends $t {
|
|
|
4922
4922
|
return;
|
|
4923
4923
|
}
|
|
4924
4924
|
if (s && l.length > 0) {
|
|
4925
|
-
const
|
|
4926
|
-
if (
|
|
4925
|
+
const v = new DOMParser().parseFromString(s, "text/html");
|
|
4926
|
+
if (v.body.childElementCount === 1 && ((m = v.body.firstElementChild) == null ? void 0 : m.tagName) === "IMG") {
|
|
4927
4927
|
this.quill.uploader.upload(e, l);
|
|
4928
4928
|
return;
|
|
4929
4929
|
}
|
|
@@ -4980,7 +4980,7 @@ class Yi extends $t {
|
|
|
4980
4980
|
}), [s, n];
|
|
4981
4981
|
}
|
|
4982
4982
|
}
|
|
4983
|
-
|
|
4983
|
+
_(Yi, "DEFAULTS", {
|
|
4984
4984
|
matchers: []
|
|
4985
4985
|
});
|
|
4986
4986
|
function xe(i, t, e, s) {
|
|
@@ -5138,13 +5138,13 @@ function $o(i, t, e) {
|
|
|
5138
5138
|
class Ji extends $t {
|
|
5139
5139
|
constructor(e, s) {
|
|
5140
5140
|
super(e, s);
|
|
5141
|
-
|
|
5142
|
-
|
|
5143
|
-
|
|
5141
|
+
_(this, "lastRecorded", 0);
|
|
5142
|
+
_(this, "ignoreChange", !1);
|
|
5143
|
+
_(this, "stack", {
|
|
5144
5144
|
undo: [],
|
|
5145
5145
|
redo: []
|
|
5146
5146
|
});
|
|
5147
|
-
|
|
5147
|
+
_(this, "currentRange", null);
|
|
5148
5148
|
this.quill.on(A.events.EDITOR_CHANGE, (n, l, o, c) => {
|
|
5149
5149
|
n === A.events.SELECTION_CHANGE ? l && c !== A.sources.SILENT && (this.currentRange = l) : n === A.events.TEXT_CHANGE && (this.ignoreChange || (!this.options.userOnly || c === A.sources.USER ? this.record(l, o) : this.transform(l)), this.currentRange = Ar(this.currentRange, l));
|
|
5150
5150
|
}), this.quill.keyboard.addBinding({
|
|
@@ -5216,7 +5216,7 @@ class Ji extends $t {
|
|
|
5216
5216
|
}
|
|
5217
5217
|
}
|
|
5218
5218
|
}
|
|
5219
|
-
|
|
5219
|
+
_(Ji, "DEFAULTS", {
|
|
5220
5220
|
delay: 1e3,
|
|
5221
5221
|
maxStack: 100,
|
|
5222
5222
|
userOnly: !1
|
|
@@ -5291,7 +5291,7 @@ tl.DEFAULTS = {
|
|
|
5291
5291
|
const n = s.reduce((l, o) => l.insert({
|
|
5292
5292
|
image: o
|
|
5293
5293
|
}), new M().retain(i.index).delete(i.length));
|
|
5294
|
-
this.quill.updateContents(n,
|
|
5294
|
+
this.quill.updateContents(n, I.sources.USER), this.quill.setSelection(i.index + s.length, I.sources.SILENT);
|
|
5295
5295
|
});
|
|
5296
5296
|
}
|
|
5297
5297
|
};
|
|
@@ -5346,8 +5346,8 @@ i.key === "ArrowUp" || i.key === "ArrowDown" || i.key === "Home" || Go && i.key
|
|
|
5346
5346
|
class Xo extends $t {
|
|
5347
5347
|
constructor(e, s) {
|
|
5348
5348
|
super(e, s);
|
|
5349
|
-
|
|
5350
|
-
|
|
5349
|
+
_(this, "isListening", !1);
|
|
5350
|
+
_(this, "selectionChangeDeadline", 0);
|
|
5351
5351
|
this.handleArrowKeys(), this.handleNavigationShortcuts();
|
|
5352
5352
|
}
|
|
5353
5353
|
handleArrowKeys() {
|
|
@@ -5439,13 +5439,13 @@ const Qo = new Yo("indent", "ql-indent", {
|
|
|
5439
5439
|
});
|
|
5440
5440
|
class xr extends dt {
|
|
5441
5441
|
}
|
|
5442
|
-
|
|
5442
|
+
_(xr, "blotName", "blockquote"), _(xr, "tagName", "blockquote");
|
|
5443
5443
|
class wr extends dt {
|
|
5444
5444
|
static formats(t) {
|
|
5445
5445
|
return this.tagName.indexOf(t.tagName) + 1;
|
|
5446
5446
|
}
|
|
5447
5447
|
}
|
|
5448
|
-
|
|
5448
|
+
_(wr, "blotName", "header"), _(wr, "tagName", ["H1", "H2", "H3", "H4", "H5", "H6"]);
|
|
5449
5449
|
class Ls extends Ne {
|
|
5450
5450
|
}
|
|
5451
5451
|
Ls.blotName = "list-container";
|
|
@@ -5489,10 +5489,10 @@ class xs extends Xt {
|
|
|
5489
5489
|
super.optimize(t), this.domNode.tagName !== this.statics.tagName[0] && this.replaceWith(this.statics.blotName);
|
|
5490
5490
|
}
|
|
5491
5491
|
}
|
|
5492
|
-
|
|
5492
|
+
_(xs, "blotName", "bold"), _(xs, "tagName", ["STRONG", "B"]);
|
|
5493
5493
|
class Tr extends xs {
|
|
5494
5494
|
}
|
|
5495
|
-
|
|
5495
|
+
_(Tr, "blotName", "italic"), _(Tr, "tagName", ["EM", "I"]);
|
|
5496
5496
|
class ue extends Xt {
|
|
5497
5497
|
static create(t) {
|
|
5498
5498
|
const e = super.create(t);
|
|
@@ -5508,7 +5508,7 @@ class ue extends Xt {
|
|
|
5508
5508
|
t !== this.statics.blotName || !e ? super.format(t, e) : this.domNode.setAttribute("href", this.constructor.sanitize(e));
|
|
5509
5509
|
}
|
|
5510
5510
|
}
|
|
5511
|
-
|
|
5511
|
+
_(ue, "blotName", "link"), _(ue, "tagName", "A"), _(ue, "SANITIZED_URL", "about:blank"), _(ue, "PROTOCOL_WHITELIST", ["http", "https", "mailto", "tel", "sms"]);
|
|
5512
5512
|
function el(i, t) {
|
|
5513
5513
|
const e = document.createElement("a");
|
|
5514
5514
|
e.href = i;
|
|
@@ -5524,13 +5524,13 @@ class Lr extends Xt {
|
|
|
5524
5524
|
if (t.tagName === "SUP") return "super";
|
|
5525
5525
|
}
|
|
5526
5526
|
}
|
|
5527
|
-
|
|
5527
|
+
_(Lr, "blotName", "script"), _(Lr, "tagName", ["SUB", "SUP"]);
|
|
5528
5528
|
class qr extends xs {
|
|
5529
5529
|
}
|
|
5530
|
-
|
|
5530
|
+
_(qr, "blotName", "strike"), _(qr, "tagName", ["S", "STRIKE"]);
|
|
5531
5531
|
class Sr extends Xt {
|
|
5532
5532
|
}
|
|
5533
|
-
|
|
5533
|
+
_(Sr, "blotName", "underline"), _(Sr, "tagName", "U");
|
|
5534
5534
|
class nn extends un {
|
|
5535
5535
|
static create(t) {
|
|
5536
5536
|
if (window.katex == null)
|
|
@@ -5551,7 +5551,7 @@ class nn extends un {
|
|
|
5551
5551
|
return `<span>${t}</span>`;
|
|
5552
5552
|
}
|
|
5553
5553
|
}
|
|
5554
|
-
|
|
5554
|
+
_(nn, "blotName", "formula"), _(nn, "className", "ql-formula"), _(nn, "tagName", "SPAN");
|
|
5555
5555
|
const Ni = ["alt", "height", "width"];
|
|
5556
5556
|
class kr extends wt {
|
|
5557
5557
|
static create(t) {
|
|
@@ -5574,7 +5574,7 @@ class kr extends wt {
|
|
|
5574
5574
|
Ni.indexOf(t) > -1 ? e ? this.domNode.setAttribute(t, e) : this.domNode.removeAttribute(t) : super.format(t, e);
|
|
5575
5575
|
}
|
|
5576
5576
|
}
|
|
5577
|
-
|
|
5577
|
+
_(kr, "blotName", "image"), _(kr, "tagName", "IMG");
|
|
5578
5578
|
const Ai = ["height", "width"];
|
|
5579
5579
|
class rn extends kt {
|
|
5580
5580
|
static create(t) {
|
|
@@ -5600,7 +5600,7 @@ class rn extends kt {
|
|
|
5600
5600
|
return `<a href="${t}">${t}</a>`;
|
|
5601
5601
|
}
|
|
5602
5602
|
}
|
|
5603
|
-
|
|
5603
|
+
_(rn, "blotName", "video"), _(rn, "className", "ql-video"), _(rn, "tagName", "IFRAME");
|
|
5604
5604
|
const bs = new Pt("code-token", "hljs", {
|
|
5605
5605
|
scope: D.INLINE
|
|
5606
5606
|
});
|
|
@@ -5666,10 +5666,10 @@ class ys extends Ae {
|
|
|
5666
5666
|
o.diff(c).reduce((u, h) => {
|
|
5667
5667
|
let {
|
|
5668
5668
|
retain: m,
|
|
5669
|
-
attributes:
|
|
5669
|
+
attributes: v
|
|
5670
5670
|
} = h;
|
|
5671
|
-
return m ? (
|
|
5672
|
-
[St.blotName, se.blotName].includes(g) && this.formatAt(u, m, g,
|
|
5671
|
+
return m ? (v && Object.keys(v).forEach((g) => {
|
|
5672
|
+
[St.blotName, se.blotName].includes(g) && this.formatAt(u, m, g, v[g]);
|
|
5673
5673
|
}), u + m) : u;
|
|
5674
5674
|
}, 0);
|
|
5675
5675
|
}
|
|
@@ -5842,7 +5842,7 @@ const Es = class Es extends dt {
|
|
|
5842
5842
|
return this.row() && this.row().table();
|
|
5843
5843
|
}
|
|
5844
5844
|
};
|
|
5845
|
-
|
|
5845
|
+
_(Es, "blotName", "table"), _(Es, "tagName", "TD");
|
|
5846
5846
|
let Mt = Es;
|
|
5847
5847
|
class ne extends Ne {
|
|
5848
5848
|
checkMerge() {
|
|
@@ -5869,10 +5869,10 @@ class ne extends Ne {
|
|
|
5869
5869
|
return this.parent && this.parent.parent;
|
|
5870
5870
|
}
|
|
5871
5871
|
}
|
|
5872
|
-
|
|
5872
|
+
_(ne, "blotName", "table-row"), _(ne, "tagName", "TR");
|
|
5873
5873
|
class Zt extends Ne {
|
|
5874
5874
|
}
|
|
5875
|
-
|
|
5875
|
+
_(Zt, "blotName", "table-body"), _(Zt, "tagName", "TBODY");
|
|
5876
5876
|
class Ze extends Ne {
|
|
5877
5877
|
balanceCells() {
|
|
5878
5878
|
const t = this.descendants(ne), e = t.reduce((s, n) => Math.max(n.children.length, s), 0);
|
|
@@ -5918,7 +5918,7 @@ class Ze extends Ne {
|
|
|
5918
5918
|
return t == null ? [] : t.children.map((e) => e);
|
|
5919
5919
|
}
|
|
5920
5920
|
}
|
|
5921
|
-
|
|
5921
|
+
_(Ze, "blotName", "table-container"), _(Ze, "tagName", "TABLE");
|
|
5922
5922
|
Ze.allowedChildren = [Zt];
|
|
5923
5923
|
Zt.requiredContainer = Ze;
|
|
5924
5924
|
Zt.allowedChildren = [ne];
|
|
@@ -6400,7 +6400,7 @@ class Ss extends Ge {
|
|
|
6400
6400
|
n.update();
|
|
6401
6401
|
});
|
|
6402
6402
|
};
|
|
6403
|
-
this.quill.on(
|
|
6403
|
+
this.quill.on(I.events.EDITOR_CHANGE, s);
|
|
6404
6404
|
}
|
|
6405
6405
|
}
|
|
6406
6406
|
Ss.DEFAULTS = he({}, Ge.DEFAULTS, {
|
|
@@ -6457,7 +6457,7 @@ class ll extends il {
|
|
|
6457
6457
|
const {
|
|
6458
6458
|
scrollTop: e
|
|
6459
6459
|
} = this.quill.root;
|
|
6460
|
-
this.linkRange ? (this.quill.formatText(this.linkRange, "link", t,
|
|
6460
|
+
this.linkRange ? (this.quill.formatText(this.linkRange, "link", t, I.sources.USER), delete this.linkRange) : (this.restoreFocus(), this.quill.format("link", t, I.sources.USER)), this.quill.root.scrollTop = e;
|
|
6461
6461
|
break;
|
|
6462
6462
|
}
|
|
6463
6463
|
case "video":
|
|
@@ -6473,8 +6473,8 @@ class ll extends il {
|
|
|
6473
6473
|
// @ts-expect-error Fix me later
|
|
6474
6474
|
this.root.getAttribute("data-mode"),
|
|
6475
6475
|
t,
|
|
6476
|
-
|
|
6477
|
-
), this.root.getAttribute("data-mode") === "formula" && this.quill.insertText(s + 1, " ",
|
|
6476
|
+
I.sources.USER
|
|
6477
|
+
), this.root.getAttribute("data-mode") === "formula" && this.quill.insertText(s + 1, " ", I.sources.USER), this.quill.setSelection(s + 2, I.sources.USER);
|
|
6478
6478
|
}
|
|
6479
6479
|
break;
|
|
6480
6480
|
}
|
|
@@ -6500,17 +6500,17 @@ const Fa = [["bold", "italic", "link"], [{
|
|
|
6500
6500
|
}, "blockquote"]];
|
|
6501
6501
|
class ol extends ll {
|
|
6502
6502
|
constructor(t, e) {
|
|
6503
|
-
super(t, e), this.quill.on(
|
|
6504
|
-
if (s ===
|
|
6505
|
-
if (n != null && n.length > 0 && o ===
|
|
6503
|
+
super(t, e), this.quill.on(I.events.EDITOR_CHANGE, (s, n, l, o) => {
|
|
6504
|
+
if (s === I.events.SELECTION_CHANGE)
|
|
6505
|
+
if (n != null && n.length > 0 && o === I.sources.USER) {
|
|
6506
6506
|
this.show(), this.root.style.left = "0px", this.root.style.width = "", this.root.style.width = `${this.root.offsetWidth}px`;
|
|
6507
6507
|
const c = this.quill.getLines(n.index, n.length);
|
|
6508
6508
|
if (c.length === 1) {
|
|
6509
6509
|
const u = this.quill.getBounds(n);
|
|
6510
6510
|
u != null && this.position(u);
|
|
6511
6511
|
} else {
|
|
6512
|
-
const u = c[c.length - 1], h = this.quill.getIndex(u), m = Math.min(u.length() - 1, n.index + n.length - h),
|
|
6513
|
-
|
|
6512
|
+
const u = c[c.length - 1], h = this.quill.getIndex(u), m = Math.min(u.length() - 1, n.index + n.length - h), v = this.quill.getBounds(new Ee(h, m));
|
|
6513
|
+
v != null && this.position(v);
|
|
6514
6514
|
}
|
|
6515
6515
|
} else document.activeElement !== this.textbox && this.quill.hasFocus() && this.hide();
|
|
6516
6516
|
});
|
|
@@ -6518,7 +6518,7 @@ class ol extends ll {
|
|
|
6518
6518
|
listen() {
|
|
6519
6519
|
super.listen(), this.root.querySelector(".ql-close").addEventListener("click", () => {
|
|
6520
6520
|
this.root.classList.remove("ql-editing");
|
|
6521
|
-
}), this.quill.on(
|
|
6521
|
+
}), this.quill.on(I.events.SCROLL_OPTIMIZE, () => {
|
|
6522
6522
|
setTimeout(() => {
|
|
6523
6523
|
if (this.root.classList.contains("ql-hidden")) return;
|
|
6524
6524
|
const t = this.quill.getSelection();
|
|
@@ -6537,7 +6537,7 @@ class ol extends ll {
|
|
|
6537
6537
|
return s.style.marginLeft = "", e !== 0 && (s.style.marginLeft = `${-1 * e - s.offsetWidth / 2}px`), e;
|
|
6538
6538
|
}
|
|
6539
6539
|
}
|
|
6540
|
-
|
|
6540
|
+
_(ol, "TEMPLATE", ['<span class="ql-tooltip-arrow"></span>', '<div class="ql-tooltip-editor">', '<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">', '<a class="ql-close"></a>', "</div>"].join(""));
|
|
6541
6541
|
class al extends Ss {
|
|
6542
6542
|
constructor(t, e) {
|
|
6543
6543
|
e.modules.toolbar != null && e.modules.toolbar.container == null && (e.modules.toolbar.container = Fa), super(t, e), this.quill.container.classList.add("ql-bubble");
|
|
@@ -6567,7 +6567,7 @@ const za = [[{
|
|
|
6567
6567
|
class cl extends ll {
|
|
6568
6568
|
constructor() {
|
|
6569
6569
|
super(...arguments);
|
|
6570
|
-
|
|
6570
|
+
_(this, "preview", this.root.querySelector("a.ql-preview"));
|
|
6571
6571
|
}
|
|
6572
6572
|
listen() {
|
|
6573
6573
|
super.listen(), this.root.querySelector("a.ql-action").addEventListener("click", (e) => {
|
|
@@ -6575,12 +6575,12 @@ class cl extends ll {
|
|
|
6575
6575
|
}), this.root.querySelector("a.ql-remove").addEventListener("click", (e) => {
|
|
6576
6576
|
if (this.linkRange != null) {
|
|
6577
6577
|
const s = this.linkRange;
|
|
6578
|
-
this.restoreFocus(), this.quill.formatText(s, "link", !1,
|
|
6578
|
+
this.restoreFocus(), this.quill.formatText(s, "link", !1, I.sources.USER), delete this.linkRange;
|
|
6579
6579
|
}
|
|
6580
6580
|
e.preventDefault(), this.hide();
|
|
6581
|
-
}), this.quill.on(
|
|
6581
|
+
}), this.quill.on(I.events.SELECTION_CHANGE, (e, s, n) => {
|
|
6582
6582
|
if (e != null) {
|
|
6583
|
-
if (e.length === 0 && n ===
|
|
6583
|
+
if (e.length === 0 && n === I.sources.USER) {
|
|
6584
6584
|
const [l, o] = this.quill.scroll.descendant(ue, e.index);
|
|
6585
6585
|
if (l != null) {
|
|
6586
6586
|
this.linkRange = new Ee(e.index - o, l.length());
|
|
@@ -6600,7 +6600,7 @@ class cl extends ll {
|
|
|
6600
6600
|
super.show(), this.root.removeAttribute("data-mode");
|
|
6601
6601
|
}
|
|
6602
6602
|
}
|
|
6603
|
-
|
|
6603
|
+
_(cl, "TEMPLATE", ['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>', '<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">', '<a class="ql-action"></a>', '<a class="ql-remove"></a>'].join(""));
|
|
6604
6604
|
class Fr extends Ss {
|
|
6605
6605
|
constructor(t, e) {
|
|
6606
6606
|
e.modules.toolbar != null && e.modules.toolbar.container == null && (e.modules.toolbar.container = za), super(t, e), this.quill.container.classList.add("ql-snow");
|
|
@@ -6685,7 +6685,7 @@ A.register({
|
|
|
6685
6685
|
}, !0);
|
|
6686
6686
|
class Cr extends un {
|
|
6687
6687
|
}
|
|
6688
|
-
|
|
6688
|
+
_(Cr, "blotName", "divider"), _(Cr, "tagName", "hr");
|
|
6689
6689
|
class Va extends Fr {
|
|
6690
6690
|
// overwrite buildButtons method to prevent quill theme from building the buttons
|
|
6691
6691
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
@@ -6745,34 +6745,37 @@ const Ga = [
|
|
|
6745
6745
|
const e = i, s = t, n = dl(), l = Vr(null);
|
|
6746
6746
|
let o = null;
|
|
6747
6747
|
const c = tr(() => e.id || yl("stash-text-editor-")), u = Vr(e.modelValue), h = tr(() => {
|
|
6748
|
-
const
|
|
6749
|
-
return Array.isArray(
|
|
6748
|
+
const y = e.controls.length ? e.controls : Ga;
|
|
6749
|
+
return Array.isArray(y[0]) ? E(y) : p(y);
|
|
6750
6750
|
}), m = tr(() => ({ ...Za, ...e.handlers }));
|
|
6751
|
-
function
|
|
6752
|
-
|
|
6753
|
-
|
|
6754
|
-
|
|
6755
|
-
|
|
6756
|
-
|
|
6757
|
-
|
|
6758
|
-
|
|
6751
|
+
function v(y) {
|
|
6752
|
+
return y.replace(/<(.|\n)*?>/g, "").trim().length === 0;
|
|
6753
|
+
}
|
|
6754
|
+
function g(y, x) {
|
|
6755
|
+
const q = Wa[y];
|
|
6756
|
+
if (!(!q && !x))
|
|
6757
|
+
return x && q instanceof Object ? q[x] : q;
|
|
6758
|
+
}
|
|
6759
|
+
function p(y) {
|
|
6760
|
+
return y.map((x) => {
|
|
6761
|
+
const q = x instanceof Object ? Object.keys(x)[0] : x, R = x instanceof Object ? x[q] : void 0;
|
|
6759
6762
|
return {
|
|
6760
|
-
icon:
|
|
6761
|
-
name:
|
|
6762
|
-
value:
|
|
6763
|
+
icon: g(q, R),
|
|
6764
|
+
name: q,
|
|
6765
|
+
value: R
|
|
6763
6766
|
};
|
|
6764
6767
|
});
|
|
6765
6768
|
}
|
|
6766
|
-
function
|
|
6767
|
-
return
|
|
6769
|
+
function E(y) {
|
|
6770
|
+
return y.map((x) => p(x));
|
|
6768
6771
|
}
|
|
6769
|
-
const
|
|
6772
|
+
const T = (y) => {
|
|
6770
6773
|
u.value = e.modelValue;
|
|
6771
|
-
const x =
|
|
6772
|
-
|
|
6774
|
+
const x = y.clipboard.convert({ html: e.modelValue ?? "" });
|
|
6775
|
+
y.setContents(x);
|
|
6773
6776
|
};
|
|
6774
6777
|
return gl(() => {
|
|
6775
|
-
const
|
|
6778
|
+
const y = new A(l.value, {
|
|
6776
6779
|
modules: {
|
|
6777
6780
|
toolbar: {
|
|
6778
6781
|
container: `#${c.value}-format-bar`,
|
|
@@ -6783,21 +6786,21 @@ const Ga = [
|
|
|
6783
6786
|
readOnly: e.isReadOnly,
|
|
6784
6787
|
theme: "snow"
|
|
6785
6788
|
});
|
|
6786
|
-
!e.isReadOnly && e.isDisabled &&
|
|
6787
|
-
s(x ? "focus" : "blur",
|
|
6788
|
-
}),
|
|
6789
|
-
u.value =
|
|
6790
|
-
}), o =
|
|
6789
|
+
!e.isReadOnly && e.isDisabled && y.enable(!1), e.modelValue && T(y), y.on("selection-change", (x) => {
|
|
6790
|
+
s(x ? "focus" : "blur", y);
|
|
6791
|
+
}), y.on("text-change", () => {
|
|
6792
|
+
u.value = y.root.innerHTML;
|
|
6793
|
+
}), o = y;
|
|
6791
6794
|
}), Kr(
|
|
6792
6795
|
() => e.modelValue,
|
|
6793
|
-
(
|
|
6794
|
-
o && (
|
|
6796
|
+
(y) => {
|
|
6797
|
+
o && (y && y !== u.value && !v(y) ? (T(o), u.value = o.root.innerHTML) : (!y || v(y)) && o.setContents([]));
|
|
6795
6798
|
}
|
|
6796
|
-
), Kr(u, (
|
|
6797
|
-
o && (
|
|
6799
|
+
), Kr(u, (y, x) => {
|
|
6800
|
+
o && (y && y !== x ? v(y) ? s("update:model-value", "") : s("update:model-value", y) : (!y || v(y)) && (o.setContents([]), s("update:model-value", "")));
|
|
6798
6801
|
}), pl(() => {
|
|
6799
6802
|
o = null;
|
|
6800
|
-
}), (
|
|
6803
|
+
}), (y, x) => (Kt(), hs(vl, ml(e, {
|
|
6801
6804
|
class: ["stash-text-editor", [Be(n).root]],
|
|
6802
6805
|
"data-test": "stash-text-editor"
|
|
6803
6806
|
}), {
|
|
@@ -6809,26 +6812,26 @@ const Ga = [
|
|
|
6809
6812
|
"data-test": "stash-text-editor|format-bar",
|
|
6810
6813
|
role: "format-bar"
|
|
6811
6814
|
}, [
|
|
6812
|
-
(Kt(!0), fs(nr, null, Gr(h.value, (
|
|
6813
|
-
Array.isArray(
|
|
6815
|
+
(Kt(!0), fs(nr, null, Gr(h.value, (q, R) => (Kt(), fs(nr, { key: R }, [
|
|
6816
|
+
Array.isArray(q) ? (Kt(), fs("div", {
|
|
6814
6817
|
key: 0,
|
|
6815
6818
|
class: ds(["stash-text-editor__format-bar__group", Be(n)["format-bar-group"]]),
|
|
6816
6819
|
"data-test": "stash-text-editor|format-bar-group"
|
|
6817
6820
|
}, [
|
|
6818
|
-
(Kt(!0), fs(nr, null, Gr(
|
|
6819
|
-
key:
|
|
6820
|
-
class: ds(["stash-text-editor__format-bar__control tw-rounded-none", [Be(n)["format-bar-control"], `ql-${
|
|
6821
|
-
"aria-label":
|
|
6822
|
-
"data-test": `stash-text-editor|format-bar-${
|
|
6821
|
+
(Kt(!0), fs(nr, null, Gr(q, ($, H) => (Kt(), hs(Zr, {
|
|
6822
|
+
key: $.name + H,
|
|
6823
|
+
class: ds(["stash-text-editor__format-bar__control tw-rounded-none", [Be(n)["format-bar-control"], `ql-${$.name}`]]),
|
|
6824
|
+
"aria-label": $.value ? `${$.name}: ${$.value}` : `${$.name}`,
|
|
6825
|
+
"data-test": `stash-text-editor|format-bar-${$.name}-grouped-control`,
|
|
6823
6826
|
disabled: e.isDisabled,
|
|
6824
|
-
value:
|
|
6827
|
+
value: $.value,
|
|
6825
6828
|
secondary: "",
|
|
6826
6829
|
icon: ""
|
|
6827
6830
|
}, {
|
|
6828
6831
|
default: er(() => [
|
|
6829
|
-
|
|
6832
|
+
$.icon ? (Kt(), hs(Wr, {
|
|
6830
6833
|
key: 0,
|
|
6831
|
-
name:
|
|
6834
|
+
name: $.icon,
|
|
6832
6835
|
size: "dense"
|
|
6833
6836
|
}, null, 8, ["name"])) : sr("", !0)
|
|
6834
6837
|
]),
|
|
@@ -6836,18 +6839,18 @@ const Ga = [
|
|
|
6836
6839
|
}, 1032, ["aria-label", "data-test", "class", "disabled", "value"]))), 128))
|
|
6837
6840
|
], 2)) : (Kt(), hs(Zr, {
|
|
6838
6841
|
key: 1,
|
|
6839
|
-
class: ds(["stash-text-editor__format-bar__control", [Be(n)["format-bar-control"], `ql-${
|
|
6840
|
-
"data-test": `stash-text-editor|format-bar-${
|
|
6841
|
-
"aria-label":
|
|
6842
|
+
class: ds(["stash-text-editor__format-bar__control", [Be(n)["format-bar-control"], `ql-${q.name}`]]),
|
|
6843
|
+
"data-test": `stash-text-editor|format-bar-${q.name}-control`,
|
|
6844
|
+
"aria-label": q.value ? `${q.name}: ${q.value}` : `${q.name}`,
|
|
6842
6845
|
disabled: e.isDisabled,
|
|
6843
|
-
value:
|
|
6846
|
+
value: q.value,
|
|
6844
6847
|
secondary: "",
|
|
6845
6848
|
icon: ""
|
|
6846
6849
|
}, {
|
|
6847
6850
|
default: er(() => [
|
|
6848
|
-
|
|
6851
|
+
q.icon ? (Kt(), hs(Wr, {
|
|
6849
6852
|
key: 0,
|
|
6850
|
-
name:
|
|
6853
|
+
name: q.icon,
|
|
6851
6854
|
size: "dense"
|
|
6852
6855
|
}, null, 8, ["name"])) : sr("", !0)
|
|
6853
6856
|
]),
|