@notmrabhi/flowforge 0.1.6 → 0.1.8
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/{GatewayBranchEdge-DHqcdxpD.js → GatewayBranchEdge-C9tybnDE.js} +2 -2
- package/dist/GatewayBranchEdge-DJql3GUT.js +1 -0
- package/dist/{SchemaBuilderDrawer-BAOGl8dt.js → SchemaBuilderDrawer-8NVbccYd.js} +1 -1
- package/dist/{SchemaBuilderDrawer-CP-Lqo0S.js → SchemaBuilderDrawer-CrnQm9HM.js} +1 -1
- package/dist/canvas.cjs +1 -1
- package/dist/canvas.js +2 -2
- package/dist/defaultUi.cjs +1 -1
- package/dist/defaultUi.js +1 -1
- package/dist/form.cjs +1 -1
- package/dist/form.js +2 -2
- package/dist/{index-ucLEoH8L.js → index-BSP3H9Cn.js} +3 -3
- package/dist/{index-CiAhn6cP.js → index-BxjUA9XG.js} +1 -1
- package/dist/{index-D6g2IXSf.js → index-DO5qci03.js} +34 -17
- package/dist/{index-9Ahm5dnn.js → index-hwowTIsv.js} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +4 -4
- package/dist/{templateSkeletons-Ce90PFaV.js → templateSkeletons-BT6obP5g.js} +345 -332
- package/dist/templateSkeletons-Vr97QWjf.js +1 -0
- package/package.json +1 -1
- package/dist/GatewayBranchEdge-C-gffuVA.js +0 -1
- package/dist/templateSkeletons-BLzZ5u00.js +0 -1
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { jsxs as m, jsx as f, Fragment as
|
|
2
|
-
import P, { useRef as pt, useEffect as ie, useState as
|
|
1
|
+
import { jsxs as m, jsx as f, Fragment as Rt } from "react/jsx-runtime";
|
|
2
|
+
import P, { useRef as pt, useEffect as ie, useState as M, useMemo as W, useCallback as Y } from "react";
|
|
3
3
|
import _r, { useStore as Tr, useReactFlow as Nr, Background as Cr, Controls as Sr, MiniMap as Ir } from "reactflow";
|
|
4
4
|
import "reactflow/dist/style.css";
|
|
5
|
-
import { e as Or, G as
|
|
6
|
-
import { Dialog as
|
|
7
|
-
import { MdClose as
|
|
8
|
-
import { GrTrigger as
|
|
9
|
-
import { BiCollapse as
|
|
10
|
-
import { a as
|
|
11
|
-
import { m as
|
|
12
|
-
import { T as
|
|
13
|
-
var $t = Object.defineProperty,
|
|
5
|
+
import { e as Or, G as jr, E as Mr, P as Fr, L as zr, d as Dr, f as Lr } from "./GatewayBranchEdge-C9tybnDE.js";
|
|
6
|
+
import { Dialog as Rr, Box as te, Drawer as Ar, IconButton as bt, Button as yt } from "@mui/material";
|
|
7
|
+
import { MdClose as Pr, MdCalendarToday as Br, MdBolt as Wr, MdArrowBack as Gr, MdChevronRight as At, MdAddCircleOutline as $r, MdApps as Yr, MdErrorOutline as Kr, MdAccountTree as Ur, MdAdd as Vr, MdSearch as Hr, MdCategory as qr, MdCancel as Pt, MdError as Bt, MdCheckCircle as Wt, MdPlayArrow as Gt, MdHourglassEmpty as Xr, MdSchedule as mt, MdPerson as Jr, MdExpandLess as Zr, MdExpandMore as Qr } from "react-icons/md";
|
|
8
|
+
import { GrTrigger as en } from "react-icons/gr";
|
|
9
|
+
import { BiCollapse as tn, BiExpand as rn } from "react-icons/bi";
|
|
10
|
+
import { a as nn } from "./index-DO5qci03.js";
|
|
11
|
+
import { m as on } from "./messages-CO299wPN.js";
|
|
12
|
+
import { T as sn, E as q } from "./canvasTokens-CAD6G24b.js";
|
|
13
|
+
var $t = Object.defineProperty, ln = (e, t, r) => t in e ? $t(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, an = (e, t) => {
|
|
14
14
|
for (var r in t) $t(e, r, { get: t[r], enumerable: !0 });
|
|
15
|
-
},
|
|
16
|
-
|
|
17
|
-
var
|
|
18
|
-
for (var r in t)
|
|
15
|
+
}, dn = (e, t, r) => ln(e, t + "", r), Yt = {};
|
|
16
|
+
an(Yt, { Graph: () => G, alg: () => Ve, json: () => Ut, version: () => fn });
|
|
17
|
+
var cn = Object.defineProperty, Kt = (e, t) => {
|
|
18
|
+
for (var r in t) cn(e, r, { get: t[r], enumerable: !0 });
|
|
19
19
|
}, G = class {
|
|
20
20
|
constructor(e) {
|
|
21
21
|
this._isDirected = !0, this._isMultigraph = !1, this._isCompound = !1, this._nodes = {}, this._in = {}, this._preds = {}, this._out = {}, this._sucs = {}, this._edgeObjs = {}, this._edgeLabels = {}, this._nodeCount = 0, this._edgeCount = 0, this._defaultNodeLabelFn = () => {
|
|
@@ -153,7 +153,7 @@ var un = Object.defineProperty, Kt = (e, t) => {
|
|
|
153
153
|
if (a in this._edgeLabels) return d && (this._edgeLabels[a] = l), this;
|
|
154
154
|
if (s !== void 0 && !this._isMultigraph) throw new Error("Cannot set a named edge when isMultigraph = false");
|
|
155
155
|
this.setNode(o), this.setNode(i), this._edgeLabels[a] = d ? l : this._defaultEdgeLabelFn(o, i, s);
|
|
156
|
-
let c =
|
|
156
|
+
let c = un(this._isDirected, o, i, s);
|
|
157
157
|
return o = c.v, i = c.w, Object.freeze(c), this._edgeObjs[a] = c, wt(this._preds[i], o), wt(this._sucs[o], i), this._in[i][a] = c, this._out[o][a] = c, this._edgeCount++, this;
|
|
158
158
|
}
|
|
159
159
|
edge(e, t, r) {
|
|
@@ -207,7 +207,7 @@ function ge(e, t, r, n) {
|
|
|
207
207
|
}
|
|
208
208
|
return o + "" + i + "" + (n === void 0 ? "\0" : n);
|
|
209
209
|
}
|
|
210
|
-
function
|
|
210
|
+
function un(e, t, r, n) {
|
|
211
211
|
let o = "" + t, i = "" + r;
|
|
212
212
|
if (!e && o > i) {
|
|
213
213
|
let l = o;
|
|
@@ -219,25 +219,25 @@ function fn(e, t, r, n) {
|
|
|
219
219
|
function Fe(e, t) {
|
|
220
220
|
return ge(e, t.v, t.w, t.name);
|
|
221
221
|
}
|
|
222
|
-
var
|
|
223
|
-
Kt(Ut, { read: () =>
|
|
224
|
-
function
|
|
225
|
-
let t = { options: { directed: e.isDirected(), multigraph: e.isMultigraph(), compound: e.isCompound() }, nodes:
|
|
222
|
+
var fn = "4.0.1", Ut = {};
|
|
223
|
+
Kt(Ut, { read: () => bn, write: () => hn });
|
|
224
|
+
function hn(e) {
|
|
225
|
+
let t = { options: { directed: e.isDirected(), multigraph: e.isMultigraph(), compound: e.isCompound() }, nodes: gn(e), edges: pn(e) }, r = e.graph();
|
|
226
226
|
return r !== void 0 && (t.value = structuredClone(r)), t;
|
|
227
227
|
}
|
|
228
|
-
function
|
|
228
|
+
function gn(e) {
|
|
229
229
|
return e.nodes().map((t) => {
|
|
230
230
|
let r = e.node(t), n = e.parent(t), o = { v: t };
|
|
231
231
|
return r !== void 0 && (o.value = r), n !== void 0 && (o.parent = n), o;
|
|
232
232
|
});
|
|
233
233
|
}
|
|
234
|
-
function
|
|
234
|
+
function pn(e) {
|
|
235
235
|
return e.edges().map((t) => {
|
|
236
236
|
let r = e.edge(t), n = { v: t.v, w: t.w };
|
|
237
237
|
return t.name !== void 0 && (n.name = t.name), r !== void 0 && (n.value = r), n;
|
|
238
238
|
});
|
|
239
239
|
}
|
|
240
|
-
function
|
|
240
|
+
function bn(e) {
|
|
241
241
|
let t = new G(e.options);
|
|
242
242
|
return e.value !== void 0 && t.setGraph(e.value), e.nodes.forEach((r) => {
|
|
243
243
|
t.setNode(r.v, r.value), r.parent && t.setParent(r.v, r.parent);
|
|
@@ -246,14 +246,14 @@ function yn(e) {
|
|
|
246
246
|
}), t;
|
|
247
247
|
}
|
|
248
248
|
var Ve = {};
|
|
249
|
-
Kt(Ve, { CycleException: () => _e, bellmanFord: () => Vt, components: () =>
|
|
250
|
-
var
|
|
249
|
+
Kt(Ve, { CycleException: () => _e, bellmanFord: () => Vt, components: () => wn, dijkstra: () => xe, dijkstraAll: () => kn, findCycles: () => xn, floydWarshall: () => Tn, isAcyclic: () => Cn, postorder: () => In, preorder: () => On, prim: () => jn, shortestPaths: () => Mn, tarjan: () => qt, topsort: () => Xt });
|
|
250
|
+
var yn = () => 1;
|
|
251
251
|
function Vt(e, t, r, n) {
|
|
252
|
-
return
|
|
252
|
+
return mn(e, String(t), r || yn, n || function(o) {
|
|
253
253
|
return e.outEdges(o);
|
|
254
254
|
});
|
|
255
255
|
}
|
|
256
|
-
function
|
|
256
|
+
function mn(e, t, r, n) {
|
|
257
257
|
let o = {}, i, s = 0, l = e.nodes(), d = function(u) {
|
|
258
258
|
let h = r(u);
|
|
259
259
|
o[u.v].distance + h < o[u.w].distance && (o[u.w] = { distance: o[u.v].distance + h, predecessor: u.v }, i = !0);
|
|
@@ -274,7 +274,7 @@ function wn(e, t, r, n) {
|
|
|
274
274
|
if (s === c - 1 && (i = !1, a(), i)) throw new Error("The graph contains a negative weight cycle");
|
|
275
275
|
return o;
|
|
276
276
|
}
|
|
277
|
-
function
|
|
277
|
+
function wn(e) {
|
|
278
278
|
let t = {}, r = [], n;
|
|
279
279
|
function o(i) {
|
|
280
280
|
i in t || (t[i] = !0, n.push(i), e.successors(i).forEach(o), e.predecessors(i).forEach(o));
|
|
@@ -336,14 +336,14 @@ var Ht = class {
|
|
|
336
336
|
let r = this._arr, n = this._keyIndices, o = r[e], i = r[t];
|
|
337
337
|
r[e] = i, r[t] = o, n[i.key] = e, n[o.key] = t;
|
|
338
338
|
}
|
|
339
|
-
},
|
|
339
|
+
}, vn = () => 1;
|
|
340
340
|
function xe(e, t, r, n) {
|
|
341
341
|
let o = function(i) {
|
|
342
342
|
return e.outEdges(i);
|
|
343
343
|
};
|
|
344
|
-
return
|
|
344
|
+
return En(e, String(t), r || vn, n || o);
|
|
345
345
|
}
|
|
346
|
-
function
|
|
346
|
+
function En(e, t, r, n) {
|
|
347
347
|
let o = {}, i = new Ht(), s, l, d = function(a) {
|
|
348
348
|
let c = a.v !== s ? a.v : a.w, u = o[c], h = r(a), g = l.distance + h;
|
|
349
349
|
if (h < 0) throw new Error("dijkstra does not allow negative edge weights. Bad edge: " + a + " Weight: " + h);
|
|
@@ -355,7 +355,7 @@ function kn(e, t, r, n) {
|
|
|
355
355
|
}); i.size() > 0 && (s = i.removeMin(), l = o[s], l.distance !== Number.POSITIVE_INFINITY); ) n(s).forEach(d);
|
|
356
356
|
return o;
|
|
357
357
|
}
|
|
358
|
-
function
|
|
358
|
+
function kn(e, t, r) {
|
|
359
359
|
return e.nodes().reduce(function(n, o) {
|
|
360
360
|
return n[o] = xe(e, o, t, r), n;
|
|
361
361
|
}, {});
|
|
@@ -378,18 +378,18 @@ function qt(e) {
|
|
|
378
378
|
s in n || i(s);
|
|
379
379
|
}), o;
|
|
380
380
|
}
|
|
381
|
-
function
|
|
381
|
+
function xn(e) {
|
|
382
382
|
return qt(e).filter(function(t) {
|
|
383
383
|
return t.length > 1 || t.length === 1 && e.hasEdge(t[0], t[0]);
|
|
384
384
|
});
|
|
385
385
|
}
|
|
386
|
-
var
|
|
387
|
-
function
|
|
388
|
-
return
|
|
386
|
+
var _n = () => 1;
|
|
387
|
+
function Tn(e, t, r) {
|
|
388
|
+
return Nn(e, t || _n, r || function(n) {
|
|
389
389
|
return e.outEdges(n);
|
|
390
390
|
});
|
|
391
391
|
}
|
|
392
|
-
function
|
|
392
|
+
function Nn(e, t, r) {
|
|
393
393
|
let n = {}, o = e.nodes();
|
|
394
394
|
return o.forEach(function(i) {
|
|
395
395
|
n[i] = {}, n[i][i] = { distance: 0, predecessor: "" }, o.forEach(function(s) {
|
|
@@ -423,7 +423,7 @@ function Xt(e) {
|
|
|
423
423
|
if (e.sinks().forEach(o), Object.keys(t).length !== e.nodeCount()) throw new _e();
|
|
424
424
|
return n;
|
|
425
425
|
}
|
|
426
|
-
function
|
|
426
|
+
function Cn(e) {
|
|
427
427
|
try {
|
|
428
428
|
Xt(e);
|
|
429
429
|
} catch (t) {
|
|
@@ -432,7 +432,7 @@ function Sn(e) {
|
|
|
432
432
|
}
|
|
433
433
|
return !0;
|
|
434
434
|
}
|
|
435
|
-
function
|
|
435
|
+
function Sn(e, t, r, n, o) {
|
|
436
436
|
Array.isArray(t) || (t = [t]);
|
|
437
437
|
let i = (l) => {
|
|
438
438
|
var d;
|
|
@@ -449,14 +449,14 @@ function Jt(e, t, r, n, o, i, s) {
|
|
|
449
449
|
}), r && (s = i(s, t))), s;
|
|
450
450
|
}
|
|
451
451
|
function Zt(e, t, r) {
|
|
452
|
-
return
|
|
452
|
+
return Sn(e, t, r, function(n, o) {
|
|
453
453
|
return n.push(o), n;
|
|
454
454
|
}, []);
|
|
455
455
|
}
|
|
456
|
-
function
|
|
456
|
+
function In(e, t) {
|
|
457
457
|
return Zt(e, t, "post");
|
|
458
458
|
}
|
|
459
|
-
function
|
|
459
|
+
function On(e, t) {
|
|
460
460
|
return Zt(e, t, "pre");
|
|
461
461
|
}
|
|
462
462
|
function jn(e, t) {
|
|
@@ -483,13 +483,13 @@ function jn(e, t) {
|
|
|
483
483
|
}
|
|
484
484
|
return r;
|
|
485
485
|
}
|
|
486
|
-
function
|
|
487
|
-
return
|
|
486
|
+
function Mn(e, t, r, n) {
|
|
487
|
+
return Fn(e, t, r, n ?? ((o) => {
|
|
488
488
|
let i = e.outEdges(o);
|
|
489
489
|
return i ?? [];
|
|
490
490
|
}));
|
|
491
491
|
}
|
|
492
|
-
function
|
|
492
|
+
function Fn(e, t, r, n) {
|
|
493
493
|
if (r === void 0) return xe(e, t, r, n);
|
|
494
494
|
let o = !1, i = e.nodes();
|
|
495
495
|
for (let s = 0; s < i.length; s++) {
|
|
@@ -507,7 +507,7 @@ function fe(e, t, r, n) {
|
|
|
507
507
|
for (; e.hasNode(o); ) o = He(n);
|
|
508
508
|
return r.dummy = t, e.setNode(o, r), o;
|
|
509
509
|
}
|
|
510
|
-
function
|
|
510
|
+
function zn(e) {
|
|
511
511
|
let t = new G().setGraph(e.graph());
|
|
512
512
|
return e.nodes().forEach((r) => t.setNode(r, e.node(r))), e.edges().forEach((r) => {
|
|
513
513
|
let n = t.edge(r.v, r.w) || { weight: 0, minlen: 1 }, o = e.edge(r);
|
|
@@ -560,7 +560,7 @@ function kt(e, t, r, n) {
|
|
|
560
560
|
let o = { width: 0, height: 0 };
|
|
561
561
|
return arguments.length >= 4 && (o.rank = r, o.order = n), fe(e, "border", o, t);
|
|
562
562
|
}
|
|
563
|
-
function
|
|
563
|
+
function Rn(e, t = er) {
|
|
564
564
|
let r = [];
|
|
565
565
|
for (let n = 0; n < e.length; n += t) {
|
|
566
566
|
let o = e.slice(n, n + t);
|
|
@@ -571,7 +571,7 @@ function An(e, t = er) {
|
|
|
571
571
|
var er = 65535;
|
|
572
572
|
function K(e, t) {
|
|
573
573
|
if (t.length > er) {
|
|
574
|
-
let r =
|
|
574
|
+
let r = Rn(t);
|
|
575
575
|
return e(...r.map((n) => e(...n)));
|
|
576
576
|
} else return e(...t);
|
|
577
577
|
}
|
|
@@ -582,7 +582,7 @@ function tr(e) {
|
|
|
582
582
|
});
|
|
583
583
|
return K(Math.max, t);
|
|
584
584
|
}
|
|
585
|
-
function
|
|
585
|
+
function An(e, t) {
|
|
586
586
|
let r = { lhs: [], rhs: [] };
|
|
587
587
|
return e.forEach((n) => {
|
|
588
588
|
t(n) ? r.lhs.push(n) : r.rhs.push(n);
|
|
@@ -599,9 +599,9 @@ function rr(e, t) {
|
|
|
599
599
|
function nr(e, t) {
|
|
600
600
|
return t();
|
|
601
601
|
}
|
|
602
|
-
var
|
|
602
|
+
var Pn = 0;
|
|
603
603
|
function He(e) {
|
|
604
|
-
let t = ++
|
|
604
|
+
let t = ++Pn;
|
|
605
605
|
return e + ("" + t);
|
|
606
606
|
}
|
|
607
607
|
function pe(e, t, r = 1) {
|
|
@@ -621,12 +621,12 @@ function Ne(e, t) {
|
|
|
621
621
|
let r;
|
|
622
622
|
return typeof t == "string" ? r = (n) => n[t] : r = t, Object.entries(e).reduce((n, [o, i]) => (n[o] = r(i, o), n), {});
|
|
623
623
|
}
|
|
624
|
-
function
|
|
624
|
+
function Bn(e, t) {
|
|
625
625
|
return e.reduce((r, n, o) => (r[n] = t[o], r), {});
|
|
626
626
|
}
|
|
627
|
-
var Ce = "\0",
|
|
627
|
+
var Ce = "\0", Wn = "3.0.0", Gn = class {
|
|
628
628
|
constructor() {
|
|
629
|
-
|
|
629
|
+
dn(this, "_sentinel");
|
|
630
630
|
let e = {};
|
|
631
631
|
e._next = e._prev = e, this._sentinel = e;
|
|
632
632
|
}
|
|
@@ -640,23 +640,23 @@ var Ce = "\0", Gn = "3.0.0", $n = class {
|
|
|
640
640
|
}
|
|
641
641
|
toString() {
|
|
642
642
|
let e = [], t = this._sentinel, r = t._prev;
|
|
643
|
-
for (; r !== t; ) e.push(JSON.stringify(r,
|
|
643
|
+
for (; r !== t; ) e.push(JSON.stringify(r, $n)), r = r._prev;
|
|
644
644
|
return "[" + e.join(", ") + "]";
|
|
645
645
|
}
|
|
646
646
|
};
|
|
647
647
|
function xt(e) {
|
|
648
648
|
e._prev._next = e._next, e._next._prev = e._prev, delete e._next, delete e._prev;
|
|
649
649
|
}
|
|
650
|
-
function
|
|
650
|
+
function $n(e, t) {
|
|
651
651
|
if (e !== "_next" && e !== "_prev") return t;
|
|
652
652
|
}
|
|
653
|
-
var
|
|
654
|
-
function
|
|
653
|
+
var Yn = Gn, Kn = () => 1;
|
|
654
|
+
function Un(e, t) {
|
|
655
655
|
if (e.nodeCount() <= 1) return [];
|
|
656
|
-
let r =
|
|
657
|
-
return
|
|
656
|
+
let r = Hn(e, t || Kn);
|
|
657
|
+
return Vn(r.graph, r.buckets, r.zeroIdx).flatMap((n) => e.outEdges(n.v, n.w) || []);
|
|
658
658
|
}
|
|
659
|
-
function
|
|
659
|
+
function Vn(e, t, r) {
|
|
660
660
|
var n;
|
|
661
661
|
let o = [], i = t[t.length - 1], s = t[0], l;
|
|
662
662
|
for (; e.nodeCount(); ) {
|
|
@@ -681,7 +681,7 @@ function ze(e, t, r, n, o) {
|
|
|
681
681
|
c.in -= d, Ge(t, r, c);
|
|
682
682
|
}), e.removeNode(n.v), s;
|
|
683
683
|
}
|
|
684
|
-
function
|
|
684
|
+
function Hn(e, t) {
|
|
685
685
|
let r = new G(), n = 0, o = 0;
|
|
686
686
|
e.nodes().forEach((l) => {
|
|
687
687
|
r.setNode(l, { v: l, in: 0, out: 0 });
|
|
@@ -691,7 +691,7 @@ function qn(e, t) {
|
|
|
691
691
|
let u = r.node(l.v), h = r.node(l.w);
|
|
692
692
|
o = Math.max(o, u.out += a), n = Math.max(n, h.in += a);
|
|
693
693
|
});
|
|
694
|
-
let i =
|
|
694
|
+
let i = qn(o + n + 3).map(() => new Yn()), s = n + 1;
|
|
695
695
|
return r.nodes().forEach((l) => {
|
|
696
696
|
Ge(i, s, r.node(l));
|
|
697
697
|
}), { graph: r, buckets: i, zeroIdx: s };
|
|
@@ -700,13 +700,13 @@ function Ge(e, t, r) {
|
|
|
700
700
|
var n, o, i;
|
|
701
701
|
r.out ? r.in ? (i = e[r.out - r.in + t]) == null || i.enqueue(r) : (o = e[e.length - 1]) == null || o.enqueue(r) : (n = e[0]) == null || n.enqueue(r);
|
|
702
702
|
}
|
|
703
|
-
function
|
|
703
|
+
function qn(e) {
|
|
704
704
|
let t = [];
|
|
705
705
|
for (let r = 0; r < e; r++) t.push(r);
|
|
706
706
|
return t;
|
|
707
707
|
}
|
|
708
|
-
function
|
|
709
|
-
(e.graph().acyclicer === "greedy" ?
|
|
708
|
+
function Xn(e) {
|
|
709
|
+
(e.graph().acyclicer === "greedy" ? Un(e, t(e)) : Jn(e)).forEach((r) => {
|
|
710
710
|
let n = e.edge(r);
|
|
711
711
|
e.removeEdge(r), n.forwardName = r.name, n.reversed = !0, e.setEdge(r.w, r.v, n, He("rev"));
|
|
712
712
|
});
|
|
@@ -714,7 +714,7 @@ function Jn(e) {
|
|
|
714
714
|
return (n) => r.edge(n).weight;
|
|
715
715
|
}
|
|
716
716
|
}
|
|
717
|
-
function
|
|
717
|
+
function Jn(e) {
|
|
718
718
|
let t = [], r = {}, n = {};
|
|
719
719
|
function o(i) {
|
|
720
720
|
Object.hasOwn(n, i) || (n[i] = !0, r[i] = !0, e.outEdges(i).forEach((s) => {
|
|
@@ -723,7 +723,7 @@ function Zn(e) {
|
|
|
723
723
|
}
|
|
724
724
|
return e.nodes().forEach(o), t;
|
|
725
725
|
}
|
|
726
|
-
function
|
|
726
|
+
function Zn(e) {
|
|
727
727
|
e.edges().forEach((t) => {
|
|
728
728
|
let r = e.edge(t);
|
|
729
729
|
if (r.reversed) {
|
|
@@ -733,10 +733,10 @@ function Qn(e) {
|
|
|
733
733
|
}
|
|
734
734
|
});
|
|
735
735
|
}
|
|
736
|
-
function
|
|
737
|
-
e.graph().dummyChains = [], e.edges().forEach((t) =>
|
|
736
|
+
function Qn(e) {
|
|
737
|
+
e.graph().dummyChains = [], e.edges().forEach((t) => eo(e, t));
|
|
738
738
|
}
|
|
739
|
-
function
|
|
739
|
+
function eo(e, t) {
|
|
740
740
|
let r = t.v, n = e.node(r).rank, o = t.w, i = e.node(o).rank, s = t.name, l = e.edge(t), d = l.labelRank;
|
|
741
741
|
if (i === n + 1) return;
|
|
742
742
|
e.removeEdge(t);
|
|
@@ -744,7 +744,7 @@ function to(e, t) {
|
|
|
744
744
|
for (u = 0, ++n; n < i; ++u, ++n) l.points = [], c = { width: 0, height: 0, edgeLabel: l, edgeObj: t, rank: n }, a = fe(e, "edge", c, "_d"), n === d && (c.width = l.width, c.height = l.height, c.dummy = "edge-label", c.labelpos = l.labelpos), e.setEdge(r, a, { weight: l.weight }, s), u === 0 && e.graph().dummyChains.push(a), r = a;
|
|
745
745
|
e.setEdge(r, o, { weight: l.weight }, s);
|
|
746
746
|
}
|
|
747
|
-
function
|
|
747
|
+
function to(e) {
|
|
748
748
|
e.graph().dummyChains.forEach((t) => {
|
|
749
749
|
let r = e.node(t), n = r.edgeLabel, o;
|
|
750
750
|
for (e.setEdge(r.edgeObj, n); r.dummy; ) o = e.successors(t)[0], e.removeNode(t), n.points.push({ x: r.x, y: r.y }), r.dummy === "edge-label" && (n.x = r.x, n.y = r.y, n.width = r.width, n.height = r.height), t = o, r = e.node(t);
|
|
@@ -764,17 +764,17 @@ function qe(e) {
|
|
|
764
764
|
function ue(e, t) {
|
|
765
765
|
return e.node(t.w).rank - e.node(t.v).rank - e.edge(t).minlen;
|
|
766
766
|
}
|
|
767
|
-
var or =
|
|
768
|
-
function
|
|
767
|
+
var or = ro;
|
|
768
|
+
function ro(e) {
|
|
769
769
|
let t = new G({ directed: !1 }), r = e.nodes();
|
|
770
770
|
if (r.length === 0) throw new Error("Graph must have at least one node");
|
|
771
771
|
let n = r[0], o = e.nodeCount();
|
|
772
772
|
t.setNode(n, {});
|
|
773
773
|
let i, s;
|
|
774
|
-
for (;
|
|
774
|
+
for (; no(t, e) < o && (i = oo(t, e), !!i); ) s = t.hasNode(i.v) ? ue(e, i) : -ue(e, i), io(t, e, s);
|
|
775
775
|
return t;
|
|
776
776
|
}
|
|
777
|
-
function
|
|
777
|
+
function no(e, t) {
|
|
778
778
|
function r(n) {
|
|
779
779
|
let o = t.nodeEdges(n);
|
|
780
780
|
o && o.forEach((i) => {
|
|
@@ -784,16 +784,16 @@ function oo(e, t) {
|
|
|
784
784
|
}
|
|
785
785
|
return e.nodes().forEach(r), e.nodeCount();
|
|
786
786
|
}
|
|
787
|
-
function
|
|
787
|
+
function oo(e, t) {
|
|
788
788
|
return t.edges().reduce((r, n) => {
|
|
789
789
|
let o = Number.POSITIVE_INFINITY;
|
|
790
790
|
return e.hasNode(n.v) !== e.hasNode(n.w) && (o = ue(t, n)), o < r[0] ? [o, n] : r;
|
|
791
791
|
}, [Number.POSITIVE_INFINITY, null])[1];
|
|
792
792
|
}
|
|
793
|
-
function
|
|
793
|
+
function io(e, t, r) {
|
|
794
794
|
e.nodes().forEach((n) => t.node(n).rank += r);
|
|
795
795
|
}
|
|
796
|
-
var { preorder:
|
|
796
|
+
var { preorder: so, postorder: lo } = Ve, ao = se;
|
|
797
797
|
se.initLowLimValues = Je;
|
|
798
798
|
se.initCutValues = Xe;
|
|
799
799
|
se.calcCutValue = ir;
|
|
@@ -801,17 +801,17 @@ se.leaveEdge = lr;
|
|
|
801
801
|
se.enterEdge = ar;
|
|
802
802
|
se.exchangeEdges = dr;
|
|
803
803
|
function se(e) {
|
|
804
|
-
e =
|
|
804
|
+
e = zn(e), qe(e);
|
|
805
805
|
let t = or(e);
|
|
806
806
|
Je(t), Xe(t, e);
|
|
807
807
|
let r, n;
|
|
808
808
|
for (; r = lr(t); ) n = ar(t, e, r), dr(t, e, r, n);
|
|
809
809
|
}
|
|
810
810
|
function Xe(e, t) {
|
|
811
|
-
let r =
|
|
812
|
-
r = r.slice(0, r.length - 1), r.forEach((n) =>
|
|
811
|
+
let r = lo(e, e.nodes());
|
|
812
|
+
r = r.slice(0, r.length - 1), r.forEach((n) => co(e, t, n));
|
|
813
813
|
}
|
|
814
|
-
function
|
|
814
|
+
function co(e, t, r) {
|
|
815
815
|
let n = e.node(r).parent, o = e.edge(r, n);
|
|
816
816
|
o.cutvalue = ir(e, t, r);
|
|
817
817
|
}
|
|
@@ -823,7 +823,7 @@ function ir(e, t, r) {
|
|
|
823
823
|
let a = d.v === r, c = a ? d.w : d.v;
|
|
824
824
|
if (c !== n) {
|
|
825
825
|
let u = a === o, h = t.edge(d).weight;
|
|
826
|
-
if (s += u ? h : -h,
|
|
826
|
+
if (s += u ? h : -h, fo(e, r, c)) {
|
|
827
827
|
let g = e.edge(r, c).cutvalue;
|
|
828
828
|
s += u ? -g : g;
|
|
829
829
|
}
|
|
@@ -852,25 +852,25 @@ function ar(e, t, r) {
|
|
|
852
852
|
}
|
|
853
853
|
function dr(e, t, r, n) {
|
|
854
854
|
let o = r.v, i = r.w;
|
|
855
|
-
e.removeEdge(o, i), e.setEdge(n.v, n.w, {}), Je(e), Xe(e, t),
|
|
855
|
+
e.removeEdge(o, i), e.setEdge(n.v, n.w, {}), Je(e), Xe(e, t), uo(e, t);
|
|
856
856
|
}
|
|
857
|
-
function
|
|
857
|
+
function uo(e, t) {
|
|
858
858
|
let r = e.nodes().find((o) => !e.node(o).parent);
|
|
859
859
|
if (!r) return;
|
|
860
|
-
let n =
|
|
860
|
+
let n = so(e, [r]);
|
|
861
861
|
n = n.slice(1), n.forEach((o) => {
|
|
862
862
|
let i = e.node(o).parent, s = t.edge(o, i), l = !1;
|
|
863
863
|
s || (s = t.edge(i, o), l = !0), t.node(o).rank = t.node(i).rank + (l ? s.minlen : -s.minlen);
|
|
864
864
|
});
|
|
865
865
|
}
|
|
866
|
-
function
|
|
866
|
+
function fo(e, t, r) {
|
|
867
867
|
return e.hasEdge(t, r);
|
|
868
868
|
}
|
|
869
869
|
function _t(e, t, r) {
|
|
870
870
|
return r.low <= t.lim && t.lim <= r.lim;
|
|
871
871
|
}
|
|
872
|
-
var
|
|
873
|
-
function
|
|
872
|
+
var ho = go;
|
|
873
|
+
function go(e) {
|
|
874
874
|
let t = e.graph().ranker;
|
|
875
875
|
if (typeof t == "function") return t(e);
|
|
876
876
|
switch (t) {
|
|
@@ -878,10 +878,10 @@ function po(e) {
|
|
|
878
878
|
Tt(e);
|
|
879
879
|
break;
|
|
880
880
|
case "tight-tree":
|
|
881
|
-
|
|
881
|
+
bo(e);
|
|
882
882
|
break;
|
|
883
883
|
case "longest-path":
|
|
884
|
-
|
|
884
|
+
po(e);
|
|
885
885
|
break;
|
|
886
886
|
case "none":
|
|
887
887
|
break;
|
|
@@ -889,18 +889,18 @@ function po(e) {
|
|
|
889
889
|
Tt(e);
|
|
890
890
|
}
|
|
891
891
|
}
|
|
892
|
-
var
|
|
893
|
-
function
|
|
892
|
+
var po = qe;
|
|
893
|
+
function bo(e) {
|
|
894
894
|
qe(e), or(e);
|
|
895
895
|
}
|
|
896
896
|
function Tt(e) {
|
|
897
|
-
|
|
897
|
+
ao(e);
|
|
898
898
|
}
|
|
899
|
-
var
|
|
900
|
-
function
|
|
901
|
-
let t =
|
|
899
|
+
var yo = mo;
|
|
900
|
+
function mo(e) {
|
|
901
|
+
let t = vo(e);
|
|
902
902
|
e.graph().dummyChains.forEach((r) => {
|
|
903
|
-
let n = e.node(r), o = n.edgeObj, i =
|
|
903
|
+
let n = e.node(r), o = n.edgeObj, i = wo(e, t, o.v, o.w), s = i.path, l = i.lca, d = 0, a = s[d], c = !0;
|
|
904
904
|
for (; r !== o.w; ) {
|
|
905
905
|
if (n = e.node(r), c) {
|
|
906
906
|
for (; (a = s[d]) !== l && e.node(a).maxRank < n.rank; ) d++;
|
|
@@ -914,7 +914,7 @@ function wo(e) {
|
|
|
914
914
|
}
|
|
915
915
|
});
|
|
916
916
|
}
|
|
917
|
-
function
|
|
917
|
+
function wo(e, t, r, n) {
|
|
918
918
|
let o = [], i = [], s = Math.min(t[r].low, t[n].low), l = Math.max(t[r].lim, t[n].lim), d;
|
|
919
919
|
d = r;
|
|
920
920
|
do
|
|
@@ -924,7 +924,7 @@ function vo(e, t, r, n) {
|
|
|
924
924
|
for (; (c = e.parent(c)) !== a; ) i.push(c);
|
|
925
925
|
return { path: o.concat(i.reverse()), lca: a };
|
|
926
926
|
}
|
|
927
|
-
function
|
|
927
|
+
function vo(e) {
|
|
928
928
|
let t = {}, r = 0;
|
|
929
929
|
function n(o) {
|
|
930
930
|
let i = r;
|
|
@@ -932,10 +932,10 @@ function Eo(e) {
|
|
|
932
932
|
}
|
|
933
933
|
return e.children(Ce).forEach(n), t;
|
|
934
934
|
}
|
|
935
|
-
function
|
|
936
|
-
let t = fe(e, "root", {}, "_root"), r =
|
|
935
|
+
function Eo(e) {
|
|
936
|
+
let t = fe(e, "root", {}, "_root"), r = ko(e), n = Object.values(r), o = K(Math.max, n) - 1, i = 2 * o + 1;
|
|
937
937
|
e.graph().nestingRoot = t, e.edges().forEach((l) => e.edge(l).minlen *= i);
|
|
938
|
-
let s =
|
|
938
|
+
let s = xo(e) + 1;
|
|
939
939
|
e.children(Ce).forEach((l) => cr(e, t, i, s, o, r, l)), e.graph().nodeRankFactor = i;
|
|
940
940
|
}
|
|
941
941
|
function cr(e, t, r, n, o, i, s) {
|
|
@@ -953,7 +953,7 @@ function cr(e, t, r, n, o, i, s) {
|
|
|
953
953
|
e.setEdge(a, y, { weight: v, minlen: N, nestingEdge: !0 }), e.setEdge(p, c, { weight: v, minlen: N, nestingEdge: !0 });
|
|
954
954
|
}), e.parent(s) || e.setEdge(t, a, { weight: 0, minlen: o + ((l = i[s]) != null ? l : 0) });
|
|
955
955
|
}
|
|
956
|
-
function
|
|
956
|
+
function ko(e) {
|
|
957
957
|
let t = {};
|
|
958
958
|
function r(n, o) {
|
|
959
959
|
let i = e.children(n);
|
|
@@ -961,17 +961,17 @@ function xo(e) {
|
|
|
961
961
|
}
|
|
962
962
|
return e.children(Ce).forEach((n) => r(n, 1)), t;
|
|
963
963
|
}
|
|
964
|
-
function
|
|
964
|
+
function xo(e) {
|
|
965
965
|
return e.edges().reduce((t, r) => t + e.edge(r).weight, 0);
|
|
966
966
|
}
|
|
967
|
-
function
|
|
967
|
+
function _o(e) {
|
|
968
968
|
let t = e.graph();
|
|
969
969
|
e.removeNode(t.nestingRoot), delete t.nestingRoot, e.edges().forEach((r) => {
|
|
970
970
|
e.edge(r).nestingEdge && e.removeEdge(r);
|
|
971
971
|
});
|
|
972
972
|
}
|
|
973
|
-
var
|
|
974
|
-
function
|
|
973
|
+
var To = No;
|
|
974
|
+
function No(e) {
|
|
975
975
|
function t(r) {
|
|
976
976
|
let n = e.children(r), o = e.node(r);
|
|
977
977
|
if (n.length && n.forEach(t), Object.hasOwn(o, "minRank")) {
|
|
@@ -985,15 +985,15 @@ function Nt(e, t, r, n, o, i) {
|
|
|
985
985
|
let s = { width: 0, height: 0, rank: i, borderType: t }, l = o[t][i - 1], d = fe(e, "border", s, r);
|
|
986
986
|
o[t][i] = d, e.setParent(d, n), l && e.setEdge(l, d, { weight: 1 });
|
|
987
987
|
}
|
|
988
|
-
function
|
|
988
|
+
function Co(e) {
|
|
989
989
|
var t;
|
|
990
990
|
let r = (t = e.graph().rankdir) == null ? void 0 : t.toLowerCase();
|
|
991
991
|
(r === "lr" || r === "rl") && ur(e);
|
|
992
992
|
}
|
|
993
|
-
function
|
|
993
|
+
function So(e) {
|
|
994
994
|
var t;
|
|
995
995
|
let r = (t = e.graph().rankdir) == null ? void 0 : t.toLowerCase();
|
|
996
|
-
(r === "bt" || r === "rl") &&
|
|
996
|
+
(r === "bt" || r === "rl") && Io(e), (r === "lr" || r === "rl") && (Oo(e), ur(e));
|
|
997
997
|
}
|
|
998
998
|
function ur(e) {
|
|
999
999
|
e.nodes().forEach((t) => Ct(e.node(t))), e.edges().forEach((t) => Ct(e.edge(t)));
|
|
@@ -1002,24 +1002,24 @@ function Ct(e) {
|
|
|
1002
1002
|
let t = e.width;
|
|
1003
1003
|
e.width = e.height, e.height = t;
|
|
1004
1004
|
}
|
|
1005
|
-
function
|
|
1006
|
-
e.nodes().forEach((t) =>
|
|
1005
|
+
function Io(e) {
|
|
1006
|
+
e.nodes().forEach((t) => De(e.node(t))), e.edges().forEach((t) => {
|
|
1007
1007
|
var r;
|
|
1008
1008
|
let n = e.edge(t);
|
|
1009
|
-
(r = n.points) == null || r.forEach(
|
|
1009
|
+
(r = n.points) == null || r.forEach(De), Object.hasOwn(n, "y") && De(n);
|
|
1010
1010
|
});
|
|
1011
1011
|
}
|
|
1012
|
-
function
|
|
1012
|
+
function De(e) {
|
|
1013
1013
|
e.y = -e.y;
|
|
1014
1014
|
}
|
|
1015
|
-
function
|
|
1016
|
-
e.nodes().forEach((t) =>
|
|
1015
|
+
function Oo(e) {
|
|
1016
|
+
e.nodes().forEach((t) => Le(e.node(t))), e.edges().forEach((t) => {
|
|
1017
1017
|
var r;
|
|
1018
1018
|
let n = e.edge(t);
|
|
1019
|
-
(r = n.points) == null || r.forEach(
|
|
1019
|
+
(r = n.points) == null || r.forEach(Le), Object.hasOwn(n, "x") && Le(n);
|
|
1020
1020
|
});
|
|
1021
1021
|
}
|
|
1022
|
-
function
|
|
1022
|
+
function Le(e) {
|
|
1023
1023
|
let t = e.x;
|
|
1024
1024
|
e.x = e.y, e.y = t;
|
|
1025
1025
|
}
|
|
@@ -1035,13 +1035,13 @@ function jo(e) {
|
|
|
1035
1035
|
}
|
|
1036
1036
|
return r.sort((l, d) => e.node(l).rank - e.node(d).rank).forEach(s), i;
|
|
1037
1037
|
}
|
|
1038
|
-
function
|
|
1038
|
+
function Mo(e, t) {
|
|
1039
1039
|
let r = 0;
|
|
1040
|
-
for (let n = 1; n < t.length; ++n) r +=
|
|
1040
|
+
for (let n = 1; n < t.length; ++n) r += Fo(e, t[n - 1], t[n]);
|
|
1041
1041
|
return r;
|
|
1042
1042
|
}
|
|
1043
|
-
function
|
|
1044
|
-
let n =
|
|
1043
|
+
function Fo(e, t, r) {
|
|
1044
|
+
let n = Bn(r, r.map((a, c) => c)), o = t.flatMap((a) => {
|
|
1045
1045
|
let c = e.outEdges(a);
|
|
1046
1046
|
return c ? c.map((u) => ({ pos: n[u.w], weight: e.edge(u).weight })).sort((u, h) => u.pos - h.pos) : [];
|
|
1047
1047
|
}), i = 1;
|
|
@@ -1057,7 +1057,7 @@ function zo(e, t, r) {
|
|
|
1057
1057
|
d += a.weight * u;
|
|
1058
1058
|
}), d;
|
|
1059
1059
|
}
|
|
1060
|
-
function
|
|
1060
|
+
function zo(e, t = []) {
|
|
1061
1061
|
return t.map((r) => {
|
|
1062
1062
|
let n = e.inEdges(r);
|
|
1063
1063
|
if (!n || !n.length) return { v: r };
|
|
@@ -1086,7 +1086,7 @@ function Lo(e) {
|
|
|
1086
1086
|
let t = [];
|
|
1087
1087
|
function r(o) {
|
|
1088
1088
|
return (i) => {
|
|
1089
|
-
i.merged || (i.barycenter === void 0 || o.barycenter === void 0 || i.barycenter >= o.barycenter) &&
|
|
1089
|
+
i.merged || (i.barycenter === void 0 || o.barycenter === void 0 || i.barycenter >= o.barycenter) && Ro(o, i);
|
|
1090
1090
|
};
|
|
1091
1091
|
}
|
|
1092
1092
|
function n(o) {
|
|
@@ -1100,13 +1100,13 @@ function Lo(e) {
|
|
|
1100
1100
|
}
|
|
1101
1101
|
return t.filter((o) => !o.merged).map((o) => Te(o, ["vs", "i", "barycenter", "weight"]));
|
|
1102
1102
|
}
|
|
1103
|
-
function
|
|
1103
|
+
function Ro(e, t) {
|
|
1104
1104
|
let r = 0, n = 0;
|
|
1105
1105
|
e.weight && (r += e.barycenter * e.weight, n += e.weight), t.weight && (r += t.barycenter * t.weight, n += t.weight), e.vs = t.vs.concat(e.vs), e.barycenter = r / n, e.weight = n, e.i = Math.min(t.i, e.i), t.merged = !0;
|
|
1106
1106
|
}
|
|
1107
|
-
function
|
|
1108
|
-
let r =
|
|
1109
|
-
n.sort(
|
|
1107
|
+
function Ao(e, t) {
|
|
1108
|
+
let r = An(e, (c) => Object.hasOwn(c, "barycenter")), n = r.lhs, o = r.rhs.sort((c, u) => u.i - c.i), i = [], s = 0, l = 0, d = 0;
|
|
1109
|
+
n.sort(Po(!!t)), d = St(i, o, d), n.forEach((c) => {
|
|
1110
1110
|
d += c.vs.length, i.push(c.vs), s += c.barycenter * c.weight, l += c.weight, d = St(i, o, d);
|
|
1111
1111
|
});
|
|
1112
1112
|
let a = { vs: i.flat(1) };
|
|
@@ -1117,22 +1117,22 @@ function St(e, t, r) {
|
|
|
1117
1117
|
for (; t.length && (n = t[t.length - 1]).i <= r; ) t.pop(), e.push(n.vs), r++;
|
|
1118
1118
|
return r;
|
|
1119
1119
|
}
|
|
1120
|
-
function
|
|
1120
|
+
function Po(e) {
|
|
1121
1121
|
return (t, r) => t.barycenter < r.barycenter ? -1 : t.barycenter > r.barycenter ? 1 : e ? r.i - t.i : t.i - r.i;
|
|
1122
1122
|
}
|
|
1123
1123
|
function fr(e, t, r, n) {
|
|
1124
1124
|
let o = e.children(t), i = e.node(t), s = i ? i.borderLeft : void 0, l = i ? i.borderRight : void 0, d = {};
|
|
1125
1125
|
s && (o = o.filter((h) => h !== s && h !== l));
|
|
1126
|
-
let a =
|
|
1126
|
+
let a = zo(e, o);
|
|
1127
1127
|
a.forEach((h) => {
|
|
1128
1128
|
if (e.children(h.v).length) {
|
|
1129
1129
|
let g = fr(e, h.v, r, n);
|
|
1130
|
-
d[h.v] = g, Object.hasOwn(g, "barycenter") &&
|
|
1130
|
+
d[h.v] = g, Object.hasOwn(g, "barycenter") && Wo(h, g);
|
|
1131
1131
|
}
|
|
1132
1132
|
});
|
|
1133
1133
|
let c = Do(a, r);
|
|
1134
|
-
|
|
1135
|
-
let u =
|
|
1134
|
+
Bo(c, d);
|
|
1135
|
+
let u = Ao(c, n);
|
|
1136
1136
|
if (s && l) {
|
|
1137
1137
|
u.vs = [s, u.vs, l].flat(1);
|
|
1138
1138
|
let h = e.predecessors(s);
|
|
@@ -1143,17 +1143,17 @@ function fr(e, t, r, n) {
|
|
|
1143
1143
|
}
|
|
1144
1144
|
return u;
|
|
1145
1145
|
}
|
|
1146
|
-
function
|
|
1146
|
+
function Bo(e, t) {
|
|
1147
1147
|
e.forEach((r) => {
|
|
1148
1148
|
r.vs = r.vs.flatMap((n) => t[n] ? t[n].vs : n);
|
|
1149
1149
|
});
|
|
1150
1150
|
}
|
|
1151
|
-
function
|
|
1151
|
+
function Wo(e, t) {
|
|
1152
1152
|
e.barycenter !== void 0 ? (e.barycenter = (e.barycenter * e.weight + t.barycenter * t.weight) / (e.weight + t.weight), e.weight += t.weight) : (e.barycenter = t.barycenter, e.weight = t.weight);
|
|
1153
1153
|
}
|
|
1154
|
-
function
|
|
1154
|
+
function Go(e, t, r, n) {
|
|
1155
1155
|
n || (n = e.nodes());
|
|
1156
|
-
let o =
|
|
1156
|
+
let o = $o(e), i = new G({ compound: !0 }).setGraph({ root: o }).setDefaultNodeLabel((s) => e.node(s));
|
|
1157
1157
|
return n.forEach((s) => {
|
|
1158
1158
|
let l = e.node(s), d = e.parent(s);
|
|
1159
1159
|
if (l.rank === t || l.minRank <= t && t <= l.maxRank) {
|
|
@@ -1166,12 +1166,12 @@ function $o(e, t, r, n) {
|
|
|
1166
1166
|
}
|
|
1167
1167
|
}), i;
|
|
1168
1168
|
}
|
|
1169
|
-
function
|
|
1169
|
+
function $o(e) {
|
|
1170
1170
|
let t;
|
|
1171
1171
|
for (; e.hasNode(t = He("_root")); ) ;
|
|
1172
1172
|
return t;
|
|
1173
1173
|
}
|
|
1174
|
-
function
|
|
1174
|
+
function Yo(e, t, r) {
|
|
1175
1175
|
let n = {}, o;
|
|
1176
1176
|
r.forEach((i) => {
|
|
1177
1177
|
let s = e.parent(i), l, d;
|
|
@@ -1193,8 +1193,8 @@ function hr(e, t = {}) {
|
|
|
1193
1193
|
if (Ot(e, i), t.disableOptimalOrderHeuristic) return;
|
|
1194
1194
|
let s = Number.POSITIVE_INFINITY, l, d = t.constraints || [];
|
|
1195
1195
|
for (let a = 0, c = 0; c < 4; ++a, ++c) {
|
|
1196
|
-
|
|
1197
|
-
let u =
|
|
1196
|
+
Ko(a % 2 ? n : o, a % 4 >= 2, d), i = ye(e);
|
|
1197
|
+
let u = Mo(e, i);
|
|
1198
1198
|
u < s ? (c = 0, l = Object.assign({}, i), s = u) : u === s && (l = structuredClone(i));
|
|
1199
1199
|
}
|
|
1200
1200
|
Ot(e, l);
|
|
@@ -1208,26 +1208,26 @@ function It(e, t, r) {
|
|
|
1208
1208
|
if (typeof s.rank == "number" && o(s.rank, i), typeof s.minRank == "number" && typeof s.maxRank == "number") for (let l = s.minRank; l <= s.maxRank; l++) l !== s.rank && o(l, i);
|
|
1209
1209
|
}
|
|
1210
1210
|
return t.map(function(i) {
|
|
1211
|
-
return
|
|
1211
|
+
return Go(e, i, r, n.get(i) || []);
|
|
1212
1212
|
});
|
|
1213
1213
|
}
|
|
1214
|
-
function
|
|
1214
|
+
function Ko(e, t, r) {
|
|
1215
1215
|
let n = new G();
|
|
1216
1216
|
e.forEach(function(o) {
|
|
1217
1217
|
r.forEach((l) => n.setEdge(l.left, l.right));
|
|
1218
1218
|
let i = o.graph().root, s = fr(o, i, n, t);
|
|
1219
|
-
s.vs.forEach((l, d) => o.node(l).order = d),
|
|
1219
|
+
s.vs.forEach((l, d) => o.node(l).order = d), Yo(o, n, s.vs);
|
|
1220
1220
|
});
|
|
1221
1221
|
}
|
|
1222
1222
|
function Ot(e, t) {
|
|
1223
1223
|
Object.values(t).forEach((r) => r.forEach((n, o) => e.node(n).order = o));
|
|
1224
1224
|
}
|
|
1225
|
-
function
|
|
1225
|
+
function Uo(e, t) {
|
|
1226
1226
|
let r = {};
|
|
1227
1227
|
function n(o, i) {
|
|
1228
1228
|
let s = 0, l = 0, d = o.length, a = i[i.length - 1];
|
|
1229
1229
|
return i.forEach((c, u) => {
|
|
1230
|
-
let h =
|
|
1230
|
+
let h = Ho(e, c), g = h ? e.node(h).order : d;
|
|
1231
1231
|
(h || c === a) && (i.slice(l, u + 1).forEach((b) => {
|
|
1232
1232
|
let y = e.predecessors(b);
|
|
1233
1233
|
y && y.forEach((p) => {
|
|
@@ -1239,7 +1239,7 @@ function Vo(e, t) {
|
|
|
1239
1239
|
}
|
|
1240
1240
|
return t.length && t.reduce(n), r;
|
|
1241
1241
|
}
|
|
1242
|
-
function
|
|
1242
|
+
function Vo(e, t) {
|
|
1243
1243
|
let r = {};
|
|
1244
1244
|
function n(i, s, l, d, a) {
|
|
1245
1245
|
pe(s, l).forEach((c) => {
|
|
@@ -1270,7 +1270,7 @@ function Ho(e, t) {
|
|
|
1270
1270
|
}
|
|
1271
1271
|
return t.length && t.reduce(o), r;
|
|
1272
1272
|
}
|
|
1273
|
-
function
|
|
1273
|
+
function Ho(e, t) {
|
|
1274
1274
|
if (e.node(t).dummy) {
|
|
1275
1275
|
let r = e.predecessors(t);
|
|
1276
1276
|
if (r) return r.find((n) => e.node(n).dummy);
|
|
@@ -1284,7 +1284,7 @@ function gr(e, t, r) {
|
|
|
1284
1284
|
let n = e[t];
|
|
1285
1285
|
n || (e[t] = n = {}), n[r] = !0;
|
|
1286
1286
|
}
|
|
1287
|
-
function
|
|
1287
|
+
function qo(e, t, r) {
|
|
1288
1288
|
if (t > r) {
|
|
1289
1289
|
let o = t;
|
|
1290
1290
|
t = r, r = o;
|
|
@@ -1292,7 +1292,7 @@ function Xo(e, t, r) {
|
|
|
1292
1292
|
let n = e[t];
|
|
1293
1293
|
return n !== void 0 && Object.hasOwn(n, r);
|
|
1294
1294
|
}
|
|
1295
|
-
function
|
|
1295
|
+
function Xo(e, t, r, n) {
|
|
1296
1296
|
let o = {}, i = {}, s = {};
|
|
1297
1297
|
return t.forEach((l) => {
|
|
1298
1298
|
l.forEach((d, a) => {
|
|
@@ -1311,7 +1311,7 @@ function Jo(e, t, r, n) {
|
|
|
1311
1311
|
let y = u[g];
|
|
1312
1312
|
if (y === void 0) continue;
|
|
1313
1313
|
let p = s[y];
|
|
1314
|
-
if (p !== void 0 && i[a] === a && d < p && !
|
|
1314
|
+
if (p !== void 0 && i[a] === a && d < p && !qo(r, a, y)) {
|
|
1315
1315
|
let v = o[y];
|
|
1316
1316
|
v !== void 0 && (i[y] = a, i[a] = o[a] = v, d = p);
|
|
1317
1317
|
}
|
|
@@ -1320,8 +1320,8 @@ function Jo(e, t, r, n) {
|
|
|
1320
1320
|
});
|
|
1321
1321
|
}), { root: o, align: i };
|
|
1322
1322
|
}
|
|
1323
|
-
function
|
|
1324
|
-
let i = {}, s =
|
|
1323
|
+
function Jo(e, t, r, n, o = !1) {
|
|
1324
|
+
let i = {}, s = Zo(e, t, r, o), l = o ? "borderLeft" : "borderRight";
|
|
1325
1325
|
function d(g, b) {
|
|
1326
1326
|
let y = s.nodes().slice(), p = {}, v = y.pop();
|
|
1327
1327
|
for (; v; ) {
|
|
@@ -1344,8 +1344,8 @@ function Zo(e, t, r, n, o = !1) {
|
|
|
1344
1344
|
function c(g) {
|
|
1345
1345
|
let b = s.outEdges(g), y = Number.POSITIVE_INFINITY;
|
|
1346
1346
|
b && (y = b.reduce((v, N) => {
|
|
1347
|
-
let O = i[N.w],
|
|
1348
|
-
return Math.min(v, (O !== void 0 ? O : 0) - (
|
|
1347
|
+
let O = i[N.w], j = s.edge(N);
|
|
1348
|
+
return Math.min(v, (O !== void 0 ? O : 0) - (j !== void 0 ? j : 0));
|
|
1349
1349
|
}, Number.POSITIVE_INFINITY));
|
|
1350
1350
|
let p = e.node(g);
|
|
1351
1351
|
y !== Number.POSITIVE_INFINITY && p.borderType !== l && (i[g] = Math.max(i[g] !== void 0 ? i[g] : 0, y));
|
|
@@ -1362,8 +1362,8 @@ function Zo(e, t, r, n, o = !1) {
|
|
|
1362
1362
|
y !== void 0 && (i[g] = (b = i[y]) != null ? b : 0);
|
|
1363
1363
|
}), i;
|
|
1364
1364
|
}
|
|
1365
|
-
function
|
|
1366
|
-
let o = new G(), i = e.graph(), s =
|
|
1365
|
+
function Zo(e, t, r, n) {
|
|
1366
|
+
let o = new G(), i = e.graph(), s = ni(i.nodesep, i.edgesep, n);
|
|
1367
1367
|
return t.forEach((l) => {
|
|
1368
1368
|
let d;
|
|
1369
1369
|
l.forEach((a) => {
|
|
@@ -1381,18 +1381,18 @@ function Qo(e, t, r, n) {
|
|
|
1381
1381
|
});
|
|
1382
1382
|
}), o;
|
|
1383
1383
|
}
|
|
1384
|
-
function
|
|
1384
|
+
function Qo(e, t) {
|
|
1385
1385
|
return Object.values(t).reduce((r, n) => {
|
|
1386
1386
|
let o = Number.NEGATIVE_INFINITY, i = Number.POSITIVE_INFINITY;
|
|
1387
1387
|
Object.entries(n).forEach(([l, d]) => {
|
|
1388
|
-
let a =
|
|
1388
|
+
let a = oi(e, l) / 2;
|
|
1389
1389
|
o = Math.max(d + a, o), i = Math.min(d - a, i);
|
|
1390
1390
|
});
|
|
1391
1391
|
let s = o - i;
|
|
1392
1392
|
return s < r[0] && (r = [s, n]), r;
|
|
1393
1393
|
}, [Number.POSITIVE_INFINITY, null])[1];
|
|
1394
1394
|
}
|
|
1395
|
-
function
|
|
1395
|
+
function ei(e, t) {
|
|
1396
1396
|
let r = Object.values(t), n = K(Math.min, r), o = K(Math.max, r);
|
|
1397
1397
|
["u", "d"].forEach((i) => {
|
|
1398
1398
|
["l", "r"].forEach((s) => {
|
|
@@ -1403,7 +1403,7 @@ function ti(e, t) {
|
|
|
1403
1403
|
});
|
|
1404
1404
|
});
|
|
1405
1405
|
}
|
|
1406
|
-
function
|
|
1406
|
+
function ti(e, t = void 0) {
|
|
1407
1407
|
let r = e.ul;
|
|
1408
1408
|
return r ? Ne(r, (n, o) => {
|
|
1409
1409
|
var i, s;
|
|
@@ -1418,19 +1418,19 @@ function ri(e, t = void 0) {
|
|
|
1418
1418
|
return (((i = l[1]) != null ? i : 0) + ((s = l[2]) != null ? s : 0)) / 2;
|
|
1419
1419
|
}) : {};
|
|
1420
1420
|
}
|
|
1421
|
-
function
|
|
1422
|
-
let t = ye(e), r = Object.assign(
|
|
1421
|
+
function ri(e) {
|
|
1422
|
+
let t = ye(e), r = Object.assign(Uo(e, t), Vo(e, t)), n = {}, o;
|
|
1423
1423
|
["u", "d"].forEach((s) => {
|
|
1424
1424
|
o = s === "u" ? t : Object.values(t).reverse(), ["l", "r"].forEach((l) => {
|
|
1425
1425
|
l === "r" && (o = o.map((c) => Object.values(c).reverse()));
|
|
1426
|
-
let d =
|
|
1426
|
+
let d = Xo(e, o, r, (c) => (s === "u" ? e.predecessors(c) : e.successors(c)) || []), a = Jo(e, o, d.root, d.align, l === "r");
|
|
1427
1427
|
l === "r" && (a = Ne(a, (c) => -c)), n[s + l] = a;
|
|
1428
1428
|
});
|
|
1429
1429
|
});
|
|
1430
|
-
let i =
|
|
1431
|
-
return
|
|
1430
|
+
let i = Qo(e, n);
|
|
1431
|
+
return ei(n, i), ti(n, e.graph().align);
|
|
1432
1432
|
}
|
|
1433
|
-
function
|
|
1433
|
+
function ni(e, t, r) {
|
|
1434
1434
|
return (n, o, i) => {
|
|
1435
1435
|
let s = n.node(o), l = n.node(i), d = 0, a;
|
|
1436
1436
|
if (d += s.width / 2, Object.hasOwn(s, "labelpos")) switch (s.labelpos.toLowerCase()) {
|
|
@@ -1452,13 +1452,13 @@ function oi(e, t, r) {
|
|
|
1452
1452
|
return a && (d += r ? a : -a), d;
|
|
1453
1453
|
};
|
|
1454
1454
|
}
|
|
1455
|
-
function
|
|
1455
|
+
function oi(e, t) {
|
|
1456
1456
|
return e.node(t).width;
|
|
1457
1457
|
}
|
|
1458
|
-
function
|
|
1459
|
-
e = Qt(e),
|
|
1458
|
+
function ii(e) {
|
|
1459
|
+
e = Qt(e), si(e), Object.entries(ri(e)).forEach(([t, r]) => e.node(t).x = r);
|
|
1460
1460
|
}
|
|
1461
|
-
function
|
|
1461
|
+
function si(e) {
|
|
1462
1462
|
let t = ye(e), r = e.graph(), n = r.ranksep, o = r.rankalign, i = 0;
|
|
1463
1463
|
t.forEach((s) => {
|
|
1464
1464
|
let l = s.reduce((d, a) => {
|
|
@@ -1472,17 +1472,17 @@ function li(e) {
|
|
|
1472
1472
|
}), i += l + n;
|
|
1473
1473
|
});
|
|
1474
1474
|
}
|
|
1475
|
-
function
|
|
1475
|
+
function li(e, t = {}) {
|
|
1476
1476
|
let r = t.debugTiming ? rr : nr;
|
|
1477
1477
|
return r("layout", () => {
|
|
1478
|
-
let n = r(" buildLayoutGraph", () =>
|
|
1479
|
-
return r(" runLayout", () =>
|
|
1478
|
+
let n = r(" buildLayoutGraph", () => yi(e));
|
|
1479
|
+
return r(" runLayout", () => ai(n, r, t)), r(" updateInputGraph", () => di(e, n)), n;
|
|
1480
1480
|
});
|
|
1481
1481
|
}
|
|
1482
|
-
function
|
|
1483
|
-
t(" makeSpaceForEdgeLabels", () =>
|
|
1482
|
+
function ai(e, t, r) {
|
|
1483
|
+
t(" makeSpaceForEdgeLabels", () => mi(e)), t(" removeSelfEdges", () => Ci(e)), t(" acyclic", () => Xn(e)), t(" nestingGraph.run", () => Eo(e)), t(" rank", () => ho(Qt(e))), t(" injectEdgeLabelProxies", () => wi(e)), t(" removeEmptyRanks", () => Ln(e)), t(" nestingGraph.cleanup", () => _o(e)), t(" normalizeRanks", () => Dn(e)), t(" assignRankMinMax", () => vi(e)), t(" removeEdgeLabelProxies", () => Ei(e)), t(" normalize.run", () => Qn(e)), t(" parentDummyChains", () => yo(e)), t(" addBorderSegments", () => To(e)), t(" order", () => hr(e, r)), t(" insertSelfEdges", () => Si(e)), t(" adjustCoordinateSystem", () => Co(e)), t(" position", () => ii(e)), t(" positionSelfEdges", () => Ii(e)), t(" removeBorderNodes", () => Ni(e)), t(" normalize.undo", () => to(e)), t(" fixupEdgeLabelCoords", () => _i(e)), t(" undoCoordinateSystem", () => So(e)), t(" translateGraph", () => ki(e)), t(" assignNodeIntersects", () => xi(e)), t(" reversePoints", () => Ti(e)), t(" acyclic.undo", () => Zn(e));
|
|
1484
1484
|
}
|
|
1485
|
-
function
|
|
1485
|
+
function di(e, t) {
|
|
1486
1486
|
e.nodes().forEach((r) => {
|
|
1487
1487
|
let n = e.node(r), o = t.node(r);
|
|
1488
1488
|
n && (n.x = o.x, n.y = o.y, n.order = o.order, n.rank = o.rank, t.children(r).length && (n.width = o.width, n.height = o.height));
|
|
@@ -1491,29 +1491,29 @@ function ci(e, t) {
|
|
|
1491
1491
|
n.points = o.points, Object.hasOwn(o, "x") && (n.x = o.x, n.y = o.y);
|
|
1492
1492
|
}), e.graph().width = t.graph().width, e.graph().height = t.graph().height;
|
|
1493
1493
|
}
|
|
1494
|
-
var
|
|
1495
|
-
function
|
|
1494
|
+
var ci = ["nodesep", "edgesep", "ranksep", "marginx", "marginy"], ui = { ranksep: 50, edgesep: 20, nodesep: 50, rankdir: "TB", rankalign: "center" }, fi = ["acyclicer", "ranker", "rankdir", "align", "rankalign"], hi = ["width", "height", "rank"], jt = { width: 0, height: 0 }, gi = ["minlen", "weight", "width", "height", "labeloffset"], pi = { minlen: 1, weight: 1, width: 0, height: 0, labeloffset: 10, labelpos: "r" }, bi = ["labelpos"];
|
|
1495
|
+
function yi(e) {
|
|
1496
1496
|
let t = new G({ multigraph: !0, compound: !0 }), r = Ae(e.graph());
|
|
1497
|
-
return t.setGraph(Object.assign({},
|
|
1498
|
-
let o = Ae(e.node(n)), i =
|
|
1499
|
-
Object.keys(
|
|
1500
|
-
i[l] === void 0 && (i[l] =
|
|
1497
|
+
return t.setGraph(Object.assign({}, ui, Re(r, ci), Te(r, fi))), e.nodes().forEach((n) => {
|
|
1498
|
+
let o = Ae(e.node(n)), i = Re(o, hi);
|
|
1499
|
+
Object.keys(jt).forEach((l) => {
|
|
1500
|
+
i[l] === void 0 && (i[l] = jt[l]);
|
|
1501
1501
|
}), t.setNode(n, i);
|
|
1502
1502
|
let s = e.parent(n);
|
|
1503
1503
|
s !== void 0 && t.setParent(n, s);
|
|
1504
1504
|
}), e.edges().forEach((n) => {
|
|
1505
1505
|
let o = Ae(e.edge(n));
|
|
1506
|
-
t.setEdge(n, Object.assign({},
|
|
1506
|
+
t.setEdge(n, Object.assign({}, pi, Re(o, gi), Te(o, bi)));
|
|
1507
1507
|
}), t;
|
|
1508
1508
|
}
|
|
1509
|
-
function
|
|
1509
|
+
function mi(e) {
|
|
1510
1510
|
let t = e.graph();
|
|
1511
1511
|
t.ranksep /= 2, e.edges().forEach((r) => {
|
|
1512
1512
|
let n = e.edge(r);
|
|
1513
1513
|
n.minlen *= 2, n.labelpos.toLowerCase() !== "c" && (t.rankdir === "TB" || t.rankdir === "BT" ? n.width += n.labeloffset : n.height += n.labeloffset);
|
|
1514
1514
|
});
|
|
1515
1515
|
}
|
|
1516
|
-
function
|
|
1516
|
+
function wi(e) {
|
|
1517
1517
|
e.edges().forEach((t) => {
|
|
1518
1518
|
let r = e.edge(t);
|
|
1519
1519
|
if (r.width && r.height) {
|
|
@@ -1522,14 +1522,14 @@ function vi(e) {
|
|
|
1522
1522
|
}
|
|
1523
1523
|
});
|
|
1524
1524
|
}
|
|
1525
|
-
function
|
|
1525
|
+
function vi(e) {
|
|
1526
1526
|
let t = 0;
|
|
1527
1527
|
e.nodes().forEach((r) => {
|
|
1528
1528
|
let n = e.node(r);
|
|
1529
1529
|
n.borderTop && (n.minRank = e.node(n.borderTop).rank, n.maxRank = e.node(n.borderBottom).rank, t = Math.max(t, n.maxRank));
|
|
1530
1530
|
}), e.graph().maxRank = t;
|
|
1531
1531
|
}
|
|
1532
|
-
function
|
|
1532
|
+
function Ei(e) {
|
|
1533
1533
|
e.nodes().forEach((t) => {
|
|
1534
1534
|
let r = e.node(t);
|
|
1535
1535
|
if (r.dummy === "edge-proxy") {
|
|
@@ -1538,7 +1538,7 @@ function ki(e) {
|
|
|
1538
1538
|
}
|
|
1539
1539
|
});
|
|
1540
1540
|
}
|
|
1541
|
-
function
|
|
1541
|
+
function ki(e) {
|
|
1542
1542
|
let t = Number.POSITIVE_INFINITY, r = 0, n = Number.POSITIVE_INFINITY, o = 0, i = e.graph(), s = i.marginx || 0, l = i.marginy || 0;
|
|
1543
1543
|
function d(a) {
|
|
1544
1544
|
let c = a.x, u = a.y, h = a.width, g = a.height;
|
|
@@ -1557,13 +1557,13 @@ function xi(e) {
|
|
|
1557
1557
|
}), Object.hasOwn(c, "x") && (c.x -= t), Object.hasOwn(c, "y") && (c.y -= n);
|
|
1558
1558
|
}), i.width = r - t + s, i.height = o - n + l;
|
|
1559
1559
|
}
|
|
1560
|
-
function
|
|
1560
|
+
function xi(e) {
|
|
1561
1561
|
e.edges().forEach((t) => {
|
|
1562
1562
|
let r = e.edge(t), n = e.node(t.v), o = e.node(t.w), i, s;
|
|
1563
1563
|
r.points ? (i = r.points[0], s = r.points[r.points.length - 1]) : (r.points = [], i = o, s = n), r.points.unshift(Et(n, i)), r.points.push(Et(o, s));
|
|
1564
1564
|
});
|
|
1565
1565
|
}
|
|
1566
|
-
function
|
|
1566
|
+
function _i(e) {
|
|
1567
1567
|
e.edges().forEach((t) => {
|
|
1568
1568
|
let r = e.edge(t);
|
|
1569
1569
|
if (Object.hasOwn(r, "x")) switch ((r.labelpos === "l" || r.labelpos === "r") && (r.width -= r.labeloffset), r.labelpos) {
|
|
@@ -1576,13 +1576,13 @@ function Ti(e) {
|
|
|
1576
1576
|
}
|
|
1577
1577
|
});
|
|
1578
1578
|
}
|
|
1579
|
-
function
|
|
1579
|
+
function Ti(e) {
|
|
1580
1580
|
e.edges().forEach((t) => {
|
|
1581
1581
|
let r = e.edge(t);
|
|
1582
1582
|
r.reversed && r.points.reverse();
|
|
1583
1583
|
});
|
|
1584
1584
|
}
|
|
1585
|
-
function
|
|
1585
|
+
function Ni(e) {
|
|
1586
1586
|
e.nodes().forEach((t) => {
|
|
1587
1587
|
if (e.children(t).length) {
|
|
1588
1588
|
let r = e.node(t), n = e.node(r.borderTop), o = e.node(r.borderBottom), i = e.node(r.borderLeft[r.borderLeft.length - 1]), s = e.node(r.borderRight[r.borderRight.length - 1]);
|
|
@@ -1592,7 +1592,7 @@ function Ci(e) {
|
|
|
1592
1592
|
e.node(t).dummy === "border" && e.removeNode(t);
|
|
1593
1593
|
});
|
|
1594
1594
|
}
|
|
1595
|
-
function
|
|
1595
|
+
function Ci(e) {
|
|
1596
1596
|
e.edges().forEach((t) => {
|
|
1597
1597
|
if (t.v === t.w) {
|
|
1598
1598
|
let r = e.node(t.v);
|
|
@@ -1600,7 +1600,7 @@ function Si(e) {
|
|
|
1600
1600
|
}
|
|
1601
1601
|
});
|
|
1602
1602
|
}
|
|
1603
|
-
function
|
|
1603
|
+
function Si(e) {
|
|
1604
1604
|
ye(e).forEach((t) => {
|
|
1605
1605
|
let r = 0;
|
|
1606
1606
|
t.forEach((n, o) => {
|
|
@@ -1611,7 +1611,7 @@ function Ii(e) {
|
|
|
1611
1611
|
});
|
|
1612
1612
|
});
|
|
1613
1613
|
}
|
|
1614
|
-
function
|
|
1614
|
+
function Ii(e) {
|
|
1615
1615
|
e.nodes().forEach((t) => {
|
|
1616
1616
|
let r = e.node(t);
|
|
1617
1617
|
if (r.dummy === "selfedge") {
|
|
@@ -1620,7 +1620,7 @@ function Oi(e) {
|
|
|
1620
1620
|
}
|
|
1621
1621
|
});
|
|
1622
1622
|
}
|
|
1623
|
-
function
|
|
1623
|
+
function Re(e, t) {
|
|
1624
1624
|
return Ne(Te(e, t), Number);
|
|
1625
1625
|
}
|
|
1626
1626
|
function Ae(e) {
|
|
@@ -1629,7 +1629,7 @@ function Ae(e) {
|
|
|
1629
1629
|
typeof r == "string" && (r = r.toLowerCase()), t[r] = n;
|
|
1630
1630
|
}), t;
|
|
1631
1631
|
}
|
|
1632
|
-
function
|
|
1632
|
+
function Oi(e) {
|
|
1633
1633
|
let t = ye(e), r = new G({ compound: !0, multigraph: !0 }).setGraph({});
|
|
1634
1634
|
return e.nodes().forEach((n) => {
|
|
1635
1635
|
r.setNode(n, { label: n }), r.setParent(n, "layer" + e.node(n).rank);
|
|
@@ -1638,13 +1638,13 @@ function Mi(e) {
|
|
|
1638
1638
|
r.setNode(i, { rank: "same" }), n.reduce((s, l) => (r.setEdge(s, l, { style: "invis" }), l));
|
|
1639
1639
|
}), r;
|
|
1640
1640
|
}
|
|
1641
|
-
var ji = { graphlib: Yt, version:
|
|
1641
|
+
var ji = { graphlib: Yt, version: Wn, layout: li, debug: Oi, util: { time: rr, notime: nr } }, Mt = ji;
|
|
1642
1642
|
/*! For license information please see dagre.esm.js.LEGAL.txt */
|
|
1643
|
-
const
|
|
1643
|
+
const Mi = (e) => {
|
|
1644
1644
|
const t = [];
|
|
1645
1645
|
return e.nodeInternals.forEach((r, n) => t.push(`${n}:${r.height ?? 0}`)), t.join(",");
|
|
1646
|
-
},
|
|
1647
|
-
const r = Tr(
|
|
1646
|
+
}, Fi = ({ onHeightsReady: e, nodeCount: t }) => {
|
|
1647
|
+
const r = Tr(Mi), n = pt("");
|
|
1648
1648
|
pt(0);
|
|
1649
1649
|
const { fitView: o } = Nr();
|
|
1650
1650
|
return ie(() => {
|
|
@@ -1657,13 +1657,13 @@ const Fi = (e) => {
|
|
|
1657
1657
|
Object.keys(i).length !== 0 && (n.current = r, e(i));
|
|
1658
1658
|
}, [r]), null;
|
|
1659
1659
|
}, Se = ({ isOpen: e, onClose: t, title: r, icon: n, children: o, footer: i, width: s = 600 }) => {
|
|
1660
|
-
const [l, d] =
|
|
1660
|
+
const [l, d] = M(!1), a = () => d((h) => !h), c = () => /* @__PURE__ */ m(te, { sx: { display: "flex", alignItems: "center", p: 2, pt: 3, borderBottom: "1px solid #e0e0e0", mb: 0, flexShrink: 0 }, children: [
|
|
1661
1661
|
n && /* @__PURE__ */ f(te, { sx: { mr: 1.5, display: "flex", alignItems: "center", fontSize: "1.25rem", color: "#1DBF60" }, children: n }),
|
|
1662
|
-
/* @__PURE__ */ f(
|
|
1663
|
-
/* @__PURE__ */ f(bt, { onClick: a, size: "small", sx: { mr: 1 }, title: l ? "Collapse" : "Expand", "data-testid": "expand-collapse-base-drawer-btn", children: l ? /* @__PURE__ */ f(
|
|
1664
|
-
/* @__PURE__ */ f(bt, { onClick: t, size: "small", "data-testid": "close-drawer-button", children: /* @__PURE__ */ f(
|
|
1662
|
+
/* @__PURE__ */ f("span", { style: { flexGrow: 1, fontSize: "0.875rem", fontWeight: 500, color: "#212121" }, children: r }),
|
|
1663
|
+
/* @__PURE__ */ f(bt, { onClick: a, size: "small", sx: { mr: 1 }, title: l ? "Collapse" : "Expand", "data-testid": "expand-collapse-base-drawer-btn", children: l ? /* @__PURE__ */ f(tn, {}) : /* @__PURE__ */ f(rn, {}) }),
|
|
1664
|
+
/* @__PURE__ */ f(bt, { onClick: t, size: "small", "data-testid": "close-drawer-button", children: /* @__PURE__ */ f(Pr, {}) })
|
|
1665
1665
|
] }), u = () => i ? /* @__PURE__ */ f(te, { sx: { flexShrink: 0, p: 2, borderTop: "1px solid #e0e0e0", display: "flex", justifyContent: "flex-end", gap: 2 }, children: i }) : null;
|
|
1666
|
-
return l ? /* @__PURE__ */ m(
|
|
1666
|
+
return l ? /* @__PURE__ */ m(Rr, { open: e, onClose: t, maxWidth: !1, fullWidth: !0, PaperProps: { sx: { display: "flex", flexDirection: "column", height: "80vh", boxShadow: 24, width: "750px", maxWidth: "100%" } }, children: [
|
|
1667
1667
|
/* @__PURE__ */ f(c, {}),
|
|
1668
1668
|
/* @__PURE__ */ f(te, { sx: { flexGrow: 1, overflowY: "auto", p: 0 }, children: o }),
|
|
1669
1669
|
/* @__PURE__ */ f(u, {})
|
|
@@ -1698,7 +1698,7 @@ const Fi = (e) => {
|
|
|
1698
1698
|
]
|
|
1699
1699
|
}
|
|
1700
1700
|
);
|
|
1701
|
-
},
|
|
1701
|
+
}, zi = ({ open: e, templates: t, messages: r, onSelect: n, onClose: o }) => /* @__PURE__ */ f(Se, { isOpen: e, onClose: o, title: r.addTriggerTitle, icon: /* @__PURE__ */ f(en, {}), width: 500, children: /* @__PURE__ */ m(te, { sx: { p: 2 }, children: [
|
|
1702
1702
|
/* @__PURE__ */ f("p", { className: "ff-text-muted ff-mb-3", style: { fontSize: 13 }, children: r.chooseTrigger }),
|
|
1703
1703
|
/* @__PURE__ */ m("div", { className: "ff-d-flex ff-flex-column ff-gap-2", children: [
|
|
1704
1704
|
t.map((i) => /* @__PURE__ */ m(
|
|
@@ -1719,7 +1719,7 @@ const Fi = (e) => {
|
|
|
1719
1719
|
s.currentTarget.style.background = "";
|
|
1720
1720
|
},
|
|
1721
1721
|
children: [
|
|
1722
|
-
/* @__PURE__ */ f("div", { style: { color: i.triggerCategory === "scheduler" ? "#1976d2" : "#f57c00", marginTop: 2, flexShrink: 0 }, children: i.triggerCategory === "scheduler" ? /* @__PURE__ */ f(
|
|
1722
|
+
/* @__PURE__ */ f("div", { style: { color: i.triggerCategory === "scheduler" ? "#1976d2" : "#f57c00", marginTop: 2, flexShrink: 0 }, children: i.triggerCategory === "scheduler" ? /* @__PURE__ */ f(Br, { size: 18 }) : /* @__PURE__ */ f(Wr, { size: 18 }) }),
|
|
1723
1723
|
/* @__PURE__ */ m("div", { children: [
|
|
1724
1724
|
/* @__PURE__ */ f("div", { style: { fontSize: 14, fontWeight: 600, color: "#212121" }, children: i.label }),
|
|
1725
1725
|
i.description && /* @__PURE__ */ f("div", { style: { fontSize: 12, color: "#757575", marginTop: 2 }, children: i.description })
|
|
@@ -1749,7 +1749,7 @@ const Fi = (e) => {
|
|
|
1749
1749
|
} else
|
|
1750
1750
|
h.push(g);
|
|
1751
1751
|
return { apps: [...u.values()], ungrouped: h };
|
|
1752
|
-
}, [t]), [l, d] =
|
|
1752
|
+
}, [t]), [l, d] = M(null), a = l ? i.find((u) => u.key === l) ?? null : null;
|
|
1753
1753
|
ie(() => {
|
|
1754
1754
|
e || d(null);
|
|
1755
1755
|
}, [e]), ie(() => {
|
|
@@ -1762,7 +1762,7 @@ const Fi = (e) => {
|
|
|
1762
1762
|
isOpen: e,
|
|
1763
1763
|
onClose: o,
|
|
1764
1764
|
title: c ? r.addStepTitle : a.label,
|
|
1765
|
-
icon: c ? /* @__PURE__ */ f(
|
|
1765
|
+
icon: c ? /* @__PURE__ */ f($r, {}) : a.icon ?? /* @__PURE__ */ f(Yr, {}),
|
|
1766
1766
|
width: 500,
|
|
1767
1767
|
children: /* @__PURE__ */ m(te, { sx: { p: 2 }, children: [
|
|
1768
1768
|
!c && /* @__PURE__ */ m(
|
|
@@ -1777,13 +1777,13 @@ const Fi = (e) => {
|
|
|
1777
1777
|
className: "ff-d-flex ff-align-items-center ff-gap-1 ff-mb-3",
|
|
1778
1778
|
style: { cursor: "pointer", color: "#0066cc", fontSize: 13, fontWeight: 500, width: "fit-content" },
|
|
1779
1779
|
children: [
|
|
1780
|
-
/* @__PURE__ */ f(
|
|
1780
|
+
/* @__PURE__ */ f(Gr, { size: 16 }),
|
|
1781
1781
|
/* @__PURE__ */ f("span", { children: r.addStepTitle })
|
|
1782
1782
|
]
|
|
1783
1783
|
}
|
|
1784
1784
|
),
|
|
1785
1785
|
/* @__PURE__ */ f("p", { className: "ff-text-muted ff-mb-3", style: { fontSize: 13 }, children: c ? r.chooseAction : `Pick an action from ${a.label}` }),
|
|
1786
|
-
/* @__PURE__ */ f("div", { className: "ff-d-flex ff-flex-column ff-gap-2", children: c ? /* @__PURE__ */ m(
|
|
1786
|
+
/* @__PURE__ */ f("div", { className: "ff-d-flex ff-flex-column ff-gap-2", children: c ? /* @__PURE__ */ m(Rt, { children: [
|
|
1787
1787
|
i.map((u) => /* @__PURE__ */ m(
|
|
1788
1788
|
"div",
|
|
1789
1789
|
{
|
|
@@ -1804,7 +1804,7 @@ const Fi = (e) => {
|
|
|
1804
1804
|
children: [
|
|
1805
1805
|
u.icon && /* @__PURE__ */ f("div", { style: { flexShrink: 0 }, children: u.icon }),
|
|
1806
1806
|
/* @__PURE__ */ m("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
1807
|
-
/* @__PURE__ */ f("div", { style: { fontSize: 14, fontWeight:
|
|
1807
|
+
/* @__PURE__ */ f("div", { style: { fontSize: 14, fontWeight: 500, color: "#212121" }, children: u.label }),
|
|
1808
1808
|
/* @__PURE__ */ f("div", { style: { fontSize: 12, color: "#757575", marginTop: 2 }, children: u.description ?? `${u.descriptors.length} action${u.descriptors.length === 1 ? "" : "s"}` })
|
|
1809
1809
|
] }),
|
|
1810
1810
|
/* @__PURE__ */ f(At, { size: 18, color: "#9e9e9e" })
|
|
@@ -1868,7 +1868,7 @@ const Fi = (e) => {
|
|
|
1868
1868
|
}
|
|
1869
1869
|
);
|
|
1870
1870
|
}, Ft = "_conditionConfig", Li = ({ open: e, nodeId: t, descriptor: r, initialValues: n, messages: o, onSave: i, onClose: s }) => {
|
|
1871
|
-
const [l, d] =
|
|
1871
|
+
const [l, d] = M([]), [a, c] = M(!1), [u, h] = M(null), [g, b] = M({});
|
|
1872
1872
|
ie(() => {
|
|
1873
1873
|
b((n == null ? void 0 : n[Ft]) ?? {});
|
|
1874
1874
|
}, [n, t]), ie(() => {
|
|
@@ -1878,15 +1878,28 @@ const Fi = (e) => {
|
|
|
1878
1878
|
return;
|
|
1879
1879
|
}
|
|
1880
1880
|
const O = r.formSchema;
|
|
1881
|
-
return typeof O == "function" ? (c(!0), O(t).then((
|
|
1882
|
-
N || (d(
|
|
1883
|
-
}).catch((
|
|
1884
|
-
N || (d([]), h(
|
|
1881
|
+
return typeof O == "function" ? (c(!0), O(t).then((j) => {
|
|
1882
|
+
N || (d(j), c(!1));
|
|
1883
|
+
}).catch((j) => {
|
|
1884
|
+
N || (d([]), h(j instanceof Error ? j.message : "Unable to load configuration."), c(!1));
|
|
1885
1885
|
})) : (d(O), c(!1)), () => {
|
|
1886
1886
|
N = !0;
|
|
1887
1887
|
};
|
|
1888
1888
|
}, [r, t]);
|
|
1889
|
-
const y = t ? `node-config-form-${t}` : "node-config-form", p = !a && !u && l.length > 0
|
|
1889
|
+
const y = t ? `node-config-form-${t}` : "node-config-form", p = !a && !u && l.length > 0;
|
|
1890
|
+
console.log("[FF-NCD] render", {
|
|
1891
|
+
open: e,
|
|
1892
|
+
nodeId: t,
|
|
1893
|
+
descriptorType: r == null ? void 0 : r.type,
|
|
1894
|
+
schemaLength: l.length,
|
|
1895
|
+
schemaFieldTypes: l.map((N) => `${N.id}:${N.type}`),
|
|
1896
|
+
loading: a,
|
|
1897
|
+
error: u,
|
|
1898
|
+
hasForm: p,
|
|
1899
|
+
initialValues: n,
|
|
1900
|
+
conditionConfigKeys: Object.keys(g)
|
|
1901
|
+
});
|
|
1902
|
+
const v = p ? /* @__PURE__ */ m(Rt, { children: [
|
|
1890
1903
|
/* @__PURE__ */ f(yt, { type: "button", variant: "outlined", size: "small", onClick: s, children: o.cancel }),
|
|
1891
1904
|
/* @__PURE__ */ f(yt, { type: "submit", form: y, variant: "contained", size: "small", children: o.save })
|
|
1892
1905
|
] }) : null;
|
|
@@ -1904,7 +1917,7 @@ const Fi = (e) => {
|
|
|
1904
1917
|
!a && u && /* @__PURE__ */ f("p", { style: { fontSize: 13, color: "#d32f2f" }, children: u }),
|
|
1905
1918
|
!a && !u && l.length === 0 && /* @__PURE__ */ f("p", { className: "ff-text-muted", style: { fontSize: 13 }, children: o.noConfigurationNeeded }),
|
|
1906
1919
|
p && /* @__PURE__ */ f(
|
|
1907
|
-
|
|
1920
|
+
nn,
|
|
1908
1921
|
{
|
|
1909
1922
|
schema: { layout: "flat", fields: l },
|
|
1910
1923
|
initialValues: n ?? {},
|
|
@@ -1921,14 +1934,14 @@ const Fi = (e) => {
|
|
|
1921
1934
|
] })
|
|
1922
1935
|
}
|
|
1923
1936
|
);
|
|
1924
|
-
},
|
|
1937
|
+
}, Ri = ({
|
|
1925
1938
|
isOpen: e,
|
|
1926
1939
|
onClose: t,
|
|
1927
1940
|
workflowId: r,
|
|
1928
1941
|
workflowLabel: n,
|
|
1929
1942
|
onFetchWorkflow: o
|
|
1930
1943
|
}) => {
|
|
1931
|
-
const [i, s] =
|
|
1944
|
+
const [i, s] = M({ status: "idle" });
|
|
1932
1945
|
return ie(() => {
|
|
1933
1946
|
if (!e || !r) {
|
|
1934
1947
|
s({ status: "idle" });
|
|
@@ -1941,7 +1954,7 @@ const Fi = (e) => {
|
|
|
1941
1954
|
isOpen: e,
|
|
1942
1955
|
onClose: t,
|
|
1943
1956
|
title: n ? `Preview: ${n}` : "Sub-Workflow Preview",
|
|
1944
|
-
icon: /* @__PURE__ */ f(
|
|
1957
|
+
icon: /* @__PURE__ */ f(Ur, { size: 18, color: "#00695c" }),
|
|
1945
1958
|
width: 700,
|
|
1946
1959
|
children: /* @__PURE__ */ m("div", { style: { height: "100%", display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", padding: 24 }, children: [
|
|
1947
1960
|
i.status === "idle" && /* @__PURE__ */ f("span", { style: { color: "#9e9e9e", fontSize: 14 }, children: "Select a workflow to preview" }),
|
|
@@ -1951,18 +1964,18 @@ const Fi = (e) => {
|
|
|
1951
1964
|
/* @__PURE__ */ f("style", { children: "@keyframes spin { to { transform: rotate(360deg); } }" })
|
|
1952
1965
|
] }),
|
|
1953
1966
|
i.status === "error" && /* @__PURE__ */ m("div", { style: { textAlign: "center", color: "#c62828" }, children: [
|
|
1954
|
-
/* @__PURE__ */ f(
|
|
1967
|
+
/* @__PURE__ */ f(Kr, { size: 32, style: { marginBottom: 8 } }),
|
|
1955
1968
|
/* @__PURE__ */ f("p", { style: { margin: 0, fontSize: 14 }, children: i.message })
|
|
1956
1969
|
] }),
|
|
1957
|
-
i.status === "loaded" && /* @__PURE__ */ f("div", { style: { width: "100%", flex: 1 }, children: /* @__PURE__ */ f(
|
|
1970
|
+
i.status === "loaded" && /* @__PURE__ */ f("div", { style: { width: "100%", flex: 1 }, children: /* @__PURE__ */ f(Ai, { state: i.state }) })
|
|
1958
1971
|
] })
|
|
1959
1972
|
}
|
|
1960
1973
|
);
|
|
1961
|
-
},
|
|
1962
|
-
const [t, r] =
|
|
1974
|
+
}, Ai = ({ state: e }) => {
|
|
1975
|
+
const [t, r] = M(null), [n, o] = M(null);
|
|
1963
1976
|
return ie(() => {
|
|
1964
1977
|
Promise.all([
|
|
1965
|
-
Promise.resolve().then(() =>
|
|
1978
|
+
Promise.resolve().then(() => Yi).then((i) => i.default),
|
|
1966
1979
|
import("./nodeRegistry.js").then((i) => i.nodeTypeRegistry),
|
|
1967
1980
|
import("./templateRegistry.js").then((i) => i.templateRegistry)
|
|
1968
1981
|
]).then(([i, s, l]) => {
|
|
@@ -1987,12 +2000,12 @@ const Fi = (e) => {
|
|
|
1987
2000
|
approvalNode: 90,
|
|
1988
2001
|
delayNode: 80,
|
|
1989
2002
|
notificationNode: 80
|
|
1990
|
-
},
|
|
1991
|
-
plusEdge:
|
|
2003
|
+
}, Pi = {
|
|
2004
|
+
plusEdge: Dr,
|
|
1992
2005
|
labelPlusEdge: zr,
|
|
1993
2006
|
plainEdge: Fr,
|
|
1994
|
-
edgeWithPlusLabel:
|
|
1995
|
-
gatewayBranchEdge:
|
|
2007
|
+
edgeWithPlusLabel: Mr,
|
|
2008
|
+
gatewayBranchEdge: jr
|
|
1996
2009
|
};
|
|
1997
2010
|
function zt() {
|
|
1998
2011
|
return [
|
|
@@ -2001,19 +2014,19 @@ function zt() {
|
|
|
2001
2014
|
{ id: "end", kind: "end", reactFlowType: "endNode" }
|
|
2002
2015
|
];
|
|
2003
2016
|
}
|
|
2004
|
-
function
|
|
2005
|
-
const o = new
|
|
2017
|
+
function Bi(e, t, r, n = "TB") {
|
|
2018
|
+
const o = new Mt.graphlib.Graph();
|
|
2006
2019
|
return o.setGraph({ rankdir: n, ranksep: 70, nodesep: 50 }), o.setDefaultEdgeLabel(() => ({})), e.forEach((i) => {
|
|
2007
2020
|
const s = r[i.id] ?? { width: be, height: Ke[i.type ?? ""] ?? 80 };
|
|
2008
2021
|
o.setNode(i.id, { width: s.width, height: s.height });
|
|
2009
|
-
}), t.forEach((i) => o.setEdge(i.source, i.target)),
|
|
2022
|
+
}), t.forEach((i) => o.setEdge(i.source, i.target)), Mt.layout(o), e.map((i) => {
|
|
2010
2023
|
var a, c;
|
|
2011
2024
|
const s = o.node(i.id), l = ((a = r[i.id]) == null ? void 0 : a.width) ?? be, d = ((c = r[i.id]) == null ? void 0 : c.height) ?? Ke[i.type ?? ""] ?? 80;
|
|
2012
2025
|
return { ...i, position: { x: s.x - l / 2, y: s.y - d / 2 } };
|
|
2013
2026
|
});
|
|
2014
2027
|
}
|
|
2015
2028
|
const oe = (e) => e === "filter" || e === "approval";
|
|
2016
|
-
function
|
|
2029
|
+
function Wi(e, t, r, n) {
|
|
2017
2030
|
const s = $e, l = 30, d = 30, a = {}, c = {}, u = /* @__PURE__ */ new Map();
|
|
2018
2031
|
for (const p of e) u.set(p.id, p);
|
|
2019
2032
|
for (const p of Object.values(t))
|
|
@@ -2024,19 +2037,19 @@ function Gi(e, t, r, n) {
|
|
|
2024
2037
|
return a[p] = { x: v - O.width / 2, y: N }, N + O.height;
|
|
2025
2038
|
}, g = (p, v, N) => {
|
|
2026
2039
|
let O = N;
|
|
2027
|
-
for (const
|
|
2028
|
-
O = h(
|
|
2040
|
+
for (const j of p)
|
|
2041
|
+
O = h(j.id, v, O) + s, oe(j.kind) && t[j.id] && (O = b(j.id, v, O));
|
|
2029
2042
|
return O;
|
|
2030
2043
|
}, b = (p, v, N) => {
|
|
2031
|
-
const O = v + 180,
|
|
2044
|
+
const O = v + 180, j = t[p], F = Object.keys(j), B = u.get(p), re = (B == null ? void 0 : B.branchLabels) ?? { pass: "Pass", fail: "Fail" }, he = a[p], z = n[p] ?? { height: 80 }, me = he.y + z.height, we = [];
|
|
2032
2045
|
let U = N;
|
|
2033
2046
|
return F.forEach((le, X) => {
|
|
2034
|
-
const
|
|
2047
|
+
const D = j[le], J = U;
|
|
2035
2048
|
we.push({
|
|
2036
2049
|
y: J - me,
|
|
2037
2050
|
label: re[le] ?? le,
|
|
2038
2051
|
isPass: X === 0
|
|
2039
|
-
}), U = g(
|
|
2052
|
+
}), U = g(D, O, U + d), X < F.length - 1 && (U += l);
|
|
2040
2053
|
}), c[p] = {
|
|
2041
2054
|
branches: we,
|
|
2042
2055
|
height: U - me,
|
|
@@ -2051,7 +2064,7 @@ function Gi(e, t, r, n) {
|
|
|
2051
2064
|
railSpecs: c
|
|
2052
2065
|
};
|
|
2053
2066
|
}
|
|
2054
|
-
function
|
|
2067
|
+
function Dt(e) {
|
|
2055
2068
|
return {
|
|
2056
2069
|
id: e.id,
|
|
2057
2070
|
type: e.reactFlowType,
|
|
@@ -2061,7 +2074,7 @@ function Rt(e) {
|
|
|
2061
2074
|
selectable: !1
|
|
2062
2075
|
};
|
|
2063
2076
|
}
|
|
2064
|
-
function
|
|
2077
|
+
function Gi(e, t, r, n, o) {
|
|
2065
2078
|
return {
|
|
2066
2079
|
id: `e-${e.id}-${t.id}`,
|
|
2067
2080
|
source: e.id,
|
|
@@ -2075,13 +2088,13 @@ function $i(e, t, r, n, o) {
|
|
|
2075
2088
|
}
|
|
2076
2089
|
};
|
|
2077
2090
|
}
|
|
2078
|
-
function
|
|
2091
|
+
function $i(e, t, r, n, o = {}, i = "TB", s = "horizontal") {
|
|
2079
2092
|
const l = o.edgeColor ?? "#b0bec5", d = [], a = [], c = (b, y) => {
|
|
2080
2093
|
const p = t[b];
|
|
2081
2094
|
if (!p) return;
|
|
2082
|
-
const N = y ?? { pass: "Pass", fail: "Fail" }, O = Object.keys(p),
|
|
2095
|
+
const N = y ?? { pass: "Pass", fail: "Fail" }, O = Object.keys(p), j = (F, B, re, he) => {
|
|
2083
2096
|
if (F.length !== 0) {
|
|
2084
|
-
F.forEach((z) => d.push(
|
|
2097
|
+
F.forEach((z) => d.push(Dt(z))), a.push({
|
|
2085
2098
|
id: `e-${b}-${B}-start`,
|
|
2086
2099
|
source: b,
|
|
2087
2100
|
target: F[0].id,
|
|
@@ -2090,18 +2103,18 @@ function Yi(e, t, r, n, o = {}, i = "TB", s = "horizontal") {
|
|
|
2090
2103
|
data: { branch: B, filterId: b, label: re, isFirst: he === 0, onAddStepClick: r, verticalRouting: s === "vertical" }
|
|
2091
2104
|
});
|
|
2092
2105
|
for (let z = 1; z < F.length; z++)
|
|
2093
|
-
oe(F[z - 1].kind) || a.push(
|
|
2106
|
+
oe(F[z - 1].kind) || a.push(Gi(F[z - 1], F[z], l, r, { filterId: b, branch: B }));
|
|
2094
2107
|
for (const z of F)
|
|
2095
2108
|
oe(z.kind) && t[z.id] && c(z.id, z.branchLabels);
|
|
2096
2109
|
}
|
|
2097
2110
|
};
|
|
2098
2111
|
O.forEach((F, B) => {
|
|
2099
|
-
|
|
2112
|
+
j(p[F], F, N[F] ?? F, B);
|
|
2100
2113
|
});
|
|
2101
2114
|
};
|
|
2102
2115
|
for (let b = 0; b < e.length; b++) {
|
|
2103
2116
|
const y = e[b];
|
|
2104
|
-
if (d.push(
|
|
2117
|
+
if (d.push(Dt(y)), b > 0) {
|
|
2105
2118
|
const p = e[b - 1], v = p.kind === "start" || p.kind === "addTrigger";
|
|
2106
2119
|
if (p.kind === "filter" || p.kind === "approval") continue;
|
|
2107
2120
|
a.push({
|
|
@@ -2127,8 +2140,8 @@ function Yi(e, t, r, n, o = {}, i = "TB", s = "horizontal") {
|
|
|
2127
2140
|
}), !(Object.keys(t).length > 0)) {
|
|
2128
2141
|
if (i === "LR") {
|
|
2129
2142
|
let N = Ye;
|
|
2130
|
-
return { nodes: d.map((
|
|
2131
|
-
const F = u[
|
|
2143
|
+
return { nodes: d.map((j) => {
|
|
2144
|
+
const F = u[j.id].width, B = u[j.id].height, re = { ...j, position: { x: N, y: 300 - B / 2 } };
|
|
2132
2145
|
return N += F + $e, re;
|
|
2133
2146
|
}), edges: a };
|
|
2134
2147
|
}
|
|
@@ -2140,14 +2153,14 @@ function Yi(e, t, r, n, o = {}, i = "TB", s = "horizontal") {
|
|
|
2140
2153
|
}), edges: a };
|
|
2141
2154
|
}
|
|
2142
2155
|
if (s === "vertical") {
|
|
2143
|
-
const { nodes: b, railSpecs: y } =
|
|
2156
|
+
const { nodes: b, railSpecs: y } = Wi(e, t, d, u);
|
|
2144
2157
|
return { nodes: b.map(
|
|
2145
2158
|
(v) => y[v.id] ? { ...v, data: { ...v.data, _branchRail: y[v.id] } } : v
|
|
2146
2159
|
), edges: a };
|
|
2147
2160
|
}
|
|
2148
|
-
return { nodes:
|
|
2161
|
+
return { nodes: Bi(d, a, u, i), edges: a };
|
|
2149
2162
|
}
|
|
2150
|
-
const
|
|
2163
|
+
const Lt = ({
|
|
2151
2164
|
nodeRegistry: e,
|
|
2152
2165
|
templateRegistry: t,
|
|
2153
2166
|
initialValue: r,
|
|
@@ -2170,7 +2183,7 @@ const Dt = ({
|
|
|
2170
2183
|
const {
|
|
2171
2184
|
fitView: N = !0,
|
|
2172
2185
|
fitViewPadding: O = 0.3,
|
|
2173
|
-
showControls:
|
|
2186
|
+
showControls: j = !0,
|
|
2174
2187
|
showMiniMap: F = !1,
|
|
2175
2188
|
panOnScroll: B = !0,
|
|
2176
2189
|
zoomOnScroll: re = !1,
|
|
@@ -2180,28 +2193,28 @@ const Dt = ({
|
|
|
2180
2193
|
snapGrid: we = [15, 15],
|
|
2181
2194
|
branchLayout: U = "horizontal",
|
|
2182
2195
|
nodeBody: le = "full"
|
|
2183
|
-
} = a, X = W(() =>
|
|
2196
|
+
} = a, X = W(() => on(d), [d]), [D, J] = M(() => (r == null ? void 0 : r.slots) ?? zt()), [V, Z] = M(() => (r == null ? void 0 : r.branches) ?? {}), [ae, $] = M(null), [Ie, Ze] = M(null), [de, ve] = M(null), [Oe, Qe] = M(null), [Ee, et] = M(null), [Q, tt] = M(() => {
|
|
2184
2197
|
const w = r == null ? void 0 : r.slots.find((k) => k.kind === "triggerFixed"), E = w != null && w.id.startsWith("trigger-") ? w.id.slice(8) : void 0;
|
|
2185
2198
|
return E ? t.lookup(E) ?? null : null;
|
|
2186
|
-
}), [rt, br] =
|
|
2199
|
+
}), [rt, br] = M({}), yr = Y((w) => {
|
|
2187
2200
|
br(w);
|
|
2188
|
-
}, []), mr = W(() => ({ ...Or, ...n }), [n]), wr = W(() => ({ ...
|
|
2189
|
-
const w =
|
|
2201
|
+
}, []), mr = W(() => ({ ...Or, ...n }), [n]), wr = W(() => ({ ...Pi, ...o }), [o]), vr = W(() => {
|
|
2202
|
+
const w = D.filter((k) => k.kind === "userTask").length, E = Object.values(V).flatMap((k) => Object.values(k).flat()).filter((k) => k.kind === "userTask").length;
|
|
2190
2203
|
return w + E;
|
|
2191
|
-
}, [
|
|
2192
|
-
const E =
|
|
2204
|
+
}, [D, V]), nt = b ?? (Q == null ? void 0 : Q.maxTasks), ot = nt !== void 0 && vr >= nt, ne = Y((w) => {
|
|
2205
|
+
const E = D.find((k) => k.id === w);
|
|
2193
2206
|
if (E) return E;
|
|
2194
2207
|
for (const k of Object.values(V)) {
|
|
2195
2208
|
const C = Object.values(k).flat().find((x) => x.id === w);
|
|
2196
2209
|
if (C) return C;
|
|
2197
2210
|
}
|
|
2198
2211
|
return null;
|
|
2199
|
-
}, [
|
|
2212
|
+
}, [D, V]), je = Y((w) => {
|
|
2200
2213
|
s || (Ze(w), $("nodeConfig"));
|
|
2201
2214
|
}, [s]), it = Y((w) => {
|
|
2202
2215
|
if (!s) {
|
|
2203
|
-
if (
|
|
2204
|
-
const E =
|
|
2216
|
+
if (D.some((E) => E.id === w)) {
|
|
2217
|
+
const E = D.find((k) => k.id === w);
|
|
2205
2218
|
if ((E == null ? void 0 : E.kind) === "triggerFixed") {
|
|
2206
2219
|
J(zt()), Z({}), tt(null);
|
|
2207
2220
|
return;
|
|
@@ -2229,13 +2242,13 @@ const Dt = ({
|
|
|
2229
2242
|
const T = C[x][_], S = T.findIndex((A) => A.id === w);
|
|
2230
2243
|
if (S === -1 || T[S].kind === "end") continue;
|
|
2231
2244
|
const I = T[S];
|
|
2232
|
-
let
|
|
2233
|
-
return I.kind === "filter" && ((I.id in C ? k([I], C) : []).forEach((
|
|
2245
|
+
let L = T.filter((A) => A.id !== w);
|
|
2246
|
+
return I.kind === "filter" && ((I.id in C ? k([I], C) : []).forEach((R) => delete C[R]), delete C[I.id], L.some((R) => R.kind === "end") || (L = [...L, { id: `end-${x}-${_}`, kind: "end", reactFlowType: "endNode" }])), C[x] = { ...C[x], [_]: L }, C;
|
|
2234
2247
|
}
|
|
2235
2248
|
return C;
|
|
2236
2249
|
});
|
|
2237
2250
|
}
|
|
2238
|
-
}, [s,
|
|
2251
|
+
}, [s, D]), Me = Y(() => {
|
|
2239
2252
|
s || $("triggerSelect");
|
|
2240
2253
|
}, [s]), st = Y((w, E) => {
|
|
2241
2254
|
s || ot || (ve(w), Qe(E.filterId && E.branch ? { filterId: E.filterId, branch: E.branch } : null), $("nodePicker"));
|
|
@@ -2253,8 +2266,8 @@ const Dt = ({
|
|
|
2253
2266
|
]);
|
|
2254
2267
|
}, []), at = Y(() => {
|
|
2255
2268
|
const w = e.list();
|
|
2256
|
-
return (Q != null && Q.availableTasks ? w.filter((k) => Q.availableTasks.includes(k.type)) : w).filter((k) => k.maxPerWorkflow === void 0 ? !0 :
|
|
2257
|
-
}, [e, Q,
|
|
2269
|
+
return (Q != null && Q.availableTasks ? w.filter((k) => Q.availableTasks.includes(k.type)) : w).filter((k) => k.maxPerWorkflow === void 0 ? !0 : D.filter((x) => x.descriptorType === k.type).length + Object.values(V).flatMap((x) => Object.values(x).flat()).filter((x) => x.descriptorType === k.type).length < k.maxPerWorkflow);
|
|
2270
|
+
}, [e, Q, D, V]), dt = Y((w) => {
|
|
2258
2271
|
if (!de) return;
|
|
2259
2272
|
const E = `${w.type}-${Date.now()}`, k = w.reactFlowType === "filterNode" || w.reactFlowType === "approvalNode" || w.reactFlowType === "conditionBranchNode", C = w.branchLabels ?? { pass: "Pass", fail: "Fail" }, x = {
|
|
2260
2273
|
id: E,
|
|
@@ -2280,8 +2293,8 @@ const Dt = ({
|
|
|
2280
2293
|
)
|
|
2281
2294
|
};
|
|
2282
2295
|
}
|
|
2283
|
-
const
|
|
2284
|
-
return I.splice(
|
|
2296
|
+
const L = I.findIndex((ee) => ee.id === de), A = I.findIndex((ee) => ee.kind === "end"), R = L === -1 ? A === -1 ? I.length : A : L + 1;
|
|
2297
|
+
return I.splice(R, 0, x), { ...S, [_]: { ...S[_], [T]: I } };
|
|
2285
2298
|
});
|
|
2286
2299
|
} else
|
|
2287
2300
|
k ? (J((_) => {
|
|
@@ -2301,16 +2314,16 @@ const Dt = ({
|
|
|
2301
2314
|
const k = (x) => {
|
|
2302
2315
|
const _ = ne(w);
|
|
2303
2316
|
if ((_ == null ? void 0 : _.descriptorType) !== "conditionBranch") return x;
|
|
2304
|
-
const T = E.branchConfigs ?? [], S = T.map((
|
|
2317
|
+
const T = E.branchConfigs ?? [], S = T.map((R) => R.key).filter(Boolean);
|
|
2305
2318
|
if (S.length === 0) return x;
|
|
2306
|
-
const I = x[w] ?? {},
|
|
2307
|
-
S.forEach((
|
|
2308
|
-
|
|
2319
|
+
const I = x[w] ?? {}, L = {};
|
|
2320
|
+
S.forEach((R) => {
|
|
2321
|
+
L[R] = I[R] ?? [{ id: `end-${w}-${R}`, kind: "end", reactFlowType: "endNode" }];
|
|
2309
2322
|
});
|
|
2310
2323
|
const A = {};
|
|
2311
|
-
return T.forEach((
|
|
2312
|
-
|
|
2313
|
-
}), { ...x, [w]:
|
|
2324
|
+
return T.forEach((R) => {
|
|
2325
|
+
R.key && (A[R.key] = R.label || R.key);
|
|
2326
|
+
}), { ...x, [w]: L };
|
|
2314
2327
|
}, C = (x, _) => {
|
|
2315
2328
|
if (x.descriptorType !== "conditionBranch") return { ...x, formData: _ };
|
|
2316
2329
|
const T = _.branchConfigs ?? [], S = {};
|
|
@@ -2318,7 +2331,7 @@ const Dt = ({
|
|
|
2318
2331
|
I.key && (S[I.key] = I.label || I.key);
|
|
2319
2332
|
}), { ...x, formData: _, branchLabels: S };
|
|
2320
2333
|
};
|
|
2321
|
-
if (
|
|
2334
|
+
if (D.some((x) => x.id === w)) {
|
|
2322
2335
|
Z((x) => {
|
|
2323
2336
|
const _ = k(x);
|
|
2324
2337
|
return J((T) => {
|
|
@@ -2331,16 +2344,16 @@ const Dt = ({
|
|
|
2331
2344
|
Z((x) => {
|
|
2332
2345
|
const T = { ...k(x) };
|
|
2333
2346
|
for (const S of Object.keys(T)) {
|
|
2334
|
-
const I = (
|
|
2335
|
-
for (const
|
|
2336
|
-
if (T[S][
|
|
2337
|
-
return T[S] = { ...T[S], [
|
|
2347
|
+
const I = (L) => L.map((A) => A.id === w ? C(A, E) : A);
|
|
2348
|
+
for (const L of Object.keys(T[S]))
|
|
2349
|
+
if (T[S][L].some((A) => A.id === w))
|
|
2350
|
+
return T[S] = { ...T[S], [L]: I(T[S][L]) }, i == null || i({ slots: D, branches: T }), T;
|
|
2338
2351
|
}
|
|
2339
2352
|
return T;
|
|
2340
2353
|
});
|
|
2341
|
-
}, [
|
|
2342
|
-
() =>
|
|
2343
|
-
[
|
|
2354
|
+
}, [D, V, ne, i]), H = W(() => ne(Ie ?? ""), [ne, Ie]), ut = W(() => H != null && H.descriptorType ? e.forType(H.descriptorType) ?? null : null, [H, e]), { nodes: ft, edges: Er } = W(
|
|
2355
|
+
() => $i(D, V, s ? null : st, rt, l, y, U),
|
|
2356
|
+
[D, V, s, st, rt, l, y, U]
|
|
2344
2357
|
), ht = W(() => {
|
|
2345
2358
|
const w = p ? new Map(p.steps.map((E) => [E.nodeId, E])) : null;
|
|
2346
2359
|
return ft.map((E) => {
|
|
@@ -2355,9 +2368,9 @@ const Dt = ({
|
|
|
2355
2368
|
et({ workflowId: C, workflowLabel: ((_ = x == null ? void 0 : x.formData) == null ? void 0 : _.workflowLabel) ?? void 0 });
|
|
2356
2369
|
}), Object.keys(k).length > 0 ? { ...E, data: { ...E.data, ...k } } : E;
|
|
2357
2370
|
});
|
|
2358
|
-
}, [ft, p, v, ne]), kr = W(() => ({ onEditNode:
|
|
2359
|
-
}, onClickAddTrigger:
|
|
2360
|
-
return /* @__PURE__ */ f(
|
|
2371
|
+
}, [ft, p, v, ne]), kr = W(() => ({ onEditNode: je, onDeleteNode: it, onAddStep: () => {
|
|
2372
|
+
}, onClickAddTrigger: Me, messages: X, nodeRegistry: e, nodeBody: le }), [je, it, Me, X, e, le]);
|
|
2373
|
+
return /* @__PURE__ */ f(Lr.Provider, { value: kr, children: /* @__PURE__ */ m(
|
|
2361
2374
|
"div",
|
|
2362
2375
|
{
|
|
2363
2376
|
style: {
|
|
@@ -2396,7 +2409,7 @@ const Dt = ({
|
|
|
2396
2409
|
proOptions: { hideAttribution: !0 },
|
|
2397
2410
|
onNodeClick: (w, E) => {
|
|
2398
2411
|
const k = ne(E.id);
|
|
2399
|
-
k && (g != null && g(k) || (k.kind === "addTrigger" || k.kind === "triggerFixed" ?
|
|
2412
|
+
k && (g != null && g(k) || (k.kind === "addTrigger" || k.kind === "triggerFixed" ? Me() : (k.kind === "userTask" || k.kind === "filter" || k.kind === "approval") && je(E.id)));
|
|
2400
2413
|
},
|
|
2401
2414
|
children: [
|
|
2402
2415
|
l.background !== "none" && /* @__PURE__ */ f(
|
|
@@ -2407,13 +2420,13 @@ const Dt = ({
|
|
|
2407
2420
|
gap: 20
|
|
2408
2421
|
}
|
|
2409
2422
|
),
|
|
2410
|
-
|
|
2423
|
+
j && /* @__PURE__ */ f(Sr, { showInteractive: !1 }),
|
|
2411
2424
|
F && /* @__PURE__ */ f(Ir, { zoomable: !0, pannable: !0 }),
|
|
2412
|
-
/* @__PURE__ */ f(
|
|
2425
|
+
/* @__PURE__ */ f(Fi, { onHeightsReady: yr, nodeCount: ht.length })
|
|
2413
2426
|
]
|
|
2414
2427
|
}
|
|
2415
2428
|
),
|
|
2416
|
-
c ? ae === "triggerSelect" && c(t.list(), lt, () => $(null)) : /* @__PURE__ */ f(
|
|
2429
|
+
c ? ae === "triggerSelect" && c(t.list(), lt, () => $(null)) : /* @__PURE__ */ f(zi, { open: ae === "triggerSelect", templates: t.list(), messages: X, onSelect: lt, onClose: () => $(null) }),
|
|
2417
2430
|
u ? ae === "nodePicker" && u(at(), dt, () => {
|
|
2418
2431
|
$(null), ve(null);
|
|
2419
2432
|
}) : /* @__PURE__ */ f(Di, { open: ae === "nodePicker", availableDescriptors: at(), messages: X, onSelect: dt, onClose: () => {
|
|
@@ -2421,7 +2434,7 @@ const Dt = ({
|
|
|
2421
2434
|
} }),
|
|
2422
2435
|
h ? ae === "nodeConfig" && h(ut ?? void 0, H, ct, () => $(null)) : /* @__PURE__ */ f(Li, { open: ae === "nodeConfig", nodeId: Ie, descriptor: ut, initialValues: H == null ? void 0 : H.formData, messages: X, onSave: ct, onClose: () => $(null) }),
|
|
2423
2436
|
v && Ee && /* @__PURE__ */ f(
|
|
2424
|
-
|
|
2437
|
+
Ri,
|
|
2425
2438
|
{
|
|
2426
2439
|
isOpen: !!Ee,
|
|
2427
2440
|
onClose: () => et(null),
|
|
@@ -2433,14 +2446,14 @@ const Dt = ({
|
|
|
2433
2446
|
]
|
|
2434
2447
|
}
|
|
2435
2448
|
) });
|
|
2436
|
-
},
|
|
2449
|
+
}, Yi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2437
2450
|
__proto__: null,
|
|
2438
|
-
WorkflowCanvas:
|
|
2439
|
-
default:
|
|
2451
|
+
WorkflowCanvas: Lt,
|
|
2452
|
+
default: Lt
|
|
2440
2453
|
}, Symbol.toStringTag, { value: "Module" })), We = "All";
|
|
2441
|
-
function
|
|
2454
|
+
function Ki({ template: e, onSelect: t }) {
|
|
2442
2455
|
var o, i;
|
|
2443
|
-
const r = e.triggerCategory ?
|
|
2456
|
+
const r = e.triggerCategory ? sn[e.triggerCategory] : null, n = ((o = e.skeletonState) == null ? void 0 : o.slots.filter((s) => s.kind === "userTask").length) ?? 0;
|
|
2444
2457
|
return /* @__PURE__ */ m(
|
|
2445
2458
|
"div",
|
|
2446
2459
|
{
|
|
@@ -2493,12 +2506,12 @@ function Ui({ template: e, onSelect: t }) {
|
|
|
2493
2506
|
}
|
|
2494
2507
|
);
|
|
2495
2508
|
}
|
|
2496
|
-
const
|
|
2509
|
+
const ls = ({
|
|
2497
2510
|
templates: e,
|
|
2498
2511
|
onSelectTemplate: t,
|
|
2499
2512
|
onStartFromScratch: r
|
|
2500
2513
|
}) => {
|
|
2501
|
-
const [n, o] =
|
|
2514
|
+
const [n, o] = M(""), [i, s] = M(We), l = W(() => {
|
|
2502
2515
|
const a = /* @__PURE__ */ new Set();
|
|
2503
2516
|
return e.forEach((c) => {
|
|
2504
2517
|
c.category && a.add(c.category);
|
|
@@ -2529,14 +2542,14 @@ const as = ({
|
|
|
2529
2542
|
onClick: r,
|
|
2530
2543
|
style: { display: "flex", alignItems: "center", gap: 6, padding: "8px 16px", border: "1.5px solid #1976d2", borderRadius: 6, background: "#fff", color: "#1976d2", fontSize: 13, fontWeight: 600, cursor: "pointer" },
|
|
2531
2544
|
children: [
|
|
2532
|
-
/* @__PURE__ */ f(
|
|
2545
|
+
/* @__PURE__ */ f(Vr, { size: 16 }),
|
|
2533
2546
|
"Start from Scratch"
|
|
2534
2547
|
]
|
|
2535
2548
|
}
|
|
2536
2549
|
)
|
|
2537
2550
|
] }),
|
|
2538
2551
|
/* @__PURE__ */ m("div", { style: { display: "flex", alignItems: "center", gap: 8, background: "#f5f5f5", borderRadius: 8, padding: "8px 12px", marginBottom: 12 }, children: [
|
|
2539
|
-
/* @__PURE__ */ f(
|
|
2552
|
+
/* @__PURE__ */ f(Hr, { size: 18, color: "#9e9e9e" }),
|
|
2540
2553
|
/* @__PURE__ */ f(
|
|
2541
2554
|
"input",
|
|
2542
2555
|
{
|
|
@@ -2568,17 +2581,17 @@ const as = ({
|
|
|
2568
2581
|
)) })
|
|
2569
2582
|
] }),
|
|
2570
2583
|
/* @__PURE__ */ f("div", { style: { flex: 1, overflowY: "auto", padding: 24 }, children: d.length === 0 ? /* @__PURE__ */ m("div", { style: { textAlign: "center", padding: "40px 0", color: "#9e9e9e" }, children: [
|
|
2571
|
-
/* @__PURE__ */ f(
|
|
2584
|
+
/* @__PURE__ */ f(qr, { size: 36, style: { marginBottom: 8 } }),
|
|
2572
2585
|
/* @__PURE__ */ f("p", { style: { margin: 0, fontSize: 14 }, children: "No templates found" })
|
|
2573
|
-
] }) : /* @__PURE__ */ f("div", { style: { display: "grid", gridTemplateColumns: "repeat(auto-fill, minmax(280px, 1fr))", gap: 16 }, children: d.map((a) => /* @__PURE__ */ f(
|
|
2586
|
+
] }) : /* @__PURE__ */ f("div", { style: { display: "grid", gridTemplateColumns: "repeat(auto-fill, minmax(280px, 1fr))", gap: 16 }, children: d.map((a) => /* @__PURE__ */ f(Ki, { template: a, onSelect: () => t(a) }, a.triggerKey)) }) })
|
|
2574
2587
|
] });
|
|
2575
2588
|
}, ke = {
|
|
2576
2589
|
running: { label: "Running", color: q.running, icon: P.createElement(Gt, { size: 14 }) },
|
|
2577
2590
|
success: { label: "Success", color: q.success, icon: P.createElement(Wt, { size: 14 }) },
|
|
2578
2591
|
failed: { label: "Failed", color: q.failed, icon: P.createElement(Bt, { size: 14 }) },
|
|
2579
2592
|
cancelled: { label: "Cancelled", color: q.cancelled, icon: P.createElement(Pt, { size: 14 }) }
|
|
2580
|
-
},
|
|
2581
|
-
pending: { color: q.pending, icon: P.createElement(
|
|
2593
|
+
}, Ui = {
|
|
2594
|
+
pending: { color: q.pending, icon: P.createElement(Xr, { size: 14 }) },
|
|
2582
2595
|
running: { color: q.running, icon: P.createElement(Gt, { size: 14 }) },
|
|
2583
2596
|
success: { color: q.success, icon: P.createElement(Wt, { size: 14 }) },
|
|
2584
2597
|
failed: { color: q.failed, icon: P.createElement(Bt, { size: 14 }) },
|
|
@@ -2599,8 +2612,8 @@ function pr(e, t) {
|
|
|
2599
2612
|
return "—";
|
|
2600
2613
|
}
|
|
2601
2614
|
}
|
|
2602
|
-
function
|
|
2603
|
-
const [t, r] =
|
|
2615
|
+
function Vi({ step: e }) {
|
|
2616
|
+
const [t, r] = M(!1), n = Ui[e.status], o = !!(e.inputs || e.outputs || e.error);
|
|
2604
2617
|
return /* @__PURE__ */ m("div", { style: { borderBottom: "1px solid #f5f5f5" }, children: [
|
|
2605
2618
|
/* @__PURE__ */ m(
|
|
2606
2619
|
"div",
|
|
@@ -2619,7 +2632,7 @@ function Hi({ step: e }) {
|
|
|
2619
2632
|
/* @__PURE__ */ f("span", { style: { flex: 1, fontSize: 13, color: "#212121" }, children: e.label || e.nodeId }),
|
|
2620
2633
|
e.branchTaken && /* @__PURE__ */ f("span", { style: { fontSize: 10, padding: "1px 6px", borderRadius: 10, background: "#e3f2fd", color: "#1565c0", fontWeight: 600 }, children: e.branchTaken }),
|
|
2621
2634
|
/* @__PURE__ */ f("span", { style: { fontSize: 11, color: "#9e9e9e", flexShrink: 0 }, children: e.startedAt ? pr(e.startedAt, e.completedAt) : "—" }),
|
|
2622
|
-
o && /* @__PURE__ */ f("span", { style: { color: "#9e9e9e", flexShrink: 0 }, children: t ? P.createElement(
|
|
2635
|
+
o && /* @__PURE__ */ f("span", { style: { color: "#9e9e9e", flexShrink: 0 }, children: t ? P.createElement(Zr, { size: 16 }) : P.createElement(Qr, { size: 16 }) })
|
|
2623
2636
|
]
|
|
2624
2637
|
}
|
|
2625
2638
|
),
|
|
@@ -2636,7 +2649,7 @@ function Hi({ step: e }) {
|
|
|
2636
2649
|
] })
|
|
2637
2650
|
] });
|
|
2638
2651
|
}
|
|
2639
|
-
function
|
|
2652
|
+
function Hi({ record: e, selected: t, onSelect: r }) {
|
|
2640
2653
|
const n = ke[e.status];
|
|
2641
2654
|
return /* @__PURE__ */ m(
|
|
2642
2655
|
"div",
|
|
@@ -2675,9 +2688,9 @@ function qi({ record: e, selected: t, onSelect: r }) {
|
|
|
2675
2688
|
}
|
|
2676
2689
|
);
|
|
2677
2690
|
}
|
|
2678
|
-
const
|
|
2691
|
+
const as = ({ records: e, onViewOnCanvas: t }) => {
|
|
2679
2692
|
var s;
|
|
2680
|
-
const [r, n] =
|
|
2693
|
+
const [r, n] = M(((s = e[0]) == null ? void 0 : s.id) ?? null), o = e.find((l) => l.id === r) ?? null, i = [...e].sort((l, d) => new Date(d.triggeredAt).getTime() - new Date(l.triggeredAt).getTime());
|
|
2681
2694
|
return e.length === 0 ? /* @__PURE__ */ m("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", height: 300, color: "#9e9e9e", gap: 8 }, children: [
|
|
2682
2695
|
/* @__PURE__ */ f(mt, { size: 36 }),
|
|
2683
2696
|
/* @__PURE__ */ f("p", { style: { margin: 0, fontSize: 14 }, children: "No executions yet" }),
|
|
@@ -2689,7 +2702,7 @@ const ds = ({ records: e, onViewOnCanvas: t }) => {
|
|
|
2689
2702
|
e.length,
|
|
2690
2703
|
")"
|
|
2691
2704
|
] }),
|
|
2692
|
-
i.map((l) => /* @__PURE__ */ f(
|
|
2705
|
+
i.map((l) => /* @__PURE__ */ f(Hi, { record: l, selected: l.id === r, onSelect: () => n(l.id) }, l.id))
|
|
2693
2706
|
] }),
|
|
2694
2707
|
/* @__PURE__ */ f("div", { style: { flex: 1, overflowY: "auto" }, children: o ? /* @__PURE__ */ m("div", { children: [
|
|
2695
2708
|
/* @__PURE__ */ m("div", { style: { padding: "16px 20px", borderBottom: "1px solid #f0f0f0", display: "flex", alignItems: "flex-start", justifyContent: "space-between", gap: 12 }, children: [
|
|
@@ -2706,7 +2719,7 @@ const ds = ({ records: e, onViewOnCanvas: t }) => {
|
|
|
2706
2719
|
o.completedAt && ` → ${Ue(o.completedAt)} (${pr(o.triggeredAt, o.completedAt)})`
|
|
2707
2720
|
] }),
|
|
2708
2721
|
o.triggeredBy && /* @__PURE__ */ m("span", { style: { display: "flex", alignItems: "center", gap: 4 }, children: [
|
|
2709
|
-
/* @__PURE__ */ f(
|
|
2722
|
+
/* @__PURE__ */ f(Jr, { size: 13 }),
|
|
2710
2723
|
" ",
|
|
2711
2724
|
o.triggeredBy
|
|
2712
2725
|
] })
|
|
@@ -2728,7 +2741,7 @@ const ds = ({ records: e, onViewOnCanvas: t }) => {
|
|
|
2728
2741
|
o.steps.length,
|
|
2729
2742
|
")"
|
|
2730
2743
|
] }),
|
|
2731
|
-
o.steps.map((l, d) => /* @__PURE__ */ f(
|
|
2744
|
+
o.steps.map((l, d) => /* @__PURE__ */ f(Vi, { step: l }, `${l.nodeId}-${d}`))
|
|
2732
2745
|
] }),
|
|
2733
2746
|
o.inputs && Object.keys(o.inputs).length > 0 && /* @__PURE__ */ f("div", { style: { padding: "10px 16px" }, children: /* @__PURE__ */ m("details", { children: [
|
|
2734
2747
|
/* @__PURE__ */ f("summary", { style: { cursor: "pointer", fontSize: 12, fontWeight: 600, color: "#757575", marginBottom: 6 }, children: "TRIGGER INPUTS" }),
|
|
@@ -2736,7 +2749,7 @@ const ds = ({ records: e, onViewOnCanvas: t }) => {
|
|
|
2736
2749
|
] }) })
|
|
2737
2750
|
] }) : /* @__PURE__ */ f("div", { style: { display: "flex", alignItems: "center", justifyContent: "center", height: "100%", color: "#9e9e9e", fontSize: 14 }, children: "Select a run to see details" }) })
|
|
2738
2751
|
] });
|
|
2739
|
-
},
|
|
2752
|
+
}, ds = {
|
|
2740
2753
|
slots: [
|
|
2741
2754
|
{ id: "start", kind: "start", reactFlowType: "startNode", deletable: !1 },
|
|
2742
2755
|
{ id: "trigger-END_USER_CREATION", kind: "triggerFixed", reactFlowType: "triggerNode", deletable: !0, label: "New User Registration", nodeData: { label: "New User Registration" } },
|
|
@@ -2750,7 +2763,7 @@ const ds = ({ records: e, onViewOnCanvas: t }) => {
|
|
|
2750
2763
|
fail: [{ id: "notification-fail-1", kind: "userTask", reactFlowType: "notificationNode", descriptorType: "notification", deletable: !0, label: "Rejection Notice", nodeData: { title: "Rejection Notice" } }]
|
|
2751
2764
|
}
|
|
2752
2765
|
}
|
|
2753
|
-
},
|
|
2766
|
+
}, cs = {
|
|
2754
2767
|
slots: [
|
|
2755
2768
|
{ id: "start", kind: "start", reactFlowType: "startNode", deletable: !1 },
|
|
2756
2769
|
{ id: "trigger-ACCESS_REQUEST", kind: "triggerFixed", reactFlowType: "triggerNode", deletable: !0, label: "Access Request Submitted", nodeData: { label: "Access Request Submitted" } },
|
|
@@ -2768,7 +2781,7 @@ const ds = ({ records: e, onViewOnCanvas: t }) => {
|
|
|
2768
2781
|
]
|
|
2769
2782
|
}
|
|
2770
2783
|
}
|
|
2771
|
-
},
|
|
2784
|
+
}, us = {
|
|
2772
2785
|
slots: [
|
|
2773
2786
|
{ id: "start", kind: "start", reactFlowType: "startNode", deletable: !1 },
|
|
2774
2787
|
{ id: "trigger-USER_DEACTIVATION", kind: "triggerFixed", reactFlowType: "triggerNode", deletable: !0, label: "User Deactivation", nodeData: { label: "User Deactivation" } },
|
|
@@ -2777,7 +2790,7 @@ const ds = ({ records: e, onViewOnCanvas: t }) => {
|
|
|
2777
2790
|
{ id: "end", kind: "end", reactFlowType: "endNode", deletable: !1 }
|
|
2778
2791
|
],
|
|
2779
2792
|
branches: {}
|
|
2780
|
-
},
|
|
2793
|
+
}, fs = {
|
|
2781
2794
|
slots: [
|
|
2782
2795
|
{ id: "start", kind: "start", reactFlowType: "startNode", deletable: !1 },
|
|
2783
2796
|
{ id: "trigger-WEBHOOK_TRIGGER", kind: "triggerFixed", reactFlowType: "webhookTriggerNode", deletable: !0, label: "Incoming Webhook", nodeData: { label: "Incoming Webhook" } },
|
|
@@ -2788,12 +2801,12 @@ const ds = ({ records: e, onViewOnCanvas: t }) => {
|
|
|
2788
2801
|
branches: {}
|
|
2789
2802
|
};
|
|
2790
2803
|
export {
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2804
|
+
Lt as F,
|
|
2805
|
+
Ri as S,
|
|
2806
|
+
as as W,
|
|
2807
|
+
ls as a,
|
|
2808
|
+
cs as b,
|
|
2809
|
+
us as o,
|
|
2810
|
+
ds as u,
|
|
2811
|
+
fs as w
|
|
2799
2812
|
};
|