@notmrabhi/flowforge 0.1.57 → 0.1.59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{SchemaBuilderDrawer-9m1q_f4y.js → SchemaBuilderDrawer-CJHR9dPS.js} +2 -2
- package/dist/{SchemaBuilderDrawer-9m1q_f4y.js.map → SchemaBuilderDrawer-CJHR9dPS.js.map} +1 -1
- package/dist/{SchemaBuilderDrawer-C54xKa-P.js → SchemaBuilderDrawer-CfM5EWlM.js} +2 -2
- package/dist/{SchemaBuilderDrawer-C54xKa-P.js.map → SchemaBuilderDrawer-CfM5EWlM.js.map} +1 -1
- package/dist/{WorkflowExecutionHistory-DsrLtY5i.js → WorkflowExecutionHistory-Bpw-YeJU.js} +542 -532
- package/dist/WorkflowExecutionHistory-Bpw-YeJU.js.map +1 -0
- package/dist/WorkflowExecutionHistory-CEaTBcS4.js +2 -0
- package/dist/WorkflowExecutionHistory-CEaTBcS4.js.map +1 -0
- package/dist/canvas.cjs +1 -1
- package/dist/canvas.js +1 -1
- package/dist/form.cjs +1 -1
- package/dist/form.js +2 -2
- package/dist/{index-BypSWEYO.js → index-CQkqNHY-.js} +5 -5
- package/dist/{index-BypSWEYO.js.map → index-CQkqNHY-.js.map} +1 -1
- package/dist/{index-D-ObmLY1.js → index-CicT49Ft.js} +652 -714
- package/dist/{index-D-ObmLY1.js.map → index-CicT49Ft.js.map} +1 -1
- package/dist/{index-hByI0uXP.js → index-D1Z2CD30.js} +2 -2
- package/dist/{index-hByI0uXP.js.map → index-D1Z2CD30.js.map} +1 -1
- package/dist/{index-BQHjXZIn.js → index-D6vJpiFn.js} +2 -2
- package/dist/{index-BQHjXZIn.js.map → index-D6vJpiFn.js.map} +1 -1
- package/dist/{index-b0hy-r3d.js → index-Dy4YP_j2.js} +2 -2
- package/dist/{index-b0hy-r3d.js.map → index-Dy4YP_j2.js.map} +1 -1
- package/dist/{index-DNBDuEzF.js → index-rveXnmm0.js} +2 -2
- package/dist/{index-DNBDuEzF.js.map → index-rveXnmm0.js.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +3 -3
- package/package.json +1 -1
- package/dist/WorkflowExecutionHistory-DsrLtY5i.js.map +0 -1
- package/dist/WorkflowExecutionHistory-n2xLZdI9.js +0 -2
- package/dist/WorkflowExecutionHistory-n2xLZdI9.js.map +0 -1
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { jsxs as v, jsx as u, Fragment as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { jsxs as v, jsx as u, Fragment as ye } from "react/jsx-runtime";
|
|
2
|
+
import D, { useRef as _t, useEffect as re, useState as M, useCallback as Y, useMemo as K } from "react";
|
|
3
|
+
import Bn, { useStore as Wn, useReactFlow as $n, Background as Gn, Controls as Yn, MiniMap as Kn } from "reactflow";
|
|
4
4
|
import "reactflow/dist/style.css";
|
|
5
|
-
import { e as
|
|
6
|
-
import { Dialog as
|
|
7
|
-
import
|
|
8
|
-
import { MdClose as
|
|
9
|
-
import { GrTrigger as
|
|
10
|
-
import { BiCollapse as
|
|
11
|
-
import { j as
|
|
12
|
-
import { m as
|
|
13
|
-
import { T as
|
|
14
|
-
var
|
|
15
|
-
for (var n in t)
|
|
16
|
-
},
|
|
17
|
-
|
|
18
|
-
var
|
|
19
|
-
for (var n in t)
|
|
5
|
+
import { e as Hn, G as Vn, E as Un, P as Xn, L as qn, d as Jn, f as Zn } from "./GatewayBranchEdge-PsxBbEky.js";
|
|
6
|
+
import { Dialog as Qn, Box as Q, Drawer as er, IconButton as St, Button as Ne, CircularProgress as tr } from "@mui/material";
|
|
7
|
+
import nr from "react-select";
|
|
8
|
+
import { MdClose as rr, MdCalendarToday as or, MdBolt as ir, MdArrowBack as Vt, MdChevronRight as Ut, MdAddCircleOutline as sr, MdApps as lr, MdErrorOutline as dr, MdAccountTree as ar, MdAdd as cr, MdSearch as fr, MdCategory as ur, MdCancel as Xt, MdError as qt, MdCheckCircle as Jt, MdPlayArrow as Zt, MdHourglassEmpty as hr, MdSchedule as Nt, MdPerson as gr, MdExpandLess as pr, MdExpandMore as yr } from "react-icons/md";
|
|
9
|
+
import { GrTrigger as br } from "react-icons/gr";
|
|
10
|
+
import { BiCollapse as mr, BiExpand as vr } from "react-icons/bi";
|
|
11
|
+
import { j as wr, b as Er, O as xr } from "./index-CicT49Ft.js";
|
|
12
|
+
import { m as kr } from "./messages-CRZgWFU-.js";
|
|
13
|
+
import { T as _r, E as ee } from "./canvasTokens-CAD6G24b.js";
|
|
14
|
+
var Qt = Object.defineProperty, Sr = (e, t, n) => t in e ? Qt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Nr = (e, t) => {
|
|
15
|
+
for (var n in t) Qt(e, n, { get: t[n], enumerable: !0 });
|
|
16
|
+
}, Tr = (e, t, n) => Sr(e, t + "", n), en = {};
|
|
17
|
+
Nr(en, { Graph: () => H, alg: () => Ze, json: () => nn, version: () => Or });
|
|
18
|
+
var Cr = Object.defineProperty, tn = (e, t) => {
|
|
19
|
+
for (var n in t) Cr(e, n, { get: t[n], enumerable: !0 });
|
|
20
20
|
}, H = class {
|
|
21
21
|
constructor(e) {
|
|
22
22
|
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 = () => {
|
|
@@ -154,11 +154,11 @@ var Nr = Object.defineProperty, Qt = (e, t) => {
|
|
|
154
154
|
if (d in this._edgeLabels) return a && (this._edgeLabels[d] = l), this;
|
|
155
155
|
if (s !== void 0 && !this._isMultigraph) throw new Error("Cannot set a named edge when isMultigraph = false");
|
|
156
156
|
this.setNode(o), this.setNode(i), this._edgeLabels[d] = a ? l : this._defaultEdgeLabelFn(o, i, s);
|
|
157
|
-
let c =
|
|
157
|
+
let c = Ir(this._isDirected, o, i, s);
|
|
158
158
|
return o = c.v, i = c.w, Object.freeze(c), this._edgeObjs[d] = c, Tt(this._preds[i], o), Tt(this._sucs[o], i), this._in[i][d] = c, this._out[o][d] = c, this._edgeCount++, this;
|
|
159
159
|
}
|
|
160
160
|
edge(e, t, n) {
|
|
161
|
-
let r = arguments.length === 1 ?
|
|
161
|
+
let r = arguments.length === 1 ? Ae(this._isDirected, e) : pe(this._isDirected, e, t, n);
|
|
162
162
|
return this._edgeLabels[r];
|
|
163
163
|
}
|
|
164
164
|
edgeAsObj(e, t, n) {
|
|
@@ -166,10 +166,10 @@ var Nr = Object.defineProperty, Qt = (e, t) => {
|
|
|
166
166
|
return typeof r != "object" ? { label: r } : r;
|
|
167
167
|
}
|
|
168
168
|
hasEdge(e, t, n) {
|
|
169
|
-
return (arguments.length === 1 ?
|
|
169
|
+
return (arguments.length === 1 ? Ae(this._isDirected, e) : pe(this._isDirected, e, t, n)) in this._edgeLabels;
|
|
170
170
|
}
|
|
171
171
|
removeEdge(e, t, n) {
|
|
172
|
-
let r = arguments.length === 1 ?
|
|
172
|
+
let r = arguments.length === 1 ? Ae(this._isDirected, e) : pe(this._isDirected, e, t, n), o = this._edgeObjs[r];
|
|
173
173
|
if (o) {
|
|
174
174
|
let i = o.v, s = o.w;
|
|
175
175
|
delete this._edgeLabels[r], delete this._edgeObjs[r], Ct(this._preds[s], i), Ct(this._sucs[i], s), delete this._in[s][r], delete this._out[i][r], this._edgeCount--;
|
|
@@ -208,7 +208,7 @@ function pe(e, t, n, r) {
|
|
|
208
208
|
}
|
|
209
209
|
return o + "" + i + "" + (r === void 0 ? "\0" : r);
|
|
210
210
|
}
|
|
211
|
-
function
|
|
211
|
+
function Ir(e, t, n, r) {
|
|
212
212
|
let o = "" + t, i = "" + n;
|
|
213
213
|
if (!e && o > i) {
|
|
214
214
|
let l = o;
|
|
@@ -217,28 +217,28 @@ function Tr(e, t, n, r) {
|
|
|
217
217
|
let s = { v: o, w: i };
|
|
218
218
|
return r && (s.name = r), s;
|
|
219
219
|
}
|
|
220
|
-
function
|
|
220
|
+
function Ae(e, t) {
|
|
221
221
|
return pe(e, t.v, t.w, t.name);
|
|
222
222
|
}
|
|
223
|
-
var
|
|
224
|
-
|
|
225
|
-
function
|
|
226
|
-
let t = { options: { directed: e.isDirected(), multigraph: e.isMultigraph(), compound: e.isCompound() }, nodes:
|
|
223
|
+
var Or = "4.0.1", nn = {};
|
|
224
|
+
tn(nn, { read: () => Lr, write: () => Mr });
|
|
225
|
+
function Mr(e) {
|
|
226
|
+
let t = { options: { directed: e.isDirected(), multigraph: e.isMultigraph(), compound: e.isCompound() }, nodes: jr(e), edges: zr(e) }, n = e.graph();
|
|
227
227
|
return n !== void 0 && (t.value = structuredClone(n)), t;
|
|
228
228
|
}
|
|
229
|
-
function
|
|
229
|
+
function jr(e) {
|
|
230
230
|
return e.nodes().map((t) => {
|
|
231
231
|
let n = e.node(t), r = e.parent(t), o = { v: t };
|
|
232
232
|
return n !== void 0 && (o.value = n), r !== void 0 && (o.parent = r), o;
|
|
233
233
|
});
|
|
234
234
|
}
|
|
235
|
-
function
|
|
235
|
+
function zr(e) {
|
|
236
236
|
return e.edges().map((t) => {
|
|
237
237
|
let n = e.edge(t), r = { v: t.v, w: t.w };
|
|
238
238
|
return t.name !== void 0 && (r.name = t.name), n !== void 0 && (r.value = n), r;
|
|
239
239
|
});
|
|
240
240
|
}
|
|
241
|
-
function
|
|
241
|
+
function Lr(e) {
|
|
242
242
|
let t = new H(e.options);
|
|
243
243
|
return e.value !== void 0 && t.setGraph(e.value), e.nodes.forEach((n) => {
|
|
244
244
|
t.setNode(n.v, n.value), n.parent && t.setParent(n.v, n.parent);
|
|
@@ -247,14 +247,14 @@ function jr(e) {
|
|
|
247
247
|
}), t;
|
|
248
248
|
}
|
|
249
249
|
var Ze = {};
|
|
250
|
-
|
|
251
|
-
var
|
|
252
|
-
function
|
|
253
|
-
return
|
|
250
|
+
tn(Ze, { CycleException: () => Ce, bellmanFord: () => rn, components: () => Fr, dijkstra: () => Te, dijkstraAll: () => Br, findCycles: () => Wr, floydWarshall: () => Gr, isAcyclic: () => Kr, postorder: () => Vr, preorder: () => Ur, prim: () => Xr, shortestPaths: () => qr, tarjan: () => sn, topsort: () => ln });
|
|
251
|
+
var Pr = () => 1;
|
|
252
|
+
function rn(e, t, n, r) {
|
|
253
|
+
return Rr(e, String(t), n || Pr, r || function(o) {
|
|
254
254
|
return e.outEdges(o);
|
|
255
255
|
});
|
|
256
256
|
}
|
|
257
|
-
function
|
|
257
|
+
function Rr(e, t, n, r) {
|
|
258
258
|
let o = {}, i, s = 0, l = e.nodes(), a = function(f) {
|
|
259
259
|
let h = n(f);
|
|
260
260
|
o[f.v].distance + h < o[f.w].distance && (o[f.w] = { distance: o[f.v].distance + h, predecessor: f.v }, i = !0);
|
|
@@ -275,7 +275,7 @@ function Lr(e, t, n, r) {
|
|
|
275
275
|
if (s === c - 1 && (i = !1, d(), i)) throw new Error("The graph contains a negative weight cycle");
|
|
276
276
|
return o;
|
|
277
277
|
}
|
|
278
|
-
function
|
|
278
|
+
function Fr(e) {
|
|
279
279
|
let t = {}, n = [], r;
|
|
280
280
|
function o(i) {
|
|
281
281
|
i in t || (t[i] = !0, r.push(i), e.successors(i).forEach(o), e.predecessors(i).forEach(o));
|
|
@@ -284,7 +284,7 @@ function Pr(e) {
|
|
|
284
284
|
r = [], o(i), r.length && n.push(r);
|
|
285
285
|
}), n;
|
|
286
286
|
}
|
|
287
|
-
var
|
|
287
|
+
var on = class {
|
|
288
288
|
constructor() {
|
|
289
289
|
this._arr = [], this._keyIndices = {};
|
|
290
290
|
}
|
|
@@ -337,15 +337,15 @@ var nn = class {
|
|
|
337
337
|
let n = this._arr, r = this._keyIndices, o = n[e], i = n[t];
|
|
338
338
|
n[e] = i, n[t] = o, r[i.key] = e, r[o.key] = t;
|
|
339
339
|
}
|
|
340
|
-
},
|
|
340
|
+
}, Ar = () => 1;
|
|
341
341
|
function Te(e, t, n, r) {
|
|
342
342
|
let o = function(i) {
|
|
343
343
|
return e.outEdges(i);
|
|
344
344
|
};
|
|
345
|
-
return
|
|
345
|
+
return Dr(e, String(t), n || Ar, r || o);
|
|
346
346
|
}
|
|
347
|
-
function
|
|
348
|
-
let o = {}, i = new
|
|
347
|
+
function Dr(e, t, n, r) {
|
|
348
|
+
let o = {}, i = new on(), s, l, a = function(d) {
|
|
349
349
|
let c = d.v !== s ? d.v : d.w, f = o[c], h = n(d), g = l.distance + h;
|
|
350
350
|
if (h < 0) throw new Error("dijkstra does not allow negative edge weights. Bad edge: " + d + " Weight: " + h);
|
|
351
351
|
g < f.distance && (f.distance = g, f.predecessor = s, i.decrease(c, g));
|
|
@@ -356,12 +356,12 @@ function Fr(e, t, n, r) {
|
|
|
356
356
|
}); i.size() > 0 && (s = i.removeMin(), l = o[s], l.distance !== Number.POSITIVE_INFINITY); ) r(s).forEach(a);
|
|
357
357
|
return o;
|
|
358
358
|
}
|
|
359
|
-
function
|
|
359
|
+
function Br(e, t, n) {
|
|
360
360
|
return e.nodes().reduce(function(r, o) {
|
|
361
361
|
return r[o] = Te(e, o, t, n), r;
|
|
362
362
|
}, {});
|
|
363
363
|
}
|
|
364
|
-
function
|
|
364
|
+
function sn(e) {
|
|
365
365
|
let t = 0, n = [], r = {}, o = [];
|
|
366
366
|
function i(s) {
|
|
367
367
|
let l = r[s] = { onStack: !0, lowlink: t, index: t++ };
|
|
@@ -379,18 +379,18 @@ function rn(e) {
|
|
|
379
379
|
s in r || i(s);
|
|
380
380
|
}), o;
|
|
381
381
|
}
|
|
382
|
-
function
|
|
383
|
-
return
|
|
382
|
+
function Wr(e) {
|
|
383
|
+
return sn(e).filter(function(t) {
|
|
384
384
|
return t.length > 1 || t.length === 1 && e.hasEdge(t[0], t[0]);
|
|
385
385
|
});
|
|
386
386
|
}
|
|
387
|
-
var
|
|
388
|
-
function
|
|
389
|
-
return
|
|
387
|
+
var $r = () => 1;
|
|
388
|
+
function Gr(e, t, n) {
|
|
389
|
+
return Yr(e, t || $r, n || function(r) {
|
|
390
390
|
return e.outEdges(r);
|
|
391
391
|
});
|
|
392
392
|
}
|
|
393
|
-
function
|
|
393
|
+
function Yr(e, t, n) {
|
|
394
394
|
let r = {}, o = e.nodes();
|
|
395
395
|
return o.forEach(function(i) {
|
|
396
396
|
r[i] = {}, r[i][i] = { distance: 0, predecessor: "" }, o.forEach(function(s) {
|
|
@@ -415,7 +415,7 @@ var Ce = class extends Error {
|
|
|
415
415
|
super(...e);
|
|
416
416
|
}
|
|
417
417
|
};
|
|
418
|
-
function
|
|
418
|
+
function ln(e) {
|
|
419
419
|
let t = {}, n = {}, r = [];
|
|
420
420
|
function o(i) {
|
|
421
421
|
if (i in n) throw new Ce();
|
|
@@ -424,16 +424,16 @@ function on(e) {
|
|
|
424
424
|
if (e.sinks().forEach(o), Object.keys(t).length !== e.nodeCount()) throw new Ce();
|
|
425
425
|
return r;
|
|
426
426
|
}
|
|
427
|
-
function
|
|
427
|
+
function Kr(e) {
|
|
428
428
|
try {
|
|
429
|
-
|
|
429
|
+
ln(e);
|
|
430
430
|
} catch (t) {
|
|
431
431
|
if (t instanceof Ce) return !1;
|
|
432
432
|
throw t;
|
|
433
433
|
}
|
|
434
434
|
return !0;
|
|
435
435
|
}
|
|
436
|
-
function
|
|
436
|
+
function Hr(e, t, n, r, o) {
|
|
437
437
|
Array.isArray(t) || (t = [t]);
|
|
438
438
|
let i = (l) => {
|
|
439
439
|
var a;
|
|
@@ -441,27 +441,27 @@ function Yr(e, t, n, r, o) {
|
|
|
441
441
|
}, s = {};
|
|
442
442
|
return t.forEach(function(l) {
|
|
443
443
|
if (!e.hasNode(l)) throw new Error("Graph does not have node: " + l);
|
|
444
|
-
o =
|
|
444
|
+
o = dn(e, l, n === "post", s, i, r, o);
|
|
445
445
|
}), o;
|
|
446
446
|
}
|
|
447
|
-
function
|
|
447
|
+
function dn(e, t, n, r, o, i, s) {
|
|
448
448
|
return t in r || (r[t] = !0, n || (s = i(s, t)), o(t).forEach(function(l) {
|
|
449
|
-
s =
|
|
449
|
+
s = dn(e, l, n, r, o, i, s);
|
|
450
450
|
}), n && (s = i(s, t))), s;
|
|
451
451
|
}
|
|
452
|
-
function
|
|
453
|
-
return
|
|
452
|
+
function an(e, t, n) {
|
|
453
|
+
return Hr(e, t, n, function(r, o) {
|
|
454
454
|
return r.push(o), r;
|
|
455
455
|
}, []);
|
|
456
456
|
}
|
|
457
|
-
function
|
|
458
|
-
return
|
|
457
|
+
function Vr(e, t) {
|
|
458
|
+
return an(e, t, "post");
|
|
459
459
|
}
|
|
460
|
-
function
|
|
461
|
-
return
|
|
460
|
+
function Ur(e, t) {
|
|
461
|
+
return an(e, t, "pre");
|
|
462
462
|
}
|
|
463
|
-
function
|
|
464
|
-
let n = new H(), r = {}, o = new
|
|
463
|
+
function Xr(e, t) {
|
|
464
|
+
let n = new H(), r = {}, o = new on(), i;
|
|
465
465
|
function s(a) {
|
|
466
466
|
let d = a.v === i ? a.w : a.v, c = o.priority(d);
|
|
467
467
|
if (c !== void 0) {
|
|
@@ -484,13 +484,13 @@ function Vr(e, t) {
|
|
|
484
484
|
}
|
|
485
485
|
return n;
|
|
486
486
|
}
|
|
487
|
-
function
|
|
488
|
-
return
|
|
487
|
+
function qr(e, t, n, r) {
|
|
488
|
+
return Jr(e, t, n, r ?? ((o) => {
|
|
489
489
|
let i = e.outEdges(o);
|
|
490
490
|
return i ?? [];
|
|
491
491
|
}));
|
|
492
492
|
}
|
|
493
|
-
function
|
|
493
|
+
function Jr(e, t, n, r) {
|
|
494
494
|
if (n === void 0) return Te(e, t, n, r);
|
|
495
495
|
let o = !1, i = e.nodes();
|
|
496
496
|
for (let s = 0; s < i.length; s++) {
|
|
@@ -499,7 +499,7 @@ function Xr(e, t, n, r) {
|
|
|
499
499
|
let d = l[a], c = d.v === i[s] ? d.v : d.w, f = c === d.v ? d.w : d.v;
|
|
500
500
|
n({ v: c, w: f }) < 0 && (o = !0);
|
|
501
501
|
}
|
|
502
|
-
if (o) return
|
|
502
|
+
if (o) return rn(e, t, n, r);
|
|
503
503
|
}
|
|
504
504
|
return Te(e, t, n, r);
|
|
505
505
|
}
|
|
@@ -508,14 +508,14 @@ function ue(e, t, n, r) {
|
|
|
508
508
|
for (; e.hasNode(o); ) o = Qe(r);
|
|
509
509
|
return n.dummy = t, e.setNode(o, n), o;
|
|
510
510
|
}
|
|
511
|
-
function
|
|
511
|
+
function Zr(e) {
|
|
512
512
|
let t = new H().setGraph(e.graph());
|
|
513
513
|
return e.nodes().forEach((n) => t.setNode(n, e.node(n))), e.edges().forEach((n) => {
|
|
514
514
|
let r = t.edge(n.v, n.w) || { weight: 0, minlen: 1 }, o = e.edge(n);
|
|
515
515
|
t.setEdge(n.v, n.w, { weight: r.weight + o.weight, minlen: Math.max(r.minlen, o.minlen) });
|
|
516
516
|
}), t;
|
|
517
517
|
}
|
|
518
|
-
function
|
|
518
|
+
function cn(e) {
|
|
519
519
|
let t = new H({ multigraph: e.isMultigraph() }).setGraph(e.graph());
|
|
520
520
|
return e.nodes().forEach((n) => {
|
|
521
521
|
e.children(n).length || t.setNode(n, e.node(n));
|
|
@@ -530,13 +530,13 @@ function It(e, t) {
|
|
|
530
530
|
return Math.abs(i) * s > Math.abs(o) * l ? (i < 0 && (l = -l), a = l * o / i, d = l) : (o < 0 && (s = -s), a = s, d = s * i / o), { x: n + a, y: r + d };
|
|
531
531
|
}
|
|
532
532
|
function ve(e) {
|
|
533
|
-
let t =
|
|
533
|
+
let t = be(un(e) + 1).map(() => []);
|
|
534
534
|
return e.nodes().forEach((n) => {
|
|
535
535
|
let r = e.node(n), o = r.rank;
|
|
536
536
|
o !== void 0 && (t[o] || (t[o] = []), t[o][r.order] = n);
|
|
537
537
|
}), t;
|
|
538
538
|
}
|
|
539
|
-
function
|
|
539
|
+
function Qr(e) {
|
|
540
540
|
let t = e.nodes().map((r) => {
|
|
541
541
|
let o = e.node(r).rank;
|
|
542
542
|
return o === void 0 ? Number.MAX_VALUE : o;
|
|
@@ -546,7 +546,7 @@ function Jr(e) {
|
|
|
546
546
|
Object.hasOwn(o, "rank") && (o.rank -= n);
|
|
547
547
|
});
|
|
548
548
|
}
|
|
549
|
-
function
|
|
549
|
+
function eo(e) {
|
|
550
550
|
let t = e.nodes().map((s) => e.node(s).rank).filter((s) => s !== void 0), n = q(Math.min, t), r = [];
|
|
551
551
|
e.nodes().forEach((s) => {
|
|
552
552
|
let l = e.node(s).rank - n;
|
|
@@ -561,7 +561,7 @@ function Ot(e, t, n, r) {
|
|
|
561
561
|
let o = { width: 0, height: 0 };
|
|
562
562
|
return arguments.length >= 4 && (o.rank = n, o.order = r), ue(e, "border", o, t);
|
|
563
563
|
}
|
|
564
|
-
function
|
|
564
|
+
function to(e, t = fn) {
|
|
565
565
|
let n = [];
|
|
566
566
|
for (let r = 0; r < e.length; r += t) {
|
|
567
567
|
let o = e.slice(r, r + t);
|
|
@@ -569,27 +569,27 @@ function Qr(e, t = an) {
|
|
|
569
569
|
}
|
|
570
570
|
return n;
|
|
571
571
|
}
|
|
572
|
-
var
|
|
572
|
+
var fn = 65535;
|
|
573
573
|
function q(e, t) {
|
|
574
|
-
if (t.length >
|
|
575
|
-
let n =
|
|
574
|
+
if (t.length > fn) {
|
|
575
|
+
let n = to(t);
|
|
576
576
|
return e(...n.map((r) => e(...r)));
|
|
577
577
|
} else return e(...t);
|
|
578
578
|
}
|
|
579
|
-
function
|
|
579
|
+
function un(e) {
|
|
580
580
|
let t = e.nodes().map((n) => {
|
|
581
581
|
let r = e.node(n).rank;
|
|
582
582
|
return r === void 0 ? Number.MIN_VALUE : r;
|
|
583
583
|
});
|
|
584
584
|
return q(Math.max, t);
|
|
585
585
|
}
|
|
586
|
-
function
|
|
586
|
+
function no(e, t) {
|
|
587
587
|
let n = { lhs: [], rhs: [] };
|
|
588
588
|
return e.forEach((r) => {
|
|
589
589
|
t(r) ? n.lhs.push(r) : n.rhs.push(r);
|
|
590
590
|
}), n;
|
|
591
591
|
}
|
|
592
|
-
function
|
|
592
|
+
function hn(e, t) {
|
|
593
593
|
let n = Date.now();
|
|
594
594
|
try {
|
|
595
595
|
return t();
|
|
@@ -597,15 +597,15 @@ function fn(e, t) {
|
|
|
597
597
|
console.log(e + " time: " + (Date.now() - n) + "ms");
|
|
598
598
|
}
|
|
599
599
|
}
|
|
600
|
-
function
|
|
600
|
+
function gn(e, t) {
|
|
601
601
|
return t();
|
|
602
602
|
}
|
|
603
|
-
var
|
|
603
|
+
var ro = 0;
|
|
604
604
|
function Qe(e) {
|
|
605
|
-
let t = ++
|
|
605
|
+
let t = ++ro;
|
|
606
606
|
return e + ("" + t);
|
|
607
607
|
}
|
|
608
|
-
function
|
|
608
|
+
function be(e, t, n = 1) {
|
|
609
609
|
t == null && (t = e, e = 0);
|
|
610
610
|
let r = (i) => i < t;
|
|
611
611
|
n < 0 && (r = (i) => t < i);
|
|
@@ -622,12 +622,12 @@ function Oe(e, t) {
|
|
|
622
622
|
let n;
|
|
623
623
|
return typeof t == "string" ? n = (r) => r[t] : n = t, Object.entries(e).reduce((r, [o, i]) => (r[o] = n(i, o), r), {});
|
|
624
624
|
}
|
|
625
|
-
function
|
|
625
|
+
function oo(e, t) {
|
|
626
626
|
return e.reduce((n, r, o) => (n[r] = t[o], n), {});
|
|
627
627
|
}
|
|
628
|
-
var Me = "\0",
|
|
628
|
+
var Me = "\0", io = "3.0.0", so = class {
|
|
629
629
|
constructor() {
|
|
630
|
-
|
|
630
|
+
Tr(this, "_sentinel");
|
|
631
631
|
let e = {};
|
|
632
632
|
e._next = e._prev = e, this._sentinel = e;
|
|
633
633
|
}
|
|
@@ -641,38 +641,38 @@ var Me = "\0", ro = "3.0.0", oo = class {
|
|
|
641
641
|
}
|
|
642
642
|
toString() {
|
|
643
643
|
let e = [], t = this._sentinel, n = t._prev;
|
|
644
|
-
for (; n !== t; ) e.push(JSON.stringify(n,
|
|
644
|
+
for (; n !== t; ) e.push(JSON.stringify(n, lo)), n = n._prev;
|
|
645
645
|
return "[" + e.join(", ") + "]";
|
|
646
646
|
}
|
|
647
647
|
};
|
|
648
648
|
function Mt(e) {
|
|
649
649
|
e._prev._next = e._next, e._next._prev = e._prev, delete e._next, delete e._prev;
|
|
650
650
|
}
|
|
651
|
-
function
|
|
651
|
+
function lo(e, t) {
|
|
652
652
|
if (e !== "_next" && e !== "_prev") return t;
|
|
653
653
|
}
|
|
654
|
-
var
|
|
655
|
-
function
|
|
654
|
+
var ao = so, co = () => 1;
|
|
655
|
+
function fo(e, t) {
|
|
656
656
|
if (e.nodeCount() <= 1) return [];
|
|
657
|
-
let n =
|
|
658
|
-
return
|
|
657
|
+
let n = ho(e, t || co);
|
|
658
|
+
return uo(n.graph, n.buckets, n.zeroIdx).flatMap((r) => e.outEdges(r.v, r.w) || []);
|
|
659
659
|
}
|
|
660
|
-
function
|
|
660
|
+
function uo(e, t, n) {
|
|
661
661
|
var r;
|
|
662
662
|
let o = [], i = t[t.length - 1], s = t[0], l;
|
|
663
663
|
for (; e.nodeCount(); ) {
|
|
664
|
-
for (; l = s.dequeue(); )
|
|
665
|
-
for (; l = i.dequeue(); )
|
|
664
|
+
for (; l = s.dequeue(); ) De(e, t, n, l);
|
|
665
|
+
for (; l = i.dequeue(); ) De(e, t, n, l);
|
|
666
666
|
if (e.nodeCount()) {
|
|
667
667
|
for (let a = t.length - 2; a > 0; --a) if (l = (r = t[a]) == null ? void 0 : r.dequeue(), l) {
|
|
668
|
-
o = o.concat(
|
|
668
|
+
o = o.concat(De(e, t, n, l, !0) || []);
|
|
669
669
|
break;
|
|
670
670
|
}
|
|
671
671
|
}
|
|
672
672
|
}
|
|
673
673
|
return o;
|
|
674
674
|
}
|
|
675
|
-
function
|
|
675
|
+
function De(e, t, n, r, o) {
|
|
676
676
|
let i = [], s = o ? i : void 0;
|
|
677
677
|
return (e.inEdges(r.v) || []).forEach((l) => {
|
|
678
678
|
let a = e.edge(l), d = e.node(l.v);
|
|
@@ -682,7 +682,7 @@ function Be(e, t, n, r, o) {
|
|
|
682
682
|
c.in -= a, Ve(t, n, c);
|
|
683
683
|
}), e.removeNode(r.v), s;
|
|
684
684
|
}
|
|
685
|
-
function
|
|
685
|
+
function ho(e, t) {
|
|
686
686
|
let n = new H(), r = 0, o = 0;
|
|
687
687
|
e.nodes().forEach((l) => {
|
|
688
688
|
n.setNode(l, { v: l, in: 0, out: 0 });
|
|
@@ -692,7 +692,7 @@ function fo(e, t) {
|
|
|
692
692
|
let f = n.node(l.v), h = n.node(l.w);
|
|
693
693
|
o = Math.max(o, f.out += d), r = Math.max(r, h.in += d);
|
|
694
694
|
});
|
|
695
|
-
let i =
|
|
695
|
+
let i = go(o + r + 3).map(() => new ao()), s = r + 1;
|
|
696
696
|
return n.nodes().forEach((l) => {
|
|
697
697
|
Ve(i, s, n.node(l));
|
|
698
698
|
}), { graph: n, buckets: i, zeroIdx: s };
|
|
@@ -701,13 +701,13 @@ function Ve(e, t, n) {
|
|
|
701
701
|
var r, o, i;
|
|
702
702
|
n.out ? n.in ? (i = e[n.out - n.in + t]) == null || i.enqueue(n) : (o = e[e.length - 1]) == null || o.enqueue(n) : (r = e[0]) == null || r.enqueue(n);
|
|
703
703
|
}
|
|
704
|
-
function
|
|
704
|
+
function go(e) {
|
|
705
705
|
let t = [];
|
|
706
706
|
for (let n = 0; n < e; n++) t.push(n);
|
|
707
707
|
return t;
|
|
708
708
|
}
|
|
709
|
-
function
|
|
710
|
-
(e.graph().acyclicer === "greedy" ?
|
|
709
|
+
function po(e) {
|
|
710
|
+
(e.graph().acyclicer === "greedy" ? fo(e, t(e)) : yo(e)).forEach((n) => {
|
|
711
711
|
let r = e.edge(n);
|
|
712
712
|
e.removeEdge(n), r.forwardName = n.name, r.reversed = !0, e.setEdge(n.w, n.v, r, Qe("rev"));
|
|
713
713
|
});
|
|
@@ -715,7 +715,7 @@ function ho(e) {
|
|
|
715
715
|
return (r) => n.edge(r).weight;
|
|
716
716
|
}
|
|
717
717
|
}
|
|
718
|
-
function
|
|
718
|
+
function yo(e) {
|
|
719
719
|
let t = [], n = {}, r = {};
|
|
720
720
|
function o(i) {
|
|
721
721
|
Object.hasOwn(r, i) || (r[i] = !0, n[i] = !0, e.outEdges(i).forEach((s) => {
|
|
@@ -724,7 +724,7 @@ function go(e) {
|
|
|
724
724
|
}
|
|
725
725
|
return e.nodes().forEach(o), t;
|
|
726
726
|
}
|
|
727
|
-
function
|
|
727
|
+
function bo(e) {
|
|
728
728
|
e.edges().forEach((t) => {
|
|
729
729
|
let n = e.edge(t);
|
|
730
730
|
if (n.reversed) {
|
|
@@ -734,10 +734,10 @@ function po(e) {
|
|
|
734
734
|
}
|
|
735
735
|
});
|
|
736
736
|
}
|
|
737
|
-
function
|
|
738
|
-
e.graph().dummyChains = [], e.edges().forEach((t) =>
|
|
737
|
+
function mo(e) {
|
|
738
|
+
e.graph().dummyChains = [], e.edges().forEach((t) => vo(e, t));
|
|
739
739
|
}
|
|
740
|
-
function
|
|
740
|
+
function vo(e, t) {
|
|
741
741
|
let n = t.v, r = e.node(n).rank, o = t.w, i = e.node(o).rank, s = t.name, l = e.edge(t), a = l.labelRank;
|
|
742
742
|
if (i === r + 1) return;
|
|
743
743
|
e.removeEdge(t);
|
|
@@ -745,7 +745,7 @@ function yo(e, t) {
|
|
|
745
745
|
for (f = 0, ++r; r < i; ++f, ++r) l.points = [], c = { width: 0, height: 0, edgeLabel: l, edgeObj: t, rank: r }, d = ue(e, "edge", c, "_d"), r === a && (c.width = l.width, c.height = l.height, c.dummy = "edge-label", c.labelpos = l.labelpos), e.setEdge(n, d, { weight: l.weight }, s), f === 0 && e.graph().dummyChains.push(d), n = d;
|
|
746
746
|
e.setEdge(n, o, { weight: l.weight }, s);
|
|
747
747
|
}
|
|
748
|
-
function
|
|
748
|
+
function wo(e) {
|
|
749
749
|
e.graph().dummyChains.forEach((t) => {
|
|
750
750
|
let n = e.node(t), r = n.edgeLabel, o;
|
|
751
751
|
for (e.setEdge(n.edgeObj, r); n.dummy; ) o = e.successors(t)[0], e.removeNode(t), r.points.push({ x: n.x, y: n.y }), n.dummy === "edge-label" && (r.x = n.x, r.y = n.y, r.width = n.width, r.height = n.height), t = o, n = e.node(t);
|
|
@@ -765,17 +765,17 @@ function et(e) {
|
|
|
765
765
|
function fe(e, t) {
|
|
766
766
|
return e.node(t.w).rank - e.node(t.v).rank - e.edge(t).minlen;
|
|
767
767
|
}
|
|
768
|
-
var
|
|
769
|
-
function
|
|
768
|
+
var pn = Eo;
|
|
769
|
+
function Eo(e) {
|
|
770
770
|
let t = new H({ directed: !1 }), n = e.nodes();
|
|
771
771
|
if (n.length === 0) throw new Error("Graph must have at least one node");
|
|
772
772
|
let r = n[0], o = e.nodeCount();
|
|
773
773
|
t.setNode(r, {});
|
|
774
774
|
let i, s;
|
|
775
|
-
for (;
|
|
775
|
+
for (; xo(t, e) < o && (i = ko(t, e), !!i); ) s = t.hasNode(i.v) ? fe(e, i) : -fe(e, i), _o(t, e, s);
|
|
776
776
|
return t;
|
|
777
777
|
}
|
|
778
|
-
function
|
|
778
|
+
function xo(e, t) {
|
|
779
779
|
function n(r) {
|
|
780
780
|
let o = t.nodeEdges(r);
|
|
781
781
|
o && o.forEach((i) => {
|
|
@@ -785,38 +785,38 @@ function wo(e, t) {
|
|
|
785
785
|
}
|
|
786
786
|
return e.nodes().forEach(n), e.nodeCount();
|
|
787
787
|
}
|
|
788
|
-
function
|
|
788
|
+
function ko(e, t) {
|
|
789
789
|
return t.edges().reduce((n, r) => {
|
|
790
790
|
let o = Number.POSITIVE_INFINITY;
|
|
791
791
|
return e.hasNode(r.v) !== e.hasNode(r.w) && (o = fe(t, r)), o < n[0] ? [o, r] : n;
|
|
792
792
|
}, [Number.POSITIVE_INFINITY, null])[1];
|
|
793
793
|
}
|
|
794
|
-
function
|
|
794
|
+
function _o(e, t, n) {
|
|
795
795
|
e.nodes().forEach((r) => t.node(r).rank += n);
|
|
796
796
|
}
|
|
797
|
-
var { preorder:
|
|
797
|
+
var { preorder: So, postorder: No } = Ze, To = de;
|
|
798
798
|
de.initLowLimValues = nt;
|
|
799
799
|
de.initCutValues = tt;
|
|
800
|
-
de.calcCutValue =
|
|
801
|
-
de.leaveEdge =
|
|
802
|
-
de.enterEdge =
|
|
803
|
-
de.exchangeEdges =
|
|
800
|
+
de.calcCutValue = yn;
|
|
801
|
+
de.leaveEdge = mn;
|
|
802
|
+
de.enterEdge = vn;
|
|
803
|
+
de.exchangeEdges = wn;
|
|
804
804
|
function de(e) {
|
|
805
|
-
e =
|
|
806
|
-
let t =
|
|
805
|
+
e = Zr(e), et(e);
|
|
806
|
+
let t = pn(e);
|
|
807
807
|
nt(t), tt(t, e);
|
|
808
808
|
let n, r;
|
|
809
|
-
for (; n =
|
|
809
|
+
for (; n = mn(t); ) r = vn(t, e, n), wn(t, e, n, r);
|
|
810
810
|
}
|
|
811
811
|
function tt(e, t) {
|
|
812
|
-
let n =
|
|
813
|
-
n = n.slice(0, n.length - 1), n.forEach((r) =>
|
|
812
|
+
let n = No(e, e.nodes());
|
|
813
|
+
n = n.slice(0, n.length - 1), n.forEach((r) => Co(e, t, r));
|
|
814
814
|
}
|
|
815
|
-
function
|
|
815
|
+
function Co(e, t, n) {
|
|
816
816
|
let r = e.node(n).parent, o = e.edge(n, r);
|
|
817
|
-
o.cutvalue =
|
|
817
|
+
o.cutvalue = yn(e, t, n);
|
|
818
818
|
}
|
|
819
|
-
function
|
|
819
|
+
function yn(e, t, n) {
|
|
820
820
|
let r = e.node(n).parent, o = !0, i = t.edge(n, r), s = 0;
|
|
821
821
|
i || (o = !1, i = t.edge(r, n)), s = i.weight;
|
|
822
822
|
let l = t.nodeEdges(n);
|
|
@@ -824,7 +824,7 @@ function gn(e, t, n) {
|
|
|
824
824
|
let d = a.v === n, c = d ? a.w : a.v;
|
|
825
825
|
if (c !== r) {
|
|
826
826
|
let f = d === o, h = t.edge(a).weight;
|
|
827
|
-
if (s += f ? h : -h,
|
|
827
|
+
if (s += f ? h : -h, Oo(e, n, c)) {
|
|
828
828
|
let g = e.edge(n, c).cutvalue;
|
|
829
829
|
s += f ? -g : g;
|
|
830
830
|
}
|
|
@@ -832,46 +832,46 @@ function gn(e, t, n) {
|
|
|
832
832
|
}), s;
|
|
833
833
|
}
|
|
834
834
|
function nt(e, t) {
|
|
835
|
-
arguments.length < 2 && (t = e.nodes()[0]),
|
|
835
|
+
arguments.length < 2 && (t = e.nodes()[0]), bn(e, {}, 1, t);
|
|
836
836
|
}
|
|
837
|
-
function
|
|
837
|
+
function bn(e, t, n, r, o) {
|
|
838
838
|
let i = n, s = e.node(r);
|
|
839
839
|
t[r] = !0;
|
|
840
840
|
let l = e.neighbors(r);
|
|
841
841
|
return l && l.forEach((a) => {
|
|
842
|
-
Object.hasOwn(t, a) || (n =
|
|
842
|
+
Object.hasOwn(t, a) || (n = bn(e, t, n, a, r));
|
|
843
843
|
}), s.low = i, s.lim = n++, o ? s.parent = o : delete s.parent, n;
|
|
844
844
|
}
|
|
845
|
-
function
|
|
845
|
+
function mn(e) {
|
|
846
846
|
return e.edges().find((t) => e.edge(t).cutvalue < 0);
|
|
847
847
|
}
|
|
848
|
-
function
|
|
848
|
+
function vn(e, t, n) {
|
|
849
849
|
let r = n.v, o = n.w;
|
|
850
850
|
t.hasEdge(r, o) || (r = n.w, o = n.v);
|
|
851
851
|
let i = e.node(r), s = e.node(o), l = i, a = !1;
|
|
852
852
|
return i.lim > s.lim && (l = s, a = !0), t.edges().filter((d) => a === jt(e, e.node(d.v), l) && a !== jt(e, e.node(d.w), l)).reduce((d, c) => fe(t, c) < fe(t, d) ? c : d);
|
|
853
853
|
}
|
|
854
|
-
function
|
|
854
|
+
function wn(e, t, n, r) {
|
|
855
855
|
let o = n.v, i = n.w;
|
|
856
|
-
e.removeEdge(o, i), e.setEdge(r.v, r.w, {}), nt(e), tt(e, t),
|
|
856
|
+
e.removeEdge(o, i), e.setEdge(r.v, r.w, {}), nt(e), tt(e, t), Io(e, t);
|
|
857
857
|
}
|
|
858
|
-
function
|
|
858
|
+
function Io(e, t) {
|
|
859
859
|
let n = e.nodes().find((o) => !e.node(o).parent);
|
|
860
860
|
if (!n) return;
|
|
861
|
-
let r =
|
|
861
|
+
let r = So(e, [n]);
|
|
862
862
|
r = r.slice(1), r.forEach((o) => {
|
|
863
863
|
let i = e.node(o).parent, s = t.edge(o, i), l = !1;
|
|
864
864
|
s || (s = t.edge(i, o), l = !0), t.node(o).rank = t.node(i).rank + (l ? s.minlen : -s.minlen);
|
|
865
865
|
});
|
|
866
866
|
}
|
|
867
|
-
function
|
|
867
|
+
function Oo(e, t, n) {
|
|
868
868
|
return e.hasEdge(t, n);
|
|
869
869
|
}
|
|
870
870
|
function jt(e, t, n) {
|
|
871
871
|
return n.low <= t.lim && t.lim <= n.lim;
|
|
872
872
|
}
|
|
873
|
-
var
|
|
874
|
-
function
|
|
873
|
+
var Mo = jo;
|
|
874
|
+
function jo(e) {
|
|
875
875
|
let t = e.graph().ranker;
|
|
876
876
|
if (typeof t == "function") return t(e);
|
|
877
877
|
switch (t) {
|
|
@@ -879,10 +879,10 @@ function Oo(e) {
|
|
|
879
879
|
zt(e);
|
|
880
880
|
break;
|
|
881
881
|
case "tight-tree":
|
|
882
|
-
|
|
882
|
+
Lo(e);
|
|
883
883
|
break;
|
|
884
884
|
case "longest-path":
|
|
885
|
-
|
|
885
|
+
zo(e);
|
|
886
886
|
break;
|
|
887
887
|
case "none":
|
|
888
888
|
break;
|
|
@@ -890,18 +890,18 @@ function Oo(e) {
|
|
|
890
890
|
zt(e);
|
|
891
891
|
}
|
|
892
892
|
}
|
|
893
|
-
var
|
|
894
|
-
function
|
|
895
|
-
et(e),
|
|
893
|
+
var zo = et;
|
|
894
|
+
function Lo(e) {
|
|
895
|
+
et(e), pn(e);
|
|
896
896
|
}
|
|
897
897
|
function zt(e) {
|
|
898
|
-
|
|
898
|
+
To(e);
|
|
899
899
|
}
|
|
900
|
-
var
|
|
901
|
-
function
|
|
902
|
-
let t =
|
|
900
|
+
var Po = Ro;
|
|
901
|
+
function Ro(e) {
|
|
902
|
+
let t = Ao(e);
|
|
903
903
|
e.graph().dummyChains.forEach((n) => {
|
|
904
|
-
let r = e.node(n), o = r.edgeObj, i =
|
|
904
|
+
let r = e.node(n), o = r.edgeObj, i = Fo(e, t, o.v, o.w), s = i.path, l = i.lca, a = 0, d = s[a], c = !0;
|
|
905
905
|
for (; n !== o.w; ) {
|
|
906
906
|
if (r = e.node(n), c) {
|
|
907
907
|
for (; (d = s[a]) !== l && e.node(d).maxRank < r.rank; ) a++;
|
|
@@ -915,7 +915,7 @@ function Lo(e) {
|
|
|
915
915
|
}
|
|
916
916
|
});
|
|
917
917
|
}
|
|
918
|
-
function
|
|
918
|
+
function Fo(e, t, n, r) {
|
|
919
919
|
let o = [], i = [], s = Math.min(t[n].low, t[r].low), l = Math.max(t[n].lim, t[r].lim), a;
|
|
920
920
|
a = n;
|
|
921
921
|
do
|
|
@@ -925,7 +925,7 @@ function Po(e, t, n, r) {
|
|
|
925
925
|
for (; (c = e.parent(c)) !== d; ) i.push(c);
|
|
926
926
|
return { path: o.concat(i.reverse()), lca: d };
|
|
927
927
|
}
|
|
928
|
-
function
|
|
928
|
+
function Ao(e) {
|
|
929
929
|
let t = {}, n = 0;
|
|
930
930
|
function r(o) {
|
|
931
931
|
let i = n;
|
|
@@ -933,13 +933,13 @@ function Ro(e) {
|
|
|
933
933
|
}
|
|
934
934
|
return e.children(Me).forEach(r), t;
|
|
935
935
|
}
|
|
936
|
-
function
|
|
937
|
-
let t = ue(e, "root", {}, "_root"), n =
|
|
936
|
+
function Do(e) {
|
|
937
|
+
let t = ue(e, "root", {}, "_root"), n = Bo(e), r = Object.values(n), o = q(Math.max, r) - 1, i = 2 * o + 1;
|
|
938
938
|
e.graph().nestingRoot = t, e.edges().forEach((l) => e.edge(l).minlen *= i);
|
|
939
|
-
let s =
|
|
940
|
-
e.children(Me).forEach((l) =>
|
|
939
|
+
let s = Wo(e) + 1;
|
|
940
|
+
e.children(Me).forEach((l) => En(e, t, i, s, o, n, l)), e.graph().nodeRankFactor = i;
|
|
941
941
|
}
|
|
942
|
-
function
|
|
942
|
+
function En(e, t, n, r, o, i, s) {
|
|
943
943
|
var l;
|
|
944
944
|
let a = e.children(s);
|
|
945
945
|
if (!a.length) {
|
|
@@ -949,12 +949,12 @@ function vn(e, t, n, r, o, i, s) {
|
|
|
949
949
|
let d = Ot(e, "_bt"), c = Ot(e, "_bb"), f = e.node(s);
|
|
950
950
|
e.setParent(d, s), f.borderTop = d, e.setParent(c, s), f.borderBottom = c, a.forEach((h) => {
|
|
951
951
|
var g;
|
|
952
|
-
|
|
953
|
-
let p = e.node(h), E = p.borderTop ? p.borderTop : h,
|
|
954
|
-
e.setEdge(d, E, { weight: k, minlen: N, nestingEdge: !0 }), e.setEdge(
|
|
952
|
+
En(e, t, n, r, o, i, h);
|
|
953
|
+
let p = e.node(h), E = p.borderTop ? p.borderTop : h, y = p.borderBottom ? p.borderBottom : h, k = p.borderTop ? r : 2 * r, N = E !== y ? 1 : o - ((g = i[s]) != null ? g : 0) + 1;
|
|
954
|
+
e.setEdge(d, E, { weight: k, minlen: N, nestingEdge: !0 }), e.setEdge(y, c, { weight: k, minlen: N, nestingEdge: !0 });
|
|
955
955
|
}), e.parent(s) || e.setEdge(t, d, { weight: 0, minlen: o + ((l = i[s]) != null ? l : 0) });
|
|
956
956
|
}
|
|
957
|
-
function
|
|
957
|
+
function Bo(e) {
|
|
958
958
|
let t = {};
|
|
959
959
|
function n(r, o) {
|
|
960
960
|
let i = e.children(r);
|
|
@@ -962,17 +962,17 @@ function Do(e) {
|
|
|
962
962
|
}
|
|
963
963
|
return e.children(Me).forEach((r) => n(r, 1)), t;
|
|
964
964
|
}
|
|
965
|
-
function
|
|
965
|
+
function Wo(e) {
|
|
966
966
|
return e.edges().reduce((t, n) => t + e.edge(n).weight, 0);
|
|
967
967
|
}
|
|
968
|
-
function
|
|
968
|
+
function $o(e) {
|
|
969
969
|
let t = e.graph();
|
|
970
970
|
e.removeNode(t.nestingRoot), delete t.nestingRoot, e.edges().forEach((n) => {
|
|
971
971
|
e.edge(n).nestingEdge && e.removeEdge(n);
|
|
972
972
|
});
|
|
973
973
|
}
|
|
974
|
-
var
|
|
975
|
-
function
|
|
974
|
+
var Go = Yo;
|
|
975
|
+
function Yo(e) {
|
|
976
976
|
function t(n) {
|
|
977
977
|
let r = e.children(n), o = e.node(n);
|
|
978
978
|
if (r.length && r.forEach(t), Object.hasOwn(o, "minRank")) {
|
|
@@ -986,34 +986,34 @@ function Lt(e, t, n, r, o, i) {
|
|
|
986
986
|
let s = { width: 0, height: 0, rank: i, borderType: t }, l = o[t][i - 1], a = ue(e, "border", s, n);
|
|
987
987
|
o[t][i] = a, e.setParent(a, r), l && e.setEdge(l, a, { weight: 1 });
|
|
988
988
|
}
|
|
989
|
-
function
|
|
989
|
+
function Ko(e) {
|
|
990
990
|
var t;
|
|
991
991
|
let n = (t = e.graph().rankdir) == null ? void 0 : t.toLowerCase();
|
|
992
|
-
(n === "lr" || n === "rl") &&
|
|
992
|
+
(n === "lr" || n === "rl") && xn(e);
|
|
993
993
|
}
|
|
994
|
-
function
|
|
994
|
+
function Ho(e) {
|
|
995
995
|
var t;
|
|
996
996
|
let n = (t = e.graph().rankdir) == null ? void 0 : t.toLowerCase();
|
|
997
|
-
(n === "bt" || n === "rl") &&
|
|
997
|
+
(n === "bt" || n === "rl") && Vo(e), (n === "lr" || n === "rl") && (Uo(e), xn(e));
|
|
998
998
|
}
|
|
999
|
-
function
|
|
999
|
+
function xn(e) {
|
|
1000
1000
|
e.nodes().forEach((t) => Pt(e.node(t))), e.edges().forEach((t) => Pt(e.edge(t)));
|
|
1001
1001
|
}
|
|
1002
1002
|
function Pt(e) {
|
|
1003
1003
|
let t = e.width;
|
|
1004
1004
|
e.width = e.height, e.height = t;
|
|
1005
1005
|
}
|
|
1006
|
-
function
|
|
1007
|
-
e.nodes().forEach((t) =>
|
|
1006
|
+
function Vo(e) {
|
|
1007
|
+
e.nodes().forEach((t) => Be(e.node(t))), e.edges().forEach((t) => {
|
|
1008
1008
|
var n;
|
|
1009
1009
|
let r = e.edge(t);
|
|
1010
|
-
(n = r.points) == null || n.forEach(
|
|
1010
|
+
(n = r.points) == null || n.forEach(Be), Object.hasOwn(r, "y") && Be(r);
|
|
1011
1011
|
});
|
|
1012
1012
|
}
|
|
1013
|
-
function
|
|
1013
|
+
function Be(e) {
|
|
1014
1014
|
e.y = -e.y;
|
|
1015
1015
|
}
|
|
1016
|
-
function
|
|
1016
|
+
function Uo(e) {
|
|
1017
1017
|
e.nodes().forEach((t) => We(e.node(t))), e.edges().forEach((t) => {
|
|
1018
1018
|
var n;
|
|
1019
1019
|
let r = e.edge(t);
|
|
@@ -1024,8 +1024,8 @@ function We(e) {
|
|
|
1024
1024
|
let t = e.x;
|
|
1025
1025
|
e.x = e.y, e.y = t;
|
|
1026
1026
|
}
|
|
1027
|
-
function
|
|
1028
|
-
let t = {}, n = e.nodes().filter((l) => !e.children(l).length), r = n.map((l) => e.node(l).rank), o = q(Math.max, r), i =
|
|
1027
|
+
function Xo(e) {
|
|
1028
|
+
let t = {}, n = e.nodes().filter((l) => !e.children(l).length), r = n.map((l) => e.node(l).rank), o = q(Math.max, r), i = be(o + 1).map(() => []);
|
|
1029
1029
|
function s(l) {
|
|
1030
1030
|
if (t[l]) return;
|
|
1031
1031
|
t[l] = !0;
|
|
@@ -1036,13 +1036,13 @@ function Vo(e) {
|
|
|
1036
1036
|
}
|
|
1037
1037
|
return n.sort((l, a) => e.node(l).rank - e.node(a).rank).forEach(s), i;
|
|
1038
1038
|
}
|
|
1039
|
-
function
|
|
1039
|
+
function qo(e, t) {
|
|
1040
1040
|
let n = 0;
|
|
1041
|
-
for (let r = 1; r < t.length; ++r) n +=
|
|
1041
|
+
for (let r = 1; r < t.length; ++r) n += Jo(e, t[r - 1], t[r]);
|
|
1042
1042
|
return n;
|
|
1043
1043
|
}
|
|
1044
|
-
function
|
|
1045
|
-
let r =
|
|
1044
|
+
function Jo(e, t, n) {
|
|
1045
|
+
let r = oo(n, n.map((d, c) => c)), o = t.flatMap((d) => {
|
|
1046
1046
|
let c = e.outEdges(d);
|
|
1047
1047
|
return c ? c.map((f) => ({ pos: r[f.w], weight: e.edge(f).weight })).sort((f, h) => f.pos - h.pos) : [];
|
|
1048
1048
|
}), i = 1;
|
|
@@ -1058,7 +1058,7 @@ function Xo(e, t, n) {
|
|
|
1058
1058
|
a += d.weight * f;
|
|
1059
1059
|
}), a;
|
|
1060
1060
|
}
|
|
1061
|
-
function
|
|
1061
|
+
function Zo(e, t = []) {
|
|
1062
1062
|
return t.map((n) => {
|
|
1063
1063
|
let r = e.inEdges(n);
|
|
1064
1064
|
if (!r || !r.length) return { v: n };
|
|
@@ -1071,7 +1071,7 @@ function qo(e, t = []) {
|
|
|
1071
1071
|
}
|
|
1072
1072
|
});
|
|
1073
1073
|
}
|
|
1074
|
-
function
|
|
1074
|
+
function Qo(e, t) {
|
|
1075
1075
|
let n = {};
|
|
1076
1076
|
e.forEach((o, i) => {
|
|
1077
1077
|
let s = { indegree: 0, in: [], out: [], vs: [o.v], i };
|
|
@@ -1081,13 +1081,13 @@ function Jo(e, t) {
|
|
|
1081
1081
|
i !== void 0 && s !== void 0 && (s.indegree++, i.out.push(s));
|
|
1082
1082
|
});
|
|
1083
1083
|
let r = Object.values(n).filter((o) => !o.indegree);
|
|
1084
|
-
return
|
|
1084
|
+
return ei(r);
|
|
1085
1085
|
}
|
|
1086
|
-
function
|
|
1086
|
+
function ei(e) {
|
|
1087
1087
|
let t = [];
|
|
1088
1088
|
function n(o) {
|
|
1089
1089
|
return (i) => {
|
|
1090
|
-
i.merged || (i.barycenter === void 0 || o.barycenter === void 0 || i.barycenter >= o.barycenter) &&
|
|
1090
|
+
i.merged || (i.barycenter === void 0 || o.barycenter === void 0 || i.barycenter >= o.barycenter) && ti(o, i);
|
|
1091
1091
|
};
|
|
1092
1092
|
}
|
|
1093
1093
|
function r(o) {
|
|
@@ -1101,13 +1101,13 @@ function Zo(e) {
|
|
|
1101
1101
|
}
|
|
1102
1102
|
return t.filter((o) => !o.merged).map((o) => Ie(o, ["vs", "i", "barycenter", "weight"]));
|
|
1103
1103
|
}
|
|
1104
|
-
function
|
|
1104
|
+
function ti(e, t) {
|
|
1105
1105
|
let n = 0, r = 0;
|
|
1106
1106
|
e.weight && (n += e.barycenter * e.weight, r += e.weight), t.weight && (n += t.barycenter * t.weight, r += t.weight), e.vs = t.vs.concat(e.vs), e.barycenter = n / r, e.weight = r, e.i = Math.min(t.i, e.i), t.merged = !0;
|
|
1107
1107
|
}
|
|
1108
|
-
function
|
|
1109
|
-
let n =
|
|
1110
|
-
r.sort(
|
|
1108
|
+
function ni(e, t) {
|
|
1109
|
+
let n = no(e, (c) => Object.hasOwn(c, "barycenter")), r = n.lhs, o = n.rhs.sort((c, f) => f.i - c.i), i = [], s = 0, l = 0, a = 0;
|
|
1110
|
+
r.sort(ri(!!t)), a = Rt(i, o, a), r.forEach((c) => {
|
|
1111
1111
|
a += c.vs.length, i.push(c.vs), s += c.barycenter * c.weight, l += c.weight, a = Rt(i, o, a);
|
|
1112
1112
|
});
|
|
1113
1113
|
let d = { vs: i.flat(1) };
|
|
@@ -1118,22 +1118,22 @@ function Rt(e, t, n) {
|
|
|
1118
1118
|
for (; t.length && (r = t[t.length - 1]).i <= n; ) t.pop(), e.push(r.vs), n++;
|
|
1119
1119
|
return n;
|
|
1120
1120
|
}
|
|
1121
|
-
function
|
|
1121
|
+
function ri(e) {
|
|
1122
1122
|
return (t, n) => t.barycenter < n.barycenter ? -1 : t.barycenter > n.barycenter ? 1 : e ? n.i - t.i : t.i - n.i;
|
|
1123
1123
|
}
|
|
1124
|
-
function
|
|
1124
|
+
function kn(e, t, n, r) {
|
|
1125
1125
|
let o = e.children(t), i = e.node(t), s = i ? i.borderLeft : void 0, l = i ? i.borderRight : void 0, a = {};
|
|
1126
1126
|
s && (o = o.filter((h) => h !== s && h !== l));
|
|
1127
|
-
let d =
|
|
1127
|
+
let d = Zo(e, o);
|
|
1128
1128
|
d.forEach((h) => {
|
|
1129
1129
|
if (e.children(h.v).length) {
|
|
1130
|
-
let g =
|
|
1131
|
-
a[h.v] = g, Object.hasOwn(g, "barycenter") &&
|
|
1130
|
+
let g = kn(e, h.v, n, r);
|
|
1131
|
+
a[h.v] = g, Object.hasOwn(g, "barycenter") && ii(h, g);
|
|
1132
1132
|
}
|
|
1133
1133
|
});
|
|
1134
|
-
let c =
|
|
1135
|
-
|
|
1136
|
-
let f =
|
|
1134
|
+
let c = Qo(d, n);
|
|
1135
|
+
oi(c, a);
|
|
1136
|
+
let f = ni(c, r);
|
|
1137
1137
|
if (s && l) {
|
|
1138
1138
|
f.vs = [s, f.vs, l].flat(1);
|
|
1139
1139
|
let h = e.predecessors(s);
|
|
@@ -1144,17 +1144,17 @@ function En(e, t, n, r) {
|
|
|
1144
1144
|
}
|
|
1145
1145
|
return f;
|
|
1146
1146
|
}
|
|
1147
|
-
function
|
|
1147
|
+
function oi(e, t) {
|
|
1148
1148
|
e.forEach((n) => {
|
|
1149
1149
|
n.vs = n.vs.flatMap((r) => t[r] ? t[r].vs : r);
|
|
1150
1150
|
});
|
|
1151
1151
|
}
|
|
1152
|
-
function
|
|
1152
|
+
function ii(e, t) {
|
|
1153
1153
|
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);
|
|
1154
1154
|
}
|
|
1155
|
-
function
|
|
1155
|
+
function si(e, t, n, r) {
|
|
1156
1156
|
r || (r = e.nodes());
|
|
1157
|
-
let o =
|
|
1157
|
+
let o = li(e), i = new H({ compound: !0 }).setGraph({ root: o }).setDefaultNodeLabel((s) => e.node(s));
|
|
1158
1158
|
return r.forEach((s) => {
|
|
1159
1159
|
let l = e.node(s), a = e.parent(s);
|
|
1160
1160
|
if (l.rank === t || l.minRank <= t && t <= l.maxRank) {
|
|
@@ -1167,12 +1167,12 @@ function oi(e, t, n, r) {
|
|
|
1167
1167
|
}
|
|
1168
1168
|
}), i;
|
|
1169
1169
|
}
|
|
1170
|
-
function
|
|
1170
|
+
function li(e) {
|
|
1171
1171
|
let t;
|
|
1172
1172
|
for (; e.hasNode(t = Qe("_root")); ) ;
|
|
1173
1173
|
return t;
|
|
1174
1174
|
}
|
|
1175
|
-
function
|
|
1175
|
+
function di(e, t, n) {
|
|
1176
1176
|
let r = {}, o;
|
|
1177
1177
|
n.forEach((i) => {
|
|
1178
1178
|
let s = e.parent(i), l, a;
|
|
@@ -1185,20 +1185,20 @@ function si(e, t, n) {
|
|
|
1185
1185
|
}
|
|
1186
1186
|
});
|
|
1187
1187
|
}
|
|
1188
|
-
function
|
|
1188
|
+
function _n(e, t = {}) {
|
|
1189
1189
|
if (typeof t.customOrder == "function") {
|
|
1190
|
-
t.customOrder(e,
|
|
1190
|
+
t.customOrder(e, _n);
|
|
1191
1191
|
return;
|
|
1192
1192
|
}
|
|
1193
|
-
let n =
|
|
1194
|
-
if (
|
|
1193
|
+
let n = un(e), r = Ft(e, be(1, n + 1), "inEdges"), o = Ft(e, be(n - 1, -1, -1), "outEdges"), i = Xo(e);
|
|
1194
|
+
if (At(e, i), t.disableOptimalOrderHeuristic) return;
|
|
1195
1195
|
let s = Number.POSITIVE_INFINITY, l, a = t.constraints || [];
|
|
1196
1196
|
for (let d = 0, c = 0; c < 4; ++d, ++c) {
|
|
1197
|
-
|
|
1198
|
-
let f =
|
|
1197
|
+
ai(d % 2 ? r : o, d % 4 >= 2, a), i = ve(e);
|
|
1198
|
+
let f = qo(e, i);
|
|
1199
1199
|
f < s ? (c = 0, l = Object.assign({}, i), s = f) : f === s && (l = structuredClone(i));
|
|
1200
1200
|
}
|
|
1201
|
-
|
|
1201
|
+
At(e, l);
|
|
1202
1202
|
}
|
|
1203
1203
|
function Ft(e, t, n) {
|
|
1204
1204
|
let r = /* @__PURE__ */ new Map(), o = (i, s) => {
|
|
@@ -1209,48 +1209,48 @@ function Ft(e, t, n) {
|
|
|
1209
1209
|
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);
|
|
1210
1210
|
}
|
|
1211
1211
|
return t.map(function(i) {
|
|
1212
|
-
return
|
|
1212
|
+
return si(e, i, n, r.get(i) || []);
|
|
1213
1213
|
});
|
|
1214
1214
|
}
|
|
1215
|
-
function
|
|
1215
|
+
function ai(e, t, n) {
|
|
1216
1216
|
let r = new H();
|
|
1217
1217
|
e.forEach(function(o) {
|
|
1218
1218
|
n.forEach((l) => r.setEdge(l.left, l.right));
|
|
1219
|
-
let i = o.graph().root, s =
|
|
1220
|
-
s.vs.forEach((l, a) => o.node(l).order = a),
|
|
1219
|
+
let i = o.graph().root, s = kn(o, i, r, t);
|
|
1220
|
+
s.vs.forEach((l, a) => o.node(l).order = a), di(o, r, s.vs);
|
|
1221
1221
|
});
|
|
1222
1222
|
}
|
|
1223
|
-
function
|
|
1223
|
+
function At(e, t) {
|
|
1224
1224
|
Object.values(t).forEach((n) => n.forEach((r, o) => e.node(r).order = o));
|
|
1225
1225
|
}
|
|
1226
|
-
function
|
|
1226
|
+
function ci(e, t) {
|
|
1227
1227
|
let n = {};
|
|
1228
1228
|
function r(o, i) {
|
|
1229
1229
|
let s = 0, l = 0, a = o.length, d = i[i.length - 1];
|
|
1230
1230
|
return i.forEach((c, f) => {
|
|
1231
|
-
let h =
|
|
1231
|
+
let h = ui(e, c), g = h ? e.node(h).order : a;
|
|
1232
1232
|
(h || c === d) && (i.slice(l, f + 1).forEach((p) => {
|
|
1233
1233
|
let E = e.predecessors(p);
|
|
1234
|
-
E && E.forEach((
|
|
1235
|
-
let k = e.node(
|
|
1236
|
-
(N < s || g < N) && !(k.dummy && e.node(p).dummy) &&
|
|
1234
|
+
E && E.forEach((y) => {
|
|
1235
|
+
let k = e.node(y), N = k.order;
|
|
1236
|
+
(N < s || g < N) && !(k.dummy && e.node(p).dummy) && Sn(n, y, p);
|
|
1237
1237
|
});
|
|
1238
1238
|
}), l = f + 1, s = g);
|
|
1239
1239
|
}), i;
|
|
1240
1240
|
}
|
|
1241
1241
|
return t.length && t.reduce(r), n;
|
|
1242
1242
|
}
|
|
1243
|
-
function
|
|
1243
|
+
function fi(e, t) {
|
|
1244
1244
|
let n = {};
|
|
1245
1245
|
function r(i, s, l, a, d) {
|
|
1246
|
-
|
|
1246
|
+
be(s, l).forEach((c) => {
|
|
1247
1247
|
let f = i[c];
|
|
1248
1248
|
if (f !== void 0 && e.node(f).dummy) {
|
|
1249
1249
|
let h = e.predecessors(f);
|
|
1250
1250
|
h && h.forEach((g) => {
|
|
1251
1251
|
if (g === void 0) return;
|
|
1252
1252
|
let p = e.node(g);
|
|
1253
|
-
p.dummy && (p.order < a || p.order > d) &&
|
|
1253
|
+
p.dummy && (p.order < a || p.order > d) && Sn(n, g, f);
|
|
1254
1254
|
});
|
|
1255
1255
|
}
|
|
1256
1256
|
});
|
|
@@ -1271,13 +1271,13 @@ function ai(e, t) {
|
|
|
1271
1271
|
}
|
|
1272
1272
|
return t.length && t.reduce(o), n;
|
|
1273
1273
|
}
|
|
1274
|
-
function
|
|
1274
|
+
function ui(e, t) {
|
|
1275
1275
|
if (e.node(t).dummy) {
|
|
1276
1276
|
let n = e.predecessors(t);
|
|
1277
1277
|
if (n) return n.find((r) => e.node(r).dummy);
|
|
1278
1278
|
}
|
|
1279
1279
|
}
|
|
1280
|
-
function
|
|
1280
|
+
function Sn(e, t, n) {
|
|
1281
1281
|
if (t > n) {
|
|
1282
1282
|
let o = t;
|
|
1283
1283
|
t = n, n = o;
|
|
@@ -1285,7 +1285,7 @@ function kn(e, t, n) {
|
|
|
1285
1285
|
let r = e[t];
|
|
1286
1286
|
r || (e[t] = r = {}), r[n] = !0;
|
|
1287
1287
|
}
|
|
1288
|
-
function
|
|
1288
|
+
function hi(e, t, n) {
|
|
1289
1289
|
if (t > n) {
|
|
1290
1290
|
let o = t;
|
|
1291
1291
|
t = n, n = o;
|
|
@@ -1293,7 +1293,7 @@ function fi(e, t, n) {
|
|
|
1293
1293
|
let r = e[t];
|
|
1294
1294
|
return r !== void 0 && Object.hasOwn(r, n);
|
|
1295
1295
|
}
|
|
1296
|
-
function
|
|
1296
|
+
function gi(e, t, n, r) {
|
|
1297
1297
|
let o = {}, i = {}, s = {};
|
|
1298
1298
|
return t.forEach((l) => {
|
|
1299
1299
|
l.forEach((a, d) => {
|
|
@@ -1305,30 +1305,30 @@ function ui(e, t, n, r) {
|
|
|
1305
1305
|
let c = r(d);
|
|
1306
1306
|
if (c && c.length) {
|
|
1307
1307
|
let f = c.sort((g, p) => {
|
|
1308
|
-
let E = s[g],
|
|
1309
|
-
return (E !== void 0 ? E : 0) - (
|
|
1308
|
+
let E = s[g], y = s[p];
|
|
1309
|
+
return (E !== void 0 ? E : 0) - (y !== void 0 ? y : 0);
|
|
1310
1310
|
}), h = (f.length - 1) / 2;
|
|
1311
1311
|
for (let g = Math.floor(h), p = Math.ceil(h); g <= p; ++g) {
|
|
1312
1312
|
let E = f[g];
|
|
1313
1313
|
if (E === void 0) continue;
|
|
1314
|
-
let
|
|
1315
|
-
if (
|
|
1314
|
+
let y = s[E];
|
|
1315
|
+
if (y !== void 0 && i[d] === d && a < y && !hi(n, d, E)) {
|
|
1316
1316
|
let k = o[E];
|
|
1317
|
-
k !== void 0 && (i[E] = d, i[d] = o[d] = k, a =
|
|
1317
|
+
k !== void 0 && (i[E] = d, i[d] = o[d] = k, a = y);
|
|
1318
1318
|
}
|
|
1319
1319
|
}
|
|
1320
1320
|
}
|
|
1321
1321
|
});
|
|
1322
1322
|
}), { root: o, align: i };
|
|
1323
1323
|
}
|
|
1324
|
-
function
|
|
1325
|
-
let i = {}, s =
|
|
1324
|
+
function pi(e, t, n, r, o = !1) {
|
|
1325
|
+
let i = {}, s = yi(e, t, n, o), l = o ? "borderLeft" : "borderRight";
|
|
1326
1326
|
function a(g, p) {
|
|
1327
|
-
let E = s.nodes().slice(),
|
|
1327
|
+
let E = s.nodes().slice(), y = {}, k = E.pop();
|
|
1328
1328
|
for (; k; ) {
|
|
1329
|
-
if (
|
|
1329
|
+
if (y[k]) g(k);
|
|
1330
1330
|
else {
|
|
1331
|
-
|
|
1331
|
+
y[k] = !0, E.push(k);
|
|
1332
1332
|
for (let N of p(k)) E.push(N);
|
|
1333
1333
|
}
|
|
1334
1334
|
k = E.pop();
|
|
@@ -1336,9 +1336,9 @@ function hi(e, t, n, r, o = !1) {
|
|
|
1336
1336
|
}
|
|
1337
1337
|
function d(g) {
|
|
1338
1338
|
let p = s.inEdges(g);
|
|
1339
|
-
p ? i[g] = p.reduce((E,
|
|
1339
|
+
p ? i[g] = p.reduce((E, y) => {
|
|
1340
1340
|
var k;
|
|
1341
|
-
let N = (k = i[
|
|
1341
|
+
let N = (k = i[y.v]) != null ? k : 0, O = s.edge(y);
|
|
1342
1342
|
return Math.max(E, N + (O !== void 0 ? O : 0));
|
|
1343
1343
|
}, 0) : i[g] = 0;
|
|
1344
1344
|
}
|
|
@@ -1348,8 +1348,8 @@ function hi(e, t, n, r, o = !1) {
|
|
|
1348
1348
|
let O = i[N.w], j = s.edge(N);
|
|
1349
1349
|
return Math.min(k, (O !== void 0 ? O : 0) - (j !== void 0 ? j : 0));
|
|
1350
1350
|
}, Number.POSITIVE_INFINITY));
|
|
1351
|
-
let
|
|
1352
|
-
E !== Number.POSITIVE_INFINITY &&
|
|
1351
|
+
let y = e.node(g);
|
|
1352
|
+
E !== Number.POSITIVE_INFINITY && y.borderType !== l && (i[g] = Math.max(i[g] !== void 0 ? i[g] : 0, E));
|
|
1353
1353
|
}
|
|
1354
1354
|
function f(g) {
|
|
1355
1355
|
return s.predecessors(g) || [];
|
|
@@ -1363,8 +1363,8 @@ function hi(e, t, n, r, o = !1) {
|
|
|
1363
1363
|
E !== void 0 && (i[g] = (p = i[E]) != null ? p : 0);
|
|
1364
1364
|
}), i;
|
|
1365
1365
|
}
|
|
1366
|
-
function
|
|
1367
|
-
let o = new H(), i = e.graph(), s =
|
|
1366
|
+
function yi(e, t, n, r) {
|
|
1367
|
+
let o = new H(), i = e.graph(), s = Ei(i.nodesep, i.edgesep, r);
|
|
1368
1368
|
return t.forEach((l) => {
|
|
1369
1369
|
let a;
|
|
1370
1370
|
l.forEach((d) => {
|
|
@@ -1382,18 +1382,18 @@ function gi(e, t, n, r) {
|
|
|
1382
1382
|
});
|
|
1383
1383
|
}), o;
|
|
1384
1384
|
}
|
|
1385
|
-
function
|
|
1385
|
+
function bi(e, t) {
|
|
1386
1386
|
return Object.values(t).reduce((n, r) => {
|
|
1387
1387
|
let o = Number.NEGATIVE_INFINITY, i = Number.POSITIVE_INFINITY;
|
|
1388
1388
|
Object.entries(r).forEach(([l, a]) => {
|
|
1389
|
-
let d =
|
|
1389
|
+
let d = xi(e, l) / 2;
|
|
1390
1390
|
o = Math.max(a + d, o), i = Math.min(a - d, i);
|
|
1391
1391
|
});
|
|
1392
1392
|
let s = o - i;
|
|
1393
1393
|
return s < n[0] && (n = [s, r]), n;
|
|
1394
1394
|
}, [Number.POSITIVE_INFINITY, null])[1];
|
|
1395
1395
|
}
|
|
1396
|
-
function
|
|
1396
|
+
function mi(e, t) {
|
|
1397
1397
|
let n = Object.values(t), r = q(Math.min, n), o = q(Math.max, n);
|
|
1398
1398
|
["u", "d"].forEach((i) => {
|
|
1399
1399
|
["l", "r"].forEach((s) => {
|
|
@@ -1404,7 +1404,7 @@ function bi(e, t) {
|
|
|
1404
1404
|
});
|
|
1405
1405
|
});
|
|
1406
1406
|
}
|
|
1407
|
-
function
|
|
1407
|
+
function vi(e, t = void 0) {
|
|
1408
1408
|
let n = e.ul;
|
|
1409
1409
|
return n ? Oe(n, (r, o) => {
|
|
1410
1410
|
var i, s;
|
|
@@ -1419,19 +1419,19 @@ function yi(e, t = void 0) {
|
|
|
1419
1419
|
return (((i = l[1]) != null ? i : 0) + ((s = l[2]) != null ? s : 0)) / 2;
|
|
1420
1420
|
}) : {};
|
|
1421
1421
|
}
|
|
1422
|
-
function
|
|
1423
|
-
let t = ve(e), n = Object.assign(
|
|
1422
|
+
function wi(e) {
|
|
1423
|
+
let t = ve(e), n = Object.assign(ci(e, t), fi(e, t)), r = {}, o;
|
|
1424
1424
|
["u", "d"].forEach((s) => {
|
|
1425
1425
|
o = s === "u" ? t : Object.values(t).reverse(), ["l", "r"].forEach((l) => {
|
|
1426
1426
|
l === "r" && (o = o.map((c) => Object.values(c).reverse()));
|
|
1427
|
-
let a =
|
|
1427
|
+
let a = gi(e, o, n, (c) => (s === "u" ? e.predecessors(c) : e.successors(c)) || []), d = pi(e, o, a.root, a.align, l === "r");
|
|
1428
1428
|
l === "r" && (d = Oe(d, (c) => -c)), r[s + l] = d;
|
|
1429
1429
|
});
|
|
1430
1430
|
});
|
|
1431
|
-
let i =
|
|
1432
|
-
return
|
|
1431
|
+
let i = bi(e, r);
|
|
1432
|
+
return mi(r, i), vi(r, e.graph().align);
|
|
1433
1433
|
}
|
|
1434
|
-
function
|
|
1434
|
+
function Ei(e, t, n) {
|
|
1435
1435
|
return (r, o, i) => {
|
|
1436
1436
|
let s = r.node(o), l = r.node(i), a = 0, d;
|
|
1437
1437
|
if (a += s.width / 2, Object.hasOwn(s, "labelpos")) switch (s.labelpos.toLowerCase()) {
|
|
@@ -1453,13 +1453,13 @@ function vi(e, t, n) {
|
|
|
1453
1453
|
return d && (a += n ? d : -d), a;
|
|
1454
1454
|
};
|
|
1455
1455
|
}
|
|
1456
|
-
function
|
|
1456
|
+
function xi(e, t) {
|
|
1457
1457
|
return e.node(t).width;
|
|
1458
1458
|
}
|
|
1459
|
-
function
|
|
1460
|
-
e =
|
|
1459
|
+
function ki(e) {
|
|
1460
|
+
e = cn(e), _i(e), Object.entries(wi(e)).forEach(([t, n]) => e.node(t).x = n);
|
|
1461
1461
|
}
|
|
1462
|
-
function
|
|
1462
|
+
function _i(e) {
|
|
1463
1463
|
let t = ve(e), n = e.graph(), r = n.ranksep, o = n.rankalign, i = 0;
|
|
1464
1464
|
t.forEach((s) => {
|
|
1465
1465
|
let l = s.reduce((a, d) => {
|
|
@@ -1473,17 +1473,17 @@ function xi(e) {
|
|
|
1473
1473
|
}), i += l + r;
|
|
1474
1474
|
});
|
|
1475
1475
|
}
|
|
1476
|
-
function
|
|
1477
|
-
let n = t.debugTiming ?
|
|
1476
|
+
function Si(e, t = {}) {
|
|
1477
|
+
let n = t.debugTiming ? hn : gn;
|
|
1478
1478
|
return n("layout", () => {
|
|
1479
|
-
let r = n(" buildLayoutGraph", () =>
|
|
1480
|
-
return n(" runLayout", () =>
|
|
1479
|
+
let r = n(" buildLayoutGraph", () => Pi(e));
|
|
1480
|
+
return n(" runLayout", () => Ni(r, n, t)), n(" updateInputGraph", () => Ti(e, r)), r;
|
|
1481
1481
|
});
|
|
1482
1482
|
}
|
|
1483
|
-
function
|
|
1484
|
-
t(" makeSpaceForEdgeLabels", () =>
|
|
1483
|
+
function Ni(e, t, n) {
|
|
1484
|
+
t(" makeSpaceForEdgeLabels", () => Ri(e)), t(" removeSelfEdges", () => Ki(e)), t(" acyclic", () => po(e)), t(" nestingGraph.run", () => Do(e)), t(" rank", () => Mo(cn(e))), t(" injectEdgeLabelProxies", () => Fi(e)), t(" removeEmptyRanks", () => eo(e)), t(" nestingGraph.cleanup", () => $o(e)), t(" normalizeRanks", () => Qr(e)), t(" assignRankMinMax", () => Ai(e)), t(" removeEdgeLabelProxies", () => Di(e)), t(" normalize.run", () => mo(e)), t(" parentDummyChains", () => Po(e)), t(" addBorderSegments", () => Go(e)), t(" order", () => _n(e, n)), t(" insertSelfEdges", () => Hi(e)), t(" adjustCoordinateSystem", () => Ko(e)), t(" position", () => ki(e)), t(" positionSelfEdges", () => Vi(e)), t(" removeBorderNodes", () => Yi(e)), t(" normalize.undo", () => wo(e)), t(" fixupEdgeLabelCoords", () => $i(e)), t(" undoCoordinateSystem", () => Ho(e)), t(" translateGraph", () => Bi(e)), t(" assignNodeIntersects", () => Wi(e)), t(" reversePoints", () => Gi(e)), t(" acyclic.undo", () => bo(e));
|
|
1485
1485
|
}
|
|
1486
|
-
function
|
|
1486
|
+
function Ti(e, t) {
|
|
1487
1487
|
e.nodes().forEach((n) => {
|
|
1488
1488
|
let r = e.node(n), o = t.node(n);
|
|
1489
1489
|
r && (r.x = o.x, r.y = o.y, r.order = o.order, r.rank = o.rank, t.children(n).length && (r.width = o.width, r.height = o.height));
|
|
@@ -1492,29 +1492,29 @@ function Si(e, t) {
|
|
|
1492
1492
|
r.points = o.points, Object.hasOwn(o, "x") && (r.x = o.x, r.y = o.y);
|
|
1493
1493
|
}), e.graph().width = t.graph().width, e.graph().height = t.graph().height;
|
|
1494
1494
|
}
|
|
1495
|
-
var
|
|
1496
|
-
function
|
|
1495
|
+
var Ci = ["nodesep", "edgesep", "ranksep", "marginx", "marginy"], Ii = { ranksep: 50, edgesep: 20, nodesep: 50, rankdir: "TB", rankalign: "center" }, Oi = ["acyclicer", "ranker", "rankdir", "align", "rankalign"], Mi = ["width", "height", "rank"], Dt = { width: 0, height: 0 }, ji = ["minlen", "weight", "width", "height", "labeloffset"], zi = { minlen: 1, weight: 1, width: 0, height: 0, labeloffset: 10, labelpos: "r" }, Li = ["labelpos"];
|
|
1496
|
+
function Pi(e) {
|
|
1497
1497
|
let t = new H({ multigraph: !0, compound: !0 }), n = Ge(e.graph());
|
|
1498
|
-
return t.setGraph(Object.assign({},
|
|
1499
|
-
let o = Ge(e.node(r)), i = $e(o,
|
|
1500
|
-
Object.keys(
|
|
1501
|
-
i[l] === void 0 && (i[l] =
|
|
1498
|
+
return t.setGraph(Object.assign({}, Ii, $e(n, Ci), Ie(n, Oi))), e.nodes().forEach((r) => {
|
|
1499
|
+
let o = Ge(e.node(r)), i = $e(o, Mi);
|
|
1500
|
+
Object.keys(Dt).forEach((l) => {
|
|
1501
|
+
i[l] === void 0 && (i[l] = Dt[l]);
|
|
1502
1502
|
}), t.setNode(r, i);
|
|
1503
1503
|
let s = e.parent(r);
|
|
1504
1504
|
s !== void 0 && t.setParent(r, s);
|
|
1505
1505
|
}), e.edges().forEach((r) => {
|
|
1506
1506
|
let o = Ge(e.edge(r));
|
|
1507
|
-
t.setEdge(r, Object.assign({},
|
|
1507
|
+
t.setEdge(r, Object.assign({}, zi, $e(o, ji), Ie(o, Li)));
|
|
1508
1508
|
}), t;
|
|
1509
1509
|
}
|
|
1510
|
-
function
|
|
1510
|
+
function Ri(e) {
|
|
1511
1511
|
let t = e.graph();
|
|
1512
1512
|
t.ranksep /= 2, e.edges().forEach((n) => {
|
|
1513
1513
|
let r = e.edge(n);
|
|
1514
1514
|
r.minlen *= 2, r.labelpos.toLowerCase() !== "c" && (t.rankdir === "TB" || t.rankdir === "BT" ? r.width += r.labeloffset : r.height += r.labeloffset);
|
|
1515
1515
|
});
|
|
1516
1516
|
}
|
|
1517
|
-
function
|
|
1517
|
+
function Fi(e) {
|
|
1518
1518
|
e.edges().forEach((t) => {
|
|
1519
1519
|
let n = e.edge(t);
|
|
1520
1520
|
if (n.width && n.height) {
|
|
@@ -1523,14 +1523,14 @@ function Pi(e) {
|
|
|
1523
1523
|
}
|
|
1524
1524
|
});
|
|
1525
1525
|
}
|
|
1526
|
-
function
|
|
1526
|
+
function Ai(e) {
|
|
1527
1527
|
let t = 0;
|
|
1528
1528
|
e.nodes().forEach((n) => {
|
|
1529
1529
|
let r = e.node(n);
|
|
1530
1530
|
r.borderTop && (r.minRank = e.node(r.borderTop).rank, r.maxRank = e.node(r.borderBottom).rank, t = Math.max(t, r.maxRank));
|
|
1531
1531
|
}), e.graph().maxRank = t;
|
|
1532
1532
|
}
|
|
1533
|
-
function
|
|
1533
|
+
function Di(e) {
|
|
1534
1534
|
e.nodes().forEach((t) => {
|
|
1535
1535
|
let n = e.node(t);
|
|
1536
1536
|
if (n.dummy === "edge-proxy") {
|
|
@@ -1539,7 +1539,7 @@ function Fi(e) {
|
|
|
1539
1539
|
}
|
|
1540
1540
|
});
|
|
1541
1541
|
}
|
|
1542
|
-
function
|
|
1542
|
+
function Bi(e) {
|
|
1543
1543
|
let t = Number.POSITIVE_INFINITY, n = 0, r = Number.POSITIVE_INFINITY, o = 0, i = e.graph(), s = i.marginx || 0, l = i.marginy || 0;
|
|
1544
1544
|
function a(d) {
|
|
1545
1545
|
let c = d.x, f = d.y, h = d.width, g = d.height;
|
|
@@ -1558,13 +1558,13 @@ function Di(e) {
|
|
|
1558
1558
|
}), Object.hasOwn(c, "x") && (c.x -= t), Object.hasOwn(c, "y") && (c.y -= r);
|
|
1559
1559
|
}), i.width = n - t + s, i.height = o - r + l;
|
|
1560
1560
|
}
|
|
1561
|
-
function
|
|
1561
|
+
function Wi(e) {
|
|
1562
1562
|
e.edges().forEach((t) => {
|
|
1563
1563
|
let n = e.edge(t), r = e.node(t.v), o = e.node(t.w), i, s;
|
|
1564
1564
|
n.points ? (i = n.points[0], s = n.points[n.points.length - 1]) : (n.points = [], i = o, s = r), n.points.unshift(It(r, i)), n.points.push(It(o, s));
|
|
1565
1565
|
});
|
|
1566
1566
|
}
|
|
1567
|
-
function
|
|
1567
|
+
function $i(e) {
|
|
1568
1568
|
e.edges().forEach((t) => {
|
|
1569
1569
|
let n = e.edge(t);
|
|
1570
1570
|
if (Object.hasOwn(n, "x")) switch ((n.labelpos === "l" || n.labelpos === "r") && (n.width -= n.labeloffset), n.labelpos) {
|
|
@@ -1577,13 +1577,13 @@ function Ai(e) {
|
|
|
1577
1577
|
}
|
|
1578
1578
|
});
|
|
1579
1579
|
}
|
|
1580
|
-
function
|
|
1580
|
+
function Gi(e) {
|
|
1581
1581
|
e.edges().forEach((t) => {
|
|
1582
1582
|
let n = e.edge(t);
|
|
1583
1583
|
n.reversed && n.points.reverse();
|
|
1584
1584
|
});
|
|
1585
1585
|
}
|
|
1586
|
-
function
|
|
1586
|
+
function Yi(e) {
|
|
1587
1587
|
e.nodes().forEach((t) => {
|
|
1588
1588
|
if (e.children(t).length) {
|
|
1589
1589
|
let n = e.node(t), r = e.node(n.borderTop), o = e.node(n.borderBottom), i = e.node(n.borderLeft[n.borderLeft.length - 1]), s = e.node(n.borderRight[n.borderRight.length - 1]);
|
|
@@ -1593,7 +1593,7 @@ function $i(e) {
|
|
|
1593
1593
|
e.node(t).dummy === "border" && e.removeNode(t);
|
|
1594
1594
|
});
|
|
1595
1595
|
}
|
|
1596
|
-
function
|
|
1596
|
+
function Ki(e) {
|
|
1597
1597
|
e.edges().forEach((t) => {
|
|
1598
1598
|
if (t.v === t.w) {
|
|
1599
1599
|
let n = e.node(t.v);
|
|
@@ -1601,7 +1601,7 @@ function Gi(e) {
|
|
|
1601
1601
|
}
|
|
1602
1602
|
});
|
|
1603
1603
|
}
|
|
1604
|
-
function
|
|
1604
|
+
function Hi(e) {
|
|
1605
1605
|
ve(e).forEach((t) => {
|
|
1606
1606
|
let n = 0;
|
|
1607
1607
|
t.forEach((r, o) => {
|
|
@@ -1612,7 +1612,7 @@ function Yi(e) {
|
|
|
1612
1612
|
});
|
|
1613
1613
|
});
|
|
1614
1614
|
}
|
|
1615
|
-
function
|
|
1615
|
+
function Vi(e) {
|
|
1616
1616
|
e.nodes().forEach((t) => {
|
|
1617
1617
|
let n = e.node(t);
|
|
1618
1618
|
if (n.dummy === "selfedge") {
|
|
@@ -1630,7 +1630,7 @@ function Ge(e) {
|
|
|
1630
1630
|
typeof n == "string" && (n = n.toLowerCase()), t[n] = r;
|
|
1631
1631
|
}), t;
|
|
1632
1632
|
}
|
|
1633
|
-
function
|
|
1633
|
+
function Ui(e) {
|
|
1634
1634
|
let t = ve(e), n = new H({ compound: !0, multigraph: !0 }).setGraph({});
|
|
1635
1635
|
return e.nodes().forEach((r) => {
|
|
1636
1636
|
n.setNode(r, { label: r }), n.setParent(r, "layer" + e.node(r).rank);
|
|
@@ -1639,15 +1639,15 @@ function Hi(e) {
|
|
|
1639
1639
|
n.setNode(i, { rank: "same" }), r.reduce((s, l) => (n.setEdge(s, l, { style: "invis" }), l));
|
|
1640
1640
|
}), n;
|
|
1641
1641
|
}
|
|
1642
|
-
var
|
|
1642
|
+
var Xi = { graphlib: en, version: io, layout: Si, debug: Ui, util: { time: hn, notime: gn } }, Bt = Xi;
|
|
1643
1643
|
/*! For license information please see dagre.esm.js.LEGAL.txt */
|
|
1644
|
-
const
|
|
1644
|
+
const qi = (e) => {
|
|
1645
1645
|
const t = [];
|
|
1646
1646
|
return e.nodeInternals.forEach((n, r) => t.push(`${r}:${n.height ?? 0}`)), t.join(",");
|
|
1647
|
-
},
|
|
1648
|
-
const n =
|
|
1647
|
+
}, Ji = ({ onHeightsReady: e, nodeCount: t }) => {
|
|
1648
|
+
const n = Wn(qi), r = _t("");
|
|
1649
1649
|
_t(0);
|
|
1650
|
-
const { fitView: o } =
|
|
1650
|
+
const { fitView: o } = $n();
|
|
1651
1651
|
return re(() => {
|
|
1652
1652
|
if (!n || n === r.current) return;
|
|
1653
1653
|
const i = {};
|
|
@@ -1657,13 +1657,13 @@ const Ui = (e) => {
|
|
|
1657
1657
|
}
|
|
1658
1658
|
Object.keys(i).length !== 0 && (r.current = n, e(i));
|
|
1659
1659
|
}, [n]), null;
|
|
1660
|
-
},
|
|
1660
|
+
}, Zi = {
|
|
1661
1661
|
gray: { bg: "#f1f5f9", fg: "#475569" },
|
|
1662
1662
|
green: { bg: "#dcfce7", fg: "#166534" },
|
|
1663
1663
|
amber: { bg: "#fef3c7", fg: "#92400e" },
|
|
1664
1664
|
red: { bg: "#fee2e2", fg: "#991b1b" }
|
|
1665
1665
|
};
|
|
1666
|
-
function
|
|
1666
|
+
function Qi({
|
|
1667
1667
|
workflowName: e,
|
|
1668
1668
|
onWorkflowNameChange: t,
|
|
1669
1669
|
status: n,
|
|
@@ -1673,8 +1673,8 @@ function Ji({
|
|
|
1673
1673
|
saveLabel: s = "Save",
|
|
1674
1674
|
saveDisabled: l = !1
|
|
1675
1675
|
}) {
|
|
1676
|
-
const [a, d] =
|
|
1677
|
-
|
|
1676
|
+
const [a, d] = D.useState(!1), [c, f] = D.useState(!1), [h, g] = D.useState(e ?? "");
|
|
1677
|
+
D.useEffect(() => {
|
|
1678
1678
|
g(e ?? "");
|
|
1679
1679
|
}, [e]);
|
|
1680
1680
|
const p = async () => {
|
|
@@ -1686,7 +1686,7 @@ function Ji({
|
|
|
1686
1686
|
d(!1);
|
|
1687
1687
|
}
|
|
1688
1688
|
}
|
|
1689
|
-
}, E =
|
|
1689
|
+
}, E = Zi[r] ?? {
|
|
1690
1690
|
bg: r,
|
|
1691
1691
|
fg: "#fff"
|
|
1692
1692
|
};
|
|
@@ -1708,12 +1708,12 @@ function Ji({
|
|
|
1708
1708
|
"input",
|
|
1709
1709
|
{
|
|
1710
1710
|
value: h,
|
|
1711
|
-
onChange: (
|
|
1711
|
+
onChange: (y) => g(y.target.value),
|
|
1712
1712
|
onBlur: () => {
|
|
1713
1713
|
f(!1), h !== e && t(h);
|
|
1714
1714
|
},
|
|
1715
|
-
onKeyDown: (
|
|
1716
|
-
|
|
1715
|
+
onKeyDown: (y) => {
|
|
1716
|
+
y.key === "Enter" && y.target.blur(), y.key === "Escape" && (g(e ?? ""), f(!1));
|
|
1717
1717
|
},
|
|
1718
1718
|
autoFocus: !0,
|
|
1719
1719
|
style: {
|
|
@@ -1816,15 +1816,15 @@ const je = ({ isOpen: e, onClose: t, title: n, icon: r, children: o, footer: i,
|
|
|
1816
1816
|
const [l, a] = M(!1), d = () => a((h) => !h), c = () => /* @__PURE__ */ v(Q, { sx: { display: "flex", alignItems: "center", p: 2, pt: 3, borderBottom: "1px solid #e0e0e0", mb: 0, flexShrink: 0 }, children: [
|
|
1817
1817
|
r && /* @__PURE__ */ u(Q, { sx: { mr: 1.5, display: "flex", alignItems: "center", fontSize: "1.25rem", color: "#1DBF60" }, children: r }),
|
|
1818
1818
|
/* @__PURE__ */ u("span", { style: { flexGrow: 1, fontSize: 14, fontWeight: 500, color: "#212121" }, children: n }),
|
|
1819
|
-
/* @__PURE__ */ u(St, { onClick: d, size: "small", sx: { mr: 1 }, title: l ? "Collapse" : "Expand", "data-testid": "expand-collapse-base-drawer-btn", children: l ? /* @__PURE__ */ u(
|
|
1820
|
-
/* @__PURE__ */ u(St, { onClick: t, size: "small", "data-testid": "close-drawer-button", children: /* @__PURE__ */ u(
|
|
1819
|
+
/* @__PURE__ */ u(St, { onClick: d, size: "small", sx: { mr: 1 }, title: l ? "Collapse" : "Expand", "data-testid": "expand-collapse-base-drawer-btn", children: l ? /* @__PURE__ */ u(mr, {}) : /* @__PURE__ */ u(vr, {}) }),
|
|
1820
|
+
/* @__PURE__ */ u(St, { onClick: t, size: "small", "data-testid": "close-drawer-button", children: /* @__PURE__ */ u(rr, {}) })
|
|
1821
1821
|
] }), f = () => i ? /* @__PURE__ */ u(Q, { sx: { flexShrink: 0, p: 2, borderTop: "1px solid #e0e0e0", display: "flex", justifyContent: "flex-end", gap: 2 }, children: i }) : null;
|
|
1822
|
-
return l ? /* @__PURE__ */ v(
|
|
1822
|
+
return l ? /* @__PURE__ */ v(Qn, { open: e, onClose: t, maxWidth: !1, fullWidth: !0, PaperProps: { sx: { display: "flex", flexDirection: "column", height: "80vh", boxShadow: 24, width: "750px", maxWidth: "100%" } }, children: [
|
|
1823
1823
|
/* @__PURE__ */ u(c, {}),
|
|
1824
1824
|
/* @__PURE__ */ u(Q, { sx: { flexGrow: 1, overflowY: "auto", p: 0 }, children: o }),
|
|
1825
1825
|
/* @__PURE__ */ u(f, {})
|
|
1826
1826
|
] }) : /* @__PURE__ */ v(
|
|
1827
|
-
|
|
1827
|
+
er,
|
|
1828
1828
|
{
|
|
1829
1829
|
anchor: "right",
|
|
1830
1830
|
open: e,
|
|
@@ -1854,7 +1854,7 @@ const je = ({ isOpen: e, onClose: t, title: n, icon: r, children: o, footer: i,
|
|
|
1854
1854
|
]
|
|
1855
1855
|
}
|
|
1856
1856
|
);
|
|
1857
|
-
},
|
|
1857
|
+
}, es = ({
|
|
1858
1858
|
open: e,
|
|
1859
1859
|
templates: t,
|
|
1860
1860
|
messages: n,
|
|
@@ -1862,7 +1862,7 @@ const je = ({ isOpen: e, onClose: t, title: n, icon: r, children: o, footer: i,
|
|
|
1862
1862
|
onClose: o,
|
|
1863
1863
|
loadTriggerSources: i
|
|
1864
1864
|
}) => {
|
|
1865
|
-
const [s, l] = M("trigger"), [a, d] = M(null), [c, f] = M([]), [h, g] = M([]), [p, E] = M(!1), [
|
|
1865
|
+
const [s, l] = M("trigger"), [a, d] = M(null), [c, f] = M([]), [h, g] = M([]), [p, E] = M(!1), [y, k] = M(null);
|
|
1866
1866
|
re(() => {
|
|
1867
1867
|
e || (l("trigger"), d(null), f([]), g([]), E(!1), k(null));
|
|
1868
1868
|
}, [e]);
|
|
@@ -1873,14 +1873,14 @@ const je = ({ isOpen: e, onClose: t, title: n, icon: r, children: o, footer: i,
|
|
|
1873
1873
|
}
|
|
1874
1874
|
d(L), E(!0), k(null);
|
|
1875
1875
|
try {
|
|
1876
|
-
const
|
|
1877
|
-
if (!
|
|
1876
|
+
const A = await i(L.triggerKey);
|
|
1877
|
+
if (!A || A.length === 0) {
|
|
1878
1878
|
r(L);
|
|
1879
1879
|
return;
|
|
1880
1880
|
}
|
|
1881
|
-
f(
|
|
1882
|
-
} catch (
|
|
1883
|
-
k(
|
|
1881
|
+
f(A), l("sources");
|
|
1882
|
+
} catch (A) {
|
|
1883
|
+
k(A instanceof Error ? A.message : "Failed to load sources.");
|
|
1884
1884
|
} finally {
|
|
1885
1885
|
E(!1);
|
|
1886
1886
|
}
|
|
@@ -1888,7 +1888,7 @@ const je = ({ isOpen: e, onClose: t, title: n, icon: r, children: o, footer: i,
|
|
|
1888
1888
|
l("trigger"), d(null), f([]), g([]), k(null);
|
|
1889
1889
|
}, j = () => {
|
|
1890
1890
|
a && r(a, h);
|
|
1891
|
-
}, z = s === "sources" && a, W = z ? /* @__PURE__ */ v(
|
|
1891
|
+
}, z = s === "sources" && a, W = z ? /* @__PURE__ */ v(ye, { children: [
|
|
1892
1892
|
/* @__PURE__ */ u(Ne, { type: "button", variant: "outlined", size: "small", onClick: O, children: n.cancel ?? "Back" }),
|
|
1893
1893
|
/* @__PURE__ */ u(
|
|
1894
1894
|
Ne,
|
|
@@ -1908,11 +1908,11 @@ const je = ({ isOpen: e, onClose: t, title: n, icon: r, children: o, footer: i,
|
|
|
1908
1908
|
isOpen: e,
|
|
1909
1909
|
onClose: o,
|
|
1910
1910
|
title: z ? a.label : n.addTriggerTitle,
|
|
1911
|
-
icon: /* @__PURE__ */ u(
|
|
1911
|
+
icon: /* @__PURE__ */ u(br, {}),
|
|
1912
1912
|
width: 500,
|
|
1913
1913
|
footer: W,
|
|
1914
1914
|
children: /* @__PURE__ */ v(Q, { sx: { p: 2 }, children: [
|
|
1915
|
-
!z && /* @__PURE__ */ v(
|
|
1915
|
+
!z && /* @__PURE__ */ v(ye, { children: [
|
|
1916
1916
|
/* @__PURE__ */ u("p", { className: "ff-text-muted ff-mb-3", style: { fontSize: 13 }, children: n.chooseTrigger }),
|
|
1917
1917
|
/* @__PURE__ */ v("div", { className: "ff-d-flex ff-flex-column ff-gap-2", children: [
|
|
1918
1918
|
t.map((L) => /* @__PURE__ */ v(
|
|
@@ -1923,17 +1923,17 @@ const je = ({ isOpen: e, onClose: t, title: n, icon: r, children: o, footer: i,
|
|
|
1923
1923
|
onClick: () => !p && N(L),
|
|
1924
1924
|
role: "button",
|
|
1925
1925
|
tabIndex: 0,
|
|
1926
|
-
onKeyDown: (
|
|
1927
|
-
|
|
1926
|
+
onKeyDown: (A) => {
|
|
1927
|
+
A.key === "Enter" && !p && N(L);
|
|
1928
1928
|
},
|
|
1929
|
-
onMouseEnter: (
|
|
1930
|
-
p || (
|
|
1929
|
+
onMouseEnter: (A) => {
|
|
1930
|
+
p || (A.currentTarget.style.background = "#f5f5f5");
|
|
1931
1931
|
},
|
|
1932
|
-
onMouseLeave: (
|
|
1933
|
-
|
|
1932
|
+
onMouseLeave: (A) => {
|
|
1933
|
+
A.currentTarget.style.background = "";
|
|
1934
1934
|
},
|
|
1935
1935
|
children: [
|
|
1936
|
-
/* @__PURE__ */ u("div", { style: { color: L.triggerCategory === "scheduler" ? "#1976d2" : "#f57c00", marginTop: 2, flexShrink: 0 }, children: L.triggerCategory === "scheduler" ? /* @__PURE__ */ u(
|
|
1936
|
+
/* @__PURE__ */ u("div", { style: { color: L.triggerCategory === "scheduler" ? "#1976d2" : "#f57c00", marginTop: 2, flexShrink: 0 }, children: L.triggerCategory === "scheduler" ? /* @__PURE__ */ u(or, { size: 18 }) : /* @__PURE__ */ u(ir, { size: 18 }) }),
|
|
1937
1937
|
/* @__PURE__ */ v("div", { children: [
|
|
1938
1938
|
/* @__PURE__ */ u("div", { style: { fontSize: 14, fontWeight: 500, color: "#212121" }, children: L.label }),
|
|
1939
1939
|
L.description && /* @__PURE__ */ u("div", { style: { fontSize: 12, color: "#757575", marginTop: 2 }, children: L.description })
|
|
@@ -1945,12 +1945,12 @@ const je = ({ isOpen: e, onClose: t, title: n, icon: r, children: o, footer: i,
|
|
|
1945
1945
|
t.length === 0 && /* @__PURE__ */ u("p", { className: "ff-text-muted ff-text-center", style: { fontSize: 13 }, children: n.noTriggers })
|
|
1946
1946
|
] }),
|
|
1947
1947
|
p && /* @__PURE__ */ v(Q, { sx: { display: "flex", alignItems: "center", gap: 1, mt: 2, fontSize: 12, color: "#64748b" }, children: [
|
|
1948
|
-
/* @__PURE__ */ u(
|
|
1948
|
+
/* @__PURE__ */ u(tr, { size: 14 }),
|
|
1949
1949
|
/* @__PURE__ */ u("span", { children: "Loading sources for the selected trigger…" })
|
|
1950
1950
|
] }),
|
|
1951
|
-
|
|
1951
|
+
y && /* @__PURE__ */ u("p", { style: { fontSize: 12, color: "#d32f2f", marginTop: 12 }, children: y })
|
|
1952
1952
|
] }),
|
|
1953
|
-
z && /* @__PURE__ */ v(
|
|
1953
|
+
z && /* @__PURE__ */ v(ye, { children: [
|
|
1954
1954
|
/* @__PURE__ */ v(
|
|
1955
1955
|
"div",
|
|
1956
1956
|
{
|
|
@@ -1963,7 +1963,7 @@ const je = ({ isOpen: e, onClose: t, title: n, icon: r, children: o, footer: i,
|
|
|
1963
1963
|
className: "ff-d-flex ff-align-items-center ff-gap-1 ff-mb-3",
|
|
1964
1964
|
style: { cursor: "pointer", color: "#0066cc", fontSize: 13, fontWeight: 500, width: "fit-content" },
|
|
1965
1965
|
children: [
|
|
1966
|
-
/* @__PURE__ */ u(
|
|
1966
|
+
/* @__PURE__ */ u(Vt, { size: 16 }),
|
|
1967
1967
|
/* @__PURE__ */ u("span", { children: n.addTriggerTitle })
|
|
1968
1968
|
]
|
|
1969
1969
|
}
|
|
@@ -1974,7 +1974,7 @@ const je = ({ isOpen: e, onClose: t, title: n, icon: r, children: o, footer: i,
|
|
|
1974
1974
|
":"
|
|
1975
1975
|
] }),
|
|
1976
1976
|
/* @__PURE__ */ u(
|
|
1977
|
-
|
|
1977
|
+
nr,
|
|
1978
1978
|
{
|
|
1979
1979
|
isMulti: !0,
|
|
1980
1980
|
options: c,
|
|
@@ -1983,7 +1983,7 @@ const je = ({ isOpen: e, onClose: t, title: n, icon: r, children: o, footer: i,
|
|
|
1983
1983
|
placeholder: "Select sources…",
|
|
1984
1984
|
menuPosition: "fixed",
|
|
1985
1985
|
menuPortalTarget: typeof document < "u" ? document.body : void 0,
|
|
1986
|
-
styles:
|
|
1986
|
+
styles: wr(!1, !0)
|
|
1987
1987
|
}
|
|
1988
1988
|
)
|
|
1989
1989
|
] })
|
|
@@ -1993,7 +1993,7 @@ const je = ({ isOpen: e, onClose: t, title: n, icon: r, children: o, footer: i,
|
|
|
1993
1993
|
}, Ye = {
|
|
1994
1994
|
cursor: "pointer",
|
|
1995
1995
|
transition: "background 0.15s"
|
|
1996
|
-
}, Ke = "ff-p-3 ff-rounded ff-border ff-d-flex ff-align-items-center ff-gap-3",
|
|
1996
|
+
}, Ke = "ff-p-3 ff-rounded ff-border ff-d-flex ff-align-items-center ff-gap-3", ts = ({ open: e, availableDescriptors: t, messages: n, onSelect: r, onClose: o }) => {
|
|
1997
1997
|
const { apps: i, ungrouped: s } = K(() => {
|
|
1998
1998
|
const f = /* @__PURE__ */ new Map(), h = [];
|
|
1999
1999
|
for (const g of t)
|
|
@@ -2022,7 +2022,7 @@ const je = ({ isOpen: e, onClose: t, title: n, icon: r, children: o, footer: i,
|
|
|
2022
2022
|
isOpen: e,
|
|
2023
2023
|
onClose: o,
|
|
2024
2024
|
title: c ? n.addStepTitle : d.label,
|
|
2025
|
-
icon: c ? /* @__PURE__ */ u(
|
|
2025
|
+
icon: c ? /* @__PURE__ */ u(sr, {}) : d.icon ?? /* @__PURE__ */ u(lr, {}),
|
|
2026
2026
|
width: 500,
|
|
2027
2027
|
children: /* @__PURE__ */ v(Q, { sx: { p: 2 }, children: [
|
|
2028
2028
|
!c && /* @__PURE__ */ v(
|
|
@@ -2037,13 +2037,13 @@ const je = ({ isOpen: e, onClose: t, title: n, icon: r, children: o, footer: i,
|
|
|
2037
2037
|
className: "ff-d-flex ff-align-items-center ff-gap-1 ff-mb-3",
|
|
2038
2038
|
style: { cursor: "pointer", color: "#0066cc", fontSize: 13, fontWeight: 500, width: "fit-content" },
|
|
2039
2039
|
children: [
|
|
2040
|
-
/* @__PURE__ */ u(
|
|
2040
|
+
/* @__PURE__ */ u(Vt, { size: 16 }),
|
|
2041
2041
|
/* @__PURE__ */ u("span", { children: n.addStepTitle })
|
|
2042
2042
|
]
|
|
2043
2043
|
}
|
|
2044
2044
|
),
|
|
2045
2045
|
/* @__PURE__ */ u("p", { className: "ff-text-muted ff-mb-3", style: { fontSize: 13 }, children: c ? n.chooseAction : `Pick an action from ${d.label}` }),
|
|
2046
|
-
/* @__PURE__ */ u("div", { className: "ff-d-flex ff-flex-column ff-gap-2", children: c ? /* @__PURE__ */ v(
|
|
2046
|
+
/* @__PURE__ */ u("div", { className: "ff-d-flex ff-flex-column ff-gap-2", children: c ? /* @__PURE__ */ v(ye, { children: [
|
|
2047
2047
|
i.map((f) => /* @__PURE__ */ v(
|
|
2048
2048
|
"div",
|
|
2049
2049
|
{
|
|
@@ -2067,7 +2067,7 @@ const je = ({ isOpen: e, onClose: t, title: n, icon: r, children: o, footer: i,
|
|
|
2067
2067
|
/* @__PURE__ */ u("div", { style: { fontSize: 14, fontWeight: 500, color: "#212121" }, children: f.label }),
|
|
2068
2068
|
/* @__PURE__ */ u("div", { style: { fontSize: 12, color: "#757575", marginTop: 2 }, children: f.description ?? `${f.descriptors.length} action${f.descriptors.length === 1 ? "" : "s"}` })
|
|
2069
2069
|
] }),
|
|
2070
|
-
/* @__PURE__ */ u(
|
|
2070
|
+
/* @__PURE__ */ u(Ut, { size: 18, color: "#9e9e9e" })
|
|
2071
2071
|
]
|
|
2072
2072
|
},
|
|
2073
2073
|
`app-${f.key}`
|
|
@@ -2127,26 +2127,36 @@ const je = ({ isOpen: e, onClose: t, title: n, icon: r, children: o, footer: i,
|
|
|
2127
2127
|
] })
|
|
2128
2128
|
}
|
|
2129
2129
|
);
|
|
2130
|
-
}, Wt = "_conditionConfig"
|
|
2131
|
-
|
|
2130
|
+
}, Wt = "_conditionConfig";
|
|
2131
|
+
function $t(e) {
|
|
2132
|
+
return Array.isArray(e) ? { layout: "flat", fields: e } : e && typeof e == "object" ? e : { layout: "flat", fields: [] };
|
|
2133
|
+
}
|
|
2134
|
+
function Gt(e) {
|
|
2135
|
+
return e.layout === "stepper" ? Array.isArray(e.steps) && e.steps.some((t) => {
|
|
2136
|
+
var n;
|
|
2137
|
+
return ((n = t.fields) == null ? void 0 : n.length) > 0;
|
|
2138
|
+
}) : Array.isArray(e.fields) && e.fields.length > 0;
|
|
2139
|
+
}
|
|
2140
|
+
const ns = ({ open: e, nodeId: t, descriptor: n, initialValues: r, messages: o, onSave: i, onClose: s }) => {
|
|
2141
|
+
const [l, a] = M({ layout: "flat", fields: [] }), [d, c] = M(!1), [f, h] = M(null), [g, p] = M({});
|
|
2132
2142
|
re(() => {
|
|
2133
2143
|
p((r == null ? void 0 : r[Wt]) ?? {});
|
|
2134
2144
|
}, [r, t]), re(() => {
|
|
2135
2145
|
let N = !1;
|
|
2136
2146
|
if (h(null), !n || !t) {
|
|
2137
|
-
a([]), c(!1);
|
|
2147
|
+
a({ layout: "flat", fields: [] }), c(!1);
|
|
2138
2148
|
return;
|
|
2139
2149
|
}
|
|
2140
2150
|
const O = n.formSchema;
|
|
2141
2151
|
return typeof O == "function" ? (c(!0), O(t).then((j) => {
|
|
2142
|
-
N || (a(j), c(!1));
|
|
2152
|
+
N || (a($t(j)), c(!1));
|
|
2143
2153
|
}).catch((j) => {
|
|
2144
|
-
N || (a([]), h(j instanceof Error ? j.message : "Unable to load configuration."), c(!1));
|
|
2145
|
-
})) : (a(O), c(!1)), () => {
|
|
2154
|
+
N || (a({ layout: "flat", fields: [] }), h(j instanceof Error ? j.message : "Unable to load configuration."), c(!1));
|
|
2155
|
+
})) : (a($t(O)), c(!1)), () => {
|
|
2146
2156
|
N = !0;
|
|
2147
2157
|
};
|
|
2148
2158
|
}, [n, t]);
|
|
2149
|
-
const E = t ? `node-config-form-${t}` : "node-config-form",
|
|
2159
|
+
const E = t ? `node-config-form-${t}` : "node-config-form", y = !d && !f && Gt(l), k = y ? /* @__PURE__ */ v(ye, { children: [
|
|
2150
2160
|
/* @__PURE__ */ u(Ne, { type: "button", variant: "outlined", size: "small", onClick: s, children: o.cancel }),
|
|
2151
2161
|
/* @__PURE__ */ u(Ne, { type: "submit", form: E, variant: "contained", size: "small", children: o.save })
|
|
2152
2162
|
] }) : null;
|
|
@@ -2162,11 +2172,11 @@ const je = ({ isOpen: e, onClose: t, title: n, icon: r, children: o, footer: i,
|
|
|
2162
2172
|
children: /* @__PURE__ */ v(Q, { sx: { p: 2 }, children: [
|
|
2163
2173
|
d && /* @__PURE__ */ u("p", { className: "ff-text-muted", style: { fontSize: 13 }, children: o.loadingConfiguration }),
|
|
2164
2174
|
!d && f && /* @__PURE__ */ u("p", { style: { fontSize: 13, color: "#d32f2f" }, children: f }),
|
|
2165
|
-
!d && !f && l
|
|
2166
|
-
|
|
2167
|
-
|
|
2175
|
+
!d && !f && !Gt(l) && /* @__PURE__ */ u("p", { className: "ff-text-muted", style: { fontSize: 13 }, children: o.noConfigurationNeeded }),
|
|
2176
|
+
y && /* @__PURE__ */ u(
|
|
2177
|
+
Er,
|
|
2168
2178
|
{
|
|
2169
|
-
schema:
|
|
2179
|
+
schema: l,
|
|
2170
2180
|
initialValues: r ?? {},
|
|
2171
2181
|
formId: E,
|
|
2172
2182
|
conditionConfig: g,
|
|
@@ -2181,7 +2191,7 @@ const je = ({ isOpen: e, onClose: t, title: n, icon: r, children: o, footer: i,
|
|
|
2181
2191
|
] })
|
|
2182
2192
|
}
|
|
2183
2193
|
);
|
|
2184
|
-
},
|
|
2194
|
+
}, rs = ({
|
|
2185
2195
|
isOpen: e,
|
|
2186
2196
|
onClose: t,
|
|
2187
2197
|
workflowId: n,
|
|
@@ -2201,7 +2211,7 @@ const je = ({ isOpen: e, onClose: t, title: n, icon: r, children: o, footer: i,
|
|
|
2201
2211
|
isOpen: e,
|
|
2202
2212
|
onClose: t,
|
|
2203
2213
|
title: r ? `Preview: ${r}` : "Sub-Workflow Preview",
|
|
2204
|
-
icon: /* @__PURE__ */ u(
|
|
2214
|
+
icon: /* @__PURE__ */ u(ar, { size: 18, color: "#00695c" }),
|
|
2205
2215
|
width: 700,
|
|
2206
2216
|
children: /* @__PURE__ */ v("div", { style: { height: "100%", display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", padding: 24 }, children: [
|
|
2207
2217
|
i.status === "idle" && /* @__PURE__ */ u("span", { style: { color: "#9e9e9e", fontSize: 14 }, children: "Select a workflow to preview" }),
|
|
@@ -2211,18 +2221,18 @@ const je = ({ isOpen: e, onClose: t, title: n, icon: r, children: o, footer: i,
|
|
|
2211
2221
|
/* @__PURE__ */ u("style", { children: "@keyframes spin { to { transform: rotate(360deg); } }" })
|
|
2212
2222
|
] }),
|
|
2213
2223
|
i.status === "error" && /* @__PURE__ */ v("div", { style: { textAlign: "center", color: "#c62828" }, children: [
|
|
2214
|
-
/* @__PURE__ */ u(
|
|
2224
|
+
/* @__PURE__ */ u(dr, { size: 32, style: { marginBottom: 8 } }),
|
|
2215
2225
|
/* @__PURE__ */ u("p", { style: { margin: 0, fontSize: 14 }, children: i.message })
|
|
2216
2226
|
] }),
|
|
2217
|
-
i.status === "loaded" && /* @__PURE__ */ u("div", { style: { width: "100%", flex: 1 }, children: /* @__PURE__ */ u(
|
|
2227
|
+
i.status === "loaded" && /* @__PURE__ */ u("div", { style: { width: "100%", flex: 1 }, children: /* @__PURE__ */ u(os, { state: i.state }) })
|
|
2218
2228
|
] })
|
|
2219
2229
|
}
|
|
2220
2230
|
);
|
|
2221
|
-
},
|
|
2231
|
+
}, os = ({ state: e }) => {
|
|
2222
2232
|
const [t, n] = M(null), [r, o] = M(null);
|
|
2223
2233
|
return re(() => {
|
|
2224
2234
|
Promise.all([
|
|
2225
|
-
Promise.resolve().then(() =>
|
|
2235
|
+
Promise.resolve().then(() => cs).then((i) => i.default),
|
|
2226
2236
|
import("./nodeRegistry.js").then((i) => i.nodeTypeRegistry),
|
|
2227
2237
|
import("./templateRegistry.js").then((i) => i.templateRegistry)
|
|
2228
2238
|
]).then(([i, s, l]) => {
|
|
@@ -2247,48 +2257,48 @@ const je = ({ isOpen: e, onClose: t, title: n, icon: r, children: o, footer: i,
|
|
|
2247
2257
|
approvalNode: 90,
|
|
2248
2258
|
delayNode: 80,
|
|
2249
2259
|
notificationNode: 80
|
|
2250
|
-
},
|
|
2251
|
-
plusEdge:
|
|
2252
|
-
labelPlusEdge:
|
|
2253
|
-
plainEdge:
|
|
2254
|
-
edgeWithPlusLabel:
|
|
2255
|
-
gatewayBranchEdge:
|
|
2260
|
+
}, is = {
|
|
2261
|
+
plusEdge: Jn,
|
|
2262
|
+
labelPlusEdge: qn,
|
|
2263
|
+
plainEdge: Xn,
|
|
2264
|
+
edgeWithPlusLabel: Un,
|
|
2265
|
+
gatewayBranchEdge: Vn
|
|
2256
2266
|
};
|
|
2257
|
-
function
|
|
2267
|
+
function Yt() {
|
|
2258
2268
|
return [
|
|
2259
2269
|
{ id: "start", kind: "start", reactFlowType: "startNode" },
|
|
2260
2270
|
{ id: "addTrigger", kind: "addTrigger", reactFlowType: "addTriggerNode" },
|
|
2261
2271
|
{ id: "end", kind: "end", reactFlowType: "endNode" }
|
|
2262
2272
|
];
|
|
2263
2273
|
}
|
|
2264
|
-
function
|
|
2265
|
-
const o = new
|
|
2274
|
+
function ss(e, t, n, r = "TB") {
|
|
2275
|
+
const o = new Bt.graphlib.Graph();
|
|
2266
2276
|
return o.setGraph({ rankdir: r, ranksep: 70, nodesep: 50 }), o.setDefaultEdgeLabel(() => ({})), e.forEach((i) => {
|
|
2267
2277
|
const s = n[i.id] ?? { width: me, height: qe[i.type ?? ""] ?? 80 };
|
|
2268
2278
|
o.setNode(i.id, { width: s.width, height: s.height });
|
|
2269
|
-
}), t.forEach((i) => o.setEdge(i.source, i.target)),
|
|
2279
|
+
}), t.forEach((i) => o.setEdge(i.source, i.target)), Bt.layout(o), e.map((i) => {
|
|
2270
2280
|
var d, c;
|
|
2271
2281
|
const s = o.node(i.id), l = ((d = n[i.id]) == null ? void 0 : d.width) ?? me, a = ((c = n[i.id]) == null ? void 0 : c.height) ?? qe[i.type ?? ""] ?? 80;
|
|
2272
2282
|
return { ...i, position: { x: s.x - l / 2, y: s.y - a / 2 } };
|
|
2273
2283
|
});
|
|
2274
2284
|
}
|
|
2275
2285
|
const le = (e) => e === "filter" || e === "approval";
|
|
2276
|
-
function
|
|
2286
|
+
function ls(e, t, n, r) {
|
|
2277
2287
|
const s = Ue, l = 30, a = 30, d = {}, c = {}, f = /* @__PURE__ */ new Map();
|
|
2278
|
-
for (const
|
|
2279
|
-
for (const
|
|
2280
|
-
for (const k of Object.values(
|
|
2288
|
+
for (const y of e) f.set(y.id, y);
|
|
2289
|
+
for (const y of Object.values(t))
|
|
2290
|
+
for (const k of Object.values(y))
|
|
2281
2291
|
for (const N of k) f.set(N.id, N);
|
|
2282
|
-
const h = (
|
|
2283
|
-
const O = r[
|
|
2284
|
-
return d[
|
|
2285
|
-
}, g = (
|
|
2292
|
+
const h = (y, k, N) => {
|
|
2293
|
+
const O = r[y] ?? { width: me, height: 80 };
|
|
2294
|
+
return d[y] = { x: k - O.width / 2, y: N }, N + O.height;
|
|
2295
|
+
}, g = (y, k, N) => {
|
|
2286
2296
|
let O = N;
|
|
2287
|
-
for (const j of
|
|
2297
|
+
for (const j of y)
|
|
2288
2298
|
O = h(j.id, k, O) + s, le(j.kind) && t[j.id] && (O = p(j.id, k, O));
|
|
2289
2299
|
return O;
|
|
2290
|
-
}, p = (
|
|
2291
|
-
const O = k + 180, j = t[
|
|
2300
|
+
}, p = (y, k, N) => {
|
|
2301
|
+
const O = k + 180, j = t[y], z = Object.keys(j), W = f.get(y), L = (W == null ? void 0 : W.branchLabels) ?? { pass: "Pass", fail: "Fail" }, A = d[y], $ = r[y] ?? { height: 80 }, we = A.y + $.height, Ee = [];
|
|
2292
2302
|
let te = N;
|
|
2293
2303
|
return z.forEach((he, xe) => {
|
|
2294
2304
|
const ze = j[he], Le = te;
|
|
@@ -2297,21 +2307,21 @@ function is(e, t, n, r) {
|
|
|
2297
2307
|
label: L[he] ?? he,
|
|
2298
2308
|
isPass: xe === 0
|
|
2299
2309
|
}), te = g(ze, O, te + a), xe < z.length - 1 && (te += l);
|
|
2300
|
-
}), c[
|
|
2310
|
+
}), c[y] = {
|
|
2301
2311
|
branches: Ee,
|
|
2302
2312
|
height: te - we,
|
|
2303
2313
|
indent: 180
|
|
2304
2314
|
}, te;
|
|
2305
2315
|
};
|
|
2306
2316
|
let E = Xe;
|
|
2307
|
-
for (const
|
|
2308
|
-
E = h(
|
|
2317
|
+
for (const y of e)
|
|
2318
|
+
E = h(y.id, 400, E) + s, le(y.kind) && t[y.id] && (E = p(y.id, 400, E));
|
|
2309
2319
|
return {
|
|
2310
|
-
nodes: n.map((
|
|
2320
|
+
nodes: n.map((y) => d[y.id] ? { ...y, position: d[y.id] } : y),
|
|
2311
2321
|
railSpecs: c
|
|
2312
2322
|
};
|
|
2313
2323
|
}
|
|
2314
|
-
function
|
|
2324
|
+
function Kt(e) {
|
|
2315
2325
|
return {
|
|
2316
2326
|
id: e.id,
|
|
2317
2327
|
type: e.reactFlowType,
|
|
@@ -2321,7 +2331,7 @@ function Gt(e) {
|
|
|
2321
2331
|
selectable: !1
|
|
2322
2332
|
};
|
|
2323
2333
|
}
|
|
2324
|
-
function
|
|
2334
|
+
function ds(e, t, n, r, o) {
|
|
2325
2335
|
return {
|
|
2326
2336
|
id: `e-${e.id}-${t.id}`,
|
|
2327
2337
|
source: e.id,
|
|
@@ -2335,44 +2345,44 @@ function ss(e, t, n, r, o) {
|
|
|
2335
2345
|
}
|
|
2336
2346
|
};
|
|
2337
2347
|
}
|
|
2338
|
-
function
|
|
2348
|
+
function as(e, t, n, r, o = {}, i = "TB", s = "horizontal") {
|
|
2339
2349
|
const l = o.edgeColor ?? "#b0bec5", a = [], d = [], c = (p, E) => {
|
|
2340
|
-
const
|
|
2341
|
-
if (!
|
|
2342
|
-
const N = E ?? { pass: "Pass", fail: "Fail" }, O = Object.keys(
|
|
2350
|
+
const y = t[p];
|
|
2351
|
+
if (!y) return;
|
|
2352
|
+
const N = E ?? { pass: "Pass", fail: "Fail" }, O = Object.keys(y), j = (z, W, L, A) => {
|
|
2343
2353
|
if (z.length !== 0) {
|
|
2344
|
-
z.forEach(($) => a.push(
|
|
2354
|
+
z.forEach(($) => a.push(Kt($))), d.push({
|
|
2345
2355
|
id: `e-${p}-${W}-start`,
|
|
2346
2356
|
source: p,
|
|
2347
2357
|
target: z[0].id,
|
|
2348
2358
|
type: "gatewayBranchEdge",
|
|
2349
2359
|
style: { stroke: l },
|
|
2350
|
-
data: { branch: W, filterId: p, label: L, isFirst:
|
|
2360
|
+
data: { branch: W, filterId: p, label: L, isFirst: A === 0, onAddStepClick: n, verticalRouting: s === "vertical" }
|
|
2351
2361
|
});
|
|
2352
2362
|
for (let $ = 1; $ < z.length; $++)
|
|
2353
|
-
le(z[$ - 1].kind) || d.push(
|
|
2363
|
+
le(z[$ - 1].kind) || d.push(ds(z[$ - 1], z[$], l, n, { filterId: p, branch: W }));
|
|
2354
2364
|
for (const $ of z)
|
|
2355
2365
|
le($.kind) && t[$.id] && c($.id, $.branchLabels);
|
|
2356
2366
|
}
|
|
2357
2367
|
};
|
|
2358
2368
|
O.forEach((z, W) => {
|
|
2359
|
-
j(
|
|
2369
|
+
j(y[z], z, N[z] ?? z, W);
|
|
2360
2370
|
});
|
|
2361
2371
|
};
|
|
2362
2372
|
for (let p = 0; p < e.length; p++) {
|
|
2363
2373
|
const E = e[p];
|
|
2364
|
-
if (a.push(
|
|
2365
|
-
const
|
|
2366
|
-
if (
|
|
2374
|
+
if (a.push(Kt(E)), p > 0) {
|
|
2375
|
+
const y = e[p - 1], k = y.kind === "start" || y.kind === "addTrigger";
|
|
2376
|
+
if (y.kind === "filter" || y.kind === "approval") continue;
|
|
2367
2377
|
d.push({
|
|
2368
|
-
id: `e-${
|
|
2369
|
-
source:
|
|
2378
|
+
id: `e-${y.id}-${E.id}`,
|
|
2379
|
+
source: y.id,
|
|
2370
2380
|
target: E.id,
|
|
2371
2381
|
type: k ? "plainEdge" : "plusEdge",
|
|
2372
2382
|
style: { stroke: l },
|
|
2373
2383
|
data: k ? {} : {
|
|
2374
2384
|
onAddStepClick: n,
|
|
2375
|
-
referenceNodeType:
|
|
2385
|
+
referenceNodeType: y.reactFlowType
|
|
2376
2386
|
}
|
|
2377
2387
|
});
|
|
2378
2388
|
}
|
|
@@ -2400,14 +2410,14 @@ function ls(e, t, n, r, o = {}, i = "TB", s = "horizontal") {
|
|
|
2400
2410
|
}), edges: d };
|
|
2401
2411
|
}
|
|
2402
2412
|
if (s === "vertical") {
|
|
2403
|
-
const { nodes: p, railSpecs: E } =
|
|
2413
|
+
const { nodes: p, railSpecs: E } = ls(e, t, a, f);
|
|
2404
2414
|
return { nodes: p.map(
|
|
2405
2415
|
(k) => E[k.id] ? { ...k, data: { ...k.data, _branchRail: E[k.id] } } : k
|
|
2406
2416
|
), edges: d };
|
|
2407
2417
|
}
|
|
2408
|
-
return { nodes:
|
|
2418
|
+
return { nodes: ss(a, d, f, i), edges: d };
|
|
2409
2419
|
}
|
|
2410
|
-
const
|
|
2420
|
+
const Ht = ({
|
|
2411
2421
|
nodeRegistry: e,
|
|
2412
2422
|
templateRegistry: t,
|
|
2413
2423
|
initialValue: n,
|
|
@@ -2424,7 +2434,7 @@ const Yt = ({
|
|
|
2424
2434
|
renderNodeConfig: g,
|
|
2425
2435
|
onNodeClick: p,
|
|
2426
2436
|
maxNodes: E,
|
|
2427
|
-
layoutDirection:
|
|
2437
|
+
layoutDirection: y = "TB",
|
|
2428
2438
|
executionRecord: k,
|
|
2429
2439
|
onFetchWorkflow: N,
|
|
2430
2440
|
hideHeader: O = !1,
|
|
@@ -2432,7 +2442,7 @@ const Yt = ({
|
|
|
2432
2442
|
onWorkflowNameChange: z,
|
|
2433
2443
|
onCancel: W,
|
|
2434
2444
|
workflowStatus: L,
|
|
2435
|
-
workflowStatusColor:
|
|
2445
|
+
workflowStatusColor: A,
|
|
2436
2446
|
saveLabel: $,
|
|
2437
2447
|
optionsResolvers: we
|
|
2438
2448
|
}) => {
|
|
@@ -2443,46 +2453,46 @@ const Yt = ({
|
|
|
2443
2453
|
showMiniMap: xe = !1,
|
|
2444
2454
|
panOnScroll: ze = !0,
|
|
2445
2455
|
zoomOnScroll: Le = !1,
|
|
2446
|
-
minZoom:
|
|
2447
|
-
maxZoom:
|
|
2448
|
-
snapToGrid:
|
|
2449
|
-
snapGrid:
|
|
2456
|
+
minZoom: Tn = 0.25,
|
|
2457
|
+
maxZoom: Cn = 2,
|
|
2458
|
+
snapToGrid: In = !1,
|
|
2459
|
+
snapGrid: On = [15, 15],
|
|
2450
2460
|
branchLayout: rt = "horizontal",
|
|
2451
2461
|
nodeBody: ot = "full"
|
|
2452
|
-
} = d, ge = K(() =>
|
|
2453
|
-
const
|
|
2462
|
+
} = d, ge = K(() => kr(a), [a]), [P, oe] = M(() => (n == null ? void 0 : n.slots) ?? Yt()), [G, J] = M(() => (n == null ? void 0 : n.branches) ?? {}), [ae, V] = M(null), [Pe, it] = M(null), [U, ke] = M(null), [ie, st] = M(null), [_e, lt] = M(null), [X, dt] = M(() => {
|
|
2463
|
+
const b = n == null ? void 0 : n.slots.find((S) => S.kind === "triggerFixed"), w = b != null && b.id.startsWith("trigger-") ? b.id.slice(8) : void 0;
|
|
2454
2464
|
return w ? t.lookup(w) ?? null : null;
|
|
2455
|
-
}), [at,
|
|
2456
|
-
|
|
2457
|
-
}, []),
|
|
2458
|
-
const
|
|
2459
|
-
return
|
|
2460
|
-
}, [P, G]), ct = E ?? (X == null ? void 0 : X.maxTasks), ft = ct !== void 0 &&
|
|
2461
|
-
const w = P.find((S) => S.id ===
|
|
2465
|
+
}), [at, Mn] = M({}), jn = Y((b) => {
|
|
2466
|
+
Mn(b);
|
|
2467
|
+
}, []), zn = K(() => ({ ...Hn, ...r }), [r]), Ln = K(() => ({ ...is, ...o }), [o]), Pn = K(() => {
|
|
2468
|
+
const b = P.filter((S) => S.kind === "userTask").length, w = Object.values(G).flatMap((S) => Object.values(S).flat()).filter((S) => S.kind === "userTask").length;
|
|
2469
|
+
return b + w;
|
|
2470
|
+
}, [P, G]), ct = E ?? (X == null ? void 0 : X.maxTasks), ft = ct !== void 0 && Pn >= ct, se = Y((b) => {
|
|
2471
|
+
const w = P.find((S) => S.id === b);
|
|
2462
2472
|
if (w) return w;
|
|
2463
2473
|
for (const S of Object.values(G)) {
|
|
2464
|
-
const x = Object.values(S).flat().find((I) => I.id ===
|
|
2474
|
+
const x = Object.values(S).flat().find((I) => I.id === b);
|
|
2465
2475
|
if (x) return x;
|
|
2466
2476
|
}
|
|
2467
2477
|
return null;
|
|
2468
|
-
}, [P, G]), Re = Y((
|
|
2469
|
-
s || (it(
|
|
2470
|
-
}, [s]), ut = Y((
|
|
2478
|
+
}, [P, G]), Re = Y((b) => {
|
|
2479
|
+
s || (it(b), V("nodeConfig"));
|
|
2480
|
+
}, [s]), ut = Y((b) => {
|
|
2471
2481
|
if (!s) {
|
|
2472
|
-
if (P.some((w) => w.id ===
|
|
2473
|
-
const w = P.find((S) => S.id ===
|
|
2482
|
+
if (P.some((w) => w.id === b)) {
|
|
2483
|
+
const w = P.find((S) => S.id === b);
|
|
2474
2484
|
if ((w == null ? void 0 : w.kind) === "triggerFixed") {
|
|
2475
|
-
oe(
|
|
2485
|
+
oe(Yt()), J({}), dt(null);
|
|
2476
2486
|
return;
|
|
2477
2487
|
}
|
|
2478
2488
|
oe((S) => {
|
|
2479
|
-
const x = S.filter((I) => I.id !==
|
|
2489
|
+
const x = S.filter((I) => I.id !== b);
|
|
2480
2490
|
return le((w == null ? void 0 : w.kind) ?? "") && !x.some((I) => I.kind === "end") ? [...x, { id: "end", kind: "end", reactFlowType: "endNode" }] : x;
|
|
2481
2491
|
}), J((S) => {
|
|
2482
2492
|
const x = { ...S }, I = (m) => {
|
|
2483
2493
|
x[m] && (Object.values(x[m]).flat().filter((_) => le(_.kind)).forEach((_) => I(_.id)), delete x[m]);
|
|
2484
2494
|
};
|
|
2485
|
-
return I(
|
|
2495
|
+
return I(b), x;
|
|
2486
2496
|
});
|
|
2487
2497
|
return;
|
|
2488
2498
|
}
|
|
@@ -2495,30 +2505,30 @@ const Yt = ({
|
|
|
2495
2505
|
}, x = { ...w };
|
|
2496
2506
|
for (const I of Object.keys(x))
|
|
2497
2507
|
for (const m of Object.keys(x[I])) {
|
|
2498
|
-
const _ = x[I][m], C = _.findIndex((R) => R.id ===
|
|
2508
|
+
const _ = x[I][m], C = _.findIndex((R) => R.id === b);
|
|
2499
2509
|
if (C === -1 || _[C].kind === "end") continue;
|
|
2500
2510
|
const T = _[C];
|
|
2501
|
-
let F = _.filter((R) => R.id !==
|
|
2502
|
-
return T.kind === "filter" && ((T.id in x ? S([T], x) : []).forEach((
|
|
2511
|
+
let F = _.filter((R) => R.id !== b);
|
|
2512
|
+
return T.kind === "filter" && ((T.id in x ? S([T], x) : []).forEach((B) => delete x[B]), delete x[T.id], F.some((B) => B.kind === "end") || (F = [...F, { id: `end-${I}-${m}`, kind: "end", reactFlowType: "endNode" }])), x[I] = { ...x[I], [m]: F }, x;
|
|
2503
2513
|
}
|
|
2504
2514
|
return x;
|
|
2505
2515
|
});
|
|
2506
2516
|
}
|
|
2507
2517
|
}, [s, P]), Fe = Y(() => {
|
|
2508
2518
|
s || V("triggerSelect");
|
|
2509
|
-
}, [s]), ht = Y((
|
|
2510
|
-
s || ft || (ke(
|
|
2511
|
-
}, [s, ft]), gt = Y((
|
|
2512
|
-
if (dt(
|
|
2513
|
-
const x = Array.isArray(w) && w.length > 0, I = (
|
|
2519
|
+
}, [s]), ht = Y((b, w) => {
|
|
2520
|
+
s || ft || (ke(b), st(w.filterId && w.branch ? { filterId: w.filterId, branch: w.branch } : null), V("nodePicker"));
|
|
2521
|
+
}, [s, ft]), gt = Y((b, w) => {
|
|
2522
|
+
if (dt(b), V(null), b.skeletonState) {
|
|
2523
|
+
const x = Array.isArray(w) && w.length > 0, I = (b.skeletonState.slots ?? []).map((m) => m.kind !== "triggerFixed" ? m : {
|
|
2514
2524
|
...m,
|
|
2515
2525
|
nodeData: {
|
|
2516
|
-
label:
|
|
2526
|
+
label: b.label,
|
|
2517
2527
|
...m.nodeData ?? {},
|
|
2518
2528
|
...x && { sources: w }
|
|
2519
2529
|
}
|
|
2520
2530
|
});
|
|
2521
|
-
J(
|
|
2531
|
+
J(b.skeletonState.branches ?? {}), oe(I);
|
|
2522
2532
|
return;
|
|
2523
2533
|
}
|
|
2524
2534
|
J({});
|
|
@@ -2526,14 +2536,14 @@ const Yt = ({
|
|
|
2526
2536
|
oe([
|
|
2527
2537
|
{ id: "start", kind: "start", reactFlowType: "startNode" },
|
|
2528
2538
|
{
|
|
2529
|
-
id: `trigger-${
|
|
2539
|
+
id: `trigger-${b.triggerKey}`,
|
|
2530
2540
|
kind: "triggerFixed",
|
|
2531
2541
|
reactFlowType: "triggerNode",
|
|
2532
2542
|
nodeData: {
|
|
2533
|
-
label:
|
|
2534
|
-
source:
|
|
2535
|
-
eventType:
|
|
2536
|
-
type:
|
|
2543
|
+
label: b.label,
|
|
2544
|
+
source: b.source,
|
|
2545
|
+
eventType: b.triggerKey,
|
|
2546
|
+
type: b.triggerCategory === "scheduler" ? "scheduler" : "event",
|
|
2537
2547
|
...S && { sources: w }
|
|
2538
2548
|
},
|
|
2539
2549
|
deletable: !1
|
|
@@ -2542,36 +2552,36 @@ const Yt = ({
|
|
|
2542
2552
|
]);
|
|
2543
2553
|
}, []), pt = Y(() => {
|
|
2544
2554
|
var S;
|
|
2545
|
-
const
|
|
2555
|
+
const b = {
|
|
2546
2556
|
insertAfterSlot: null,
|
|
2547
2557
|
upstreamSlots: [],
|
|
2548
2558
|
downstreamSlots: [],
|
|
2549
2559
|
branch: ie,
|
|
2550
2560
|
template: X
|
|
2551
2561
|
};
|
|
2552
|
-
if (!U) return
|
|
2562
|
+
if (!U) return b;
|
|
2553
2563
|
if (ie) {
|
|
2554
2564
|
const { filterId: x, branch: I } = ie, m = P.findIndex((R) => R.id === x), _ = m >= 0 ? P.slice(0, m + 1) : [], C = ((S = G[x]) == null ? void 0 : S[I]) ?? [], T = C.findIndex((R) => R.id === U), F = T >= 0 ? C.slice(0, T + 1) : [];
|
|
2555
|
-
return
|
|
2565
|
+
return b.upstreamSlots = [..._, ...F], b.downstreamSlots = T >= 0 ? C.slice(T + 1) : C, b.insertAfterSlot = F[F.length - 1] ?? null, b;
|
|
2556
2566
|
}
|
|
2557
2567
|
const w = P.findIndex((x) => x.id === U);
|
|
2558
|
-
return
|
|
2559
|
-
}, [P, G, U, ie, X]),
|
|
2560
|
-
const
|
|
2568
|
+
return b.upstreamSlots = w >= 0 ? P.slice(0, w + 1) : [], b.downstreamSlots = w >= 0 ? P.slice(w + 1) : [], b.insertAfterSlot = b.upstreamSlots[b.upstreamSlots.length - 1] ?? null, b;
|
|
2569
|
+
}, [P, G, U, ie, X]), yt = (b, w) => b.descriptorType === w || b.id === w || b.kind === w, bt = Y(() => {
|
|
2570
|
+
const b = e.list(), w = X != null && X.availableTasks ? b.filter((x) => X.availableTasks.includes(x.type)) : b, S = pt();
|
|
2561
2571
|
return w.filter((x) => x.maxPerWorkflow !== void 0 && P.filter((m) => m.descriptorType === x.type).length + Object.values(G).flatMap((m) => Object.values(m).flat()).filter((m) => m.descriptorType === x.type).length >= x.maxPerWorkflow ? !1 : x.canInsert ? x.canInsert(S) : !(x.insertAfter && x.insertAfter.length > 0 && !S.upstreamSlots.some(
|
|
2562
|
-
(m) => x.insertAfter.some((_) =>
|
|
2572
|
+
(m) => x.insertAfter.some((_) => yt(m, _))
|
|
2563
2573
|
) || x.insertBefore && x.insertBefore.length > 0 && !S.downstreamSlots.some(
|
|
2564
|
-
(m) => x.insertBefore.some((_) =>
|
|
2574
|
+
(m) => x.insertBefore.some((_) => yt(m, _))
|
|
2565
2575
|
)));
|
|
2566
|
-
}, [e, X, P, G, pt]), mt = Y((
|
|
2576
|
+
}, [e, X, P, G, pt]), mt = Y((b) => {
|
|
2567
2577
|
if (!U) return;
|
|
2568
|
-
const w = `${
|
|
2578
|
+
const w = `${b.type}-${Date.now()}`, S = b.reactFlowType === "filterNode" || b.reactFlowType === "approvalNode" || b.reactFlowType === "conditionBranchNode", x = b.branchLabels ?? { pass: "Pass", fail: "Fail" }, I = {
|
|
2569
2579
|
id: w,
|
|
2570
|
-
kind: S ?
|
|
2571
|
-
reactFlowType:
|
|
2572
|
-
descriptorType:
|
|
2580
|
+
kind: S ? b.reactFlowType === "approvalNode" ? "approval" : "filter" : "userTask",
|
|
2581
|
+
reactFlowType: b.reactFlowType,
|
|
2582
|
+
descriptorType: b.type,
|
|
2573
2583
|
formData: {},
|
|
2574
|
-
nodeData: { title:
|
|
2584
|
+
nodeData: { title: b.label },
|
|
2575
2585
|
deletable: !0,
|
|
2576
2586
|
branchLabels: x
|
|
2577
2587
|
};
|
|
@@ -2580,8 +2590,8 @@ const Yt = ({
|
|
|
2580
2590
|
J((C) => {
|
|
2581
2591
|
const T = [...C[m][_]];
|
|
2582
2592
|
if (S) {
|
|
2583
|
-
const ne = T.filter((ce) => ce.kind !== "end"), kt = ne.findIndex((ce) => ce.id === U),
|
|
2584
|
-
return ne.splice(
|
|
2593
|
+
const ne = T.filter((ce) => ce.kind !== "end"), kt = ne.findIndex((ce) => ce.id === U), Dn = kt === -1 ? ne.length : kt + 1;
|
|
2594
|
+
return ne.splice(Dn, 0, I), {
|
|
2585
2595
|
...C,
|
|
2586
2596
|
[m]: { ...C[m], [_]: ne },
|
|
2587
2597
|
[w]: Object.fromEntries(
|
|
@@ -2589,8 +2599,8 @@ const Yt = ({
|
|
|
2589
2599
|
)
|
|
2590
2600
|
};
|
|
2591
2601
|
}
|
|
2592
|
-
const F = T.findIndex((ne) => ne.id === U), R = T.findIndex((ne) => ne.kind === "end"),
|
|
2593
|
-
return T.splice(
|
|
2602
|
+
const F = T.findIndex((ne) => ne.id === U), R = T.findIndex((ne) => ne.kind === "end"), B = F === -1 ? R === -1 ? T.length : R : F + 1;
|
|
2603
|
+
return T.splice(B, 0, I), { ...C, [m]: { ...C[m], [_]: T } };
|
|
2594
2604
|
});
|
|
2595
2605
|
} else
|
|
2596
2606
|
S ? (oe((m) => {
|
|
@@ -2606,7 +2616,7 @@ const Yt = ({
|
|
|
2606
2616
|
return _ === -1 ? m : [...m.slice(0, _ + 1), I, ...m.slice(_ + 1)];
|
|
2607
2617
|
});
|
|
2608
2618
|
ke(null), st(null), it(w), V("nodeConfig");
|
|
2609
|
-
}, [U, ie]), vt = Y((
|
|
2619
|
+
}, [U, ie]), vt = Y((b, w) => {
|
|
2610
2620
|
const S = (m) => {
|
|
2611
2621
|
const _ = m.label || m.key;
|
|
2612
2622
|
switch (m.kind) {
|
|
@@ -2620,14 +2630,14 @@ const Yt = ({
|
|
|
2620
2630
|
return _;
|
|
2621
2631
|
}
|
|
2622
2632
|
}, x = (m) => {
|
|
2623
|
-
const _ = se(
|
|
2633
|
+
const _ = se(b);
|
|
2624
2634
|
if ((_ == null ? void 0 : _.descriptorType) !== "conditionBranch") return m;
|
|
2625
|
-
const T = (w.branchConfigs ?? []).map((
|
|
2635
|
+
const T = (w.branchConfigs ?? []).map((B) => B.key).filter(Boolean);
|
|
2626
2636
|
if (T.length === 0) return m;
|
|
2627
|
-
const F = m[
|
|
2628
|
-
return T.forEach((
|
|
2629
|
-
R[
|
|
2630
|
-
}), { ...m, [
|
|
2637
|
+
const F = m[b] ?? {}, R = {};
|
|
2638
|
+
return T.forEach((B) => {
|
|
2639
|
+
R[B] = F[B] ?? [{ id: `end-${b}-${B}`, kind: "end", reactFlowType: "endNode" }];
|
|
2640
|
+
}), { ...m, [b]: R };
|
|
2631
2641
|
}, I = (m, _) => {
|
|
2632
2642
|
if (m.descriptorType !== "conditionBranch") return { ...m, formData: _ };
|
|
2633
2643
|
const C = _.branchConfigs ?? [], T = {};
|
|
@@ -2635,12 +2645,12 @@ const Yt = ({
|
|
|
2635
2645
|
F.key && (T[F.key] = S(F));
|
|
2636
2646
|
}), { ...m, formData: _, branchLabels: T };
|
|
2637
2647
|
};
|
|
2638
|
-
if (P.some((m) => m.id ===
|
|
2648
|
+
if (P.some((m) => m.id === b)) {
|
|
2639
2649
|
J((m) => {
|
|
2640
2650
|
const _ = x(m);
|
|
2641
2651
|
return oe(
|
|
2642
2652
|
(C) => C.map(
|
|
2643
|
-
(T) => T.id ===
|
|
2653
|
+
(T) => T.id === b ? I(T, w) : T
|
|
2644
2654
|
)
|
|
2645
2655
|
), _;
|
|
2646
2656
|
});
|
|
@@ -2649,22 +2659,22 @@ const Yt = ({
|
|
|
2649
2659
|
J((m) => {
|
|
2650
2660
|
const C = { ...x(m) };
|
|
2651
2661
|
for (const T of Object.keys(C)) {
|
|
2652
|
-
const F = (R) => R.map((
|
|
2662
|
+
const F = (R) => R.map((B) => B.id === b ? I(B, w) : B);
|
|
2653
2663
|
for (const R of Object.keys(C[T]))
|
|
2654
|
-
if (C[T][R].some((
|
|
2664
|
+
if (C[T][R].some((B) => B.id === b))
|
|
2655
2665
|
return C[T] = { ...C[T], [R]: F(C[T][R]) }, C;
|
|
2656
2666
|
}
|
|
2657
2667
|
return C;
|
|
2658
2668
|
});
|
|
2659
|
-
}, [P, G, se]), Z = K(() => se(Pe ?? ""), [se, Pe]), wt = K(() => Z != null && Z.descriptorType ? e.forType(Z.descriptorType) ?? null : null, [Z, e]), { nodes: Et, edges:
|
|
2660
|
-
() =>
|
|
2661
|
-
[P, G, s, ht, at, l,
|
|
2669
|
+
}, [P, G, se]), Z = K(() => se(Pe ?? ""), [se, Pe]), wt = K(() => Z != null && Z.descriptorType ? e.forType(Z.descriptorType) ?? null : null, [Z, e]), { nodes: Et, edges: Rn } = K(
|
|
2670
|
+
() => as(P, G, s ? null : ht, at, l, y, rt),
|
|
2671
|
+
[P, G, s, ht, at, l, y, rt]
|
|
2662
2672
|
), xt = K(() => {
|
|
2663
|
-
const
|
|
2673
|
+
const b = k ? new Map(k.steps.map((w) => [w.nodeId, w])) : null;
|
|
2664
2674
|
return Et.map((w) => {
|
|
2665
2675
|
let S = {};
|
|
2666
|
-
if (
|
|
2667
|
-
const x =
|
|
2676
|
+
if (b) {
|
|
2677
|
+
const x = b.get(w.id);
|
|
2668
2678
|
x && (S = { _executionStatus: x.status, _executionError: x.error });
|
|
2669
2679
|
}
|
|
2670
2680
|
return w.type === "subWorkflowNode" && N && (S.onPreview = (x) => {
|
|
@@ -2673,11 +2683,11 @@ const Yt = ({
|
|
|
2673
2683
|
lt({ workflowId: x, workflowLabel: ((m = I == null ? void 0 : I.formData) == null ? void 0 : m.workflowLabel) ?? void 0 });
|
|
2674
2684
|
}), Object.keys(S).length > 0 ? { ...w, data: { ...w.data, ...S } } : w;
|
|
2675
2685
|
});
|
|
2676
|
-
}, [Et, k, N, se]),
|
|
2677
|
-
}, onClickAddTrigger: Fe, messages: ge, nodeRegistry: e, nodeBody: ot }), [Re, ut, Fe, ge, e, ot]),
|
|
2686
|
+
}, [Et, k, N, se]), Fn = K(() => ({ onEditNode: Re, onDeleteNode: ut, onAddStep: () => {
|
|
2687
|
+
}, onClickAddTrigger: Fe, messages: ge, nodeRegistry: e, nodeBody: ot }), [Re, ut, Fe, ge, e, ot]), An = Y(async () => {
|
|
2678
2688
|
i && await i({ slots: P, branches: G });
|
|
2679
2689
|
}, [i, P, G]);
|
|
2680
|
-
return /* @__PURE__ */ u(
|
|
2690
|
+
return /* @__PURE__ */ u(xr, { resolvers: we, children: /* @__PURE__ */ u(Zn.Provider, { value: Fn, children: /* @__PURE__ */ v(
|
|
2681
2691
|
"div",
|
|
2682
2692
|
{
|
|
2683
2693
|
className: "flowforge-canvas",
|
|
@@ -2700,64 +2710,64 @@ const Yt = ({
|
|
|
2700
2710
|
},
|
|
2701
2711
|
children: [
|
|
2702
2712
|
!O && (i || W || j) && /* @__PURE__ */ u(
|
|
2703
|
-
|
|
2713
|
+
Qi,
|
|
2704
2714
|
{
|
|
2705
2715
|
workflowName: j,
|
|
2706
2716
|
onWorkflowNameChange: z,
|
|
2707
2717
|
status: L,
|
|
2708
|
-
statusColor:
|
|
2709
|
-
onSave: i ?
|
|
2718
|
+
statusColor: A,
|
|
2719
|
+
onSave: i ? An : void 0,
|
|
2710
2720
|
onCancel: W,
|
|
2711
2721
|
saveLabel: $
|
|
2712
2722
|
}
|
|
2713
2723
|
),
|
|
2714
2724
|
/* @__PURE__ */ v("div", { style: { flex: 1, minHeight: 0, position: "relative" }, children: [
|
|
2715
2725
|
/* @__PURE__ */ v(
|
|
2716
|
-
|
|
2726
|
+
Bn,
|
|
2717
2727
|
{
|
|
2718
2728
|
nodes: xt,
|
|
2719
|
-
edges:
|
|
2720
|
-
nodeTypes:
|
|
2721
|
-
edgeTypes:
|
|
2729
|
+
edges: Rn,
|
|
2730
|
+
nodeTypes: zn,
|
|
2731
|
+
edgeTypes: Ln,
|
|
2722
2732
|
fitView: Ee,
|
|
2723
2733
|
fitViewOptions: { padding: te },
|
|
2724
2734
|
nodesDraggable: !1,
|
|
2725
2735
|
nodesConnectable: !1,
|
|
2726
2736
|
panOnScroll: ze,
|
|
2727
2737
|
zoomOnScroll: Le,
|
|
2728
|
-
minZoom:
|
|
2729
|
-
maxZoom:
|
|
2730
|
-
snapToGrid:
|
|
2731
|
-
snapGrid:
|
|
2738
|
+
minZoom: Tn,
|
|
2739
|
+
maxZoom: Cn,
|
|
2740
|
+
snapToGrid: In,
|
|
2741
|
+
snapGrid: On,
|
|
2732
2742
|
proOptions: { hideAttribution: !0 },
|
|
2733
|
-
onNodeClick: (
|
|
2743
|
+
onNodeClick: (b, w) => {
|
|
2734
2744
|
const S = se(w.id);
|
|
2735
2745
|
S && (p != null && p(S) || (S.kind === "addTrigger" || S.kind === "triggerFixed" ? Fe() : (S.kind === "userTask" || S.kind === "filter" || S.kind === "approval") && Re(w.id)));
|
|
2736
2746
|
},
|
|
2737
2747
|
children: [
|
|
2738
2748
|
l.background !== "none" && /* @__PURE__ */ u(
|
|
2739
|
-
|
|
2749
|
+
Gn,
|
|
2740
2750
|
{
|
|
2741
2751
|
variant: l.background,
|
|
2742
2752
|
color: l.backgroundColor ?? "#e0e0e0",
|
|
2743
2753
|
gap: 20
|
|
2744
2754
|
}
|
|
2745
2755
|
),
|
|
2746
|
-
he && /* @__PURE__ */ u(
|
|
2747
|
-
xe && /* @__PURE__ */ u(
|
|
2748
|
-
/* @__PURE__ */ u(
|
|
2756
|
+
he && /* @__PURE__ */ u(Yn, { showInteractive: !1 }),
|
|
2757
|
+
xe && /* @__PURE__ */ u(Kn, { zoomable: !0, pannable: !0 }),
|
|
2758
|
+
/* @__PURE__ */ u(Ji, { onHeightsReady: jn, nodeCount: xt.length })
|
|
2749
2759
|
]
|
|
2750
2760
|
}
|
|
2751
2761
|
),
|
|
2752
|
-
c ? ae === "triggerSelect" && c(t.list(), gt, () => V(null)) : /* @__PURE__ */ u(
|
|
2753
|
-
h ? ae === "nodePicker" && h(
|
|
2762
|
+
c ? ae === "triggerSelect" && c(t.list(), gt, () => V(null)) : /* @__PURE__ */ u(es, { open: ae === "triggerSelect", templates: t.list(), messages: ge, onSelect: gt, onClose: () => V(null), loadTriggerSources: f }),
|
|
2763
|
+
h ? ae === "nodePicker" && h(bt(), mt, () => {
|
|
2754
2764
|
V(null), ke(null);
|
|
2755
|
-
}) : /* @__PURE__ */ u(
|
|
2765
|
+
}) : /* @__PURE__ */ u(ts, { open: ae === "nodePicker", availableDescriptors: bt(), messages: ge, onSelect: mt, onClose: () => {
|
|
2756
2766
|
V(null), ke(null);
|
|
2757
2767
|
} }),
|
|
2758
|
-
g ? ae === "nodeConfig" && g(wt ?? void 0, Z, vt, () => V(null)) : /* @__PURE__ */ u(
|
|
2768
|
+
g ? ae === "nodeConfig" && g(wt ?? void 0, Z, vt, () => V(null)) : /* @__PURE__ */ u(ns, { open: ae === "nodeConfig", nodeId: Pe, descriptor: wt, initialValues: Z == null ? void 0 : Z.formData, messages: ge, onSave: vt, onClose: () => V(null) }),
|
|
2759
2769
|
N && _e && /* @__PURE__ */ u(
|
|
2760
|
-
|
|
2770
|
+
rs,
|
|
2761
2771
|
{
|
|
2762
2772
|
isOpen: !!_e,
|
|
2763
2773
|
onClose: () => lt(null),
|
|
@@ -2770,14 +2780,14 @@ const Yt = ({
|
|
|
2770
2780
|
]
|
|
2771
2781
|
}
|
|
2772
2782
|
) }) });
|
|
2773
|
-
},
|
|
2783
|
+
}, cs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2774
2784
|
__proto__: null,
|
|
2775
|
-
WorkflowCanvas:
|
|
2776
|
-
default:
|
|
2785
|
+
WorkflowCanvas: Ht,
|
|
2786
|
+
default: Ht
|
|
2777
2787
|
}, Symbol.toStringTag, { value: "Module" })), He = "All";
|
|
2778
|
-
function
|
|
2788
|
+
function fs({ template: e, onSelect: t }) {
|
|
2779
2789
|
var o, i;
|
|
2780
|
-
const n = e.triggerCategory ?
|
|
2790
|
+
const n = e.triggerCategory ? _r[e.triggerCategory] : null, r = ((o = e.skeletonState) == null ? void 0 : o.slots.filter((s) => s.kind === "userTask").length) ?? 0;
|
|
2781
2791
|
return /* @__PURE__ */ v(
|
|
2782
2792
|
"div",
|
|
2783
2793
|
{
|
|
@@ -2830,7 +2840,7 @@ function as({ template: e, onSelect: t }) {
|
|
|
2830
2840
|
}
|
|
2831
2841
|
);
|
|
2832
2842
|
}
|
|
2833
|
-
const
|
|
2843
|
+
const Cs = ({
|
|
2834
2844
|
templates: e,
|
|
2835
2845
|
onSelectTemplate: t,
|
|
2836
2846
|
onStartFromScratch: n
|
|
@@ -2866,14 +2876,14 @@ const Ns = ({
|
|
|
2866
2876
|
onClick: n,
|
|
2867
2877
|
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" },
|
|
2868
2878
|
children: [
|
|
2869
|
-
/* @__PURE__ */ u(
|
|
2879
|
+
/* @__PURE__ */ u(cr, { size: 16 }),
|
|
2870
2880
|
"Start from Scratch"
|
|
2871
2881
|
]
|
|
2872
2882
|
}
|
|
2873
2883
|
)
|
|
2874
2884
|
] }),
|
|
2875
2885
|
/* @__PURE__ */ v("div", { style: { display: "flex", alignItems: "center", gap: 8, background: "#f5f5f5", borderRadius: 8, padding: "8px 12px", marginBottom: 12 }, children: [
|
|
2876
|
-
/* @__PURE__ */ u(
|
|
2886
|
+
/* @__PURE__ */ u(fr, { size: 18, color: "#9e9e9e" }),
|
|
2877
2887
|
/* @__PURE__ */ u(
|
|
2878
2888
|
"input",
|
|
2879
2889
|
{
|
|
@@ -2905,21 +2915,21 @@ const Ns = ({
|
|
|
2905
2915
|
)) })
|
|
2906
2916
|
] }),
|
|
2907
2917
|
/* @__PURE__ */ u("div", { style: { flex: 1, overflowY: "auto", padding: 24 }, children: a.length === 0 ? /* @__PURE__ */ v("div", { style: { textAlign: "center", padding: "40px 0", color: "#9e9e9e" }, children: [
|
|
2908
|
-
/* @__PURE__ */ u(
|
|
2918
|
+
/* @__PURE__ */ u(ur, { size: 36, style: { marginBottom: 8 } }),
|
|
2909
2919
|
/* @__PURE__ */ u("p", { style: { margin: 0, fontSize: 14 }, children: "No templates found" })
|
|
2910
|
-
] }) : /* @__PURE__ */ u("div", { style: { display: "grid", gridTemplateColumns: "repeat(auto-fill, minmax(280px, 1fr))", gap: 16 }, children: a.map((d) => /* @__PURE__ */ u(
|
|
2920
|
+
] }) : /* @__PURE__ */ u("div", { style: { display: "grid", gridTemplateColumns: "repeat(auto-fill, minmax(280px, 1fr))", gap: 16 }, children: a.map((d) => /* @__PURE__ */ u(fs, { template: d, onSelect: () => t(d) }, d.triggerKey)) }) })
|
|
2911
2921
|
] });
|
|
2912
2922
|
}, Se = {
|
|
2913
|
-
running: { label: "Running", color: ee.running, icon:
|
|
2914
|
-
success: { label: "Success", color: ee.success, icon:
|
|
2915
|
-
failed: { label: "Failed", color: ee.failed, icon:
|
|
2916
|
-
cancelled: { label: "Cancelled", color: ee.cancelled, icon:
|
|
2917
|
-
},
|
|
2918
|
-
pending: { color: ee.pending, icon:
|
|
2919
|
-
running: { color: ee.running, icon:
|
|
2920
|
-
success: { color: ee.success, icon:
|
|
2921
|
-
failed: { color: ee.failed, icon:
|
|
2922
|
-
skipped: { color: ee.skipped, icon:
|
|
2923
|
+
running: { label: "Running", color: ee.running, icon: D.createElement(Zt, { size: 14 }) },
|
|
2924
|
+
success: { label: "Success", color: ee.success, icon: D.createElement(Jt, { size: 14 }) },
|
|
2925
|
+
failed: { label: "Failed", color: ee.failed, icon: D.createElement(qt, { size: 14 }) },
|
|
2926
|
+
cancelled: { label: "Cancelled", color: ee.cancelled, icon: D.createElement(Xt, { size: 14 }) }
|
|
2927
|
+
}, us = {
|
|
2928
|
+
pending: { color: ee.pending, icon: D.createElement(hr, { size: 14 }) },
|
|
2929
|
+
running: { color: ee.running, icon: D.createElement(Zt, { size: 14 }) },
|
|
2930
|
+
success: { color: ee.success, icon: D.createElement(Jt, { size: 14 }) },
|
|
2931
|
+
failed: { color: ee.failed, icon: D.createElement(qt, { size: 14 }) },
|
|
2932
|
+
skipped: { color: ee.skipped, icon: D.createElement(Xt, { size: 14 }) }
|
|
2923
2933
|
};
|
|
2924
2934
|
function Je(e) {
|
|
2925
2935
|
try {
|
|
@@ -2928,7 +2938,7 @@ function Je(e) {
|
|
|
2928
2938
|
return e;
|
|
2929
2939
|
}
|
|
2930
2940
|
}
|
|
2931
|
-
function
|
|
2941
|
+
function Nn(e, t) {
|
|
2932
2942
|
try {
|
|
2933
2943
|
const n = new Date(t ?? (/* @__PURE__ */ new Date()).toISOString()).getTime() - new Date(e).getTime();
|
|
2934
2944
|
return n < 1e3 ? `${n}ms` : n < 6e4 ? `${(n / 1e3).toFixed(1)}s` : `${Math.floor(n / 6e4)}m ${Math.floor(n % 6e4 / 1e3)}s`;
|
|
@@ -2936,8 +2946,8 @@ function _n(e, t) {
|
|
|
2936
2946
|
return "—";
|
|
2937
2947
|
}
|
|
2938
2948
|
}
|
|
2939
|
-
function
|
|
2940
|
-
const [t, n] = M(!1), r =
|
|
2949
|
+
function hs({ step: e }) {
|
|
2950
|
+
const [t, n] = M(!1), r = us[e.status], o = !!(e.inputs || e.outputs || e.error);
|
|
2941
2951
|
return /* @__PURE__ */ v("div", { style: { borderBottom: "1px solid #f5f5f5" }, children: [
|
|
2942
2952
|
/* @__PURE__ */ v(
|
|
2943
2953
|
"div",
|
|
@@ -2952,11 +2962,11 @@ function fs({ step: e }) {
|
|
|
2952
2962
|
o && (i.key === "Enter" || i.key === " ") && n((s) => !s);
|
|
2953
2963
|
},
|
|
2954
2964
|
children: [
|
|
2955
|
-
/* @__PURE__ */ u("span", { style: { color: r.color, flexShrink: 0 }, children:
|
|
2965
|
+
/* @__PURE__ */ u("span", { style: { color: r.color, flexShrink: 0 }, children: D.cloneElement(r.icon, { color: r.color }) }),
|
|
2956
2966
|
/* @__PURE__ */ u("span", { style: { flex: 1, fontSize: 13, color: "#212121" }, children: e.label || e.nodeId }),
|
|
2957
2967
|
e.branchTaken && /* @__PURE__ */ u("span", { style: { fontSize: 10, padding: "1px 6px", borderRadius: 10, background: "#e3f2fd", color: "#1565c0", fontWeight: 600 }, children: e.branchTaken }),
|
|
2958
|
-
/* @__PURE__ */ u("span", { style: { fontSize: 11, color: "#9e9e9e", flexShrink: 0 }, children: e.startedAt ?
|
|
2959
|
-
o && /* @__PURE__ */ u("span", { style: { color: "#9e9e9e", flexShrink: 0 }, children: t ?
|
|
2968
|
+
/* @__PURE__ */ u("span", { style: { fontSize: 11, color: "#9e9e9e", flexShrink: 0 }, children: e.startedAt ? Nn(e.startedAt, e.completedAt) : "—" }),
|
|
2969
|
+
o && /* @__PURE__ */ u("span", { style: { color: "#9e9e9e", flexShrink: 0 }, children: t ? D.createElement(pr, { size: 16 }) : D.createElement(yr, { size: 16 }) })
|
|
2960
2970
|
]
|
|
2961
2971
|
}
|
|
2962
2972
|
),
|
|
@@ -2973,7 +2983,7 @@ function fs({ step: e }) {
|
|
|
2973
2983
|
] })
|
|
2974
2984
|
] });
|
|
2975
2985
|
}
|
|
2976
|
-
function
|
|
2986
|
+
function gs({ record: e, selected: t, onSelect: n }) {
|
|
2977
2987
|
const r = Se[e.status];
|
|
2978
2988
|
return /* @__PURE__ */ v(
|
|
2979
2989
|
"div",
|
|
@@ -2995,7 +3005,7 @@ function us({ record: e, selected: t, onSelect: n }) {
|
|
|
2995
3005
|
outline: "none"
|
|
2996
3006
|
},
|
|
2997
3007
|
children: [
|
|
2998
|
-
/* @__PURE__ */ u("span", { style: { color: r.color, flexShrink: 0 }, children:
|
|
3008
|
+
/* @__PURE__ */ u("span", { style: { color: r.color, flexShrink: 0 }, children: D.cloneElement(r.icon, { color: r.color, size: 16 }) }),
|
|
2999
3009
|
/* @__PURE__ */ v("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
3000
3010
|
/* @__PURE__ */ u("div", { style: { fontSize: 12, color: "#212121", fontWeight: t ? 600 : 400, whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }, children: Je(e.triggeredAt) }),
|
|
3001
3011
|
/* @__PURE__ */ v("div", { style: { fontSize: 11, color: "#9e9e9e" }, children: [
|
|
@@ -3007,12 +3017,12 @@ function us({ record: e, selected: t, onSelect: n }) {
|
|
|
3007
3017
|
] })
|
|
3008
3018
|
] }),
|
|
3009
3019
|
/* @__PURE__ */ u("span", { style: { fontSize: 11, fontWeight: 600, color: r.color, flexShrink: 0 }, children: r.label }),
|
|
3010
|
-
/* @__PURE__ */ u(
|
|
3020
|
+
/* @__PURE__ */ u(Ut, { size: 14, color: "#bdbdbd" })
|
|
3011
3021
|
]
|
|
3012
3022
|
}
|
|
3013
3023
|
);
|
|
3014
3024
|
}
|
|
3015
|
-
const
|
|
3025
|
+
const Is = ({ records: e, onViewOnCanvas: t }) => {
|
|
3016
3026
|
var s;
|
|
3017
3027
|
const [n, r] = M(((s = e[0]) == null ? void 0 : s.id) ?? null), o = e.find((l) => l.id === n) ?? null, i = [...e].sort((l, a) => new Date(a.triggeredAt).getTime() - new Date(l.triggeredAt).getTime());
|
|
3018
3028
|
return e.length === 0 ? /* @__PURE__ */ v("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", height: 300, color: "#9e9e9e", gap: 8 }, children: [
|
|
@@ -3026,13 +3036,13 @@ const Ts = ({ records: e, onViewOnCanvas: t }) => {
|
|
|
3026
3036
|
e.length,
|
|
3027
3037
|
")"
|
|
3028
3038
|
] }),
|
|
3029
|
-
i.map((l) => /* @__PURE__ */ u(
|
|
3039
|
+
i.map((l) => /* @__PURE__ */ u(gs, { record: l, selected: l.id === n, onSelect: () => r(l.id) }, l.id))
|
|
3030
3040
|
] }),
|
|
3031
3041
|
/* @__PURE__ */ u("div", { style: { flex: 1, overflowY: "auto" }, children: o ? /* @__PURE__ */ v("div", { children: [
|
|
3032
3042
|
/* @__PURE__ */ v("div", { style: { padding: "16px 20px", borderBottom: "1px solid #f0f0f0", display: "flex", alignItems: "flex-start", justifyContent: "space-between", gap: 12 }, children: [
|
|
3033
3043
|
/* @__PURE__ */ v("div", { children: [
|
|
3034
3044
|
/* @__PURE__ */ v("div", { style: { display: "flex", alignItems: "center", gap: 8, marginBottom: 4 }, children: [
|
|
3035
|
-
|
|
3045
|
+
D.cloneElement(Se[o.status].icon, { color: Se[o.status].color, size: 18 }),
|
|
3036
3046
|
/* @__PURE__ */ u("span", { style: { fontWeight: 700, fontSize: 15, color: "#212121" }, children: Se[o.status].label })
|
|
3037
3047
|
] }),
|
|
3038
3048
|
/* @__PURE__ */ v("div", { style: { fontSize: 12, color: "#757575", display: "flex", flexDirection: "column", gap: 2 }, children: [
|
|
@@ -3040,10 +3050,10 @@ const Ts = ({ records: e, onViewOnCanvas: t }) => {
|
|
|
3040
3050
|
/* @__PURE__ */ u(Nt, { size: 13 }),
|
|
3041
3051
|
" ",
|
|
3042
3052
|
Je(o.triggeredAt),
|
|
3043
|
-
o.completedAt && ` → ${Je(o.completedAt)} (${
|
|
3053
|
+
o.completedAt && ` → ${Je(o.completedAt)} (${Nn(o.triggeredAt, o.completedAt)})`
|
|
3044
3054
|
] }),
|
|
3045
3055
|
o.triggeredBy && /* @__PURE__ */ v("span", { style: { display: "flex", alignItems: "center", gap: 4 }, children: [
|
|
3046
|
-
/* @__PURE__ */ u(
|
|
3056
|
+
/* @__PURE__ */ u(gr, { size: 13 }),
|
|
3047
3057
|
" ",
|
|
3048
3058
|
o.triggeredBy
|
|
3049
3059
|
] })
|
|
@@ -3065,7 +3075,7 @@ const Ts = ({ records: e, onViewOnCanvas: t }) => {
|
|
|
3065
3075
|
o.steps.length,
|
|
3066
3076
|
")"
|
|
3067
3077
|
] }),
|
|
3068
|
-
o.steps.map((l, a) => /* @__PURE__ */ u(
|
|
3078
|
+
o.steps.map((l, a) => /* @__PURE__ */ u(hs, { step: l }, `${l.nodeId}-${a}`))
|
|
3069
3079
|
] }),
|
|
3070
3080
|
o.inputs && Object.keys(o.inputs).length > 0 && /* @__PURE__ */ u("div", { style: { padding: "10px 16px" }, children: /* @__PURE__ */ v("details", { children: [
|
|
3071
3081
|
/* @__PURE__ */ u("summary", { style: { cursor: "pointer", fontSize: 12, fontWeight: 600, color: "#757575", marginBottom: 6 }, children: "TRIGGER INPUTS" }),
|
|
@@ -3075,10 +3085,10 @@ const Ts = ({ records: e, onViewOnCanvas: t }) => {
|
|
|
3075
3085
|
] });
|
|
3076
3086
|
};
|
|
3077
3087
|
export {
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3088
|
+
Ht as F,
|
|
3089
|
+
rs as S,
|
|
3090
|
+
Is as W,
|
|
3091
|
+
Qi as a,
|
|
3092
|
+
Cs as b
|
|
3083
3093
|
};
|
|
3084
|
-
//# sourceMappingURL=WorkflowExecutionHistory-
|
|
3094
|
+
//# sourceMappingURL=WorkflowExecutionHistory-Bpw-YeJU.js.map
|