@g1cloud/bpmn-modeler-next 5.0.0-beta.61 → 5.0.0-beta.62
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/bpmn-modeler.js +403 -398
- package/dist/bpmn-modeler.umd.cjs +7 -7
- package/package.json +1 -1
package/dist/bpmn-modeler.js
CHANGED
|
@@ -1388,7 +1388,7 @@ function lw(e) {
|
|
|
1388
1388
|
y = !0;
|
|
1389
1389
|
};
|
|
1390
1390
|
function H(F, G = !1) {
|
|
1391
|
-
var ee = null, se = null, ie, ve = 0,
|
|
1391
|
+
var ee = null, se = null, ie, ve = 0, de = !1, me = !1, _e = 0, U = 0, le, K, Q, he, Ee, Fe, $, C, R, W = "", q = 0, pe;
|
|
1392
1392
|
function Te(_t, Jt) {
|
|
1393
1393
|
var En = _t.indexOf(":");
|
|
1394
1394
|
if (En === -1)
|
|
@@ -1496,7 +1496,7 @@ function lw(e) {
|
|
|
1496
1496
|
} else if (F.substring(U, _e).trim() && (P(Hm), y))
|
|
1497
1497
|
return;
|
|
1498
1498
|
}
|
|
1499
|
-
if (
|
|
1499
|
+
if (he = F.charCodeAt(_e + 1), he === 33) {
|
|
1500
1500
|
if (Q = F.charCodeAt(_e + 2), Q === 91 && F.substr(_e + 3, 6) === "CDATA[") {
|
|
1501
1501
|
if (U = F.indexOf("]]>", _e), U === -1)
|
|
1502
1502
|
return G ? F.substring(_e) : I("unclosed cdata");
|
|
@@ -1514,7 +1514,7 @@ function lw(e) {
|
|
|
1514
1514
|
continue;
|
|
1515
1515
|
}
|
|
1516
1516
|
}
|
|
1517
|
-
if (
|
|
1517
|
+
if (he === 63) {
|
|
1518
1518
|
if (U = F.indexOf("?>", _e), U === -1)
|
|
1519
1519
|
return G ? F.substring(_e) : I("unclosed question");
|
|
1520
1520
|
if (l && (l(F.substring(_e, U + 2), p), y))
|
|
@@ -1534,54 +1534,54 @@ function lw(e) {
|
|
|
1534
1534
|
break;
|
|
1535
1535
|
}
|
|
1536
1536
|
}
|
|
1537
|
-
if (
|
|
1537
|
+
if (he === 33) {
|
|
1538
1538
|
if (u && (u(F.substring(_e, U + 1), Tr, p), y))
|
|
1539
1539
|
return;
|
|
1540
1540
|
U += 1;
|
|
1541
1541
|
continue;
|
|
1542
1542
|
}
|
|
1543
|
-
if (pe = {},
|
|
1544
|
-
if (
|
|
1543
|
+
if (pe = {}, he === 47) {
|
|
1544
|
+
if (de = !1, me = !0, !E.length)
|
|
1545
1545
|
return I("missing open tag");
|
|
1546
1546
|
if (le = $ = E.pop(), Q = _e + 2 + le.length, F.substring(_e + 2, Q) !== le)
|
|
1547
1547
|
return I("closing tag mismatch");
|
|
1548
1548
|
for (; Q < U; Q++)
|
|
1549
|
-
if (
|
|
1549
|
+
if (he = F.charCodeAt(Q), !(he === 32 || he > 8 && he < 14))
|
|
1550
1550
|
return I("close tag");
|
|
1551
1551
|
} else {
|
|
1552
|
-
if (F.charCodeAt(U - 1) === 47 ? (le = $ = F.substring(_e + 1, U - 1),
|
|
1552
|
+
if (F.charCodeAt(U - 1) === 47 ? (le = $ = F.substring(_e + 1, U - 1), de = !0, me = !0) : (le = $ = F.substring(_e + 1, U), de = !0, me = !1), !(he > 96 && he < 123 || he > 64 && he < 91 || he === 95 || he === 58))
|
|
1553
1553
|
return I("illegal first char nodeName");
|
|
1554
1554
|
for (Q = 1, K = le.length; Q < K; Q++)
|
|
1555
|
-
if (
|
|
1556
|
-
if (
|
|
1555
|
+
if (he = le.charCodeAt(Q), !(he > 96 && he < 123 || he > 64 && he < 91 || he > 47 && he < 59 || he === 45 || he === 95 || he == 46)) {
|
|
1556
|
+
if (he === 32 || he < 14 && he > 8) {
|
|
1557
1557
|
$ = le.substring(0, Q), pe = null;
|
|
1558
1558
|
break;
|
|
1559
1559
|
}
|
|
1560
1560
|
return I("invalid nodeName");
|
|
1561
1561
|
}
|
|
1562
|
-
|
|
1562
|
+
me || E.push($);
|
|
1563
1563
|
}
|
|
1564
1564
|
if (m) {
|
|
1565
|
-
ie = b,
|
|
1565
|
+
ie = b, de && (me || v.push(ie), pe === null && (h = le.indexOf("xmlns", Q) !== -1) && (q = Q, W = le, Qe(), h = !1)), C = $, se !== b && (ee = b[zm], ee === void 0 && (ee = b[zm] = /* @__PURE__ */ Object.create(null)), se = b);
|
|
1566
1566
|
var jt = ee[$];
|
|
1567
1567
|
if (jt !== void 0)
|
|
1568
1568
|
$ = jt;
|
|
1569
1569
|
else {
|
|
1570
|
-
if (
|
|
1571
|
-
if (Fe = b[$.substring(0,
|
|
1570
|
+
if (he = $.indexOf(":"), he !== -1) {
|
|
1571
|
+
if (Fe = b[$.substring(0, he)], !Fe)
|
|
1572
1572
|
return I("missing namespace on <" + C + ">");
|
|
1573
|
-
$ = $.substr(
|
|
1573
|
+
$ = $.substr(he + 1);
|
|
1574
1574
|
} else
|
|
1575
1575
|
Fe = b.xmlns;
|
|
1576
1576
|
Fe && ($ = Fe + ":" + $), ee[C] = $;
|
|
1577
1577
|
}
|
|
1578
1578
|
}
|
|
1579
|
-
if (
|
|
1579
|
+
if (de && (q = Q, W = le, i && (t ? i(R, Tr, me, p) : i($, Qe, Tr, me, p), y)))
|
|
1580
1580
|
return;
|
|
1581
|
-
if (
|
|
1582
|
-
if (o && (o(t ? R : $, Tr,
|
|
1581
|
+
if (me) {
|
|
1582
|
+
if (o && (o(t ? R : $, Tr, de, p), y))
|
|
1583
1583
|
return;
|
|
1584
|
-
m && (
|
|
1584
|
+
m && (de ? b = ie : b = v.pop());
|
|
1585
1585
|
}
|
|
1586
1586
|
U += 1;
|
|
1587
1587
|
}
|
|
@@ -6638,9 +6638,9 @@ function pt(e, t = {}) {
|
|
|
6638
6638
|
if (se < _w) continue;
|
|
6639
6639
|
const ie = H.axis === "v" ? E.x < H.at && H.at < A : E.y < H.at && H.at < I;
|
|
6640
6640
|
if (!(ie && P))
|
|
6641
|
-
for (const [ve,
|
|
6642
|
-
const
|
|
6643
|
-
|
|
6641
|
+
for (const [ve, de] of ee) {
|
|
6642
|
+
const me = Math.abs(H.at - de);
|
|
6643
|
+
me <= Cs && (!k || me < k.distance) && (k = { side: ve, inside: ie, distance: me, length: se });
|
|
6644
6644
|
}
|
|
6645
6645
|
}
|
|
6646
6646
|
k && n.push({
|
|
@@ -7407,8 +7407,8 @@ function oA(e, t, n, i, o) {
|
|
|
7407
7407
|
}
|
|
7408
7408
|
const v = (ie, ve) => {
|
|
7409
7409
|
if (Math.abs(ve - ie) < 2 * ji) return [];
|
|
7410
|
-
const
|
|
7411
|
-
return Vp(Math.round((ie + ve) / 2),
|
|
7410
|
+
const de = Math.min(ie, ve) + ji, me = Math.max(ie, ve) - ji;
|
|
7411
|
+
return Vp(Math.round((ie + ve) / 2), de, me);
|
|
7412
7412
|
};
|
|
7413
7413
|
if (!a && n)
|
|
7414
7414
|
for (const ie of v(l, c ? n.y + n.height : n.y))
|
|
@@ -7417,22 +7417,22 @@ function oA(e, t, n, i, o) {
|
|
|
7417
7417
|
for (const ie of v(u, c ? i.y : i.y + i.height))
|
|
7418
7418
|
r.push([{ x: y, y: l }, { x: y, y: ie }, { x: f, y: ie }, { x: f, y: u }]);
|
|
7419
7419
|
const b = Math.min(y, w), E = Math.max(y, w), A = [];
|
|
7420
|
-
for (const [ie, ve] of o.filter((
|
|
7421
|
-
const
|
|
7422
|
-
|
|
7420
|
+
for (const [ie, ve] of o.filter((de) => de.x < E && de.x + de.width > b).map((de) => [de.y, de.y + de.height]).sort((de, me) => de[0] - me[0])) {
|
|
7421
|
+
const de = A[A.length - 1];
|
|
7422
|
+
de && ie <= de[1] ? de[1] = Math.max(de[1], ve) : A.push([ie, ve]);
|
|
7423
7423
|
}
|
|
7424
7424
|
const I = [];
|
|
7425
7425
|
for (let ie = 1; ie < A.length; ie++)
|
|
7426
7426
|
A[ie][0] - A[ie - 1][1] >= tA && I.push(Math.round((A[ie - 1][1] + A[ie][0]) / 2));
|
|
7427
7427
|
A.length && I.push(A[0][0] - iy, A[A.length - 1][1] + iy);
|
|
7428
|
-
const P = (ie, ve) => ve < ie.y ? ie.y : ve > ie.y + ie.height ? ie.y + ie.height : void 0, k = new Set([a ? e.id : n == null ? void 0 : n.id, s ? t.id : i == null ? void 0 : i.id].filter((ie) => !!ie)), H = e.y + e.height / 2, F = t.y + t.height / 2, G = F > H ? 1 : -1, ee = (ie, ve,
|
|
7429
|
-
(
|
|
7428
|
+
const P = (ie, ve) => ve < ie.y ? ie.y : ve > ie.y + ie.height ? ie.y + ie.height : void 0, k = new Set([a ? e.id : n == null ? void 0 : n.id, s ? t.id : i == null ? void 0 : i.id].filter((ie) => !!ie)), H = e.y + e.height / 2, F = t.y + t.height / 2, G = F > H ? 1 : -1, ee = (ie, ve, de) => o.some(
|
|
7429
|
+
(me) => !k.has(me.id) && me.x < ie && ie < me.x + me.width && me.y < Math.max(ve, de) - 1 && me.y + me.height > Math.min(ve, de) + 1
|
|
7430
7430
|
), se = [];
|
|
7431
7431
|
for (const ie of I) {
|
|
7432
|
-
const ve = P(e, ie),
|
|
7433
|
-
ve === void 0 ||
|
|
7434
|
-
pts: [{ x: y, y: ve }, { x: y, y: ie }, { x: w, y: ie }, { x: w, y:
|
|
7435
|
-
len: Math.abs(ie - ve) + (E - b) + Math.abs(
|
|
7432
|
+
const ve = P(e, ie), de = P(t, ie);
|
|
7433
|
+
ve === void 0 || de === void 0 || (ie - H) * G < 0 && ee(y, ve, ie) || (ie - F) * G > 0 && ee(w, de, ie) || se.push({
|
|
7434
|
+
pts: [{ x: y, y: ve }, { x: y, y: ie }, { x: w, y: ie }, { x: w, y: de }],
|
|
7435
|
+
len: Math.abs(ie - ve) + (E - b) + Math.abs(de - ie)
|
|
7436
7436
|
});
|
|
7437
7437
|
}
|
|
7438
7438
|
return { inPools: r, outside: se.sort((ie, ve) => ie.len - ve.len).map((ie) => ie.pts) };
|
|
@@ -7469,14 +7469,14 @@ function rA(e, t, n) {
|
|
|
7469
7469
|
y ? w.get(y) : void 0,
|
|
7470
7470
|
v ? w.get(v) : void 0,
|
|
7471
7471
|
E
|
|
7472
|
-
),
|
|
7473
|
-
for (const U of
|
|
7472
|
+
), de = (U) => U.map((le, K) => ({ pts: le, i: K, key: le.length * 2 + (ie(le) ? 1 : 0) })).sort((le, K) => le.key - K.key || le.i - K.i).map((le) => le.pts), me = [...de(ve.inPools), ...de(ve.outside)], _e = c();
|
|
7473
|
+
for (const U of me) {
|
|
7474
7474
|
if (Gp(U, b, E) >= Hp) continue;
|
|
7475
7475
|
const le = { ...H, waypoints: U };
|
|
7476
|
-
if (Ht(le, F).some((
|
|
7476
|
+
if (Ht(le, F).some((he) => !G.has(he.id)) || xn(le).some((he) => iA(he, m.shapes) || ee.some((Ee) => io(Ee.rect, he)))) continue;
|
|
7477
7477
|
o.updateWaypoints(d, U);
|
|
7478
7478
|
const Q = c();
|
|
7479
|
-
if (Q.crossings <= _e.crossings && Q.shared <= _e.shared && [...Q.keys].every((
|
|
7479
|
+
if (Q.crossings <= _e.crossings && Q.shared <= _e.shared && [...Q.keys].every((he) => _e.keys.has(he))) return "fixed";
|
|
7480
7480
|
o.updateWaypoints(d, A);
|
|
7481
7481
|
}
|
|
7482
7482
|
return "stuck";
|
|
@@ -8765,13 +8765,13 @@ function Lw(e, t, n) {
|
|
|
8765
8765
|
const tu = (e, t, n) => e.y - t.height / 2 >= n.y && e.y + t.height / 2 <= n.y + n.height;
|
|
8766
8766
|
function nu(e, t, n, i, o) {
|
|
8767
8767
|
const r = n, a = Lw(e, t, i), s = a ?? i, c = (ee, se, ie = s) => {
|
|
8768
|
-
const [ve,
|
|
8769
|
-
let
|
|
8768
|
+
const [ve, de] = eu[ee];
|
|
8769
|
+
let me = {
|
|
8770
8770
|
x: t.x + t.width / 2 + ve * (t.width / 2 + r.width / 2 + se),
|
|
8771
|
-
y: t.y + t.height / 2 +
|
|
8771
|
+
y: t.y + t.height / 2 + de * (t.height / 2 + r.height / 2 + se)
|
|
8772
8772
|
};
|
|
8773
|
-
const _e = ie.x + Pn + r.width / 2, U = ie.x + ie.width - Pn - r.width / 2, le = ie.y + Pn + r.height / 2, K = ie.y + ie.height - Pn - r.height / 2, Q = { x: Math.min(U, Math.max(_e,
|
|
8774
|
-
return (Q.x !==
|
|
8773
|
+
const _e = ie.x + Pn + r.width / 2, U = ie.x + ie.width - Pn - r.width / 2, le = ie.y + Pn + r.height / 2, K = ie.y + ie.height - Pn - r.height / 2, Q = { x: Math.min(U, Math.max(_e, me.x)), y: Math.min(K, Math.max(le, me.y)) };
|
|
8774
|
+
return (Q.x !== me.x || Q.y !== me.y) && (me = Math.abs(Q.x - (t.x + t.width / 2)) < (t.width + r.width) / 2 + Pn && Math.abs(Q.y - (t.y + t.height / 2)) < (t.height + r.height) / 2 + Pn ? { x: t.x + t.width + Pn + r.width / 2, y: Q.y } : Q), me;
|
|
8775
8775
|
}, l = (i.children ?? []).filter(
|
|
8776
8776
|
(ee) => !("waypoints" in ee && ee.waypoints) && ee.type !== "bpmn:Lane" && ee.type !== "label" && typeof ee.x == "number" && ee.id !== o.selfId
|
|
8777
8777
|
), u = We(e), p = (ee) => {
|
|
@@ -8807,23 +8807,23 @@ function nu(e, t, n, i, o) {
|
|
|
8807
8807
|
);
|
|
8808
8808
|
}, b = (ee) => h(ee) || m(ee) || w(ee) || v(ee), E = (ee) => ee.x - r.width / 2 >= i.x && ee.x + r.width / 2 <= i.x + i.width && ee.y - r.height / 2 >= i.y && ee.y + r.height / 2 <= i.y + i.height, A = (ee) => E(ee) && (!a || tu(ee, r, a));
|
|
8809
8809
|
if (o.placement) {
|
|
8810
|
-
const ee = (_e) => _e.startsWith("top") ? _e.replace(/^top/, "bottom") : _e.replace(/^bottom/, "top"), se = (_e) => _e.endsWith("left") ? _e.replace(/left$/, "right") : _e.replace(/right$/, "left"), ie = o.placement.side, ve = [ie, ee(ie), se(ie), ee(se(ie)), "top", "bottom", "left", "right", "top-left", "top-right", "bottom-left", "bottom-right"],
|
|
8811
|
-
let
|
|
8812
|
-
if (b(
|
|
8810
|
+
const ee = (_e) => _e.startsWith("top") ? _e.replace(/^top/, "bottom") : _e.replace(/^bottom/, "top"), se = (_e) => _e.endsWith("left") ? _e.replace(/left$/, "right") : _e.replace(/right$/, "left"), ie = o.placement.side, ve = [ie, ee(ie), se(ie), ee(se(ie)), "top", "bottom", "left", "right", "top-left", "top-right", "bottom-left", "bottom-right"], de = o.placement.offset ?? 50;
|
|
8811
|
+
let me = c(ie, de);
|
|
8812
|
+
if (b(me) || a && !tu(me, r, a)) {
|
|
8813
8813
|
const _e = (U, le) => {
|
|
8814
8814
|
const K = /* @__PURE__ */ new Set();
|
|
8815
8815
|
for (const Q of ve) {
|
|
8816
8816
|
if (K.has(Q)) continue;
|
|
8817
8817
|
K.add(Q);
|
|
8818
|
-
const
|
|
8819
|
-
if (le(
|
|
8820
|
-
return
|
|
8818
|
+
const he = c(Q, de, U);
|
|
8819
|
+
if (le(he) && !b(he))
|
|
8820
|
+
return me = he, !0;
|
|
8821
8821
|
}
|
|
8822
8822
|
return !1;
|
|
8823
8823
|
};
|
|
8824
8824
|
!_e(s, A) && a && _e(i, E);
|
|
8825
8825
|
}
|
|
8826
|
-
return
|
|
8826
|
+
return me;
|
|
8827
8827
|
}
|
|
8828
8828
|
const I = o.from, P = s.x + Pn + r.width / 2, k = s.x + s.width - Pn - r.width / 2, H = s.y + Pn + r.height / 2, F = s.y + s.height - Pn - r.height / 2;
|
|
8829
8829
|
let G = { x: Math.min(k, Math.max(P, I.x)), y: Math.min(F, Math.max(H, I.y)) };
|
|
@@ -8911,7 +8911,7 @@ function qA(e, t) {
|
|
|
8911
8911
|
var S;
|
|
8912
8912
|
return _.type === "bpmn:Lane" && ((S = g(_)) == null ? void 0 : S.id) === x;
|
|
8913
8913
|
}
|
|
8914
|
-
).sort((_, S) => _.y - S.y),
|
|
8914
|
+
).sort((_, S) => _.y - S.y), de = [];
|
|
8915
8915
|
for (const x of Bt(e, "participant.update")) {
|
|
8916
8916
|
const _ = d(x.id);
|
|
8917
8917
|
if (x.name !== void 0 && n.updateProperties(_, { name: x.name ?? void 0 }), !x.lanes) continue;
|
|
@@ -8920,7 +8920,7 @@ function qA(e, t) {
|
|
|
8920
8920
|
n.splitLane(_, x.lanes.length), ve(x.id).forEach((T, B) => {
|
|
8921
8921
|
const L = x.lanes[B];
|
|
8922
8922
|
L && n.updateProperties(T, { id: L.id, name: L.name });
|
|
8923
|
-
}),
|
|
8923
|
+
}), de.push({ pool: x.id, lanes: new Set(x.lanes.map((T) => T.id)) });
|
|
8924
8924
|
continue;
|
|
8925
8925
|
}
|
|
8926
8926
|
const O = new Set(S.map((T) => T.id)), N = x.lanes.reduce((T, B, L) => O.has(B.id) ? L : T, -1);
|
|
@@ -8933,10 +8933,10 @@ function qA(e, t) {
|
|
|
8933
8933
|
n.updateProperties(D, { id: T.id, name: T.name });
|
|
8934
8934
|
});
|
|
8935
8935
|
}
|
|
8936
|
-
const
|
|
8936
|
+
const me = 150, _e = 130, U = 80, le = 90, K = 180, Q = 30, he = 30, Ee = 10, Fe = 300, $ = 5, C = (x, _, S, O, N) => {
|
|
8937
8937
|
const T = S - _.width / 2, B = O - _.height / 2;
|
|
8938
8938
|
return (x.children ?? []).find(
|
|
8939
|
-
(L) => !("waypoints" in L && L.waypoints) && L.type !== "bpmn:Lane" && L.type !== "label" && !(N != null && N.has(L.id)) && typeof L.x == "number" && T < L.x + L.width +
|
|
8939
|
+
(L) => !("waypoints" in L && L.waypoints) && L.type !== "bpmn:Lane" && L.type !== "label" && !(N != null && N.has(L.id)) && typeof L.x == "number" && T < L.x + L.width + he && T + _.width + he > L.x && B < L.y + L.height && B + _.height > L.y
|
|
8940
8940
|
);
|
|
8941
8941
|
}, R = /* @__PURE__ */ new Set();
|
|
8942
8942
|
for (const x of m) {
|
|
@@ -8967,18 +8967,18 @@ function qA(e, t) {
|
|
|
8967
8967
|
for (const ae of F) {
|
|
8968
8968
|
const oe = ae.flow.source === ne.node.id;
|
|
8969
8969
|
if (!oe && ae.flow.target !== ne.node.id) continue;
|
|
8970
|
-
const
|
|
8971
|
-
if (!
|
|
8972
|
-
let
|
|
8973
|
-
if (
|
|
8974
|
-
const Z = x.get(
|
|
8970
|
+
const ye = P.get(oe ? ae.flow.target : ae.flow.source);
|
|
8971
|
+
if (!ye || ye.node.participant !== ne.node.participant || !ye.node.lane) continue;
|
|
8972
|
+
let ge, te = !1;
|
|
8973
|
+
if (ye.node.lane !== _) {
|
|
8974
|
+
const Z = x.get(ye.node.lane);
|
|
8975
8975
|
if (Z === void 0) continue;
|
|
8976
|
-
|
|
8976
|
+
ge = Z > O ? "down" : "up", te = !0;
|
|
8977
8977
|
} else {
|
|
8978
|
-
const Z = S.get(
|
|
8979
|
-
|
|
8978
|
+
const Z = S.get(ye.band ?? 0) ?? N;
|
|
8979
|
+
ge = Z > N ? "down" : Z < N ? "up" : void 0;
|
|
8980
8980
|
}
|
|
8981
|
-
|
|
8981
|
+
ge && (ce[oe ? "out" : "in"].add(ge), te && ce.cross.add(ge));
|
|
8982
8982
|
}
|
|
8983
8983
|
for (const ae of ["up", "down"]) ce.in.has(ae) && ce.out.has(ae) && ce.cross.has(ae) && T.add(ae);
|
|
8984
8984
|
}
|
|
@@ -9066,8 +9066,8 @@ function qA(e, t) {
|
|
|
9066
9066
|
for (const ae of v) {
|
|
9067
9067
|
const oe = X.has(ae.flow.source) ? ae.flow.target : X.has(ae.flow.target) ? ae.flow.source : void 0;
|
|
9068
9068
|
if (oe === void 0) continue;
|
|
9069
|
-
const
|
|
9070
|
-
|
|
9069
|
+
const ye = O(N(oe));
|
|
9070
|
+
ye === void 0 || ye === ne || ce.add(ye < ne ? "up" : "down");
|
|
9071
9071
|
}
|
|
9072
9072
|
return ce.size === 1 ? [...ce][0] : void 0;
|
|
9073
9073
|
}, D = /* @__PURE__ */ new Map();
|
|
@@ -9075,23 +9075,23 @@ function qA(e, t) {
|
|
|
9075
9075
|
const j = /* @__PURE__ */ new Map();
|
|
9076
9076
|
for (const oe of F) {
|
|
9077
9077
|
if (!P.has(oe.flow.source) || !P.has(oe.flow.target)) continue;
|
|
9078
|
-
const
|
|
9079
|
-
|
|
9078
|
+
const ye = j.get(oe.flow.source) ?? [];
|
|
9079
|
+
ye.push(oe.flow.target), j.set(oe.flow.source, ye);
|
|
9080
9080
|
}
|
|
9081
9081
|
const X = /* @__PURE__ */ new Map(), ne = [], ce = /* @__PURE__ */ new Set(), ae = (oe) => {
|
|
9082
9082
|
X.set(oe, "open");
|
|
9083
|
-
for (const
|
|
9084
|
-
const
|
|
9085
|
-
|
|
9083
|
+
for (const ye of j.get(oe) ?? []) {
|
|
9084
|
+
const ge = X.get(ye);
|
|
9085
|
+
ge === "open" ? ce.add(`${oe}>${ye}`) : ge || ae(ye);
|
|
9086
9086
|
}
|
|
9087
9087
|
X.set(oe, "done"), ne.push(oe);
|
|
9088
9088
|
};
|
|
9089
9089
|
for (const oe of w) X.has(oe.node.id) || ae(oe.node.id);
|
|
9090
9090
|
for (const oe of ne.reverse()) {
|
|
9091
|
-
const
|
|
9092
|
-
D.set(oe,
|
|
9093
|
-
for (const
|
|
9094
|
-
!ce.has(`${oe}>${
|
|
9091
|
+
const ye = D.get(oe) ?? 0;
|
|
9092
|
+
D.set(oe, ye);
|
|
9093
|
+
for (const ge of j.get(oe) ?? [])
|
|
9094
|
+
!ce.has(`${oe}>${ge}`) && (D.get(ge) ?? -1) < ye + 1 && D.set(ge, ye + 1);
|
|
9095
9095
|
}
|
|
9096
9096
|
}
|
|
9097
9097
|
let z = -1e3;
|
|
@@ -9104,15 +9104,15 @@ function qA(e, t) {
|
|
|
9104
9104
|
return { root: te, subtree: Z, dir: L(Z) };
|
|
9105
9105
|
});
|
|
9106
9106
|
if (oe.some((te) => te.dir === "up") && oe.some((te) => te.dir === "down")) continue;
|
|
9107
|
-
const
|
|
9107
|
+
const ye = F.some((te) => {
|
|
9108
9108
|
const Z = te.flow.source === j.node.id ? P.get(te.flow.target) : void 0;
|
|
9109
9109
|
return !!Z && x(Z) === X && ae(Z) === 0;
|
|
9110
9110
|
});
|
|
9111
|
-
let
|
|
9112
|
-
if (!
|
|
9113
|
-
const te = F.filter((
|
|
9111
|
+
let ge = !1;
|
|
9112
|
+
if (!ye) {
|
|
9113
|
+
const te = F.filter((fe) => fe.flow.source === j.node.id).map((fe) => P.get(fe.flow.target)).filter((fe) => !!fe && x(fe) === X && (!!fe.node.lane || Te(fe) !== void 0) && ae(fe) < 0), Z = te.length ? Math.max(...te.map(ae)) : void 0, re = te.filter((fe) => ae(fe) === Z);
|
|
9114
9114
|
if (!At(j.node.id) && re.length === 1 && (T.get(re[0].node.id) ?? 0) === 1 && !jt.has(j.node.id)) continue;
|
|
9115
|
-
|
|
9115
|
+
ge = !0;
|
|
9116
9116
|
}
|
|
9117
9117
|
for (const te of oe) {
|
|
9118
9118
|
const Z = te.dir;
|
|
@@ -9124,15 +9124,15 @@ function qA(e, t) {
|
|
|
9124
9124
|
const Be = ae(Pe);
|
|
9125
9125
|
return Z === "up" ? Be < 0 : Be > 0;
|
|
9126
9126
|
})) continue;
|
|
9127
|
-
const
|
|
9128
|
-
if (!
|
|
9127
|
+
const fe = [...ne].map(([Re, Pe]) => ({ band: Re, rel: Pe - ce })).filter((Re) => Z === "up" ? Re.rel < 0 : Re.rel > 0).sort((Re, Pe) => Math.abs(Pe.rel) - Math.abs(Re.rel));
|
|
9128
|
+
if (!fe.length && Z === "down") continue;
|
|
9129
9129
|
const Ne = _(te.root), ke = te.subtree.filter((Re) => x(Re) === X && _(Re) === Ne), qe = new Set(te.subtree.map((Re) => Re.node.id)), Ce = ke.map((Re) => D.get(Re.node.id) ?? 0), Me = Math.min(...Ce) - 1, Se = Math.max(...Ce) + 1, Ae = (Re) => !w.some((Pe) => {
|
|
9130
9130
|
if (qe.has(Pe.node.id) || x(Pe) !== X || _(Pe) !== Re) return !1;
|
|
9131
9131
|
if (!Jt.has(Re)) return !0;
|
|
9132
9132
|
const Be = D.get(Pe.node.id) ?? 0;
|
|
9133
9133
|
return Be >= Me && Be <= Se;
|
|
9134
9134
|
});
|
|
9135
|
-
let ue =
|
|
9135
|
+
let ue = ge ? _(j) : (lm = fe.find((Re) => Ae(Re.band))) == null ? void 0 : lm.band;
|
|
9136
9136
|
if (ue === void 0) {
|
|
9137
9137
|
if (ue = z--, Jt.add(ue), Z === "up") {
|
|
9138
9138
|
const Re = /* @__PURE__ */ new Map();
|
|
@@ -9146,67 +9146,67 @@ function qA(e, t) {
|
|
|
9146
9146
|
}
|
|
9147
9147
|
{
|
|
9148
9148
|
const j = (oe) => {
|
|
9149
|
-
const
|
|
9150
|
-
return
|
|
9149
|
+
const ye = F.find((ge) => ge.flow.target === oe.node.id);
|
|
9150
|
+
return ye ? P.get(ye.flow.source) : void 0;
|
|
9151
9151
|
}, X = (oe) => {
|
|
9152
|
-
const
|
|
9153
|
-
if (!
|
|
9154
|
-
const
|
|
9155
|
-
if (!
|
|
9156
|
-
const te =
|
|
9152
|
+
const ye = j(oe);
|
|
9153
|
+
if (!ye || !ye.node.type.endsWith("Gateway") || x(ye) !== x(oe)) return !1;
|
|
9154
|
+
const ge = q.get(x(ye));
|
|
9155
|
+
if (!ge) return !1;
|
|
9156
|
+
const te = ge.get(_(ye)) ?? 0, Z = (ke) => x(ke) === x(ye) ? (ge.get(_(ke)) ?? 0) - te : Number.NaN, re = F.filter((ke) => ke.flow.source === ye.node.id).map((ke) => P.get(ke.flow.target)).filter((ke) => !!ke && (!!ke.node.lane || Te(ke) !== void 0));
|
|
9157
9157
|
if (re.some((ke) => Z(ke) === 0)) return !1;
|
|
9158
|
-
const J = re.filter((ke) => ke.node.lane ===
|
|
9158
|
+
const J = re.filter((ke) => ke.node.lane === ye.node.lane && Z(ke) < 0);
|
|
9159
9159
|
if (!J.length) return !1;
|
|
9160
|
-
const
|
|
9161
|
-
return Ne.length === 1 && Ne[0] === oe && (T.get(oe.node.id) ?? 0) === 1 && !At(
|
|
9160
|
+
const fe = Math.max(...J.map(Z)), Ne = J.filter((ke) => Z(ke) === fe);
|
|
9161
|
+
return Ne.length === 1 && Ne[0] === oe && (T.get(oe.node.id) ?? 0) === 1 && !At(ye.node.id) && !jt.has(ye.node.id);
|
|
9162
9162
|
}, ne = /* @__PURE__ */ new Set();
|
|
9163
9163
|
for (const oe of w) {
|
|
9164
9164
|
if (!oe.node.type.endsWith("Gateway") || At(oe.node.id)) continue;
|
|
9165
|
-
const
|
|
9166
|
-
if (!
|
|
9167
|
-
const
|
|
9165
|
+
const ye = q.get(x(oe));
|
|
9166
|
+
if (!ye) continue;
|
|
9167
|
+
const ge = ye.get(_(oe)) ?? 0;
|
|
9168
9168
|
let te;
|
|
9169
9169
|
for (const Z of F) {
|
|
9170
9170
|
if (Z.flow.source !== oe.node.id) continue;
|
|
9171
9171
|
const re = P.get(Z.flow.target);
|
|
9172
9172
|
if (!re || x(re) !== x(oe) || !re.node.lane && Te(re) === void 0) continue;
|
|
9173
|
-
const J =
|
|
9174
|
-
J <=
|
|
9173
|
+
const J = ye.get(_(re)) ?? 0;
|
|
9174
|
+
J <= ge || (!te || J > te.row ? te = { id: re.node.id, row: J, count: 1 } : J === te.row && te.count++);
|
|
9175
9175
|
}
|
|
9176
9176
|
te && te.count === 1 && (T.get(te.id) ?? 0) === 1 && ne.add(te.id);
|
|
9177
9177
|
}
|
|
9178
|
-
const ce = /* @__PURE__ */ new Set(), ae = [...w].sort((oe,
|
|
9178
|
+
const ce = /* @__PURE__ */ new Set(), ae = [...w].sort((oe, ye) => Number(ne.has(oe.node.id)) - Number(ne.has(ye.node.id)));
|
|
9179
9179
|
for (const oe of ae) {
|
|
9180
|
-
const
|
|
9181
|
-
if (!
|
|
9180
|
+
const ye = x(oe), ge = q.get(ye);
|
|
9181
|
+
if (!ge) continue;
|
|
9182
9182
|
const te = oe.node.id, Z = v.filter((xt) => xt.flow.target === te);
|
|
9183
9183
|
if (Z.length !== 1 || !(T.get(te) ?? 0) || !oe.node.lane && Te(oe) === void 0 || _t.has(te) || En.has(te)) continue;
|
|
9184
9184
|
const re = (pm = P.get(Z[0].flow.source)) == null ? void 0 : pm.node.participant;
|
|
9185
9185
|
if (!re || re === oe.node.participant) continue;
|
|
9186
|
-
const J = O(oe.node.participant),
|
|
9187
|
-
if (J === void 0 ||
|
|
9188
|
-
const Ne =
|
|
9186
|
+
const J = O(oe.node.participant), fe = O(re);
|
|
9187
|
+
if (J === void 0 || fe === void 0 || J === fe) continue;
|
|
9188
|
+
const Ne = fe < J, ke = ge.get(0) ?? 0, qe = (ge.get(_(oe)) ?? ke) - ke;
|
|
9189
9189
|
if (qe === 0 || (Ne ? qe < 0 : qe > 0) || X(oe)) continue;
|
|
9190
9190
|
let Ce;
|
|
9191
|
-
for (const [xt, tn] of
|
|
9191
|
+
for (const [xt, tn] of ge) {
|
|
9192
9192
|
if (Jt.has(xt)) continue;
|
|
9193
9193
|
const Gt = tn - ke;
|
|
9194
9194
|
(Ne ? Gt < 0 && (!Ce || Gt < Ce.row) : Gt > 0 && (!Ce || Gt > Ce.row)) && (Ce = { band: xt, row: Gt });
|
|
9195
9195
|
}
|
|
9196
9196
|
if (!Ce) continue;
|
|
9197
|
-
const Me = _(oe), Se = B(oe).filter((xt) => x(xt) ===
|
|
9197
|
+
const Me = _(oe), Se = B(oe).filter((xt) => x(xt) === ye && _(xt) === Me && !_t.has(xt.node.id)), Ae = j(oe), ue = Ae != null && Ae.node.type.endsWith("Gateway") ? `${Ae.node.id}|${ye}|${Ce.band}` : void 0, Re = Ce, Pe = !!ue && ne.has(te) && F.some((xt) => {
|
|
9198
9198
|
if (xt.flow.source !== Ae.node.id || xt.flow.target === te) return !1;
|
|
9199
9199
|
const tn = P.get(xt.flow.target);
|
|
9200
|
-
return !!tn && x(tn) ===
|
|
9200
|
+
return !!tn && x(tn) === ye && !Se.includes(tn) && _(tn) === Re.band;
|
|
9201
9201
|
});
|
|
9202
9202
|
let Be = Ce.band;
|
|
9203
9203
|
if (ue && (ce.has(ue) || Pe)) {
|
|
9204
9204
|
if (Be = z--, Jt.add(Be), Ne) {
|
|
9205
9205
|
const xt = /* @__PURE__ */ new Map();
|
|
9206
|
-
for (const [tn, Gt] of
|
|
9207
|
-
xt.set(Be, 0), q.set(
|
|
9208
|
-
} else
|
|
9209
|
-
(fm = W.get(
|
|
9206
|
+
for (const [tn, Gt] of ge) xt.set(tn, Gt + 1);
|
|
9207
|
+
xt.set(Be, 0), q.set(ye, xt);
|
|
9208
|
+
} else ge.set(Be, Math.max(...ge.values()) + 1);
|
|
9209
|
+
(fm = W.get(ye)) == null || fm.add(Be);
|
|
9210
9210
|
}
|
|
9211
9211
|
ue && ce.add(ue);
|
|
9212
9212
|
for (const xt of Se)
|
|
@@ -9222,14 +9222,14 @@ function qA(e, t) {
|
|
|
9222
9222
|
const N = x ? f(x) : _ ? f(_) : void 0;
|
|
9223
9223
|
if (!N) return !1;
|
|
9224
9224
|
const T = x ? N.y + Math.min(N.height / 2, le) : N.y + U;
|
|
9225
|
-
return Math.abs(T + Nt(x ?? `pool:${_ ?? ""}`, S) *
|
|
9225
|
+
return Math.abs(T + Nt(x ?? `pool:${_ ?? ""}`, S) * me - O) <= me / 2;
|
|
9226
9226
|
}, Io = /* @__PURE__ */ new Map();
|
|
9227
9227
|
for (const [x, _] of W) {
|
|
9228
9228
|
let S = 0;
|
|
9229
9229
|
for (const O of _) S = Math.max(S, Nt(x, O));
|
|
9230
9230
|
Io.set(x, S);
|
|
9231
9231
|
}
|
|
9232
|
-
const Kn = (x) => K +
|
|
9232
|
+
const Kn = (x) => K + me * x, Xn = (x, _, S, O) => {
|
|
9233
9233
|
const N = p().children.filter(
|
|
9234
9234
|
(T) => !("waypoints" in T && T.waypoints) && T.type !== "label" && T.id !== _ && !(O != null && O.has(T.id)) && typeof T.y == "number" && T.y >= x
|
|
9235
9235
|
);
|
|
@@ -9260,7 +9260,7 @@ function qA(e, t) {
|
|
|
9260
9260
|
return;
|
|
9261
9261
|
}
|
|
9262
9262
|
if (!S) return;
|
|
9263
|
-
const O =
|
|
9263
|
+
const O = me * (_ + 1);
|
|
9264
9264
|
if (S.height >= O) return;
|
|
9265
9265
|
const N = O - S.height, T = S.y + S.height;
|
|
9266
9266
|
n.resizeShape(S, { x: S.x, y: S.y, width: S.width, height: O }), Xn(T, S.id, N);
|
|
@@ -9284,7 +9284,7 @@ function qA(e, t) {
|
|
|
9284
9284
|
const O = f(x);
|
|
9285
9285
|
return O ? S - _.height / 2 >= O.y && S + _.height / 2 <= O.y + O.height : !0;
|
|
9286
9286
|
}, U1 = 10, q1 = /(Task|Event|Gateway|CallActivity|SubProcess|Transaction)$/;
|
|
9287
|
-
for (const { pool: x, lanes: _ } of
|
|
9287
|
+
for (const { pool: x, lanes: _ } of de) {
|
|
9288
9288
|
const S = f(x), O = ve(x);
|
|
9289
9289
|
if (!S || O.length < 2) continue;
|
|
9290
9290
|
const N = Kn(0), T = U1, B = new Set(
|
|
@@ -9294,45 +9294,50 @@ function qA(e, t) {
|
|
|
9294
9294
|
), z = [];
|
|
9295
9295
|
for (const J of D) {
|
|
9296
9296
|
z.push([J.y, J.y + J.height]);
|
|
9297
|
-
const
|
|
9298
|
-
|
|
9297
|
+
const fe = J.label;
|
|
9298
|
+
fe && z.push([fe.y, fe.y + fe.height]);
|
|
9299
9299
|
}
|
|
9300
9300
|
for (const J of L) {
|
|
9301
|
-
const
|
|
9302
|
-
|
|
9301
|
+
const fe = "waypoints" in J && J.waypoints ? J.label : void 0;
|
|
9302
|
+
fe && fe.y + fe.height > S.y && fe.y < S.y + S.height && z.push([fe.y, fe.y + fe.height]);
|
|
9303
9303
|
}
|
|
9304
|
-
|
|
9304
|
+
for (const J of p().children) {
|
|
9305
|
+
if (J.type !== "bpmn:TextAnnotation") continue;
|
|
9306
|
+
const fe = J;
|
|
9307
|
+
fe.x < S.x + S.width && fe.x + fe.width > S.x && fe.y < S.y + S.height && fe.y + fe.height > S.y && z.push([fe.y, fe.y + fe.height]);
|
|
9308
|
+
}
|
|
9309
|
+
z.sort((J, fe) => J[0] - fe[0]);
|
|
9305
9310
|
const j = S.y, X = S.y + S.height, ne = [];
|
|
9306
9311
|
let ce = j;
|
|
9307
|
-
for (const [J,
|
|
9308
|
-
J > ce && ne.push([ce, J]), ce = Math.max(ce,
|
|
9309
|
-
const ae = D.filter((J) => q1.test(J.type) && !B.has(J.id)), oe = (J,
|
|
9312
|
+
for (const [J, fe] of z)
|
|
9313
|
+
J > ce && ne.push([ce, J]), ce = Math.max(ce, fe);
|
|
9314
|
+
const ae = D.filter((J) => q1.test(J.type) && !B.has(J.id)), oe = (J, fe) => ae.some((Ne) => Ne.y + Ne.height / 2 >= J && Ne.y + Ne.height / 2 <= fe), ye = (J) => z.some(([fe, Ne]) => fe < J - 0.5 && J + 0.5 < Ne), ge = [];
|
|
9310
9315
|
let te = j;
|
|
9311
|
-
for (const J of O.slice(1).map((
|
|
9312
|
-
const
|
|
9316
|
+
for (const J of O.slice(1).map((fe) => fe.y)) {
|
|
9317
|
+
const fe = te + 2 * T, Ne = !ye(J) && J >= fe && J <= X - 2 * T ? [J] : [];
|
|
9313
9318
|
for (const [qe, Ce] of ne) {
|
|
9314
|
-
const Me = Math.max(qe + T,
|
|
9319
|
+
const Me = Math.max(qe + T, fe), Se = Math.min(Ce - T, X - 2 * T);
|
|
9315
9320
|
Me <= Se && Ne.push(Math.min(Math.max(J, Me), Se));
|
|
9316
9321
|
}
|
|
9317
|
-
Ne.push(Math.max(ce + T,
|
|
9322
|
+
Ne.push(Math.max(ce + T, fe));
|
|
9318
9323
|
let ke;
|
|
9319
9324
|
for (const qe of Ne) {
|
|
9320
9325
|
const Ce = !oe(te, qe) && qe - te < N ? D.filter((Ae) => Ae.y >= qe).length : 0, Me = Math.abs(qe - J), Se = ke ? Math.abs(ke.y - J) : 0;
|
|
9321
9326
|
(!ke || Ce < ke.cost || Ce === ke.cost && (Me < Se || Me === Se && qe > ke.y)) && (ke = { y: qe, cost: Ce });
|
|
9322
9327
|
}
|
|
9323
|
-
|
|
9328
|
+
ge.push(ke.y), te = ke.y;
|
|
9324
9329
|
}
|
|
9325
|
-
const Z =
|
|
9330
|
+
const Z = ge[ge.length - 1] + 2 * T - X;
|
|
9326
9331
|
Z > 0 && (n.resizeShape(S, { x: S.x, y: S.y, width: S.width, height: S.height + Z }), Xn(X, S.id, Z));
|
|
9327
|
-
const re = [j, ...
|
|
9328
|
-
O.forEach((J,
|
|
9329
|
-
const Ne = re[
|
|
9332
|
+
const re = [j, ...ge, S.y + S.height];
|
|
9333
|
+
O.forEach((J, fe) => {
|
|
9334
|
+
const Ne = re[fe], ke = re[fe + 1] - Ne;
|
|
9330
9335
|
(J.y !== Ne || J.height !== ke) && n.resizeShape(J, { x: J.x, y: Ne, width: J.width, height: ke });
|
|
9331
9336
|
});
|
|
9332
9337
|
for (const J of O) {
|
|
9333
9338
|
if (J.height >= N || oe(J.y, J.y + J.height)) continue;
|
|
9334
|
-
const
|
|
9335
|
-
Xn(Ne, S.id,
|
|
9339
|
+
const fe = N - J.height, Ne = S.y + S.height, ke = on(J, N);
|
|
9340
|
+
Xn(Ne, S.id, fe, ke);
|
|
9336
9341
|
}
|
|
9337
9342
|
}
|
|
9338
9343
|
const Tc = m.map((x, _) => ({ op: x, declared: _ }));
|
|
@@ -9351,9 +9356,9 @@ function qA(e, t) {
|
|
|
9351
9356
|
return O > S ? { x: S, width: O - S } : void 0;
|
|
9352
9357
|
})();
|
|
9353
9358
|
for (const { op: x } of Tc) {
|
|
9354
|
-
const _ = x.participant, S = w.filter((oe) => oe.node.participant === _.id).length, O = ((dm = _.lanes) == null ? void 0 : dm.length) ?? 0, N = Math.max(1200, S * 160 + 300), T = (_.lanes ?? []).map((oe) => Kn(Io.get(oe.id) ?? 0)), B = T.reduce((oe,
|
|
9359
|
+
const _ = x.participant, S = w.filter((oe) => oe.node.participant === _.id).length, O = ((dm = _.lanes) == null ? void 0 : dm.length) ?? 0, N = Math.max(1200, S * 160 + 300), T = (_.lanes ?? []).map((oe) => Kn(Io.get(oe.id) ?? 0)), B = T.reduce((oe, ye) => oe + ye, 0);
|
|
9355
9360
|
O && B < 300 && (T[O - 1] += 300 - B);
|
|
9356
|
-
const L = Math.max(300,
|
|
9361
|
+
const L = Math.max(300, me * ((Io.get(`pool:${_.id}`) ?? 0) + 1)), D = _.blackBox || S + O === 0 ? 120 : O ? Math.max(300, B) : L, z = _.blackBox ? Y1 : void 0, j = (z == null ? void 0 : z.x) ?? 100, X = (z == null ? void 0 : z.width) ?? N, ne = o.createShape({
|
|
9357
9362
|
type: "bpmn:Participant",
|
|
9358
9363
|
businessObject: i.create("bpmn:Participant", {
|
|
9359
9364
|
id: _.id,
|
|
@@ -9371,19 +9376,19 @@ function qA(e, t) {
|
|
|
9371
9376
|
}), ce = n.createShape(ne, { x: j + X / 2, y: ts + D / 2 }, p()), ae = _.lanes ?? [];
|
|
9372
9377
|
if (ae.length && n.splitLane(ce, ae.length), ae.length) {
|
|
9373
9378
|
const oe = r.filter(
|
|
9374
|
-
(
|
|
9375
|
-
var
|
|
9376
|
-
return
|
|
9379
|
+
(ye) => {
|
|
9380
|
+
var ge;
|
|
9381
|
+
return ye.type === "bpmn:Lane" && ((ge = g(ye)) == null ? void 0 : ge.id) === _.id;
|
|
9377
9382
|
}
|
|
9378
|
-
).sort((
|
|
9379
|
-
if (oe.forEach((
|
|
9380
|
-
const te = ae[
|
|
9381
|
-
te && n.updateProperties(
|
|
9382
|
-
}), T.some((
|
|
9383
|
-
let
|
|
9384
|
-
oe.forEach((
|
|
9383
|
+
).sort((ye, ge) => ye.y - ge.y);
|
|
9384
|
+
if (oe.forEach((ye, ge) => {
|
|
9385
|
+
const te = ae[ge];
|
|
9386
|
+
te && n.updateProperties(ye, { id: te.id, name: te.name });
|
|
9387
|
+
}), T.some((ye) => ye !== ce.height / O)) {
|
|
9388
|
+
let ye = ce.y;
|
|
9389
|
+
oe.forEach((ge, te) => {
|
|
9385
9390
|
const Z = T[te];
|
|
9386
|
-
n.resizeShape(
|
|
9391
|
+
n.resizeShape(ge, { x: ge.x, y: ye, width: ge.width, height: Z }), ye += Z;
|
|
9387
9392
|
});
|
|
9388
9393
|
}
|
|
9389
9394
|
}
|
|
@@ -9429,27 +9434,27 @@ function qA(e, t) {
|
|
|
9429
9434
|
let N = S ? S.y + 80 : 120;
|
|
9430
9435
|
const T = (Z, re, J) => {
|
|
9431
9436
|
if (Z) {
|
|
9432
|
-
const
|
|
9433
|
-
return
|
|
9437
|
+
const fe = d(Z);
|
|
9438
|
+
return fe.y + Math.min(fe.height / 2, le) + Nt(Z, re ?? 0) * me;
|
|
9434
9439
|
}
|
|
9435
|
-
return re !== void 0 && S ? S.y + U + Nt(`pool:${x}`, re) *
|
|
9440
|
+
return re !== void 0 && S ? S.y + U + Nt(`pool:${x}`, re) * me : J;
|
|
9436
9441
|
}, B = (Z, re, J) => {
|
|
9437
9442
|
if (Z) {
|
|
9438
|
-
const
|
|
9439
|
-
return
|
|
9443
|
+
const fe = d(Z);
|
|
9444
|
+
return fe.y + Math.min(fe.height / 2, le) + re * me;
|
|
9440
9445
|
}
|
|
9441
|
-
return S ? S.y + U + re *
|
|
9442
|
-
}, L = (Z) => Z.participant ? d(Z.participant) : p(), D = (Z, re, J,
|
|
9443
|
-
const Me = J !== void 0 ||
|
|
9446
|
+
return S ? S.y + U + re * me : J;
|
|
9447
|
+
}, L = (Z) => Z.participant ? d(Z.participant) : p(), D = (Z, re, J, fe, Ne, ke, qe, Ce) => {
|
|
9448
|
+
const Me = J !== void 0 || fe !== void 0, Se = (Pe) => {
|
|
9444
9449
|
const Be = () => go(J, Pe, S);
|
|
9445
9450
|
Ce ? Ce(Be) : Be();
|
|
9446
|
-
}, Ae = Nt(J ?? `pool:${x}`,
|
|
9451
|
+
}, Ae = Nt(J ?? `pool:${x}`, fe ?? 0);
|
|
9447
9452
|
if (
|
|
9448
9453
|
// ── B-89. band 를 **줘도** 그것이 상류 행의 슬롯을 가리키면 승계한다 ──
|
|
9449
9454
|
// 🔴 종전엔 `band === undefined` 만 승계했는데, 사람 문서에서는 *"상류와 같은 행"* 을
|
|
9450
9455
|
// 가리키는 band 가 **아예 없다**(격자 밖 92%). ⇒ band 를 주는 것이 승계를 **끄는**
|
|
9451
9456
|
// 부작용을 냈다(표본 65 = 에이전트가 band 3 을 정확히 계산했는데 그 때문에 30px 어긋났다).
|
|
9452
|
-
(
|
|
9457
|
+
(fe === void 0 || fn(J, x, fe, qe ?? Number.NaN)) && qe !== void 0 && Pc(J, re, qe) && !C(Z, re, Ne, qe)
|
|
9453
9458
|
)
|
|
9454
9459
|
return { x: Ne, y: qe };
|
|
9455
9460
|
if (Me)
|
|
@@ -9458,7 +9463,7 @@ function qA(e, t) {
|
|
|
9458
9463
|
if (!C(Z, re, Ne, Be, kg(J, Ae + Pe)))
|
|
9459
9464
|
return Se(Ae + Pe), { x: Ne, y: Be };
|
|
9460
9465
|
}
|
|
9461
|
-
const ue = T(J,
|
|
9466
|
+
const ue = T(J, fe, ke);
|
|
9462
9467
|
Me ? Se(Ae) : Ce ? Ce(() => di(Z, re, re.y + re.height / 2)) : di(Z, re, ue);
|
|
9463
9468
|
let Re = Ne;
|
|
9464
9469
|
for (let Pe = 0; Pe < 64; Pe++) {
|
|
@@ -9468,16 +9473,16 @@ function qA(e, t) {
|
|
|
9468
9473
|
}
|
|
9469
9474
|
return { x: Re, y: ue };
|
|
9470
9475
|
}, z = (Z, re, J) => {
|
|
9471
|
-
const
|
|
9476
|
+
const fe = r.getAll().filter(
|
|
9472
9477
|
(ke) => {
|
|
9473
9478
|
var qe;
|
|
9474
9479
|
return /Association$/.test(ke.type) && (((qe = ke.waypoints) == null ? void 0 : qe.length) ?? 0) >= 2;
|
|
9475
9480
|
}
|
|
9476
9481
|
);
|
|
9477
|
-
if (!
|
|
9482
|
+
if (!fe.length) return J;
|
|
9478
9483
|
const Ne = (ke) => {
|
|
9479
9484
|
const qe = { id: re.id, type: re.type, x: ke - re.width / 2, y: J.y - re.height / 2, width: re.width, height: re.height };
|
|
9480
|
-
return
|
|
9485
|
+
return fe.some(
|
|
9481
9486
|
(Ce) => Ce.waypoints.some((Me, Se) => !!Ce.waypoints[Se + 1] && la(Me, Ce.waypoints[Se + 1], qe) <= Ee)
|
|
9482
9487
|
);
|
|
9483
9488
|
};
|
|
@@ -9494,14 +9499,14 @@ function qA(e, t) {
|
|
|
9494
9499
|
return re.x + re.width + _e;
|
|
9495
9500
|
}, ce = (Z) => {
|
|
9496
9501
|
if (ee(Z) > 0) return;
|
|
9497
|
-
const re = _.flows.filter((
|
|
9502
|
+
const re = _.flows.filter((fe) => fe.flow.source === Z);
|
|
9498
9503
|
if (re.length !== 1) return;
|
|
9499
9504
|
const J = r.get(re[0].flow.target);
|
|
9500
9505
|
return J && typeof J.y == "number" && typeof J.height == "number" ? J.y + J.height / 2 : void 0;
|
|
9501
9506
|
};
|
|
9502
9507
|
for (const Z of _.nodes) {
|
|
9503
9508
|
if (j.has(Z.node.id)) continue;
|
|
9504
|
-
const re = Sp(Z.node, Z.band, Z.afterColumn), J = Te(Z),
|
|
9509
|
+
const re = Sp(Z.node, Z.band, Z.afterColumn), J = Te(Z), fe = Z.node.lane ? `${Z.node.lane}|${J ?? ""}` : J !== void 0 ? `band:${J}` : "", Ne = L(Z.node), ke = X.get(fe) ?? O, qe = ne(Z.afterColumn), Ce = qe === void 0 ? ke : Math.max(ke, qe);
|
|
9505
9510
|
let Me;
|
|
9506
9511
|
const Se = D(
|
|
9507
9512
|
Ne,
|
|
@@ -9517,13 +9522,13 @@ function qA(e, t) {
|
|
|
9517
9522
|
const Ae = Z.node.lane ? d(Z.node.lane) : Ne;
|
|
9518
9523
|
Et.set(Z.node.id, { container: Ae, relCy: Se.y - Ae.y, grow: Me });
|
|
9519
9524
|
}
|
|
9520
|
-
X.set(
|
|
9525
|
+
X.set(fe, Se.x + re.width + _e), !Z.node.lane && J === void 0 && (N += 160);
|
|
9521
9526
|
}
|
|
9522
|
-
const ae = /* @__PURE__ */ new Set(), oe = /* @__PURE__ */ new Map(),
|
|
9527
|
+
const ae = /* @__PURE__ */ new Set(), oe = /* @__PURE__ */ new Map(), ye = /* @__PURE__ */ new Map();
|
|
9523
9528
|
if (x && R.has(`pool:${x}`)) {
|
|
9524
9529
|
const Z = /* @__PURE__ */ new Map();
|
|
9525
9530
|
for (const Ce of _.flows) Z.set(Ce.flow.target, (Z.get(Ce.flow.target) ?? 0) + 1);
|
|
9526
|
-
const re = (Ce) => T(Ce.node.lane, at(Ce), Number.NaN), J = /* @__PURE__ */ new Set(),
|
|
9531
|
+
const re = (Ce) => T(Ce.node.lane, at(Ce), Number.NaN), J = /* @__PURE__ */ new Set(), fe = (Ce) => {
|
|
9527
9532
|
var Ae;
|
|
9528
9533
|
const Me = (Ae = P.get(Ce)) == null ? void 0 : Ae.node.participant;
|
|
9529
9534
|
if (Me) return f(Me);
|
|
@@ -9545,7 +9550,7 @@ function qA(e, t) {
|
|
|
9545
9550
|
let Se = !1, Ae = !1;
|
|
9546
9551
|
for (const ue of v) {
|
|
9547
9552
|
if (!Me.has(ue.flow.source)) continue;
|
|
9548
|
-
const Re =
|
|
9553
|
+
const Re = fe(ue.flow.target);
|
|
9549
9554
|
!Re || Re.id === S.id || (Re.y < S.y ? Se = !0 : Ae = !0);
|
|
9550
9555
|
}
|
|
9551
9556
|
return Se && !Ae ? "up" : Ae && !Se ? "down" : void 0;
|
|
@@ -9584,7 +9589,7 @@ function qA(e, t) {
|
|
|
9584
9589
|
let Se = !1, Ae = !1;
|
|
9585
9590
|
for (const ue of v) {
|
|
9586
9591
|
if (!Me.has(ue.flow.target)) continue;
|
|
9587
|
-
const Re =
|
|
9592
|
+
const Re = fe(ue.flow.source);
|
|
9588
9593
|
!Re || Re.id === S.id || (Re.y < S.y ? Se = !0 : Ae = !0);
|
|
9589
9594
|
}
|
|
9590
9595
|
return Se && !Ae ? "up" : Ae && !Se ? "down" : void 0;
|
|
@@ -9633,21 +9638,21 @@ function qA(e, t) {
|
|
|
9633
9638
|
Me && !J.has(Me) && ae.add(Ce);
|
|
9634
9639
|
}
|
|
9635
9640
|
}
|
|
9636
|
-
const
|
|
9641
|
+
const ge = /* @__PURE__ */ new Set();
|
|
9637
9642
|
let te = 0;
|
|
9638
9643
|
for (; te++ < _.nodes.length + 2; ) {
|
|
9639
9644
|
for (let J = 0; J < _.nodes.length + _.flows.length + 2; J++) {
|
|
9640
|
-
let
|
|
9645
|
+
let fe = !1;
|
|
9641
9646
|
for (const Ne of _.flows) {
|
|
9642
9647
|
const ke = Ne.flow;
|
|
9643
|
-
if (
|
|
9648
|
+
if (ge.has(ke.id)) continue;
|
|
9644
9649
|
const qe = f(ke.source);
|
|
9645
9650
|
if (!qe) continue;
|
|
9646
9651
|
const Ce = f(ke.target), Me = P.get(ke.target);
|
|
9647
9652
|
if (!Ce && Me) {
|
|
9648
9653
|
const Se = Sp(Me.node, Me.band), Ae = at(Me);
|
|
9649
9654
|
if (Me.node.lane || Ae !== void 0) {
|
|
9650
|
-
const ue = L(Me.node), Re = qe, Pe = Re.x + (
|
|
9655
|
+
const ue = L(Me.node), Re = qe, Pe = Re.x + (ye.get(ke.source) ?? 0) + Re.width + _e, Be = oe.get(ke.target), xt = D(
|
|
9651
9656
|
ue,
|
|
9652
9657
|
Se,
|
|
9653
9658
|
Be ? Be.lane : Me.node.lane,
|
|
@@ -9658,7 +9663,7 @@ function qA(e, t) {
|
|
|
9658
9663
|
// 합류(유입 ≥ 2)는 물려받을 행이 유일하지 않다(위 `inheritsRowFrom` 주석).
|
|
9659
9664
|
Be || !ei(ke.target) ? void 0 : Re.y + Re.height / 2
|
|
9660
9665
|
), tn = P.has(ke.source) ? xt : z(ue, Se, xt), Gt = n.createShape(Se, tn, ue);
|
|
9661
|
-
ae.has(ke.target) &&
|
|
9666
|
+
ae.has(ke.target) && ye.set(ke.target, Pe - (Gt.x + Gt.width / 2)), n.connect(qe, Gt, { type: "bpmn:SequenceFlow", businessObject: kc(ke) });
|
|
9662
9667
|
} else
|
|
9663
9668
|
s.append(qe, Se, {
|
|
9664
9669
|
connection: { type: "bpmn:SequenceFlow", businessObject: kc(ke) }
|
|
@@ -9667,16 +9672,16 @@ function qA(e, t) {
|
|
|
9667
9672
|
n.connect(qe, Ce, { type: "bpmn:SequenceFlow", businessObject: kc(ke) });
|
|
9668
9673
|
else
|
|
9669
9674
|
continue;
|
|
9670
|
-
|
|
9675
|
+
ge.add(ke.id), fe = !0;
|
|
9671
9676
|
}
|
|
9672
|
-
if (!
|
|
9677
|
+
if (!fe) break;
|
|
9673
9678
|
}
|
|
9674
9679
|
const Z = _.nodes.filter((J) => !f(J.node.id));
|
|
9675
9680
|
if (!Z.length) break;
|
|
9676
9681
|
const re = Z[0];
|
|
9677
9682
|
{
|
|
9678
|
-
const J = Sp(re.node, re.band),
|
|
9679
|
-
n.createShape(J, D(
|
|
9683
|
+
const J = Sp(re.node, re.band), fe = L(re.node), Ne = Te(re);
|
|
9684
|
+
n.createShape(J, D(fe, J, re.node.lane, Ne, O, N), fe), !re.node.lane && Ne === void 0 && (N += 160);
|
|
9680
9685
|
}
|
|
9681
9686
|
}
|
|
9682
9687
|
}
|
|
@@ -9710,14 +9715,14 @@ function qA(e, t) {
|
|
|
9710
9715
|
if (!B) continue;
|
|
9711
9716
|
const L = T.source !== void 0 ? f(T.source) : B.source, D = T.target !== void 0 ? f(T.target) : B.target;
|
|
9712
9717
|
if (!L || !D || L.id === D.id || P.has(L.id) || P.has(D.id) || !x(L.type) || !_(D.type) || L.parent !== D.parent || S(D.incoming).some((te) => te.id !== B.id) || S(D.outgoing).some((te) => te.id !== B.id) || O.some((te) => te !== T && (te.target === D.id || te.source === D.id)) || D.x >= L.x + L.width) continue;
|
|
9713
|
-
const z = L.parent, j = g(L), X = L.x + L.width + _e, ne = L.y + L.height / 2, ce = D.y + D.height / 2, ae = N(j, L) === N(j, D), oe = /* @__PURE__ */ new Set([D.id]),
|
|
9714
|
-
if (
|
|
9715
|
-
if (n.moveElements([D], { x: X - (D.x + D.width / 2), y:
|
|
9718
|
+
const z = L.parent, j = g(L), X = L.x + L.width + _e, ne = L.y + L.height / 2, ce = D.y + D.height / 2, ae = N(j, L) === N(j, D), oe = /* @__PURE__ */ new Set([D.id]), ye = [ae ? ne : ce, ce].find((te) => !C(z, D, X, te, oe));
|
|
9719
|
+
if (ye === void 0) continue;
|
|
9720
|
+
if (n.moveElements([D], { x: X - (D.x + D.width / 2), y: ye - ce }), j) {
|
|
9716
9721
|
const te = D.x + D.width + $f - (j.x + j.width);
|
|
9717
9722
|
te > 0 && iu(n, j, j.width + te);
|
|
9718
9723
|
}
|
|
9719
|
-
const
|
|
9720
|
-
n.reconnect(B, L, D, [
|
|
9724
|
+
const ge = (te) => ({ x: te.x + te.width / 2, y: te.y + te.height / 2 });
|
|
9725
|
+
n.reconnect(B, L, D, [ge(L), ge(D)]), Math.abs(ge(L).y - ge(D).y) > 1 && n.layoutConnection(B, { waypoints: [] }), Lg.add(T.id);
|
|
9721
9726
|
}
|
|
9722
9727
|
}
|
|
9723
9728
|
const No = 40, Z1 = 10, Oc = (x) => {
|
|
@@ -9743,8 +9748,8 @@ function qA(e, t) {
|
|
|
9743
9748
|
const B = new Set(x.map((te) => te.id)), L = Math.min(...x.map((te) => te.x)) + _ - vi, D = Math.max(...x.map((te) => te.x + te.width)) + _ + Ig + vi, z = Math.min(...x.map((te) => te.y + Math.min(0, ...S))) - vi, j = Math.max(...x.map((te) => te.y + te.height + Math.max(0, ...S))) + vi, X = r.getAll().filter((te) => {
|
|
9744
9749
|
if (te.type !== "bpmn:SequenceFlow" && te.type !== "bpmn:MessageFlow") return !1;
|
|
9745
9750
|
const Z = te;
|
|
9746
|
-
return is.has(Z.id) || !Z.waypoints || Z.waypoints.length < 2 || [Z.source, Z.target].some((J) => !J || B.has(J.id) || J.x >= O) ? !1 : Z.waypoints.some((J,
|
|
9747
|
-
const Ne = Z.waypoints[
|
|
9751
|
+
return is.has(Z.id) || !Z.waypoints || Z.waypoints.length < 2 || [Z.source, Z.target].some((J) => !J || B.has(J.id) || J.x >= O) ? !1 : Z.waypoints.some((J, fe) => {
|
|
9752
|
+
const Ne = Z.waypoints[fe + 1];
|
|
9748
9753
|
return !!Ne && Math.max(J.x, Ne.x) >= L && Math.min(J.x, Ne.x) <= D && Math.max(J.y, Ne.y) >= z && Math.min(J.y, Ne.y) <= j;
|
|
9749
9754
|
});
|
|
9750
9755
|
});
|
|
@@ -9753,10 +9758,10 @@ function qA(e, t) {
|
|
|
9753
9758
|
const Z = /* @__PURE__ */ new Map();
|
|
9754
9759
|
for (const re of x)
|
|
9755
9760
|
for (const J of S) {
|
|
9756
|
-
const
|
|
9761
|
+
const fe = { id: re.id, type: re.type, x: re.x + _ + te, y: re.y + J, width: re.width, height: re.height };
|
|
9757
9762
|
for (const Ne of X) {
|
|
9758
9763
|
let ke = 1 / 0;
|
|
9759
|
-
for (let Ce = 0; Ce + 1 < Ne.waypoints.length; Ce++) ke = Math.min(ke, la(Ne.waypoints[Ce], Ne.waypoints[Ce + 1],
|
|
9764
|
+
for (let Ce = 0; Ce + 1 < Ne.waypoints.length; Ce++) ke = Math.min(ke, la(Ne.waypoints[Ce], Ne.waypoints[Ce + 1], fe));
|
|
9760
9765
|
const qe = `${Ne.id}|${re.id}`;
|
|
9761
9766
|
Z.set(qe, Math.min(Z.get(qe) ?? 1 / 0, ke));
|
|
9762
9767
|
}
|
|
@@ -9773,13 +9778,13 @@ function qA(e, t) {
|
|
|
9773
9778
|
}
|
|
9774
9779
|
}
|
|
9775
9780
|
if (!ae) return 0;
|
|
9776
|
-
const oe = Math.min(...x.map((te) => te.x)) + _ + ae,
|
|
9781
|
+
const oe = Math.min(...x.map((te) => te.x)) + _ + ae, ye = new Set(ce.map((te) => te.slice(0, te.indexOf("|"))));
|
|
9777
9782
|
return X.some(
|
|
9778
|
-
(te) => te.type === "bpmn:SequenceFlow" &&
|
|
9783
|
+
(te) => te.type === "bpmn:SequenceFlow" && ye.has(te.id) && te.waypoints.some((Z, re) => {
|
|
9779
9784
|
const J = te.waypoints[re + 1];
|
|
9780
9785
|
if (!J || Math.min(Z.y, J.y) > T || Math.max(Z.y, J.y) < T || Z.y === J.y) return !1;
|
|
9781
|
-
const
|
|
9782
|
-
return
|
|
9786
|
+
const fe = Z.x + (T - Z.y) * (J.x - Z.x) / (J.y - Z.y);
|
|
9787
|
+
return fe > N && fe < oe;
|
|
9783
9788
|
})
|
|
9784
9789
|
) ? 0 : ae;
|
|
9785
9790
|
}, Bo = (x, _ = () => !0) => {
|
|
@@ -9950,14 +9955,14 @@ function qA(e, t) {
|
|
|
9950
9955
|
if (!(ne > 0 && ce.messages > X.messages && ce.lines >= X.lines)) {
|
|
9951
9956
|
na(O, L.width);
|
|
9952
9957
|
for (const { c: ae, wps: oe } of z) {
|
|
9953
|
-
const
|
|
9954
|
-
|
|
9958
|
+
const ye = ae.waypoints ?? [];
|
|
9959
|
+
ye.length === oe.length && ye.every((te, Z) => Math.abs(te.x - oe[Z].x) <= 0.5 && Math.abs(te.y - oe[Z].y) <= 0.5) || n.updateWaypoints(ae, oe.map((te) => ({ x: te.x, y: te.y })));
|
|
9955
9960
|
}
|
|
9956
9961
|
for (let ae = 0; ae < 3; ae++) {
|
|
9957
9962
|
let oe = 0;
|
|
9958
|
-
for (const
|
|
9959
|
-
const
|
|
9960
|
-
Math.abs(
|
|
9963
|
+
for (const ye of j) {
|
|
9964
|
+
const ge = ye.x - ye.label.x, te = ye.y - ye.label.y;
|
|
9965
|
+
Math.abs(ge) <= 0.5 && Math.abs(te) <= 0.5 || (n.moveElements([ye.label], { x: ge, y: te }), oe++);
|
|
9961
9966
|
}
|
|
9962
9967
|
if (!oe) break;
|
|
9963
9968
|
}
|
|
@@ -10098,14 +10103,14 @@ function qA(e, t) {
|
|
|
10098
10103
|
if (!S || !O) continue;
|
|
10099
10104
|
const N = x.source !== void 0 ? f(x.source) : O.source, T = O.target;
|
|
10100
10105
|
if (!N || !T || T.id === S.id) continue;
|
|
10101
|
-
const B = Dg.get(O.id) ?? { waypoints: O.waypoints, label: O.label }, L = B.waypoints && B.waypoints.length >= 3 && Math.abs(B.waypoints[0].x - B.waypoints[1].x) < 1 && Math.abs(B.waypoints[0].y - B.waypoints[1].y) > 1 ? { x: B.waypoints[0].x, y: B.waypoints[0].y } : void 0, D = L ? B.waypoints[1].y : void 0, z = L && B.label ? { x: B.label.x, y: B.label.y } : void 0, j = z && B.label && Math.abs(z.y + B.label.height / 2 - D) <=
|
|
10106
|
+
const B = Dg.get(O.id) ?? { waypoints: O.waypoints, label: O.label }, L = B.waypoints && B.waypoints.length >= 3 && Math.abs(B.waypoints[0].x - B.waypoints[1].x) < 1 && Math.abs(B.waypoints[0].y - B.waypoints[1].y) > 1 ? { x: B.waypoints[0].x, y: B.waypoints[0].y } : void 0, D = L ? B.waypoints[1].y : void 0, z = L && B.label ? { x: B.label.x, y: B.label.y } : void 0, j = z && B.label && Math.abs(z.y + B.label.height / 2 - D) <= me / 5 && z.x + B.label.width > L.x ? z.x + B.label.width + 6 : void 0, X = (N.outgoing ?? []).filter(
|
|
10102
10107
|
(Oe) => Oe.type === "bpmn:SequenceFlow" && Oe.id !== O.id && Oe.target && !is.has(Oe.id)
|
|
10103
10108
|
), ne = new Set(X.map((Oe) => Oe.target.id)), ce = (Oe) => {
|
|
10104
10109
|
const St = { type: "bpmn:Task", x: Oe.x + 2, y: Oe.y + 2, width: Oe.width - 4, height: Oe.height - 4 };
|
|
10105
10110
|
return X.find(
|
|
10106
10111
|
(ht) => (ht.waypoints ?? []).some((Wt, $e) => !!ht.waypoints[$e + 1] && la(Wt, ht.waypoints[$e + 1], St) === 0)
|
|
10107
10112
|
);
|
|
10108
|
-
}, ae = Bo(x.target), oe = new Set(ae.map((Oe) => Oe.id)),
|
|
10113
|
+
}, ae = Bo(x.target), oe = new Set(ae.map((Oe) => Oe.id)), ye = Et.has(x.target) ? { autoResize: !1 } : void 0, ge = Math.min(...ae.map((Oe) => Oe.x)), te = Math.max(...ae.map((Oe) => Oe.x + Oe.width)), Z = N.x + N.width, re = T.x + T.width <= N.x, J = (() => {
|
|
10109
10114
|
if (!re) return;
|
|
10110
10115
|
const Oe = g(S), St = ((Oe == null ? void 0 : Oe.children) ?? []).filter(
|
|
10111
10116
|
(He) => bi(He) && !oe.has(He.id) && He.type !== "bpmn:Group" && He.type !== "bpmn:Participant"
|
|
@@ -10127,10 +10132,10 @@ function qA(e, t) {
|
|
|
10127
10132
|
return [
|
|
10128
10133
|
...D !== void 0 ? [{ cx: Ue, cy: D }] : [],
|
|
10129
10134
|
...Ct ? [{ cx: N.x - No - S.width / 2, cy: tt[0].y }] : [],
|
|
10130
|
-
{ cx: Ue, cy: dt +
|
|
10131
|
-
{ cx: Ue, cy: dt -
|
|
10135
|
+
{ cx: Ue, cy: dt + me },
|
|
10136
|
+
{ cx: Ue, cy: dt - me }
|
|
10132
10137
|
].find((He) => $e(He.cx - (S.x + S.width / 2), He.cy - (S.y + S.height / 2)));
|
|
10133
|
-
})(),
|
|
10138
|
+
})(), fe = re && !J ? Z : T.x, Ne = (() => {
|
|
10134
10139
|
var dt;
|
|
10135
10140
|
if (L || re) return 0;
|
|
10136
10141
|
const Oe = B.label, St = ((dt = O.businessObject) == null ? void 0 : dt.name) ?? "";
|
|
@@ -10143,25 +10148,25 @@ function qA(e, t) {
|
|
|
10143
10148
|
Ne > 0 && u.add(O.id);
|
|
10144
10149
|
const ke = S.y + S.height / 2, qe = J1(
|
|
10145
10150
|
ae,
|
|
10146
|
-
Z + No + Ne -
|
|
10151
|
+
Z + No + Ne - ge,
|
|
10147
10152
|
[0, N.y + N.height / 2 - ke, T.y + T.height / 2 - ke],
|
|
10148
|
-
|
|
10153
|
+
fe,
|
|
10149
10154
|
Z,
|
|
10150
10155
|
N.y + N.height / 2
|
|
10151
10156
|
), Ce = Z + No + Ne + qe, Me = (() => {
|
|
10152
10157
|
if (j === void 0) return 0;
|
|
10153
|
-
const Oe = Z + No, St = N.y + N.height / 2 - S.height / 2, ht = { x: Oe, y: St, width: te -
|
|
10158
|
+
const Oe = Z + No, St = N.y + N.height / 2 - S.height / 2, ht = { x: Oe, y: St, width: te - ge, height: S.height }, Wt = g(N);
|
|
10154
10159
|
return ((Wt == null ? void 0 : Wt.children) ?? []).some(
|
|
10155
10160
|
(Ue) => bi(Ue) && !oe.has(Ue.id) && Ue.id !== N.id && Ue.id !== T.id && Ue.type !== "bpmn:Group" && Ue.type !== "bpmn:Participant" && Ue.x < ht.x + ht.width && Ue.x + Ue.width > ht.x && Ue.y < ht.y + ht.height && Ue.y + Ue.height > ht.y
|
|
10156
10161
|
) || ce(ht) ? Math.max(0, j - Oe) : 0;
|
|
10157
|
-
})(), Se = J ? 0 : te -
|
|
10162
|
+
})(), Se = J ? 0 : te - ge + No * 2 + qe + Me + Ne - (re ? 0 : T.x - Z);
|
|
10158
10163
|
let Ae = [];
|
|
10159
10164
|
if (Se > 0) {
|
|
10160
10165
|
const Oe = g(S), St = (Oe == null ? void 0 : Oe.children) ?? [], ht = (tt) => tt.type === "bpmn:Lane";
|
|
10161
10166
|
Ae = (() => {
|
|
10162
10167
|
const tt = /* @__PURE__ */ new Set();
|
|
10163
10168
|
for (const ze of St)
|
|
10164
|
-
bi(ze) && !oe.has(ze.id) && ze.id !== N.id && ze.x >=
|
|
10169
|
+
bi(ze) && !oe.has(ze.id) && ze.id !== N.id && ze.x >= fe && tt.add(ze.id);
|
|
10165
10170
|
const Ct = [];
|
|
10166
10171
|
for (const ze of St) {
|
|
10167
10172
|
if (ze.type !== "bpmn:DataStoreReference" && ze.type !== "bpmn:DataObjectReference") continue;
|
|
@@ -10171,7 +10176,7 @@ function qA(e, t) {
|
|
|
10171
10176
|
return Ct;
|
|
10172
10177
|
})();
|
|
10173
10178
|
const $e = St.filter(
|
|
10174
|
-
(tt) => !("waypoints" in tt && tt.waypoints) && !ht(tt) && tt.type !== "label" && !oe.has(tt.id) && tt.id !== N.id && tt.x >=
|
|
10179
|
+
(tt) => !("waypoints" in tt && tt.waypoints) && !ht(tt) && tt.type !== "label" && !oe.has(tt.id) && tt.id !== N.id && tt.x >= fe
|
|
10175
10180
|
), Ue = $e.flatMap((tt) => tt.labels ?? []), dt = Oe ? [Oe, ...St.filter((tt) => ht(tt))] : [];
|
|
10176
10181
|
if ($e.length) {
|
|
10177
10182
|
const tt = new Set($e.map((it) => it.id)), Ct = zg(tt), ze = Ct.length ? iS(tt, Ct, Oe) : null, He = (it) => {
|
|
@@ -10193,7 +10198,7 @@ function qA(e, t) {
|
|
|
10193
10198
|
const wt = it.labelTarget;
|
|
10194
10199
|
return it.type === "label" && !!wt && "waypoints" in wt && !!wt.source && !!wt.target && Fi.has(wt.source.id) && Fi.has(wt.target.id);
|
|
10195
10200
|
}), bn = eS();
|
|
10196
|
-
n.createSpace([...$e, ...Ue, ...yt], dt, { x: Se, y: 0 }, "e",
|
|
10201
|
+
n.createSpace([...$e, ...Ue, ...yt], dt, { x: Se, y: 0 }, "e", fe - 1);
|
|
10197
10202
|
const Ut = (it, wt, Lt) => {
|
|
10198
10203
|
const mo = $o(), Bc = Lt ? Gg(Lt) : null, $c = ia(it, Se, !!Lt);
|
|
10199
10204
|
if (!$c) return !1;
|
|
@@ -10261,15 +10266,15 @@ function qA(e, t) {
|
|
|
10261
10266
|
return Pc((St = P.get(Oe.id)) == null ? void 0 : St.node.lane, Oe, Oe.y + Oe.height / 2 + Cn);
|
|
10262
10267
|
}
|
|
10263
10268
|
)
|
|
10264
|
-
), PS = (Oe) => Math.abs(Oe.y + Oe.height / 2 - (S.y + S.height / 2)) <=
|
|
10269
|
+
), PS = (Oe) => Math.abs(Oe.y + Oe.height / 2 - (S.y + S.height / 2)) <= me / 2;
|
|
10265
10270
|
if (Np && dn) {
|
|
10266
|
-
const Oe = Math.abs(Cn) <=
|
|
10271
|
+
const Oe = Math.abs(Cn) <= me / 2 ? ae.filter(($e) => $e.id !== S.id && PS($e)) : [], St = S.y + S.height / 2, Wt = _.band !== void 0 && !fn(_.node.lane, _.node.participant, _.band, St) ? ae.filter(
|
|
10267
10272
|
($e) => {
|
|
10268
10273
|
var Ue, dt;
|
|
10269
|
-
return $e.id !== S.id && !Oe.includes($e) && ((Ue = P.get($e.id)) == null ? void 0 : Ue.band) === _.band && ((dt = P.get($e.id)) == null ? void 0 : dt.node.lane) === _.node.lane && (Math.abs($e.y + $e.height / 2 - St) <=
|
|
10274
|
+
return $e.id !== S.id && !Oe.includes($e) && ((Ue = P.get($e.id)) == null ? void 0 : Ue.band) === _.band && ((dt = P.get($e.id)) == null ? void 0 : dt.node.lane) === _.node.lane && (Math.abs($e.y + $e.height / 2 - St) <= me / 2 || fn(_.node.lane, _.node.participant, _.band, $e.y + $e.height / 2));
|
|
10270
10275
|
}
|
|
10271
10276
|
).map(($e) => ({ t: $e, dy: Vt - ($e.y + $e.height / 2) })).filter(({ dy: $e }) => $e !== 0) : [];
|
|
10272
|
-
if (n.moveElements(ae, { x: Ce -
|
|
10277
|
+
if (n.moveElements(ae, { x: Ce - ge, y: 0 }, void 0, ye), n.moveElements([S], { x: 0, y: Cn }, void 0, ye), Oe.length) {
|
|
10273
10278
|
const $e = () => new Set(pt(We(r)).map((He) => ft(He))), Ue = $e(), dt = r.filter((He) => He.type === "label").map((He) => ({
|
|
10274
10279
|
label: He,
|
|
10275
10280
|
x: He.x,
|
|
@@ -10294,23 +10299,23 @@ function qA(e, t) {
|
|
|
10294
10299
|
n.moveElements(
|
|
10295
10300
|
ae,
|
|
10296
10301
|
{
|
|
10297
|
-
x: Ce -
|
|
10302
|
+
x: Ce - ge,
|
|
10298
10303
|
y: Np ? Cn : 0
|
|
10299
10304
|
},
|
|
10300
10305
|
void 0,
|
|
10301
|
-
|
|
10306
|
+
ye
|
|
10302
10307
|
);
|
|
10303
10308
|
const $i = g(S);
|
|
10304
10309
|
if (!Np && _.node.lane === void 0 && _.band !== void 0 && $i) {
|
|
10305
|
-
const Oe = $i.y + U + Nt(`pool:${_.node.participant ?? ""}`, _.band) *
|
|
10306
|
-
St !== 0 && !C($i, S, S.x + S.width / 2, Oe, oe) && n.moveElements([S], { x: 0, y: St }, void 0,
|
|
10310
|
+
const Oe = $i.y + U + Nt(`pool:${_.node.participant ?? ""}`, _.band) * me, St = Oe - (S.y + S.height / 2);
|
|
10311
|
+
St !== 0 && !C($i, S, S.x + S.width / 2, Oe, oe) && n.moveElements([S], { x: 0, y: St }, void 0, ye);
|
|
10307
10312
|
}
|
|
10308
10313
|
if (J)
|
|
10309
10314
|
n.moveElements(
|
|
10310
10315
|
ae,
|
|
10311
10316
|
{ x: J.cx - (S.x + S.width / 2), y: J.cy - (S.y + S.height / 2) },
|
|
10312
10317
|
void 0,
|
|
10313
|
-
|
|
10318
|
+
ye
|
|
10314
10319
|
);
|
|
10315
10320
|
else if ($i) {
|
|
10316
10321
|
const Oe = ($i.children ?? []).filter(
|
|
@@ -10359,10 +10364,10 @@ function qA(e, t) {
|
|
|
10359
10364
|
x: it.x,
|
|
10360
10365
|
y: it.y
|
|
10361
10366
|
}));
|
|
10362
|
-
n.moveElements(ae, { x: Fi.dx, y: Fi.dy }, void 0,
|
|
10367
|
+
n.moveElements(ae, { x: Fi.dx, y: Fi.dy }, void 0, ye);
|
|
10363
10368
|
const Ar = bn(), Yi = [...Ar].filter((it) => !Ut.has(it)).length, ca = [...Ut].filter((it) => !Ar.has(it)).length;
|
|
10364
10369
|
if (Yi > ca) {
|
|
10365
|
-
n.moveElements(ae, { x: -Fi.dx, y: -Fi.dy }, void 0,
|
|
10370
|
+
n.moveElements(ae, { x: -Fi.dx, y: -Fi.dy }, void 0, ye);
|
|
10366
10371
|
for (const it of ti) {
|
|
10367
10372
|
const wt = it.x - it.label.x, Lt = it.y - it.label.y;
|
|
10368
10373
|
(wt !== 0 || Lt !== 0) && n.moveElements([it.label], { x: wt, y: Lt });
|
|
@@ -10462,22 +10467,22 @@ function qA(e, t) {
|
|
|
10462
10467
|
(z) => L ? z.y + z.height <= T.y + 5 : z.y >= T.y + T.height - 5
|
|
10463
10468
|
);
|
|
10464
10469
|
if (D.length) {
|
|
10465
|
-
const z = [...D.reduce((re, J) => re.set(J.y, (re.get(J.y) ?? 0) + 1), /* @__PURE__ */ new Map())].sort((re, J) => J[1] - re[1] || (L ? J[0] - re[0] : re[0] - J[0]))[0][0], j = Math.min(S.width, zA), X = GA, ne = O.map((re) => re.x + re.width / 2), ce = Math.round(B(ne) - j / 2), ae = Math.max(...ne) + Wp, oe = (re) => ({ x: re, width: Math.max(j, ae - re) }),
|
|
10470
|
+
const z = [...D.reduce((re, J) => re.set(J.y, (re.get(J.y) ?? 0) + 1), /* @__PURE__ */ new Map())].sort((re, J) => J[1] - re[1] || (L ? J[0] - re[0] : re[0] - J[0]))[0][0], j = Math.min(S.width, zA), X = GA, ne = O.map((re) => re.x + re.width / 2), ce = Math.round(B(ne) - j / 2), ae = Math.max(...ne) + Wp, oe = (re) => ({ x: re, width: Math.max(j, ae - re) }), ye = D.filter((re) => Math.min(re.y + re.height, z + X) - Math.max(re.y, z) > 0), ge = (re) => {
|
|
10466
10471
|
const J = oe(re);
|
|
10467
|
-
return
|
|
10472
|
+
return ye.some((fe) => fe.x < J.x + J.width && J.x < fe.x + fe.width);
|
|
10468
10473
|
}, te = (re) => {
|
|
10469
10474
|
const J = oe(re);
|
|
10470
|
-
return ne.filter((
|
|
10475
|
+
return ne.filter((fe) => fe >= J.x + 10 && fe <= J.x + J.width - 10).length;
|
|
10471
10476
|
}, Z = (() => {
|
|
10472
|
-
if (!
|
|
10477
|
+
if (!ge(ce)) return ce;
|
|
10473
10478
|
const re = te(ce);
|
|
10474
|
-
return
|
|
10479
|
+
return ye.flatMap((J) => [J.x + J.width + hy, J.x - hy - j]).map((J) => Math.round(J)).filter((J) => !ge(J) && te(J) >= re).sort((J, fe) => Math.abs(J - ce) - Math.abs(fe - ce))[0] ?? ce;
|
|
10475
10480
|
})();
|
|
10476
10481
|
if (Z !== S.x || z !== S.y || j !== S.width || X !== S.height) {
|
|
10477
|
-
const re = () => new Set(pt(We(r)).map((Ce) => ft(Ce))), J = re(),
|
|
10482
|
+
const re = () => new Set(pt(We(r)).map((Ce) => ft(Ce))), J = re(), fe = { x: S.x, y: S.y, width: S.width, height: S.height };
|
|
10478
10483
|
n.resizeShape(S, { x: Z, y: z, width: j, height: X });
|
|
10479
10484
|
const Ne = re(), ke = [...Ne].filter((Ce) => !J.has(Ce)).length, qe = [...J].filter((Ce) => !Ne.has(Ce)).length;
|
|
10480
|
-
ke > qe && n.resizeShape(S,
|
|
10485
|
+
ke > qe && n.resizeShape(S, fe);
|
|
10481
10486
|
}
|
|
10482
10487
|
}
|
|
10483
10488
|
}
|
|
@@ -10531,16 +10536,16 @@ function qA(e, t) {
|
|
|
10531
10536
|
const ce = g(j);
|
|
10532
10537
|
if (!ce || L.has(ce.id) || (ce.children ?? []).some((te) => te.type === "bpmn:Lane")) continue;
|
|
10533
10538
|
const ae = (gm = z.get("T")) != null && gm.length ? (mm = z.get("B")) != null && mm.length ? void 0 : "B" : "T";
|
|
10534
|
-
if (!ae || (ae === "T" ? j.y - ce.y : ce.y + ce.height - (j.y + j.height)) >=
|
|
10535
|
-
const
|
|
10539
|
+
if (!ae || (ae === "T" ? j.y - ce.y : ce.y + ce.height - (j.y + j.height)) >= me) continue;
|
|
10540
|
+
const ye = (ce.children ?? []).filter(
|
|
10536
10541
|
(te) => !("waypoints" in te && te.waypoints) && te.type !== "label" && typeof te.x == "number"
|
|
10537
|
-
),
|
|
10542
|
+
), ge = ce.y + ce.height;
|
|
10538
10543
|
n.resizeShape(ce, {
|
|
10539
10544
|
x: ce.x,
|
|
10540
10545
|
y: ce.y,
|
|
10541
10546
|
width: ce.width,
|
|
10542
|
-
height: ce.height +
|
|
10543
|
-
}), Xn(
|
|
10547
|
+
height: ce.height + me
|
|
10548
|
+
}), Xn(ge, ce.id, me), ae === "T" && ye.length && n.moveElements(ye, { x: 0, y: me }), L.add(ce.id);
|
|
10544
10549
|
}
|
|
10545
10550
|
}
|
|
10546
10551
|
const Pp = 20, Ug = 4, aS = 3, sS = 2, cS = 2, lS = [10, 30, 80], Er = () => {
|
|
@@ -10696,7 +10701,7 @@ function qA(e, t) {
|
|
|
10696
10701
|
if (S === void 0) continue;
|
|
10697
10702
|
const O = f(x), N = O ? g(O) : void 0;
|
|
10698
10703
|
if (!O || !N) continue;
|
|
10699
|
-
const T = N.y + U + Nt(`pool:${_.node.participant ?? ""}`, S) *
|
|
10704
|
+
const T = N.y + U + Nt(`pool:${_.node.participant ?? ""}`, S) * me, B = T - (O.y + O.height / 2);
|
|
10700
10705
|
B !== 0 && !C(N, O, O.x + O.width / 2, T) && n.moveElements([O], { x: 0, y: B });
|
|
10701
10706
|
}
|
|
10702
10707
|
const Lc = () => {
|
|
@@ -10781,11 +10786,11 @@ function qA(e, t) {
|
|
|
10781
10786
|
)
|
|
10782
10787
|
);
|
|
10783
10788
|
}
|
|
10784
|
-
const ae = L.width + _e, oe = Fo(x.id),
|
|
10789
|
+
const ae = L.width + _e, oe = Fo(x.id), ye = oa(x.id), ge = () => Fo(x.id) < oe && oa(x.id) >= ye;
|
|
10785
10790
|
let te = !1;
|
|
10786
10791
|
for (const Z of ce) {
|
|
10787
10792
|
for (let re = 1; re <= Ug; re++)
|
|
10788
|
-
if (jo(Z, ae * re,
|
|
10793
|
+
if (jo(Z, ae * re, ge)) {
|
|
10789
10794
|
te = !0;
|
|
10790
10795
|
break;
|
|
10791
10796
|
}
|
|
@@ -10829,12 +10834,12 @@ function qA(e, t) {
|
|
|
10829
10834
|
const z = (wm = P.get(x.flow.source)) == null ? void 0 : wm.node.participant, j = (_m = P.get(x.flow.target)) == null ? void 0 : _m.node.participant;
|
|
10830
10835
|
if (!z || !j) continue;
|
|
10831
10836
|
const X = /* @__PURE__ */ new Map();
|
|
10832
|
-
for (const [oe,
|
|
10837
|
+
for (const [oe, ye, ge] of [
|
|
10833
10838
|
[x.flow.source, S, z],
|
|
10834
10839
|
[x.flow.target, O, j]
|
|
10835
10840
|
]) {
|
|
10836
|
-
const te = X.get(
|
|
10837
|
-
X.set(
|
|
10841
|
+
const te = X.get(ge) ?? [], Z = Bo(oe, (re) => re.x >= ye.x).filter((re) => !te.some((J) => J.id === re.id));
|
|
10842
|
+
X.set(ge, [...te, ...Z]);
|
|
10838
10843
|
}
|
|
10839
10844
|
const ne = new Set([...X.values()].flat().map((oe) => oe.id)), ce = Dc(
|
|
10840
10845
|
X,
|
|
@@ -10844,13 +10849,13 @@ function qA(e, t) {
|
|
|
10844
10849
|
() => !1
|
|
10845
10850
|
), ae = Math.max(...D.map((oe) => oe.x + oe.width));
|
|
10846
10851
|
for (const oe of lS) {
|
|
10847
|
-
const
|
|
10848
|
-
if (
|
|
10849
|
-
const
|
|
10852
|
+
const ye = ae + oe - N;
|
|
10853
|
+
if (ye <= 0) continue;
|
|
10854
|
+
const ge = Er().bad, te = Ic();
|
|
10850
10855
|
let Z = [], re = !0;
|
|
10851
|
-
const J = () => !nm(x.flow.id) || re && (Z = mS(ce, x.flow, te), Z.length) ? !1 : !gS(
|
|
10852
|
-
if (jo(ce,
|
|
10853
|
-
if (Z.length && (yS(ce,
|
|
10856
|
+
const J = () => !nm(x.flow.id) || re && (Z = mS(ce, x.flow, te), Z.length) ? !1 : !gS(ge, te);
|
|
10857
|
+
if (jo(ce, ye, J, ra)) break;
|
|
10858
|
+
if (Z.length && (yS(ce, ye, x.flow, te, Z) || (re = !1, jo(ce, ye, J, ra))))
|
|
10854
10859
|
break;
|
|
10855
10860
|
}
|
|
10856
10861
|
}
|
|
@@ -10895,21 +10900,21 @@ function qA(e, t) {
|
|
|
10895
10900
|
"",
|
|
10896
10901
|
() => !1,
|
|
10897
10902
|
() => !1
|
|
10898
|
-
), oe = ae.some((Z) => Z.pool !== j) || ae.reduce((Z, re) => Z + re.subtree.length, 0) > X.length,
|
|
10899
|
-
if (!
|
|
10903
|
+
), oe = ae.some((Z) => Z.pool !== j) || ae.reduce((Z, re) => Z + re.subtree.length, 0) > X.length, ye = O(), ge = qg(X, j, ne);
|
|
10904
|
+
if (!ge) continue;
|
|
10900
10905
|
const te = O();
|
|
10901
|
-
if (oe && !ce(
|
|
10902
|
-
|
|
10906
|
+
if (oe && !ce(ye, te)) {
|
|
10907
|
+
ge();
|
|
10903
10908
|
const Z = ia(ae, ne);
|
|
10904
10909
|
if (Z) {
|
|
10905
10910
|
const re = O();
|
|
10906
|
-
if (!ce(
|
|
10911
|
+
if (!ce(ye, re) && re.bad <= te.bad && re.crossings <= te.crossings) continue;
|
|
10907
10912
|
Z();
|
|
10908
10913
|
}
|
|
10909
10914
|
qg(X, j, ne);
|
|
10910
10915
|
continue;
|
|
10911
10916
|
}
|
|
10912
|
-
ce(
|
|
10917
|
+
ce(ye, te) && ge();
|
|
10913
10918
|
}
|
|
10914
10919
|
}
|
|
10915
10920
|
Wg(!0);
|
|
@@ -11028,32 +11033,32 @@ function qA(e, t) {
|
|
|
11028
11033
|
}
|
|
11029
11034
|
const O = r.filter((N) => N.type === "bpmn:Group");
|
|
11030
11035
|
for (const N of O) {
|
|
11031
|
-
const B = (((Am = N.businessObject.extensionElements) == null ? void 0 : Am.values) ?? []).find((
|
|
11036
|
+
const B = (((Am = N.businessObject.extensionElements) == null ? void 0 : Am.values) ?? []).find((ge) => ge.$type === "bwl:Members"), L = ((B == null ? void 0 : B.refs) ?? "").split(" ").filter(Boolean);
|
|
11032
11037
|
if (!L.length) continue;
|
|
11033
11038
|
const D = new Set(L), z = [...L];
|
|
11034
11039
|
for (; z.length; ) {
|
|
11035
|
-
const
|
|
11036
|
-
for (const te of _.get(
|
|
11040
|
+
const ge = z.shift();
|
|
11041
|
+
for (const te of _.get(ge) ?? []) D.has(te) || (D.add(te), z.push(te));
|
|
11037
11042
|
}
|
|
11038
|
-
const j = N.x, X = N.x + N.width, ne = N.y, ce = N.y + N.height, ae = (
|
|
11043
|
+
const j = N.x, X = N.x + N.width, ne = N.y, ce = N.y + N.height, ae = (ge) => F.filter((te) => te.flow.target === ge).length, oe = (ge) => {
|
|
11039
11044
|
var Z;
|
|
11040
|
-
const te = ((Z = f(
|
|
11041
|
-
if (te === "bpmn:StartEvent" && ae(
|
|
11045
|
+
const te = ((Z = f(ge)) == null ? void 0 : Z.type) ?? "";
|
|
11046
|
+
if (te === "bpmn:StartEvent" && ae(ge) === 0) return !1;
|
|
11042
11047
|
if (te.endsWith("Gateway")) {
|
|
11043
|
-
const re = F.filter((J) => J.flow.target ===
|
|
11048
|
+
const re = F.filter((J) => J.flow.target === ge).map((J) => J.flow.source);
|
|
11044
11049
|
if (re.length && re.every((J) => {
|
|
11045
|
-
var
|
|
11046
|
-
return ((
|
|
11050
|
+
var fe;
|
|
11051
|
+
return ((fe = f(J)) == null ? void 0 : fe.type) === "bpmn:StartEvent" && ae(J) === 0;
|
|
11047
11052
|
}))
|
|
11048
11053
|
return !1;
|
|
11049
11054
|
}
|
|
11050
11055
|
return !0;
|
|
11051
|
-
},
|
|
11052
|
-
(
|
|
11056
|
+
}, ye = r.filter((ge) => bi(ge)).filter(
|
|
11057
|
+
(ge) => ge.type !== "bpmn:Group" && ge.type !== "bpmn:Participant" && ge.type !== "bpmn:TextAnnotation" && !D.has(ge.id) && Sr(ge.id) && oe(ge.id) && ge.x < X && ge.x + ge.width > j && ge.y < ce && ge.y + ge.height > ne
|
|
11053
11058
|
);
|
|
11054
|
-
if (
|
|
11055
|
-
for (const
|
|
11056
|
-
const te =
|
|
11059
|
+
if (ye.length)
|
|
11060
|
+
for (const ge of [-1, 1]) {
|
|
11061
|
+
const te = ye.filter((Me) => (Me.x + Me.width - j <= X - Me.x ? -1 : 1) === ge);
|
|
11057
11062
|
if (!te.length) continue;
|
|
11058
11063
|
const Z = [];
|
|
11059
11064
|
for (const Me of te) {
|
|
@@ -11062,28 +11067,28 @@ function qA(e, t) {
|
|
|
11062
11067
|
}
|
|
11063
11068
|
const re = /* @__PURE__ */ new Map();
|
|
11064
11069
|
for (const Me of Z) {
|
|
11065
|
-
let Se =
|
|
11066
|
-
for (const Ae of [...Me].sort((ue, Re) =>
|
|
11067
|
-
const ue =
|
|
11068
|
-
Se =
|
|
11070
|
+
let Se = ge < 0 ? j - Rr : X + Rr;
|
|
11071
|
+
for (const Ae of [...Me].sort((ue, Re) => ge < 0 ? Re.x - ue.x : ue.x - Re.x)) {
|
|
11072
|
+
const ue = ge < 0 ? Math.min(Ae.x, Se - Ae.width) : Math.max(Ae.x, Se);
|
|
11073
|
+
Se = ge < 0 ? ue - xi : ue + Ae.width + xi, ue !== Ae.x && Math.sign(ue - Ae.x) === ge && re.set(Ae.id, ue - Ae.x);
|
|
11069
11074
|
}
|
|
11070
11075
|
}
|
|
11071
|
-
const J = /* @__PURE__ */ new Map(),
|
|
11076
|
+
const J = /* @__PURE__ */ new Map(), fe = (Me) => J.get(Me) === Me || !J.get(Me) ? Me : fe(J.get(Me));
|
|
11072
11077
|
for (const Me of te) J.set(Me.id, Me.id);
|
|
11073
11078
|
for (const Me of v) {
|
|
11074
11079
|
const Se = re.has(Me.flow.source) ? Me.flow.source : void 0, Ae = re.has(Me.flow.target) ? Me.flow.target : void 0;
|
|
11075
11080
|
if (!Se || !Ae) continue;
|
|
11076
11081
|
const ue = f(Me.flow.id);
|
|
11077
|
-
((Pm = ue == null ? void 0 : ue.waypoints) == null ? void 0 : Pm.length) === 2 && J.set(
|
|
11082
|
+
((Pm = ue == null ? void 0 : ue.waypoints) == null ? void 0 : Pm.length) === 2 && J.set(fe(Se), fe(Ae));
|
|
11078
11083
|
}
|
|
11079
11084
|
const Ne = /* @__PURE__ */ new Map();
|
|
11080
11085
|
for (const Me of te) {
|
|
11081
11086
|
if (!re.has(Me.id)) continue;
|
|
11082
|
-
const Se =
|
|
11087
|
+
const Se = fe(Me.id);
|
|
11083
11088
|
Ne.set(Se, [...Ne.get(Se) ?? [], Me]);
|
|
11084
11089
|
}
|
|
11085
11090
|
const ke = [...Ne.values()].sort(
|
|
11086
|
-
(Me, Se) =>
|
|
11091
|
+
(Me, Se) => ge < 0 ? Math.min(...Me.map((Ae) => Ae.x)) - Math.min(...Se.map((Ae) => Ae.x)) : Math.max(...Se.map((Ae) => Ae.x)) - Math.max(...Me.map((Ae) => Ae.x))
|
|
11087
11092
|
), qe = [];
|
|
11088
11093
|
let Ce = !0;
|
|
11089
11094
|
for (const Me of ke) {
|
|
@@ -11153,16 +11158,16 @@ function qA(e, t) {
|
|
|
11153
11158
|
const ue = ae.shift();
|
|
11154
11159
|
for (const Re of O.get(ue) ?? []) ce.has(Re) || (ce.add(Re), ae.push(Re));
|
|
11155
11160
|
}
|
|
11156
|
-
const oe = L.x,
|
|
11161
|
+
const oe = L.x, ye = L.x + L.width, ge = L.y, te = L.y + L.height, Z = (ue) => {
|
|
11157
11162
|
const Re = _.get(ue.id), Pe = { x: ue.x, y: ue.y, width: ue.width, height: ue.height };
|
|
11158
11163
|
return Re ? [Pe, { x: Re.x, y: Re.y, width: Re.width, height: Re.height }] : [Pe];
|
|
11159
|
-
}, re = X.flatMap(Z), J = Math.min(...re.map((ue) => ue.x)),
|
|
11160
|
-
(ue) => ue.type !== "bpmn:Group" && ue.type !== "bpmn:Participant" && ue.type !== "bpmn:TextAnnotation" && !Ce.has(ue.id) && (!ce.has(ue.id) || !Me(ue)) && B(ue.id) && ue.x <
|
|
11164
|
+
}, re = X.flatMap(Z), J = Math.min(...re.map((ue) => ue.x)), fe = Math.max(...re.map((ue) => ue.x + ue.width)), Ne = Math.min(...re.map((ue) => ue.y)), ke = Math.max(...re.map((ue) => ue.y + ue.height)), qe = { L: J - oe, R: ye - fe, T: Ne - ge, B: te - ke }, Ce = new Set(j), Me = (ue) => ue.x >= oe && ue.x + ue.width <= ye && ue.y >= ge && ue.y + ue.height <= te, Se = r.filter((ue) => bi(ue)).filter(
|
|
11165
|
+
(ue) => ue.type !== "bpmn:Group" && ue.type !== "bpmn:Participant" && ue.type !== "bpmn:TextAnnotation" && !Ce.has(ue.id) && (!ce.has(ue.id) || !Me(ue)) && B(ue.id) && ue.x < ye && ue.x + ue.width > oe && ue.y < te && ue.y + ue.height > ge
|
|
11161
11166
|
);
|
|
11162
11167
|
if (!Se.length) continue;
|
|
11163
11168
|
const Ae = { L: 0, R: 0, T: 0, B: 0 };
|
|
11164
11169
|
for (const ue of Se) {
|
|
11165
|
-
const Re = Z(ue), Pe = Math.min(...Re.map((dn) => dn.x)), Be = Math.max(...Re.map((dn) => dn.x + dn.width)), xt = Math.min(...Re.map((dn) => dn.y)), tn = Math.max(...Re.map((dn) => dn.y + dn.height)), Gt = { L: Be - oe, R:
|
|
11170
|
+
const Re = Z(ue), Pe = Math.min(...Re.map((dn) => dn.x)), Be = Math.max(...Re.map((dn) => dn.x + dn.width)), xt = Math.min(...Re.map((dn) => dn.y)), tn = Math.max(...Re.map((dn) => dn.y + dn.height)), Gt = { L: Be - oe, R: ye - Pe, T: tn - ge, B: te - xt }, Vt = ["L", "R", "T", "B"].filter((dn) => Gt[dn] <= qe[dn] + 1e-3);
|
|
11166
11171
|
if (!Vt.length) continue;
|
|
11167
11172
|
const Cn = Vt.reduce((dn, Nc) => Gt[Nc] < Gt[dn] ? Nc : dn, Vt[0]);
|
|
11168
11173
|
Ae[Cn] = Math.max(Ae[Cn], Math.min(Gt[Cn] + 10, qe[Cn]));
|
|
@@ -11249,9 +11254,9 @@ function qA(e, t) {
|
|
|
11249
11254
|
if (!C(N, x, T, O, B)) return O;
|
|
11250
11255
|
const L = _ ? _.y + Math.min(_.height / 2, le) : S ? S.y + U : void 0;
|
|
11251
11256
|
if (L === void 0) return O;
|
|
11252
|
-
const D = Math.floor((O - L) /
|
|
11257
|
+
const D = Math.floor((O - L) / me + 1e-6);
|
|
11253
11258
|
for (let z = 1; z <= 3; z++) {
|
|
11254
|
-
const j = D + z, X = L + j *
|
|
11259
|
+
const j = D + z, X = L + j * me, ne = kg(_ == null ? void 0 : _.id, j);
|
|
11255
11260
|
if (!C(N, x, T, X, ne ? /* @__PURE__ */ new Set([...B, ...ne]) : B))
|
|
11256
11261
|
return go(_ == null ? void 0 : _.id, j, S), X;
|
|
11257
11262
|
}
|
|
@@ -11289,7 +11294,7 @@ function qA(e, t) {
|
|
|
11289
11294
|
(B) => B.type === "bpmn:Lane" && S >= B.y && S <= B.y + B.height
|
|
11290
11295
|
);
|
|
11291
11296
|
x.band !== void 0 && go(N == null ? void 0 : N.id, x.band, O);
|
|
11292
|
-
const T = N ? N.y + (x.band === void 0 ? N.height / 2 : Math.min(N.height / 2, le) + Nt(N.id, x.band) *
|
|
11297
|
+
const T = N ? N.y + (x.band === void 0 ? N.height / 2 : Math.min(N.height / 2, le) + Nt(N.id, x.band) * me) : x.band !== void 0 && O ? O.y + U + Nt(`pool:${O.id}`, x.band) * me : void 0;
|
|
11293
11298
|
if (T !== void 0) {
|
|
11294
11299
|
const B = AS(_, N, O, T), L = B === T ? T - S : B - (_.y + _.height / 2);
|
|
11295
11300
|
L !== 0 && n.moveElements([_], { x: 0, y: L });
|
|
@@ -11309,7 +11314,7 @@ function qA(e, t) {
|
|
|
11309
11314
|
n.updateWaypoints(O, [L.exit, { x: L.exit.x, y: D }, { x: T.x, y: D }]);
|
|
11310
11315
|
const z = O.label;
|
|
11311
11316
|
if (z && L.label) {
|
|
11312
|
-
const X = Math.abs(L.label.y + z.height / 2 - L.channelY) <=
|
|
11317
|
+
const X = Math.abs(L.label.y + z.height / 2 - L.channelY) <= me / 5 && L.label.x + z.width > L.exit.x, ne = L.exit.x + 6, ce = T.x - 6 - z.width, ae = X ? ce >= ne ? { x: Math.max(ne, Math.min(L.label.x, ce)), y: L.label.y + (D - L.channelY) } : void 0 : L.label;
|
|
11313
11318
|
ae && (ae.x !== z.x || ae.y !== z.y) && n.moveElements([z], { x: ae.x - z.x, y: ae.y - z.y });
|
|
11314
11319
|
}
|
|
11315
11320
|
} else Math.abs(D - (N.y + N.height / 2)) > 1 && Oc(O);
|
|
@@ -11392,11 +11397,11 @@ function KA(e, t, n) {
|
|
|
11392
11397
|
g = g.parent;
|
|
11393
11398
|
}
|
|
11394
11399
|
if (!h) {
|
|
11395
|
-
const ve = d.x + d.width / 2,
|
|
11396
|
-
h = i.getAll().find((
|
|
11397
|
-
if (
|
|
11398
|
-
const _e =
|
|
11399
|
-
return typeof _e.x == "number" && typeof _e.width == "number" && ve >= _e.x && ve <= _e.x + _e.width &&
|
|
11400
|
+
const ve = d.x + d.width / 2, de = d.y + d.height / 2;
|
|
11401
|
+
h = i.getAll().find((me) => {
|
|
11402
|
+
if (me.type !== "bpmn:Participant") return !1;
|
|
11403
|
+
const _e = me;
|
|
11404
|
+
return typeof _e.x == "number" && typeof _e.width == "number" && ve >= _e.x && ve <= _e.x + _e.width && de >= _e.y && de <= _e.y + _e.height;
|
|
11400
11405
|
});
|
|
11401
11406
|
}
|
|
11402
11407
|
if (!h || typeof h.x != "number" || typeof h.width != "number") continue;
|
|
@@ -11408,22 +11413,22 @@ function KA(e, t, n) {
|
|
|
11408
11413
|
if (P && P in eu && H.push(nu(i, E, A, h, { placement: { side: P, offset: (w == null ? void 0 : w.offset) ?? null }, selfId: f })), k && !tu(I, A, k))
|
|
11409
11414
|
for (const ve of WA)
|
|
11410
11415
|
H.push(nu(i, E, A, h, { placement: { side: ve, offset: null }, selfId: f }));
|
|
11411
|
-
for (const [ve,
|
|
11412
|
-
for (let
|
|
11413
|
-
H.push({ x: I.x + ve * gy *
|
|
11416
|
+
for (const [ve, de] of [[-1, 0], [1, 0], [0, -1], [0, 1]])
|
|
11417
|
+
for (let me = 1; me <= VA; me++)
|
|
11418
|
+
H.push({ x: I.x + ve * gy * me, y: I.y + de * gy * me });
|
|
11414
11419
|
const F = { ...s, edges: s.edges.filter((ve) => ve.id !== (y == null ? void 0 : y.id)) }, G = r(F), ee = G.filter((ve) => Up(ve).includes(f)).length;
|
|
11415
11420
|
if (!ee) continue;
|
|
11416
11421
|
let se, ie = !1;
|
|
11417
11422
|
for (const ve of H) {
|
|
11418
|
-
const
|
|
11419
|
-
if (!
|
|
11423
|
+
const de = ve.x - I.x, me = ve.y - I.y;
|
|
11424
|
+
if (!de && !me || ve.x - A.width / 2 < h.x || ve.x + A.width / 2 > h.x + h.width || ve.y - A.height / 2 < h.y || ve.y + A.height / 2 > h.y + h.height || k && !tu(ve, A, k)) continue;
|
|
11420
11425
|
const _e = {
|
|
11421
11426
|
...F,
|
|
11422
|
-
shapes: F.shapes.map((Q) => Q.id === f ? { ...Q, x: Q.x +
|
|
11427
|
+
shapes: F.shapes.map((Q) => Q.id === f ? { ...Q, x: Q.x + de, y: Q.y + me } : Q)
|
|
11423
11428
|
}, U = r(_e), le = U.filter((Q) => Up(Q).includes(f)).length;
|
|
11424
11429
|
if (le >= ee || U.length > G.length) continue;
|
|
11425
|
-
const K = Math.abs(
|
|
11426
|
-
if (ie || ((!se || le < se.mine || le === se.mine && (U.length < se.all || U.length === se.all && K < se.dist)) && (se = { x: ve.x, y: ve.y, mine: le, all: U.length, dist: K }), se.mine === 0 && se.all < G.length && (ie = !0)), le === 0 && U.length < G.length && YA(e, d,
|
|
11430
|
+
const K = Math.abs(de) + Math.abs(me);
|
|
11431
|
+
if (ie || ((!se || le < se.mine || le === se.mine && (U.length < se.all || U.length === se.all && K < se.dist)) && (se = { x: ve.x, y: ve.y, mine: le, all: U.length, dist: K }), se.mine === 0 && se.all < G.length && (ie = !0)), le === 0 && U.length < G.length && YA(e, d, de, me) === 0) {
|
|
11427
11432
|
se = { x: ve.x, y: ve.y, mine: le, all: U.length, dist: K };
|
|
11428
11433
|
break;
|
|
11429
11434
|
}
|
|
@@ -11480,7 +11485,7 @@ function ZA(e, t, n) {
|
|
|
11480
11485
|
if (!G || !ee) continue;
|
|
11481
11486
|
const [se, ie] = G.x <= ee.x ? [G, ee] : [ee, G];
|
|
11482
11487
|
if (k.contained) continue;
|
|
11483
|
-
const ve = s.get(se.id),
|
|
11488
|
+
const ve = s.get(se.id), de = s.get(ie.id), me = ve && de ? Math.max(de.x - (ve.x + ve.width), 0) : XA, _e = se.x + se.width + me - ie.x;
|
|
11484
11489
|
if (_e <= 0) continue;
|
|
11485
11490
|
const U = l(ie.id).filter((le) => i.get(le));
|
|
11486
11491
|
U.length && (!E || _e > E.dx) && (E = { movers: U, dx: _e });
|
|
@@ -11635,9 +11640,9 @@ function nP(e, t, n, i) {
|
|
|
11635
11640
|
}
|
|
11636
11641
|
}
|
|
11637
11642
|
if (F > v - Kc && (F = I), G > b - Kc && (G = P), ee < E + Kc && (ee = k), se < A + Kc && (se = H), F === I && G === P && ee === k && se === H) continue;
|
|
11638
|
-
const ie = o.get(d), ve = { x: ie.x, y: ie.y, width: ie.width, height: ie.height },
|
|
11643
|
+
const ie = o.get(d), ve = { x: ie.x, y: ie.y, width: ie.width, height: ie.height }, de = We(o), me = new Set(pt(de).map(ft)), _e = a(de);
|
|
11639
11644
|
r.resizeShape(ie, { x: F, y: G, width: ee - F, height: se - G });
|
|
11640
|
-
let U = We(o), le = pt(U).filter((Fe) => !
|
|
11645
|
+
let U = We(o), le = pt(U).filter((Fe) => !me.has(ft(Fe)));
|
|
11641
11646
|
const K = [];
|
|
11642
11647
|
if (le.length > 0 && le.every(
|
|
11643
11648
|
(Fe) => Fe.kind === "label-over-line" && !i.has(Fe.edge) && U.edges.some(($) => $.id === Fe.edge)
|
|
@@ -11649,10 +11654,10 @@ function nP(e, t, n, i) {
|
|
|
11649
11654
|
const W = C.x - R.x, q = C.y - R.y;
|
|
11650
11655
|
r.moveElements([R], { x: W, y: q }), K.push({ label: R, dx: W, dy: q });
|
|
11651
11656
|
}
|
|
11652
|
-
U = We(o), le = pt(U).filter((Fe) => !
|
|
11657
|
+
U = We(o), le = pt(U).filter((Fe) => !me.has(ft(Fe)));
|
|
11653
11658
|
}
|
|
11654
|
-
const
|
|
11655
|
-
if (le.length || Ee ||
|
|
11659
|
+
const he = a(U), Ee = [...he].some((Fe) => !_e.has(Fe));
|
|
11660
|
+
if (le.length || Ee || he.size >= _e.size) {
|
|
11656
11661
|
for (const Fe of K.reverse()) r.moveElements([Fe.label], { x: -Fe.dx, y: -Fe.dy });
|
|
11657
11662
|
r.resizeShape(ie, ve);
|
|
11658
11663
|
}
|
|
@@ -11690,29 +11695,29 @@ function oP(e, t, n = {}) {
|
|
|
11690
11695
|
};
|
|
11691
11696
|
if (s.length) return { ok: !1, issues: s, findings: [], stats: c };
|
|
11692
11697
|
const l = BA(t, a, i), u = i && l.writes.size ? iP(l.writes, r.elementRegistry, r.canvas, i) : void 0, p = We(r.elementRegistry), f = new Set(pt(p).map(ft)), d = new Set(pt(p, { includeObservationOnly: !0 }).map(ft)), g = new Set(
|
|
11693
|
-
Iw(l.ops, (
|
|
11694
|
-
var
|
|
11695
|
-
return (_e = (
|
|
11698
|
+
Iw(l.ops, (de) => {
|
|
11699
|
+
var me, _e;
|
|
11700
|
+
return (_e = (me = r.elementRegistry.get(de)) == null ? void 0 : me.source) == null ? void 0 : _e.id;
|
|
11696
11701
|
}).keys()
|
|
11697
|
-
), h = new Set(p.edges.map((
|
|
11702
|
+
), h = new Set(p.edges.map((de) => de.id).filter((de) => !g.has(de))), m = new Set(
|
|
11698
11703
|
t.flatMap(
|
|
11699
|
-
(
|
|
11704
|
+
(de) => de.kind === "sequenceFlow.update" && (de.source !== void 0 || de.target !== void 0) ? [de.id] : []
|
|
11700
11705
|
)
|
|
11701
11706
|
), w = () => new Set(
|
|
11702
|
-
p.edges.filter((
|
|
11707
|
+
p.edges.filter((de) => {
|
|
11703
11708
|
var _e;
|
|
11704
|
-
const
|
|
11705
|
-
return
|
|
11706
|
-
}).map((
|
|
11707
|
-
), y = (
|
|
11708
|
-
for (const
|
|
11709
|
-
(
|
|
11709
|
+
const me = (_e = r.elementRegistry.get(de.id)) == null ? void 0 : _e.waypoints;
|
|
11710
|
+
return me ? !(me.length === de.waypoints.length && de.waypoints.every((U, le) => Math.round(U.x) === Math.round(me[le].x) && Math.round(U.y) === Math.round(me[le].y))) : !1;
|
|
11711
|
+
}).map((de) => de.id)
|
|
11712
|
+
), y = (de, me) => new Set([...de].filter((_e) => !me.has(_e))), v = new Set(p.shapes.map((de) => de.id)), b = er(p), E = b.length, A = new Set(b.map(([de, me]) => `${de}|${me}`)), I = to(p), P = new Set(I.map(([de, me]) => `${de}|${me}`)), k = /* @__PURE__ */ new Map();
|
|
11713
|
+
for (const de of r.elementRegistry.filter(
|
|
11714
|
+
(me) => "waypoints" in me && !!me.waypoints
|
|
11710
11715
|
))
|
|
11711
|
-
|
|
11712
|
-
wps:
|
|
11713
|
-
label: { x:
|
|
11714
|
-
source: (ie =
|
|
11715
|
-
target: (ve =
|
|
11716
|
+
de.label && k.set(de.id, {
|
|
11717
|
+
wps: de.waypoints.map((me) => ({ x: me.x, y: me.y })),
|
|
11718
|
+
label: { x: de.label.x, y: de.label.y },
|
|
11719
|
+
source: (ie = de.source) == null ? void 0 : ie.id,
|
|
11720
|
+
target: (ve = de.target) == null ? void 0 : ve.id
|
|
11716
11721
|
});
|
|
11717
11722
|
const H = e.get("commandStack");
|
|
11718
11723
|
try {
|
|
@@ -11720,29 +11725,29 @@ function oP(e, t, n = {}) {
|
|
|
11720
11725
|
o(l.ops, r);
|
|
11721
11726
|
for (const U of (u == null ? void 0 : u.contexts()) ?? []) H.execute(ew, U);
|
|
11722
11727
|
ZA(r, f, p), JA(r, p), tP(r, f, p), JM(r, p, m), YM(r, h, v), QM(r, h);
|
|
11723
|
-
const
|
|
11728
|
+
const de = Zm(r, f);
|
|
11724
11729
|
FM(r, A, h);
|
|
11725
|
-
const
|
|
11730
|
+
const me = w(), _e = EA(
|
|
11726
11731
|
r,
|
|
11727
11732
|
f,
|
|
11728
|
-
y(h,
|
|
11729
|
-
|
|
11733
|
+
y(h, me),
|
|
11734
|
+
me
|
|
11730
11735
|
);
|
|
11731
|
-
dA(r, h), fA(r, h, m), bA(r, f, h), _A(r, f, h), WM(r, P, h), rA(r, h, p), kA(r, f, y(h, w())), TA(r, h, /* @__PURE__ */ new Set([...m, ..._e])), DA(r, v), KA(r, f, v), Zm(r, f,
|
|
11736
|
+
dA(r, h), fA(r, h, m), bA(r, f, h), _A(r, f, h), WM(r, P, h), rA(r, h, p), kA(r, f, y(h, w())), TA(r, h, /* @__PURE__ */ new Set([...m, ..._e])), DA(r, v), KA(r, f, v), Zm(r, f, de), nP(r, d, p, h), IA(r, f), PA(r, k, UA(r));
|
|
11732
11737
|
});
|
|
11733
|
-
} catch (
|
|
11738
|
+
} catch (de) {
|
|
11734
11739
|
return {
|
|
11735
11740
|
ok: !1,
|
|
11736
11741
|
// 하강 중에야 드러나는 거부 중 **구조화할 수 있는 것**은 그 issue 를 그대로 낸다(B-128) — 나머지는 자유 문장
|
|
11737
11742
|
issues: [
|
|
11738
|
-
|
|
11743
|
+
de instanceof Nw ? de.issue : { kind: "lower-failed", message: de instanceof Error ? de.message : String(de) }
|
|
11739
11744
|
],
|
|
11740
11745
|
findings: [],
|
|
11741
11746
|
stats: c
|
|
11742
11747
|
};
|
|
11743
11748
|
}
|
|
11744
11749
|
const F = We(r.elementRegistry), G = pt(F, { includeObservationOnly: !0 }).filter(
|
|
11745
|
-
(
|
|
11750
|
+
(de) => !d.has(ft(de))
|
|
11746
11751
|
), ee = xM(F), se = to(F);
|
|
11747
11752
|
return {
|
|
11748
11753
|
ok: !0,
|
|
@@ -11836,12 +11841,12 @@ function sP(e, t = {}) {
|
|
|
11836
11841
|
for (const le of U.artifacts ?? [])
|
|
11837
11842
|
A(le.id), u.push({ id: le.id, type: le.$type, reason: "inside-container" });
|
|
11838
11843
|
}, G = (U, le) => {
|
|
11839
|
-
const K = U.flowElements ?? [], Q = (U.laneSets ?? []).flatMap((Ee) => Ee.lanes ?? []),
|
|
11844
|
+
const K = U.flowElements ?? [], Q = (U.laneSets ?? []).flatMap((Ee) => Ee.lanes ?? []), he = /* @__PURE__ */ new Map();
|
|
11840
11845
|
for (const Ee of Q) {
|
|
11841
11846
|
A(Ee.id), v.set(Ee.id, Ee);
|
|
11842
11847
|
for (const Fe of Ee.flowNodeRef ?? []) {
|
|
11843
11848
|
const $ = Hi(Fe);
|
|
11844
|
-
$ &&
|
|
11849
|
+
$ && he.set($, Ee.id);
|
|
11845
11850
|
}
|
|
11846
11851
|
}
|
|
11847
11852
|
for (const Ee of K) {
|
|
@@ -11870,7 +11875,7 @@ function sP(e, t = {}) {
|
|
|
11870
11875
|
type: Fe,
|
|
11871
11876
|
...Ee.name ? { name: Ee.name } : {},
|
|
11872
11877
|
...le ? { participant: le } : {},
|
|
11873
|
-
...
|
|
11878
|
+
...he.has(Ee.id) ? { lane: he.get(Ee.id) } : {},
|
|
11874
11879
|
...C ? { attachedTo: C } : {},
|
|
11875
11880
|
...$ ? { eventDefinition: $ } : {}
|
|
11876
11881
|
}), Fe === "subProcess" && F(Ee);
|
|
@@ -11902,9 +11907,9 @@ function sP(e, t = {}) {
|
|
|
11902
11907
|
I(le.id), v.set(le.id, le);
|
|
11903
11908
|
const K = Hi(le.processRef);
|
|
11904
11909
|
K && U.add(K);
|
|
11905
|
-
const Q = K ? o.get(K) : void 0,
|
|
11910
|
+
const Q = K ? o.get(K) : void 0, he = ((Q == null ? void 0 : Q.laneSets) ?? []).flatMap((C) => C.lanes ?? []), Ee = he.map((C) => ({ id: C.id, ...C.name ? { name: C.name } : {} }));
|
|
11906
11911
|
for (const C of Ee) I(C.id);
|
|
11907
|
-
const Fe = !Q || (Q.flowElements ?? []).length === 0 &&
|
|
11912
|
+
const Fe = !Q || (Q.flowElements ?? []).length === 0 && he.length === 0 && (Q.artifacts ?? []).length === 0;
|
|
11908
11913
|
r.push({
|
|
11909
11914
|
id: le.id,
|
|
11910
11915
|
...le.name ? { name: le.name } : {},
|
|
@@ -11926,38 +11931,38 @@ function sP(e, t = {}) {
|
|
|
11926
11931
|
!U.has(le) && (K.flowElements ?? []).length > 0 && u.push({ id: le, type: K.$type, reason: "unreachable-process" });
|
|
11927
11932
|
} else
|
|
11928
11933
|
for (const U of o.values()) G(U);
|
|
11929
|
-
const ee = [], se = [], ie = [], ve = [],
|
|
11934
|
+
const ee = [], se = [], ie = [], ve = [], de = (U, le) => !!U && !!le && E.has(U) && E.has(le);
|
|
11930
11935
|
for (const U of f) {
|
|
11931
|
-
if (!
|
|
11936
|
+
if (!de(U.source, U.target)) {
|
|
11932
11937
|
u.push({ id: U.id, type: "bpmn:SequenceFlow", reason: "endpoint-outside-mvp" });
|
|
11933
11938
|
continue;
|
|
11934
11939
|
}
|
|
11935
11940
|
ee.push({ id: U.id, source: U.source, target: U.target, ...U.name ? { name: U.name } : {} }), E.add(U.id);
|
|
11936
11941
|
}
|
|
11937
11942
|
for (const U of d) {
|
|
11938
|
-
if (!
|
|
11943
|
+
if (!de(U.source, U.target)) {
|
|
11939
11944
|
u.push({ id: U.id, type: "bpmn:MessageFlow", reason: "endpoint-outside-mvp" });
|
|
11940
11945
|
continue;
|
|
11941
11946
|
}
|
|
11942
11947
|
se.push({ id: U.id, source: U.source, target: U.target, ...U.name ? { name: U.name } : {} }), E.add(U.id);
|
|
11943
11948
|
}
|
|
11944
11949
|
for (const U of h) {
|
|
11945
|
-
if (!
|
|
11950
|
+
if (!de(U.source, U.target)) {
|
|
11946
11951
|
u.push({ id: U.id ?? "", type: U.type, reason: "endpoint-outside-mvp" });
|
|
11947
11952
|
continue;
|
|
11948
11953
|
}
|
|
11949
11954
|
ve.push({ ...U.id ? { id: U.id } : {}, source: U.source, target: U.target }), U.id && E.add(U.id);
|
|
11950
11955
|
}
|
|
11951
11956
|
for (const U of g) {
|
|
11952
|
-
if (!
|
|
11957
|
+
if (!de(U.source, U.target)) {
|
|
11953
11958
|
u.push({ id: U.id ?? "", type: U.type, reason: "endpoint-outside-mvp" });
|
|
11954
11959
|
continue;
|
|
11955
11960
|
}
|
|
11956
11961
|
ie.push({ ...U.id ? { id: U.id } : {}, source: U.source, target: U.target });
|
|
11957
11962
|
}
|
|
11958
|
-
const
|
|
11963
|
+
const me = new Map(l.map((U) => [U.id, U]));
|
|
11959
11964
|
for (const { owner: U, refs: le } of y) {
|
|
11960
|
-
const K = le.filter((
|
|
11965
|
+
const K = le.filter((he) => b.has(he)), Q = me.get(U);
|
|
11961
11966
|
Q && K.length && (Q.members = K);
|
|
11962
11967
|
}
|
|
11963
11968
|
for (const U of m)
|
|
@@ -13756,13 +13761,13 @@ function t_(e, t, n, i, o, r, a, s, c, l) {
|
|
|
13756
13761
|
P = I + u * (a && P > I ? 1 : -1), s = E + n * rn.cos(P), c = A + i * rn.sin(P), f = t_(s, c, n, i, o, 0, a, F, G, [P, H, E, A]);
|
|
13757
13762
|
}
|
|
13758
13763
|
k = P - I;
|
|
13759
|
-
var ee = rn.cos(I), se = rn.sin(I), ie = rn.cos(P), ve = rn.sin(P),
|
|
13764
|
+
var ee = rn.cos(I), se = rn.sin(I), ie = rn.cos(P), ve = rn.sin(P), de = rn.tan(k / 4), me = 4 / 3 * n * de, _e = 4 / 3 * i * de, U = [e, t], le = [e + me * se, t - _e * ee], K = [s + me * ve, c - _e * ie], Q = [s, c];
|
|
13760
13765
|
if (le[0] = 2 * U[0] - le[0], le[1] = 2 * U[1] - le[1], l)
|
|
13761
13766
|
return [le, K, Q].concat(f);
|
|
13762
13767
|
f = [le, K, Q].concat(f).join().split(",");
|
|
13763
|
-
for (var
|
|
13764
|
-
|
|
13765
|
-
return
|
|
13768
|
+
for (var he = [], Ee = 0, Fe = f.length; Ee < Fe; Ee++)
|
|
13769
|
+
he[Ee] = Ee % 2 ? g(f[Ee - 1], f[Ee], p).y : g(f[Ee], f[Ee + 1], p).x;
|
|
13770
|
+
return he;
|
|
13766
13771
|
}
|
|
13767
13772
|
function DT(e, t, n, i, o, r, a, s) {
|
|
13768
13773
|
for (var c = [], l = [[], []], u, p, f, d, g, h, m, w, y = 0; y < 2; ++y) {
|
|
@@ -14837,8 +14842,8 @@ function r2(e) {
|
|
|
14837
14842
|
function a2(e) {
|
|
14838
14843
|
var t = {}, n = [], i = {};
|
|
14839
14844
|
function o(K, Q) {
|
|
14840
|
-
return function(
|
|
14841
|
-
K(
|
|
14845
|
+
return function(he) {
|
|
14846
|
+
K(he, Q);
|
|
14842
14847
|
};
|
|
14843
14848
|
}
|
|
14844
14849
|
function r(K) {
|
|
@@ -14848,8 +14853,8 @@ function a2(e) {
|
|
|
14848
14853
|
return t[K.id];
|
|
14849
14854
|
}
|
|
14850
14855
|
function s(K, Q) {
|
|
14851
|
-
var
|
|
14852
|
-
if (
|
|
14856
|
+
var he = K.gfx;
|
|
14857
|
+
if (he)
|
|
14853
14858
|
throw new Error(
|
|
14854
14859
|
`already rendered ${jn(K)}`
|
|
14855
14860
|
);
|
|
@@ -14860,8 +14865,8 @@ function a2(e) {
|
|
|
14860
14865
|
}
|
|
14861
14866
|
function l(K, Q) {
|
|
14862
14867
|
try {
|
|
14863
|
-
var
|
|
14864
|
-
return r(K),
|
|
14868
|
+
var he = i[K.id] && s(K, Q);
|
|
14869
|
+
return r(K), he;
|
|
14865
14870
|
} catch (Ee) {
|
|
14866
14871
|
u(Ee.message, { element: K, error: Ee }), console.error(`failed to import ${jn(K)}`, Ee);
|
|
14867
14872
|
}
|
|
@@ -14870,11 +14875,11 @@ function a2(e) {
|
|
|
14870
14875
|
e.error(K, Q);
|
|
14871
14876
|
}
|
|
14872
14877
|
var p = this.registerDi = function(Q) {
|
|
14873
|
-
var
|
|
14874
|
-
|
|
14875
|
-
`multiple DI elements defined for ${jn(
|
|
14876
|
-
{ element:
|
|
14877
|
-
) : i[
|
|
14878
|
+
var he = Q.bpmnElement;
|
|
14879
|
+
he ? i[he.id] ? u(
|
|
14880
|
+
`multiple DI elements defined for ${jn(he)}`,
|
|
14881
|
+
{ element: he }
|
|
14882
|
+
) : i[he.id] = Q : u(
|
|
14878
14883
|
`no bpmnElement referenced in ${jn(Q)}`,
|
|
14879
14884
|
{ element: Q }
|
|
14880
14885
|
);
|
|
@@ -14888,17 +14893,17 @@ function a2(e) {
|
|
|
14888
14893
|
function g(K) {
|
|
14889
14894
|
p(K);
|
|
14890
14895
|
}
|
|
14891
|
-
this.handleDefinitions = function(Q,
|
|
14896
|
+
this.handleDefinitions = function(Q, he) {
|
|
14892
14897
|
var Ee = Q.diagrams;
|
|
14893
|
-
if (
|
|
14898
|
+
if (he && Ee.indexOf(he) === -1)
|
|
14894
14899
|
throw new Error("diagram not part of <bpmn:Definitions />");
|
|
14895
|
-
if (!
|
|
14900
|
+
if (!he && Ee && Ee.length && (he = Ee[0]), !he)
|
|
14896
14901
|
throw new Error("no diagram to display");
|
|
14897
|
-
i = {}, f(
|
|
14898
|
-
var Fe =
|
|
14902
|
+
i = {}, f(he);
|
|
14903
|
+
var Fe = he.plane;
|
|
14899
14904
|
if (!Fe)
|
|
14900
14905
|
throw new Error(
|
|
14901
|
-
`no plane for ${jn(
|
|
14906
|
+
`no plane for ${jn(he)}`
|
|
14902
14907
|
);
|
|
14903
14908
|
var $ = Fe.bpmnElement;
|
|
14904
14909
|
if (!$)
|
|
@@ -14924,13 +14929,13 @@ function a2(e) {
|
|
|
14924
14929
|
Q = n.shift(), Q();
|
|
14925
14930
|
};
|
|
14926
14931
|
function m(K, Q) {
|
|
14927
|
-
|
|
14932
|
+
de(K, Q), k(K.ioSpecification, Q), P(K.artifacts, Q), r(K);
|
|
14928
14933
|
}
|
|
14929
14934
|
function w(K, Q) {
|
|
14930
|
-
var
|
|
14935
|
+
var he = st(K, function(Ee) {
|
|
14931
14936
|
return !a(Ee) && Zn(Ee, "bpmn:Process") && Ee.laneSets;
|
|
14932
14937
|
});
|
|
14933
|
-
|
|
14938
|
+
he.forEach(o(m, Q));
|
|
14934
14939
|
}
|
|
14935
14940
|
function y(K, Q) {
|
|
14936
14941
|
l(K, Q);
|
|
@@ -14951,21 +14956,21 @@ function a2(e) {
|
|
|
14951
14956
|
l(K, Q);
|
|
14952
14957
|
}
|
|
14953
14958
|
function P(K, Q) {
|
|
14954
|
-
V(K, function(
|
|
14955
|
-
Zn(
|
|
14956
|
-
I(
|
|
14957
|
-
}) : I(
|
|
14959
|
+
V(K, function(he) {
|
|
14960
|
+
Zn(he, "bpmn:Association") ? n.push(function() {
|
|
14961
|
+
I(he, Q);
|
|
14962
|
+
}) : I(he, Q);
|
|
14958
14963
|
});
|
|
14959
14964
|
}
|
|
14960
14965
|
function k(K, Q) {
|
|
14961
14966
|
K && (V(K.dataInputs, o(E, Q)), V(K.dataOutputs, o(A, Q)));
|
|
14962
14967
|
}
|
|
14963
|
-
var H = this.handleSubProcess = function(Q,
|
|
14964
|
-
|
|
14968
|
+
var H = this.handleSubProcess = function(Q, he) {
|
|
14969
|
+
de(Q, he), P(Q.artifacts, he);
|
|
14965
14970
|
};
|
|
14966
14971
|
function F(K, Q) {
|
|
14967
|
-
var
|
|
14968
|
-
Zn(K, "bpmn:SubProcess") && H(K,
|
|
14972
|
+
var he = l(K, Q);
|
|
14973
|
+
Zn(K, "bpmn:SubProcess") && H(K, he || Q), Zn(K, "bpmn:Activity") && k(K.ioSpecification, Q), n.push(function() {
|
|
14969
14974
|
V(K.dataInputAssociations, o(b, Q)), V(K.dataOutputAssociations, o(b, Q));
|
|
14970
14975
|
});
|
|
14971
14976
|
}
|
|
@@ -14977,8 +14982,8 @@ function a2(e) {
|
|
|
14977
14982
|
}
|
|
14978
14983
|
function se(K, Q) {
|
|
14979
14984
|
n.push(function() {
|
|
14980
|
-
var
|
|
14981
|
-
K.childLaneSet && ie(K.childLaneSet,
|
|
14985
|
+
var he = l(K, Q);
|
|
14986
|
+
K.childLaneSet && ie(K.childLaneSet, he || Q), le(K);
|
|
14982
14987
|
});
|
|
14983
14988
|
}
|
|
14984
14989
|
function ie(K, Q) {
|
|
@@ -14987,27 +14992,27 @@ function a2(e) {
|
|
|
14987
14992
|
function ve(K, Q) {
|
|
14988
14993
|
V(K, o(ie, Q));
|
|
14989
14994
|
}
|
|
14990
|
-
function
|
|
14991
|
-
|
|
14992
|
-
}
|
|
14993
|
-
function
|
|
14994
|
-
V(K, function(
|
|
14995
|
-
Zn(
|
|
14996
|
-
G(
|
|
14997
|
-
}) : Zn(
|
|
14998
|
-
F(
|
|
14999
|
-
}) : Zn(
|
|
15000
|
-
`unrecognized flowElement ${jn(
|
|
14995
|
+
function de(K, Q) {
|
|
14996
|
+
me(K.flowElements, Q), K.laneSets && ve(K.laneSets, Q);
|
|
14997
|
+
}
|
|
14998
|
+
function me(K, Q) {
|
|
14999
|
+
V(K, function(he) {
|
|
15000
|
+
Zn(he, "bpmn:SequenceFlow") ? n.push(function() {
|
|
15001
|
+
G(he, Q);
|
|
15002
|
+
}) : Zn(he, "bpmn:BoundaryEvent") ? n.unshift(function() {
|
|
15003
|
+
F(he, Q);
|
|
15004
|
+
}) : Zn(he, "bpmn:FlowNode") ? F(he, Q) : Zn(he, "bpmn:DataObject") || (Zn(he, "bpmn:DataStoreReference") || Zn(he, "bpmn:DataObjectReference") ? ee(he, Q) : u(
|
|
15005
|
+
`unrecognized flowElement ${jn(he)} in context ${jn(Q && Q.businessObject)}`,
|
|
15001
15006
|
{
|
|
15002
|
-
element:
|
|
15007
|
+
element: he,
|
|
15003
15008
|
context: Q
|
|
15004
15009
|
}
|
|
15005
15010
|
));
|
|
15006
15011
|
});
|
|
15007
15012
|
}
|
|
15008
15013
|
function _e(K, Q) {
|
|
15009
|
-
var
|
|
15010
|
-
Ee && m(Ee,
|
|
15014
|
+
var he = l(K, Q), Ee = K.processRef;
|
|
15015
|
+
Ee && m(Ee, he || Q);
|
|
15011
15016
|
}
|
|
15012
15017
|
function U(K, Q) {
|
|
15013
15018
|
V(K.participants, o(_e, Q)), n.push(function() {
|
|
@@ -15016,8 +15021,8 @@ function a2(e) {
|
|
|
15016
15021
|
}
|
|
15017
15022
|
function le(K) {
|
|
15018
15023
|
V(K.flowNodeRef, function(Q) {
|
|
15019
|
-
var
|
|
15020
|
-
|
|
15024
|
+
var he = Q.get("lanes");
|
|
15025
|
+
he && he.push(K);
|
|
15021
15026
|
});
|
|
15022
15027
|
}
|
|
15023
15028
|
}
|
|
@@ -16229,7 +16234,7 @@ function Kr(e, t, n, i, o, r, a) {
|
|
|
16229
16234
|
Ol(pe, 0, -Te, 270);
|
|
16230
16235
|
}
|
|
16231
16236
|
}
|
|
16232
|
-
function
|
|
16237
|
+
function de($, C, R = {}) {
|
|
16233
16238
|
var {
|
|
16234
16239
|
width: W,
|
|
16235
16240
|
height: q
|
|
@@ -16241,7 +16246,7 @@ function Kr(e, t, n, i, o, r, a) {
|
|
|
16241
16246
|
stroke: Le(C, c, R.stroke)
|
|
16242
16247
|
});
|
|
16243
16248
|
}
|
|
16244
|
-
function
|
|
16249
|
+
function me($, C, R = {}) {
|
|
16245
16250
|
var W = we(C), q = ct(C, s, R.fill), pe = Le(C, c, R.stroke);
|
|
16246
16251
|
return (W.get("associationDirection") === "One" || W.get("associationDirection") === "Both") && (R.markerEnd = d($, "association-end", q, pe)), W.get("associationDirection") === "Both" && (R.markerStart = d($, "association-start", q, pe)), R = gt(R, [
|
|
16247
16252
|
"markerStart",
|
|
@@ -16315,17 +16320,17 @@ function Kr(e, t, n, i, o, r, a) {
|
|
|
16315
16320
|
return W;
|
|
16316
16321
|
}
|
|
16317
16322
|
function Q($, C, R = {}) {
|
|
16318
|
-
var W =
|
|
16323
|
+
var W = de($, C, R), q = lt(C);
|
|
16319
16324
|
if (zn(C) && (De(W, {
|
|
16320
16325
|
strokeDasharray: "0, 5.5",
|
|
16321
16326
|
strokeWidth: 2.5
|
|
16322
16327
|
}), !q)) {
|
|
16323
16328
|
var pe = we(C).flowElements || [], Te = pe.filter((Qe) => M(Qe, "bpmn:StartEvent"));
|
|
16324
|
-
Te.length === 1 &&
|
|
16329
|
+
Te.length === 1 && he(Te[0], $, R, C);
|
|
16325
16330
|
}
|
|
16326
16331
|
return se($, C, q ? "center-top" : "center-middle", R), q ? G($, C, void 0, R) : G($, C, ["SubProcessMarker"], R), W;
|
|
16327
16332
|
}
|
|
16328
|
-
function
|
|
16333
|
+
function he($, C, R, W) {
|
|
16329
16334
|
var q = 22, pe = {
|
|
16330
16335
|
fill: ct(W, s, R.fill),
|
|
16331
16336
|
stroke: Le(W, c, R.stroke),
|
|
@@ -16341,7 +16346,7 @@ function Kr(e, t, n, i, o, r, a) {
|
|
|
16341
16346
|
}), k($, C, pe, W);
|
|
16342
16347
|
}
|
|
16343
16348
|
function Ee($, C, R = {}) {
|
|
16344
|
-
var W =
|
|
16349
|
+
var W = de($, C, R);
|
|
16345
16350
|
return se($, C, "center-middle", R), G($, C, void 0, R), W;
|
|
16346
16351
|
}
|
|
16347
16352
|
var Fe = this.handlers = {
|
|
@@ -16360,7 +16365,7 @@ function Kr(e, t, n, i, o, r, a) {
|
|
|
16360
16365
|
return R = gt(R, [
|
|
16361
16366
|
"fill",
|
|
16362
16367
|
"stroke"
|
|
16363
|
-
]),
|
|
16368
|
+
]), me($, C, R);
|
|
16364
16369
|
},
|
|
16365
16370
|
"bpmn:BoundaryEvent": function($, C, R = {}) {
|
|
16366
16371
|
var { renderIcon: W = !0 } = R;
|
|
@@ -16455,7 +16460,7 @@ function Kr(e, t, n, i, o, r, a) {
|
|
|
16455
16460
|
return R = gt(R, [
|
|
16456
16461
|
"fill",
|
|
16457
16462
|
"stroke"
|
|
16458
|
-
]),
|
|
16463
|
+
]), me($, C, {
|
|
16459
16464
|
...R,
|
|
16460
16465
|
markerEnd: d($, "association-end", ct(C, s, R.fill), Le(C, c, R.stroke))
|
|
16461
16466
|
});
|
|
@@ -16483,7 +16488,7 @@ function Kr(e, t, n, i, o, r, a) {
|
|
|
16483
16488
|
return R = gt(R, [
|
|
16484
16489
|
"fill",
|
|
16485
16490
|
"stroke"
|
|
16486
|
-
]),
|
|
16491
|
+
]), me($, C, {
|
|
16487
16492
|
...R,
|
|
16488
16493
|
markerEnd: d($, "association-end", ct(C, s, R.fill), Le(C, c, R.stroke))
|
|
16489
16494
|
});
|
|
@@ -28392,13 +28397,13 @@ function mB(e) {
|
|
|
28392
28397
|
Ee < 0 && (Ee = Q.length - 1), Ee >= Q.length && (Ee = 0), F.current = !0, k(Q[Ee]);
|
|
28393
28398
|
}, [I, P]), ve = xs((K) => {
|
|
28394
28399
|
K > 0 && P && P.entries && (F.current = !0, m((Q) => [...Q, P])), K < 0 && h.length > 0 && (F.current = !0, H.current = h[h.length + K], m((Q) => Q.slice(0, K)));
|
|
28395
|
-
}, [P, h]),
|
|
28400
|
+
}, [P, h]), de = xs((K, Q, he) => {
|
|
28396
28401
|
if (!(!Q || Q.disabled))
|
|
28397
|
-
return Q.entries ? (K.preventDefault(), ve(1)) : n(K, Q,
|
|
28398
|
-
}, [n, ve]),
|
|
28402
|
+
return Q.entries ? (K.preventDefault(), ve(1)) : n(K, Q, he);
|
|
28403
|
+
}, [n, ve]), me = xs((K) => {
|
|
28399
28404
|
if (K.key === "Enter" && P) {
|
|
28400
28405
|
const Q = K.target;
|
|
28401
|
-
return !!Ur(Q, "a, button", !0) || P.disabled ? void 0 :
|
|
28406
|
+
return !!Ur(Q, "a, button", !0) || P.disabled ? void 0 : de(K, P);
|
|
28402
28407
|
}
|
|
28403
28408
|
if (K.key === "Backspace") {
|
|
28404
28409
|
const Q = K.target;
|
|
@@ -28413,7 +28418,7 @@ function mB(e) {
|
|
|
28413
28418
|
return ve(1), K.preventDefault();
|
|
28414
28419
|
if (K.key === "ArrowLeft")
|
|
28415
28420
|
return ve(-1), K.preventDefault();
|
|
28416
|
-
}, [P, ie, ve,
|
|
28421
|
+
}, [P, ie, ve, de]), _e = xs((K) => {
|
|
28417
28422
|
Hf(K.target, "input") && y(() => K.target.value);
|
|
28418
28423
|
}, [y]);
|
|
28419
28424
|
Gl(() => (d(), () => {
|
|
@@ -28424,7 +28429,7 @@ function mB(e) {
|
|
|
28424
28429
|
<${Nx}
|
|
28425
28430
|
onClose=${t}
|
|
28426
28431
|
onKeyup=${_e}
|
|
28427
|
-
onKeydown=${
|
|
28432
|
+
onKeydown=${me}
|
|
28428
28433
|
className=${i}
|
|
28429
28434
|
position=${r}
|
|
28430
28435
|
width=${s}
|
|
@@ -28478,7 +28483,7 @@ function mB(e) {
|
|
|
28478
28483
|
selectedEntry=${P}
|
|
28479
28484
|
setSelectedEntry=${k}
|
|
28480
28485
|
keyboardSelection=${F}
|
|
28481
|
-
onAction=${
|
|
28486
|
+
onAction=${de}
|
|
28482
28487
|
idPrefix=${G}
|
|
28483
28488
|
id=${ee}
|
|
28484
28489
|
ariaLabel=${a || "Results"}
|