@scvzerng/snakerflow-designer-vue2 3.0.57 → 3.0.59
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/SnakerflowDesigner.es.js +554 -559
- package/dist/SnakerflowDesigner.umd.js +15 -15
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -127,7 +127,7 @@ function Zd(n) {
|
|
|
127
127
|
};
|
|
128
128
|
}
|
|
129
129
|
function Mf(n, e, t, r, i, o, a, s, l, u) {
|
|
130
|
-
var c, f, d, h, v, p, g, y, m, S, O, k,
|
|
130
|
+
var c, f, d, h, v, p, g, y, m, S, O, k, N, A, T, F, M, W = e.type;
|
|
131
131
|
if (e.constructor != null) return null;
|
|
132
132
|
128 & t.__u && (l = !!(32 & t.__u), o = [s = e.__e = t.__e]), (c = ze.__b) && c(e);
|
|
133
133
|
e: if (typeof W == "function") try {
|
|
@@ -144,18 +144,18 @@ function Mf(n, e, t, r, i, o, a, s, l, u) {
|
|
|
144
144
|
f.componentDidUpdate(h, v, p);
|
|
145
145
|
});
|
|
146
146
|
}
|
|
147
|
-
if (f.context = O, f.props = y, f.__P = n, f.__e = !1,
|
|
148
|
-
for (f.state = f.__s, f.__d = !1,
|
|
147
|
+
if (f.context = O, f.props = y, f.__P = n, f.__e = !1, N = ze.__r, A = 0, m) {
|
|
148
|
+
for (f.state = f.__s, f.__d = !1, N && N(e), c = f.render(f.props, f.state, f.context), T = 0; T < f._sb.length; T++) f.__h.push(f._sb[T]);
|
|
149
149
|
f._sb = [];
|
|
150
150
|
} else do
|
|
151
|
-
f.__d = !1,
|
|
151
|
+
f.__d = !1, N && N(e), c = f.render(f.props, f.state, f.context), f.state = f.__s;
|
|
152
152
|
while (f.__d && ++A < 25);
|
|
153
153
|
f.state = f.__s, f.getChildContext != null && (r = Xr(Xr({}, r), f.getChildContext())), m && !d && f.getSnapshotBeforeUpdate != null && (p = f.getSnapshotBeforeUpdate(h, v)), F = c, c != null && c.type === Oo && c.key == null && (F = xg(c.props.children)), s = mg(n, ts(F) ? F : [F], e, t, r, i, o, a, s, l, u), f.base = e.__e, e.__u &= -161, f.__h.length && a.push(f), g && (f.__E = f.__ = null);
|
|
154
154
|
} catch (U) {
|
|
155
155
|
if (e.__v = null, l || o != null) if (U.then) {
|
|
156
156
|
for (e.__u |= l ? 160 : 128; s && s.nodeType == 8 && s.nextSibling; ) s = s.nextSibling;
|
|
157
157
|
o[o.indexOf(s)] = null, e.__e = s;
|
|
158
|
-
} else for (
|
|
158
|
+
} else for (M = o.length; M--; ) Nf(o[M]);
|
|
159
159
|
else e.__e = t.__e, e.__k = t.__k;
|
|
160
160
|
ze.__e(U, e, t);
|
|
161
161
|
}
|
|
@@ -2176,12 +2176,12 @@ var oh, Ox = {}, Hf = (
|
|
|
2176
2176
|
if (t._data.size !== l.size)
|
|
2177
2177
|
t._keysAtom.reportChanged();
|
|
2178
2178
|
else
|
|
2179
|
-
for (var O = t._data.keys(), k = l.keys(),
|
|
2180
|
-
if (
|
|
2179
|
+
for (var O = t._data.keys(), k = l.keys(), N = O.next(), A = k.next(); !N.done; ) {
|
|
2180
|
+
if (N.value !== A.value) {
|
|
2181
2181
|
t._keysAtom.reportChanged();
|
|
2182
2182
|
break;
|
|
2183
2183
|
}
|
|
2184
|
-
|
|
2184
|
+
N = O.next(), A = k.next();
|
|
2185
2185
|
}
|
|
2186
2186
|
t._data = l;
|
|
2187
2187
|
}), this;
|
|
@@ -3618,7 +3618,7 @@ function iu(n, e, t, r, i, o, a, s, l, u) {
|
|
|
3618
3618
|
if (h)
|
|
3619
3619
|
var O = Ko(g), k = GE(m, O);
|
|
3620
3620
|
if (r && (m = vy(m, r, i, h)), o && (m = gy(m, o, a, h)), y -= k, h && y < u) {
|
|
3621
|
-
var
|
|
3621
|
+
var N = vi(m, O);
|
|
3622
3622
|
return Ey(
|
|
3623
3623
|
n,
|
|
3624
3624
|
e,
|
|
@@ -3626,7 +3626,7 @@ function iu(n, e, t, r, i, o, a, s, l, u) {
|
|
|
3626
3626
|
g.placeholder,
|
|
3627
3627
|
t,
|
|
3628
3628
|
m,
|
|
3629
|
-
|
|
3629
|
+
N,
|
|
3630
3630
|
s,
|
|
3631
3631
|
l,
|
|
3632
3632
|
u - y
|
|
@@ -5060,29 +5060,29 @@ function hu(n, e, t) {
|
|
|
5060
5060
|
if (typeof n != "function")
|
|
5061
5061
|
throw new TypeError(hN);
|
|
5062
5062
|
e = Kn(e) || 0, Ct(t) && (c = !!t.leading, f = "maxWait" in t, o = f ? pN(Kn(t.maxWait) || 0, e) : o, d = "trailing" in t ? !!t.trailing : d);
|
|
5063
|
-
function h(
|
|
5063
|
+
function h(N) {
|
|
5064
5064
|
var A = r, T = i;
|
|
5065
|
-
return r = i = void 0, u =
|
|
5065
|
+
return r = i = void 0, u = N, a = n.apply(T, A), a;
|
|
5066
5066
|
}
|
|
5067
|
-
function v(
|
|
5068
|
-
return u =
|
|
5067
|
+
function v(N) {
|
|
5068
|
+
return u = N, s = setTimeout(y, e), c ? h(N) : a;
|
|
5069
5069
|
}
|
|
5070
|
-
function p(
|
|
5071
|
-
var A =
|
|
5070
|
+
function p(N) {
|
|
5071
|
+
var A = N - l, T = N - u, F = e - A;
|
|
5072
5072
|
return f ? vN(F, o - T) : F;
|
|
5073
5073
|
}
|
|
5074
|
-
function g(
|
|
5075
|
-
var A =
|
|
5074
|
+
function g(N) {
|
|
5075
|
+
var A = N - l, T = N - u;
|
|
5076
5076
|
return l === void 0 || A >= e || A < 0 || f && T >= o;
|
|
5077
5077
|
}
|
|
5078
5078
|
function y() {
|
|
5079
|
-
var
|
|
5080
|
-
if (g(
|
|
5081
|
-
return m(
|
|
5082
|
-
s = setTimeout(y, p(
|
|
5079
|
+
var N = Ks();
|
|
5080
|
+
if (g(N))
|
|
5081
|
+
return m(N);
|
|
5082
|
+
s = setTimeout(y, p(N));
|
|
5083
5083
|
}
|
|
5084
|
-
function m(
|
|
5085
|
-
return s = void 0, d && r ? h(
|
|
5084
|
+
function m(N) {
|
|
5085
|
+
return s = void 0, d && r ? h(N) : (r = i = void 0, a);
|
|
5086
5086
|
}
|
|
5087
5087
|
function S() {
|
|
5088
5088
|
s !== void 0 && clearTimeout(s), u = 0, r = l = i = s = void 0;
|
|
@@ -5091,8 +5091,8 @@ function hu(n, e, t) {
|
|
|
5091
5091
|
return s === void 0 ? a : m(Ks());
|
|
5092
5092
|
}
|
|
5093
5093
|
function k() {
|
|
5094
|
-
var
|
|
5095
|
-
if (r = arguments, i = this, l =
|
|
5094
|
+
var N = Ks(), A = g(N);
|
|
5095
|
+
if (r = arguments, i = this, l = N, A) {
|
|
5096
5096
|
if (s === void 0)
|
|
5097
5097
|
return v(l);
|
|
5098
5098
|
if (f)
|
|
@@ -7693,28 +7693,28 @@ var EL = 0, ir = (
|
|
|
7693
7693
|
var S, O, k = window == null ? void 0 : window.document;
|
|
7694
7694
|
if (m.button === EL) {
|
|
7695
7695
|
y.isStopPropagation && m.stopPropagation(), y.isStartDragging = !0, y.startX = m.clientX, y.startY = m.clientY, k.addEventListener("mousemove", y.handleMouseMove, !1), k.addEventListener("mouseup", y.handleMouseUp, !1);
|
|
7696
|
-
var
|
|
7696
|
+
var N = (S = y.model) === null || S === void 0 ? void 0 : S.getData();
|
|
7697
7697
|
(O = y.eventCenter) === null || O === void 0 || O.emit(de["".concat(y.eventType, "_MOUSEDOWN")], {
|
|
7698
7698
|
e: m,
|
|
7699
|
-
data: y.data ||
|
|
7699
|
+
data: y.data || N
|
|
7700
7700
|
}), y.startTime = (/* @__PURE__ */ new Date()).getTime();
|
|
7701
7701
|
}
|
|
7702
7702
|
}, this.handleMouseMove = function(m) {
|
|
7703
7703
|
var S, O;
|
|
7704
7704
|
if (y.isStopPropagation && m.stopPropagation(), !!y.isStartDragging && (y.sumDeltaX += m.clientX - y.startX, y.sumDeltaY += m.clientY - y.startY, y.startX = m.clientX, y.startY = m.clientY, y.step <= 1 || Math.abs(y.sumDeltaX) > y.step || Math.abs(y.sumDeltaY) > y.step)) {
|
|
7705
|
-
var k = y.sumDeltaX % y.step,
|
|
7706
|
-
y.sumDeltaX = k, y.sumDeltaY =
|
|
7705
|
+
var k = y.sumDeltaX % y.step, N = y.sumDeltaY % y.step, A = y.sumDeltaX - k, T = y.sumDeltaY - N;
|
|
7706
|
+
y.sumDeltaX = k, y.sumDeltaY = N;
|
|
7707
7707
|
var F = (S = y.model) === null || S === void 0 ? void 0 : S.getData();
|
|
7708
7708
|
y.isDragging || ((O = y.eventCenter) === null || O === void 0 || O.emit(de["".concat(y.eventType, "_DRAGSTART")], {
|
|
7709
7709
|
e: m,
|
|
7710
7710
|
data: y.data || F
|
|
7711
7711
|
}), y.onDragStart({ event: m })), y.isDragging = !0, Promise.resolve().then(function() {
|
|
7712
|
-
var
|
|
7712
|
+
var M, W;
|
|
7713
7713
|
y.onDragging({
|
|
7714
7714
|
deltaX: A,
|
|
7715
7715
|
deltaY: T,
|
|
7716
7716
|
event: m
|
|
7717
|
-
}), (
|
|
7717
|
+
}), (M = y.eventCenter) === null || M === void 0 || M.emit(de["".concat(y.eventType, "_MOUSEMOVE")], {
|
|
7718
7718
|
deltaX: A,
|
|
7719
7719
|
deltaY: T,
|
|
7720
7720
|
e: m,
|
|
@@ -7728,13 +7728,13 @@ var EL = 0, ir = (
|
|
|
7728
7728
|
}, this.handleMouseUp = function(m) {
|
|
7729
7729
|
var S = window.document;
|
|
7730
7730
|
y.isStartDragging = !1, y.isStopPropagation && m.stopPropagation(), Promise.resolve().then(function() {
|
|
7731
|
-
var O, k,
|
|
7731
|
+
var O, k, N;
|
|
7732
7732
|
S.removeEventListener("mousemove", y.handleMouseMove, !1), S.removeEventListener("mouseup", y.handleMouseUp, !1);
|
|
7733
7733
|
var A = (O = y.model) === null || O === void 0 ? void 0 : O.getData();
|
|
7734
7734
|
(k = y.eventCenter) === null || k === void 0 || k.emit(de["".concat(y.eventType, "_MOUSEUP")], {
|
|
7735
7735
|
e: m,
|
|
7736
7736
|
data: y.data || A
|
|
7737
|
-
}), y.isDragging && (y.isDragging = !1, y.onDragEnd({ event: m }), (
|
|
7737
|
+
}), y.isDragging && (y.isDragging = !1, y.onDragEnd({ event: m }), (N = y.eventCenter) === null || N === void 0 || N.emit(de["".concat(y.eventType, "_DROP")], {
|
|
7738
7738
|
e: m,
|
|
7739
7739
|
data: y.data || A
|
|
7740
7740
|
}));
|
|
@@ -8849,7 +8849,7 @@ function $_(n) {
|
|
|
8849
8849
|
// ...props,
|
|
8850
8850
|
};
|
|
8851
8851
|
if (rt(ni(n), function(k) {
|
|
8852
|
-
var
|
|
8852
|
+
var N = i3(k, 2), A = N[0], T = N[1];
|
|
8853
8853
|
typeof T != "object" && (p[A] = T);
|
|
8854
8854
|
}), o) {
|
|
8855
8855
|
var g = String(o).split(/[\r\n]/g), y = g.length;
|
|
@@ -8859,8 +8859,8 @@ function $_(n) {
|
|
|
8859
8859
|
return o3(n);
|
|
8860
8860
|
}
|
|
8861
8861
|
if (y > 1) {
|
|
8862
|
-
var O = g.map(function(k,
|
|
8863
|
-
var A = s + 2, T = (
|
|
8862
|
+
var O = g.map(function(k, N) {
|
|
8863
|
+
var A = s + 2, T = (N - (y - 1) / 2) * A;
|
|
8864
8864
|
return H("tspan", { className: "lf-text-tspan", x: t, y: i + T, children: k });
|
|
8865
8865
|
});
|
|
8866
8866
|
return H("text", Za({}, p, { children: O }));
|
|
@@ -8883,12 +8883,12 @@ function o3(n) {
|
|
|
8883
8883
|
className: "lf-get-text-height"
|
|
8884
8884
|
}), k = p > O ? p : O;
|
|
8885
8885
|
g && (k = g);
|
|
8886
|
-
var
|
|
8887
|
-
return
|
|
8886
|
+
var N = h === "ellipsis";
|
|
8887
|
+
return N && (k = s + 2), H("g", { children: H("foreignObject", { width: y, height: k, x: e - y / 2, y: t - k / 2, style: { overflow: "visible", textAlign: "left" }, children: H("div", { className: "lf-node-text-auto-wrap", style: {
|
|
8888
8888
|
minHeight: k,
|
|
8889
8889
|
width: y,
|
|
8890
8890
|
padding: d
|
|
8891
|
-
}, children: H("div", { className:
|
|
8891
|
+
}, children: H("div", { className: N ? "lf-node-text-ellipsis-content" : "lf-node-text-auto-wrap-content", title: N ? m.join("") : "", style: Za({}, n), children: m.map(function(A) {
|
|
8892
8892
|
return H("div", { className: "lf-node-text--auto-wrap-inner", children: A });
|
|
8893
8893
|
}) }) }) }) });
|
|
8894
8894
|
}
|
|
@@ -9265,19 +9265,19 @@ var y3 = (
|
|
|
9265
9265
|
break;
|
|
9266
9266
|
}
|
|
9267
9267
|
O !== 0 && (S = Math.round(O / y.ResizeBasis.basisHeight * 1e5) / 1e3), y.ResizePCT.widthPCT = Math.max(Math.min(y.ResizePCT.widthPCT + S, y.ScaleLimit.maxScaleLimit), y.ScaleLimit.minScaleLimit), y.ResizePCT.heightPCT = Math.max(Math.min(y.ResizePCT.heightPCT + S, y.ScaleLimit.maxScaleLimit), y.ScaleLimit.minScaleLimit);
|
|
9268
|
-
var k = Math.round(y.ResizePCT.widthPCT * y.ResizeBasis.basisWidth / 100),
|
|
9268
|
+
var k = Math.round(y.ResizePCT.widthPCT * y.ResizeBasis.basisWidth / 100), N = Math.round(y.ResizePCT.heightPCT * y.ResizeBasis.basisHeight / 100);
|
|
9269
9269
|
switch (s) {
|
|
9270
9270
|
case pt.LEFT_TOP:
|
|
9271
|
-
h = p - k, v = g -
|
|
9271
|
+
h = p - k, v = g - N;
|
|
9272
9272
|
break;
|
|
9273
9273
|
case pt.RIGHT_TOP:
|
|
9274
|
-
h = k - p, v = g -
|
|
9274
|
+
h = k - p, v = g - N;
|
|
9275
9275
|
break;
|
|
9276
9276
|
case pt.RIGHT_BOTTOM:
|
|
9277
|
-
h = k - p, v =
|
|
9277
|
+
h = k - p, v = N - g;
|
|
9278
9278
|
break;
|
|
9279
9279
|
case pt.LEFT_BOTTOM:
|
|
9280
|
-
h = p - k, v =
|
|
9280
|
+
h = p - k, v = N - g;
|
|
9281
9281
|
break;
|
|
9282
9282
|
}
|
|
9283
9283
|
return d;
|
|
@@ -9505,18 +9505,18 @@ var w3 = function(n, e, t, r, i, o, a, s, l, u) {
|
|
|
9505
9505
|
model: o
|
|
9506
9506
|
});
|
|
9507
9507
|
}, z_ = function(n) {
|
|
9508
|
-
var e = n.x, t = n.y, r = n.deltaX, i = n.deltaY, o = n.index, a = n.nodeModel, s = n.graphModel, l = n.cancelCallback, u = a.r, c = a.rx, f = a.ry, d = a.width, h = a.height, v = a.PCTResizeInfo, p = a.minWidth, g = a.minHeight, y = a.maxWidth, m = a.maxHeight, S = a.rotate, O = a.x, k = a.y,
|
|
9508
|
+
var e = n.x, t = n.y, r = n.deltaX, i = n.deltaY, o = n.index, a = n.nodeModel, s = n.graphModel, l = n.cancelCallback, u = a.r, c = a.rx, f = a.ry, d = a.width, h = a.height, v = a.PCTResizeInfo, p = a.minWidth, g = a.minHeight, y = a.maxWidth, m = a.maxHeight, S = a.rotate, O = a.x, k = a.y, N = p === y, A = g === m, T = {
|
|
9509
9509
|
width: u || c || d,
|
|
9510
9510
|
height: u || f || h,
|
|
9511
9511
|
deltaX: r,
|
|
9512
9512
|
deltaY: i,
|
|
9513
9513
|
PCTResizeInfo: v
|
|
9514
|
-
}, F = u || c && f ? 1 / 2 : 1,
|
|
9514
|
+
}, F = u || c && f ? 1 / 2 : 1, M = e, W = t, U = w3(o, T, F, N, A, S, M, W, O, k);
|
|
9515
9515
|
if (U.width < p || U.width > y || U.height < g || U.height > m) {
|
|
9516
9516
|
l == null || l();
|
|
9517
9517
|
return;
|
|
9518
9518
|
}
|
|
9519
|
-
(S % (2 * Math.PI) == 0 || v ||
|
|
9519
|
+
(S % (2 * Math.PI) == 0 || v || M === void 0 || W === void 0) && (U.deltaX = N ? 0 : U.deltaX, U.deltaY = A ? 0 : U.deltaY);
|
|
9520
9520
|
var x = a.getData(), P = a.resize(U);
|
|
9521
9521
|
x.x === P.x && x.y === P.y || (A3(a, s), S3(x, P, r, i, o, a, s));
|
|
9522
9522
|
};
|
|
@@ -12111,10 +12111,10 @@ var I3 = {
|
|
|
12111
12111
|
}
|
|
12112
12112
|
if (!y) {
|
|
12113
12113
|
s.preventDefault();
|
|
12114
|
-
var
|
|
12114
|
+
var N = h.getPointByClient({
|
|
12115
12115
|
x: s.clientX,
|
|
12116
12116
|
y: s.clientY
|
|
12117
|
-
}), A =
|
|
12117
|
+
}), A = N.canvasOverlayPosition, T = A.x, F = A.y;
|
|
12118
12118
|
f.zoom(s.deltaY < 0, [T, F]);
|
|
12119
12119
|
}
|
|
12120
12120
|
}, r.clickHandler = function(s) {
|
|
@@ -12807,8 +12807,8 @@ var yI = /* @__PURE__ */ function() {
|
|
|
12807
12807
|
]), k = this.transformModel.CanvasPointToHtmlPoint([
|
|
12808
12808
|
S.x,
|
|
12809
12809
|
S.y
|
|
12810
|
-
]),
|
|
12811
|
-
return i ?
|
|
12810
|
+
]), N = Vu(O, t, r), A = Vu(k, t, r);
|
|
12811
|
+
return i ? N && A : N || A;
|
|
12812
12812
|
}
|
|
12813
12813
|
return !1;
|
|
12814
12814
|
}, n.prototype.graphDataToModel = function(e) {
|
|
@@ -13063,8 +13063,8 @@ var yI = /* @__PURE__ */ function() {
|
|
|
13063
13063
|
var o, a, s, l = this;
|
|
13064
13064
|
i === void 0 && (i = !1);
|
|
13065
13065
|
for (var u = e.reduce(function(S, O) {
|
|
13066
|
-
var k,
|
|
13067
|
-
return
|
|
13066
|
+
var k, N = (k = l.nodesMap[O]) === null || k === void 0 ? void 0 : k.model;
|
|
13067
|
+
return N && (S[O] = N.getMoveDistance(t, r, i)), S;
|
|
13068
13068
|
}, {}), c = 0; c < this.edges.length; c++) {
|
|
13069
13069
|
var f = this.edges[c], d = f.textPosition, h = d.x, v = d.y, p = u[f.sourceNodeId], g = u[f.targetNodeId], y = void 0, m = void 0;
|
|
13070
13070
|
p && g && f.modelType === He.POLYLINE_EDGE ? (o = Ht(p, 2), y = o[0], m = o[1], f.updatePointsList(y, m)) : (p && (a = Ht(p, 2), y = a[0], m = a[1], f.moveStartPoint(y, m)), g && (s = Ht(g, 2), y = s[0], m = s[1], f.moveEndPoint(y, m))), (p || g) && this.handleEdgeTextMove(f, h, v);
|
|
@@ -13161,10 +13161,10 @@ var yI = /* @__PURE__ */ function() {
|
|
|
13161
13161
|
}, n.prototype.getVirtualRectSize = function() {
|
|
13162
13162
|
var e = this.nodes, t = [], r = [];
|
|
13163
13163
|
e.forEach(function(d) {
|
|
13164
|
-
var h = d.x, v = d.y, p = d.width, g = d.height, y = d.getNodeStyle().strokeWidth, m = y === void 0 ? 0 : y, S = h + p / 2 + m, O = h - p / 2 - m, k = v + g / 2 + m,
|
|
13164
|
+
var h = d.x, v = d.y, p = d.width, g = d.height, y = d.getNodeStyle().strokeWidth, m = y === void 0 ? 0 : y, S = h + p / 2 + m, O = h - p / 2 - m, k = v + g / 2 + m, N = v - g / 2 - m;
|
|
13165
13165
|
t = t.concat([S, O].filter(function(A) {
|
|
13166
13166
|
return !Number.isNaN(A);
|
|
13167
|
-
})), r = r.concat([k,
|
|
13167
|
+
})), r = r.concat([k, N].filter(function(A) {
|
|
13168
13168
|
return !Number.isNaN(A);
|
|
13169
13169
|
}));
|
|
13170
13170
|
});
|
|
@@ -13726,21 +13726,21 @@ var yI = /* @__PURE__ */ function() {
|
|
|
13726
13726
|
var g = i.clientX, y = i.clientY, m = a.getPointByClient({
|
|
13727
13727
|
x: g,
|
|
13728
13728
|
y
|
|
13729
|
-
}), S = m.domOverlayPosition, O = S.x, k = S.y,
|
|
13729
|
+
}), S = m.domOverlayPosition, O = S.x, k = S.y, N = m.canvasOverlayPosition, A = N.x, T = N.y;
|
|
13730
13730
|
t.t && Al(t.t);
|
|
13731
|
-
var F = [],
|
|
13732
|
-
O < 10 ? F = [
|
|
13731
|
+
var F = [], M = 10;
|
|
13732
|
+
O < 10 ? F = [M, 0] : O + 10 > f ? F = [-M, 0] : k < 10 ? F = [0, M] : k + 10 > d && (F = [0, -M]), t.setState({
|
|
13733
13733
|
endX: A,
|
|
13734
13734
|
endY: T,
|
|
13735
13735
|
dragging: !0
|
|
13736
13736
|
}), t.moveAnchorEnd(A, T), F.length > 0 && !p && v && (t.t = F_(function() {
|
|
13737
13737
|
var W = $I(F, 2), U = W[0], x = W[1];
|
|
13738
13738
|
u.translate(U, x);
|
|
13739
|
-
var P = t.state,
|
|
13739
|
+
var P = t.state, D = P.endX, q = P.endY;
|
|
13740
13740
|
t.setState({
|
|
13741
|
-
endX:
|
|
13741
|
+
endX: D - U,
|
|
13742
13742
|
endY: q - x
|
|
13743
|
-
}), t.moveAnchorEnd(
|
|
13743
|
+
}), t.moveAnchorEnd(D - U, q - x);
|
|
13744
13744
|
})), c.emit(de.ANCHOR_DRAG, {
|
|
13745
13745
|
data: l,
|
|
13746
13746
|
e: i,
|
|
@@ -13771,10 +13771,10 @@ var yI = /* @__PURE__ */ function() {
|
|
|
13771
13771
|
y: v
|
|
13772
13772
|
}, a);
|
|
13773
13773
|
if (t.preTargetNode && t.preTargetNode.state !== et.DEFAULT && t.preTargetNode.setElementState(et.DEFAULT), !!p && g && g.node) {
|
|
13774
|
-
var y = g.node, m = g.anchor.id, S = "".concat(s.id, "_").concat(y.id, "_").concat(m, "_").concat(f), O = t.sourceRuleResults.get(S) || {}, k = O.isAllPass,
|
|
13774
|
+
var y = g.node, m = g.anchor.id, S = "".concat(s.id, "_").concat(y.id, "_").concat(m, "_").concat(f), O = t.sourceRuleResults.get(S) || {}, k = O.isAllPass, N = O.msg, A = t.targetRuleResults.get(S) || {}, T = A.isAllPass, F = A.msg;
|
|
13775
13775
|
if (k && T) {
|
|
13776
13776
|
y.setElementState(et.DEFAULT);
|
|
13777
|
-
var
|
|
13777
|
+
var M = a.getNodeModelById(g.node.id), W = (i = a.edgeGenerator) === null || i === void 0 ? void 0 : i.call(a, s.getData(), M == null ? void 0 : M.getData()), U = a.addEdge(Nr(Nr({}, W), { sourceNodeId: s.id, sourceAnchorId: f, startPoint: {
|
|
13778
13778
|
x: u,
|
|
13779
13779
|
y: c
|
|
13780
13780
|
}, targetNodeId: g.node.id, targetAnchorId: g.anchor.id, endPoint: {
|
|
@@ -13791,7 +13791,7 @@ var yI = /* @__PURE__ */ function() {
|
|
|
13791
13791
|
var P = y.getData();
|
|
13792
13792
|
return a.eventCenter.emit(de.CONNECTION_NOT_ALLOWED, {
|
|
13793
13793
|
data: P,
|
|
13794
|
-
msg: F ||
|
|
13794
|
+
msg: F || N || "不允许添加连线"
|
|
13795
13795
|
}), null;
|
|
13796
13796
|
}
|
|
13797
13797
|
}, t.sourceRuleResults = /* @__PURE__ */ new Map(), t.targetRuleResults = /* @__PURE__ */ new Map(), t.state = {
|
|
@@ -13913,28 +13913,28 @@ var yI = /* @__PURE__ */ function() {
|
|
|
13913
13913
|
y: p
|
|
13914
13914
|
}).canvasOverlayPosition, y = g.x, m = g.y, S = new Jt(y - d, m - h), O = ((o = r.normal) === null || o === void 0 ? void 0 : o.angle(S)) - r.defaultAngle, k = new bl(-d, -h).rotate(O).translate(d, h).toString();
|
|
13915
13915
|
u.transform = k, u.rotate = O;
|
|
13916
|
-
var
|
|
13916
|
+
var N = Fn(f, function(T) {
|
|
13917
13917
|
return T.id;
|
|
13918
13918
|
});
|
|
13919
|
-
|
|
13920
|
-
var A = g_(
|
|
13921
|
-
var
|
|
13922
|
-
return T[F] =
|
|
13919
|
+
N.indexOf(u.id) === -1 && (N = [u.id]);
|
|
13920
|
+
var A = g_(N, function(T, F) {
|
|
13921
|
+
var M = l.getNodeModelById(F);
|
|
13922
|
+
return T[F] = M == null ? void 0 : M.getMoveDistance(0, 0, !1), T;
|
|
13923
13923
|
}, {});
|
|
13924
|
-
|
|
13924
|
+
N.forEach(function(T) {
|
|
13925
13925
|
var F = l.getNodeEdges(T);
|
|
13926
|
-
F.forEach(function(
|
|
13927
|
-
if (A[
|
|
13928
|
-
var W = l.getNodeModelById(
|
|
13929
|
-
return x.id ===
|
|
13926
|
+
F.forEach(function(M) {
|
|
13927
|
+
if (A[M.sourceNodeId]) {
|
|
13928
|
+
var W = l.getNodeModelById(M.sourceNodeId), U = W.anchors.find(function(x) {
|
|
13929
|
+
return x.id === M.sourceAnchorId;
|
|
13930
13930
|
});
|
|
13931
|
-
|
|
13931
|
+
M.updateStartPoint(U);
|
|
13932
13932
|
}
|
|
13933
|
-
if (A[
|
|
13934
|
-
var W = l.getNodeModelById(
|
|
13935
|
-
return
|
|
13933
|
+
if (A[M.targetNodeId]) {
|
|
13934
|
+
var W = l.getNodeModelById(M.targetNodeId), U = W.anchors.find(function(D) {
|
|
13935
|
+
return D.id === M.targetAnchorId;
|
|
13936
13936
|
});
|
|
13937
|
-
|
|
13937
|
+
M.updateEndPoint(U);
|
|
13938
13938
|
}
|
|
13939
13939
|
});
|
|
13940
13940
|
}), c.emit(de.NODE_ROTATE, {
|
|
@@ -14171,17 +14171,17 @@ var UI = /* @__PURE__ */ function() {
|
|
|
14171
14171
|
});
|
|
14172
14172
|
if (k.length > 0 && k.length <= 4) {
|
|
14173
14173
|
if (k.length === 1) {
|
|
14174
|
-
var
|
|
14174
|
+
var N = Is(k, 1), A = N[0];
|
|
14175
14175
|
k = [A, A, A, A];
|
|
14176
14176
|
} else if (k.length === 2) {
|
|
14177
|
-
var T = Is(k, 2), F = T[0],
|
|
14178
|
-
k = [F,
|
|
14177
|
+
var T = Is(k, 2), F = T[0], M = T[1];
|
|
14178
|
+
k = [F, M, F, M];
|
|
14179
14179
|
} else if (k.length === 3) {
|
|
14180
|
-
var W = Is(k, 3), U = W[0],
|
|
14181
|
-
k = [U,
|
|
14180
|
+
var W = Is(k, 3), U = W[0], M = W[1], x = W[2];
|
|
14181
|
+
k = [U, M, x, M];
|
|
14182
14182
|
}
|
|
14183
|
-
var P = Is(k, 4),
|
|
14184
|
-
S += q + Ee, O +=
|
|
14183
|
+
var P = Is(k, 4), D = P[0], q = P[1], ve = P[2], Ee = P[3];
|
|
14184
|
+
S += q + Ee, O += D + ve, v = v + (q - Ee) / 2, p = p + (ve - D) / 2;
|
|
14185
14185
|
}
|
|
14186
14186
|
}
|
|
14187
14187
|
g = sr(sr({}, a), { x: v - 1, y: p - 1, width: S, height: O });
|
|
@@ -14264,27 +14264,27 @@ var UI = /* @__PURE__ */ function() {
|
|
|
14264
14264
|
};
|
|
14265
14265
|
}
|
|
14266
14266
|
}, r.onDragging = function(l) {
|
|
14267
|
-
var u, c, f, d, h = l.event, v = r.props, p = v.model, g = v.graphModel, y = g.editConfigModel, m = y.stopMoveGraph, S = y.autoExpand, O = y.snapGrid, k = g.transformModel,
|
|
14267
|
+
var u, c, f, d, h = l.event, v = r.props, p = v.model, g = v.graphModel, y = g.editConfigModel, m = y.stopMoveGraph, S = y.autoExpand, O = y.snapGrid, k = g.transformModel, N = g.selectNodes, A = g.width, T = g.height, F = g.gridSize;
|
|
14268
14268
|
p.isDragging = !0;
|
|
14269
|
-
var
|
|
14269
|
+
var M = h, W = M.clientX, U = M.clientY, x = g.getPointByClient({
|
|
14270
14270
|
x: W,
|
|
14271
14271
|
y: U
|
|
14272
|
-
}).canvasOverlayPosition, P = x.x,
|
|
14273
|
-
if (P = P + ((c = (u = r.moveOffset) === null || u === void 0 ? void 0 : u.dx) !== null && c !== void 0 ? c : 0),
|
|
14274
|
-
g.moveNode2Coordinate(p.id, P,
|
|
14272
|
+
}).canvasOverlayPosition, P = x.x, D = x.y, q = ks(k.CanvasPointToHtmlPoint([P, D]), 2), ve = q[0], Ee = q[1];
|
|
14273
|
+
if (P = P + ((c = (u = r.moveOffset) === null || u === void 0 ? void 0 : u.dx) !== null && c !== void 0 ? c : 0), D = D + ((d = (f = r.moveOffset) === null || f === void 0 ? void 0 : f.dy) !== null && d !== void 0 ? d : 0), P = Io(P, F, O), D = Io(D, F, O), !A || !T) {
|
|
14274
|
+
g.moveNode2Coordinate(p.id, P, D);
|
|
14275
14275
|
return;
|
|
14276
14276
|
}
|
|
14277
14277
|
var it = ve < 0 || Ee < 0 || ve > A || Ee > T;
|
|
14278
14278
|
if (!(S && !m && it)) {
|
|
14279
14279
|
var ot = ks(k.CanvasPointToHtmlPoint([
|
|
14280
14280
|
P - p.width / 2,
|
|
14281
|
-
|
|
14281
|
+
D - p.height / 2
|
|
14282
14282
|
]), 2), me = ot[0], je = ot[1], We = ks(k.CanvasPointToHtmlPoint([
|
|
14283
14283
|
P + p.width / 2,
|
|
14284
|
-
|
|
14284
|
+
D + p.height / 2
|
|
14285
14285
|
]), 2), Ne = We[0], Ue = We[1], L = Math.max(F, 20), X = [];
|
|
14286
14286
|
me < 0 ? X = [L, 0] : Ne > g.width ? X = [-L, 0] : je < 0 ? X = [0, L] : Ue > g.height && (X = [0, -L]), r.t && Al(r.t);
|
|
14287
|
-
var V =
|
|
14287
|
+
var V = N.map(function(re) {
|
|
14288
14288
|
return re.id;
|
|
14289
14289
|
});
|
|
14290
14290
|
V.indexOf(p.id) === -1 && (V = [p.id]), X.length > 0 && !m && S ? r.t = F_(function() {
|
|
@@ -14292,7 +14292,7 @@ var UI = /* @__PURE__ */ function() {
|
|
|
14292
14292
|
k.translate(ae ?? 0, ye ?? 0);
|
|
14293
14293
|
var Ae = -(ae ?? 0) / k.SCALE_X, dt = -(ye ?? 0) / k.SCALE_X;
|
|
14294
14294
|
g.moveNodes(V, Ae, dt);
|
|
14295
|
-
}) : g.moveNodes(V, P - p.x,
|
|
14295
|
+
}) : g.moveNodes(V, P - p.x, D - p.y);
|
|
14296
14296
|
}
|
|
14297
14297
|
}, r.onDragEnd = function() {
|
|
14298
14298
|
r.t && Al(r.t);
|
|
@@ -14814,12 +14814,12 @@ var gv = (
|
|
|
14814
14814
|
endY: k,
|
|
14815
14815
|
dragging: !0
|
|
14816
14816
|
});
|
|
14817
|
-
var
|
|
14817
|
+
var N = r.props.edgeModel, A = El({
|
|
14818
14818
|
x: d,
|
|
14819
14819
|
y: h
|
|
14820
14820
|
}, p);
|
|
14821
14821
|
if (A && A.node && r.isAllowAdjust(A).pass) {
|
|
14822
|
-
var T =
|
|
14822
|
+
var T = N.startPoint, F = N.endPoint, M = N.sourceNode, W = N.targetNode, U = g === Tr.SOURCE ? {
|
|
14823
14823
|
startPoint: {
|
|
14824
14824
|
x: A.anchor.x,
|
|
14825
14825
|
y: A.anchor.y
|
|
@@ -14839,13 +14839,13 @@ var gv = (
|
|
|
14839
14839
|
x: A.anchor.x,
|
|
14840
14840
|
y: A.anchor.y
|
|
14841
14841
|
},
|
|
14842
|
-
sourceNode:
|
|
14842
|
+
sourceNode: M,
|
|
14843
14843
|
targetNode: A.node
|
|
14844
14844
|
};
|
|
14845
|
-
|
|
14845
|
+
N.updateAfterAdjustStartAndEnd(U);
|
|
14846
14846
|
} else
|
|
14847
|
-
g === Tr.SOURCE ?
|
|
14848
|
-
|
|
14847
|
+
g === Tr.SOURCE ? N.updateStartPoint({ x: O, y: k }) : N.updateEndPoint({ x: O, y: k });
|
|
14848
|
+
N.text.value && m.adjustEdge && N.setText(Object.assign({}, N.text, N.textPosition));
|
|
14849
14849
|
}, r.onDragEnd = function(l) {
|
|
14850
14850
|
var u, c, f, d = l.event;
|
|
14851
14851
|
try {
|
|
@@ -14858,35 +14858,35 @@ var gv = (
|
|
|
14858
14858
|
}, v);
|
|
14859
14859
|
if (!O)
|
|
14860
14860
|
return;
|
|
14861
|
-
var
|
|
14861
|
+
var N = !1, A = void 0;
|
|
14862
14862
|
if (k && k.node) {
|
|
14863
|
-
var T = r.isAllowAdjust(k), F = T.pass,
|
|
14863
|
+
var T = r.isAllowAdjust(k), F = T.pass, M = T.msg, W = T.newTargetNode;
|
|
14864
14864
|
if (F) {
|
|
14865
|
-
var U = p.getData(), x = U.text, P = U.sourceAnchorId,
|
|
14866
|
-
if (A = lr(lr({ sourceAnchorId:
|
|
14865
|
+
var U = p.getData(), x = U.text, P = U.sourceAnchorId, D = P === void 0 ? "" : P, q = U.targetAnchorId, ve = q === void 0 ? "" : q, Ee = sk(U, ["text", "sourceAnchorId", "targetAnchorId"]);
|
|
14866
|
+
if (A = lr(lr({ sourceAnchorId: D, targetAnchorId: ve }, Ee), { text: (x == null ? void 0 : x.value) || "" }), g === Tr.SOURCE) {
|
|
14867
14867
|
var it = v.getNodeModelById(k.node.id), ot = v.getNodeModelById(p.targetNodeId), me = (u = v.edgeGenerator) === null || u === void 0 ? void 0 : u.call(v, it == null ? void 0 : it.getData(), ot == null ? void 0 : ot.getData(), A);
|
|
14868
14868
|
A = lr(lr({}, me), { sourceNodeId: k.node.id, sourceAnchorId: k.anchor.id, startPoint: {
|
|
14869
14869
|
x: k.anchor.x,
|
|
14870
14870
|
y: k.anchor.y
|
|
14871
|
-
}, targetNodeId: p.targetNodeId, endPoint: lr({}, p.endPoint) }), p.sourceNodeId === k.node.id && p.sourceAnchorId === k.anchor.id && (
|
|
14871
|
+
}, targetNodeId: p.targetNodeId, endPoint: lr({}, p.endPoint) }), p.sourceNodeId === k.node.id && p.sourceAnchorId === k.anchor.id && (N = !0);
|
|
14872
14872
|
} else if (g === Tr.TARGET) {
|
|
14873
14873
|
var it = v.getNodeModelById(p.sourceNodeId), ot = v.getNodeModelById(k.node.id), me = (c = v.edgeGenerator) === null || c === void 0 ? void 0 : c.call(v, it == null ? void 0 : it.getData(), ot == null ? void 0 : ot.getData(), A);
|
|
14874
14874
|
A = lr(lr({}, me), { sourceNodeId: p.sourceNodeId, startPoint: lr({}, p.startPoint), targetNodeId: k.node.id, targetAnchorId: k.anchor.id, endPoint: {
|
|
14875
14875
|
x: k.anchor.x,
|
|
14876
14876
|
y: k.anchor.y
|
|
14877
|
-
} }), p.targetNodeId === k.node.id && p.targetAnchorId === k.anchor.id && (
|
|
14877
|
+
} }), p.targetNodeId === k.node.id && p.targetAnchorId === k.anchor.id && (N = !0);
|
|
14878
14878
|
}
|
|
14879
14879
|
} else {
|
|
14880
|
-
|
|
14880
|
+
N = !0;
|
|
14881
14881
|
var je = W.getData();
|
|
14882
14882
|
v.eventCenter.emit(de.CONNECTION_NOT_ALLOWED, {
|
|
14883
14883
|
data: je,
|
|
14884
|
-
msg:
|
|
14884
|
+
msg: M
|
|
14885
14885
|
});
|
|
14886
14886
|
}
|
|
14887
14887
|
} else
|
|
14888
|
-
|
|
14889
|
-
if (
|
|
14888
|
+
N = !0;
|
|
14889
|
+
if (N)
|
|
14890
14890
|
r.recoveryEdge();
|
|
14891
14891
|
else {
|
|
14892
14892
|
var We = p.getData();
|
|
@@ -14945,9 +14945,9 @@ var gv = (
|
|
|
14945
14945
|
var g = f.isAllowConnectedAsSource(d, h, v, o), y = d.isAllowConnectedAsTarget(f, h, v, o);
|
|
14946
14946
|
this.sourceRuleResults.set(p, wl(g)), this.targetRuleResults.set(p, wl(y));
|
|
14947
14947
|
}
|
|
14948
|
-
var m = this.sourceRuleResults.get(p), S = m.isAllPass, O = m.msg, k = this.targetRuleResults.get(p),
|
|
14948
|
+
var m = this.sourceRuleResults.get(p), S = m.isAllPass, O = m.msg, k = this.targetRuleResults.get(p), N = k.isAllPass, A = k.msg, T = S && N ? et.ALLOW_CONNECT : et.NOT_ALLOW_CONNECT;
|
|
14949
14949
|
return c === Tr.SOURCE ? f.setElementState(T) : d.setElementState(T), {
|
|
14950
|
-
pass: S &&
|
|
14950
|
+
pass: S && N,
|
|
14951
14951
|
msg: A || O,
|
|
14952
14952
|
newTargetNode: d
|
|
14953
14953
|
};
|
|
@@ -15478,8 +15478,8 @@ var ck = /* @__PURE__ */ function() {
|
|
|
15478
15478
|
draggable: !0
|
|
15479
15479
|
}, g = H("g", { className: v, children: f.getAppendShape(p) }), y = o.editConfigModel, m = y.adjustEdge, S = y.adjustEdgeMiddle;
|
|
15480
15480
|
if (m && s) {
|
|
15481
|
-
var O = p.startIndex, k = p.endIndex,
|
|
15482
|
-
p.draggable = !
|
|
15481
|
+
var O = p.startIndex, k = p.endIndex, N = S && (O === 0 || k === u - 1);
|
|
15482
|
+
p.draggable = !N, p.start.x === p.end.x ? (p.draggable && (v += "-ew-resize"), p.direction = xt.VERTICAL) : p.start.y === p.end.y && (p.draggable && (v += "-ns-resize"), p.direction = xt.HORIZONTAL), g = H("g", { className: f.isDragging ? "lf-dragging" : "lf-drag-able", onMouseDown: function(A) {
|
|
15483
15483
|
return t.beforeDragStart(A, p);
|
|
15484
15484
|
}, children: H("g", { className: v, children: f.getAppendShape(p) }) });
|
|
15485
15485
|
}
|
|
@@ -15659,10 +15659,10 @@ var _k = /* @__PURE__ */ function() {
|
|
|
15659
15659
|
var p = s.edgeText, g = p.overflowMode, y = p.lineHeight, m = p.wrapPadding, S = p.textWidth;
|
|
15660
15660
|
S && g === "autoWrap" && (u = Wr(Wr({}, v), { width: S, minWidth: S, lineHeight: y, padding: m }));
|
|
15661
15661
|
} else if (i.BaseType === Mt.NODE) {
|
|
15662
|
-
var O = s.nodeText, g = O.overflowMode, y = O.lineHeight, m = O.wrapPadding, S = O.textWidth, k = i.width,
|
|
15663
|
-
(
|
|
15662
|
+
var O = s.nodeText, g = O.overflowMode, y = O.lineHeight, m = O.wrapPadding, S = O.textWidth, k = i.width, N = i.modelType, A = i.textWidth, T = A || S || k;
|
|
15663
|
+
(N !== He.TEXT_NODE && g === "autoWrap" || N === He.TEXT_NODE && S) && (u = Wr(Wr({}, v), { width: T, minWidth: T, lineHeight: y, padding: m }));
|
|
15664
15664
|
}
|
|
15665
|
-
var F = i.text,
|
|
15665
|
+
var F = i.text, M = F.x, W = F.y, U = xk(a.CanvasPointToHtmlPoint([M, W]), 2), x = U[0], P = U[1];
|
|
15666
15666
|
return {
|
|
15667
15667
|
style: Wr(Wr({ left: x, top: P }, u), l)
|
|
15668
15668
|
};
|
|
@@ -16360,11 +16360,11 @@ var mf = function() {
|
|
|
16360
16360
|
return A === "+" ? ["+"] : (A = A.replace(/\+{2}/g, "+plus"), A.split("+"));
|
|
16361
16361
|
}
|
|
16362
16362
|
function O(A, T) {
|
|
16363
|
-
var F,
|
|
16363
|
+
var F, M, W, U = [];
|
|
16364
16364
|
for (F = S(A), W = 0; W < F.length; ++W)
|
|
16365
|
-
|
|
16366
|
-
return T = m(
|
|
16367
|
-
key:
|
|
16365
|
+
M = F[W], s[M] && (M = s[M]), T && T != "keypress" && a[M] && (M = a[M], U.push("shift")), g(M) && U.push(M);
|
|
16366
|
+
return T = m(M, U, T), {
|
|
16367
|
+
key: M,
|
|
16368
16368
|
modifiers: U,
|
|
16369
16369
|
action: T
|
|
16370
16370
|
};
|
|
@@ -16372,12 +16372,12 @@ var mf = function() {
|
|
|
16372
16372
|
function k(A, T) {
|
|
16373
16373
|
return A === null || A === t ? !1 : A === T ? !0 : k(A.parentNode, T);
|
|
16374
16374
|
}
|
|
16375
|
-
function
|
|
16375
|
+
function N(A) {
|
|
16376
16376
|
var T = this;
|
|
16377
|
-
if (A = A || t, !(T instanceof
|
|
16378
|
-
return new
|
|
16377
|
+
if (A = A || t, !(T instanceof N))
|
|
16378
|
+
return new N(A);
|
|
16379
16379
|
T.target = A, T._callbacks = {}, T._directMap = {};
|
|
16380
|
-
var F = {},
|
|
16380
|
+
var F = {}, M, W = !1, U = !1, x = !1;
|
|
16381
16381
|
function P(me) {
|
|
16382
16382
|
me = me || {};
|
|
16383
16383
|
var je = !1, We;
|
|
@@ -16390,7 +16390,7 @@ var mf = function() {
|
|
|
16390
16390
|
}
|
|
16391
16391
|
je || (x = !1);
|
|
16392
16392
|
}
|
|
16393
|
-
function
|
|
16393
|
+
function D(me, je, We, Ne, Ue, L) {
|
|
16394
16394
|
var X, V, re = [], ae = We.type;
|
|
16395
16395
|
if (!T._callbacks[me])
|
|
16396
16396
|
return [];
|
|
@@ -16405,7 +16405,7 @@ var mf = function() {
|
|
|
16405
16405
|
T.stopCallback(je, je.target || je.srcElement, We, Ne) || me(je, We) === !1 && (v(je), p(je));
|
|
16406
16406
|
}
|
|
16407
16407
|
T._handleKey = function(me, je, We) {
|
|
16408
|
-
var Ne =
|
|
16408
|
+
var Ne = D(me, je, We), Ue, L = {}, X = 0, V = !1;
|
|
16409
16409
|
for (Ue = 0; Ue < Ne.length; ++Ue)
|
|
16410
16410
|
Ne[Ue].seq && (X = Math.max(X, Ne[Ue].level));
|
|
16411
16411
|
for (Ue = 0; Ue < Ne.length; ++Ue) {
|
|
@@ -16432,7 +16432,7 @@ var mf = function() {
|
|
|
16432
16432
|
}
|
|
16433
16433
|
}
|
|
16434
16434
|
function Ee() {
|
|
16435
|
-
clearTimeout(
|
|
16435
|
+
clearTimeout(M), M = setTimeout(P, 1e3);
|
|
16436
16436
|
}
|
|
16437
16437
|
function it(me, je, We, Ne) {
|
|
16438
16438
|
F[me] = 0;
|
|
@@ -16456,7 +16456,7 @@ var mf = function() {
|
|
|
16456
16456
|
it(me, L, je, We);
|
|
16457
16457
|
return;
|
|
16458
16458
|
}
|
|
16459
|
-
X = O(me, We), T._callbacks[X.key] = T._callbacks[X.key] || [],
|
|
16459
|
+
X = O(me, We), T._callbacks[X.key] = T._callbacks[X.key] || [], D(X.key, X.modifiers, { type: X.action }, Ne, me, Ue), T._callbacks[X.key][Ne ? "unshift" : "push"]({
|
|
16460
16460
|
callback: je,
|
|
16461
16461
|
modifiers: X.modifiers,
|
|
16462
16462
|
action: X.action,
|
|
@@ -16470,44 +16470,44 @@ var mf = function() {
|
|
|
16470
16470
|
ot(me[Ne], je, We);
|
|
16471
16471
|
}, c(A, "keypress", ve), c(A, "keydown", ve), c(A, "keyup", ve);
|
|
16472
16472
|
}
|
|
16473
|
-
|
|
16474
|
-
var
|
|
16475
|
-
return A = A instanceof Array ? A : [A],
|
|
16476
|
-
},
|
|
16473
|
+
N.prototype.bind = function(A, T, F) {
|
|
16474
|
+
var M = this;
|
|
16475
|
+
return A = A instanceof Array ? A : [A], M._bindMultiple.call(M, A, T, F), M;
|
|
16476
|
+
}, N.prototype.unbind = function(A, T) {
|
|
16477
16477
|
var F = this;
|
|
16478
16478
|
return F.bind.call(F, A, function() {
|
|
16479
16479
|
}, T);
|
|
16480
|
-
},
|
|
16480
|
+
}, N.prototype.trigger = function(A, T) {
|
|
16481
16481
|
var F = this;
|
|
16482
16482
|
return F._directMap[A + ":" + T] && F._directMap[A + ":" + T]({}, A), F;
|
|
16483
|
-
},
|
|
16483
|
+
}, N.prototype.reset = function() {
|
|
16484
16484
|
var A = this;
|
|
16485
16485
|
return A._callbacks = {}, A._directMap = {}, A;
|
|
16486
|
-
},
|
|
16486
|
+
}, N.prototype.stopCallback = function(A, T) {
|
|
16487
16487
|
var F = this;
|
|
16488
16488
|
if ((" " + T.className + " ").indexOf(" mousetrap ") > -1 || k(T, F.target))
|
|
16489
16489
|
return !1;
|
|
16490
16490
|
if ("composedPath" in A && typeof A.composedPath == "function") {
|
|
16491
|
-
var
|
|
16492
|
-
|
|
16491
|
+
var M = A.composedPath()[0];
|
|
16492
|
+
M !== A.target && (T = M);
|
|
16493
16493
|
}
|
|
16494
16494
|
return T.tagName == "INPUT" || T.tagName == "SELECT" || T.tagName == "TEXTAREA" || T.isContentEditable;
|
|
16495
|
-
},
|
|
16495
|
+
}, N.prototype.handleKey = function() {
|
|
16496
16496
|
var A = this;
|
|
16497
16497
|
return A._handleKey.apply(A, arguments);
|
|
16498
|
-
},
|
|
16498
|
+
}, N.addKeycodes = function(A) {
|
|
16499
16499
|
for (var T in A)
|
|
16500
16500
|
A.hasOwnProperty(T) && (i[T] = A[T]);
|
|
16501
16501
|
l = null;
|
|
16502
|
-
},
|
|
16503
|
-
var A =
|
|
16502
|
+
}, N.init = function() {
|
|
16503
|
+
var A = N(t);
|
|
16504
16504
|
for (var T in A)
|
|
16505
|
-
T.charAt(0) !== "_" && (
|
|
16505
|
+
T.charAt(0) !== "_" && (N[T] = /* @__PURE__ */ function(F) {
|
|
16506
16506
|
return function() {
|
|
16507
16507
|
return A[F].apply(A, arguments);
|
|
16508
16508
|
};
|
|
16509
16509
|
}(T));
|
|
16510
|
-
},
|
|
16510
|
+
}, N.init(), e.Mousetrap = N, n.exports && (n.exports = N);
|
|
16511
16511
|
})(typeof window < "u" ? window : null, typeof window < "u" ? document : null);
|
|
16512
16512
|
})(K_);
|
|
16513
16513
|
var Bk = K_.exports;
|
|
@@ -18186,22 +18186,22 @@ var i6 = /* @__PURE__ */ function() {
|
|
|
18186
18186
|
break;
|
|
18187
18187
|
}
|
|
18188
18188
|
O !== 0 && (S = Math.round(O / c.ResizeBasis.basisHeight * 1e5) / 1e3), c.ResizePCT.widthPCT = Math.max(Math.min(c.ResizePCT.widthPCT + S, c.ScaleLimit.maxScaleLimit), c.ScaleLimit.minScaleLimit), c.ResizePCT.heightPCT = Math.max(Math.min(c.ResizePCT.heightPCT + S, c.ScaleLimit.maxScaleLimit), c.ScaleLimit.minScaleLimit);
|
|
18189
|
-
var k = Math.round(c.ResizePCT.widthPCT * c.ResizeBasis.basisWidth / 100),
|
|
18189
|
+
var k = Math.round(c.ResizePCT.widthPCT * c.ResizeBasis.basisWidth / 100), N = Math.round(c.ResizePCT.heightPCT * c.ResizeBasis.basisHeight / 100);
|
|
18190
18190
|
switch (o) {
|
|
18191
18191
|
case 0:
|
|
18192
|
-
a = l - k, s = u -
|
|
18192
|
+
a = l - k, s = u - N;
|
|
18193
18193
|
break;
|
|
18194
18194
|
case 1:
|
|
18195
|
-
a = k - l, s = u -
|
|
18195
|
+
a = k - l, s = u - N;
|
|
18196
18196
|
break;
|
|
18197
18197
|
case 2:
|
|
18198
|
-
a = k - l, s =
|
|
18198
|
+
a = k - l, s = N - u;
|
|
18199
18199
|
break;
|
|
18200
18200
|
case 3:
|
|
18201
|
-
a = l - k, s =
|
|
18201
|
+
a = l - k, s = N - u;
|
|
18202
18202
|
break;
|
|
18203
18203
|
}
|
|
18204
|
-
return y.width = k, y.height =
|
|
18204
|
+
return y.width = k, y.height = N, y.deltaX = a / d, y.deltaY = s / d, y;
|
|
18205
18205
|
}
|
|
18206
18206
|
switch (o) {
|
|
18207
18207
|
case 0:
|
|
@@ -18238,7 +18238,7 @@ var i6 = /* @__PURE__ */ function() {
|
|
|
18238
18238
|
});
|
|
18239
18239
|
});
|
|
18240
18240
|
}, r.updateRect = function(i) {
|
|
18241
|
-
var o = i.deltaX, a = i.deltaY, s = r.nodeModel, l = s.x, u = s.y, c = s.width, f = s.height, d = s.radius, h = s.PCTResizeInfo, v = r.nodeModel, p = v.minWidth, g = v.minHeight, y = v.maxWidth, m = v.maxHeight, S = r.index, O = p === y, k = g === m,
|
|
18241
|
+
var o = i.deltaX, a = i.deltaY, s = r.nodeModel, l = s.x, u = s.y, c = s.width, f = s.height, d = s.radius, h = s.PCTResizeInfo, v = r.nodeModel, p = v.minWidth, g = v.minHeight, y = v.maxWidth, m = v.maxHeight, S = r.index, O = p === y, k = g === m, N = r.getResize({
|
|
18242
18242
|
index: S,
|
|
18243
18243
|
deltaX: o,
|
|
18244
18244
|
deltaY: a,
|
|
@@ -18249,17 +18249,17 @@ var i6 = /* @__PURE__ */ function() {
|
|
|
18249
18249
|
freezeWidth: O,
|
|
18250
18250
|
freezeHeight: k
|
|
18251
18251
|
});
|
|
18252
|
-
if (
|
|
18252
|
+
if (N.width < p || N.width > y || N.height < g || N.height > m) {
|
|
18253
18253
|
r.dragHandler.cancelDrag();
|
|
18254
18254
|
return;
|
|
18255
18255
|
}
|
|
18256
18256
|
r.updatePosition({
|
|
18257
|
-
deltaX: O ? 0 :
|
|
18258
|
-
deltaY: k ? 0 :
|
|
18259
|
-
}), r.nodeModel.width =
|
|
18257
|
+
deltaX: O ? 0 : N.deltaX,
|
|
18258
|
+
deltaY: k ? 0 : N.deltaY
|
|
18259
|
+
}), r.nodeModel.width = N.width, r.nodeModel.height = N.height, r.nodeModel.setProperties({
|
|
18260
18260
|
nodeSize: {
|
|
18261
|
-
width:
|
|
18262
|
-
height:
|
|
18261
|
+
width: N.width,
|
|
18262
|
+
height: N.height
|
|
18263
18263
|
}
|
|
18264
18264
|
});
|
|
18265
18265
|
var A = {
|
|
@@ -18282,12 +18282,12 @@ var i6 = /* @__PURE__ */ function() {
|
|
|
18282
18282
|
afterNode: T
|
|
18283
18283
|
});
|
|
18284
18284
|
}, r.updateEllipse = function(i) {
|
|
18285
|
-
var o = i.deltaX, a = i.deltaY, s = r.nodeModel, l = s.rx, u = s.ry, c = s.x, f = s.y, d = s.PCTResizeInfo, h = r.index, v = r.nodeModel, p = v.minWidth, g = v.minHeight, y = v.maxWidth, m = v.maxHeight, S = p === y, O = g === m, k = l,
|
|
18285
|
+
var o = i.deltaX, a = i.deltaY, s = r.nodeModel, l = s.rx, u = s.ry, c = s.x, f = s.y, d = s.PCTResizeInfo, h = r.index, v = r.nodeModel, p = v.minWidth, g = v.minHeight, y = v.maxWidth, m = v.maxHeight, S = p === y, O = g === m, k = l, N = u, A = r.getResize({
|
|
18286
18286
|
index: h,
|
|
18287
18287
|
deltaX: o,
|
|
18288
18288
|
deltaY: a,
|
|
18289
18289
|
width: k,
|
|
18290
|
-
height:
|
|
18290
|
+
height: N,
|
|
18291
18291
|
PCTResizeInfo: d,
|
|
18292
18292
|
pct: 1 / 2,
|
|
18293
18293
|
freezeWidth: S,
|
|
@@ -18322,12 +18322,12 @@ var i6 = /* @__PURE__ */ function() {
|
|
|
18322
18322
|
afterNode: F
|
|
18323
18323
|
});
|
|
18324
18324
|
}, r.updateDiamond = function(i) {
|
|
18325
|
-
var o = i.deltaX, a = i.deltaY, s = r.nodeModel, l = s.rx, u = s.ry, c = s.x, f = s.y, d = s.PCTResizeInfo, h = r.index, v = r.nodeModel, p = v.minWidth, g = v.minHeight, y = v.maxWidth, m = v.maxHeight, S = p === y, O = g === m, k = l,
|
|
18325
|
+
var o = i.deltaX, a = i.deltaY, s = r.nodeModel, l = s.rx, u = s.ry, c = s.x, f = s.y, d = s.PCTResizeInfo, h = r.index, v = r.nodeModel, p = v.minWidth, g = v.minHeight, y = v.maxWidth, m = v.maxHeight, S = p === y, O = g === m, k = l, N = u, A = r.getResize({
|
|
18326
18326
|
index: h,
|
|
18327
18327
|
deltaX: o,
|
|
18328
18328
|
deltaY: a,
|
|
18329
18329
|
width: k,
|
|
18330
|
-
height:
|
|
18330
|
+
height: N,
|
|
18331
18331
|
PCTResizeInfo: d,
|
|
18332
18332
|
pct: 1 / 2,
|
|
18333
18333
|
freezeWidth: S,
|
|
@@ -19229,13 +19229,13 @@ var Bl = function() {
|
|
|
19229
19229
|
rotate: m
|
|
19230
19230
|
// 如果不传递type,会自动触发NODE_ADD
|
|
19231
19231
|
// 有概率触发appendToGroup
|
|
19232
|
-
}, k = de.NODE_GROUP_COPY || "node:group-copy-add",
|
|
19233
|
-
if (r.addChild(
|
|
19234
|
-
l.push(
|
|
19235
|
-
}), h.outgoing.edges.forEach(function(
|
|
19236
|
-
l.push(
|
|
19232
|
+
}, k = de.NODE_GROUP_COPY || "node:group-copy-add", N = a.addNode(O, k);
|
|
19233
|
+
if (r.addChild(N.id), e[d] = N.id, u.push(N), h.incoming.edges.forEach(function(M) {
|
|
19234
|
+
l.push(M);
|
|
19235
|
+
}), h.outgoing.edges.forEach(function(M) {
|
|
19236
|
+
l.push(M);
|
|
19237
19237
|
}), S instanceof Set) {
|
|
19238
|
-
var A = o.createAllChildNodes(e, S,
|
|
19238
|
+
var A = o.createAllChildNodes(e, S, N, i), T = A.nodesArray, F = A.edgesArray;
|
|
19239
19239
|
u.push.apply(u, ac([], oc(T), !1)), s.push.apply(s, ac([], oc(F), !1));
|
|
19240
19240
|
}
|
|
19241
19241
|
}
|
|
@@ -19802,12 +19802,12 @@ function E6(n) {
|
|
|
19802
19802
|
});
|
|
19803
19803
|
}
|
|
19804
19804
|
f != null && f.children && (f.children = f.children.map(function(F) {
|
|
19805
|
-
var
|
|
19805
|
+
var M = l.find(function(W) {
|
|
19806
19806
|
return W.id === F;
|
|
19807
19807
|
}) || u.find(function(W) {
|
|
19808
19808
|
return W.id === F;
|
|
19809
19809
|
});
|
|
19810
|
-
return
|
|
19810
|
+
return M || {};
|
|
19811
19811
|
}));
|
|
19812
19812
|
var m = {};
|
|
19813
19813
|
if (typeof f == "string")
|
|
@@ -19820,13 +19820,13 @@ function E6(n) {
|
|
|
19820
19820
|
});
|
|
19821
19821
|
try {
|
|
19822
19822
|
for (var S = zd(Object.entries(f)), O = S.next(); !O.done; O = S.next()) {
|
|
19823
|
-
var k = rn(O.value, 2),
|
|
19823
|
+
var k = rn(O.value, 2), N = k[0], A = k[1];
|
|
19824
19824
|
if ((A == null ? void 0 : A.flag) === 1)
|
|
19825
19825
|
return;
|
|
19826
|
-
var T = [d,
|
|
19826
|
+
var T = [d, N].filter(function(F) {
|
|
19827
19827
|
return F;
|
|
19828
19828
|
}).join(".");
|
|
19829
|
-
a.out.has(T) || (typeof A != "object" ?
|
|
19829
|
+
a.out.has(T) || (typeof A != "object" ? N.indexOf("-") === 0 || ["#text", "#cdata-section", "#comment"].includes(N) ? m[N] = A : m["-".concat(N)] = A : o.has(T) ? m["-".concat(N)] = c(A, T) : m[N] = c(A, T));
|
|
19830
19830
|
}
|
|
19831
19831
|
} catch (F) {
|
|
19832
19832
|
h = { error: F };
|
|
@@ -20775,7 +20775,7 @@ var F6 = /* @__PURE__ */ function() {
|
|
|
20775
20775
|
var t = this.props.graphModel;
|
|
20776
20776
|
t.eventCenter.off("blank:click,node:click,edge:click");
|
|
20777
20777
|
}, e.prototype.render = function() {
|
|
20778
|
-
var t, r = this.props, i = r.label, o = r.element, a = r.graphModel, s = this.state, l = s.isDragging, u = s.isHovered, c = s.isSelected, f = s.isEditing, d = a.transformModel, h = d.getTransformStyle().transform, v = i.id, p = i.x, g = i.y, y = i.zIndex, m = i.vertical, S = i.style, O = i.rotate, k = i.content,
|
|
20778
|
+
var t, r = this.props, i = r.label, o = r.element, a = r.graphModel, s = this.state, l = s.isDragging, u = s.isHovered, c = s.isSelected, f = s.isEditing, d = a.transformModel, h = d.getTransformStyle().transform, v = i.id, p = i.x, g = i.y, y = i.zIndex, m = i.vertical, S = i.style, O = i.rotate, k = i.content, N = i.labelWidth, A = i.textOverflowMode, T = N ?? (o.BaseType === "node" ? o.width - 20 : 80), F = {
|
|
20779
20779
|
left: "".concat(p - T / 2, "px"),
|
|
20780
20780
|
top: "".concat(g - 10, "px"),
|
|
20781
20781
|
width: "".concat(T, "px"),
|
|
@@ -20933,16 +20933,16 @@ var F6 = /* @__PURE__ */ function() {
|
|
|
20933
20933
|
return Object.prototype.toString.call(A).match(/^\[object\s(.*)\]$/)[1];
|
|
20934
20934
|
}, a = function() {
|
|
20935
20935
|
this.data = [];
|
|
20936
|
-
}, s = function(T, F,
|
|
20937
|
-
this.data = T, this.size = T.length, this.type = F, this.encoding =
|
|
20936
|
+
}, s = function(T, F, M) {
|
|
20937
|
+
this.data = T, this.size = T.length, this.type = F, this.encoding = M;
|
|
20938
20938
|
}, l = a.prototype, u = s.prototype, c = i.FileReaderSync, f = function(A) {
|
|
20939
20939
|
this.code = this[this.name = A];
|
|
20940
|
-
}, d = "NOT_FOUND_ERR SECURITY_ERR ABORT_ERR NOT_READABLE_ERR ENCODING_ERR NO_MODIFICATION_ALLOWED_ERR INVALID_STATE_ERR SYNTAX_ERR".split(" "), h = d.length, v = i.URL || i.webkitURL || i, p = v.createObjectURL, g = v.revokeObjectURL, y = v, m = i.btoa, S = i.atob, O = i.ArrayBuffer, k = i.Uint8Array,
|
|
20940
|
+
}, d = "NOT_FOUND_ERR SECURITY_ERR ABORT_ERR NOT_READABLE_ERR ENCODING_ERR NO_MODIFICATION_ALLOWED_ERR INVALID_STATE_ERR SYNTAX_ERR".split(" "), h = d.length, v = i.URL || i.webkitURL || i, p = v.createObjectURL, g = v.revokeObjectURL, y = v, m = i.btoa, S = i.atob, O = i.ArrayBuffer, k = i.Uint8Array, N = /^[\w-]+:\/*\[?[\w\.:-]+\]?(?::[0-9]+)?/;
|
|
20941
20941
|
for (s.fake = u.fake = !0; h--; )
|
|
20942
20942
|
f.prototype[d[h]] = h + 1;
|
|
20943
20943
|
return v.createObjectURL || (y = i.URL = function(A) {
|
|
20944
20944
|
var T = document.createElementNS("http://www.w3.org/1999/xhtml", "a"), F;
|
|
20945
|
-
return T.href = A, "origin" in T || (T.protocol.toLowerCase() === "data:" ? T.origin = null : (F = A.match(
|
|
20945
|
+
return T.href = A, "origin" in T || (T.protocol.toLowerCase() === "data:" ? T.origin = null : (F = A.match(N), T.origin = F && F[1])), T;
|
|
20946
20946
|
}), y.createObjectURL = function(A) {
|
|
20947
20947
|
var T = A.type, F;
|
|
20948
20948
|
if (T === null && (T = "application/octet-stream"), A instanceof s)
|
|
@@ -20954,8 +20954,8 @@ var F6 = /* @__PURE__ */ function() {
|
|
|
20954
20954
|
}, l.append = function(A) {
|
|
20955
20955
|
var T = this.data;
|
|
20956
20956
|
if (k && (A instanceof O || A instanceof k)) {
|
|
20957
|
-
for (var F = "",
|
|
20958
|
-
F += String.fromCharCode(
|
|
20957
|
+
for (var F = "", M = new k(A), W = 0, U = M.length; W < U; W++)
|
|
20958
|
+
F += String.fromCharCode(M[W]);
|
|
20959
20959
|
T.push(F);
|
|
20960
20960
|
} else if (o(A) === "Blob" || o(A) === "File")
|
|
20961
20961
|
if (c) {
|
|
@@ -20969,9 +20969,9 @@ var F6 = /* @__PURE__ */ function() {
|
|
|
20969
20969
|
}, l.toString = function() {
|
|
20970
20970
|
return "[object BlobBuilder]";
|
|
20971
20971
|
}, u.slice = function(A, T, F) {
|
|
20972
|
-
var
|
|
20973
|
-
return
|
|
20974
|
-
this.data.slice(A,
|
|
20972
|
+
var M = arguments.length;
|
|
20973
|
+
return M < 3 && (F = null), new s(
|
|
20974
|
+
this.data.slice(A, M > 1 ? T : this.data.length),
|
|
20975
20975
|
F,
|
|
20976
20976
|
this.encoding
|
|
20977
20977
|
);
|
|
@@ -24032,43 +24032,43 @@ var F6 = /* @__PURE__ */ function() {
|
|
|
24032
24032
|
e.extensions.imageDragging = t;
|
|
24033
24033
|
}(), function() {
|
|
24034
24034
|
function t(x) {
|
|
24035
|
-
var P = e.selection.getSelectionStart(this.options.ownerDocument),
|
|
24036
|
-
(
|
|
24035
|
+
var P = e.selection.getSelectionStart(this.options.ownerDocument), D = P.textContent, q = e.selection.getCaretOffsets(P);
|
|
24036
|
+
(D[q.left - 1] === void 0 || D[q.left - 1].trim() === "" || D[q.left] !== void 0 && D[q.left].trim() === "") && x.preventDefault();
|
|
24037
24037
|
}
|
|
24038
24038
|
function r(x, P) {
|
|
24039
24039
|
if (this.options.disableReturn || P.getAttribute("data-disable-return"))
|
|
24040
24040
|
x.preventDefault();
|
|
24041
24041
|
else if (this.options.disableDoubleReturn || P.getAttribute("data-disable-double-return")) {
|
|
24042
|
-
var
|
|
24043
|
-
(
|
|
24042
|
+
var D = e.selection.getSelectionStart(this.options.ownerDocument);
|
|
24043
|
+
(D && D.textContent.trim() === "" && D.nodeName.toLowerCase() !== "li" || D.previousElementSibling && D.previousElementSibling.nodeName.toLowerCase() !== "br" && D.previousElementSibling.textContent.trim() === "") && x.preventDefault();
|
|
24044
24044
|
}
|
|
24045
24045
|
}
|
|
24046
24046
|
function i(x) {
|
|
24047
|
-
var P = e.selection.getSelectionStart(this.options.ownerDocument),
|
|
24048
|
-
|
|
24047
|
+
var P = e.selection.getSelectionStart(this.options.ownerDocument), D = P && P.nodeName.toLowerCase();
|
|
24048
|
+
D === "pre" && (x.preventDefault(), e.util.insertHTMLCommand(this.options.ownerDocument, " ")), e.util.isListItem(P) && (x.preventDefault(), x.shiftKey ? this.options.ownerDocument.execCommand("outdent", !1, null) : this.options.ownerDocument.execCommand("indent", !1, null));
|
|
24049
24049
|
}
|
|
24050
24050
|
function o(x) {
|
|
24051
|
-
var P,
|
|
24051
|
+
var P, D = e.selection.getSelectionStart(this.options.ownerDocument), q = D.nodeName.toLowerCase(), ve = /^(\s+|<br\/?>)?$/i, Ee = /h\d/i;
|
|
24052
24052
|
e.util.isKey(x, [e.util.keyCode.BACKSPACE, e.util.keyCode.ENTER]) && // has a preceeding sibling
|
|
24053
|
-
|
|
24053
|
+
D.previousElementSibling && // in a header
|
|
24054
24054
|
Ee.test(q) && // at the very end of the block
|
|
24055
|
-
e.selection.getCaretOffsets(
|
|
24056
|
-
|
|
24055
|
+
e.selection.getCaretOffsets(D).left === 0 ? e.util.isKey(x, e.util.keyCode.BACKSPACE) && ve.test(D.previousElementSibling.innerHTML) ? (D.previousElementSibling.parentNode.removeChild(D.previousElementSibling), x.preventDefault()) : !this.options.disableDoubleReturn && e.util.isKey(x, e.util.keyCode.ENTER) && (P = this.options.ownerDocument.createElement("p"), P.innerHTML = "<br>", D.previousElementSibling.parentNode.insertBefore(P, D), x.preventDefault()) : e.util.isKey(x, e.util.keyCode.DELETE) && // between two sibling elements
|
|
24056
|
+
D.nextElementSibling && D.previousElementSibling && // not in a header
|
|
24057
24057
|
!Ee.test(q) && // in an empty tag
|
|
24058
|
-
ve.test(
|
|
24059
|
-
Ee.test(
|
|
24060
|
-
ve.test(
|
|
24061
|
-
!
|
|
24062
|
-
!
|
|
24063
|
-
|
|
24058
|
+
ve.test(D.innerHTML) && // when the next tag *is* a header
|
|
24059
|
+
Ee.test(D.nextElementSibling.nodeName.toLowerCase()) ? (e.selection.moveCursor(this.options.ownerDocument, D.nextElementSibling), D.previousElementSibling.parentNode.removeChild(D), x.preventDefault()) : e.util.isKey(x, e.util.keyCode.BACKSPACE) && q === "li" && // hitting backspace inside an empty li
|
|
24060
|
+
ve.test(D.innerHTML) && // is first element (no preceeding siblings)
|
|
24061
|
+
!D.previousElementSibling && // parent also does not have a sibling
|
|
24062
|
+
!D.parentElement.previousElementSibling && // is not the only li in a list
|
|
24063
|
+
D.nextElementSibling && D.nextElementSibling.nodeName.toLowerCase() === "li" ? (P = this.options.ownerDocument.createElement("p"), P.innerHTML = "<br>", D.parentElement.parentElement.insertBefore(P, D.parentElement), e.selection.moveCursor(this.options.ownerDocument, P), D.parentElement.removeChild(D), x.preventDefault()) : e.util.isKey(x, e.util.keyCode.BACKSPACE) && e.util.getClosestTag(D, "blockquote") !== !1 && e.selection.getCaretOffsets(D).left === 0 ? (x.preventDefault(), e.util.execFormatBlock(this.options.ownerDocument, "p")) : e.util.isKey(x, e.util.keyCode.ENTER) && e.util.getClosestTag(D, "blockquote") !== !1 && e.selection.getCaretOffsets(D).right === 0 ? (P = this.options.ownerDocument.createElement("p"), P.innerHTML = "<br>", D.parentElement.insertBefore(P, D.nextSibling), e.selection.moveCursor(this.options.ownerDocument, P), x.preventDefault()) : e.util.isKey(x, e.util.keyCode.BACKSPACE) && e.util.isMediumEditorElement(D.parentElement) && !D.previousElementSibling && D.nextElementSibling && ve.test(D.innerHTML) && (x.preventDefault(), e.selection.moveCursor(this.options.ownerDocument, D.nextSibling), D.parentElement.removeChild(D));
|
|
24064
24064
|
}
|
|
24065
24065
|
function a(x) {
|
|
24066
|
-
var P = e.selection.getSelectionStart(this.options.ownerDocument),
|
|
24067
|
-
P && (e.util.isMediumEditorElement(P) && P.children.length === 0 && !e.util.isBlockContainer(P) && this.options.ownerDocument.execCommand("formatBlock", !1, "p"), e.util.isKey(x, e.util.keyCode.ENTER) && !e.util.isListItem(P) && !e.util.isBlockContainer(P) && (
|
|
24066
|
+
var P = e.selection.getSelectionStart(this.options.ownerDocument), D;
|
|
24067
|
+
P && (e.util.isMediumEditorElement(P) && P.children.length === 0 && !e.util.isBlockContainer(P) && this.options.ownerDocument.execCommand("formatBlock", !1, "p"), e.util.isKey(x, e.util.keyCode.ENTER) && !e.util.isListItem(P) && !e.util.isBlockContainer(P) && (D = P.nodeName.toLowerCase(), D === "a" ? this.options.ownerDocument.execCommand("unlink", !1, null) : !x.shiftKey && !x.ctrlKey && this.options.ownerDocument.execCommand("formatBlock", !1, "p")));
|
|
24068
24068
|
}
|
|
24069
24069
|
function s(x, P) {
|
|
24070
|
-
var
|
|
24071
|
-
|
|
24070
|
+
var D = P.parentNode.querySelector('textarea[medium-editor-textarea-id="' + P.getAttribute("medium-editor-textarea-id") + '"]');
|
|
24071
|
+
D && (D.value = P.innerHTML.trim());
|
|
24072
24072
|
}
|
|
24073
24073
|
function l(x) {
|
|
24074
24074
|
x._mediumEditors || (x._mediumEditors = [null]), this.id || (this.id = x._mediumEditors.length), x._mediumEditors[this.id] = this;
|
|
@@ -24076,9 +24076,9 @@ var F6 = /* @__PURE__ */ function() {
|
|
|
24076
24076
|
function u(x) {
|
|
24077
24077
|
!x._mediumEditors || !x._mediumEditors[this.id] || (x._mediumEditors[this.id] = null);
|
|
24078
24078
|
}
|
|
24079
|
-
function c(x, P,
|
|
24079
|
+
function c(x, P, D) {
|
|
24080
24080
|
var q = [];
|
|
24081
|
-
if (x || (x = []), typeof x == "string" && (x = P.querySelectorAll(x)), e.util.isElement(x) && (x = [x]),
|
|
24081
|
+
if (x || (x = []), typeof x == "string" && (x = P.querySelectorAll(x)), e.util.isElement(x) && (x = [x]), D)
|
|
24082
24082
|
for (var ve = 0; ve < x.length; ve++) {
|
|
24083
24083
|
var Ee = x[ve];
|
|
24084
24084
|
e.util.isElement(Ee) && !Ee.getAttribute("data-medium-editor-element") && !Ee.getAttribute("medium-editor-textarea-id") && q.push(Ee);
|
|
@@ -24092,15 +24092,15 @@ var F6 = /* @__PURE__ */ function() {
|
|
|
24092
24092
|
P && (P.classList.remove("medium-editor-hidden"), P.removeAttribute("medium-editor-textarea-id")), x.parentNode && x.parentNode.removeChild(x);
|
|
24093
24093
|
}
|
|
24094
24094
|
function d(x, P) {
|
|
24095
|
-
return Object.keys(P).forEach(function(
|
|
24096
|
-
x[
|
|
24095
|
+
return Object.keys(P).forEach(function(D) {
|
|
24096
|
+
x[D] === void 0 && (x[D] = P[D]);
|
|
24097
24097
|
}), x;
|
|
24098
24098
|
}
|
|
24099
|
-
function h(x, P,
|
|
24099
|
+
function h(x, P, D) {
|
|
24100
24100
|
var q = {
|
|
24101
|
-
window:
|
|
24102
|
-
document:
|
|
24103
|
-
base:
|
|
24101
|
+
window: D.options.contentWindow,
|
|
24102
|
+
document: D.options.ownerDocument,
|
|
24103
|
+
base: D
|
|
24104
24104
|
};
|
|
24105
24105
|
return x = d(x, q), typeof x.init == "function" && x.init(), x.name || (x.name = P), x;
|
|
24106
24106
|
}
|
|
@@ -24128,8 +24128,8 @@ var F6 = /* @__PURE__ */ function() {
|
|
|
24128
24128
|
return !this.options.extensions.imageDragging;
|
|
24129
24129
|
}
|
|
24130
24130
|
function k(x) {
|
|
24131
|
-
for (var P = this.options.ownerDocument.createElement("div"),
|
|
24132
|
-
|
|
24131
|
+
for (var P = this.options.ownerDocument.createElement("div"), D = Date.now(), q = "medium-editor-" + D, ve = x.attributes; this.options.ownerDocument.getElementById(q); )
|
|
24132
|
+
D++, q = "medium-editor-" + D;
|
|
24133
24133
|
P.className = x.className, P.id = q, P.innerHTML = x.value, x.setAttribute("medium-editor-textarea-id", q);
|
|
24134
24134
|
for (var Ee = 0, it = ve.length; Ee < it; Ee++)
|
|
24135
24135
|
P.hasAttribute(ve[Ee].nodeName) || P.setAttribute(ve[Ee].nodeName, ve[Ee].value);
|
|
@@ -24140,11 +24140,11 @@ var F6 = /* @__PURE__ */ function() {
|
|
|
24140
24140
|
x
|
|
24141
24141
|
), P;
|
|
24142
24142
|
}
|
|
24143
|
-
function
|
|
24143
|
+
function N(x, P) {
|
|
24144
24144
|
if (!x.getAttribute("data-medium-editor-element")) {
|
|
24145
24145
|
x.nodeName.toLowerCase() === "textarea" && (x = k.call(this, x), this.instanceHandleEditableInput || (this.instanceHandleEditableInput = s.bind(this), this.subscribe("editableInput", this.instanceHandleEditableInput))), !this.options.disableEditing && !x.getAttribute("data-disable-editing") && (x.setAttribute("contentEditable", !0), x.setAttribute("spellcheck", this.options.spellcheck)), this.instanceHandleEditableKeydownEnter || (x.getAttribute("data-disable-return") || x.getAttribute("data-disable-double-return")) && (this.instanceHandleEditableKeydownEnter = r.bind(this), this.subscribe("editableKeydownEnter", this.instanceHandleEditableKeydownEnter)), !this.options.disableReturn && !x.getAttribute("data-disable-return") && this.on(x, "keyup", a.bind(this));
|
|
24146
|
-
var
|
|
24147
|
-
x.setAttribute("data-medium-editor-element", !0), x.classList.add("medium-editor-element"), x.setAttribute("role", "textbox"), x.setAttribute("aria-multiline", !0), x.setAttribute("data-medium-editor-editor-index", P), x.setAttribute("medium-editor-index",
|
|
24146
|
+
var D = e.util.guid();
|
|
24147
|
+
x.setAttribute("data-medium-editor-element", !0), x.classList.add("medium-editor-element"), x.setAttribute("role", "textbox"), x.setAttribute("aria-multiline", !0), x.setAttribute("data-medium-editor-editor-index", P), x.setAttribute("medium-editor-index", D), U[D] = x.innerHTML, this.events.attachAllEventsToElement(x);
|
|
24148
24148
|
}
|
|
24149
24149
|
return x;
|
|
24150
24150
|
}
|
|
@@ -24168,27 +24168,27 @@ var F6 = /* @__PURE__ */ function() {
|
|
|
24168
24168
|
Object.keys(P).forEach(function(ve) {
|
|
24169
24169
|
P[ve] && this.addBuiltInExtension(ve);
|
|
24170
24170
|
}, this);
|
|
24171
|
-
var
|
|
24172
|
-
if (!
|
|
24171
|
+
var D = this.options.extensions.toolbar;
|
|
24172
|
+
if (!D && v.call(this)) {
|
|
24173
24173
|
var q = e.util.extend({}, this.options.toolbar, {
|
|
24174
24174
|
allowMultiParagraphSelection: this.options.allowMultiParagraphSelection
|
|
24175
24175
|
// deprecated
|
|
24176
24176
|
});
|
|
24177
|
-
|
|
24177
|
+
D = new e.extensions.toolbar(q);
|
|
24178
24178
|
}
|
|
24179
|
-
|
|
24179
|
+
D && this.extensions.push(h(D, "toolbar", this));
|
|
24180
24180
|
}
|
|
24181
24181
|
function F(x, P) {
|
|
24182
|
-
var
|
|
24182
|
+
var D = [
|
|
24183
24183
|
["allowMultiParagraphSelection", "toolbar.allowMultiParagraphSelection"]
|
|
24184
24184
|
];
|
|
24185
|
-
return P &&
|
|
24185
|
+
return P && D.forEach(function(q) {
|
|
24186
24186
|
P.hasOwnProperty(q[0]) && P[q[0]] !== void 0 && e.util.deprecated(q[0], q[1], "v6.0.0");
|
|
24187
24187
|
}), e.util.defaults({}, P, x);
|
|
24188
24188
|
}
|
|
24189
|
-
function
|
|
24190
|
-
var
|
|
24191
|
-
if (ve =
|
|
24189
|
+
function M(x, P) {
|
|
24190
|
+
var D = /^append-(.+)$/gi, q = /justify([A-Za-z]*)$/g, ve, Ee;
|
|
24191
|
+
if (ve = D.exec(x), ve)
|
|
24192
24192
|
return e.util.execFormatBlock(this.options.ownerDocument, ve[1]);
|
|
24193
24193
|
if (x === "fontSize")
|
|
24194
24194
|
return P.size && e.util.deprecated(".size option for fontSize command", ".value", "6.0.0"), Ee = P.value || P.size, this.options.ownerDocument.execCommand("fontSize", !1, Ee);
|
|
@@ -24212,11 +24212,11 @@ var F6 = /* @__PURE__ */ function() {
|
|
|
24212
24212
|
}
|
|
24213
24213
|
function W(x) {
|
|
24214
24214
|
if (x) {
|
|
24215
|
-
var P,
|
|
24215
|
+
var P, D = Array.prototype.slice.call(x.childNodes).filter(function(q) {
|
|
24216
24216
|
var ve = q.nodeName.toLowerCase() === "div";
|
|
24217
24217
|
return ve && !P && (P = q.style.textAlign), ve;
|
|
24218
24218
|
});
|
|
24219
|
-
|
|
24219
|
+
D.length && (this.saveSelection(), D.forEach(function(q) {
|
|
24220
24220
|
if (q.style.textAlign === P) {
|
|
24221
24221
|
var ve = q.lastChild;
|
|
24222
24222
|
if (ve) {
|
|
@@ -24244,11 +24244,11 @@ var F6 = /* @__PURE__ */ function() {
|
|
|
24244
24244
|
this.options.spellcheck && (x.innerHTML = x.innerHTML), x.removeAttribute("contentEditable"), x.removeAttribute("spellcheck"), x.removeAttribute("data-medium-editor-element"), x.classList.remove("medium-editor-element"), x.removeAttribute("role"), x.removeAttribute("aria-multiline"), x.removeAttribute("medium-editor-index"), x.removeAttribute("data-medium-editor-editor-index"), x.getAttribute("medium-editor-textarea-id") && f(x);
|
|
24245
24245
|
}, this), this.elements = [], this.instanceHandleEditableKeydownEnter = null, this.instanceHandleEditableInput = null, u.call(this, this.options.contentWindow));
|
|
24246
24246
|
},
|
|
24247
|
-
on: function(x, P,
|
|
24248
|
-
return this.events.attachDOMEvent(x, P,
|
|
24247
|
+
on: function(x, P, D, q) {
|
|
24248
|
+
return this.events.attachDOMEvent(x, P, D, q), this;
|
|
24249
24249
|
},
|
|
24250
|
-
off: function(x, P,
|
|
24251
|
-
return this.events.detachDOMEvent(x, P,
|
|
24250
|
+
off: function(x, P, D, q) {
|
|
24251
|
+
return this.events.detachDOMEvent(x, P, D, q), this;
|
|
24252
24252
|
},
|
|
24253
24253
|
subscribe: function(x, P) {
|
|
24254
24254
|
return this.events.attachCustomEvent(x, P), this;
|
|
@@ -24256,8 +24256,8 @@ var F6 = /* @__PURE__ */ function() {
|
|
|
24256
24256
|
unsubscribe: function(x, P) {
|
|
24257
24257
|
return this.events.detachCustomEvent(x, P), this;
|
|
24258
24258
|
},
|
|
24259
|
-
trigger: function(x, P,
|
|
24260
|
-
return this.events.triggerCustomEvent(x, P,
|
|
24259
|
+
trigger: function(x, P, D) {
|
|
24260
|
+
return this.events.triggerCustomEvent(x, P, D), this;
|
|
24261
24261
|
},
|
|
24262
24262
|
delay: function(x) {
|
|
24263
24263
|
var P = this;
|
|
@@ -24266,58 +24266,58 @@ var F6 = /* @__PURE__ */ function() {
|
|
|
24266
24266
|
}, this.options.delay);
|
|
24267
24267
|
},
|
|
24268
24268
|
serialize: function() {
|
|
24269
|
-
var x, P,
|
|
24269
|
+
var x, P, D = {}, q = this.elements.length;
|
|
24270
24270
|
for (x = 0; x < q; x += 1)
|
|
24271
|
-
P = this.elements[x].id !== "" ? this.elements[x].id : "element-" + x,
|
|
24271
|
+
P = this.elements[x].id !== "" ? this.elements[x].id : "element-" + x, D[P] = {
|
|
24272
24272
|
value: this.elements[x].innerHTML.trim()
|
|
24273
24273
|
};
|
|
24274
|
-
return
|
|
24274
|
+
return D;
|
|
24275
24275
|
},
|
|
24276
24276
|
getExtensionByName: function(x) {
|
|
24277
24277
|
var P;
|
|
24278
|
-
return this.extensions && this.extensions.length && this.extensions.some(function(
|
|
24279
|
-
return
|
|
24278
|
+
return this.extensions && this.extensions.length && this.extensions.some(function(D) {
|
|
24279
|
+
return D.name === x ? (P = D, !0) : !1;
|
|
24280
24280
|
}), P;
|
|
24281
24281
|
},
|
|
24282
24282
|
/**
|
|
24283
24283
|
* NOT DOCUMENTED - exposed as a helper for other extensions to use
|
|
24284
24284
|
*/
|
|
24285
24285
|
addBuiltInExtension: function(x, P) {
|
|
24286
|
-
var
|
|
24287
|
-
if (
|
|
24288
|
-
return
|
|
24286
|
+
var D = this.getExtensionByName(x), q;
|
|
24287
|
+
if (D)
|
|
24288
|
+
return D;
|
|
24289
24289
|
switch (x) {
|
|
24290
24290
|
case "anchor":
|
|
24291
|
-
q = e.util.extend({}, this.options.anchor, P),
|
|
24291
|
+
q = e.util.extend({}, this.options.anchor, P), D = new e.extensions.anchor(q);
|
|
24292
24292
|
break;
|
|
24293
24293
|
case "anchor-preview":
|
|
24294
|
-
|
|
24294
|
+
D = new e.extensions.anchorPreview(this.options.anchorPreview);
|
|
24295
24295
|
break;
|
|
24296
24296
|
case "autoLink":
|
|
24297
|
-
|
|
24297
|
+
D = new e.extensions.autoLink();
|
|
24298
24298
|
break;
|
|
24299
24299
|
case "fileDragging":
|
|
24300
|
-
|
|
24300
|
+
D = new e.extensions.fileDragging(P);
|
|
24301
24301
|
break;
|
|
24302
24302
|
case "fontname":
|
|
24303
|
-
|
|
24303
|
+
D = new e.extensions.fontName(this.options.fontName);
|
|
24304
24304
|
break;
|
|
24305
24305
|
case "fontsize":
|
|
24306
|
-
|
|
24306
|
+
D = new e.extensions.fontSize(P);
|
|
24307
24307
|
break;
|
|
24308
24308
|
case "keyboardCommands":
|
|
24309
|
-
|
|
24309
|
+
D = new e.extensions.keyboardCommands(this.options.keyboardCommands);
|
|
24310
24310
|
break;
|
|
24311
24311
|
case "paste":
|
|
24312
|
-
|
|
24312
|
+
D = new e.extensions.paste(this.options.paste);
|
|
24313
24313
|
break;
|
|
24314
24314
|
case "placeholder":
|
|
24315
|
-
|
|
24315
|
+
D = new e.extensions.placeholder(this.options.placeholder);
|
|
24316
24316
|
break;
|
|
24317
24317
|
default:
|
|
24318
|
-
e.extensions.button.isBuiltInButton(x) && (P ? (q = e.util.defaults({}, P, e.extensions.button.prototype.defaults[x]),
|
|
24318
|
+
e.extensions.button.isBuiltInButton(x) && (P ? (q = e.util.defaults({}, P, e.extensions.button.prototype.defaults[x]), D = new e.extensions.button(q)) : D = new e.extensions.button(x));
|
|
24319
24319
|
}
|
|
24320
|
-
return
|
|
24320
|
+
return D && this.extensions.push(h(D, x, this)), D;
|
|
24321
24321
|
},
|
|
24322
24322
|
stopSelectionUpdates: function() {
|
|
24323
24323
|
this.preventSelectionUpdates = !0;
|
|
@@ -24332,8 +24332,8 @@ var F6 = /* @__PURE__ */ function() {
|
|
|
24332
24332
|
// Wrapper around document.queryCommandState for checking whether an action has already
|
|
24333
24333
|
// been applied to the current selection
|
|
24334
24334
|
queryCommandState: function(x) {
|
|
24335
|
-
var P = /^full-(.+)$/gi,
|
|
24336
|
-
|
|
24335
|
+
var P = /^full-(.+)$/gi, D, q = null;
|
|
24336
|
+
D = P.exec(x), D && (x = D[1]);
|
|
24337
24337
|
try {
|
|
24338
24338
|
q = this.options.ownerDocument.queryCommandState(x);
|
|
24339
24339
|
} catch {
|
|
@@ -24342,8 +24342,8 @@ var F6 = /* @__PURE__ */ function() {
|
|
|
24342
24342
|
return q;
|
|
24343
24343
|
},
|
|
24344
24344
|
execAction: function(x, P) {
|
|
24345
|
-
var
|
|
24346
|
-
return q =
|
|
24345
|
+
var D = /^full-(.+)$/gi, q, ve;
|
|
24346
|
+
return q = D.exec(x), q ? (this.saveSelection(), this.selectAllContents(), ve = M.call(this, q[1], P), this.restoreSelection()) : ve = M.call(this, x, P), (x === "insertunorderedlist" || x === "insertorderedlist") && e.util.cleanListDOM(this.options.ownerDocument, this.getSelectedParentElement()), this.checkSelection(), ve;
|
|
24347
24347
|
},
|
|
24348
24348
|
getSelectedParentElement: function(x) {
|
|
24349
24349
|
return x === void 0 && (x = this.options.contentWindow.getSelection().getRangeAt(0)), e.selection.getSelectedParentElement(x);
|
|
@@ -24370,8 +24370,8 @@ var F6 = /* @__PURE__ */ function() {
|
|
|
24370
24370
|
// Export the state of the selection in respect to one of this
|
|
24371
24371
|
// instance of MediumEditor's elements
|
|
24372
24372
|
exportSelection: function() {
|
|
24373
|
-
var x = e.selection.getSelectionElement(this.options.contentWindow), P = this.elements.indexOf(x),
|
|
24374
|
-
return P >= 0 && (
|
|
24373
|
+
var x = e.selection.getSelectionElement(this.options.contentWindow), P = this.elements.indexOf(x), D = null;
|
|
24374
|
+
return P >= 0 && (D = e.selection.exportSelection(x, this.options.ownerDocument)), D !== null && P !== 0 && (D.editableElementIndex = P), D;
|
|
24375
24375
|
},
|
|
24376
24376
|
saveSelection: function() {
|
|
24377
24377
|
this.selectionState = this.exportSelection();
|
|
@@ -24380,15 +24380,15 @@ var F6 = /* @__PURE__ */ function() {
|
|
|
24380
24380
|
// to MediumEditor.exportSelection
|
|
24381
24381
|
importSelection: function(x, P) {
|
|
24382
24382
|
if (x) {
|
|
24383
|
-
var
|
|
24384
|
-
e.selection.importSelection(x,
|
|
24383
|
+
var D = this.elements[x.editableElementIndex || 0];
|
|
24384
|
+
e.selection.importSelection(x, D, this.options.ownerDocument, P);
|
|
24385
24385
|
}
|
|
24386
24386
|
},
|
|
24387
24387
|
restoreSelection: function() {
|
|
24388
24388
|
this.importSelection(this.selectionState);
|
|
24389
24389
|
},
|
|
24390
24390
|
createLink: function(x) {
|
|
24391
|
-
var P = e.selection.getSelectionElement(this.options.contentWindow),
|
|
24391
|
+
var P = e.selection.getSelectionElement(this.options.contentWindow), D = {}, q;
|
|
24392
24392
|
if (this.elements.indexOf(P) !== -1) {
|
|
24393
24393
|
try {
|
|
24394
24394
|
if (this.events.disableCustomEvent("editableInput"), x.url && e.util.deprecated(".url option for createLink", ".value", "6.0.0"), q = x.url || x.value, q && q.trim().length > 0) {
|
|
@@ -24428,14 +24428,14 @@ var F6 = /* @__PURE__ */ function() {
|
|
|
24428
24428
|
}
|
|
24429
24429
|
}
|
|
24430
24430
|
if (this.options.targetBlank || x.target === "_blank" || x.buttonClass) {
|
|
24431
|
-
|
|
24431
|
+
D = this.options.ownerDocument.createEvent("HTMLEvents"), D.initEvent("input", !0, !0, this.options.contentWindow);
|
|
24432
24432
|
for (var V = 0, re = this.elements.length; V < re; V += 1)
|
|
24433
|
-
this.elements[V].dispatchEvent(
|
|
24433
|
+
this.elements[V].dispatchEvent(D);
|
|
24434
24434
|
}
|
|
24435
24435
|
} finally {
|
|
24436
24436
|
this.events.enableCustomEvent("editableInput");
|
|
24437
24437
|
}
|
|
24438
|
-
this.events.triggerCustomEvent("editableInput",
|
|
24438
|
+
this.events.triggerCustomEvent("editableInput", D, P);
|
|
24439
24439
|
}
|
|
24440
24440
|
},
|
|
24441
24441
|
cleanPaste: function(x) {
|
|
@@ -24446,8 +24446,8 @@ var F6 = /* @__PURE__ */ function() {
|
|
|
24446
24446
|
},
|
|
24447
24447
|
setContent: function(x, P) {
|
|
24448
24448
|
if (P = P || 0, this.elements[P]) {
|
|
24449
|
-
var
|
|
24450
|
-
|
|
24449
|
+
var D = this.elements[P];
|
|
24450
|
+
D.innerHTML = x, this.checkContentChanged(D);
|
|
24451
24451
|
}
|
|
24452
24452
|
},
|
|
24453
24453
|
getContent: function(x) {
|
|
@@ -24462,29 +24462,29 @@ var F6 = /* @__PURE__ */ function() {
|
|
|
24462
24462
|
P !== -1 && this.setContent(U[x.getAttribute("medium-editor-index")], P);
|
|
24463
24463
|
return;
|
|
24464
24464
|
}
|
|
24465
|
-
this.elements.forEach(function(
|
|
24466
|
-
this.setContent(U[
|
|
24465
|
+
this.elements.forEach(function(D, q) {
|
|
24466
|
+
this.setContent(U[D.getAttribute("medium-editor-index")], q);
|
|
24467
24467
|
}, this);
|
|
24468
24468
|
},
|
|
24469
24469
|
addElements: function(x) {
|
|
24470
24470
|
var P = c(x, this.options.ownerDocument, !0);
|
|
24471
24471
|
if (P.length === 0)
|
|
24472
24472
|
return !1;
|
|
24473
|
-
P.forEach(function(
|
|
24474
|
-
|
|
24473
|
+
P.forEach(function(D) {
|
|
24474
|
+
D = N.call(this, D, this.id), this.elements.push(D), this.trigger("addElement", { target: D, currentTarget: D }, D);
|
|
24475
24475
|
}, this);
|
|
24476
24476
|
},
|
|
24477
24477
|
removeElements: function(x) {
|
|
24478
|
-
var P = c(x, this.options.ownerDocument),
|
|
24478
|
+
var P = c(x, this.options.ownerDocument), D = P.map(function(q) {
|
|
24479
24479
|
return q.getAttribute("medium-editor-textarea-id") && q.parentNode ? q.parentNode.querySelector('div[medium-editor-textarea-id="' + q.getAttribute("medium-editor-textarea-id") + '"]') : q;
|
|
24480
24480
|
});
|
|
24481
24481
|
this.elements = this.elements.filter(function(q) {
|
|
24482
|
-
return
|
|
24482
|
+
return D.indexOf(q) !== -1 ? (this.events.cleanupElement(q), q.getAttribute("medium-editor-textarea-id") && f(q), this.trigger("removeElement", { target: q, currentTarget: q }, q), !1) : !0;
|
|
24483
24483
|
}, this);
|
|
24484
24484
|
}
|
|
24485
24485
|
}, e.getEditorFromElement = function(x) {
|
|
24486
|
-
var P = x.getAttribute("data-medium-editor-editor-index"),
|
|
24487
|
-
return
|
|
24486
|
+
var P = x.getAttribute("data-medium-editor-editor-index"), D = x && x.ownerDocument && (x.ownerDocument.defaultView || x.ownerDocument.parentWindow);
|
|
24487
|
+
return D && D._mediumEditors && D._mediumEditors[P] ? D._mediumEditors[P] : null;
|
|
24488
24488
|
};
|
|
24489
24489
|
}(), function() {
|
|
24490
24490
|
e.prototype.defaults = {
|
|
@@ -25008,10 +25008,10 @@ var y0 = function() {
|
|
|
25008
25008
|
return;
|
|
25009
25009
|
t = t || {};
|
|
25010
25010
|
var r = this.colour, i = r.hsla, o = "hsl(" + i[0] * Z6 + ", 100%, 50%)", a = r.hslString, s = r.hslaString, l = this._domH, u = this._domSL, c = this._domA, f = Or(".picker_selector", l), d = Or(".picker_selector", u), h = Or(".picker_selector", c);
|
|
25011
|
-
function v(
|
|
25011
|
+
function v(N, A, T) {
|
|
25012
25012
|
A.style.left = T * 100 + "%";
|
|
25013
25013
|
}
|
|
25014
|
-
function p(
|
|
25014
|
+
function p(N, A, T) {
|
|
25015
25015
|
A.style.top = T * 100 + "%";
|
|
25016
25016
|
}
|
|
25017
25017
|
v(l, f, i[0]), this._domSL.style.backgroundColor = this._domH.style.color = o, v(u, d, i[1]), p(u, d, 1 - i[2]), u.style.color = a, p(c, h, 1 - i[3]);
|
|
@@ -25134,7 +25134,7 @@ function m0() {
|
|
|
25134
25134
|
isTextRange: g,
|
|
25135
25135
|
getBody: y,
|
|
25136
25136
|
forEach: m
|
|
25137
|
-
},
|
|
25137
|
+
}, N = {
|
|
25138
25138
|
version: "1.3.2",
|
|
25139
25139
|
initialized: !1,
|
|
25140
25140
|
isBrowser: O,
|
|
@@ -25156,13 +25156,13 @@ function m0() {
|
|
|
25156
25156
|
O && X ? alert(L) : A(L);
|
|
25157
25157
|
}
|
|
25158
25158
|
function F(L) {
|
|
25159
|
-
|
|
25159
|
+
N.initialized = !0, N.supported = !1, T("Rangy is not supported in this environment. Reason: " + L, N.config.alertOnFail);
|
|
25160
25160
|
}
|
|
25161
|
-
|
|
25162
|
-
function
|
|
25163
|
-
T("Rangy warning: " + L,
|
|
25161
|
+
N.fail = F;
|
|
25162
|
+
function M(L) {
|
|
25163
|
+
T("Rangy warning: " + L, N.config.alertOnWarn);
|
|
25164
25164
|
}
|
|
25165
|
-
|
|
25165
|
+
N.warn = M;
|
|
25166
25166
|
var W;
|
|
25167
25167
|
({}).hasOwnProperty ? (k.extend = W = function(L, X, V) {
|
|
25168
25168
|
var re, ae;
|
|
@@ -25201,8 +25201,8 @@ function m0() {
|
|
|
25201
25201
|
function P(L) {
|
|
25202
25202
|
return L.message || L.description || String(L);
|
|
25203
25203
|
}
|
|
25204
|
-
function
|
|
25205
|
-
if (!(!O ||
|
|
25204
|
+
function D() {
|
|
25205
|
+
if (!(!O || N.initialized)) {
|
|
25206
25206
|
var L, X = !1, V = !1;
|
|
25207
25207
|
u(document, "createRange") && (L = document.createRange(), h(L, a) && p(L, o) && (X = !0));
|
|
25208
25208
|
var re = y(document);
|
|
@@ -25214,42 +25214,42 @@ function m0() {
|
|
|
25214
25214
|
F("Neither Range nor TextRange are available");
|
|
25215
25215
|
return;
|
|
25216
25216
|
}
|
|
25217
|
-
|
|
25217
|
+
N.initialized = !0, N.features = {
|
|
25218
25218
|
implementsDomRange: X,
|
|
25219
25219
|
implementsTextRange: V
|
|
25220
25220
|
};
|
|
25221
25221
|
var ae, ye;
|
|
25222
25222
|
for (var Ae in S)
|
|
25223
|
-
(ae = S[Ae]) instanceof ot && ae.init(ae,
|
|
25223
|
+
(ae = S[Ae]) instanceof ot && ae.init(ae, N);
|
|
25224
25224
|
for (var dt = 0, Ot = x.length; dt < Ot; ++dt)
|
|
25225
25225
|
try {
|
|
25226
|
-
x[dt](
|
|
25226
|
+
x[dt](N);
|
|
25227
25227
|
} catch (It) {
|
|
25228
25228
|
ye = "Rangy init listener threw an exception. Continuing. Detail: " + P(It), A(ye);
|
|
25229
25229
|
}
|
|
25230
25230
|
}
|
|
25231
25231
|
}
|
|
25232
25232
|
function q(L, X, V) {
|
|
25233
|
-
V && (L += " in module " + V.name),
|
|
25233
|
+
V && (L += " in module " + V.name), N.warn("DEPRECATED: " + L + " is deprecated. Please use " + X + " instead.");
|
|
25234
25234
|
}
|
|
25235
25235
|
function ve(L, X, V, re) {
|
|
25236
25236
|
L[X] = function() {
|
|
25237
25237
|
return q(X, V, re), L[V].apply(L, k.toArray(arguments));
|
|
25238
25238
|
};
|
|
25239
25239
|
}
|
|
25240
|
-
k.deprecationNotice = q, k.createAliasForDeprecatedMethod = ve,
|
|
25241
|
-
|
|
25240
|
+
k.deprecationNotice = q, k.createAliasForDeprecatedMethod = ve, N.init = D, N.addInitListener = function(L) {
|
|
25241
|
+
N.initialized ? L(N) : x.push(L);
|
|
25242
25242
|
};
|
|
25243
25243
|
var Ee = [];
|
|
25244
|
-
|
|
25244
|
+
N.addShimListener = function(L) {
|
|
25245
25245
|
Ee.push(L);
|
|
25246
25246
|
};
|
|
25247
25247
|
function it(L) {
|
|
25248
|
-
L = L || window,
|
|
25248
|
+
L = L || window, D();
|
|
25249
25249
|
for (var X = 0, V = Ee.length; X < V; ++X)
|
|
25250
25250
|
Ee[X](L);
|
|
25251
25251
|
}
|
|
25252
|
-
O && (
|
|
25252
|
+
O && (N.shim = N.createMissingNativeApi = it, ve(N, "createMissingNativeApi", "shim"));
|
|
25253
25253
|
function ot(L, X, V) {
|
|
25254
25254
|
this.name = L, this.dependencies = X, this.initialized = !1, this.supported = !1, this.initializer = V;
|
|
25255
25255
|
}
|
|
@@ -25267,10 +25267,10 @@ function m0() {
|
|
|
25267
25267
|
throw this.initialized = !0, this.supported = !1, new Error(L);
|
|
25268
25268
|
},
|
|
25269
25269
|
warn: function(L) {
|
|
25270
|
-
|
|
25270
|
+
N.warn("Module " + this.name + ": " + L);
|
|
25271
25271
|
},
|
|
25272
25272
|
deprecationNotice: function(L, X) {
|
|
25273
|
-
|
|
25273
|
+
N.warn("DEPRECATED: " + L + " in module " + this.name + " is deprecated. Please use " + X + " instead");
|
|
25274
25274
|
},
|
|
25275
25275
|
createError: function(L) {
|
|
25276
25276
|
return new Error("Error in Rangy " + this.name + " module: " + L);
|
|
@@ -25281,7 +25281,7 @@ function m0() {
|
|
|
25281
25281
|
if (!ae.initialized) {
|
|
25282
25282
|
ae.initialized = !0;
|
|
25283
25283
|
try {
|
|
25284
|
-
V(
|
|
25284
|
+
V(N, ae), ae.supported = !0;
|
|
25285
25285
|
} catch (Ae) {
|
|
25286
25286
|
var ye = "Module '" + L + "' failed to load: " + P(Ae);
|
|
25287
25287
|
A(ye), Ae.stack && A(Ae.stack);
|
|
@@ -25290,20 +25290,20 @@ function m0() {
|
|
|
25290
25290
|
});
|
|
25291
25291
|
return S[L] = re, re;
|
|
25292
25292
|
}
|
|
25293
|
-
|
|
25293
|
+
N.createModule = function(L) {
|
|
25294
25294
|
var X, V;
|
|
25295
25295
|
arguments.length == 2 ? (X = arguments[1], V = []) : (X = arguments[2], V = arguments[1]);
|
|
25296
25296
|
var re = me(L, V, X);
|
|
25297
|
-
|
|
25298
|
-
},
|
|
25297
|
+
N.initialized && N.supported && re.init();
|
|
25298
|
+
}, N.createCoreModule = function(L, X, V) {
|
|
25299
25299
|
me(L, X, V);
|
|
25300
25300
|
};
|
|
25301
25301
|
function je() {
|
|
25302
25302
|
}
|
|
25303
|
-
|
|
25303
|
+
N.RangePrototype = je, N.rangePrototype = new je();
|
|
25304
25304
|
function We() {
|
|
25305
25305
|
}
|
|
25306
|
-
|
|
25306
|
+
N.selectionPrototype = new We(), N.createCoreModule("DomUtil", [], function(L, X) {
|
|
25307
25307
|
var V = "undefined", re = L.util, ae = re.getBody;
|
|
25308
25308
|
re.areHostMethods(document, ["createDocumentFragment", "createElement", "createTextNode"]) || X.fail("document missing a Node creation method"), re.isHostMethod(document, "getElementsByTagName") || X.fail("document missing getElementsByTagName method");
|
|
25309
25309
|
var ye = document.createElement("div");
|
|
@@ -25367,7 +25367,7 @@ function m0() {
|
|
|
25367
25367
|
function C(G, oe) {
|
|
25368
25368
|
return w(G, oe, !0);
|
|
25369
25369
|
}
|
|
25370
|
-
function
|
|
25370
|
+
function R(G, oe, Ie) {
|
|
25371
25371
|
for (var we, wt = Ie ? G : G.parentNode; wt; ) {
|
|
25372
25372
|
if (we = wt.parentNode, we === oe)
|
|
25373
25373
|
return wt;
|
|
@@ -25447,13 +25447,13 @@ function m0() {
|
|
|
25447
25447
|
var wt, ut, or, Mn, cn;
|
|
25448
25448
|
if (G == Ie)
|
|
25449
25449
|
return oe === we ? 0 : oe < we ? -1 : 1;
|
|
25450
|
-
if (wt =
|
|
25450
|
+
if (wt = R(Ie, G, !0))
|
|
25451
25451
|
return oe <= st(wt) ? -1 : 1;
|
|
25452
|
-
if (wt =
|
|
25452
|
+
if (wt = R(G, Ie, !0))
|
|
25453
25453
|
return st(wt) < we ? -1 : 1;
|
|
25454
25454
|
if (ut = Wt(G, Ie), !ut)
|
|
25455
25455
|
throw new Error("comparePoints error: nodes have no common ancestor");
|
|
25456
|
-
if (or = G === ut ? ut :
|
|
25456
|
+
if (or = G === ut ? ut : R(G, ut, !0), Mn = Ie === ut ? ut : R(Ie, ut, !0), or === Mn)
|
|
25457
25457
|
throw X.createError("comparePoints got to case 4 and childA and childB are the same!");
|
|
25458
25458
|
for (cn = ut.firstChild; cn; ) {
|
|
25459
25459
|
if (cn === or)
|
|
@@ -25575,7 +25575,7 @@ function m0() {
|
|
|
25575
25575
|
getCommonAncestor: Wt,
|
|
25576
25576
|
isAncestorOf: w,
|
|
25577
25577
|
isOrIsAncestorOf: C,
|
|
25578
|
-
getClosestAncestorIn:
|
|
25578
|
+
getClosestAncestorIn: R,
|
|
25579
25579
|
isCharacterDataNode: Y,
|
|
25580
25580
|
isTextOrCommentNode: I,
|
|
25581
25581
|
insertAfter: Q,
|
|
@@ -25598,8 +25598,8 @@ function m0() {
|
|
|
25598
25598
|
createIterator: Yt,
|
|
25599
25599
|
DomPosition: nn
|
|
25600
25600
|
}, L.DOMException = bn;
|
|
25601
|
-
}),
|
|
25602
|
-
var V = L.dom, re = L.util, ae = V.DomPosition, ye = L.DOMException, Ae = V.isCharacterDataNode, dt = V.getNodeIndex, Ot = V.isOrIsAncestorOf, It = V.getDocument, st = V.comparePoints, $t = V.splitDataNode, Wt = V.getClosestAncestorIn, w = V.getNodeLength, C = V.arrayContains,
|
|
25601
|
+
}), N.createCoreModule("DomRange", ["DomUtil"], function(L, X) {
|
|
25602
|
+
var V = L.dom, re = L.util, ae = V.DomPosition, ye = L.DOMException, Ae = V.isCharacterDataNode, dt = V.getNodeIndex, Ot = V.isOrIsAncestorOf, It = V.getDocument, st = V.comparePoints, $t = V.splitDataNode, Wt = V.getClosestAncestorIn, w = V.getNodeLength, C = V.arrayContains, R = V.getRootContainer, Y = L.features.crashyTextNodes, I = V.removeNode;
|
|
25603
25603
|
function Q(E, B) {
|
|
25604
25604
|
return E.nodeType != 3 && (Ot(E, B.startContainer) || Ot(E, B.endContainer));
|
|
25605
25605
|
}
|
|
@@ -25607,7 +25607,7 @@ function m0() {
|
|
|
25607
25607
|
return E.document || It(E.startContainer);
|
|
25608
25608
|
}
|
|
25609
25609
|
function ee(E) {
|
|
25610
|
-
return
|
|
25610
|
+
return R(E.startContainer);
|
|
25611
25611
|
}
|
|
25612
25612
|
function Ce(E) {
|
|
25613
25613
|
return new ae(E.parentNode, dt(E));
|
|
@@ -25767,7 +25767,7 @@ function m0() {
|
|
|
25767
25767
|
return B <= (Ae(E) ? E.length : E.childNodes.length);
|
|
25768
25768
|
}
|
|
25769
25769
|
function Mi(E) {
|
|
25770
|
-
return !!E.startContainer && !!E.endContainer && !(Y && (V.isBrokenNode(E.startContainer) || V.isBrokenNode(E.endContainer))) &&
|
|
25770
|
+
return !!E.startContainer && !!E.endContainer && !(Y && (V.isBrokenNode(E.startContainer) || V.isBrokenNode(E.endContainer))) && R(E.startContainer) == R(E.endContainer) && ra(E.startContainer, E.startOffset) && ra(E.endContainer, E.endOffset);
|
|
25771
25771
|
}
|
|
25772
25772
|
function ht(E) {
|
|
25773
25773
|
if (!Mi(E))
|
|
@@ -25889,7 +25889,7 @@ function m0() {
|
|
|
25889
25889
|
// touchingIsIntersecting determines whether this method considers a node that borders a range intersects
|
|
25890
25890
|
// with it (as in WebKit) or not (as in Gecko pre-1.9, and the default)
|
|
25891
25891
|
intersectsNode: function(E, B) {
|
|
25892
|
-
if (ht(this),
|
|
25892
|
+
if (ht(this), R(E) != ee(this))
|
|
25893
25893
|
return !1;
|
|
25894
25894
|
var K = E.parentNode, ie = dt(E);
|
|
25895
25895
|
if (!K)
|
|
@@ -26009,18 +26009,18 @@ function m0() {
|
|
|
26009
26009
|
function ce(E, B) {
|
|
26010
26010
|
function K(te, pe) {
|
|
26011
26011
|
return function(Oe) {
|
|
26012
|
-
wt(Oe, kt), wt(
|
|
26012
|
+
wt(Oe, kt), wt(R(Oe), Nn);
|
|
26013
26013
|
var Ye = (te ? Ce : ge)(Oe);
|
|
26014
26014
|
(pe ? ie : be)(this, Ye.node, Ye.offset);
|
|
26015
26015
|
};
|
|
26016
26016
|
}
|
|
26017
26017
|
function ie(te, pe, Oe) {
|
|
26018
26018
|
var Ye = te.endContainer, fn = te.endOffset;
|
|
26019
|
-
(pe !== te.startContainer || Oe !== te.startOffset) && ((
|
|
26019
|
+
(pe !== te.startContainer || Oe !== te.startOffset) && ((R(pe) != R(Ye) || st(pe, Oe, Ye, fn) == 1) && (Ye = pe, fn = Oe), B(te, pe, Oe, Ye, fn));
|
|
26020
26020
|
}
|
|
26021
26021
|
function be(te, pe, Oe) {
|
|
26022
26022
|
var Ye = te.startContainer, fn = te.startOffset;
|
|
26023
|
-
(pe !== te.endContainer || Oe !== te.endOffset) && ((
|
|
26023
|
+
(pe !== te.endContainer || Oe !== te.endOffset) && ((R(pe) != R(Ye) || st(pe, Oe, Ye, fn) == -1) && (Ye = pe, fn = Oe), B(te, Ye, fn, pe, Oe));
|
|
26024
26024
|
}
|
|
26025
26025
|
var Ze = function() {
|
|
26026
26026
|
};
|
|
@@ -26151,7 +26151,7 @@ function m0() {
|
|
|
26151
26151
|
return E.startContainer === B.startContainer && E.startOffset === B.startOffset && E.endContainer === B.endContainer && E.endOffset === B.endOffset;
|
|
26152
26152
|
}
|
|
26153
26153
|
}), L.DomRange = Bt;
|
|
26154
|
-
}),
|
|
26154
|
+
}), N.createCoreModule("WrappedRange", ["DomRange"], function(L, X) {
|
|
26155
26155
|
var V, re, ae = L.dom, ye = L.util, Ae = ae.DomPosition, dt = L.DomRange, Ot = ae.getBody, It = ae.getContentDocument, st = ae.isCharacterDataNode;
|
|
26156
26156
|
if (L.features.implementsDomRange && function() {
|
|
26157
26157
|
var I, Q = dt.rangeProperties;
|
|
@@ -26325,14 +26325,14 @@ function m0() {
|
|
|
26325
26325
|
}, re.prototype.getName = function() {
|
|
26326
26326
|
return "WrappedTextRange";
|
|
26327
26327
|
}, dt.copyComparisonConstants(re);
|
|
26328
|
-
var
|
|
26328
|
+
var R = function(I) {
|
|
26329
26329
|
if (I.collapsed)
|
|
26330
26330
|
return C(new Ae(I.startContainer, I.startOffset), !0);
|
|
26331
26331
|
var Q = C(new Ae(I.startContainer, I.startOffset), !0), Z = C(new Ae(I.endContainer, I.endOffset), !1), ee = Ot(dt.getRangeDocument(I)).createTextRange();
|
|
26332
26332
|
return ee.setEndPoint("StartToStart", Q), ee.setEndPoint("EndToEnd", Z), ee;
|
|
26333
26333
|
};
|
|
26334
|
-
if (re.rangeToTextRange =
|
|
26335
|
-
return
|
|
26334
|
+
if (re.rangeToTextRange = R, re.prototype.toTextRange = function() {
|
|
26335
|
+
return R(this);
|
|
26336
26336
|
}, L.WrappedTextRange = re, !L.features.implementsDomRange || L.config.preferTextRange) {
|
|
26337
26337
|
var Y = function(I) {
|
|
26338
26338
|
return I("return this;")();
|
|
@@ -26352,9 +26352,9 @@ function m0() {
|
|
|
26352
26352
|
return L.createRange(Q);
|
|
26353
26353
|
}), Q = I = null;
|
|
26354
26354
|
});
|
|
26355
|
-
}),
|
|
26355
|
+
}), N.createCoreModule("WrappedSelection", ["DomRange", "WrappedRange"], function(L, X) {
|
|
26356
26356
|
L.config.checkSelectionRanges = !0;
|
|
26357
|
-
var V = "boolean", re = "number", ae = L.dom, ye = L.util, Ae = ye.isHostMethod, dt = L.DomRange, Ot = L.WrappedRange, It = L.DOMException, st = ae.DomPosition, $t, Wt, w = L.features, C = "Control",
|
|
26357
|
+
var V = "boolean", re = "number", ae = L.dom, ye = L.util, Ae = ye.isHostMethod, dt = L.DomRange, Ot = L.WrappedRange, It = L.DOMException, st = ae.DomPosition, $t, Wt, w = L.features, C = "Control", R = ae.getDocument, Y = ae.getBody, I = dt.rangesEqual;
|
|
26358
26358
|
function Q(b) {
|
|
26359
26359
|
return typeof b == "string" ? /^backward(s)?$/i.test(b) : !!b;
|
|
26360
26360
|
}
|
|
@@ -26384,7 +26384,7 @@ function m0() {
|
|
|
26384
26384
|
if (Xe)
|
|
26385
26385
|
$t = Ce, L.isSelectionValid = function(b) {
|
|
26386
26386
|
var j = Z(b, "isSelectionValid").document, J = j.selection;
|
|
26387
|
-
return J.type != "None" ||
|
|
26387
|
+
return J.type != "None" || R(J.createRange().parentElement()) == j;
|
|
26388
26388
|
};
|
|
26389
26389
|
else if (le)
|
|
26390
26390
|
$t = ee, L.isSelectionValid = function() {
|
|
@@ -26484,14 +26484,14 @@ function m0() {
|
|
|
26484
26484
|
Mn(b, j);
|
|
26485
26485
|
else {
|
|
26486
26486
|
b.rangeCount = j.length;
|
|
26487
|
-
for (var J, ce =
|
|
26487
|
+
for (var J, ce = R(j.item(0)), Pe = 0; Pe < b.rangeCount; ++Pe)
|
|
26488
26488
|
J = L.createRange(ce), J.selectNode(j.item(Pe)), b._ranges.push(J);
|
|
26489
26489
|
b.isCollapsed = b.rangeCount == 1 && b._ranges[0].collapsed, bn(b, b._ranges[b.rangeCount - 1], !1), Ie(b);
|
|
26490
26490
|
}
|
|
26491
26491
|
}
|
|
26492
26492
|
}
|
|
26493
26493
|
function ra(b, j) {
|
|
26494
|
-
for (var J = b.docSelection.createRange(), ce = ut(j), Pe =
|
|
26494
|
+
for (var J = b.docSelection.createRange(), ce = ut(j), Pe = R(J.item(0)), nt = Y(Pe).createControlRange(), Bt = 0, E = J.length; Bt < E; ++Bt)
|
|
26495
26495
|
nt.add(J.item(Bt));
|
|
26496
26496
|
try {
|
|
26497
26497
|
nt.add(ce);
|
|
@@ -26508,7 +26508,7 @@ function m0() {
|
|
|
26508
26508
|
return null;
|
|
26509
26509
|
}
|
|
26510
26510
|
} : _e && (Mi = function(b) {
|
|
26511
|
-
var j =
|
|
26511
|
+
var j = R(b.anchorNode), J = L.createRange(j);
|
|
26512
26512
|
return J.setStartAndEnd(b.anchorNode, b.anchorOffset, b.focusNode, b.focusOffset), J.collapsed !== this.isCollapsed && J.setStartAndEnd(b.focusNode, b.focusOffset, b.anchorNode, b.anchorOffset), J;
|
|
26513
26513
|
});
|
|
26514
26514
|
function ht(b, j, J) {
|
|
@@ -26537,7 +26537,7 @@ function m0() {
|
|
|
26537
26537
|
L.getSelection = io, ye.createAliasForDeprecatedMethod(L, "getIframeSelection", "getSelection");
|
|
26538
26538
|
var Fe = ht.prototype;
|
|
26539
26539
|
function oo(b, j) {
|
|
26540
|
-
for (var J =
|
|
26540
|
+
for (var J = R(j[0].startContainer), ce = Y(J).createControlRange(), Pe = 0, nt, Bt = j.length; Pe < Bt; ++Pe) {
|
|
26541
26541
|
nt = ut(j[Pe]);
|
|
26542
26542
|
try {
|
|
26543
26543
|
ce.add(nt);
|
|
@@ -26593,10 +26593,10 @@ function m0() {
|
|
|
26593
26593
|
if (this.docSelection.empty(), this.docSelection.type != "None") {
|
|
26594
26594
|
var b;
|
|
26595
26595
|
if (this.anchorNode)
|
|
26596
|
-
b =
|
|
26596
|
+
b = R(this.anchorNode);
|
|
26597
26597
|
else if (this.docSelection.type == C) {
|
|
26598
26598
|
var j = this.docSelection.createRange();
|
|
26599
|
-
j.length && (b =
|
|
26599
|
+
j.length && (b = R(j.item(0)));
|
|
26600
26600
|
}
|
|
26601
26601
|
if (b) {
|
|
26602
26602
|
var J = Y(b).createTextRange();
|
|
@@ -26665,7 +26665,7 @@ function m0() {
|
|
|
26665
26665
|
};
|
|
26666
26666
|
Yt && Je ? Fe.removeRange = function(b) {
|
|
26667
26667
|
if (this.docSelection.type == C) {
|
|
26668
|
-
for (var j = this.docSelection.createRange(), J = ut(b), ce =
|
|
26668
|
+
for (var j = this.docSelection.createRange(), J = ut(b), ce = R(j.item(0)), Pe = Y(ce).createControlRange(), nt, Bt = !1, E = 0, B = j.length; E < B; ++E)
|
|
26669
26669
|
nt = j.item(E), nt !== J || Bt ? Pe.add(j.item(E)) : Bt = !0;
|
|
26670
26670
|
Pe.select(), cn(this);
|
|
26671
26671
|
} else
|
|
@@ -26684,7 +26684,7 @@ function m0() {
|
|
|
26684
26684
|
return b.join("");
|
|
26685
26685
|
};
|
|
26686
26686
|
function Pi(b, j) {
|
|
26687
|
-
if (b.win.document !=
|
|
26687
|
+
if (b.win.document != R(j))
|
|
26688
26688
|
throw new It("WRONG_DOCUMENT_ERR");
|
|
26689
26689
|
}
|
|
26690
26690
|
function aa(b, j) {
|
|
@@ -26823,9 +26823,9 @@ function m0() {
|
|
|
26823
26823
|
});
|
|
26824
26824
|
});
|
|
26825
26825
|
var Ne = !1, Ue = function(L) {
|
|
26826
|
-
Ne || (Ne = !0, !
|
|
26826
|
+
Ne || (Ne = !0, !N.initialized && N.config.autoInitialize && D());
|
|
26827
26827
|
};
|
|
26828
|
-
return O && (document.readyState == "complete" ? Ue() : (u(document, "addEventListener") && document.addEventListener("DOMContentLoaded", Ue, !1), U(window, "load", Ue))),
|
|
26828
|
+
return O && (document.readyState == "complete" ? Ue() : (u(document, "addEventListener") && document.addEventListener("DOMContentLoaded", Ue, !1), U(window, "load", Ue))), N;
|
|
26829
26829
|
});
|
|
26830
26830
|
}(dc)), dc.exports;
|
|
26831
26831
|
}
|
|
@@ -26839,8 +26839,8 @@ var e4 = { exports: {} };
|
|
|
26839
26839
|
return t.createModule("ClassApplier", ["WrappedSelection"], function(r, i) {
|
|
26840
26840
|
var o = r.dom, a = o.DomPosition, s = o.arrayContains, l = r.util, u = l.forEach, c = "span", f = l.isHostMethod(document, "createElementNS");
|
|
26841
26841
|
function d(w, C) {
|
|
26842
|
-
for (var
|
|
26843
|
-
if (w.hasOwnProperty(
|
|
26842
|
+
for (var R in w)
|
|
26843
|
+
if (w.hasOwnProperty(R) && C(R, w[R]) === !1)
|
|
26844
26844
|
return !1;
|
|
26845
26845
|
return !0;
|
|
26846
26846
|
}
|
|
@@ -26853,27 +26853,27 @@ var e4 = { exports: {} };
|
|
|
26853
26853
|
function p(w, C) {
|
|
26854
26854
|
if (typeof w.classList == "object")
|
|
26855
26855
|
return w.classList.contains(C);
|
|
26856
|
-
var
|
|
26856
|
+
var R = typeof w.className == "string", Y = R ? w.className : w.getAttribute("class");
|
|
26857
26857
|
return v(Y, C);
|
|
26858
26858
|
}
|
|
26859
26859
|
function g(w, C) {
|
|
26860
26860
|
if (typeof w.classList == "object")
|
|
26861
26861
|
w.classList.add(C);
|
|
26862
26862
|
else {
|
|
26863
|
-
var
|
|
26864
|
-
Y ? v(Y, C) || (Y += " " + C) : Y = C,
|
|
26863
|
+
var R = typeof w.className == "string", Y = R ? w.className : w.getAttribute("class");
|
|
26864
|
+
Y ? v(Y, C) || (Y += " " + C) : Y = C, R ? w.className = Y : w.setAttribute("class", Y);
|
|
26865
26865
|
}
|
|
26866
26866
|
}
|
|
26867
26867
|
var y = /* @__PURE__ */ function() {
|
|
26868
|
-
function w(C,
|
|
26869
|
-
return
|
|
26868
|
+
function w(C, R, Y) {
|
|
26869
|
+
return R && Y ? " " : "";
|
|
26870
26870
|
}
|
|
26871
|
-
return function(C,
|
|
26871
|
+
return function(C, R) {
|
|
26872
26872
|
if (typeof C.classList == "object")
|
|
26873
|
-
C.classList.remove(
|
|
26873
|
+
C.classList.remove(R);
|
|
26874
26874
|
else {
|
|
26875
26875
|
var Y = typeof C.className == "string", I = Y ? C.className : C.getAttribute("class");
|
|
26876
|
-
I = I.replace(new RegExp("(^|\\s)" +
|
|
26876
|
+
I = I.replace(new RegExp("(^|\\s)" + R + "(\\s|$)"), w), Y ? C.className = I : C.setAttribute("class", I);
|
|
26877
26877
|
}
|
|
26878
26878
|
};
|
|
26879
26879
|
}();
|
|
@@ -26890,9 +26890,9 @@ var e4 = { exports: {} };
|
|
|
26890
26890
|
function k(w, C) {
|
|
26891
26891
|
return O(w) == O(C);
|
|
26892
26892
|
}
|
|
26893
|
-
function
|
|
26894
|
-
for (var
|
|
26895
|
-
if (!p(w, h(
|
|
26893
|
+
function N(w, C) {
|
|
26894
|
+
for (var R = C.split(/\s+/), Y = 0, I = R.length; Y < I; ++Y)
|
|
26895
|
+
if (!p(w, h(R[Y])))
|
|
26896
26896
|
return !1;
|
|
26897
26897
|
return !0;
|
|
26898
26898
|
}
|
|
@@ -26900,57 +26900,57 @@ var e4 = { exports: {} };
|
|
|
26900
26900
|
var C = w.parentNode;
|
|
26901
26901
|
return C && C.nodeType == 1 && !/^(textarea|style|script|select|iframe)$/i.test(C.nodeName);
|
|
26902
26902
|
}
|
|
26903
|
-
function T(w, C,
|
|
26903
|
+
function T(w, C, R, Y, I) {
|
|
26904
26904
|
var Q = w.node, Z = w.offset, ee = Q, Ce = Z;
|
|
26905
|
-
Q == Y && Z > I && ++Ce, Q == C && (Z ==
|
|
26905
|
+
Q == Y && Z > I && ++Ce, Q == C && (Z == R || Z == R + 1) && (ee = Y, Ce += I - R), Q == C && Z > R + 1 && --Ce, w.node = ee, w.offset = Ce;
|
|
26906
26906
|
}
|
|
26907
|
-
function F(w, C,
|
|
26908
|
-
w.node == C && w.offset >
|
|
26907
|
+
function F(w, C, R) {
|
|
26908
|
+
w.node == C && w.offset > R && --w.offset;
|
|
26909
26909
|
}
|
|
26910
|
-
function
|
|
26911
|
-
|
|
26910
|
+
function M(w, C, R, Y) {
|
|
26911
|
+
R == -1 && (R = C.childNodes.length);
|
|
26912
26912
|
var I = w.parentNode, Q = o.getNodeIndex(w);
|
|
26913
26913
|
u(Y, function(Z) {
|
|
26914
|
-
T(Z, I, Q, C,
|
|
26915
|
-
}), C.childNodes.length ==
|
|
26914
|
+
T(Z, I, Q, C, R);
|
|
26915
|
+
}), C.childNodes.length == R ? C.appendChild(w) : C.insertBefore(w, C.childNodes[R]);
|
|
26916
26916
|
}
|
|
26917
26917
|
function W(w, C) {
|
|
26918
|
-
var
|
|
26918
|
+
var R = w.parentNode, Y = o.getNodeIndex(w);
|
|
26919
26919
|
u(C, function(I) {
|
|
26920
|
-
F(I,
|
|
26920
|
+
F(I, R, Y);
|
|
26921
26921
|
}), o.removeNode(w);
|
|
26922
26922
|
}
|
|
26923
|
-
function U(w, C,
|
|
26923
|
+
function U(w, C, R, Y, I) {
|
|
26924
26924
|
for (var Q, Z = []; Q = w.firstChild; )
|
|
26925
|
-
|
|
26925
|
+
M(Q, C, R++, I), Z.push(Q);
|
|
26926
26926
|
return W(w, I), Z;
|
|
26927
26927
|
}
|
|
26928
26928
|
function x(w, C) {
|
|
26929
26929
|
return U(w, w.parentNode, o.getNodeIndex(w), !0, C);
|
|
26930
26930
|
}
|
|
26931
26931
|
function P(w, C) {
|
|
26932
|
-
var
|
|
26933
|
-
|
|
26934
|
-
var Y =
|
|
26932
|
+
var R = w.cloneRange();
|
|
26933
|
+
R.selectNodeContents(C);
|
|
26934
|
+
var Y = R.intersection(w), I = Y ? Y.toString() : "";
|
|
26935
26935
|
return I != "";
|
|
26936
26936
|
}
|
|
26937
|
-
function
|
|
26938
|
-
for (var C = w.getNodes([3]),
|
|
26939
|
-
++
|
|
26937
|
+
function D(w) {
|
|
26938
|
+
for (var C = w.getNodes([3]), R = 0, Y; (Y = C[R]) && !P(w, Y); )
|
|
26939
|
+
++R;
|
|
26940
26940
|
for (var I = C.length - 1; (Y = C[I]) && !P(w, Y); )
|
|
26941
26941
|
--I;
|
|
26942
|
-
return C.slice(
|
|
26942
|
+
return C.slice(R, I + 1);
|
|
26943
26943
|
}
|
|
26944
26944
|
function q(w, C) {
|
|
26945
26945
|
if (w.attributes.length != C.attributes.length) return !1;
|
|
26946
|
-
for (var
|
|
26947
|
-
if (I = w.attributes[
|
|
26946
|
+
for (var R = 0, Y = w.attributes.length, I, Q, Z; R < Y; ++R)
|
|
26947
|
+
if (I = w.attributes[R], Z = I.name, Z != "class" && (Q = C.attributes.getNamedItem(Z), I === null != (Q === null) || I.specified != Q.specified || I.specified && I.nodeValue !== Q.nodeValue))
|
|
26948
26948
|
return !1;
|
|
26949
26949
|
return !0;
|
|
26950
26950
|
}
|
|
26951
26951
|
function ve(w, C) {
|
|
26952
|
-
for (var
|
|
26953
|
-
if (I = w.attributes[
|
|
26952
|
+
for (var R = 0, Y = w.attributes.length, I; R < Y; ++R)
|
|
26953
|
+
if (I = w.attributes[R].name, !(C && s(C, I)) && w.attributes[R].specified && I != "class")
|
|
26954
26954
|
return !0;
|
|
26955
26955
|
return !1;
|
|
26956
26956
|
}
|
|
@@ -26992,8 +26992,8 @@ var e4 = { exports: {} };
|
|
|
26992
26992
|
return We(w.previousSibling) || We(w.nextSibling);
|
|
26993
26993
|
}
|
|
26994
26994
|
function L(w) {
|
|
26995
|
-
var C = [],
|
|
26996
|
-
for (
|
|
26995
|
+
var C = [], R, Y;
|
|
26996
|
+
for (R = 0; Y = w[R++]; )
|
|
26997
26997
|
C.push(
|
|
26998
26998
|
new a(Y.startContainer, Y.startOffset),
|
|
26999
26999
|
new a(Y.endContainer, Y.endOffset)
|
|
@@ -27001,31 +27001,31 @@ var e4 = { exports: {} };
|
|
|
27001
27001
|
return C;
|
|
27002
27002
|
}
|
|
27003
27003
|
function X(w, C) {
|
|
27004
|
-
for (var
|
|
27005
|
-
Y = w[
|
|
27004
|
+
for (var R = 0, Y, I, Q, Z = w.length; R < Z; ++R)
|
|
27005
|
+
Y = w[R], I = C[R * 2], Q = C[R * 2 + 1], Y.setStartAndEnd(I.node, I.offset, Q.node, Q.offset);
|
|
27006
27006
|
}
|
|
27007
27007
|
function V(w, C) {
|
|
27008
27008
|
return o.isCharacterDataNode(w) ? C == 0 ? !!w.previousSibling : C == w.length ? !!w.nextSibling : !0 : C > 0 && C < w.childNodes.length;
|
|
27009
27009
|
}
|
|
27010
|
-
function re(w, C,
|
|
27011
|
-
var I, Q, Z =
|
|
27010
|
+
function re(w, C, R, Y) {
|
|
27011
|
+
var I, Q, Z = R == 0;
|
|
27012
27012
|
if (o.isAncestorOf(C, w))
|
|
27013
27013
|
return w;
|
|
27014
27014
|
if (o.isCharacterDataNode(C)) {
|
|
27015
27015
|
var ee = o.getNodeIndex(C);
|
|
27016
|
-
if (
|
|
27017
|
-
|
|
27018
|
-
else if (
|
|
27019
|
-
|
|
27016
|
+
if (R == 0)
|
|
27017
|
+
R = ee;
|
|
27018
|
+
else if (R == C.length)
|
|
27019
|
+
R = ee + 1;
|
|
27020
27020
|
else
|
|
27021
|
-
throw i.createError("splitNodeAt() should not be called with offset in the middle of a data node (" +
|
|
27021
|
+
throw i.createError("splitNodeAt() should not be called with offset in the middle of a data node (" + R + " in " + C.data);
|
|
27022
27022
|
C = C.parentNode;
|
|
27023
27023
|
}
|
|
27024
|
-
if (V(C,
|
|
27024
|
+
if (V(C, R)) {
|
|
27025
27025
|
I = C.cloneNode(!1), Q = C.parentNode, I.id && I.removeAttribute("id");
|
|
27026
|
-
for (var Ce, ge = 0; Ce = C.childNodes[
|
|
27027
|
-
|
|
27028
|
-
return
|
|
27026
|
+
for (var Ce, ge = 0; Ce = C.childNodes[R]; )
|
|
27027
|
+
M(Ce, I, ge++, Y);
|
|
27028
|
+
return M(I, Q, o.getNodeIndex(C) + 1, Y), C == w ? I : re(w, Q, o.getNodeIndex(I), Y);
|
|
27029
27029
|
} else if (w != C) {
|
|
27030
27030
|
I = C.parentNode;
|
|
27031
27031
|
var le = o.getNodeIndex(C);
|
|
@@ -27038,8 +27038,8 @@ var e4 = { exports: {} };
|
|
|
27038
27038
|
}
|
|
27039
27039
|
function ye(w) {
|
|
27040
27040
|
var C = w ? "nextSibling" : "previousSibling";
|
|
27041
|
-
return function(
|
|
27042
|
-
var I =
|
|
27041
|
+
return function(R, Y) {
|
|
27042
|
+
var I = R.parentNode, Q = R[C];
|
|
27043
27043
|
if (Q) {
|
|
27044
27044
|
if (Q && Q.nodeType == 3)
|
|
27045
27045
|
return Q;
|
|
@@ -27059,16 +27059,16 @@ var e4 = { exports: {} };
|
|
|
27059
27059
|
}
|
|
27060
27060
|
Ot.prototype = {
|
|
27061
27061
|
doMerge: function(w) {
|
|
27062
|
-
var C = this.textNodes,
|
|
27062
|
+
var C = this.textNodes, R = C[0];
|
|
27063
27063
|
if (C.length > 1) {
|
|
27064
|
-
var Y = o.getNodeIndex(
|
|
27064
|
+
var Y = o.getNodeIndex(R), I = [], Q = 0, Z;
|
|
27065
27065
|
u(C, function(ee, Ce) {
|
|
27066
27066
|
Z = ee.parentNode, Ce > 0 && (Z.removeChild(ee), Z.hasChildNodes() || o.removeNode(Z), w && u(w, function(ge) {
|
|
27067
|
-
ge.node == ee && (ge.node =
|
|
27067
|
+
ge.node == ee && (ge.node = R, ge.offset += Q), ge.node == Z && ge.offset > Y && (--ge.offset, ge.offset == Y + 1 && Ce < C.length - 1 && (ge.node = R, ge.offset = Q));
|
|
27068
27068
|
})), I[Ce] = ee.data, Q += ee.data.length;
|
|
27069
|
-
}),
|
|
27069
|
+
}), R.data = I.join("");
|
|
27070
27070
|
}
|
|
27071
|
-
return
|
|
27071
|
+
return R.data;
|
|
27072
27072
|
},
|
|
27073
27073
|
getLength: function() {
|
|
27074
27074
|
for (var w = this.textNodes.length, C = 0; w--; )
|
|
@@ -27077,8 +27077,8 @@ var e4 = { exports: {} };
|
|
|
27077
27077
|
},
|
|
27078
27078
|
toString: function() {
|
|
27079
27079
|
var w = [];
|
|
27080
|
-
return u(this.textNodes, function(C,
|
|
27081
|
-
w[
|
|
27080
|
+
return u(this.textNodes, function(C, R) {
|
|
27081
|
+
w[R] = "'" + C.data + "'";
|
|
27082
27082
|
}), "[Merge(" + w.join(",") + ")]";
|
|
27083
27083
|
}
|
|
27084
27084
|
};
|
|
@@ -27090,12 +27090,12 @@ var e4 = { exports: {} };
|
|
|
27090
27090
|
"removeEmptyElements",
|
|
27091
27091
|
"onElementCreate"
|
|
27092
27092
|
], st = {};
|
|
27093
|
-
function $t(w, C,
|
|
27093
|
+
function $t(w, C, R) {
|
|
27094
27094
|
var Y, I, Q, Z, ee = this;
|
|
27095
27095
|
ee.cssClass = ee.className = w;
|
|
27096
27096
|
var Ce = null, ge = {};
|
|
27097
27097
|
if (typeof C == "object" && C !== null) {
|
|
27098
|
-
for (typeof C.elementTagName < "u" && (C.elementTagName = C.elementTagName.toLowerCase()),
|
|
27098
|
+
for (typeof C.elementTagName < "u" && (C.elementTagName = C.elementTagName.toLowerCase()), R = C.tagNames, Ce = C.elementProperties, ge = C.elementAttributes, I = 0; Z = It[I++]; )
|
|
27099
27099
|
C.hasOwnProperty(Z) && (ee[Z] = C[Z]);
|
|
27100
27100
|
Y = C.normalize;
|
|
27101
27101
|
} else
|
|
@@ -27105,12 +27105,12 @@ var e4 = { exports: {} };
|
|
|
27105
27105
|
ee.elementProperties = ee.copyPropertiesToElement(Ce, le, !0), d(ge, function(Xe, qe) {
|
|
27106
27106
|
ee.attrExceptions.push(Xe), ge[Xe] = "" + qe;
|
|
27107
27107
|
}), ee.elementAttributes = ge, ee.elementSortedClassName = ee.elementProperties.hasOwnProperty("className") ? S(ee.elementProperties.className + " " + w) : w, ee.applyToAnyTagName = !1;
|
|
27108
|
-
var Je = typeof
|
|
27108
|
+
var Je = typeof R;
|
|
27109
27109
|
if (Je == "string")
|
|
27110
|
-
|
|
27111
|
-
else if (Je == "object" && typeof
|
|
27112
|
-
for (ee.tagNames = [], I = 0, Q =
|
|
27113
|
-
|
|
27110
|
+
R == "*" ? ee.applyToAnyTagName = !0 : ee.tagNames = h(R.toLowerCase()).split(/\s*,\s*/);
|
|
27111
|
+
else if (Je == "object" && typeof R.length == "number")
|
|
27112
|
+
for (ee.tagNames = [], I = 0, Q = R.length; I < Q; ++I)
|
|
27113
|
+
R[I] == "*" ? ee.applyToAnyTagName = !0 : ee.tagNames.push(R[I].toLowerCase());
|
|
27114
27114
|
else
|
|
27115
27115
|
ee.tagNames = [ee.elementTagName];
|
|
27116
27116
|
}
|
|
@@ -27123,32 +27123,32 @@ var e4 = { exports: {} };
|
|
|
27123
27123
|
useExistingElements: !0,
|
|
27124
27124
|
removeEmptyElements: !0,
|
|
27125
27125
|
onElementCreate: null,
|
|
27126
|
-
copyPropertiesToElement: function(w, C,
|
|
27126
|
+
copyPropertiesToElement: function(w, C, R) {
|
|
27127
27127
|
var Y, I, Q = {}, Z, ee, Ce, ge;
|
|
27128
27128
|
for (var le in w)
|
|
27129
27129
|
if (w.hasOwnProperty(le))
|
|
27130
27130
|
if (ee = w[le], Ce = C[le], le == "className")
|
|
27131
|
-
g(C, ee), g(C, this.className), C[le] = S(C[le]),
|
|
27131
|
+
g(C, ee), g(C, this.className), C[le] = S(C[le]), R && (Q[le] = ee);
|
|
27132
27132
|
else if (le == "style") {
|
|
27133
|
-
I = Ce,
|
|
27133
|
+
I = Ce, R && (Q[le] = Z = {});
|
|
27134
27134
|
for (Y in w[le])
|
|
27135
|
-
w[le].hasOwnProperty(Y) && (I[Y] = ee[Y],
|
|
27135
|
+
w[le].hasOwnProperty(Y) && (I[Y] = ee[Y], R && (Z[Y] = I[Y]));
|
|
27136
27136
|
this.attrExceptions.push(le);
|
|
27137
27137
|
} else
|
|
27138
|
-
C[le] = ee,
|
|
27139
|
-
return
|
|
27138
|
+
C[le] = ee, R && (Q[le] = C[le], ge = st.hasOwnProperty(le) ? st[le] : le, this.attrExceptions.push(ge));
|
|
27139
|
+
return R ? Q : "";
|
|
27140
27140
|
},
|
|
27141
27141
|
copyAttributesToElement: function(w, C) {
|
|
27142
|
-
for (var
|
|
27143
|
-
w.hasOwnProperty(
|
|
27142
|
+
for (var R in w)
|
|
27143
|
+
w.hasOwnProperty(R) && !/^class(?:Name)?$/i.test(R) && C.setAttribute(R, w[R]);
|
|
27144
27144
|
},
|
|
27145
27145
|
appliesToElement: function(w) {
|
|
27146
27146
|
return s(this.tagNames, w.tagName.toLowerCase());
|
|
27147
27147
|
},
|
|
27148
27148
|
getEmptyElements: function(w) {
|
|
27149
27149
|
var C = this;
|
|
27150
|
-
return w.getNodes([1], function(
|
|
27151
|
-
return C.appliesToElement(
|
|
27150
|
+
return w.getNodes([1], function(R) {
|
|
27151
|
+
return C.appliesToElement(R) && !R.hasChildNodes();
|
|
27152
27152
|
});
|
|
27153
27153
|
},
|
|
27154
27154
|
hasClass: function(w) {
|
|
@@ -27170,7 +27170,7 @@ var e4 = { exports: {} };
|
|
|
27170
27170
|
return this.ignoreWhiteSpace && w && w.nodeType == 3 && Ue(w);
|
|
27171
27171
|
},
|
|
27172
27172
|
// Normalizes nodes after applying a class to a Range.
|
|
27173
|
-
postApply: function(w, C,
|
|
27173
|
+
postApply: function(w, C, R, Y) {
|
|
27174
27174
|
var I = w[0], Q = w[w.length - 1], Z = [], ee, Ce = I, ge = Q, le = 0, Je = Q.length, Xe;
|
|
27175
27175
|
u(w, function(_e) {
|
|
27176
27176
|
Xe = Ae(_e, !Y), Xe ? (ee || (ee = new Ot(Xe), Z.push(ee)), ee.textNodes.push(_e), _e === I && (Ce = ee.textNodes[0], le = Ce.length), _e === Q && (ge = ee.textNodes[0], Je = ee.getLength())) : ee = null;
|
|
@@ -27178,37 +27178,37 @@ var e4 = { exports: {} };
|
|
|
27178
27178
|
var qe = dt(Q, !Y);
|
|
27179
27179
|
if (qe && (ee || (ee = new Ot(Q), Z.push(ee)), ee.textNodes.push(qe)), Z.length) {
|
|
27180
27180
|
for (var Ut = 0, ue = Z.length; Ut < ue; ++Ut)
|
|
27181
|
-
Z[Ut].doMerge(
|
|
27181
|
+
Z[Ut].doMerge(R);
|
|
27182
27182
|
C.setStartAndEnd(Ce, le, ge, Je);
|
|
27183
27183
|
}
|
|
27184
27184
|
},
|
|
27185
27185
|
createContainer: function(w) {
|
|
27186
|
-
var C = o.getDocument(w),
|
|
27187
|
-
return this.copyPropertiesToElement(this.elementProperties,
|
|
27186
|
+
var C = o.getDocument(w), R = f && !o.isHtmlNamespace(w) && w.namespaceURI ? C.createElementNS(w.namespaceURI, this.elementTagName) : C.createElement(this.elementTagName);
|
|
27187
|
+
return this.copyPropertiesToElement(this.elementProperties, R, !1), this.copyAttributesToElement(this.elementAttributes, R), g(R, this.className), this.onElementCreate && this.onElementCreate(R, this), R;
|
|
27188
27188
|
},
|
|
27189
27189
|
elementHasProperties: function(w, C) {
|
|
27190
|
-
var
|
|
27190
|
+
var R = this;
|
|
27191
27191
|
return d(C, function(Y, I) {
|
|
27192
27192
|
if (Y == "className")
|
|
27193
|
-
return
|
|
27193
|
+
return N(w, I);
|
|
27194
27194
|
if (typeof I == "object") {
|
|
27195
|
-
if (!
|
|
27195
|
+
if (!R.elementHasProperties(w[Y], I))
|
|
27196
27196
|
return !1;
|
|
27197
27197
|
} else if (w[Y] !== I)
|
|
27198
27198
|
return !1;
|
|
27199
27199
|
});
|
|
27200
27200
|
},
|
|
27201
27201
|
elementHasAttributes: function(w, C) {
|
|
27202
|
-
return d(C, function(
|
|
27203
|
-
if (w.getAttribute(
|
|
27202
|
+
return d(C, function(R, Y) {
|
|
27203
|
+
if (w.getAttribute(R) !== Y)
|
|
27204
27204
|
return !1;
|
|
27205
27205
|
});
|
|
27206
27206
|
},
|
|
27207
27207
|
applyToTextNode: function(w, C) {
|
|
27208
27208
|
if (A(w)) {
|
|
27209
|
-
var
|
|
27210
|
-
if (
|
|
27211
|
-
g(
|
|
27209
|
+
var R = w.parentNode;
|
|
27210
|
+
if (R.childNodes.length == 1 && this.useExistingElements && this.appliesToElement(R) && this.elementHasProperties(R, this.elementProperties) && this.elementHasAttributes(R, this.elementAttributes))
|
|
27211
|
+
g(R, this.className);
|
|
27212
27212
|
else {
|
|
27213
27213
|
var Y = w.parentNode, I = this.createContainer(Y);
|
|
27214
27214
|
Y.insertBefore(I, w), I.appendChild(w);
|
|
@@ -27223,43 +27223,43 @@ var e4 = { exports: {} };
|
|
|
27223
27223
|
return w.nodeType == 1 && this.isRemovable(w) && (C == 0 || C == 1 && this.isEmptyContainer(w.firstChild));
|
|
27224
27224
|
},
|
|
27225
27225
|
removeEmptyContainers: function(w) {
|
|
27226
|
-
var C = this,
|
|
27226
|
+
var C = this, R = w.getNodes([1], function(Q) {
|
|
27227
27227
|
return C.isEmptyContainer(Q);
|
|
27228
27228
|
}), Y = [w], I = L(Y);
|
|
27229
|
-
u(
|
|
27229
|
+
u(R, function(Q) {
|
|
27230
27230
|
W(Q, I);
|
|
27231
27231
|
}), X(Y, I);
|
|
27232
27232
|
},
|
|
27233
|
-
undoToTextNode: function(w, C,
|
|
27234
|
-
if (!C.containsNode(
|
|
27233
|
+
undoToTextNode: function(w, C, R, Y) {
|
|
27234
|
+
if (!C.containsNode(R)) {
|
|
27235
27235
|
var I = C.cloneRange();
|
|
27236
|
-
I.selectNode(
|
|
27236
|
+
I.selectNode(R), I.isPointInRange(C.endContainer, C.endOffset) && (re(R, C.endContainer, C.endOffset, Y), C.setEndAfter(R)), I.isPointInRange(C.startContainer, C.startOffset) && (R = re(R, C.startContainer, C.startOffset, Y));
|
|
27237
27237
|
}
|
|
27238
|
-
this.isRemovable(
|
|
27238
|
+
this.isRemovable(R) ? x(R, Y) : y(R, this.className);
|
|
27239
27239
|
},
|
|
27240
|
-
splitAncestorWithClass: function(w, C,
|
|
27240
|
+
splitAncestorWithClass: function(w, C, R) {
|
|
27241
27241
|
var Y = this.getSelfOrAncestorWithClass(w);
|
|
27242
|
-
Y && re(Y, w, C,
|
|
27242
|
+
Y && re(Y, w, C, R);
|
|
27243
27243
|
},
|
|
27244
27244
|
undoToAncestor: function(w, C) {
|
|
27245
27245
|
this.isRemovable(w) ? x(w, C) : y(w, this.className);
|
|
27246
27246
|
},
|
|
27247
27247
|
applyToRange: function(w, C) {
|
|
27248
|
-
var
|
|
27248
|
+
var R = this;
|
|
27249
27249
|
C = C || [];
|
|
27250
27250
|
var Y = L(C || []);
|
|
27251
|
-
w.splitBoundariesPreservingPositions(Y),
|
|
27252
|
-
var I =
|
|
27251
|
+
w.splitBoundariesPreservingPositions(Y), R.removeEmptyElements && R.removeEmptyContainers(w);
|
|
27252
|
+
var I = D(w);
|
|
27253
27253
|
if (I.length) {
|
|
27254
27254
|
u(I, function(ee) {
|
|
27255
|
-
!
|
|
27255
|
+
!R.isIgnorableWhiteSpaceNode(ee) && !R.getSelfOrAncestorWithClass(ee) && R.isModifiable(ee) && R.applyToTextNode(ee, Y);
|
|
27256
27256
|
});
|
|
27257
27257
|
var Q = I[I.length - 1];
|
|
27258
|
-
w.setStartAndEnd(I[0], 0, Q, Q.length),
|
|
27258
|
+
w.setStartAndEnd(I[0], 0, Q, Q.length), R.normalize && R.postApply(I, w, Y, !1), X(C, Y);
|
|
27259
27259
|
}
|
|
27260
|
-
var Z =
|
|
27260
|
+
var Z = R.getEmptyElements(w);
|
|
27261
27261
|
u(Z, function(ee) {
|
|
27262
|
-
g(ee,
|
|
27262
|
+
g(ee, R.className);
|
|
27263
27263
|
});
|
|
27264
27264
|
},
|
|
27265
27265
|
applyToRanges: function(w) {
|
|
@@ -27272,20 +27272,20 @@ var e4 = { exports: {} };
|
|
|
27272
27272
|
C.setRanges(this.applyToRanges(C.getAllRanges()));
|
|
27273
27273
|
},
|
|
27274
27274
|
undoToRange: function(w, C) {
|
|
27275
|
-
var
|
|
27275
|
+
var R = this;
|
|
27276
27276
|
C = C || [];
|
|
27277
27277
|
var Y = L(C);
|
|
27278
|
-
w.splitBoundariesPreservingPositions(Y),
|
|
27279
|
-
var I =
|
|
27278
|
+
w.splitBoundariesPreservingPositions(Y), R.removeEmptyElements && R.removeEmptyContainers(w, Y);
|
|
27279
|
+
var I = D(w), Q, Z, ee = I[I.length - 1];
|
|
27280
27280
|
if (I.length) {
|
|
27281
|
-
|
|
27281
|
+
R.splitAncestorWithClass(w.endContainer, w.endOffset, Y), R.splitAncestorWithClass(w.startContainer, w.startOffset, Y);
|
|
27282
27282
|
for (var Ce = 0, ge = I.length; Ce < ge; ++Ce)
|
|
27283
|
-
Q = I[Ce], Z =
|
|
27284
|
-
w.setStartAndEnd(I[0], 0, ee, ee.length),
|
|
27283
|
+
Q = I[Ce], Z = R.getSelfOrAncestorWithClass(Q), Z && R.isModifiable(Q) && R.undoToAncestor(Z, Y);
|
|
27284
|
+
w.setStartAndEnd(I[0], 0, ee, ee.length), R.normalize && R.postApply(I, w, Y, !0), X(C, Y);
|
|
27285
27285
|
}
|
|
27286
|
-
var le =
|
|
27286
|
+
var le = R.getEmptyElements(w);
|
|
27287
27287
|
u(le, function(Je) {
|
|
27288
|
-
y(Je,
|
|
27288
|
+
y(Je, R.className);
|
|
27289
27289
|
});
|
|
27290
27290
|
},
|
|
27291
27291
|
undoToRanges: function(w) {
|
|
@@ -27294,15 +27294,15 @@ var e4 = { exports: {} };
|
|
|
27294
27294
|
return w;
|
|
27295
27295
|
},
|
|
27296
27296
|
undoToSelection: function(w) {
|
|
27297
|
-
var C = r.getSelection(w),
|
|
27298
|
-
this.undoToRanges(
|
|
27297
|
+
var C = r.getSelection(w), R = r.getSelection(w).getAllRanges();
|
|
27298
|
+
this.undoToRanges(R), C.setRanges(R);
|
|
27299
27299
|
},
|
|
27300
27300
|
isAppliedToRange: function(w) {
|
|
27301
27301
|
if (w.collapsed || w.toString() == "")
|
|
27302
27302
|
return !!this.getSelfOrAncestorWithClass(w.commonAncestorContainer);
|
|
27303
27303
|
var C = w.getNodes([3]);
|
|
27304
27304
|
if (C.length) {
|
|
27305
|
-
for (var
|
|
27305
|
+
for (var R = 0, Y; Y = C[R++]; )
|
|
27306
27306
|
if (!this.isIgnorableWhiteSpaceNode(Y) && P(w, Y) && this.isModifiable(Y) && !this.getSelfOrAncestorWithClass(Y))
|
|
27307
27307
|
return !1;
|
|
27308
27308
|
}
|
|
@@ -27328,17 +27328,17 @@ var e4 = { exports: {} };
|
|
|
27328
27328
|
this.isAppliedToSelection(w) ? this.undoToSelection(w) : this.applyToSelection(w);
|
|
27329
27329
|
},
|
|
27330
27330
|
getElementsWithClassIntersectingRange: function(w) {
|
|
27331
|
-
var C = [],
|
|
27331
|
+
var C = [], R = this;
|
|
27332
27332
|
return w.getNodes([3], function(Y) {
|
|
27333
|
-
var I =
|
|
27333
|
+
var I = R.getSelfOrAncestorWithClass(Y);
|
|
27334
27334
|
I && !s(C, I) && C.push(I);
|
|
27335
27335
|
}), C;
|
|
27336
27336
|
},
|
|
27337
27337
|
detach: function() {
|
|
27338
27338
|
}
|
|
27339
27339
|
};
|
|
27340
|
-
function Wt(w, C,
|
|
27341
|
-
return new $t(w, C,
|
|
27340
|
+
function Wt(w, C, R) {
|
|
27341
|
+
return new $t(w, C, R);
|
|
27342
27342
|
}
|
|
27343
27343
|
$t.util = {
|
|
27344
27344
|
hasClass: p,
|
|
@@ -27346,7 +27346,7 @@ var e4 = { exports: {} };
|
|
|
27346
27346
|
removeClass: y,
|
|
27347
27347
|
getClass: m,
|
|
27348
27348
|
hasSameClasses: k,
|
|
27349
|
-
hasAllClasses:
|
|
27349
|
+
hasAllClasses: N,
|
|
27350
27350
|
replaceWithOwnChildren: x,
|
|
27351
27351
|
elementsHaveSameNonClassAttributes: q,
|
|
27352
27352
|
elementHasNonClassAttributes: ve,
|
|
@@ -28012,24 +28012,24 @@ var zr = function(n, e, t, r) {
|
|
|
28012
28012
|
return this.customCssRules && (e += this.customCssRules), e;
|
|
28013
28013
|
}, n.prototype.getCanvasData = function(e, t) {
|
|
28014
28014
|
return zr(this, void 0, void 0, function() {
|
|
28015
|
-
var r, i, o, a, s, l, u, c, f, d, h, v, p, g, y, m, S, O, k,
|
|
28015
|
+
var r, i, o, a, s, l, u, c, f, d, h, v, p, g, y, m, S, O, k, N, A, T, F, M, W, U;
|
|
28016
28016
|
return Gr(this, function(x) {
|
|
28017
|
-
return r = t.width, i = t.height, o = t.backgroundColor, a = t.padding, s = a === void 0 ? 40 : a, l = this.cloneSvg(e, !1), u = window.devicePixelRatio || 1, u < 1 && (u = 1), c = this.lf.graphModel.rootEl.querySelector(".lf-base"), f = c.getBoundingClientRect(), d = this.lf.container.querySelector(".lf-canvas-overlay"), h = d.getBoundingClientRect(), v = f.x - h.x, p = f.y - h.y, g = this.lf.graphModel, y = g.transformModel, m = y.SCALE_X, S = y.SCALE_Y, O = y.TRANSLATE_X, k = y.TRANSLATE_Y, l.lastChild.style.transform = "matrix(1, 0, 0, 1, ".concat((-v + O) * (1 / m), ", ").concat((-p + k) * (1 / S), ")"),
|
|
28018
|
-
|
|
28017
|
+
return r = t.width, i = t.height, o = t.backgroundColor, a = t.padding, s = a === void 0 ? 40 : a, l = this.cloneSvg(e, !1), u = window.devicePixelRatio || 1, u < 1 && (u = 1), c = this.lf.graphModel.rootEl.querySelector(".lf-base"), f = c.getBoundingClientRect(), d = this.lf.container.querySelector(".lf-canvas-overlay"), h = d.getBoundingClientRect(), v = f.x - h.x, p = f.y - h.y, g = this.lf.graphModel, y = g.transformModel, m = y.SCALE_X, S = y.SCALE_Y, O = y.TRANSLATE_X, k = y.TRANSLATE_Y, l.lastChild.style.transform = "matrix(1, 0, 0, 1, ".concat((-v + O) * (1 / m), ", ").concat((-p + k) * (1 / S), ")"), N = Math.ceil(f.width / m), A = Math.ceil(f.height / S), T = document.createElement("canvas"), T.style.width = "".concat(N, "px"), T.style.height = "".concat(A, "px"), T.width = N * u + s * 2, T.height = A * u + s * 2, F = T.getContext("2d"), F && (F.clearRect(0, 0, T.width, T.height), F.scale(u, u), o ? (F.fillStyle = o, F.fillRect(0, 0, T.width, T.height)) : F.clearRect(0, 0, T.width, T.height)), M = new Image(), W = document.createElement("style"), W.innerHTML = this.getClassRules(), U = document.createElement("foreignObject"), U.appendChild(W), l.appendChild(U), [2, new Promise(function(P) {
|
|
28018
|
+
M.onload = function() {
|
|
28019
28019
|
var ve = navigator.userAgent.indexOf("Firefox") > -1;
|
|
28020
28020
|
try {
|
|
28021
|
-
ve ? createImageBitmap(
|
|
28021
|
+
ve ? createImageBitmap(M, {
|
|
28022
28022
|
resizeWidth: r && i ? va(T, r, i).width : T.width,
|
|
28023
28023
|
resizeHeight: r && i ? va(T, r, i).height : T.height
|
|
28024
28024
|
}).then(function(Ee) {
|
|
28025
28025
|
F == null || F.drawImage(Ee, s / u, s / u), P(r && i ? va(T, r, i) : T);
|
|
28026
|
-
}) : (F == null || F.drawImage(
|
|
28026
|
+
}) : (F == null || F.drawImage(M, s / u, s / u), P(r && i ? va(T, r, i) : T));
|
|
28027
28027
|
} catch {
|
|
28028
|
-
F == null || F.drawImage(
|
|
28028
|
+
F == null || F.drawImage(M, s / u, s / u), P(r && i ? va(T, r, i) : T);
|
|
28029
28029
|
}
|
|
28030
28030
|
};
|
|
28031
|
-
var
|
|
28032
|
-
|
|
28031
|
+
var D = "data:image/svg+xml;charset=utf-8,".concat(new XMLSerializer().serializeToString(l)), q = D.replace(/\n/g, "").replace(/\t/g, "").replace(/#/g, "%23");
|
|
28032
|
+
M.src = q;
|
|
28033
28033
|
})];
|
|
28034
28034
|
});
|
|
28035
28035
|
});
|
|
@@ -28481,7 +28481,7 @@ var a4 = function(n, e) {
|
|
|
28481
28481
|
i.wrapper && (i.wrapper.oncontextmenu = null, i.container && i.wrapper.parentNode === i.container && i.container.removeChild(i.wrapper), i.wrapper = void 0);
|
|
28482
28482
|
return;
|
|
28483
28483
|
}
|
|
28484
|
-
var m = i.lf.graphModel.getAreaElement(g, y, i.isWholeEdge, i.isWholeNode, !0), S = i.lf.graphModel, O = S.dynamicGroup, k = S.group,
|
|
28484
|
+
var m = i.lf.graphModel.getAreaElement(g, y, i.isWholeEdge, i.isWholeNode, !0), S = i.lf.graphModel, O = S.dynamicGroup, k = S.group, N = [], A = i.lf.getSelectElements(), T = new Set(sg(sg([], ag(A.nodes.map(function(W) {
|
|
28485
28485
|
return W.id;
|
|
28486
28486
|
})), !1), ag(A.edges.map(function(W) {
|
|
28487
28487
|
return W.id;
|
|
@@ -28501,9 +28501,9 @@ var a4 = function(n, e) {
|
|
|
28501
28501
|
i.lf.deselectElementById(W.id);
|
|
28502
28502
|
return;
|
|
28503
28503
|
}
|
|
28504
|
-
i.lf.selectElementById(W.id, !0),
|
|
28505
|
-
}), i.startPoint = void 0, i.endPoint = void 0,
|
|
28506
|
-
elements:
|
|
28504
|
+
i.lf.selectElementById(W.id, !0), N.push(W);
|
|
28505
|
+
}), i.startPoint = void 0, i.endPoint = void 0, N.length > 0 && i.lf.emit("selection:drop", { e: a }), i.lf.emit("selection:selected", {
|
|
28506
|
+
elements: N,
|
|
28507
28507
|
leftTopPoint: g,
|
|
28508
28508
|
rightBottomPoint: y
|
|
28509
28509
|
});
|
|
@@ -29469,7 +29469,6 @@ const u5 = /* @__PURE__ */ ps(l5), c5 = (n, e) => ({
|
|
|
29469
29469
|
}, c = (v) => {
|
|
29470
29470
|
mo.delete(i.value.field, v);
|
|
29471
29471
|
}, f = (v) => {
|
|
29472
|
-
console.log(v);
|
|
29473
29472
|
const p = s.value.find((g) => g.name === v);
|
|
29474
29473
|
return p ? p.label : "";
|
|
29475
29474
|
}, d = (v) => {
|
|
@@ -30458,8 +30457,8 @@ const aB = {
|
|
|
30458
30457
|
emits: ["helpClick"],
|
|
30459
30458
|
setup(n, { expose: e, emit: t }) {
|
|
30460
30459
|
ob((c, f) => ({
|
|
30461
|
-
|
|
30462
|
-
"
|
|
30460
|
+
e0faa360: f.cardHeaderBgColor,
|
|
30461
|
+
"62a7a7d6": f.cardHeaderColor
|
|
30463
30462
|
}));
|
|
30464
30463
|
const r = $e({
|
|
30465
30464
|
text: {
|
|
@@ -30501,11 +30500,9 @@ const aB = {
|
|
|
30501
30500
|
var lB = function() {
|
|
30502
30501
|
var e = this, t = e._self._c, r = e._self._setupProxy;
|
|
30503
30502
|
return t("el-card", { staticStyle: { height: "calc(100% - 2px)" }, scopedSlots: e._u([{ key: "header", fn: function() {
|
|
30504
|
-
return [t("div", { staticClass: "card-header" }, [t("div", { staticClass: "card-header-title", attrs: { span: r.showHelp ? 20 : 24 } }, [t("el-tooltip", { attrs: { effect: "light", disabled: r.approvalComment.length === 0 },
|
|
30505
|
-
return
|
|
30506
|
-
|
|
30507
|
-
}), 1)], 1) : e._e()];
|
|
30508
|
-
}, proxy: !0 }]) }, [t("span", [e._v(e._s(r.config.text.value))])])], 1), r.showHelp ? t("div", { staticClass: "card-header-icon", attrs: { span: 4 } }, [t("i", { staticClass: "el-icon-question", staticStyle: { float: "right", cursor: "pointer" }, on: { click: r.handleClick } })]) : e._e()])];
|
|
30503
|
+
return [t("div", { staticClass: "card-header" }, [t("div", { staticClass: "card-header-title", attrs: { span: r.showHelp ? 20 : 24 } }, [t("el-tooltip", { attrs: { effect: "light", disabled: r.approvalComment.length === 0 } }, [t("span", [e._v(e._s(r.config.text.value))]), t("div", { attrs: { slot: "content" }, slot: "content" }, [r.approvalComment.length > 0 ? t("div", [t("el-timeline", e._l(r.approvalComment, function(i, o) {
|
|
30504
|
+
return t("el-timeline-item", { key: o, attrs: { hollow: "", placement: "top", type: "primary", timestamp: i.finishTime } }, [t("div", { staticStyle: { display: "flex", "align-items": "center" } }, [e._v(" " + e._s(i.realName) + ":"), t("span", [e._v(e._s(i.comment) + " ")])])]);
|
|
30505
|
+
}), 1)], 1) : e._e()])])], 1), r.showHelp ? t("div", { staticClass: "card-header-icon", attrs: { span: 4 } }, [t("i", { staticClass: "el-icon-question", staticStyle: { float: "right", cursor: "pointer" }, on: { click: r.handleClick } })]) : e._e()])];
|
|
30509
30506
|
}, proxy: !0 }]) }, [t("div", { staticClass: "container" }, [t("div", { staticClass: "content-column" }, [e._v(" 参与人:"), t("a", { attrs: { href: "javascript:;", title: r.config.properties.assigneeText || r.config.properties.assignee }, on: { click: r.handleArrowRightIconClick } }, [e._v(e._s(r.config.properties.assigneeText || r.config.properties.assignee))])]), r.config.viewer ? e._e() : t("div", { staticClass: "icon-column", on: { click: r.handleArrowRightIconClick } }, [t("i", { staticClass: "el-icon-arrow-right", staticStyle: { cursor: "pointer" } })])])]);
|
|
30510
30507
|
}, uB = [], cB = /* @__PURE__ */ tn(
|
|
30511
30508
|
sB,
|
|
@@ -30513,7 +30510,7 @@ var lB = function() {
|
|
|
30513
30510
|
uB,
|
|
30514
30511
|
!1,
|
|
30515
30512
|
null,
|
|
30516
|
-
"
|
|
30513
|
+
"f5318bae"
|
|
30517
30514
|
);
|
|
30518
30515
|
const fB = cB.exports;
|
|
30519
30516
|
var dB = Object.defineProperty, hB = (n, e, t) => e in n ? dB(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, pc = (n, e, t) => hB(n, typeof e != "symbol" ? e + "" : e, t);
|
|
@@ -30560,7 +30557,7 @@ class vB extends c6 {
|
|
|
30560
30557
|
id: this.props.model.id,
|
|
30561
30558
|
__textValue__: this.props.model.text.value
|
|
30562
30559
|
};
|
|
30563
|
-
return this.preProperties && this.preProperties === JSON.stringify(e) ? !1 : (this.preProperties = JSON.stringify(e), !0);
|
|
30560
|
+
return this.preProperties && this.preProperties === JSON.stringify(e) ? !1 : (this.preProperties = JSON.stringify(e), console.log(`${this.props.model.id} - ${this.props.model.getProperties().state} ${this.props.model.getProperties().status}`), !0);
|
|
30564
30561
|
}
|
|
30565
30562
|
setHtml(e) {
|
|
30566
30563
|
if (this.isMounted)
|
|
@@ -31024,8 +31021,8 @@ const zB = HB.exports, GB = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAA
|
|
|
31024
31021
|
deep: !0
|
|
31025
31022
|
});
|
|
31026
31023
|
const f = () => {
|
|
31027
|
-
const
|
|
31028
|
-
|
|
31024
|
+
const M = Nt(u);
|
|
31025
|
+
M && r.showDoc && M.extension.control.addItem({
|
|
31029
31026
|
iconClass: "lf-control-mayu",
|
|
31030
31027
|
title: "",
|
|
31031
31028
|
text: "码云",
|
|
@@ -31035,21 +31032,21 @@ const zB = HB.exports, GB = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAA
|
|
|
31035
31032
|
});
|
|
31036
31033
|
}, d = () => {
|
|
31037
31034
|
console.info(`Vue:${sb}`), console.info(`element-plus:${cb}`), Hr.use(o4), Hr.use(d4), Hr.use(h4), Hr.use(f4), Hr.use(l4), Hr.use(nb, r), Hr.use(rb, r), Hr.use(v6);
|
|
31038
|
-
const
|
|
31039
|
-
r.viewer && (
|
|
31035
|
+
const M = {};
|
|
31036
|
+
r.viewer && (M.adjustEdge = !1, M.adjustNodePosition = !1, M.stopScrollGraph = !0, M.stopMoveGraph = !0, M.hoverOutline = !1, M.hideAnchors = !0, M.adjustNodePosition = !1, M.stopMoveGraph = !1, M.nodeTextEdit = !1, M.edgeTextEdit = !1, M.resizeNode = !1, M.nodeSelectedOutline = !1), u.value = new Hr({
|
|
31040
31037
|
container: Nt(i),
|
|
31041
31038
|
grid: !0,
|
|
31042
31039
|
...r.config,
|
|
31043
|
-
...
|
|
31040
|
+
...M,
|
|
31044
31041
|
background: r.config.background || {
|
|
31045
31042
|
backgroundColor: Pn.backgroundColor
|
|
31046
31043
|
}
|
|
31047
31044
|
}), t("on-init", u.value), h(), v(), g(r.value), p();
|
|
31048
31045
|
}, h = () => {
|
|
31049
|
-
const
|
|
31050
|
-
|
|
31046
|
+
const M = Nt(u);
|
|
31047
|
+
M && (M.graphModel.wfProps = r);
|
|
31051
31048
|
}, v = () => {
|
|
31052
|
-
var
|
|
31049
|
+
var M;
|
|
31053
31050
|
const W = Nt(u);
|
|
31054
31051
|
if (!W) return;
|
|
31055
31052
|
if (r.viewer) {
|
|
@@ -31109,12 +31106,12 @@ const zB = HB.exports, GB = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAA
|
|
|
31109
31106
|
}), f(), W.setDefaultEdgeType("snaker:transition");
|
|
31110
31107
|
const U = () => (Object.keys(r.wfConfig).forEach((x) => {
|
|
31111
31108
|
x in Ft && Object.keys(r.wfConfig[x]).forEach((P) => {
|
|
31112
|
-
["type", "text", "icon", "label", "className", "properties", "callback", "sort"].includes(P) && cg.forEach((
|
|
31113
|
-
|
|
31114
|
-
...
|
|
31109
|
+
["type", "text", "icon", "label", "className", "properties", "callback", "sort"].includes(P) && cg.forEach((D) => {
|
|
31110
|
+
D.type === `snaker:${x}` && (P === "properties" ? D[P] = {
|
|
31111
|
+
...D[P],
|
|
31115
31112
|
//@ts-ignore
|
|
31116
31113
|
...r.wfConfig[x][P]
|
|
31117
|
-
} :
|
|
31114
|
+
} : D[P] = r.wfConfig[x][P]);
|
|
31118
31115
|
});
|
|
31119
31116
|
});
|
|
31120
31117
|
}), cg.filter((x) => {
|
|
@@ -31123,30 +31120,30 @@ const zB = HB.exports, GB = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAA
|
|
|
31123
31120
|
}));
|
|
31124
31121
|
W.extension.dndPanel.setPatternItems([
|
|
31125
31122
|
...U(),
|
|
31126
|
-
...((
|
|
31123
|
+
...((M = r.wfConfig) == null ? void 0 : M.extendDndPanel) || []
|
|
31127
31124
|
].sort((x, P) => (x.sort || 99) - (P.sort || 99)));
|
|
31128
31125
|
}, p = () => {
|
|
31129
|
-
const
|
|
31130
|
-
if (!
|
|
31131
|
-
const W =
|
|
31126
|
+
const M = Nt(u);
|
|
31127
|
+
if (!M) return;
|
|
31128
|
+
const W = M.graphModel.eventCenter;
|
|
31132
31129
|
r.nodeRenderType === "html" && r.wfConfig.helpClick && typeof r.wfConfig.helpClick && W.on("custom:helpClick", r.wfConfig.helpClick), !r.viewer && (W.on("blank:contextmenu", (U) => {
|
|
31133
|
-
r.wfConfig.blankContextmenu && typeof r.wfConfig.blankContextmenu == "function" ? r.wfConfig.blankContextmenu(
|
|
31134
|
-
name:
|
|
31135
|
-
displayName:
|
|
31136
|
-
expireTime:
|
|
31137
|
-
instanceUrl:
|
|
31138
|
-
instanceNoClass:
|
|
31139
|
-
preInterceptors:
|
|
31140
|
-
postInterceptors:
|
|
31130
|
+
r.wfConfig.blankContextmenu && typeof r.wfConfig.blankContextmenu == "function" ? r.wfConfig.blankContextmenu(M, U) : o.value.show({
|
|
31131
|
+
name: M.graphModel.name,
|
|
31132
|
+
displayName: M.graphModel.displayName,
|
|
31133
|
+
expireTime: M.graphModel.expireTime,
|
|
31134
|
+
instanceUrl: M.graphModel.instanceUrl,
|
|
31135
|
+
instanceNoClass: M.graphModel.instanceNoClass,
|
|
31136
|
+
preInterceptors: M.graphModel.preInterceptors,
|
|
31137
|
+
postInterceptors: M.graphModel.postInterceptors,
|
|
31141
31138
|
type: "process"
|
|
31142
31139
|
});
|
|
31143
31140
|
}), W.on("node:click", (U) => {
|
|
31144
|
-
var x, P,
|
|
31141
|
+
var x, P, D;
|
|
31145
31142
|
if (U.data.type === "snaker:subProcess" && !U.e.srcElement.className.baseVal)
|
|
31146
31143
|
return;
|
|
31147
31144
|
c.value = U.data.id;
|
|
31148
31145
|
const q = ((x = r.wfConfig[U.data.type.replace("snaker:", "")]) == null ? void 0 : x.nodeClick) || r.wfConfig.nodeClick;
|
|
31149
|
-
q && typeof q == "function" ? q(
|
|
31146
|
+
q && typeof q == "function" ? q(M, U) : r.nodeRenderType === "html" && [Ft.task].includes(U.data.type.replace("snaker:", "")) ? U.e.arrowClick && (r.wfConfig.arrowClick && typeof r.wfConfig.arrowClick == "function" ? r.wfConfig.arrowClick(U) : o.value.show({
|
|
31150
31147
|
...U.data.properties,
|
|
31151
31148
|
name: U.data.id,
|
|
31152
31149
|
//@ts-ignore
|
|
@@ -31156,36 +31153,36 @@ const zB = HB.exports, GB = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAA
|
|
|
31156
31153
|
...U.data.properties,
|
|
31157
31154
|
name: U.data.id,
|
|
31158
31155
|
//@ts-ignore
|
|
31159
|
-
displayName: ((
|
|
31156
|
+
displayName: ((D = U.data.text) == null ? void 0 : D.value) || U.data.properties.displayName,
|
|
31160
31157
|
type: U.data.type
|
|
31161
31158
|
});
|
|
31162
31159
|
}), W.on("edge:click", (U) => {
|
|
31163
31160
|
var x;
|
|
31164
|
-
c.value = U.data.id, r.wfConfig.edgeClick && typeof r.wfConfig.edgeClick == "function" ? r.wfConfig.edgeClick(
|
|
31161
|
+
c.value = U.data.id, r.wfConfig.edgeClick && typeof r.wfConfig.edgeClick == "function" ? r.wfConfig.edgeClick(M, U) : o.value.show({
|
|
31165
31162
|
...U.data.properties,
|
|
31166
31163
|
name: U.data.id,
|
|
31167
31164
|
displayName: (x = U.data.text) == null ? void 0 : x.value,
|
|
31168
31165
|
type: U.data.type
|
|
31169
31166
|
});
|
|
31170
|
-
}),
|
|
31171
|
-
const x =
|
|
31167
|
+
}), M.on("node:resize", ({ newNodeSize: U }) => {
|
|
31168
|
+
const x = M.getNodeModelById(U.id);
|
|
31172
31169
|
x && x.setProperties({
|
|
31173
31170
|
width: parseInt(U.width),
|
|
31174
31171
|
height: parseInt(U.height)
|
|
31175
31172
|
});
|
|
31176
31173
|
}));
|
|
31177
|
-
}, g = (
|
|
31174
|
+
}, g = (M) => {
|
|
31178
31175
|
const W = Nt(u);
|
|
31179
|
-
W && (W.render(
|
|
31180
|
-
}, y = (
|
|
31176
|
+
W && (W.render(M), T(r.highLight), F(r.assigneeText));
|
|
31177
|
+
}, y = (M) => {
|
|
31181
31178
|
const W = Nt(u);
|
|
31182
31179
|
if (W) {
|
|
31183
|
-
if (
|
|
31184
|
-
W.graphModel[
|
|
31185
|
-
else if (
|
|
31180
|
+
if (M.type === Ft.process)
|
|
31181
|
+
W.graphModel[M.propertyName] = M.propertyValue;
|
|
31182
|
+
else if (M.type === Ft.subProcess) {
|
|
31186
31183
|
const U = Nt(c);
|
|
31187
|
-
|
|
31188
|
-
[
|
|
31184
|
+
M.propertyName === "name" ? W.getNodeModelById(M.propertyValue) || (W.changeNodeId(U, M.propertyValue), c.value = M.propertyValue) : W.setProperties(U, {
|
|
31185
|
+
[M.propertyName]: M.propertyValue
|
|
31189
31186
|
});
|
|
31190
31187
|
} else if ([
|
|
31191
31188
|
Ft.custom,
|
|
@@ -31196,97 +31193,95 @@ const zB = HB.exports, GB = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAA
|
|
|
31196
31193
|
Ft.start,
|
|
31197
31194
|
Ft.task,
|
|
31198
31195
|
Ft.wfSubProcess
|
|
31199
|
-
].includes(
|
|
31196
|
+
].includes(M.type)) {
|
|
31200
31197
|
const U = Nt(c);
|
|
31201
|
-
if (
|
|
31202
|
-
W.getNodeModelById(
|
|
31203
|
-
else if (
|
|
31204
|
-
W.updateText(U,
|
|
31205
|
-
else if (
|
|
31198
|
+
if (M.propertyName === "name")
|
|
31199
|
+
W.getNodeModelById(M.propertyValue) || (W.changeNodeId(U, M.propertyValue), c.value = M.propertyValue);
|
|
31200
|
+
else if (M.propertyName === "displayName")
|
|
31201
|
+
W.updateText(U, M.propertyValue);
|
|
31202
|
+
else if (M.propertyName === "width" && [Ft.task, Ft.custom].includes(M.type)) {
|
|
31206
31203
|
W.setProperties(U, {
|
|
31207
|
-
width: Number.isNaN(
|
|
31204
|
+
width: Number.isNaN(M.propertyValue) ? 120 : M.propertyValue
|
|
31208
31205
|
});
|
|
31209
31206
|
const x = W.getNodeModelById(U);
|
|
31210
|
-
x && (x.width = Number.isNaN(
|
|
31211
|
-
} else if (
|
|
31207
|
+
x && (x.width = Number.isNaN(M.propertyValue) ? 120 : M.propertyValue);
|
|
31208
|
+
} else if (M.propertyName === "height" && [Ft.task, Ft.custom].includes(M.type)) {
|
|
31212
31209
|
W.setProperties(U, {
|
|
31213
|
-
height: Number.isNaN(
|
|
31210
|
+
height: Number.isNaN(M.propertyValue) ? 120 : M.propertyValue
|
|
31214
31211
|
});
|
|
31215
31212
|
const x = W.getNodeModelById(U);
|
|
31216
|
-
x && (x.height = Number.isNaN(
|
|
31217
|
-
} else
|
|
31218
|
-
field: JSON.stringify(
|
|
31213
|
+
x && (x.height = Number.isNaN(M.propertyValue) ? 120 : M.propertyValue);
|
|
31214
|
+
} else M.propertyName === "field" ? W.setProperties(U, {
|
|
31215
|
+
field: JSON.stringify(M.propertyValue)
|
|
31219
31216
|
}) : W.setProperties(U, {
|
|
31220
|
-
[
|
|
31217
|
+
[M.propertyName]: M.propertyValue
|
|
31221
31218
|
});
|
|
31222
31219
|
t("input", m());
|
|
31223
|
-
} else if (
|
|
31220
|
+
} else if (M.type === Ft.transition) {
|
|
31224
31221
|
const U = Nt(c);
|
|
31225
|
-
|
|
31226
|
-
[
|
|
31222
|
+
M.propertyName === "name" ? W.getEdgeModelById(M.propertyValue) || (W.changeEdgeId(U, M.propertyValue), c.value = M.propertyValue) : M.propertyName === "displayName" ? W.updateText(U, M.propertyValue) : W.setProperties(U, {
|
|
31223
|
+
[M.propertyName]: M.propertyValue
|
|
31227
31224
|
});
|
|
31228
31225
|
}
|
|
31229
31226
|
}
|
|
31230
31227
|
}, m = () => {
|
|
31231
|
-
const
|
|
31232
|
-
return
|
|
31233
|
-
}, S = (
|
|
31228
|
+
const M = Nt(u);
|
|
31229
|
+
return M ? M.getGraphData() : {};
|
|
31230
|
+
}, S = (M) => {
|
|
31234
31231
|
let W = null;
|
|
31235
31232
|
try {
|
|
31236
|
-
W = JSON.parse(
|
|
31233
|
+
W = JSON.parse(M);
|
|
31237
31234
|
} catch {
|
|
31238
31235
|
try {
|
|
31239
|
-
W = C0(
|
|
31236
|
+
W = C0(M);
|
|
31240
31237
|
} catch {
|
|
31241
31238
|
return;
|
|
31242
31239
|
}
|
|
31243
31240
|
}
|
|
31244
31241
|
W && W.nodes && W.edges && g(W);
|
|
31245
|
-
}, O = (
|
|
31246
|
-
g(
|
|
31247
|
-
}, k = (
|
|
31248
|
-
g(
|
|
31249
|
-
},
|
|
31250
|
-
var
|
|
31251
|
-
return (
|
|
31252
|
-
}, A = (
|
|
31242
|
+
}, O = (M) => {
|
|
31243
|
+
g(M);
|
|
31244
|
+
}, k = (M) => {
|
|
31245
|
+
g(M);
|
|
31246
|
+
}, N = () => {
|
|
31247
|
+
var M;
|
|
31248
|
+
return (M = Nt(s)) == null ? void 0 : M.refresh();
|
|
31249
|
+
}, A = (M) => {
|
|
31253
31250
|
let W = null;
|
|
31254
31251
|
try {
|
|
31255
|
-
W = JSON.parse(
|
|
31252
|
+
W = JSON.parse(M);
|
|
31256
31253
|
} catch {
|
|
31257
31254
|
}
|
|
31258
31255
|
T(W);
|
|
31259
|
-
}, T = (
|
|
31256
|
+
}, T = (M) => {
|
|
31260
31257
|
const W = Nt(u);
|
|
31261
|
-
W && (
|
|
31262
|
-
|
|
31263
|
-
|
|
31258
|
+
W && (M && M.historyNodeNames && M.historyNodeNames.forEach((U) => {
|
|
31259
|
+
var x, P;
|
|
31260
|
+
const D = (x = M.nodeStatus) == null ? void 0 : x[U], q = (P = M.nodeApprovalComment) == null ? void 0 : P[U];
|
|
31261
|
+
W.setProperties(U, { state: "history", status: D, approvalComment: q });
|
|
31262
|
+
}), M && M.activeNodeNames && M.activeNodeNames.forEach((U) => {
|
|
31264
31263
|
W.setProperties(U, { state: "active" });
|
|
31265
|
-
}),
|
|
31264
|
+
}), M && M.historyEdgeNames && M.historyEdgeNames.forEach((U) => {
|
|
31266
31265
|
const x = W.getEdgeModelById(U);
|
|
31267
31266
|
x && x.setProperties({ state: "history" });
|
|
31268
|
-
}), N && N.nodeStatus && Object.keys(N.nodeStatus).forEach((U) => {
|
|
31269
|
-
W.setProperties(U, { status: N.nodeStatus[U] });
|
|
31270
|
-
}), N && N.nodeApprovalComment && Object.keys(N.nodeApprovalComment).forEach((U) => {
|
|
31271
|
-
W.setProperties(U, { approvalComment: N.nodeApprovalComment[U] });
|
|
31272
31267
|
}));
|
|
31273
|
-
}, F = (
|
|
31268
|
+
}, F = (M, W = { valueKey: "value", labelKey: "label" }) => {
|
|
31274
31269
|
const U = Nt(u);
|
|
31275
|
-
!U || !
|
|
31270
|
+
!U || !M || (Array.isArray(M) ? M.forEach((x) => {
|
|
31276
31271
|
U.setProperties(x[W.valueKey], { assigneeText: x[W.labelKey] });
|
|
31277
|
-
}) : Object.keys(
|
|
31278
|
-
U.setProperties(x, { assigneeText:
|
|
31272
|
+
}) : Object.keys(M).forEach((x) => {
|
|
31273
|
+
U.setProperties(x, { assigneeText: M[x] });
|
|
31279
31274
|
}));
|
|
31280
31275
|
};
|
|
31281
31276
|
return nr(d), e({
|
|
31282
31277
|
getGraphData: m,
|
|
31283
|
-
refreshImport:
|
|
31278
|
+
refreshImport: N,
|
|
31284
31279
|
importJson: O,
|
|
31285
31280
|
importXml: k,
|
|
31286
31281
|
setHighLight: T,
|
|
31287
31282
|
setAssigneeText: F,
|
|
31288
31283
|
getLfInstance: () => u.value
|
|
31289
|
-
}), { __sfc: !0, emits: t, lfElRef: i, propertSettingRef: o, dataDetailRef: a, importDataRef: s, highLightDataRef: l, lfInstance: u, currentOpId: c, props: r, initDoc: f, init: d, bindWfProps: h, initOp: v, initEvent: p, reRender: g, handlePropertyChange: y, getGraphData: m, handleImportSubmit: S, importJson: O, importXml: k, refreshImport:
|
|
31284
|
+
}), { __sfc: !0, emits: t, lfElRef: i, propertSettingRef: o, dataDetailRef: a, importDataRef: s, highLightDataRef: l, lfInstance: u, currentOpId: c, props: r, initDoc: f, init: d, bindWfProps: h, initOp: v, initEvent: p, reRender: g, handlePropertyChange: y, getGraphData: m, handleImportSubmit: S, importJson: O, importXml: k, refreshImport: N, handleHighLightSubmit: A, setHighLight: T, setAssigneeText: F, PropertSetting: k5, DataDetail: DB, ImportData: BB, HighLightData: zB };
|
|
31290
31285
|
}
|
|
31291
31286
|
});
|
|
31292
31287
|
var QB = function() {
|
|
@@ -31302,7 +31297,7 @@ var QB = function() {
|
|
|
31302
31297
|
ej,
|
|
31303
31298
|
!1,
|
|
31304
31299
|
null,
|
|
31305
|
-
"
|
|
31300
|
+
"1752e27b"
|
|
31306
31301
|
);
|
|
31307
31302
|
const nj = tj.exports, fg = nj;
|
|
31308
31303
|
fg.install = function(n) {
|