@notmrabhi/flowforge 0.1.42 → 0.1.44

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.
Files changed (59) hide show
  1. package/dist/{SchemaBuilderDrawer-CUzYWGCN.js → SchemaBuilderDrawer-DlmInnSC.js} +33 -33
  2. package/dist/{SchemaBuilderDrawer-CUzYWGCN.js.map → SchemaBuilderDrawer-DlmInnSC.js.map} +1 -1
  3. package/dist/{SchemaBuilderDrawer-CiSdfXzJ.js → SchemaBuilderDrawer-KUOXc7K_.js} +2 -2
  4. package/dist/{SchemaBuilderDrawer-CiSdfXzJ.js.map → SchemaBuilderDrawer-KUOXc7K_.js.map} +1 -1
  5. package/dist/canvas.cjs +1 -1
  6. package/dist/canvas.d.ts +131 -1
  7. package/dist/canvas.js +1 -1
  8. package/dist/core.cjs +1 -1
  9. package/dist/core.d.ts +39 -0
  10. package/dist/core.js +22 -23
  11. package/dist/core.js.map +1 -1
  12. package/dist/form.cjs +1 -1
  13. package/dist/form.d.ts +121 -0
  14. package/dist/form.js +36 -33
  15. package/dist/{index-B8-KKaH_.js → index-AISQhG1t.js} +2 -2
  16. package/dist/{index-B8-KKaH_.js.map → index-AISQhG1t.js.map} +1 -1
  17. package/dist/index-BDDJrQn0.js +10 -0
  18. package/dist/index-BDDJrQn0.js.map +1 -0
  19. package/dist/{index-Buv1ylwP.js → index-CBJiDDQc.js} +2 -2
  20. package/dist/{index-Buv1ylwP.js.map → index-CBJiDDQc.js.map} +1 -1
  21. package/dist/{index-DjKhaaWf.js → index-CbdFoSw3.js} +2 -2
  22. package/dist/{index-DjKhaaWf.js.map → index-CbdFoSw3.js.map} +1 -1
  23. package/dist/{index-CiU9_8f1.js → index-DU-niBi3.js} +2 -2
  24. package/dist/{index-CiU9_8f1.js.map → index-DU-niBi3.js.map} +1 -1
  25. package/dist/{index-B74jTc2b.js → index-y_v8Qog1.js} +3124 -3005
  26. package/dist/index-y_v8Qog1.js.map +1 -0
  27. package/dist/index.cjs +1 -1
  28. package/dist/index.cjs.map +1 -1
  29. package/dist/index.d.ts +143 -1
  30. package/dist/index.js +81 -79
  31. package/dist/index.js.map +1 -1
  32. package/dist/nodeRegistry.cjs +1 -1
  33. package/dist/nodeRegistry.cjs.map +1 -1
  34. package/dist/nodeRegistry.d.ts +39 -0
  35. package/dist/nodeRegistry.js +543 -23
  36. package/dist/nodeRegistry.js.map +1 -1
  37. package/dist/{templateSkeletons-CFMb6KIK.js → templateSkeletons-CHrd4Z5h.js} +375 -373
  38. package/dist/templateSkeletons-CHrd4Z5h.js.map +1 -0
  39. package/dist/templateSkeletons-CtknKiGO.js +2 -0
  40. package/dist/templateSkeletons-CtknKiGO.js.map +1 -0
  41. package/package.json +1 -1
  42. package/dist/index-B6xrei80.js +0 -87
  43. package/dist/index-B6xrei80.js.map +0 -1
  44. package/dist/index-B74jTc2b.js.map +0 -1
  45. package/dist/index-BrJBVztu.js +0 -2
  46. package/dist/index-BrJBVztu.js.map +0 -1
  47. package/dist/index-CXmgrKoe.js +0 -2
  48. package/dist/index-CXmgrKoe.js.map +0 -1
  49. package/dist/index-CqMPyOkL.js +0 -10
  50. package/dist/index-CqMPyOkL.js.map +0 -1
  51. package/dist/index-Dcur-XJ9.js +0 -36
  52. package/dist/index-Dcur-XJ9.js.map +0 -1
  53. package/dist/subWorkflowDescriptor-DYOYgBzX.js +0 -535
  54. package/dist/subWorkflowDescriptor-DYOYgBzX.js.map +0 -1
  55. package/dist/subWorkflowDescriptor-JDKi2INh.js +0 -2
  56. package/dist/subWorkflowDescriptor-JDKi2INh.js.map +0 -1
  57. package/dist/templateSkeletons-CFMb6KIK.js.map +0 -1
  58. package/dist/templateSkeletons-DKBMuT6K.js +0 -2
  59. package/dist/templateSkeletons-DKBMuT6K.js.map +0 -1
@@ -1,22 +1,22 @@
1
1
  import { jsxs as w, jsx as u, Fragment as be } from "react/jsx-runtime";
2
2
  import P, { useRef as Tt, useEffect as re, useState as j, useCallback as Y, useMemo as K } from "react";
3
- import Rn, { useStore as Dn, useReactFlow as Pn, Background as Bn, Controls as Wn, MiniMap as Gn } from "reactflow";
3
+ import Dn, { useStore as Pn, useReactFlow as Bn, Background as Wn, Controls as Gn, MiniMap as $n } from "reactflow";
4
4
  import "reactflow/dist/style.css";
5
- import { e as $n, G as Yn, E as Kn, P as Un, L as Hn, d as Vn, f as qn } from "./GatewayBranchEdge-CrgczPYJ.js";
6
- import { Dialog as Xn, Box as Q, Drawer as Jn, IconButton as _t, Button as Ne, CircularProgress as Zn } from "@mui/material";
7
- import Qn from "react-select";
8
- import { MdClose as er, MdCalendarToday as tr, MdBolt as nr, MdArrowBack as Kt, MdChevronRight as Ut, MdAddCircleOutline as rr, MdApps as or, MdErrorOutline as ir, MdAccountTree as sr, MdAdd as lr, MdSearch as ar, MdCategory as dr, MdCancel as Ht, MdError as Vt, MdCheckCircle as qt, MdPlayArrow as Xt, MdHourglassEmpty as cr, MdSchedule as Nt, MdPerson as fr, MdExpandLess as ur, MdExpandMore as hr } from "react-icons/md";
9
- import { GrTrigger as gr } from "react-icons/gr";
10
- import { BiCollapse as pr, BiExpand as br } from "react-icons/bi";
11
- import { j as yr, b as mr } from "./index-B74jTc2b.js";
12
- import { m as wr } from "./messages-CO299wPN.js";
13
- import { T as vr, E as ee } from "./canvasTokens-CAD6G24b.js";
14
- var Jt = Object.defineProperty, Er = (e, t, n) => t in e ? Jt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, kr = (e, t) => {
5
+ import { e as Yn, G as Kn, E as Un, P as Hn, L as Vn, d as qn, f as Xn } from "./GatewayBranchEdge-CrgczPYJ.js";
6
+ import { Dialog as Jn, Box as Q, Drawer as Zn, IconButton as _t, Button as Ne, CircularProgress as Qn } from "@mui/material";
7
+ import er from "react-select";
8
+ import { MdClose as tr, MdCalendarToday as nr, MdBolt as rr, MdArrowBack as Kt, MdChevronRight as Ut, MdAddCircleOutline as or, MdApps as ir, MdErrorOutline as sr, MdAccountTree as lr, MdAdd as ar, MdSearch as dr, MdCategory as cr, MdCancel as Ht, MdError as Vt, MdCheckCircle as qt, MdPlayArrow as Xt, MdHourglassEmpty as fr, MdSchedule as Nt, MdPerson as ur, MdExpandLess as hr, MdExpandMore as gr } from "react-icons/md";
9
+ import { GrTrigger as pr } from "react-icons/gr";
10
+ import { BiCollapse as br, BiExpand as yr } from "react-icons/bi";
11
+ import { j as mr, b as wr, O as vr } from "./index-y_v8Qog1.js";
12
+ import { m as Er } from "./messages-CO299wPN.js";
13
+ import { T as kr, E as ee } from "./canvasTokens-CAD6G24b.js";
14
+ var Jt = Object.defineProperty, xr = (e, t, n) => t in e ? Jt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Tr = (e, t) => {
15
15
  for (var n in t) Jt(e, n, { get: t[n], enumerable: !0 });
16
- }, xr = (e, t, n) => Er(e, t + "", n), Zt = {};
17
- kr(Zt, { Graph: () => U, alg: () => Ze, json: () => en, version: () => Nr });
18
- var Tr = Object.defineProperty, Qt = (e, t) => {
19
- for (var n in t) Tr(e, n, { get: t[n], enumerable: !0 });
16
+ }, _r = (e, t, n) => xr(e, t + "", n), Zt = {};
17
+ Tr(Zt, { Graph: () => U, alg: () => Ze, json: () => en, version: () => Cr });
18
+ var Nr = Object.defineProperty, Qt = (e, t) => {
19
+ for (var n in t) Nr(e, n, { get: t[n], enumerable: !0 });
20
20
  }, U = 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,7 +154,7 @@ var Tr = Object.defineProperty, Qt = (e, t) => {
154
154
  if (a in this._edgeLabels) return d && (this._edgeLabels[a] = 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[a] = d ? l : this._defaultEdgeLabelFn(o, i, s);
157
- let c = _r(this._isDirected, o, i, s);
157
+ let c = Sr(this._isDirected, o, i, s);
158
158
  return o = c.v, i = c.w, Object.freeze(c), this._edgeObjs[a] = c, St(this._preds[i], o), St(this._sucs[o], i), this._in[i][a] = c, this._out[o][a] = c, this._edgeCount++, this;
159
159
  }
160
160
  edge(e, t, n) {
@@ -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 _r(e, t, n, r) {
211
+ function Sr(e, t, n, r) {
212
212
  let o = "" + t, i = "" + n;
213
213
  if (!e && o > i) {
214
214
  let l = o;
@@ -220,25 +220,25 @@ function _r(e, t, n, r) {
220
220
  function De(e, t) {
221
221
  return pe(e, t.v, t.w, t.name);
222
222
  }
223
- var Nr = "4.0.1", en = {};
224
- Qt(en, { read: () => Or, write: () => Sr });
225
- function Sr(e) {
226
- let t = { options: { directed: e.isDirected(), multigraph: e.isMultigraph(), compound: e.isCompound() }, nodes: Cr(e), edges: Ir(e) }, n = e.graph();
223
+ var Cr = "4.0.1", en = {};
224
+ Qt(en, { read: () => Mr, write: () => Ir });
225
+ function Ir(e) {
226
+ let t = { options: { directed: e.isDirected(), multigraph: e.isMultigraph(), compound: e.isCompound() }, nodes: Or(e), edges: jr(e) }, n = e.graph();
227
227
  return n !== void 0 && (t.value = structuredClone(n)), t;
228
228
  }
229
- function Cr(e) {
229
+ function Or(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 Ir(e) {
235
+ function jr(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 Or(e) {
241
+ function Mr(e) {
242
242
  let t = new U(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 Or(e) {
247
247
  }), t;
248
248
  }
249
249
  var Ze = {};
250
- Qt(Ze, { CycleException: () => Ce, bellmanFord: () => tn, components: () => zr, dijkstra: () => Se, dijkstraAll: () => Ar, findCycles: () => Rr, floydWarshall: () => Pr, isAcyclic: () => Wr, postorder: () => $r, preorder: () => Yr, prim: () => Kr, shortestPaths: () => Ur, tarjan: () => rn, topsort: () => on });
251
- var jr = () => 1;
250
+ Qt(Ze, { CycleException: () => Ce, bellmanFord: () => tn, components: () => Lr, dijkstra: () => Se, dijkstraAll: () => Dr, findCycles: () => Pr, floydWarshall: () => Wr, isAcyclic: () => $r, postorder: () => Kr, preorder: () => Ur, prim: () => Hr, shortestPaths: () => Vr, tarjan: () => rn, topsort: () => on });
251
+ var zr = () => 1;
252
252
  function tn(e, t, n, r) {
253
- return Mr(e, String(t), n || jr, r || function(o) {
253
+ return Fr(e, String(t), n || zr, r || function(o) {
254
254
  return e.outEdges(o);
255
255
  });
256
256
  }
257
- function Mr(e, t, n, r) {
257
+ function Fr(e, t, n, r) {
258
258
  let o = {}, i, s = 0, l = e.nodes(), d = 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 Mr(e, t, n, r) {
275
275
  if (s === c - 1 && (i = !1, a(), i)) throw new Error("The graph contains a negative weight cycle");
276
276
  return o;
277
277
  }
278
- function zr(e) {
278
+ function Lr(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));
@@ -337,14 +337,14 @@ 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
- }, Fr = () => 1;
340
+ }, Ar = () => 1;
341
341
  function Se(e, t, n, r) {
342
342
  let o = function(i) {
343
343
  return e.outEdges(i);
344
344
  };
345
- return Lr(e, String(t), n || Fr, r || o);
345
+ return Rr(e, String(t), n || Ar, r || o);
346
346
  }
347
- function Lr(e, t, n, r) {
347
+ function Rr(e, t, n, r) {
348
348
  let o = {}, i = new nn(), s, l, d = function(a) {
349
349
  let c = a.v !== s ? a.v : a.w, f = o[c], h = n(a), g = l.distance + h;
350
350
  if (h < 0) throw new Error("dijkstra does not allow negative edge weights. Bad edge: " + a + " Weight: " + h);
@@ -356,7 +356,7 @@ function Lr(e, t, n, r) {
356
356
  }); i.size() > 0 && (s = i.removeMin(), l = o[s], l.distance !== Number.POSITIVE_INFINITY); ) r(s).forEach(d);
357
357
  return o;
358
358
  }
359
- function Ar(e, t, n) {
359
+ function Dr(e, t, n) {
360
360
  return e.nodes().reduce(function(r, o) {
361
361
  return r[o] = Se(e, o, t, n), r;
362
362
  }, {});
@@ -379,18 +379,18 @@ function rn(e) {
379
379
  s in r || i(s);
380
380
  }), o;
381
381
  }
382
- function Rr(e) {
382
+ function Pr(e) {
383
383
  return rn(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 Dr = () => 1;
388
- function Pr(e, t, n) {
389
- return Br(e, t || Dr, n || function(r) {
387
+ var Br = () => 1;
388
+ function Wr(e, t, n) {
389
+ return Gr(e, t || Br, n || function(r) {
390
390
  return e.outEdges(r);
391
391
  });
392
392
  }
393
- function Br(e, t, n) {
393
+ function Gr(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) {
@@ -424,7 +424,7 @@ 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 Wr(e) {
427
+ function $r(e) {
428
428
  try {
429
429
  on(e);
430
430
  } catch (t) {
@@ -433,7 +433,7 @@ function Wr(e) {
433
433
  }
434
434
  return !0;
435
435
  }
436
- function Gr(e, t, n, r, o) {
436
+ function Yr(e, t, n, r, o) {
437
437
  Array.isArray(t) || (t = [t]);
438
438
  let i = (l) => {
439
439
  var d;
@@ -450,17 +450,17 @@ function sn(e, t, n, r, o, i, s) {
450
450
  }), n && (s = i(s, t))), s;
451
451
  }
452
452
  function ln(e, t, n) {
453
- return Gr(e, t, n, function(r, o) {
453
+ return Yr(e, t, n, function(r, o) {
454
454
  return r.push(o), r;
455
455
  }, []);
456
456
  }
457
- function $r(e, t) {
457
+ function Kr(e, t) {
458
458
  return ln(e, t, "post");
459
459
  }
460
- function Yr(e, t) {
460
+ function Ur(e, t) {
461
461
  return ln(e, t, "pre");
462
462
  }
463
- function Kr(e, t) {
463
+ function Hr(e, t) {
464
464
  let n = new U(), r = {}, o = new nn(), i;
465
465
  function s(d) {
466
466
  let a = d.v === i ? d.w : d.v, c = o.priority(a);
@@ -484,13 +484,13 @@ function Kr(e, t) {
484
484
  }
485
485
  return n;
486
486
  }
487
- function Ur(e, t, n, r) {
488
- return Hr(e, t, n, r ?? ((o) => {
487
+ function Vr(e, t, n, r) {
488
+ return qr(e, t, n, r ?? ((o) => {
489
489
  let i = e.outEdges(o);
490
490
  return i ?? [];
491
491
  }));
492
492
  }
493
- function Hr(e, t, n, r) {
493
+ function qr(e, t, n, r) {
494
494
  if (n === void 0) return Se(e, t, n, r);
495
495
  let o = !1, i = e.nodes();
496
496
  for (let s = 0; s < i.length; s++) {
@@ -508,7 +508,7 @@ 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 Vr(e) {
511
+ function Xr(e) {
512
512
  let t = new U().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);
@@ -536,7 +536,7 @@ function we(e) {
536
536
  o !== void 0 && (t[o] || (t[o] = []), t[o][r.order] = n);
537
537
  }), t;
538
538
  }
539
- function qr(e) {
539
+ function Jr(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 qr(e) {
546
546
  Object.hasOwn(o, "rank") && (o.rank -= n);
547
547
  });
548
548
  }
549
- function Xr(e) {
549
+ function Zr(e) {
550
550
  let t = e.nodes().map((s) => e.node(s).rank).filter((s) => s !== void 0), n = X(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 Jr(e, t = dn) {
564
+ function Qr(e, t = dn) {
565
565
  let n = [];
566
566
  for (let r = 0; r < e.length; r += t) {
567
567
  let o = e.slice(r, r + t);
@@ -572,7 +572,7 @@ function Jr(e, t = dn) {
572
572
  var dn = 65535;
573
573
  function X(e, t) {
574
574
  if (t.length > dn) {
575
- let n = Jr(t);
575
+ let n = Qr(t);
576
576
  return e(...n.map((r) => e(...r)));
577
577
  } else return e(...t);
578
578
  }
@@ -583,7 +583,7 @@ function cn(e) {
583
583
  });
584
584
  return X(Math.max, t);
585
585
  }
586
- function Zr(e, t) {
586
+ function eo(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);
@@ -600,9 +600,9 @@ function fn(e, t) {
600
600
  function un(e, t) {
601
601
  return t();
602
602
  }
603
- var Qr = 0;
603
+ var to = 0;
604
604
  function Qe(e) {
605
- let t = ++Qr;
605
+ let t = ++to;
606
606
  return e + ("" + t);
607
607
  }
608
608
  function ye(e, t, n = 1) {
@@ -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 eo(e, t) {
625
+ function no(e, t) {
626
626
  return e.reduce((n, r, o) => (n[r] = t[o], n), {});
627
627
  }
628
- var je = "\0", to = "3.0.0", no = class {
628
+ var je = "\0", ro = "3.0.0", oo = class {
629
629
  constructor() {
630
- xr(this, "_sentinel");
630
+ _r(this, "_sentinel");
631
631
  let e = {};
632
632
  e._next = e._prev = e, this._sentinel = e;
633
633
  }
@@ -641,23 +641,23 @@ var je = "\0", to = "3.0.0", no = 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, ro)), n = n._prev;
644
+ for (; n !== t; ) e.push(JSON.stringify(n, io)), n = n._prev;
645
645
  return "[" + e.join(", ") + "]";
646
646
  }
647
647
  };
648
648
  function jt(e) {
649
649
  e._prev._next = e._next, e._next._prev = e._prev, delete e._next, delete e._prev;
650
650
  }
651
- function ro(e, t) {
651
+ function io(e, t) {
652
652
  if (e !== "_next" && e !== "_prev") return t;
653
653
  }
654
- var oo = no, io = () => 1;
655
- function so(e, t) {
654
+ var so = oo, lo = () => 1;
655
+ function ao(e, t) {
656
656
  if (e.nodeCount() <= 1) return [];
657
- let n = ao(e, t || io);
658
- return lo(n.graph, n.buckets, n.zeroIdx).flatMap((r) => e.outEdges(r.v, r.w) || []);
657
+ let n = fo(e, t || lo);
658
+ return co(n.graph, n.buckets, n.zeroIdx).flatMap((r) => e.outEdges(r.v, r.w) || []);
659
659
  }
660
- function lo(e, t, n) {
660
+ function co(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(); ) {
@@ -682,7 +682,7 @@ function Pe(e, t, n, r, o) {
682
682
  c.in -= d, He(t, n, c);
683
683
  }), e.removeNode(r.v), s;
684
684
  }
685
- function ao(e, t) {
685
+ function fo(e, t) {
686
686
  let n = new U(), 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 ao(e, t) {
692
692
  let f = n.node(l.v), h = n.node(l.w);
693
693
  o = Math.max(o, f.out += a), r = Math.max(r, h.in += a);
694
694
  });
695
- let i = co(o + r + 3).map(() => new oo()), s = r + 1;
695
+ let i = uo(o + r + 3).map(() => new so()), s = r + 1;
696
696
  return n.nodes().forEach((l) => {
697
697
  He(i, s, n.node(l));
698
698
  }), { graph: n, buckets: i, zeroIdx: s };
@@ -701,13 +701,13 @@ function He(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 co(e) {
704
+ function uo(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 fo(e) {
710
- (e.graph().acyclicer === "greedy" ? so(e, t(e)) : uo(e)).forEach((n) => {
709
+ function ho(e) {
710
+ (e.graph().acyclicer === "greedy" ? ao(e, t(e)) : go(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 fo(e) {
715
715
  return (r) => n.edge(r).weight;
716
716
  }
717
717
  }
718
- function uo(e) {
718
+ function go(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 uo(e) {
724
724
  }
725
725
  return e.nodes().forEach(o), t;
726
726
  }
727
- function ho(e) {
727
+ function po(e) {
728
728
  e.edges().forEach((t) => {
729
729
  let n = e.edge(t);
730
730
  if (n.reversed) {
@@ -734,10 +734,10 @@ function ho(e) {
734
734
  }
735
735
  });
736
736
  }
737
- function go(e) {
738
- e.graph().dummyChains = [], e.edges().forEach((t) => po(e, t));
737
+ function bo(e) {
738
+ e.graph().dummyChains = [], e.edges().forEach((t) => yo(e, t));
739
739
  }
740
- function po(e, t) {
740
+ function yo(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), d = l.labelRank;
742
742
  if (i === r + 1) return;
743
743
  e.removeEdge(t);
@@ -745,7 +745,7 @@ function po(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 }, a = ue(e, "edge", c, "_d"), r === d && (c.width = l.width, c.height = l.height, c.dummy = "edge-label", c.labelpos = l.labelpos), e.setEdge(n, a, { weight: l.weight }, s), f === 0 && e.graph().dummyChains.push(a), n = a;
746
746
  e.setEdge(n, o, { weight: l.weight }, s);
747
747
  }
748
- function bo(e) {
748
+ function mo(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 hn = yo;
769
- function yo(e) {
768
+ var hn = wo;
769
+ function wo(e) {
770
770
  let t = new U({ 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 (; mo(t, e) < o && (i = wo(t, e), !!i); ) s = t.hasNode(i.v) ? fe(e, i) : -fe(e, i), vo(t, e, s);
775
+ for (; vo(t, e) < o && (i = Eo(t, e), !!i); ) s = t.hasNode(i.v) ? fe(e, i) : -fe(e, i), ko(t, e, s);
776
776
  return t;
777
777
  }
778
- function mo(e, t) {
778
+ function vo(e, t) {
779
779
  function n(r) {
780
780
  let o = t.nodeEdges(r);
781
781
  o && o.forEach((i) => {
@@ -785,16 +785,16 @@ function mo(e, t) {
785
785
  }
786
786
  return e.nodes().forEach(n), e.nodeCount();
787
787
  }
788
- function wo(e, t) {
788
+ function Eo(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 vo(e, t, n) {
794
+ function ko(e, t, n) {
795
795
  e.nodes().forEach((r) => t.node(r).rank += n);
796
796
  }
797
- var { preorder: Eo, postorder: ko } = Ze, xo = ae;
797
+ var { preorder: xo, postorder: To } = Ze, _o = ae;
798
798
  ae.initLowLimValues = nt;
799
799
  ae.initCutValues = tt;
800
800
  ae.calcCutValue = gn;
@@ -802,17 +802,17 @@ ae.leaveEdge = bn;
802
802
  ae.enterEdge = yn;
803
803
  ae.exchangeEdges = mn;
804
804
  function ae(e) {
805
- e = Vr(e), et(e);
805
+ e = Xr(e), et(e);
806
806
  let t = hn(e);
807
807
  nt(t), tt(t, e);
808
808
  let n, r;
809
809
  for (; n = bn(t); ) r = yn(t, e, n), mn(t, e, n, r);
810
810
  }
811
811
  function tt(e, t) {
812
- let n = ko(e, e.nodes());
813
- n = n.slice(0, n.length - 1), n.forEach((r) => To(e, t, r));
812
+ let n = To(e, e.nodes());
813
+ n = n.slice(0, n.length - 1), n.forEach((r) => No(e, t, r));
814
814
  }
815
- function To(e, t, n) {
815
+ function No(e, t, n) {
816
816
  let r = e.node(n).parent, o = e.edge(n, r);
817
817
  o.cutvalue = gn(e, t, n);
818
818
  }
@@ -824,7 +824,7 @@ function gn(e, t, n) {
824
824
  let a = d.v === n, c = a ? d.w : d.v;
825
825
  if (c !== r) {
826
826
  let f = a === o, h = t.edge(d).weight;
827
- if (s += f ? h : -h, No(e, n, c)) {
827
+ if (s += f ? h : -h, Co(e, n, c)) {
828
828
  let g = e.edge(n, c).cutvalue;
829
829
  s += f ? -g : g;
830
830
  }
@@ -853,25 +853,25 @@ function yn(e, t, n) {
853
853
  }
854
854
  function mn(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), _o(e, t);
856
+ e.removeEdge(o, i), e.setEdge(r.v, r.w, {}), nt(e), tt(e, t), So(e, t);
857
857
  }
858
- function _o(e, t) {
858
+ function So(e, t) {
859
859
  let n = e.nodes().find((o) => !e.node(o).parent);
860
860
  if (!n) return;
861
- let r = Eo(e, [n]);
861
+ let r = xo(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 No(e, t, n) {
867
+ function Co(e, t, n) {
868
868
  return e.hasEdge(t, n);
869
869
  }
870
870
  function Mt(e, t, n) {
871
871
  return n.low <= t.lim && t.lim <= n.lim;
872
872
  }
873
- var So = Co;
874
- function Co(e) {
873
+ var Io = Oo;
874
+ function Oo(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 Co(e) {
879
879
  zt(e);
880
880
  break;
881
881
  case "tight-tree":
882
- Oo(e);
882
+ Mo(e);
883
883
  break;
884
884
  case "longest-path":
885
- Io(e);
885
+ jo(e);
886
886
  break;
887
887
  case "none":
888
888
  break;
@@ -890,18 +890,18 @@ function Co(e) {
890
890
  zt(e);
891
891
  }
892
892
  }
893
- var Io = et;
894
- function Oo(e) {
893
+ var jo = et;
894
+ function Mo(e) {
895
895
  et(e), hn(e);
896
896
  }
897
897
  function zt(e) {
898
- xo(e);
898
+ _o(e);
899
899
  }
900
- var jo = Mo;
901
- function Mo(e) {
902
- let t = Fo(e);
900
+ var zo = Fo;
901
+ function Fo(e) {
902
+ let t = Ao(e);
903
903
  e.graph().dummyChains.forEach((n) => {
904
- let r = e.node(n), o = r.edgeObj, i = zo(e, t, o.v, o.w), s = i.path, l = i.lca, d = 0, a = s[d], c = !0;
904
+ let r = e.node(n), o = r.edgeObj, i = Lo(e, t, o.v, o.w), s = i.path, l = i.lca, d = 0, a = s[d], c = !0;
905
905
  for (; n !== o.w; ) {
906
906
  if (r = e.node(n), c) {
907
907
  for (; (a = s[d]) !== l && e.node(a).maxRank < r.rank; ) d++;
@@ -915,7 +915,7 @@ function Mo(e) {
915
915
  }
916
916
  });
917
917
  }
918
- function zo(e, t, n, r) {
918
+ function Lo(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), d;
920
920
  d = n;
921
921
  do
@@ -925,7 +925,7 @@ function zo(e, t, n, r) {
925
925
  for (; (c = e.parent(c)) !== a; ) i.push(c);
926
926
  return { path: o.concat(i.reverse()), lca: a };
927
927
  }
928
- function Fo(e) {
928
+ function Ao(e) {
929
929
  let t = {}, n = 0;
930
930
  function r(o) {
931
931
  let i = n;
@@ -933,10 +933,10 @@ function Fo(e) {
933
933
  }
934
934
  return e.children(je).forEach(r), t;
935
935
  }
936
- function Lo(e) {
937
- let t = ue(e, "root", {}, "_root"), n = Ao(e), r = Object.values(n), o = X(Math.max, r) - 1, i = 2 * o + 1;
936
+ function Ro(e) {
937
+ let t = ue(e, "root", {}, "_root"), n = Do(e), r = Object.values(n), o = X(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 = Ro(e) + 1;
939
+ let s = Po(e) + 1;
940
940
  e.children(je).forEach((l) => wn(e, t, i, s, o, n, l)), e.graph().nodeRankFactor = i;
941
941
  }
942
942
  function wn(e, t, n, r, o, i, s) {
@@ -954,7 +954,7 @@ function wn(e, t, n, r, o, i, s) {
954
954
  e.setEdge(a, E, { weight: x, minlen: N, nestingEdge: !0 }), e.setEdge(b, c, { weight: x, minlen: N, nestingEdge: !0 });
955
955
  }), e.parent(s) || e.setEdge(t, a, { weight: 0, minlen: o + ((l = i[s]) != null ? l : 0) });
956
956
  }
957
- function Ao(e) {
957
+ function Do(e) {
958
958
  let t = {};
959
959
  function n(r, o) {
960
960
  let i = e.children(r);
@@ -962,17 +962,17 @@ function Ao(e) {
962
962
  }
963
963
  return e.children(je).forEach((r) => n(r, 1)), t;
964
964
  }
965
- function Ro(e) {
965
+ function Po(e) {
966
966
  return e.edges().reduce((t, n) => t + e.edge(n).weight, 0);
967
967
  }
968
- function Do(e) {
968
+ function Bo(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 Po = Bo;
975
- function Bo(e) {
974
+ var Wo = Go;
975
+ function Go(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,15 +986,15 @@ function Ft(e, t, n, r, o, i) {
986
986
  let s = { width: 0, height: 0, rank: i, borderType: t }, l = o[t][i - 1], d = ue(e, "border", s, n);
987
987
  o[t][i] = d, e.setParent(d, r), l && e.setEdge(l, d, { weight: 1 });
988
988
  }
989
- function Wo(e) {
989
+ function $o(e) {
990
990
  var t;
991
991
  let n = (t = e.graph().rankdir) == null ? void 0 : t.toLowerCase();
992
992
  (n === "lr" || n === "rl") && vn(e);
993
993
  }
994
- function Go(e) {
994
+ function Yo(e) {
995
995
  var t;
996
996
  let n = (t = e.graph().rankdir) == null ? void 0 : t.toLowerCase();
997
- (n === "bt" || n === "rl") && $o(e), (n === "lr" || n === "rl") && (Yo(e), vn(e));
997
+ (n === "bt" || n === "rl") && Ko(e), (n === "lr" || n === "rl") && (Uo(e), vn(e));
998
998
  }
999
999
  function vn(e) {
1000
1000
  e.nodes().forEach((t) => Lt(e.node(t))), e.edges().forEach((t) => Lt(e.edge(t)));
@@ -1003,7 +1003,7 @@ function Lt(e) {
1003
1003
  let t = e.width;
1004
1004
  e.width = e.height, e.height = t;
1005
1005
  }
1006
- function $o(e) {
1006
+ function Ko(e) {
1007
1007
  e.nodes().forEach((t) => Be(e.node(t))), e.edges().forEach((t) => {
1008
1008
  var n;
1009
1009
  let r = e.edge(t);
@@ -1013,7 +1013,7 @@ function $o(e) {
1013
1013
  function Be(e) {
1014
1014
  e.y = -e.y;
1015
1015
  }
1016
- function Yo(e) {
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,7 +1024,7 @@ function We(e) {
1024
1024
  let t = e.x;
1025
1025
  e.x = e.y, e.y = t;
1026
1026
  }
1027
- function Ko(e) {
1027
+ function Ho(e) {
1028
1028
  let t = {}, n = e.nodes().filter((l) => !e.children(l).length), r = n.map((l) => e.node(l).rank), o = X(Math.max, r), i = ye(o + 1).map(() => []);
1029
1029
  function s(l) {
1030
1030
  if (t[l]) return;
@@ -1036,13 +1036,13 @@ function Ko(e) {
1036
1036
  }
1037
1037
  return n.sort((l, d) => e.node(l).rank - e.node(d).rank).forEach(s), i;
1038
1038
  }
1039
- function Uo(e, t) {
1039
+ function Vo(e, t) {
1040
1040
  let n = 0;
1041
- for (let r = 1; r < t.length; ++r) n += Ho(e, t[r - 1], t[r]);
1041
+ for (let r = 1; r < t.length; ++r) n += qo(e, t[r - 1], t[r]);
1042
1042
  return n;
1043
1043
  }
1044
- function Ho(e, t, n) {
1045
- let r = eo(n, n.map((a, c) => c)), o = t.flatMap((a) => {
1044
+ function qo(e, t, n) {
1045
+ let r = no(n, n.map((a, c) => c)), o = t.flatMap((a) => {
1046
1046
  let c = e.outEdges(a);
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 Ho(e, t, n) {
1058
1058
  d += a.weight * f;
1059
1059
  }), d;
1060
1060
  }
1061
- function Vo(e, t = []) {
1061
+ function Xo(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 Vo(e, t = []) {
1071
1071
  }
1072
1072
  });
1073
1073
  }
1074
- function qo(e, t) {
1074
+ function Jo(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 qo(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 Xo(r);
1084
+ return Zo(r);
1085
1085
  }
1086
- function Xo(e) {
1086
+ function Zo(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) && Jo(o, i);
1090
+ i.merged || (i.barycenter === void 0 || o.barycenter === void 0 || i.barycenter >= o.barycenter) && Qo(o, i);
1091
1091
  };
1092
1092
  }
1093
1093
  function r(o) {
@@ -1101,13 +1101,13 @@ function Xo(e) {
1101
1101
  }
1102
1102
  return t.filter((o) => !o.merged).map((o) => Ie(o, ["vs", "i", "barycenter", "weight"]));
1103
1103
  }
1104
- function Jo(e, t) {
1104
+ function Qo(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 Zo(e, t) {
1109
- let n = Zr(e, (c) => Object.hasOwn(c, "barycenter")), r = n.lhs, o = n.rhs.sort((c, f) => f.i - c.i), i = [], s = 0, l = 0, d = 0;
1110
- r.sort(Qo(!!t)), d = At(i, o, d), r.forEach((c) => {
1108
+ function ei(e, t) {
1109
+ let n = eo(e, (c) => Object.hasOwn(c, "barycenter")), r = n.lhs, o = n.rhs.sort((c, f) => f.i - c.i), i = [], s = 0, l = 0, d = 0;
1110
+ r.sort(ti(!!t)), d = At(i, o, d), r.forEach((c) => {
1111
1111
  d += c.vs.length, i.push(c.vs), s += c.barycenter * c.weight, l += c.weight, d = At(i, o, d);
1112
1112
  });
1113
1113
  let a = { vs: i.flat(1) };
@@ -1118,22 +1118,22 @@ function At(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 Qo(e) {
1121
+ function ti(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
1124
  function En(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, d = {};
1126
1126
  s && (o = o.filter((h) => h !== s && h !== l));
1127
- let a = Vo(e, o);
1127
+ let a = Xo(e, o);
1128
1128
  a.forEach((h) => {
1129
1129
  if (e.children(h.v).length) {
1130
1130
  let g = En(e, h.v, n, r);
1131
- d[h.v] = g, Object.hasOwn(g, "barycenter") && ti(h, g);
1131
+ d[h.v] = g, Object.hasOwn(g, "barycenter") && ri(h, g);
1132
1132
  }
1133
1133
  });
1134
- let c = qo(a, n);
1135
- ei(c, d);
1136
- let f = Zo(c, r);
1134
+ let c = Jo(a, n);
1135
+ ni(c, d);
1136
+ let f = ei(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 ei(e, t) {
1147
+ function ni(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 ti(e, t) {
1152
+ function ri(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 ni(e, t, n, r) {
1155
+ function oi(e, t, n, r) {
1156
1156
  r || (r = e.nodes());
1157
- let o = ri(e), i = new U({ compound: !0 }).setGraph({ root: o }).setDefaultNodeLabel((s) => e.node(s));
1157
+ let o = ii(e), i = new U({ compound: !0 }).setGraph({ root: o }).setDefaultNodeLabel((s) => e.node(s));
1158
1158
  return r.forEach((s) => {
1159
1159
  let l = e.node(s), d = e.parent(s);
1160
1160
  if (l.rank === t || l.minRank <= t && t <= l.maxRank) {
@@ -1167,12 +1167,12 @@ function ni(e, t, n, r) {
1167
1167
  }
1168
1168
  }), i;
1169
1169
  }
1170
- function ri(e) {
1170
+ function ii(e) {
1171
1171
  let t;
1172
1172
  for (; e.hasNode(t = Qe("_root")); ) ;
1173
1173
  return t;
1174
1174
  }
1175
- function oi(e, t, n) {
1175
+ function si(e, t, n) {
1176
1176
  let r = {}, o;
1177
1177
  n.forEach((i) => {
1178
1178
  let s = e.parent(i), l, d;
@@ -1190,12 +1190,12 @@ function kn(e, t = {}) {
1190
1190
  t.customOrder(e, kn);
1191
1191
  return;
1192
1192
  }
1193
- let n = cn(e), r = Rt(e, ye(1, n + 1), "inEdges"), o = Rt(e, ye(n - 1, -1, -1), "outEdges"), i = Ko(e);
1193
+ let n = cn(e), r = Rt(e, ye(1, n + 1), "inEdges"), o = Rt(e, ye(n - 1, -1, -1), "outEdges"), i = Ho(e);
1194
1194
  if (Dt(e, i), t.disableOptimalOrderHeuristic) return;
1195
1195
  let s = Number.POSITIVE_INFINITY, l, d = t.constraints || [];
1196
1196
  for (let a = 0, c = 0; c < 4; ++a, ++c) {
1197
- ii(a % 2 ? r : o, a % 4 >= 2, d), i = we(e);
1198
- let f = Uo(e, i);
1197
+ li(a % 2 ? r : o, a % 4 >= 2, d), i = we(e);
1198
+ let f = Vo(e, i);
1199
1199
  f < s ? (c = 0, l = Object.assign({}, i), s = f) : f === s && (l = structuredClone(i));
1200
1200
  }
1201
1201
  Dt(e, l);
@@ -1209,26 +1209,26 @@ function Rt(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 ni(e, i, n, r.get(i) || []);
1212
+ return oi(e, i, n, r.get(i) || []);
1213
1213
  });
1214
1214
  }
1215
- function ii(e, t, n) {
1215
+ function li(e, t, n) {
1216
1216
  let r = new U();
1217
1217
  e.forEach(function(o) {
1218
1218
  n.forEach((l) => r.setEdge(l.left, l.right));
1219
1219
  let i = o.graph().root, s = En(o, i, r, t);
1220
- s.vs.forEach((l, d) => o.node(l).order = d), oi(o, r, s.vs);
1220
+ s.vs.forEach((l, d) => o.node(l).order = d), si(o, r, s.vs);
1221
1221
  });
1222
1222
  }
1223
1223
  function Dt(e, t) {
1224
1224
  Object.values(t).forEach((n) => n.forEach((r, o) => e.node(r).order = o));
1225
1225
  }
1226
- function si(e, t) {
1226
+ function ai(e, t) {
1227
1227
  let n = {};
1228
1228
  function r(o, i) {
1229
1229
  let s = 0, l = 0, d = o.length, a = i[i.length - 1];
1230
1230
  return i.forEach((c, f) => {
1231
- let h = ai(e, c), g = h ? e.node(h).order : d;
1231
+ let h = ci(e, c), g = h ? e.node(h).order : d;
1232
1232
  (h || c === a) && (i.slice(l, f + 1).forEach((p) => {
1233
1233
  let E = e.predecessors(p);
1234
1234
  E && E.forEach((b) => {
@@ -1240,7 +1240,7 @@ function si(e, t) {
1240
1240
  }
1241
1241
  return t.length && t.reduce(r), n;
1242
1242
  }
1243
- function li(e, t) {
1243
+ function di(e, t) {
1244
1244
  let n = {};
1245
1245
  function r(i, s, l, d, a) {
1246
1246
  ye(s, l).forEach((c) => {
@@ -1271,7 +1271,7 @@ function li(e, t) {
1271
1271
  }
1272
1272
  return t.length && t.reduce(o), n;
1273
1273
  }
1274
- function ai(e, t) {
1274
+ function ci(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);
@@ -1285,7 +1285,7 @@ function xn(e, t, n) {
1285
1285
  let r = e[t];
1286
1286
  r || (e[t] = r = {}), r[n] = !0;
1287
1287
  }
1288
- function di(e, t, n) {
1288
+ function fi(e, t, n) {
1289
1289
  if (t > n) {
1290
1290
  let o = t;
1291
1291
  t = n, n = o;
@@ -1293,7 +1293,7 @@ function di(e, t, n) {
1293
1293
  let r = e[t];
1294
1294
  return r !== void 0 && Object.hasOwn(r, n);
1295
1295
  }
1296
- function ci(e, t, n, r) {
1296
+ function ui(e, t, n, r) {
1297
1297
  let o = {}, i = {}, s = {};
1298
1298
  return t.forEach((l) => {
1299
1299
  l.forEach((d, a) => {
@@ -1312,7 +1312,7 @@ function ci(e, t, n, r) {
1312
1312
  let E = f[g];
1313
1313
  if (E === void 0) continue;
1314
1314
  let b = s[E];
1315
- if (b !== void 0 && i[a] === a && d < b && !di(n, a, E)) {
1315
+ if (b !== void 0 && i[a] === a && d < b && !fi(n, a, E)) {
1316
1316
  let x = o[E];
1317
1317
  x !== void 0 && (i[E] = a, i[a] = o[a] = x, d = b);
1318
1318
  }
@@ -1321,8 +1321,8 @@ function ci(e, t, n, r) {
1321
1321
  });
1322
1322
  }), { root: o, align: i };
1323
1323
  }
1324
- function fi(e, t, n, r, o = !1) {
1325
- let i = {}, s = ui(e, t, n, o), l = o ? "borderLeft" : "borderRight";
1324
+ function hi(e, t, n, r, o = !1) {
1325
+ let i = {}, s = gi(e, t, n, o), l = o ? "borderLeft" : "borderRight";
1326
1326
  function d(g, p) {
1327
1327
  let E = s.nodes().slice(), b = {}, x = E.pop();
1328
1328
  for (; x; ) {
@@ -1363,8 +1363,8 @@ function fi(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 ui(e, t, n, r) {
1367
- let o = new U(), i = e.graph(), s = yi(i.nodesep, i.edgesep, r);
1366
+ function gi(e, t, n, r) {
1367
+ let o = new U(), i = e.graph(), s = wi(i.nodesep, i.edgesep, r);
1368
1368
  return t.forEach((l) => {
1369
1369
  let d;
1370
1370
  l.forEach((a) => {
@@ -1382,18 +1382,18 @@ function ui(e, t, n, r) {
1382
1382
  });
1383
1383
  }), o;
1384
1384
  }
1385
- function hi(e, t) {
1385
+ function pi(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, d]) => {
1389
- let a = mi(e, l) / 2;
1389
+ let a = vi(e, l) / 2;
1390
1390
  o = Math.max(d + a, o), i = Math.min(d - a, 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 gi(e, t) {
1396
+ function bi(e, t) {
1397
1397
  let n = Object.values(t), r = X(Math.min, n), o = X(Math.max, n);
1398
1398
  ["u", "d"].forEach((i) => {
1399
1399
  ["l", "r"].forEach((s) => {
@@ -1404,7 +1404,7 @@ function gi(e, t) {
1404
1404
  });
1405
1405
  });
1406
1406
  }
1407
- function pi(e, t = void 0) {
1407
+ function yi(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 pi(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 bi(e) {
1423
- let t = we(e), n = Object.assign(si(e, t), li(e, t)), r = {}, o;
1422
+ function mi(e) {
1423
+ let t = we(e), n = Object.assign(ai(e, t), di(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 d = ci(e, o, n, (c) => (s === "u" ? e.predecessors(c) : e.successors(c)) || []), a = fi(e, o, d.root, d.align, l === "r");
1427
+ let d = ui(e, o, n, (c) => (s === "u" ? e.predecessors(c) : e.successors(c)) || []), a = hi(e, o, d.root, d.align, l === "r");
1428
1428
  l === "r" && (a = Oe(a, (c) => -c)), r[s + l] = a;
1429
1429
  });
1430
1430
  });
1431
- let i = hi(e, r);
1432
- return gi(r, i), pi(r, e.graph().align);
1431
+ let i = pi(e, r);
1432
+ return bi(r, i), yi(r, e.graph().align);
1433
1433
  }
1434
- function yi(e, t, n) {
1434
+ function wi(e, t, n) {
1435
1435
  return (r, o, i) => {
1436
1436
  let s = r.node(o), l = r.node(i), d = 0, a;
1437
1437
  if (d += s.width / 2, Object.hasOwn(s, "labelpos")) switch (s.labelpos.toLowerCase()) {
@@ -1453,13 +1453,13 @@ function yi(e, t, n) {
1453
1453
  return a && (d += n ? a : -a), d;
1454
1454
  };
1455
1455
  }
1456
- function mi(e, t) {
1456
+ function vi(e, t) {
1457
1457
  return e.node(t).width;
1458
1458
  }
1459
- function wi(e) {
1460
- e = an(e), vi(e), Object.entries(bi(e)).forEach(([t, n]) => e.node(t).x = n);
1459
+ function Ei(e) {
1460
+ e = an(e), ki(e), Object.entries(mi(e)).forEach(([t, n]) => e.node(t).x = n);
1461
1461
  }
1462
- function vi(e) {
1462
+ function ki(e) {
1463
1463
  let t = we(e), n = e.graph(), r = n.ranksep, o = n.rankalign, i = 0;
1464
1464
  t.forEach((s) => {
1465
1465
  let l = s.reduce((d, a) => {
@@ -1473,17 +1473,17 @@ function vi(e) {
1473
1473
  }), i += l + r;
1474
1474
  });
1475
1475
  }
1476
- function Ei(e, t = {}) {
1476
+ function xi(e, t = {}) {
1477
1477
  let n = t.debugTiming ? fn : un;
1478
1478
  return n("layout", () => {
1479
- let r = n(" buildLayoutGraph", () => ji(e));
1480
- return n(" runLayout", () => ki(r, n, t)), n(" updateInputGraph", () => xi(e, r)), r;
1479
+ let r = n(" buildLayoutGraph", () => zi(e));
1480
+ return n(" runLayout", () => Ti(r, n, t)), n(" updateInputGraph", () => _i(e, r)), r;
1481
1481
  });
1482
1482
  }
1483
- function ki(e, t, n) {
1484
- t(" makeSpaceForEdgeLabels", () => Mi(e)), t(" removeSelfEdges", () => Wi(e)), t(" acyclic", () => fo(e)), t(" nestingGraph.run", () => Lo(e)), t(" rank", () => So(an(e))), t(" injectEdgeLabelProxies", () => zi(e)), t(" removeEmptyRanks", () => Xr(e)), t(" nestingGraph.cleanup", () => Do(e)), t(" normalizeRanks", () => qr(e)), t(" assignRankMinMax", () => Fi(e)), t(" removeEdgeLabelProxies", () => Li(e)), t(" normalize.run", () => go(e)), t(" parentDummyChains", () => jo(e)), t(" addBorderSegments", () => Po(e)), t(" order", () => kn(e, n)), t(" insertSelfEdges", () => Gi(e)), t(" adjustCoordinateSystem", () => Wo(e)), t(" position", () => wi(e)), t(" positionSelfEdges", () => $i(e)), t(" removeBorderNodes", () => Bi(e)), t(" normalize.undo", () => bo(e)), t(" fixupEdgeLabelCoords", () => Di(e)), t(" undoCoordinateSystem", () => Go(e)), t(" translateGraph", () => Ai(e)), t(" assignNodeIntersects", () => Ri(e)), t(" reversePoints", () => Pi(e)), t(" acyclic.undo", () => ho(e));
1483
+ function Ti(e, t, n) {
1484
+ t(" makeSpaceForEdgeLabels", () => Fi(e)), t(" removeSelfEdges", () => $i(e)), t(" acyclic", () => ho(e)), t(" nestingGraph.run", () => Ro(e)), t(" rank", () => Io(an(e))), t(" injectEdgeLabelProxies", () => Li(e)), t(" removeEmptyRanks", () => Zr(e)), t(" nestingGraph.cleanup", () => Bo(e)), t(" normalizeRanks", () => Jr(e)), t(" assignRankMinMax", () => Ai(e)), t(" removeEdgeLabelProxies", () => Ri(e)), t(" normalize.run", () => bo(e)), t(" parentDummyChains", () => zo(e)), t(" addBorderSegments", () => Wo(e)), t(" order", () => kn(e, n)), t(" insertSelfEdges", () => Yi(e)), t(" adjustCoordinateSystem", () => $o(e)), t(" position", () => Ei(e)), t(" positionSelfEdges", () => Ki(e)), t(" removeBorderNodes", () => Gi(e)), t(" normalize.undo", () => mo(e)), t(" fixupEdgeLabelCoords", () => Bi(e)), t(" undoCoordinateSystem", () => Yo(e)), t(" translateGraph", () => Di(e)), t(" assignNodeIntersects", () => Pi(e)), t(" reversePoints", () => Wi(e)), t(" acyclic.undo", () => po(e));
1485
1485
  }
1486
- function xi(e, t) {
1486
+ function _i(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,11 +1492,11 @@ function xi(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 Ti = ["nodesep", "edgesep", "ranksep", "marginx", "marginy"], _i = { ranksep: 50, edgesep: 20, nodesep: 50, rankdir: "TB", rankalign: "center" }, Ni = ["acyclicer", "ranker", "rankdir", "align", "rankalign"], Si = ["width", "height", "rank"], Pt = { width: 0, height: 0 }, Ci = ["minlen", "weight", "width", "height", "labeloffset"], Ii = { minlen: 1, weight: 1, width: 0, height: 0, labeloffset: 10, labelpos: "r" }, Oi = ["labelpos"];
1496
- function ji(e) {
1495
+ var Ni = ["nodesep", "edgesep", "ranksep", "marginx", "marginy"], Si = { ranksep: 50, edgesep: 20, nodesep: 50, rankdir: "TB", rankalign: "center" }, Ci = ["acyclicer", "ranker", "rankdir", "align", "rankalign"], Ii = ["width", "height", "rank"], Pt = { width: 0, height: 0 }, Oi = ["minlen", "weight", "width", "height", "labeloffset"], ji = { minlen: 1, weight: 1, width: 0, height: 0, labeloffset: 10, labelpos: "r" }, Mi = ["labelpos"];
1496
+ function zi(e) {
1497
1497
  let t = new U({ multigraph: !0, compound: !0 }), n = $e(e.graph());
1498
- return t.setGraph(Object.assign({}, _i, Ge(n, Ti), Ie(n, Ni))), e.nodes().forEach((r) => {
1499
- let o = $e(e.node(r)), i = Ge(o, Si);
1498
+ return t.setGraph(Object.assign({}, Si, Ge(n, Ni), Ie(n, Ci))), e.nodes().forEach((r) => {
1499
+ let o = $e(e.node(r)), i = Ge(o, Ii);
1500
1500
  Object.keys(Pt).forEach((l) => {
1501
1501
  i[l] === void 0 && (i[l] = Pt[l]);
1502
1502
  }), t.setNode(r, i);
@@ -1504,17 +1504,17 @@ function ji(e) {
1504
1504
  s !== void 0 && t.setParent(r, s);
1505
1505
  }), e.edges().forEach((r) => {
1506
1506
  let o = $e(e.edge(r));
1507
- t.setEdge(r, Object.assign({}, Ii, Ge(o, Ci), Ie(o, Oi)));
1507
+ t.setEdge(r, Object.assign({}, ji, Ge(o, Oi), Ie(o, Mi)));
1508
1508
  }), t;
1509
1509
  }
1510
- function Mi(e) {
1510
+ function Fi(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 zi(e) {
1517
+ function Li(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 zi(e) {
1523
1523
  }
1524
1524
  });
1525
1525
  }
1526
- function Fi(e) {
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 Li(e) {
1533
+ function Ri(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 Li(e) {
1539
1539
  }
1540
1540
  });
1541
1541
  }
1542
- function Ai(e) {
1542
+ function Di(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 d(a) {
1545
1545
  let c = a.x, f = a.y, h = a.width, g = a.height;
@@ -1558,13 +1558,13 @@ function Ai(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 Ri(e) {
1561
+ function Pi(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 Di(e) {
1567
+ function Bi(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 Di(e) {
1577
1577
  }
1578
1578
  });
1579
1579
  }
1580
- function Pi(e) {
1580
+ function Wi(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 Bi(e) {
1586
+ function Gi(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 Bi(e) {
1593
1593
  e.node(t).dummy === "border" && e.removeNode(t);
1594
1594
  });
1595
1595
  }
1596
- function Wi(e) {
1596
+ function $i(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 Wi(e) {
1601
1601
  }
1602
1602
  });
1603
1603
  }
1604
- function Gi(e) {
1604
+ function Yi(e) {
1605
1605
  we(e).forEach((t) => {
1606
1606
  let n = 0;
1607
1607
  t.forEach((r, o) => {
@@ -1612,7 +1612,7 @@ function Gi(e) {
1612
1612
  });
1613
1613
  });
1614
1614
  }
1615
- function $i(e) {
1615
+ function Ki(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 $e(e) {
1630
1630
  typeof n == "string" && (n = n.toLowerCase()), t[n] = r;
1631
1631
  }), t;
1632
1632
  }
1633
- function Yi(e) {
1633
+ function Ui(e) {
1634
1634
  let t = we(e), n = new U({ 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 Yi(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 Ki = { graphlib: Zt, version: to, layout: Ei, debug: Yi, util: { time: fn, notime: un } }, Bt = Ki;
1642
+ var Hi = { graphlib: Zt, version: ro, layout: xi, debug: Ui, util: { time: fn, notime: un } }, Bt = Hi;
1643
1643
  /*! For license information please see dagre.esm.js.LEGAL.txt */
1644
- const Ui = (e) => {
1644
+ const Vi = (e) => {
1645
1645
  const t = [];
1646
1646
  return e.nodeInternals.forEach((n, r) => t.push(`${r}:${n.height ?? 0}`)), t.join(",");
1647
- }, Hi = ({ onHeightsReady: e, nodeCount: t }) => {
1648
- const n = Dn(Ui), r = Tt("");
1647
+ }, qi = ({ onHeightsReady: e, nodeCount: t }) => {
1648
+ const n = Pn(Vi), r = Tt("");
1649
1649
  Tt(0);
1650
- const { fitView: o } = Pn();
1650
+ const { fitView: o } = Bn();
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
- }, Vi = {
1660
+ }, Xi = {
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 qi({
1666
+ function Ji({
1667
1667
  workflowName: e,
1668
1668
  onWorkflowNameChange: t,
1669
1669
  status: n,
@@ -1686,7 +1686,7 @@ function qi({
1686
1686
  a(!1);
1687
1687
  }
1688
1688
  }
1689
- }, E = Vi[r] ?? {
1689
+ }, E = Xi[r] ?? {
1690
1690
  bg: r,
1691
1691
  fg: "#fff"
1692
1692
  };
@@ -1816,15 +1816,15 @@ const Me = ({ isOpen: e, onClose: t, title: n, icon: r, children: o, footer: i,
1816
1816
  const [l, d] = j(!1), a = () => d((h) => !h), c = () => /* @__PURE__ */ w(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(_t, { onClick: a, size: "small", sx: { mr: 1 }, title: l ? "Collapse" : "Expand", "data-testid": "expand-collapse-base-drawer-btn", children: l ? /* @__PURE__ */ u(pr, {}) : /* @__PURE__ */ u(br, {}) }),
1820
- /* @__PURE__ */ u(_t, { onClick: t, size: "small", "data-testid": "close-drawer-button", children: /* @__PURE__ */ u(er, {}) })
1819
+ /* @__PURE__ */ u(_t, { onClick: a, size: "small", sx: { mr: 1 }, title: l ? "Collapse" : "Expand", "data-testid": "expand-collapse-base-drawer-btn", children: l ? /* @__PURE__ */ u(br, {}) : /* @__PURE__ */ u(yr, {}) }),
1820
+ /* @__PURE__ */ u(_t, { onClick: t, size: "small", "data-testid": "close-drawer-button", children: /* @__PURE__ */ u(tr, {}) })
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__ */ w(Xn, { open: e, onClose: t, maxWidth: !1, fullWidth: !0, PaperProps: { sx: { display: "flex", flexDirection: "column", height: "80vh", boxShadow: 24, width: "750px", maxWidth: "100%" } }, children: [
1822
+ return l ? /* @__PURE__ */ w(Jn, { 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__ */ w(
1827
- Jn,
1827
+ Zn,
1828
1828
  {
1829
1829
  anchor: "right",
1830
1830
  open: e,
@@ -1854,7 +1854,7 @@ const Me = ({ isOpen: e, onClose: t, title: n, icon: r, children: o, footer: i,
1854
1854
  ]
1855
1855
  }
1856
1856
  );
1857
- }, Xi = ({
1857
+ }, Zi = ({
1858
1858
  open: e,
1859
1859
  templates: t,
1860
1860
  messages: n,
@@ -1908,7 +1908,7 @@ const Me = ({ isOpen: e, onClose: t, title: n, icon: r, children: o, footer: i,
1908
1908
  isOpen: e,
1909
1909
  onClose: o,
1910
1910
  title: z ? d.label : n.addTriggerTitle,
1911
- icon: /* @__PURE__ */ u(gr, {}),
1911
+ icon: /* @__PURE__ */ u(pr, {}),
1912
1912
  width: 500,
1913
1913
  footer: W,
1914
1914
  children: /* @__PURE__ */ w(Q, { sx: { p: 2 }, children: [
@@ -1933,7 +1933,7 @@ const Me = ({ isOpen: e, onClose: t, title: n, icon: r, children: o, footer: i,
1933
1933
  D.currentTarget.style.background = "";
1934
1934
  },
1935
1935
  children: [
1936
- /* @__PURE__ */ u("div", { style: { color: F.triggerCategory === "scheduler" ? "#1976d2" : "#f57c00", marginTop: 2, flexShrink: 0 }, children: F.triggerCategory === "scheduler" ? /* @__PURE__ */ u(tr, { size: 18 }) : /* @__PURE__ */ u(nr, { size: 18 }) }),
1936
+ /* @__PURE__ */ u("div", { style: { color: F.triggerCategory === "scheduler" ? "#1976d2" : "#f57c00", marginTop: 2, flexShrink: 0 }, children: F.triggerCategory === "scheduler" ? /* @__PURE__ */ u(nr, { size: 18 }) : /* @__PURE__ */ u(rr, { size: 18 }) }),
1937
1937
  /* @__PURE__ */ w("div", { children: [
1938
1938
  /* @__PURE__ */ u("div", { style: { fontSize: 14, fontWeight: 500, color: "#212121" }, children: F.label }),
1939
1939
  F.description && /* @__PURE__ */ u("div", { style: { fontSize: 12, color: "#757575", marginTop: 2 }, children: F.description })
@@ -1945,7 +1945,7 @@ const Me = ({ 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__ */ w(Q, { sx: { display: "flex", alignItems: "center", gap: 1, mt: 2, fontSize: 12, color: "#64748b" }, children: [
1948
- /* @__PURE__ */ u(Zn, { size: 14 }),
1948
+ /* @__PURE__ */ u(Qn, { size: 14 }),
1949
1949
  /* @__PURE__ */ u("span", { children: "Loading sources for the selected trigger…" })
1950
1950
  ] }),
1951
1951
  b && /* @__PURE__ */ u("p", { style: { fontSize: 12, color: "#d32f2f", marginTop: 12 }, children: b })
@@ -1974,7 +1974,7 @@ const Me = ({ isOpen: e, onClose: t, title: n, icon: r, children: o, footer: i,
1974
1974
  ":"
1975
1975
  ] }),
1976
1976
  /* @__PURE__ */ u(
1977
- Qn,
1977
+ er,
1978
1978
  {
1979
1979
  isMulti: !0,
1980
1980
  options: c,
@@ -1983,7 +1983,7 @@ const Me = ({ 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: yr(!1, !0)
1986
+ styles: mr(!1, !0)
1987
1987
  }
1988
1988
  )
1989
1989
  ] })
@@ -1993,7 +1993,7 @@ const Me = ({ 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", Ji = ({ open: e, availableDescriptors: t, messages: n, onSelect: r, onClose: o }) => {
1996
+ }, Ke = "ff-p-3 ff-rounded ff-border ff-d-flex ff-align-items-center ff-gap-3", Qi = ({ 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 Me = ({ 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 : a.label,
2025
- icon: c ? /* @__PURE__ */ u(rr, {}) : a.icon ?? /* @__PURE__ */ u(or, {}),
2025
+ icon: c ? /* @__PURE__ */ u(or, {}) : a.icon ?? /* @__PURE__ */ u(ir, {}),
2026
2026
  width: 500,
2027
2027
  children: /* @__PURE__ */ w(Q, { sx: { p: 2 }, children: [
2028
2028
  !c && /* @__PURE__ */ w(
@@ -2127,7 +2127,7 @@ const Me = ({ isOpen: e, onClose: t, title: n, icon: r, children: o, footer: i,
2127
2127
  ] })
2128
2128
  }
2129
2129
  );
2130
- }, Wt = "_conditionConfig", Zi = ({ open: e, nodeId: t, descriptor: n, initialValues: r, messages: o, onSave: i, onClose: s }) => {
2130
+ }, Wt = "_conditionConfig", es = ({ open: e, nodeId: t, descriptor: n, initialValues: r, messages: o, onSave: i, onClose: s }) => {
2131
2131
  const [l, d] = j([]), [a, c] = j(!1), [f, h] = j(null), [g, p] = j({});
2132
2132
  re(() => {
2133
2133
  p((r == null ? void 0 : r[Wt]) ?? {});
@@ -2164,7 +2164,7 @@ const Me = ({ isOpen: e, onClose: t, title: n, icon: r, children: o, footer: i,
2164
2164
  !a && f && /* @__PURE__ */ u("p", { style: { fontSize: 13, color: "#d32f2f" }, children: f }),
2165
2165
  !a && !f && l.length === 0 && /* @__PURE__ */ u("p", { className: "ff-text-muted", style: { fontSize: 13 }, children: o.noConfigurationNeeded }),
2166
2166
  b && /* @__PURE__ */ u(
2167
- mr,
2167
+ wr,
2168
2168
  {
2169
2169
  schema: { layout: "flat", fields: l },
2170
2170
  initialValues: r ?? {},
@@ -2181,7 +2181,7 @@ const Me = ({ isOpen: e, onClose: t, title: n, icon: r, children: o, footer: i,
2181
2181
  ] })
2182
2182
  }
2183
2183
  );
2184
- }, Qi = ({
2184
+ }, ts = ({
2185
2185
  isOpen: e,
2186
2186
  onClose: t,
2187
2187
  workflowId: n,
@@ -2201,7 +2201,7 @@ const Me = ({ isOpen: e, onClose: t, title: n, icon: r, children: o, footer: i,
2201
2201
  isOpen: e,
2202
2202
  onClose: t,
2203
2203
  title: r ? `Preview: ${r}` : "Sub-Workflow Preview",
2204
- icon: /* @__PURE__ */ u(sr, { size: 18, color: "#00695c" }),
2204
+ icon: /* @__PURE__ */ u(lr, { size: 18, color: "#00695c" }),
2205
2205
  width: 700,
2206
2206
  children: /* @__PURE__ */ w("div", { style: { height: "100%", display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", padding: 24 }, children: [
2207
2207
  i.status === "idle" && /* @__PURE__ */ u("span", { style: { color: "#9e9e9e", fontSize: 14 }, children: "Select a workflow to preview" }),
@@ -2211,20 +2211,20 @@ const Me = ({ isOpen: e, onClose: t, title: n, icon: r, children: o, footer: i,
2211
2211
  /* @__PURE__ */ u("style", { children: "@keyframes spin { to { transform: rotate(360deg); } }" })
2212
2212
  ] }),
2213
2213
  i.status === "error" && /* @__PURE__ */ w("div", { style: { textAlign: "center", color: "#c62828" }, children: [
2214
- /* @__PURE__ */ u(ir, { size: 32, style: { marginBottom: 8 } }),
2214
+ /* @__PURE__ */ u(sr, { size: 32, style: { marginBottom: 8 } }),
2215
2215
  /* @__PURE__ */ u("p", { style: { margin: 0, fontSize: 14 }, children: i.message })
2216
2216
  ] }),
2217
- i.status === "loaded" && /* @__PURE__ */ u("div", { style: { width: "100%", flex: 1 }, children: /* @__PURE__ */ u(es, { state: i.state }) })
2217
+ i.status === "loaded" && /* @__PURE__ */ u("div", { style: { width: "100%", flex: 1 }, children: /* @__PURE__ */ u(ns, { state: i.state }) })
2218
2218
  ] })
2219
2219
  }
2220
2220
  );
2221
- }, es = ({ state: e }) => {
2221
+ }, ns = ({ state: e }) => {
2222
2222
  const [t, n] = j(null), [r, o] = j(null);
2223
2223
  return re(() => {
2224
2224
  Promise.all([
2225
- Promise.resolve().then(() => ss).then((i) => i.default),
2226
- import("./index-Dcur-XJ9.js").then((i) => i.nodeTypeRegistry),
2227
- import("./index-B6xrei80.js").then((i) => i.templateRegistry)
2225
+ Promise.resolve().then(() => as).then((i) => i.default),
2226
+ import("./nodeRegistry.js").then((i) => i.nodeTypeRegistry),
2227
+ import("./templateRegistry.js").then((i) => i.templateRegistry)
2228
2228
  ]).then(([i, s, l]) => {
2229
2229
  n(() => i), o({ nodeTypeRegistry: s, templateRegistry: l });
2230
2230
  });
@@ -2247,12 +2247,12 @@ const Me = ({ isOpen: e, onClose: t, title: n, icon: r, children: o, footer: i,
2247
2247
  approvalNode: 90,
2248
2248
  delayNode: 80,
2249
2249
  notificationNode: 80
2250
- }, ts = {
2251
- plusEdge: Vn,
2252
- labelPlusEdge: Hn,
2253
- plainEdge: Un,
2254
- edgeWithPlusLabel: Kn,
2255
- gatewayBranchEdge: Yn
2250
+ }, rs = {
2251
+ plusEdge: qn,
2252
+ labelPlusEdge: Vn,
2253
+ plainEdge: Hn,
2254
+ edgeWithPlusLabel: Un,
2255
+ gatewayBranchEdge: Kn
2256
2256
  };
2257
2257
  function Gt() {
2258
2258
  return [
@@ -2261,7 +2261,7 @@ function Gt() {
2261
2261
  { id: "end", kind: "end", reactFlowType: "endNode" }
2262
2262
  ];
2263
2263
  }
2264
- function ns(e, t, n, r = "TB") {
2264
+ function os(e, t, n, r = "TB") {
2265
2265
  const o = new Bt.graphlib.Graph();
2266
2266
  return o.setGraph({ rankdir: r, ranksep: 70, nodesep: 50 }), o.setDefaultEdgeLabel(() => ({})), e.forEach((i) => {
2267
2267
  const s = n[i.id] ?? { width: me, height: Xe[i.type ?? ""] ?? 80 };
@@ -2273,7 +2273,7 @@ function ns(e, t, n, r = "TB") {
2273
2273
  });
2274
2274
  }
2275
2275
  const le = (e) => e === "filter" || e === "approval";
2276
- function rs(e, t, n, r) {
2276
+ function is(e, t, n, r) {
2277
2277
  const s = Ve, l = 30, d = 30, a = {}, c = {}, f = /* @__PURE__ */ new Map();
2278
2278
  for (const b of e) f.set(b.id, b);
2279
2279
  for (const b of Object.values(t))
@@ -2321,7 +2321,7 @@ function $t(e) {
2321
2321
  selectable: !1
2322
2322
  };
2323
2323
  }
2324
- function os(e, t, n, r, o) {
2324
+ function ss(e, t, n, r, o) {
2325
2325
  return {
2326
2326
  id: `e-${e.id}-${t.id}`,
2327
2327
  source: e.id,
@@ -2335,7 +2335,7 @@ function os(e, t, n, r, o) {
2335
2335
  }
2336
2336
  };
2337
2337
  }
2338
- function is(e, t, n, r, o = {}, i = "TB", s = "horizontal") {
2338
+ function ls(e, t, n, r, o = {}, i = "TB", s = "horizontal") {
2339
2339
  const l = o.edgeColor ?? "#b0bec5", d = [], a = [], c = (p, E) => {
2340
2340
  const b = t[p];
2341
2341
  if (!b) return;
@@ -2350,7 +2350,7 @@ function is(e, t, n, r, o = {}, i = "TB", s = "horizontal") {
2350
2350
  data: { branch: W, filterId: p, label: F, isFirst: D === 0, onAddStepClick: n, verticalRouting: s === "vertical" }
2351
2351
  });
2352
2352
  for (let G = 1; G < z.length; G++)
2353
- le(z[G - 1].kind) || a.push(os(z[G - 1], z[G], l, n, { filterId: p, branch: W }));
2353
+ le(z[G - 1].kind) || a.push(ss(z[G - 1], z[G], l, n, { filterId: p, branch: W }));
2354
2354
  for (const G of z)
2355
2355
  le(G.kind) && t[G.id] && c(G.id, G.branchLabels);
2356
2356
  }
@@ -2400,12 +2400,12 @@ function is(e, t, n, r, o = {}, i = "TB", s = "horizontal") {
2400
2400
  }), edges: a };
2401
2401
  }
2402
2402
  if (s === "vertical") {
2403
- const { nodes: p, railSpecs: E } = rs(e, t, d, f);
2403
+ const { nodes: p, railSpecs: E } = is(e, t, d, f);
2404
2404
  return { nodes: p.map(
2405
2405
  (x) => E[x.id] ? { ...x, data: { ...x.data, _branchRail: E[x.id] } } : x
2406
2406
  ), edges: a };
2407
2407
  }
2408
- return { nodes: ns(d, a, f, i), edges: a };
2408
+ return { nodes: os(d, a, f, i), edges: a };
2409
2409
  }
2410
2410
  const Yt = ({
2411
2411
  nodeRegistry: e,
@@ -2433,43 +2433,44 @@ const Yt = ({
2433
2433
  onCancel: W,
2434
2434
  workflowStatus: F,
2435
2435
  workflowStatusColor: D,
2436
- saveLabel: G
2436
+ saveLabel: G,
2437
+ optionsResolvers: ve
2437
2438
  }) => {
2438
2439
  const {
2439
- fitView: ve = !0,
2440
- fitViewPadding: Ee = 0.3,
2441
- showControls: te = !0,
2442
- showMiniMap: he = !1,
2443
- panOnScroll: ke = !0,
2444
- zoomOnScroll: ze = !1,
2445
- minZoom: Fe = 0.25,
2446
- maxZoom: _n = 2,
2447
- snapToGrid: Nn = !1,
2448
- snapGrid: Sn = [15, 15],
2440
+ fitView: Ee = !0,
2441
+ fitViewPadding: te = 0.3,
2442
+ showControls: he = !0,
2443
+ showMiniMap: ke = !1,
2444
+ panOnScroll: ze = !0,
2445
+ zoomOnScroll: Fe = !1,
2446
+ minZoom: _n = 0.25,
2447
+ maxZoom: Nn = 2,
2448
+ snapToGrid: Sn = !1,
2449
+ snapGrid: Cn = [15, 15],
2449
2450
  branchLayout: rt = "horizontal",
2450
2451
  nodeBody: ot = "full"
2451
- } = a, ge = K(() => wr(d), [d]), [A, oe] = j(() => (n == null ? void 0 : n.slots) ?? Gt()), [$, J] = j(() => (n == null ? void 0 : n.branches) ?? {}), [de, H] = j(null), [Le, it] = j(null), [V, xe] = j(null), [ie, st] = j(null), [Te, lt] = j(null), [q, at] = j(() => {
2452
+ } = a, ge = K(() => Er(d), [d]), [L, oe] = j(() => (n == null ? void 0 : n.slots) ?? Gt()), [$, J] = j(() => (n == null ? void 0 : n.branches) ?? {}), [de, H] = j(null), [Le, it] = j(null), [V, xe] = j(null), [ie, st] = j(null), [Te, lt] = j(null), [q, at] = j(() => {
2452
2453
  const y = n == null ? void 0 : n.slots.find((_) => _.kind === "triggerFixed"), v = y != null && y.id.startsWith("trigger-") ? y.id.slice(8) : void 0;
2453
2454
  return v ? t.lookup(v) ?? null : null;
2454
- }), [dt, Cn] = j({}), In = Y((y) => {
2455
- Cn(y);
2456
- }, []), On = K(() => ({ ...$n, ...r }), [r]), jn = K(() => ({ ...ts, ...o }), [o]), Mn = K(() => {
2457
- const y = A.filter((_) => _.kind === "userTask").length, v = Object.values($).flatMap((_) => Object.values(_).flat()).filter((_) => _.kind === "userTask").length;
2455
+ }), [dt, In] = j({}), On = Y((y) => {
2456
+ In(y);
2457
+ }, []), jn = K(() => ({ ...Yn, ...r }), [r]), Mn = K(() => ({ ...rs, ...o }), [o]), zn = K(() => {
2458
+ const y = L.filter((_) => _.kind === "userTask").length, v = Object.values($).flatMap((_) => Object.values(_).flat()).filter((_) => _.kind === "userTask").length;
2458
2459
  return y + v;
2459
- }, [A, $]), ct = E ?? (q == null ? void 0 : q.maxTasks), ft = ct !== void 0 && Mn >= ct, se = Y((y) => {
2460
- const v = A.find((_) => _.id === y);
2460
+ }, [L, $]), ct = E ?? (q == null ? void 0 : q.maxTasks), ft = ct !== void 0 && zn >= ct, se = Y((y) => {
2461
+ const v = L.find((_) => _.id === y);
2461
2462
  if (v) return v;
2462
2463
  for (const _ of Object.values($)) {
2463
2464
  const k = Object.values(_).flat().find((I) => I.id === y);
2464
2465
  if (k) return k;
2465
2466
  }
2466
2467
  return null;
2467
- }, [A, $]), Ae = Y((y) => {
2468
+ }, [L, $]), Ae = Y((y) => {
2468
2469
  s || (it(y), H("nodeConfig"));
2469
2470
  }, [s]), ut = Y((y) => {
2470
2471
  if (!s) {
2471
- if (A.some((v) => v.id === y)) {
2472
- const v = A.find((_) => _.id === y);
2472
+ if (L.some((v) => v.id === y)) {
2473
+ const v = L.find((_) => _.id === y);
2473
2474
  if ((v == null ? void 0 : v.kind) === "triggerFixed") {
2474
2475
  oe(Gt()), J({}), at(null);
2475
2476
  return;
@@ -2488,22 +2489,22 @@ const Yt = ({
2488
2489
  J((v) => {
2489
2490
  const _ = (I, m) => {
2490
2491
  const T = [];
2491
- for (const S of I)
2492
- le(S.kind) && m[S.id] && (T.push(S.id), Object.values(m[S.id]).forEach((C) => T.push(..._(C, m))));
2492
+ for (const C of I)
2493
+ le(C.kind) && m[C.id] && (T.push(C.id), Object.values(m[C.id]).forEach((S) => T.push(..._(S, m))));
2493
2494
  return T;
2494
2495
  }, k = { ...v };
2495
2496
  for (const I of Object.keys(k))
2496
2497
  for (const m of Object.keys(k[I])) {
2497
- const T = k[I][m], S = T.findIndex((R) => R.id === y);
2498
- if (S === -1 || T[S].kind === "end") continue;
2499
- const C = T[S];
2500
- let L = T.filter((R) => R.id !== y);
2501
- return C.kind === "filter" && ((C.id in k ? _([C], k) : []).forEach((B) => delete k[B]), delete k[C.id], L.some((B) => B.kind === "end") || (L = [...L, { id: `end-${I}-${m}`, kind: "end", reactFlowType: "endNode" }])), k[I] = { ...k[I], [m]: L }, k;
2498
+ const T = k[I][m], C = T.findIndex((A) => A.id === y);
2499
+ if (C === -1 || T[C].kind === "end") continue;
2500
+ const S = T[C];
2501
+ let R = T.filter((A) => A.id !== y);
2502
+ return S.kind === "filter" && ((S.id in k ? _([S], k) : []).forEach((B) => delete k[B]), delete k[S.id], R.some((B) => B.kind === "end") || (R = [...R, { id: `end-${I}-${m}`, kind: "end", reactFlowType: "endNode" }])), k[I] = { ...k[I], [m]: R }, k;
2502
2503
  }
2503
2504
  return k;
2504
2505
  });
2505
2506
  }
2506
- }, [s, A]), Re = Y(() => {
2507
+ }, [s, L]), Re = Y(() => {
2507
2508
  s || H("triggerSelect");
2508
2509
  }, [s]), ht = Y((y, v) => {
2509
2510
  s || ft || (xe(y), st(v.filterId && v.branch ? { filterId: v.filterId, branch: v.branch } : null), H("nodePicker"));
@@ -2550,19 +2551,19 @@ const Yt = ({
2550
2551
  };
2551
2552
  if (!V) return y;
2552
2553
  if (ie) {
2553
- const { filterId: k, branch: I } = ie, m = A.findIndex((R) => R.id === k), T = m >= 0 ? A.slice(0, m + 1) : [], S = ((_ = $[k]) == null ? void 0 : _[I]) ?? [], C = S.findIndex((R) => R.id === V), L = C >= 0 ? S.slice(0, C + 1) : [];
2554
- return y.upstreamSlots = [...T, ...L], y.downstreamSlots = C >= 0 ? S.slice(C + 1) : S, y.insertAfterSlot = L[L.length - 1] ?? null, y;
2554
+ const { filterId: k, branch: I } = ie, m = L.findIndex((A) => A.id === k), T = m >= 0 ? L.slice(0, m + 1) : [], C = ((_ = $[k]) == null ? void 0 : _[I]) ?? [], S = C.findIndex((A) => A.id === V), R = S >= 0 ? C.slice(0, S + 1) : [];
2555
+ return y.upstreamSlots = [...T, ...R], y.downstreamSlots = S >= 0 ? C.slice(S + 1) : C, y.insertAfterSlot = R[R.length - 1] ?? null, y;
2555
2556
  }
2556
- const v = A.findIndex((k) => k.id === V);
2557
- return y.upstreamSlots = v >= 0 ? A.slice(0, v + 1) : [], y.downstreamSlots = v >= 0 ? A.slice(v + 1) : [], y.insertAfterSlot = y.upstreamSlots[y.upstreamSlots.length - 1] ?? null, y;
2558
- }, [A, $, V, ie, q]), bt = (y, v) => y.descriptorType === v || y.id === v || y.kind === v, yt = Y(() => {
2557
+ const v = L.findIndex((k) => k.id === V);
2558
+ return y.upstreamSlots = v >= 0 ? L.slice(0, v + 1) : [], y.downstreamSlots = v >= 0 ? L.slice(v + 1) : [], y.insertAfterSlot = y.upstreamSlots[y.upstreamSlots.length - 1] ?? null, y;
2559
+ }, [L, $, V, ie, q]), bt = (y, v) => y.descriptorType === v || y.id === v || y.kind === v, yt = Y(() => {
2559
2560
  const y = e.list(), v = q != null && q.availableTasks ? y.filter((k) => q.availableTasks.includes(k.type)) : y, _ = pt();
2560
- return v.filter((k) => k.maxPerWorkflow !== void 0 && A.filter((m) => m.descriptorType === k.type).length + Object.values($).flatMap((m) => Object.values(m).flat()).filter((m) => m.descriptorType === k.type).length >= k.maxPerWorkflow ? !1 : k.canInsert ? k.canInsert(_) : !(k.insertAfter && k.insertAfter.length > 0 && !_.upstreamSlots.some(
2561
+ return v.filter((k) => k.maxPerWorkflow !== void 0 && L.filter((m) => m.descriptorType === k.type).length + Object.values($).flatMap((m) => Object.values(m).flat()).filter((m) => m.descriptorType === k.type).length >= k.maxPerWorkflow ? !1 : k.canInsert ? k.canInsert(_) : !(k.insertAfter && k.insertAfter.length > 0 && !_.upstreamSlots.some(
2561
2562
  (m) => k.insertAfter.some((T) => bt(m, T))
2562
2563
  ) || k.insertBefore && k.insertBefore.length > 0 && !_.downstreamSlots.some(
2563
2564
  (m) => k.insertBefore.some((T) => bt(m, T))
2564
2565
  )));
2565
- }, [e, q, A, $, pt]), mt = Y((y) => {
2566
+ }, [e, q, L, $, pt]), mt = Y((y) => {
2566
2567
  if (!V) return;
2567
2568
  const v = `${y.type}-${Date.now()}`, _ = y.reactFlowType === "filterNode" || y.reactFlowType === "approvalNode" || y.reactFlowType === "conditionBranchNode", k = y.branchLabels ?? { pass: "Pass", fail: "Fail" }, I = {
2568
2569
  id: v,
@@ -2576,32 +2577,32 @@ const Yt = ({
2576
2577
  };
2577
2578
  if (ie) {
2578
2579
  const { filterId: m, branch: T } = ie;
2579
- J((S) => {
2580
- const C = [...S[m][T]];
2580
+ J((C) => {
2581
+ const S = [...C[m][T]];
2581
2582
  if (_) {
2582
- const ne = C.filter((ce) => ce.kind !== "end"), xt = ne.findIndex((ce) => ce.id === V), An = xt === -1 ? ne.length : xt + 1;
2583
- return ne.splice(An, 0, I), {
2584
- ...S,
2585
- [m]: { ...S[m], [T]: ne },
2583
+ const ne = S.filter((ce) => ce.kind !== "end"), xt = ne.findIndex((ce) => ce.id === V), Rn = xt === -1 ? ne.length : xt + 1;
2584
+ return ne.splice(Rn, 0, I), {
2585
+ ...C,
2586
+ [m]: { ...C[m], [T]: ne },
2586
2587
  [v]: Object.fromEntries(
2587
2588
  Object.keys(k).map((ce) => [ce, [{ id: `end-${v}-${ce}`, kind: "end", reactFlowType: "endNode" }]])
2588
2589
  )
2589
2590
  };
2590
2591
  }
2591
- const L = C.findIndex((ne) => ne.id === V), R = C.findIndex((ne) => ne.kind === "end"), B = L === -1 ? R === -1 ? C.length : R : L + 1;
2592
- return C.splice(B, 0, I), { ...S, [m]: { ...S[m], [T]: C } };
2592
+ const R = S.findIndex((ne) => ne.id === V), A = S.findIndex((ne) => ne.kind === "end"), B = R === -1 ? A === -1 ? S.length : A : R + 1;
2593
+ return S.splice(B, 0, I), { ...C, [m]: { ...C[m], [T]: S } };
2593
2594
  });
2594
2595
  } else
2595
2596
  _ ? (oe((m) => {
2596
- const T = m.findIndex((C) => C.id === V);
2597
- return [...m.filter((C) => C.kind !== "end").slice(0, T + 1), I];
2597
+ const T = m.findIndex((S) => S.id === V);
2598
+ return [...m.filter((S) => S.kind !== "end").slice(0, T + 1), I];
2598
2599
  }), J((m) => ({
2599
2600
  ...m,
2600
2601
  [v]: Object.fromEntries(
2601
2602
  Object.keys(k).map((T) => [T, [{ id: `end-${v}-${T}`, kind: "end", reactFlowType: "endNode" }]])
2602
2603
  )
2603
2604
  }))) : oe((m) => {
2604
- const T = m.findIndex((S) => S.id === V);
2605
+ const T = m.findIndex((C) => C.id === V);
2605
2606
  return T === -1 ? m : [...m.slice(0, T + 1), I, ...m.slice(T + 1)];
2606
2607
  });
2607
2608
  xe(null), st(null), it(v), H("nodeConfig");
@@ -2621,42 +2622,43 @@ const Yt = ({
2621
2622
  }, k = (m) => {
2622
2623
  const T = se(y);
2623
2624
  if ((T == null ? void 0 : T.descriptorType) !== "conditionBranch") return m;
2624
- const C = (v.branchConfigs ?? []).map((B) => B.key).filter(Boolean);
2625
- if (C.length === 0) return m;
2626
- const L = m[y] ?? {}, R = {};
2627
- return C.forEach((B) => {
2628
- R[B] = L[B] ?? [{ id: `end-${y}-${B}`, kind: "end", reactFlowType: "endNode" }];
2629
- }), { ...m, [y]: R };
2625
+ const S = (v.branchConfigs ?? []).map((B) => B.key).filter(Boolean);
2626
+ if (S.length === 0) return m;
2627
+ const R = m[y] ?? {}, A = {};
2628
+ return S.forEach((B) => {
2629
+ A[B] = R[B] ?? [{ id: `end-${y}-${B}`, kind: "end", reactFlowType: "endNode" }];
2630
+ }), { ...m, [y]: A };
2630
2631
  }, I = (m, T) => {
2631
2632
  if (m.descriptorType !== "conditionBranch") return { ...m, formData: T };
2632
- const S = T.branchConfigs ?? [], C = {};
2633
- return S.forEach((L) => {
2634
- L.key && (C[L.key] = _(L));
2635
- }), { ...m, formData: T, branchLabels: C };
2633
+ const C = T.branchConfigs ?? [], S = {};
2634
+ return C.forEach((R) => {
2635
+ R.key && (S[R.key] = _(R));
2636
+ }), { ...m, formData: T, branchLabels: S };
2636
2637
  };
2637
- if (A.some((m) => m.id === y)) {
2638
+ if (L.some((m) => m.id === y)) {
2638
2639
  J((m) => {
2639
2640
  const T = k(m);
2640
- return oe((S) => {
2641
- const C = S.map((L) => L.id === y ? I(L, v) : L);
2642
- return i == null || i({ slots: C, branches: T }), C;
2643
- }), T;
2641
+ return oe(
2642
+ (C) => C.map(
2643
+ (S) => S.id === y ? I(S, v) : S
2644
+ )
2645
+ ), T;
2644
2646
  });
2645
2647
  return;
2646
2648
  }
2647
2649
  J((m) => {
2648
- const S = { ...k(m) };
2649
- for (const C of Object.keys(S)) {
2650
- const L = (R) => R.map((B) => B.id === y ? I(B, v) : B);
2651
- for (const R of Object.keys(S[C]))
2652
- if (S[C][R].some((B) => B.id === y))
2653
- return S[C] = { ...S[C], [R]: L(S[C][R]) }, i == null || i({ slots: A, branches: S }), S;
2650
+ const C = { ...k(m) };
2651
+ for (const S of Object.keys(C)) {
2652
+ const R = (A) => A.map((B) => B.id === y ? I(B, v) : B);
2653
+ for (const A of Object.keys(C[S]))
2654
+ if (C[S][A].some((B) => B.id === y))
2655
+ return C[S] = { ...C[S], [A]: R(C[S][A]) }, C;
2654
2656
  }
2655
- return S;
2657
+ return C;
2656
2658
  });
2657
- }, [A, $, se, i]), Z = K(() => se(Le ?? ""), [se, Le]), vt = K(() => Z != null && Z.descriptorType ? e.forType(Z.descriptorType) ?? null : null, [Z, e]), { nodes: Et, edges: zn } = K(
2658
- () => is(A, $, s ? null : ht, dt, l, b, rt),
2659
- [A, $, s, ht, dt, l, b, rt]
2659
+ }, [L, $, se]), Z = K(() => se(Le ?? ""), [se, Le]), vt = K(() => Z != null && Z.descriptorType ? e.forType(Z.descriptorType) ?? null : null, [Z, e]), { nodes: Et, edges: Fn } = K(
2660
+ () => ls(L, $, s ? null : ht, dt, l, b, rt),
2661
+ [L, $, s, ht, dt, l, b, rt]
2660
2662
  ), kt = K(() => {
2661
2663
  const y = x ? new Map(x.steps.map((v) => [v.nodeId, v])) : null;
2662
2664
  return Et.map((v) => {
@@ -2671,11 +2673,11 @@ const Yt = ({
2671
2673
  lt({ workflowId: k, workflowLabel: ((m = I == null ? void 0 : I.formData) == null ? void 0 : m.workflowLabel) ?? void 0 });
2672
2674
  }), Object.keys(_).length > 0 ? { ...v, data: { ...v.data, ..._ } } : v;
2673
2675
  });
2674
- }, [Et, x, N, se]), Fn = K(() => ({ onEditNode: Ae, onDeleteNode: ut, onAddStep: () => {
2675
- }, onClickAddTrigger: Re, messages: ge, nodeRegistry: e, nodeBody: ot }), [Ae, ut, Re, ge, e, ot]), Ln = Y(async () => {
2676
- i && await i({ slots: A, branches: $ });
2677
- }, [i, A, $]);
2678
- return /* @__PURE__ */ u(qn.Provider, { value: Fn, children: /* @__PURE__ */ w(
2676
+ }, [Et, x, N, se]), Ln = K(() => ({ onEditNode: Ae, onDeleteNode: ut, onAddStep: () => {
2677
+ }, onClickAddTrigger: Re, messages: ge, nodeRegistry: e, nodeBody: ot }), [Ae, ut, Re, ge, e, ot]), An = Y(async () => {
2678
+ i && await i({ slots: L, branches: $ });
2679
+ }, [i, L, $]);
2680
+ return /* @__PURE__ */ u(vr, { resolvers: ve, children: /* @__PURE__ */ u(Xn.Provider, { value: Ln, children: /* @__PURE__ */ w(
2679
2681
  "div",
2680
2682
  {
2681
2683
  className: "flowforge-canvas",
@@ -2698,35 +2700,35 @@ const Yt = ({
2698
2700
  },
2699
2701
  children: [
2700
2702
  !O && (i || W || M) && /* @__PURE__ */ u(
2701
- qi,
2703
+ Ji,
2702
2704
  {
2703
2705
  workflowName: M,
2704
2706
  onWorkflowNameChange: z,
2705
2707
  status: F,
2706
2708
  statusColor: D,
2707
- onSave: i ? Ln : void 0,
2709
+ onSave: i ? An : void 0,
2708
2710
  onCancel: W,
2709
2711
  saveLabel: G
2710
2712
  }
2711
2713
  ),
2712
2714
  /* @__PURE__ */ w("div", { style: { flex: 1, minHeight: 0, position: "relative" }, children: [
2713
2715
  /* @__PURE__ */ w(
2714
- Rn,
2716
+ Dn,
2715
2717
  {
2716
2718
  nodes: kt,
2717
- edges: zn,
2718
- nodeTypes: On,
2719
- edgeTypes: jn,
2720
- fitView: ve,
2721
- fitViewOptions: { padding: Ee },
2719
+ edges: Fn,
2720
+ nodeTypes: jn,
2721
+ edgeTypes: Mn,
2722
+ fitView: Ee,
2723
+ fitViewOptions: { padding: te },
2722
2724
  nodesDraggable: !1,
2723
2725
  nodesConnectable: !1,
2724
- panOnScroll: ke,
2725
- zoomOnScroll: ze,
2726
- minZoom: Fe,
2727
- maxZoom: _n,
2728
- snapToGrid: Nn,
2729
- snapGrid: Sn,
2726
+ panOnScroll: ze,
2727
+ zoomOnScroll: Fe,
2728
+ minZoom: _n,
2729
+ maxZoom: Nn,
2730
+ snapToGrid: Sn,
2731
+ snapGrid: Cn,
2730
2732
  proOptions: { hideAttribution: !0 },
2731
2733
  onNodeClick: (y, v) => {
2732
2734
  const _ = se(v.id);
@@ -2734,28 +2736,28 @@ const Yt = ({
2734
2736
  },
2735
2737
  children: [
2736
2738
  l.background !== "none" && /* @__PURE__ */ u(
2737
- Bn,
2739
+ Wn,
2738
2740
  {
2739
2741
  variant: l.background,
2740
2742
  color: l.backgroundColor ?? "#e0e0e0",
2741
2743
  gap: 20
2742
2744
  }
2743
2745
  ),
2744
- te && /* @__PURE__ */ u(Wn, { showInteractive: !1 }),
2745
- he && /* @__PURE__ */ u(Gn, { zoomable: !0, pannable: !0 }),
2746
- /* @__PURE__ */ u(Hi, { onHeightsReady: In, nodeCount: kt.length })
2746
+ he && /* @__PURE__ */ u(Gn, { showInteractive: !1 }),
2747
+ ke && /* @__PURE__ */ u($n, { zoomable: !0, pannable: !0 }),
2748
+ /* @__PURE__ */ u(qi, { onHeightsReady: On, nodeCount: kt.length })
2747
2749
  ]
2748
2750
  }
2749
2751
  ),
2750
- c ? de === "triggerSelect" && c(t.list(), gt, () => H(null)) : /* @__PURE__ */ u(Xi, { open: de === "triggerSelect", templates: t.list(), messages: ge, onSelect: gt, onClose: () => H(null), loadTriggerSources: f }),
2752
+ c ? de === "triggerSelect" && c(t.list(), gt, () => H(null)) : /* @__PURE__ */ u(Zi, { open: de === "triggerSelect", templates: t.list(), messages: ge, onSelect: gt, onClose: () => H(null), loadTriggerSources: f }),
2751
2753
  h ? de === "nodePicker" && h(yt(), mt, () => {
2752
2754
  H(null), xe(null);
2753
- }) : /* @__PURE__ */ u(Ji, { open: de === "nodePicker", availableDescriptors: yt(), messages: ge, onSelect: mt, onClose: () => {
2755
+ }) : /* @__PURE__ */ u(Qi, { open: de === "nodePicker", availableDescriptors: yt(), messages: ge, onSelect: mt, onClose: () => {
2754
2756
  H(null), xe(null);
2755
2757
  } }),
2756
- g ? de === "nodeConfig" && g(vt ?? void 0, Z, wt, () => H(null)) : /* @__PURE__ */ u(Zi, { open: de === "nodeConfig", nodeId: Le, descriptor: vt, initialValues: Z == null ? void 0 : Z.formData, messages: ge, onSave: wt, onClose: () => H(null) }),
2758
+ g ? de === "nodeConfig" && g(vt ?? void 0, Z, wt, () => H(null)) : /* @__PURE__ */ u(es, { open: de === "nodeConfig", nodeId: Le, descriptor: vt, initialValues: Z == null ? void 0 : Z.formData, messages: ge, onSave: wt, onClose: () => H(null) }),
2757
2759
  N && Te && /* @__PURE__ */ u(
2758
- Qi,
2760
+ ts,
2759
2761
  {
2760
2762
  isOpen: !!Te,
2761
2763
  onClose: () => lt(null),
@@ -2767,15 +2769,15 @@ const Yt = ({
2767
2769
  ] })
2768
2770
  ]
2769
2771
  }
2770
- ) });
2771
- }, ss = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2772
+ ) }) });
2773
+ }, as = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2772
2774
  __proto__: null,
2773
2775
  WorkflowCanvas: Yt,
2774
2776
  default: Yt
2775
2777
  }, Symbol.toStringTag, { value: "Module" })), Ue = "All";
2776
- function ls({ template: e, onSelect: t }) {
2778
+ function ds({ template: e, onSelect: t }) {
2777
2779
  var o, i;
2778
- const n = e.triggerCategory ? vr[e.triggerCategory] : null, r = ((o = e.skeletonState) == null ? void 0 : o.slots.filter((s) => s.kind === "userTask").length) ?? 0;
2780
+ const n = e.triggerCategory ? kr[e.triggerCategory] : null, r = ((o = e.skeletonState) == null ? void 0 : o.slots.filter((s) => s.kind === "userTask").length) ?? 0;
2779
2781
  return /* @__PURE__ */ w(
2780
2782
  "div",
2781
2783
  {
@@ -2828,7 +2830,7 @@ function ls({ template: e, onSelect: t }) {
2828
2830
  }
2829
2831
  );
2830
2832
  }
2831
- const Ts = ({
2833
+ const Ns = ({
2832
2834
  templates: e,
2833
2835
  onSelectTemplate: t,
2834
2836
  onStartFromScratch: n
@@ -2864,14 +2866,14 @@ const Ts = ({
2864
2866
  onClick: n,
2865
2867
  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" },
2866
2868
  children: [
2867
- /* @__PURE__ */ u(lr, { size: 16 }),
2869
+ /* @__PURE__ */ u(ar, { size: 16 }),
2868
2870
  "Start from Scratch"
2869
2871
  ]
2870
2872
  }
2871
2873
  )
2872
2874
  ] }),
2873
2875
  /* @__PURE__ */ w("div", { style: { display: "flex", alignItems: "center", gap: 8, background: "#f5f5f5", borderRadius: 8, padding: "8px 12px", marginBottom: 12 }, children: [
2874
- /* @__PURE__ */ u(ar, { size: 18, color: "#9e9e9e" }),
2876
+ /* @__PURE__ */ u(dr, { size: 18, color: "#9e9e9e" }),
2875
2877
  /* @__PURE__ */ u(
2876
2878
  "input",
2877
2879
  {
@@ -2903,17 +2905,17 @@ const Ts = ({
2903
2905
  )) })
2904
2906
  ] }),
2905
2907
  /* @__PURE__ */ u("div", { style: { flex: 1, overflowY: "auto", padding: 24 }, children: d.length === 0 ? /* @__PURE__ */ w("div", { style: { textAlign: "center", padding: "40px 0", color: "#9e9e9e" }, children: [
2906
- /* @__PURE__ */ u(dr, { size: 36, style: { marginBottom: 8 } }),
2908
+ /* @__PURE__ */ u(cr, { size: 36, style: { marginBottom: 8 } }),
2907
2909
  /* @__PURE__ */ u("p", { style: { margin: 0, fontSize: 14 }, children: "No templates found" })
2908
- ] }) : /* @__PURE__ */ u("div", { style: { display: "grid", gridTemplateColumns: "repeat(auto-fill, minmax(280px, 1fr))", gap: 16 }, children: d.map((a) => /* @__PURE__ */ u(ls, { template: a, onSelect: () => t(a) }, a.triggerKey)) }) })
2910
+ ] }) : /* @__PURE__ */ u("div", { style: { display: "grid", gridTemplateColumns: "repeat(auto-fill, minmax(280px, 1fr))", gap: 16 }, children: d.map((a) => /* @__PURE__ */ u(ds, { template: a, onSelect: () => t(a) }, a.triggerKey)) }) })
2909
2911
  ] });
2910
2912
  }, _e = {
2911
2913
  running: { label: "Running", color: ee.running, icon: P.createElement(Xt, { size: 14 }) },
2912
2914
  success: { label: "Success", color: ee.success, icon: P.createElement(qt, { size: 14 }) },
2913
2915
  failed: { label: "Failed", color: ee.failed, icon: P.createElement(Vt, { size: 14 }) },
2914
2916
  cancelled: { label: "Cancelled", color: ee.cancelled, icon: P.createElement(Ht, { size: 14 }) }
2915
- }, as = {
2916
- pending: { color: ee.pending, icon: P.createElement(cr, { size: 14 }) },
2917
+ }, cs = {
2918
+ pending: { color: ee.pending, icon: P.createElement(fr, { size: 14 }) },
2917
2919
  running: { color: ee.running, icon: P.createElement(Xt, { size: 14 }) },
2918
2920
  success: { color: ee.success, icon: P.createElement(qt, { size: 14 }) },
2919
2921
  failed: { color: ee.failed, icon: P.createElement(Vt, { size: 14 }) },
@@ -2934,8 +2936,8 @@ function Tn(e, t) {
2934
2936
  return "—";
2935
2937
  }
2936
2938
  }
2937
- function ds({ step: e }) {
2938
- const [t, n] = j(!1), r = as[e.status], o = !!(e.inputs || e.outputs || e.error);
2939
+ function fs({ step: e }) {
2940
+ const [t, n] = j(!1), r = cs[e.status], o = !!(e.inputs || e.outputs || e.error);
2939
2941
  return /* @__PURE__ */ w("div", { style: { borderBottom: "1px solid #f5f5f5" }, children: [
2940
2942
  /* @__PURE__ */ w(
2941
2943
  "div",
@@ -2954,7 +2956,7 @@ function ds({ step: e }) {
2954
2956
  /* @__PURE__ */ u("span", { style: { flex: 1, fontSize: 13, color: "#212121" }, children: e.label || e.nodeId }),
2955
2957
  e.branchTaken && /* @__PURE__ */ u("span", { style: { fontSize: 10, padding: "1px 6px", borderRadius: 10, background: "#e3f2fd", color: "#1565c0", fontWeight: 600 }, children: e.branchTaken }),
2956
2958
  /* @__PURE__ */ u("span", { style: { fontSize: 11, color: "#9e9e9e", flexShrink: 0 }, children: e.startedAt ? Tn(e.startedAt, e.completedAt) : "—" }),
2957
- o && /* @__PURE__ */ u("span", { style: { color: "#9e9e9e", flexShrink: 0 }, children: t ? P.createElement(ur, { size: 16 }) : P.createElement(hr, { size: 16 }) })
2959
+ o && /* @__PURE__ */ u("span", { style: { color: "#9e9e9e", flexShrink: 0 }, children: t ? P.createElement(hr, { size: 16 }) : P.createElement(gr, { size: 16 }) })
2958
2960
  ]
2959
2961
  }
2960
2962
  ),
@@ -2971,7 +2973,7 @@ function ds({ step: e }) {
2971
2973
  ] })
2972
2974
  ] });
2973
2975
  }
2974
- function cs({ record: e, selected: t, onSelect: n }) {
2976
+ function us({ record: e, selected: t, onSelect: n }) {
2975
2977
  const r = _e[e.status];
2976
2978
  return /* @__PURE__ */ w(
2977
2979
  "div",
@@ -3010,7 +3012,7 @@ function cs({ record: e, selected: t, onSelect: n }) {
3010
3012
  }
3011
3013
  );
3012
3014
  }
3013
- const _s = ({ records: e, onViewOnCanvas: t }) => {
3015
+ const Ss = ({ records: e, onViewOnCanvas: t }) => {
3014
3016
  var s;
3015
3017
  const [n, r] = j(((s = e[0]) == null ? void 0 : s.id) ?? null), o = e.find((l) => l.id === n) ?? null, i = [...e].sort((l, d) => new Date(d.triggeredAt).getTime() - new Date(l.triggeredAt).getTime());
3016
3018
  return e.length === 0 ? /* @__PURE__ */ w("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", height: 300, color: "#9e9e9e", gap: 8 }, children: [
@@ -3024,7 +3026,7 @@ const _s = ({ records: e, onViewOnCanvas: t }) => {
3024
3026
  e.length,
3025
3027
  ")"
3026
3028
  ] }),
3027
- i.map((l) => /* @__PURE__ */ u(cs, { record: l, selected: l.id === n, onSelect: () => r(l.id) }, l.id))
3029
+ i.map((l) => /* @__PURE__ */ u(us, { record: l, selected: l.id === n, onSelect: () => r(l.id) }, l.id))
3028
3030
  ] }),
3029
3031
  /* @__PURE__ */ u("div", { style: { flex: 1, overflowY: "auto" }, children: o ? /* @__PURE__ */ w("div", { children: [
3030
3032
  /* @__PURE__ */ w("div", { style: { padding: "16px 20px", borderBottom: "1px solid #f0f0f0", display: "flex", alignItems: "flex-start", justifyContent: "space-between", gap: 12 }, children: [
@@ -3041,7 +3043,7 @@ const _s = ({ records: e, onViewOnCanvas: t }) => {
3041
3043
  o.completedAt && ` → ${Je(o.completedAt)} (${Tn(o.triggeredAt, o.completedAt)})`
3042
3044
  ] }),
3043
3045
  o.triggeredBy && /* @__PURE__ */ w("span", { style: { display: "flex", alignItems: "center", gap: 4 }, children: [
3044
- /* @__PURE__ */ u(fr, { size: 13 }),
3046
+ /* @__PURE__ */ u(ur, { size: 13 }),
3045
3047
  " ",
3046
3048
  o.triggeredBy
3047
3049
  ] })
@@ -3063,7 +3065,7 @@ const _s = ({ records: e, onViewOnCanvas: t }) => {
3063
3065
  o.steps.length,
3064
3066
  ")"
3065
3067
  ] }),
3066
- o.steps.map((l, d) => /* @__PURE__ */ u(ds, { step: l }, `${l.nodeId}-${d}`))
3068
+ o.steps.map((l, d) => /* @__PURE__ */ u(fs, { step: l }, `${l.nodeId}-${d}`))
3067
3069
  ] }),
3068
3070
  o.inputs && Object.keys(o.inputs).length > 0 && /* @__PURE__ */ u("div", { style: { padding: "10px 16px" }, children: /* @__PURE__ */ w("details", { children: [
3069
3071
  /* @__PURE__ */ u("summary", { style: { cursor: "pointer", fontSize: 12, fontWeight: 600, color: "#757575", marginBottom: 6 }, children: "TRIGGER INPUTS" }),
@@ -3071,7 +3073,7 @@ const _s = ({ records: e, onViewOnCanvas: t }) => {
3071
3073
  ] }) })
3072
3074
  ] }) : /* @__PURE__ */ u("div", { style: { display: "flex", alignItems: "center", justifyContent: "center", height: "100%", color: "#9e9e9e", fontSize: 14 }, children: "Select a run to see details" }) })
3073
3075
  ] });
3074
- }, Ns = {
3076
+ }, Cs = {
3075
3077
  slots: [
3076
3078
  { id: "start", kind: "start", reactFlowType: "startNode", deletable: !1 },
3077
3079
  { id: "trigger-END_USER_CREATION", kind: "triggerFixed", reactFlowType: "triggerNode", deletable: !0, label: "New User Registration", nodeData: { label: "New User Registration" } },
@@ -3085,7 +3087,7 @@ const _s = ({ records: e, onViewOnCanvas: t }) => {
3085
3087
  fail: [{ id: "notification-fail-1", kind: "userTask", reactFlowType: "notificationNode", descriptorType: "notification", deletable: !0, label: "Rejection Notice", nodeData: { title: "Rejection Notice" } }]
3086
3088
  }
3087
3089
  }
3088
- }, Ss = {
3090
+ }, Is = {
3089
3091
  slots: [
3090
3092
  { id: "start", kind: "start", reactFlowType: "startNode", deletable: !1 },
3091
3093
  { id: "trigger-ACCESS_REQUEST", kind: "triggerFixed", reactFlowType: "triggerNode", deletable: !0, label: "Access Request Submitted", nodeData: { label: "Access Request Submitted" } },
@@ -3103,7 +3105,7 @@ const _s = ({ records: e, onViewOnCanvas: t }) => {
3103
3105
  ]
3104
3106
  }
3105
3107
  }
3106
- }, Cs = {
3108
+ }, Os = {
3107
3109
  slots: [
3108
3110
  { id: "start", kind: "start", reactFlowType: "startNode", deletable: !1 },
3109
3111
  { id: "trigger-USER_DEACTIVATION", kind: "triggerFixed", reactFlowType: "triggerNode", deletable: !0, label: "User Deactivation", nodeData: { label: "User Deactivation" } },
@@ -3112,7 +3114,7 @@ const _s = ({ records: e, onViewOnCanvas: t }) => {
3112
3114
  { id: "end", kind: "end", reactFlowType: "endNode", deletable: !1 }
3113
3115
  ],
3114
3116
  branches: {}
3115
- }, Is = {
3117
+ }, js = {
3116
3118
  slots: [
3117
3119
  { id: "start", kind: "start", reactFlowType: "startNode", deletable: !1 },
3118
3120
  { id: "trigger-WEBHOOK_TRIGGER", kind: "triggerFixed", reactFlowType: "webhookTriggerNode", deletable: !0, label: "Incoming Webhook", nodeData: { label: "Incoming Webhook" } },
@@ -3124,13 +3126,13 @@ const _s = ({ records: e, onViewOnCanvas: t }) => {
3124
3126
  };
3125
3127
  export {
3126
3128
  Yt as F,
3127
- Qi as S,
3128
- _s as W,
3129
- qi as a,
3130
- Ts as b,
3131
- Ss as c,
3132
- Cs as o,
3133
- Ns as u,
3134
- Is as w
3129
+ ts as S,
3130
+ Ss as W,
3131
+ Ji as a,
3132
+ Ns as b,
3133
+ Is as c,
3134
+ Os as o,
3135
+ Cs as u,
3136
+ js as w
3135
3137
  };
3136
- //# sourceMappingURL=templateSkeletons-CFMb6KIK.js.map
3138
+ //# sourceMappingURL=templateSkeletons-CHrd4Z5h.js.map