@notmrabhi/flowforge 0.1.109 → 0.1.110

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.
@@ -1,21 +1,21 @@
1
- import { jsxs as w, jsx as u, Fragment as Se } from "react/jsx-runtime";
2
- import G, { useRef as Tt, useEffect as se, useState as L, useCallback as U, useMemo as V } from "react";
1
+ import { jsxs as w, jsx as f, Fragment as Se } from "react/jsx-runtime";
2
+ import $, { useRef as Tt, useEffect as se, useState as L, useCallback as U, useMemo as V } from "react";
3
3
  import Wn, { useStore as $n, useReactFlow as Gn, Background as Yn, Controls as Kn, MiniMap as Hn } from "reactflow";
4
4
  import "reactflow/dist/style.css";
5
- import { e as Un, G as Vn, E as qn, P as Xn, L as Jn, d as Zn, h as Qn } from "./GatewayBranchEdge-C023FhhW.js";
6
- import { Dialog as er, Box as ne, Drawer as tr, IconButton as It, Button as Le, CircularProgress as nr } from "@mui/material";
5
+ import { e as Un, G as Vn, E as qn, P as Xn, L as Jn, d as Zn, h as Qn } from "./GatewayBranchEdge-BsRuojkK.js";
6
+ import { Dialog as er, Box as re, Drawer as tr, IconButton as Ot, Button as Le, CircularProgress as nr } from "@mui/material";
7
7
  import rr from "react-select";
8
- import { MdClose as or, MdCalendarToday as ir, MdBolt as sr, MdArrowBack as Jt, MdChevronRight as Zt, MdAddCircleOutline as lr, MdApps as ar, MdErrorOutline as dr, MdAccountTree as cr, MdAdd as fr, MdSearch as ur, MdCategory as hr, MdCancel as Qt, MdError as en, MdCheckCircle as tn, MdPlayArrow as nn, MdHourglassEmpty as gr, MdSchedule as Ot, MdPerson as pr, MdExpandLess as yr, MdExpandMore as br } from "react-icons/md";
8
+ import { MdClose as or, MdCalendarToday as ir, MdBolt as sr, MdArrowBack as Jt, MdChevronRight as Zt, MdAddCircleOutline as lr, MdApps as ar, MdErrorOutline as dr, MdAccountTree as cr, MdAdd as ur, MdSearch as fr, MdCategory as hr, MdCancel as Qt, MdError as en, MdCheckCircle as tn, MdPlayArrow as nn, MdHourglassEmpty as gr, MdSchedule as It, MdPerson as pr, MdExpandLess as yr, MdExpandMore as br } from "react-icons/md";
9
9
  import { GrTrigger as mr } from "react-icons/gr";
10
10
  import { BiCollapse as vr, BiExpand as wr } from "react-icons/bi";
11
11
  import { k as Er, c as xr, O as kr } from "./index-C6t1hp3u.js";
12
12
  import { m as _r } from "./messages-CRZgWFU-.js";
13
13
  import { createTheme as Sr, ThemeProvider as Nr } from "@mui/material/styles";
14
- import { T as Cr, E as re } from "./canvasTokens-CAD6G24b.js";
15
- var rn = Object.defineProperty, Tr = (e, t, n) => t in e ? rn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Ir = (e, t) => {
14
+ import { T as Cr, E as oe } from "./canvasTokens-CAD6G24b.js";
15
+ var rn = Object.defineProperty, Tr = (e, t, n) => t in e ? rn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Or = (e, t) => {
16
16
  for (var n in t) rn(e, n, { get: t[n], enumerable: !0 });
17
- }, Or = (e, t, n) => Tr(e, t + "", n), on = {};
18
- Ir(on, { Graph: () => q, alg: () => it, json: () => ln, version: () => zr });
17
+ }, Ir = (e, t, n) => Tr(e, t + "", n), on = {};
18
+ Or(on, { Graph: () => q, alg: () => it, json: () => ln, version: () => zr });
19
19
  var Mr = Object.defineProperty, sn = (e, t) => {
20
20
  for (var n in t) Mr(e, n, { get: t[n], enumerable: !0 });
21
21
  }, q = class {
@@ -248,7 +248,7 @@ function Rr(e) {
248
248
  }), t;
249
249
  }
250
250
  var it = {};
251
- sn(it, { CycleException: () => Fe, bellmanFord: () => an, components: () => Dr, dijkstra: () => Pe, dijkstraAll: () => Gr, findCycles: () => Yr, floydWarshall: () => Hr, isAcyclic: () => Vr, postorder: () => Xr, preorder: () => Jr, prim: () => Zr, shortestPaths: () => Qr, tarjan: () => cn, topsort: () => fn });
251
+ sn(it, { CycleException: () => Fe, bellmanFord: () => an, components: () => Dr, dijkstra: () => Pe, dijkstraAll: () => Gr, findCycles: () => Yr, floydWarshall: () => Hr, isAcyclic: () => Vr, postorder: () => Xr, preorder: () => Jr, prim: () => Zr, shortestPaths: () => Qr, tarjan: () => cn, topsort: () => un });
252
252
  var Ar = () => 1;
253
253
  function an(e, t, n, r) {
254
254
  return Br(e, String(t), n || Ar, r || function(o) {
@@ -256,23 +256,23 @@ function an(e, t, n, r) {
256
256
  });
257
257
  }
258
258
  function Br(e, t, n, r) {
259
- let o = {}, i, s = 0, l = e.nodes(), d = function(f) {
260
- let h = n(f);
261
- o[f.v].distance + h < o[f.w].distance && (o[f.w] = { distance: o[f.v].distance + h, predecessor: f.v }, i = !0);
259
+ let o = {}, i, s = 0, l = e.nodes(), d = function(u) {
260
+ let h = n(u);
261
+ o[u.v].distance + h < o[u.w].distance && (o[u.w] = { distance: o[u.v].distance + h, predecessor: u.v }, i = !0);
262
262
  }, a = function() {
263
- l.forEach(function(f) {
264
- r(f).forEach(function(h) {
265
- let g = h.v === f ? h.v : h.w, E = g === h.v ? h.w : h.v;
263
+ l.forEach(function(u) {
264
+ r(u).forEach(function(h) {
265
+ let g = h.v === u ? h.v : h.w, E = g === h.v ? h.w : h.v;
266
266
  d({ v: g, w: E });
267
267
  });
268
268
  });
269
269
  };
270
- l.forEach(function(f) {
271
- let h = f === t ? 0 : Number.POSITIVE_INFINITY;
272
- o[f] = { distance: h, predecessor: "" };
270
+ l.forEach(function(u) {
271
+ let h = u === t ? 0 : Number.POSITIVE_INFINITY;
272
+ o[u] = { distance: h, predecessor: "" };
273
273
  });
274
274
  let c = l.length;
275
- for (let f = 1; f < c && (i = !1, s++, a(), !!i); f++) ;
275
+ for (let u = 1; u < c && (i = !1, s++, a(), !!i); u++) ;
276
276
  if (s === c - 1 && (i = !1, a(), i)) throw new Error("The graph contains a negative weight cycle");
277
277
  return o;
278
278
  }
@@ -347,9 +347,9 @@ function Pe(e, t, n, r) {
347
347
  }
348
348
  function $r(e, t, n, r) {
349
349
  let o = {}, i = new dn(), s, l, d = function(a) {
350
- let c = a.v !== s ? a.v : a.w, f = o[c], h = n(a), g = l.distance + h;
350
+ let c = a.v !== s ? a.v : a.w, u = o[c], h = n(a), g = l.distance + h;
351
351
  if (h < 0) throw new Error("dijkstra does not allow negative edge weights. Bad edge: " + a + " Weight: " + h);
352
- g < f.distance && (f.distance = g, f.predecessor = s, i.decrease(c, g));
352
+ g < u.distance && (u.distance = g, u.predecessor = s, i.decrease(c, g));
353
353
  };
354
354
  for (e.nodes().forEach(function(a) {
355
355
  let c = a === t ? 0 : Number.POSITIVE_INFINITY;
@@ -405,8 +405,8 @@ function Ur(e, t, n) {
405
405
  o.forEach(function(l) {
406
406
  let d = r[l];
407
407
  o.forEach(function(a) {
408
- let c = d[i], f = s[a], h = d[a], g = c.distance + f.distance;
409
- g < h.distance && (h.distance = g, h.predecessor = f.predecessor);
408
+ let c = d[i], u = s[a], h = d[a], g = c.distance + u.distance;
409
+ g < h.distance && (h.distance = g, h.predecessor = u.predecessor);
410
410
  });
411
411
  });
412
412
  }), r;
@@ -416,7 +416,7 @@ var Fe = class extends Error {
416
416
  super(...e);
417
417
  }
418
418
  };
419
- function fn(e) {
419
+ function un(e) {
420
420
  let t = {}, n = {}, r = [];
421
421
  function o(i) {
422
422
  if (i in n) throw new Fe();
@@ -427,7 +427,7 @@ function fn(e) {
427
427
  }
428
428
  function Vr(e) {
429
429
  try {
430
- fn(e);
430
+ un(e);
431
431
  } catch (t) {
432
432
  if (t instanceof Fe) return !1;
433
433
  throw t;
@@ -442,12 +442,12 @@ function qr(e, t, n, r, o) {
442
442
  }, s = {};
443
443
  return t.forEach(function(l) {
444
444
  if (!e.hasNode(l)) throw new Error("Graph does not have node: " + l);
445
- o = un(e, l, n === "post", s, i, r, o);
445
+ o = fn(e, l, n === "post", s, i, r, o);
446
446
  }), o;
447
447
  }
448
- function un(e, t, n, r, o, i, s) {
448
+ function fn(e, t, n, r, o, i, s) {
449
449
  return t in r || (r[t] = !0, n || (s = i(s, t)), o(t).forEach(function(l) {
450
- s = un(e, l, n, r, o, i, s);
450
+ s = fn(e, l, n, r, o, i, s);
451
451
  }), n && (s = i(s, t))), s;
452
452
  }
453
453
  function hn(e, t, n) {
@@ -466,8 +466,8 @@ function Zr(e, t) {
466
466
  function s(d) {
467
467
  let a = d.v === i ? d.w : d.v, c = o.priority(a);
468
468
  if (c !== void 0) {
469
- let f = t(d);
470
- f < c && (r[a] = i, o.decrease(a, f));
469
+ let u = t(d);
470
+ u < c && (r[a] = i, o.decrease(a, u));
471
471
  }
472
472
  }
473
473
  if (e.nodeCount() === 0) return n;
@@ -497,8 +497,8 @@ function eo(e, t, n, r) {
497
497
  for (let s = 0; s < i.length; s++) {
498
498
  let l = r(i[s]);
499
499
  for (let d = 0; d < l.length; d++) {
500
- let a = l[d], c = a.v === i[s] ? a.v : a.w, f = c === a.v ? a.w : a.v;
501
- n({ v: c, w: f }) < 0 && (o = !0);
500
+ let a = l[d], c = a.v === i[s] ? a.v : a.w, u = c === a.v ? a.w : a.v;
501
+ n({ v: c, w: u }) < 0 && (o = !0);
502
502
  }
503
503
  if (o) return an(e, t, n, r);
504
504
  }
@@ -541,14 +541,14 @@ function no(e) {
541
541
  let t = e.nodes().map((r) => {
542
542
  let o = e.node(r).rank;
543
543
  return o === void 0 ? Number.MAX_VALUE : o;
544
- }), n = Q(Math.min, t);
544
+ }), n = ee(Math.min, t);
545
545
  e.nodes().forEach((r) => {
546
546
  let o = e.node(r);
547
547
  Object.hasOwn(o, "rank") && (o.rank -= n);
548
548
  });
549
549
  }
550
550
  function ro(e) {
551
- let t = e.nodes().map((s) => e.node(s).rank).filter((s) => s !== void 0), n = Q(Math.min, t), r = [];
551
+ let t = e.nodes().map((s) => e.node(s).rank).filter((s) => s !== void 0), n = ee(Math.min, t), r = [];
552
552
  e.nodes().forEach((s) => {
553
553
  let l = e.node(s).rank - n;
554
554
  r[l] || (r[l] = []), r[l].push(s);
@@ -571,7 +571,7 @@ function oo(e, t = pn) {
571
571
  return n;
572
572
  }
573
573
  var pn = 65535;
574
- function Q(e, t) {
574
+ function ee(e, t) {
575
575
  if (t.length > pn) {
576
576
  let n = oo(t);
577
577
  return e(...n.map((r) => e(...r)));
@@ -582,7 +582,7 @@ function yn(e) {
582
582
  let r = e.node(n).rank;
583
583
  return r === void 0 ? Number.MIN_VALUE : r;
584
584
  });
585
- return Q(Math.max, t);
585
+ return ee(Math.max, t);
586
586
  }
587
587
  function io(e, t) {
588
588
  let n = { lhs: [], rhs: [] };
@@ -628,7 +628,7 @@ function lo(e, t) {
628
628
  }
629
629
  var Be = "\0", ao = "3.0.0", co = class {
630
630
  constructor() {
631
- Or(this, "_sentinel");
631
+ Ir(this, "_sentinel");
632
632
  let e = {};
633
633
  e._next = e._prev = e, this._sentinel = e;
634
634
  }
@@ -642,17 +642,17 @@ var Be = "\0", ao = "3.0.0", co = class {
642
642
  }
643
643
  toString() {
644
644
  let e = [], t = this._sentinel, n = t._prev;
645
- for (; n !== t; ) e.push(JSON.stringify(n, fo)), n = n._prev;
645
+ for (; n !== t; ) e.push(JSON.stringify(n, uo)), n = n._prev;
646
646
  return "[" + e.join(", ") + "]";
647
647
  }
648
648
  };
649
649
  function Pt(e) {
650
650
  e._prev._next = e._next, e._next._prev = e._prev, delete e._next, delete e._prev;
651
651
  }
652
- function fo(e, t) {
652
+ function uo(e, t) {
653
653
  if (e !== "_next" && e !== "_prev") return t;
654
654
  }
655
- var uo = co, ho = () => 1;
655
+ var fo = co, ho = () => 1;
656
656
  function go(e, t) {
657
657
  if (e.nodeCount() <= 1) return [];
658
658
  let n = yo(e, t || ho);
@@ -690,10 +690,10 @@ function yo(e, t) {
690
690
  }), e.edges().forEach((l) => {
691
691
  let d = n.edge(l.v, l.w) || 0, a = t(l), c = d + a;
692
692
  n.setEdge(l.v, l.w, c);
693
- let f = n.node(l.v), h = n.node(l.w);
694
- o = Math.max(o, f.out += a), r = Math.max(r, h.in += a);
693
+ let u = n.node(l.v), h = n.node(l.w);
694
+ o = Math.max(o, u.out += a), r = Math.max(r, h.in += a);
695
695
  });
696
- let i = bo(o + r + 3).map(() => new uo()), s = r + 1;
696
+ let i = bo(o + r + 3).map(() => new fo()), s = r + 1;
697
697
  return n.nodes().forEach((l) => {
698
698
  et(i, s, n.node(l));
699
699
  }), { graph: n, buckets: i, zeroIdx: s };
@@ -742,8 +742,8 @@ function xo(e, t) {
742
742
  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;
743
743
  if (i === r + 1) return;
744
744
  e.removeEdge(t);
745
- let a, c, f;
746
- for (f = 0, ++r; r < i; ++f, ++r) l.points = [], c = { width: 0, height: 0, edgeLabel: l, edgeObj: t, rank: r }, a = ve(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;
745
+ let a, c, u;
746
+ for (u = 0, ++r; r < i; ++u, ++r) l.points = [], c = { width: 0, height: 0, edgeLabel: l, edgeObj: t, rank: r }, a = ve(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), u === 0 && e.graph().dummyChains.push(a), n = a;
747
747
  e.setEdge(n, o, { weight: l.weight }, s);
748
748
  }
749
749
  function ko(e) {
@@ -758,7 +758,7 @@ function lt(e) {
758
758
  let o = e.node(r);
759
759
  if (Object.hasOwn(t, r)) return o.rank;
760
760
  t[r] = !0;
761
- let i = e.outEdges(r), s = i ? i.map((d) => d == null ? Number.POSITIVE_INFINITY : n(d.w) - e.edge(d).minlen) : [], l = Q(Math.min, s);
761
+ let i = e.outEdges(r), s = i ? i.map((d) => d == null ? Number.POSITIVE_INFINITY : n(d.w) - e.edge(d).minlen) : [], l = ee(Math.min, s);
762
762
  return l === Number.POSITIVE_INFINITY && (l = 0), o.rank = l;
763
763
  }
764
764
  e.sources().forEach(n);
@@ -795,14 +795,14 @@ function No(e, t) {
795
795
  function Co(e, t, n) {
796
796
  e.nodes().forEach((r) => t.node(r).rank += n);
797
797
  }
798
- var { preorder: To, postorder: Io } = it, Oo = ue;
799
- ue.initLowLimValues = dt;
800
- ue.initCutValues = at;
801
- ue.calcCutValue = wn;
802
- ue.leaveEdge = xn;
803
- ue.enterEdge = kn;
804
- ue.exchangeEdges = _n;
805
- function ue(e) {
798
+ var { preorder: To, postorder: Oo } = it, Io = fe;
799
+ fe.initLowLimValues = dt;
800
+ fe.initCutValues = at;
801
+ fe.calcCutValue = wn;
802
+ fe.leaveEdge = xn;
803
+ fe.enterEdge = kn;
804
+ fe.exchangeEdges = _n;
805
+ function fe(e) {
806
806
  e = to(e), lt(e);
807
807
  let t = vn(e);
808
808
  dt(t), at(t, e);
@@ -810,7 +810,7 @@ function ue(e) {
810
810
  for (; n = xn(t); ) r = kn(t, e, n), _n(t, e, n, r);
811
811
  }
812
812
  function at(e, t) {
813
- let n = Io(e, e.nodes());
813
+ let n = Oo(e, e.nodes());
814
814
  n = n.slice(0, n.length - 1), n.forEach((r) => Mo(e, t, r));
815
815
  }
816
816
  function Mo(e, t, n) {
@@ -824,10 +824,10 @@ function wn(e, t, n) {
824
824
  return l && l.forEach((d) => {
825
825
  let a = d.v === n, c = a ? d.w : d.v;
826
826
  if (c !== r) {
827
- let f = a === o, h = t.edge(d).weight;
828
- if (s += f ? h : -h, zo(e, n, c)) {
827
+ let u = a === o, h = t.edge(d).weight;
828
+ if (s += u ? h : -h, zo(e, n, c)) {
829
829
  let g = e.edge(n, c).cutvalue;
830
- s += f ? -g : g;
830
+ s += u ? -g : g;
831
831
  }
832
832
  }
833
833
  }), s;
@@ -896,7 +896,7 @@ function Ro(e) {
896
896
  lt(e), vn(e);
897
897
  }
898
898
  function Rt(e) {
899
- Oo(e);
899
+ Io(e);
900
900
  }
901
901
  var Ao = Bo;
902
902
  function Bo(e) {
@@ -935,7 +935,7 @@ function Wo(e) {
935
935
  return e.children(Be).forEach(r), t;
936
936
  }
937
937
  function $o(e) {
938
- let t = ve(e, "root", {}, "_root"), n = Go(e), r = Object.values(n), o = Q(Math.max, r) - 1, i = 2 * o + 1;
938
+ let t = ve(e, "root", {}, "_root"), n = Go(e), r = Object.values(n), o = ee(Math.max, r) - 1, i = 2 * o + 1;
939
939
  e.graph().nestingRoot = t, e.edges().forEach((l) => e.edge(l).minlen *= i);
940
940
  let s = Yo(e) + 1;
941
941
  e.children(Be).forEach((l) => Sn(e, t, i, s, o, n, l)), e.graph().nodeRankFactor = i;
@@ -947,12 +947,12 @@ function Sn(e, t, n, r, o, i, s) {
947
947
  s !== t && e.setEdge(t, s, { weight: 0, minlen: n });
948
948
  return;
949
949
  }
950
- let a = Lt(e, "_bt"), c = Lt(e, "_bb"), f = e.node(s);
951
- e.setParent(a, s), f.borderTop = a, e.setParent(c, s), f.borderBottom = c, d.forEach((h) => {
950
+ let a = Lt(e, "_bt"), c = Lt(e, "_bb"), u = e.node(s);
951
+ e.setParent(a, s), u.borderTop = a, e.setParent(c, s), u.borderBottom = c, d.forEach((h) => {
952
952
  var g;
953
953
  Sn(e, t, n, r, o, i, h);
954
- let E = e.node(h), m = E.borderTop ? E.borderTop : h, p = E.borderBottom ? E.borderBottom : h, x = E.borderTop ? r : 2 * r, k = m !== p ? 1 : o - ((g = i[s]) != null ? g : 0) + 1;
955
- e.setEdge(a, m, { weight: x, minlen: k, nestingEdge: !0 }), e.setEdge(p, c, { weight: x, minlen: k, nestingEdge: !0 });
954
+ let E = e.node(h), b = E.borderTop ? E.borderTop : h, p = E.borderBottom ? E.borderBottom : h, x = E.borderTop ? r : 2 * r, k = b !== p ? 1 : o - ((g = i[s]) != null ? g : 0) + 1;
955
+ e.setEdge(a, b, { weight: x, minlen: k, nestingEdge: !0 }), e.setEdge(p, c, { weight: x, minlen: k, nestingEdge: !0 });
956
956
  }), e.parent(s) || e.setEdge(t, a, { weight: 0, minlen: o + ((l = i[s]) != null ? l : 0) });
957
957
  }
958
958
  function Go(e) {
@@ -1026,7 +1026,7 @@ function Ve(e) {
1026
1026
  e.x = e.y, e.y = t;
1027
1027
  }
1028
1028
  function Zo(e) {
1029
- let t = {}, n = e.nodes().filter((l) => !e.children(l).length), r = n.map((l) => e.node(l).rank), o = Q(Math.max, r), i = Ne(o + 1).map(() => []);
1029
+ let t = {}, n = e.nodes().filter((l) => !e.children(l).length), r = n.map((l) => e.node(l).rank), o = ee(Math.max, r), i = Ne(o + 1).map(() => []);
1030
1030
  function s(l) {
1031
1031
  if (t[l]) return;
1032
1032
  t[l] = !0;
@@ -1045,7 +1045,7 @@ function Qo(e, t) {
1045
1045
  function ei(e, t, n) {
1046
1046
  let r = lo(n, n.map((a, c) => c)), o = t.flatMap((a) => {
1047
1047
  let c = e.outEdges(a);
1048
- return c ? c.map((f) => ({ pos: r[f.w], weight: e.edge(f).weight })).sort((f, h) => f.pos - h.pos) : [];
1048
+ return c ? c.map((u) => ({ pos: r[u.w], weight: e.edge(u).weight })).sort((u, h) => u.pos - h.pos) : [];
1049
1049
  }), i = 1;
1050
1050
  for (; i < n.length; ) i <<= 1;
1051
1051
  let s = 2 * i - 1;
@@ -1054,9 +1054,9 @@ function ei(e, t, n) {
1054
1054
  return o.forEach((a) => {
1055
1055
  let c = a.pos + i;
1056
1056
  l[c] += a.weight;
1057
- let f = 0;
1058
- for (; c > 0; ) c % 2 && (f += l[c + 1]), c = c - 1 >> 1, l[c] += a.weight;
1059
- d += a.weight * f;
1057
+ let u = 0;
1058
+ for (; c > 0; ) c % 2 && (u += l[c + 1]), c = c - 1 >> 1, l[c] += a.weight;
1059
+ d += a.weight * u;
1060
1060
  }), d;
1061
1061
  }
1062
1062
  function ti(e, t = []) {
@@ -1107,7 +1107,7 @@ function oi(e, t) {
1107
1107
  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;
1108
1108
  }
1109
1109
  function ii(e, t) {
1110
- let n = io(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
+ let n = io(e, (c) => Object.hasOwn(c, "barycenter")), r = n.lhs, o = n.rhs.sort((c, u) => u.i - c.i), i = [], s = 0, l = 0, d = 0;
1111
1111
  r.sort(si(!!t)), d = Dt(i, o, d), r.forEach((c) => {
1112
1112
  d += c.vs.length, i.push(c.vs), s += c.barycenter * c.weight, l += c.weight, d = Dt(i, o, d);
1113
1113
  });
@@ -1134,16 +1134,16 @@ function Cn(e, t, n, r) {
1134
1134
  });
1135
1135
  let c = ni(a, n);
1136
1136
  li(c, d);
1137
- let f = ii(c, r);
1137
+ let u = ii(c, r);
1138
1138
  if (s && l) {
1139
- f.vs = [s, f.vs, l].flat(1);
1139
+ u.vs = [s, u.vs, l].flat(1);
1140
1140
  let h = e.predecessors(s);
1141
1141
  if (h && h.length) {
1142
- let g = e.node(h[0]), E = e.predecessors(l), m = e.node(E[0]);
1143
- Object.hasOwn(f, "barycenter") || (f.barycenter = 0, f.weight = 0), f.barycenter = (f.barycenter * f.weight + g.order + m.order) / (f.weight + 2), f.weight += 2;
1142
+ let g = e.node(h[0]), E = e.predecessors(l), b = e.node(E[0]);
1143
+ Object.hasOwn(u, "barycenter") || (u.barycenter = 0, u.weight = 0), u.barycenter = (u.barycenter * u.weight + g.order + b.order) / (u.weight + 2), u.weight += 2;
1144
1144
  }
1145
1145
  }
1146
- return f;
1146
+ return u;
1147
1147
  }
1148
1148
  function li(e, t) {
1149
1149
  e.forEach((n) => {
@@ -1162,8 +1162,8 @@ function di(e, t, n, r) {
1162
1162
  i.setNode(s), i.setParent(s, d || o);
1163
1163
  let a = e[n](s);
1164
1164
  a && a.forEach((c) => {
1165
- let f = c.v === s ? c.w : c.v, h = i.edge(f, s), g = h !== void 0 ? h.weight : 0;
1166
- i.setEdge(f, s, { weight: e.edge(c).weight + g });
1165
+ let u = c.v === s ? c.w : c.v, h = i.edge(u, s), g = h !== void 0 ? h.weight : 0;
1166
+ i.setEdge(u, s, { weight: e.edge(c).weight + g });
1167
1167
  }), Object.hasOwn(l, "minRank") && i.setNode(s, { borderLeft: l.borderLeft[t], borderRight: l.borderRight[t] });
1168
1168
  }
1169
1169
  }), i;
@@ -1173,7 +1173,7 @@ function ci(e) {
1173
1173
  for (; e.hasNode(t = st("_root")); ) ;
1174
1174
  return t;
1175
1175
  }
1176
- function fi(e, t, n) {
1176
+ function ui(e, t, n) {
1177
1177
  let r = {}, o;
1178
1178
  n.forEach((i) => {
1179
1179
  let s = e.parent(i), l, d;
@@ -1195,9 +1195,9 @@ function Tn(e, t = {}) {
1195
1195
  if ($t(e, i), t.disableOptimalOrderHeuristic) return;
1196
1196
  let s = Number.POSITIVE_INFINITY, l, d = t.constraints || [];
1197
1197
  for (let a = 0, c = 0; c < 4; ++a, ++c) {
1198
- ui(a % 2 ? r : o, a % 4 >= 2, d), i = Te(e);
1199
- let f = Qo(e, i);
1200
- f < s ? (c = 0, l = Object.assign({}, i), s = f) : f === s && (l = structuredClone(i));
1198
+ fi(a % 2 ? r : o, a % 4 >= 2, d), i = Te(e);
1199
+ let u = Qo(e, i);
1200
+ u < s ? (c = 0, l = Object.assign({}, i), s = u) : u === s && (l = structuredClone(i));
1201
1201
  }
1202
1202
  $t(e, l);
1203
1203
  }
@@ -1213,12 +1213,12 @@ function Wt(e, t, n) {
1213
1213
  return di(e, i, n, r.get(i) || []);
1214
1214
  });
1215
1215
  }
1216
- function ui(e, t, n) {
1216
+ function fi(e, t, n) {
1217
1217
  let r = new q();
1218
1218
  e.forEach(function(o) {
1219
1219
  n.forEach((l) => r.setEdge(l.left, l.right));
1220
1220
  let i = o.graph().root, s = Cn(o, i, r, t);
1221
- s.vs.forEach((l, d) => o.node(l).order = d), fi(o, r, s.vs);
1221
+ s.vs.forEach((l, d) => o.node(l).order = d), ui(o, r, s.vs);
1222
1222
  });
1223
1223
  }
1224
1224
  function $t(e, t) {
@@ -1228,15 +1228,15 @@ function hi(e, t) {
1228
1228
  let n = {};
1229
1229
  function r(o, i) {
1230
1230
  let s = 0, l = 0, d = o.length, a = i[i.length - 1];
1231
- return i.forEach((c, f) => {
1231
+ return i.forEach((c, u) => {
1232
1232
  let h = pi(e, c), g = h ? e.node(h).order : d;
1233
- (h || c === a) && (i.slice(l, f + 1).forEach((E) => {
1234
- let m = e.predecessors(E);
1235
- m && m.forEach((p) => {
1233
+ (h || c === a) && (i.slice(l, u + 1).forEach((E) => {
1234
+ let b = e.predecessors(E);
1235
+ b && b.forEach((p) => {
1236
1236
  let x = e.node(p), k = x.order;
1237
- (k < s || g < k) && !(x.dummy && e.node(E).dummy) && In(n, p, E);
1237
+ (k < s || g < k) && !(x.dummy && e.node(E).dummy) && On(n, p, E);
1238
1238
  });
1239
- }), l = f + 1, s = g);
1239
+ }), l = u + 1, s = g);
1240
1240
  }), i;
1241
1241
  }
1242
1242
  return t.length && t.reduce(r), n;
@@ -1245,26 +1245,26 @@ function gi(e, t) {
1245
1245
  let n = {};
1246
1246
  function r(i, s, l, d, a) {
1247
1247
  Ne(s, l).forEach((c) => {
1248
- let f = i[c];
1249
- if (f !== void 0 && e.node(f).dummy) {
1250
- let h = e.predecessors(f);
1248
+ let u = i[c];
1249
+ if (u !== void 0 && e.node(u).dummy) {
1250
+ let h = e.predecessors(u);
1251
1251
  h && h.forEach((g) => {
1252
1252
  if (g === void 0) return;
1253
1253
  let E = e.node(g);
1254
- E.dummy && (E.order < d || E.order > a) && In(n, g, f);
1254
+ E.dummy && (E.order < d || E.order > a) && On(n, g, u);
1255
1255
  });
1256
1256
  }
1257
1257
  });
1258
1258
  }
1259
1259
  function o(i, s) {
1260
1260
  let l = -1, d = -1, a = 0;
1261
- return s.forEach((c, f) => {
1261
+ return s.forEach((c, u) => {
1262
1262
  if (e.node(c).dummy === "border") {
1263
1263
  let h = e.predecessors(c);
1264
1264
  if (h && h.length) {
1265
1265
  let g = h[0];
1266
1266
  if (g === void 0) return;
1267
- d = e.node(g).order, r(s, a, f, l, d), a = f, l = d;
1267
+ d = e.node(g).order, r(s, a, u, l, d), a = u, l = d;
1268
1268
  }
1269
1269
  }
1270
1270
  r(s, a, s.length, d, i.length);
@@ -1278,7 +1278,7 @@ function pi(e, t) {
1278
1278
  if (n) return n.find((r) => e.node(r).dummy);
1279
1279
  }
1280
1280
  }
1281
- function In(e, t, n) {
1281
+ function On(e, t, n) {
1282
1282
  if (t > n) {
1283
1283
  let o = t;
1284
1284
  t = n, n = o;
@@ -1305,17 +1305,17 @@ function bi(e, t, n, r) {
1305
1305
  l.forEach((a) => {
1306
1306
  let c = r(a);
1307
1307
  if (c && c.length) {
1308
- let f = c.sort((g, E) => {
1309
- let m = s[g], p = s[E];
1310
- return (m !== void 0 ? m : 0) - (p !== void 0 ? p : 0);
1311
- }), h = (f.length - 1) / 2;
1308
+ let u = c.sort((g, E) => {
1309
+ let b = s[g], p = s[E];
1310
+ return (b !== void 0 ? b : 0) - (p !== void 0 ? p : 0);
1311
+ }), h = (u.length - 1) / 2;
1312
1312
  for (let g = Math.floor(h), E = Math.ceil(h); g <= E; ++g) {
1313
- let m = f[g];
1314
- if (m === void 0) continue;
1315
- let p = s[m];
1316
- if (p !== void 0 && i[a] === a && d < p && !yi(n, a, m)) {
1317
- let x = o[m];
1318
- x !== void 0 && (i[m] = a, i[a] = o[a] = x, d = p);
1313
+ let b = u[g];
1314
+ if (b === void 0) continue;
1315
+ let p = s[b];
1316
+ if (p !== void 0 && i[a] === a && d < p && !yi(n, a, b)) {
1317
+ let x = o[b];
1318
+ x !== void 0 && (i[b] = a, i[a] = o[a] = x, d = p);
1319
1319
  }
1320
1320
  }
1321
1321
  }
@@ -1325,43 +1325,43 @@ function bi(e, t, n, r) {
1325
1325
  function mi(e, t, n, r, o = !1) {
1326
1326
  let i = {}, s = vi(e, t, n, o), l = o ? "borderLeft" : "borderRight";
1327
1327
  function d(g, E) {
1328
- let m = s.nodes().slice(), p = {}, x = m.pop();
1328
+ let b = s.nodes().slice(), p = {}, x = b.pop();
1329
1329
  for (; x; ) {
1330
1330
  if (p[x]) g(x);
1331
1331
  else {
1332
- p[x] = !0, m.push(x);
1333
- for (let k of E(x)) m.push(k);
1332
+ p[x] = !0, b.push(x);
1333
+ for (let k of E(x)) b.push(k);
1334
1334
  }
1335
- x = m.pop();
1335
+ x = b.pop();
1336
1336
  }
1337
1337
  }
1338
1338
  function a(g) {
1339
1339
  let E = s.inEdges(g);
1340
- E ? i[g] = E.reduce((m, p) => {
1340
+ E ? i[g] = E.reduce((b, p) => {
1341
1341
  var x;
1342
- let k = (x = i[p.v]) != null ? x : 0, O = s.edge(p);
1343
- return Math.max(m, k + (O !== void 0 ? O : 0));
1342
+ let k = (x = i[p.v]) != null ? x : 0, M = s.edge(p);
1343
+ return Math.max(b, k + (M !== void 0 ? M : 0));
1344
1344
  }, 0) : i[g] = 0;
1345
1345
  }
1346
1346
  function c(g) {
1347
- let E = s.outEdges(g), m = Number.POSITIVE_INFINITY;
1348
- E && (m = E.reduce((x, k) => {
1349
- let O = i[k.w], z = s.edge(k);
1350
- return Math.min(x, (O !== void 0 ? O : 0) - (z !== void 0 ? z : 0));
1347
+ let E = s.outEdges(g), b = Number.POSITIVE_INFINITY;
1348
+ E && (b = E.reduce((x, k) => {
1349
+ let M = i[k.w], z = s.edge(k);
1350
+ return Math.min(x, (M !== void 0 ? M : 0) - (z !== void 0 ? z : 0));
1351
1351
  }, Number.POSITIVE_INFINITY));
1352
1352
  let p = e.node(g);
1353
- m !== Number.POSITIVE_INFINITY && p.borderType !== l && (i[g] = Math.max(i[g] !== void 0 ? i[g] : 0, m));
1353
+ b !== Number.POSITIVE_INFINITY && p.borderType !== l && (i[g] = Math.max(i[g] !== void 0 ? i[g] : 0, b));
1354
1354
  }
1355
- function f(g) {
1355
+ function u(g) {
1356
1356
  return s.predecessors(g) || [];
1357
1357
  }
1358
1358
  function h(g) {
1359
1359
  return s.successors(g) || [];
1360
1360
  }
1361
- return d(a, f), d(c, h), Object.keys(r).forEach((g) => {
1361
+ return d(a, u), d(c, h), Object.keys(r).forEach((g) => {
1362
1362
  var E;
1363
- let m = n[g];
1364
- m !== void 0 && (i[g] = (E = i[m]) != null ? E : 0);
1363
+ let b = n[g];
1364
+ b !== void 0 && (i[g] = (E = i[b]) != null ? E : 0);
1365
1365
  }), i;
1366
1366
  }
1367
1367
  function vi(e, t, n, r) {
@@ -1372,10 +1372,10 @@ function vi(e, t, n, r) {
1372
1372
  let c = n[a];
1373
1373
  if (c !== void 0) {
1374
1374
  if (o.setNode(c), d !== void 0) {
1375
- let f = n[d];
1376
- if (f !== void 0) {
1377
- let h = o.edge(f, c);
1378
- o.setEdge(f, c, Math.max(s(e, a, d), h || 0));
1375
+ let u = n[d];
1376
+ if (u !== void 0) {
1377
+ let h = o.edge(u, c);
1378
+ o.setEdge(u, c, Math.max(s(e, a, d), h || 0));
1379
1379
  }
1380
1380
  }
1381
1381
  d = a;
@@ -1395,13 +1395,13 @@ function wi(e, t) {
1395
1395
  }, [Number.POSITIVE_INFINITY, null])[1];
1396
1396
  }
1397
1397
  function Ei(e, t) {
1398
- let n = Object.values(t), r = Q(Math.min, n), o = Q(Math.max, n);
1398
+ let n = Object.values(t), r = ee(Math.min, n), o = ee(Math.max, n);
1399
1399
  ["u", "d"].forEach((i) => {
1400
1400
  ["l", "r"].forEach((s) => {
1401
1401
  let l = i + s, d = e[l];
1402
1402
  if (!d || d === t) return;
1403
- let a = Object.values(d), c = r - Q(Math.min, a);
1404
- s !== "l" && (c = o - Q(Math.max, a)), c && (e[l] = Ae(d, (f) => f + c));
1403
+ let a = Object.values(d), c = r - ee(Math.min, a);
1404
+ s !== "l" && (c = o - ee(Math.max, a)), c && (e[l] = Ae(d, (u) => u + c));
1405
1405
  });
1406
1406
  });
1407
1407
  }
@@ -1465,8 +1465,8 @@ function Ci(e) {
1465
1465
  t.forEach((s) => {
1466
1466
  let l = s.reduce((d, a) => {
1467
1467
  var c;
1468
- let f = (c = e.node(a).height) != null ? c : 0;
1469
- return d > f ? d : f;
1468
+ let u = (c = e.node(a).height) != null ? c : 0;
1469
+ return d > u ? d : u;
1470
1470
  }, 0);
1471
1471
  s.forEach((d) => {
1472
1472
  let a = e.node(d);
@@ -1478,13 +1478,13 @@ function Ti(e, t = {}) {
1478
1478
  let n = t.debugTiming ? bn : mn;
1479
1479
  return n("layout", () => {
1480
1480
  let r = n(" buildLayoutGraph", () => Ai(e));
1481
- return n(" runLayout", () => Ii(r, n, t)), n(" updateInputGraph", () => Oi(e, r)), r;
1481
+ return n(" runLayout", () => Oi(r, n, t)), n(" updateInputGraph", () => Ii(e, r)), r;
1482
1482
  });
1483
1483
  }
1484
- function Ii(e, t, n) {
1484
+ function Oi(e, t, n) {
1485
1485
  t(" makeSpaceForEdgeLabels", () => Bi(e)), t(" removeSelfEdges", () => Vi(e)), t(" acyclic", () => mo(e)), t(" nestingGraph.run", () => $o(e)), t(" rank", () => Lo(gn(e))), t(" injectEdgeLabelProxies", () => Di(e)), t(" removeEmptyRanks", () => ro(e)), t(" nestingGraph.cleanup", () => Ko(e)), t(" normalizeRanks", () => no(e)), t(" assignRankMinMax", () => Wi(e)), t(" removeEdgeLabelProxies", () => $i(e)), t(" normalize.run", () => Eo(e)), t(" parentDummyChains", () => Ao(e)), t(" addBorderSegments", () => Ho(e)), t(" order", () => Tn(e, n)), t(" insertSelfEdges", () => qi(e)), t(" adjustCoordinateSystem", () => Vo(e)), t(" position", () => Ni(e)), t(" positionSelfEdges", () => Xi(e)), t(" removeBorderNodes", () => Ui(e)), t(" normalize.undo", () => ko(e)), t(" fixupEdgeLabelCoords", () => Ki(e)), t(" undoCoordinateSystem", () => qo(e)), t(" translateGraph", () => Gi(e)), t(" assignNodeIntersects", () => Yi(e)), t(" reversePoints", () => Hi(e)), t(" acyclic.undo", () => wo(e));
1486
1486
  }
1487
- function Oi(e, t) {
1487
+ function Ii(e, t) {
1488
1488
  e.nodes().forEach((n) => {
1489
1489
  let r = e.node(n), o = t.node(n);
1490
1490
  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));
@@ -1543,8 +1543,8 @@ function $i(e) {
1543
1543
  function Gi(e) {
1544
1544
  let t = Number.POSITIVE_INFINITY, n = 0, r = Number.POSITIVE_INFINITY, o = 0, i = e.graph(), s = i.marginx || 0, l = i.marginy || 0;
1545
1545
  function d(a) {
1546
- let c = a.x, f = a.y, h = a.width, g = a.height;
1547
- t = Math.min(t, c - h / 2), n = Math.max(n, c + h / 2), r = Math.min(r, f - g / 2), o = Math.max(o, f + g / 2);
1546
+ let c = a.x, u = a.y, h = a.width, g = a.height;
1547
+ t = Math.min(t, c - h / 2), n = Math.max(n, c + h / 2), r = Math.min(r, u - g / 2), o = Math.max(o, u + g / 2);
1548
1548
  }
1549
1549
  e.nodes().forEach((a) => d(e.node(a))), e.edges().forEach((a) => {
1550
1550
  let c = e.edge(a);
@@ -1554,8 +1554,8 @@ function Gi(e) {
1554
1554
  c.x -= t, c.y -= r;
1555
1555
  }), e.edges().forEach((a) => {
1556
1556
  let c = e.edge(a);
1557
- c.points.forEach((f) => {
1558
- f.x -= t, f.y -= r;
1557
+ c.points.forEach((u) => {
1558
+ u.x -= t, u.y -= r;
1559
1559
  }), Object.hasOwn(c, "x") && (c.x -= t), Object.hasOwn(c, "y") && (c.y -= r);
1560
1560
  }), i.width = n - t + s, i.height = o - r + l;
1561
1561
  }
@@ -1674,8 +1674,8 @@ function ns({
1674
1674
  saveLabel: s = "Save",
1675
1675
  saveDisabled: l = !1
1676
1676
  }) {
1677
- const [d, a] = G.useState(!1), [c, f] = G.useState(!1), [h, g] = G.useState(e ?? "");
1678
- G.useEffect(() => {
1677
+ const [d, a] = $.useState(!1), [c, u] = $.useState(!1), [h, g] = $.useState(e ?? "");
1678
+ $.useEffect(() => {
1679
1679
  g(e ?? "");
1680
1680
  }, [e]);
1681
1681
  const E = async () => {
@@ -1687,7 +1687,7 @@ function ns({
1687
1687
  a(!1);
1688
1688
  }
1689
1689
  }
1690
- }, m = ts[r] ?? {
1690
+ }, b = ts[r] ?? {
1691
1691
  bg: r,
1692
1692
  fg: "#fff"
1693
1693
  };
@@ -1705,16 +1705,16 @@ function ns({
1705
1705
  },
1706
1706
  children: [
1707
1707
  /* @__PURE__ */ w("div", { style: { display: "flex", alignItems: "center", gap: 10, minWidth: 0 }, children: [
1708
- c && t ? /* @__PURE__ */ u(
1708
+ c && t ? /* @__PURE__ */ f(
1709
1709
  "input",
1710
1710
  {
1711
1711
  value: h,
1712
1712
  onChange: (p) => g(p.target.value),
1713
1713
  onBlur: () => {
1714
- f(!1), h !== e && t(h);
1714
+ u(!1), h !== e && t(h);
1715
1715
  },
1716
1716
  onKeyDown: (p) => {
1717
- p.key === "Enter" && p.target.blur(), p.key === "Escape" && (g(e ?? ""), f(!1));
1717
+ p.key === "Enter" && p.target.blur(), p.key === "Escape" && (g(e ?? ""), u(!1));
1718
1718
  },
1719
1719
  autoFocus: !0,
1720
1720
  style: {
@@ -1727,10 +1727,10 @@ function ns({
1727
1727
  minWidth: 200
1728
1728
  }
1729
1729
  }
1730
- ) : /* @__PURE__ */ u(
1730
+ ) : /* @__PURE__ */ f(
1731
1731
  "span",
1732
1732
  {
1733
- onClick: () => t && f(!0),
1733
+ onClick: () => t && u(!0),
1734
1734
  style: {
1735
1735
  fontSize: 15,
1736
1736
  fontWeight: 600,
@@ -1745,7 +1745,7 @@ function ns({
1745
1745
  children: e || "Untitled workflow"
1746
1746
  }
1747
1747
  ),
1748
- n && /* @__PURE__ */ u(
1748
+ n && /* @__PURE__ */ f(
1749
1749
  "span",
1750
1750
  {
1751
1751
  style: {
@@ -1753,8 +1753,8 @@ function ns({
1753
1753
  fontWeight: 600,
1754
1754
  padding: "3px 8px",
1755
1755
  borderRadius: 999,
1756
- background: m.bg,
1757
- color: m.fg,
1756
+ background: b.bg,
1757
+ color: b.fg,
1758
1758
  textTransform: "uppercase",
1759
1759
  letterSpacing: 0.4,
1760
1760
  flexShrink: 0
@@ -1764,7 +1764,7 @@ function ns({
1764
1764
  )
1765
1765
  ] }),
1766
1766
  /* @__PURE__ */ w("div", { style: { marginLeft: "auto", display: "flex", alignItems: "center", gap: 8 }, children: [
1767
- i && /* @__PURE__ */ u(
1767
+ i && /* @__PURE__ */ f(
1768
1768
  "button",
1769
1769
  {
1770
1770
  type: "button",
@@ -1784,7 +1784,7 @@ function ns({
1784
1784
  children: "Cancel"
1785
1785
  }
1786
1786
  ),
1787
- o && /* @__PURE__ */ u(
1787
+ o && /* @__PURE__ */ f(
1788
1788
  "button",
1789
1789
  {
1790
1790
  type: "button",
@@ -1814,16 +1814,16 @@ function ns({
1814
1814
  );
1815
1815
  }
1816
1816
  const Ce = ({ isOpen: e, onClose: t, title: n, icon: r, children: o, footer: i, width: s = 720 }) => {
1817
- const [l, d] = L(!1), a = () => d((h) => !h), c = () => /* @__PURE__ */ w(ne, { sx: { display: "flex", alignItems: "center", p: 2, pt: 3, borderBottom: "1px solid #e0e0e0", mb: 0, flexShrink: 0 }, children: [
1818
- r && /* @__PURE__ */ u(ne, { sx: { mr: 1.5, display: "flex", alignItems: "center", fontSize: "1.25rem", color: "#1DBF60" }, children: r }),
1819
- /* @__PURE__ */ u("span", { style: { flexGrow: 1, fontSize: 14, fontWeight: 500, color: "#212121" }, children: n }),
1820
- /* @__PURE__ */ u(It, { onClick: a, size: "small", sx: { mr: 1 }, title: l ? "Collapse" : "Expand", "data-testid": "expand-collapse-base-drawer-btn", children: l ? /* @__PURE__ */ u(vr, {}) : /* @__PURE__ */ u(wr, {}) }),
1821
- /* @__PURE__ */ u(It, { onClick: t, size: "small", "data-testid": "close-drawer-button", children: /* @__PURE__ */ u(or, {}) })
1822
- ] }), f = () => i ? /* @__PURE__ */ u(ne, { sx: { flexShrink: 0, p: 2, borderTop: "1px solid #e0e0e0", display: "flex", justifyContent: "flex-end", gap: 2 }, children: i }) : null;
1817
+ const [l, d] = L(!1), a = () => d((h) => !h), c = () => /* @__PURE__ */ w(re, { sx: { display: "flex", alignItems: "center", p: 2, pt: 3, borderBottom: "1px solid #e0e0e0", mb: 0, flexShrink: 0 }, children: [
1818
+ r && /* @__PURE__ */ f(re, { sx: { mr: 1.5, display: "flex", alignItems: "center", fontSize: "1.25rem", color: "#1DBF60" }, children: r }),
1819
+ /* @__PURE__ */ f("span", { style: { flexGrow: 1, fontSize: 14, fontWeight: 500, color: "#212121" }, children: n }),
1820
+ /* @__PURE__ */ f(Ot, { onClick: a, size: "small", sx: { mr: 1 }, title: l ? "Collapse" : "Expand", "data-testid": "expand-collapse-base-drawer-btn", children: l ? /* @__PURE__ */ f(vr, {}) : /* @__PURE__ */ f(wr, {}) }),
1821
+ /* @__PURE__ */ f(Ot, { onClick: t, size: "small", "data-testid": "close-drawer-button", children: /* @__PURE__ */ f(or, {}) })
1822
+ ] }), u = () => i ? /* @__PURE__ */ f(re, { sx: { flexShrink: 0, p: 2, borderTop: "1px solid #e0e0e0", display: "flex", justifyContent: "flex-end", gap: 2 }, children: i }) : null;
1823
1823
  return l ? /* @__PURE__ */ w(er, { open: e, onClose: t, maxWidth: !1, fullWidth: !0, PaperProps: { sx: { display: "flex", flexDirection: "column", height: "80vh", boxShadow: 24, width: "750px", maxWidth: "100%" } }, children: [
1824
- /* @__PURE__ */ u(c, {}),
1825
- /* @__PURE__ */ u(ne, { sx: { flexGrow: 1, overflowY: "auto", p: 0 }, children: o }),
1826
- /* @__PURE__ */ u(f, {})
1824
+ /* @__PURE__ */ f(c, {}),
1825
+ /* @__PURE__ */ f(re, { sx: { flexGrow: 1, overflowY: "auto", p: 0 }, children: o }),
1826
+ /* @__PURE__ */ f(u, {})
1827
1827
  ] }) : /* @__PURE__ */ w(
1828
1828
  tr,
1829
1829
  {
@@ -1849,9 +1849,9 @@ const Ce = ({ isOpen: e, onClose: t, title: n, icon: r, children: o, footer: i,
1849
1849
  }
1850
1850
  },
1851
1851
  children: [
1852
- /* @__PURE__ */ u(c, {}),
1853
- /* @__PURE__ */ u(ne, { sx: { flexGrow: 1, overflowY: "auto", p: 0 }, children: o }),
1854
- /* @__PURE__ */ u(f, {})
1852
+ /* @__PURE__ */ f(c, {}),
1853
+ /* @__PURE__ */ f(re, { sx: { flexGrow: 1, overflowY: "auto", p: 0 }, children: o }),
1854
+ /* @__PURE__ */ f(u, {})
1855
1855
  ]
1856
1856
  }
1857
1857
  );
@@ -1863,35 +1863,35 @@ const Ce = ({ isOpen: e, onClose: t, title: n, icon: r, children: o, footer: i,
1863
1863
  onClose: o,
1864
1864
  loadTriggerSources: i
1865
1865
  }) => {
1866
- const [s, l] = L("trigger"), [d, a] = L(null), [c, f] = L([]), [h, g] = L([]), [E, m] = L(!1), [p, x] = L(null);
1866
+ const [s, l] = L("trigger"), [d, a] = L(null), [c, u] = L([]), [h, g] = L([]), [E, b] = L(!1), [p, x] = L(null);
1867
1867
  se(() => {
1868
- e || (l("trigger"), a(null), f([]), g([]), m(!1), x(null));
1868
+ e || (l("trigger"), a(null), u([]), g([]), b(!1), x(null));
1869
1869
  }, [e]);
1870
1870
  const k = U(async (P) => {
1871
1871
  if (!i) {
1872
1872
  r(P);
1873
1873
  return;
1874
1874
  }
1875
- a(P), m(!0), x(null);
1875
+ a(P), b(!0), x(null);
1876
1876
  try {
1877
- const M = await i(P.triggerKey);
1878
- if (!M || M.length === 0) {
1877
+ const I = await i(P.triggerKey);
1878
+ if (!I || I.length === 0) {
1879
1879
  r(P);
1880
1880
  return;
1881
1881
  }
1882
- f(M), l("sources");
1883
- } catch (M) {
1884
- x(M instanceof Error ? M.message : "Failed to load sources.");
1882
+ u(I), l("sources");
1883
+ } catch (I) {
1884
+ x(I instanceof Error ? I.message : "Failed to load sources.");
1885
1885
  } finally {
1886
- m(!1);
1886
+ b(!1);
1887
1887
  }
1888
- }, [i, r]), O = () => {
1889
- l("trigger"), a(null), f([]), g([]), x(null);
1888
+ }, [i, r]), M = () => {
1889
+ l("trigger"), a(null), u([]), g([]), x(null);
1890
1890
  }, z = () => {
1891
1891
  d && r(d, h);
1892
- }, W = s === "sources" && d, $ = W ? /* @__PURE__ */ w(Se, { children: [
1893
- /* @__PURE__ */ u(Le, { type: "button", variant: "outlined", size: "small", onClick: O, children: n.cancel ?? "Back" }),
1894
- /* @__PURE__ */ u(
1892
+ }, W = s === "sources" && d, G = W ? /* @__PURE__ */ w(Se, { children: [
1893
+ /* @__PURE__ */ f(Le, { type: "button", variant: "outlined", size: "small", onClick: M, children: n.cancel ?? "Back" }),
1894
+ /* @__PURE__ */ f(
1895
1895
  Le,
1896
1896
  {
1897
1897
  type: "button",
@@ -1903,18 +1903,18 @@ const Ce = ({ isOpen: e, onClose: t, title: n, icon: r, children: o, footer: i,
1903
1903
  }
1904
1904
  )
1905
1905
  ] }) : null;
1906
- return /* @__PURE__ */ u(
1906
+ return /* @__PURE__ */ f(
1907
1907
  Ce,
1908
1908
  {
1909
1909
  isOpen: e,
1910
1910
  onClose: o,
1911
1911
  title: W ? d.label : n.addTriggerTitle,
1912
- icon: /* @__PURE__ */ u(mr, {}),
1912
+ icon: /* @__PURE__ */ f(mr, {}),
1913
1913
  width: 500,
1914
- footer: $,
1915
- children: /* @__PURE__ */ w(ne, { sx: { p: 2 }, children: [
1914
+ footer: G,
1915
+ children: /* @__PURE__ */ w(re, { sx: { p: 2 }, children: [
1916
1916
  !W && /* @__PURE__ */ w(Se, { children: [
1917
- /* @__PURE__ */ u("p", { className: "ff-text-muted ff-mb-3", style: { fontSize: 13 }, children: n.chooseTrigger }),
1917
+ /* @__PURE__ */ f("p", { className: "ff-text-muted ff-mb-3", style: { fontSize: 13 }, children: n.chooseTrigger }),
1918
1918
  /* @__PURE__ */ w("div", { className: "ff-d-flex ff-flex-column ff-gap-2", children: [
1919
1919
  t.map((P) => /* @__PURE__ */ w(
1920
1920
  "div",
@@ -1924,32 +1924,32 @@ const Ce = ({ isOpen: e, onClose: t, title: n, icon: r, children: o, footer: i,
1924
1924
  onClick: () => !E && k(P),
1925
1925
  role: "button",
1926
1926
  tabIndex: 0,
1927
- onKeyDown: (M) => {
1928
- M.key === "Enter" && !E && k(P);
1927
+ onKeyDown: (I) => {
1928
+ I.key === "Enter" && !E && k(P);
1929
1929
  },
1930
- onMouseEnter: (M) => {
1931
- E || (M.currentTarget.style.background = "#f5f5f5");
1930
+ onMouseEnter: (I) => {
1931
+ E || (I.currentTarget.style.background = "#f5f5f5");
1932
1932
  },
1933
- onMouseLeave: (M) => {
1934
- M.currentTarget.style.background = "";
1933
+ onMouseLeave: (I) => {
1934
+ I.currentTarget.style.background = "";
1935
1935
  },
1936
1936
  children: [
1937
- /* @__PURE__ */ u("div", { style: { color: P.triggerCategory === "scheduler" ? "#1976d2" : "#f57c00", marginTop: 2, flexShrink: 0 }, children: P.triggerCategory === "scheduler" ? /* @__PURE__ */ u(ir, { size: 18 }) : /* @__PURE__ */ u(sr, { size: 18 }) }),
1937
+ /* @__PURE__ */ f("div", { style: { color: P.triggerCategory === "scheduler" ? "#1976d2" : "#f57c00", marginTop: 2, flexShrink: 0 }, children: P.triggerCategory === "scheduler" ? /* @__PURE__ */ f(ir, { size: 18 }) : /* @__PURE__ */ f(sr, { size: 18 }) }),
1938
1938
  /* @__PURE__ */ w("div", { children: [
1939
- /* @__PURE__ */ u("div", { style: { fontSize: 14, fontWeight: 500, color: "#212121" }, children: P.label }),
1940
- P.description && /* @__PURE__ */ u("div", { style: { fontSize: 12, color: "#757575", marginTop: 2 }, children: P.description })
1939
+ /* @__PURE__ */ f("div", { style: { fontSize: 14, fontWeight: 500, color: "#212121" }, children: P.label }),
1940
+ P.description && /* @__PURE__ */ f("div", { style: { fontSize: 12, color: "#757575", marginTop: 2 }, children: P.description })
1941
1941
  ] })
1942
1942
  ]
1943
1943
  },
1944
1944
  P.triggerKey
1945
1945
  )),
1946
- t.length === 0 && /* @__PURE__ */ u("p", { className: "ff-text-muted ff-text-center", style: { fontSize: 13 }, children: n.noTriggers })
1946
+ t.length === 0 && /* @__PURE__ */ f("p", { className: "ff-text-muted ff-text-center", style: { fontSize: 13 }, children: n.noTriggers })
1947
1947
  ] }),
1948
- E && /* @__PURE__ */ w(ne, { sx: { display: "flex", alignItems: "center", gap: 1, mt: 2, fontSize: 12, color: "#64748b" }, children: [
1949
- /* @__PURE__ */ u(nr, { size: 14 }),
1950
- /* @__PURE__ */ u("span", { children: "Loading sources for the selected trigger…" })
1948
+ E && /* @__PURE__ */ w(re, { sx: { display: "flex", alignItems: "center", gap: 1, mt: 2, fontSize: 12, color: "#64748b" }, children: [
1949
+ /* @__PURE__ */ f(nr, { size: 14 }),
1950
+ /* @__PURE__ */ f("span", { children: "Loading sources for the selected trigger…" })
1951
1951
  ] }),
1952
- p && /* @__PURE__ */ u("p", { style: { fontSize: 12, color: "#d32f2f", marginTop: 12 }, children: p })
1952
+ p && /* @__PURE__ */ f("p", { style: { fontSize: 12, color: "#d32f2f", marginTop: 12 }, children: p })
1953
1953
  ] }),
1954
1954
  W && /* @__PURE__ */ w(Se, { children: [
1955
1955
  /* @__PURE__ */ w(
@@ -1957,24 +1957,24 @@ const Ce = ({ isOpen: e, onClose: t, title: n, icon: r, children: o, footer: i,
1957
1957
  {
1958
1958
  role: "button",
1959
1959
  tabIndex: 0,
1960
- onClick: O,
1960
+ onClick: M,
1961
1961
  onKeyDown: (P) => {
1962
- P.key === "Enter" && O();
1962
+ P.key === "Enter" && M();
1963
1963
  },
1964
1964
  className: "ff-d-flex ff-align-items-center ff-gap-1 ff-mb-3",
1965
1965
  style: { cursor: "pointer", color: "#0066cc", fontSize: 13, fontWeight: 500, width: "fit-content" },
1966
1966
  children: [
1967
- /* @__PURE__ */ u(Jt, { size: 16 }),
1968
- /* @__PURE__ */ u("span", { children: n.addTriggerTitle })
1967
+ /* @__PURE__ */ f(Jt, { size: 16 }),
1968
+ /* @__PURE__ */ f("span", { children: n.addTriggerTitle })
1969
1969
  ]
1970
1970
  }
1971
1971
  ),
1972
1972
  /* @__PURE__ */ w("p", { className: "ff-text-muted ff-mb-2", style: { fontSize: 13 }, children: [
1973
1973
  "Pick one or more sources for ",
1974
- /* @__PURE__ */ u("strong", { children: d.label }),
1974
+ /* @__PURE__ */ f("strong", { children: d.label }),
1975
1975
  ":"
1976
1976
  ] }),
1977
- /* @__PURE__ */ u(
1977
+ /* @__PURE__ */ f(
1978
1978
  rr,
1979
1979
  {
1980
1980
  isMulti: !0,
@@ -1996,11 +1996,11 @@ const Ce = ({ isOpen: e, onClose: t, title: n, icon: r, children: o, footer: i,
1996
1996
  transition: "background 0.15s"
1997
1997
  }, Ze = "ff-p-3 ff-rounded ff-border ff-d-flex ff-align-items-center ff-gap-3", os = ({ open: e, availableDescriptors: t, messages: n, onSelect: r, onClose: o }) => {
1998
1998
  const { apps: i, ungrouped: s } = V(() => {
1999
- const f = /* @__PURE__ */ new Map(), h = [];
1999
+ const u = /* @__PURE__ */ new Map(), h = [];
2000
2000
  for (const g of t)
2001
2001
  if (g.app) {
2002
- const E = f.get(g.app.key);
2003
- E ? E.descriptors.push(g) : f.set(g.app.key, {
2002
+ const E = u.get(g.app.key);
2003
+ E ? E.descriptors.push(g) : u.set(g.app.key, {
2004
2004
  key: g.app.key,
2005
2005
  label: g.app.label,
2006
2006
  icon: g.app.icon,
@@ -2009,52 +2009,52 @@ const Ce = ({ isOpen: e, onClose: t, title: n, icon: r, children: o, footer: i,
2009
2009
  });
2010
2010
  } else
2011
2011
  h.push(g);
2012
- return { apps: [...f.values()], ungrouped: h };
2013
- }, [t]), [l, d] = L(null), a = l ? i.find((f) => f.key === l) ?? null : null;
2012
+ return { apps: [...u.values()], ungrouped: h };
2013
+ }, [t]), [l, d] = L(null), a = l ? i.find((u) => u.key === l) ?? null : null;
2014
2014
  se(() => {
2015
2015
  e || d(null);
2016
2016
  }, [e]), se(() => {
2017
2017
  d(null);
2018
2018
  }, [t]);
2019
2019
  const c = !a;
2020
- return /* @__PURE__ */ u(
2020
+ return /* @__PURE__ */ f(
2021
2021
  Ce,
2022
2022
  {
2023
2023
  isOpen: e,
2024
2024
  onClose: o,
2025
2025
  title: c ? n.addStepTitle : a.label,
2026
- icon: c ? /* @__PURE__ */ u(lr, {}) : a.icon ?? /* @__PURE__ */ u(ar, {}),
2026
+ icon: c ? /* @__PURE__ */ f(lr, {}) : a.icon ?? /* @__PURE__ */ f(ar, {}),
2027
2027
  width: 500,
2028
- children: /* @__PURE__ */ w(ne, { sx: { p: 2 }, children: [
2028
+ children: /* @__PURE__ */ w(re, { sx: { p: 2 }, children: [
2029
2029
  !c && /* @__PURE__ */ w(
2030
2030
  "div",
2031
2031
  {
2032
2032
  role: "button",
2033
2033
  tabIndex: 0,
2034
2034
  onClick: () => d(null),
2035
- onKeyDown: (f) => {
2036
- f.key === "Enter" && d(null);
2035
+ onKeyDown: (u) => {
2036
+ u.key === "Enter" && d(null);
2037
2037
  },
2038
2038
  className: "ff-d-flex ff-align-items-center ff-gap-1 ff-mb-3",
2039
2039
  style: { cursor: "pointer", color: "#0066cc", fontSize: 13, fontWeight: 500, width: "fit-content" },
2040
2040
  children: [
2041
- /* @__PURE__ */ u(Jt, { size: 16 }),
2042
- /* @__PURE__ */ u("span", { children: n.addStepTitle })
2041
+ /* @__PURE__ */ f(Jt, { size: 16 }),
2042
+ /* @__PURE__ */ f("span", { children: n.addStepTitle })
2043
2043
  ]
2044
2044
  }
2045
2045
  ),
2046
- /* @__PURE__ */ u("p", { className: "ff-text-muted ff-mb-3", style: { fontSize: 13 }, children: c ? n.chooseAction : `Pick an action from ${a.label}` }),
2047
- /* @__PURE__ */ u("div", { className: "ff-d-flex ff-flex-column ff-gap-2", children: c ? /* @__PURE__ */ w(Se, { children: [
2048
- i.map((f) => /* @__PURE__ */ w(
2046
+ /* @__PURE__ */ f("p", { className: "ff-text-muted ff-mb-3", style: { fontSize: 13 }, children: c ? n.chooseAction : `Pick an action from ${a.label}` }),
2047
+ /* @__PURE__ */ f("div", { className: "ff-d-flex ff-flex-column ff-gap-2", children: c ? /* @__PURE__ */ w(Se, { children: [
2048
+ i.map((u) => /* @__PURE__ */ w(
2049
2049
  "div",
2050
2050
  {
2051
2051
  className: Ze,
2052
2052
  style: Je,
2053
- onClick: () => d(f.key),
2053
+ onClick: () => d(u.key),
2054
2054
  role: "button",
2055
2055
  tabIndex: 0,
2056
2056
  onKeyDown: (h) => {
2057
- h.key === "Enter" && d(f.key);
2057
+ h.key === "Enter" && d(u.key);
2058
2058
  },
2059
2059
  onMouseEnter: (h) => {
2060
2060
  h.currentTarget.style.background = "#f5f5f5";
@@ -2063,26 +2063,26 @@ const Ce = ({ isOpen: e, onClose: t, title: n, icon: r, children: o, footer: i,
2063
2063
  h.currentTarget.style.background = "";
2064
2064
  },
2065
2065
  children: [
2066
- f.icon && /* @__PURE__ */ u("div", { style: { flexShrink: 0 }, children: f.icon }),
2066
+ u.icon && /* @__PURE__ */ f("div", { style: { flexShrink: 0 }, children: u.icon }),
2067
2067
  /* @__PURE__ */ w("div", { style: { flex: 1, minWidth: 0 }, children: [
2068
- /* @__PURE__ */ u("div", { style: { fontSize: 14, fontWeight: 500, color: "#212121" }, children: f.label }),
2069
- /* @__PURE__ */ u("div", { style: { fontSize: 12, color: "#757575", marginTop: 2 }, children: f.description ?? `${f.descriptors.length} action${f.descriptors.length === 1 ? "" : "s"}` })
2068
+ /* @__PURE__ */ f("div", { style: { fontSize: 14, fontWeight: 500, color: "#212121" }, children: u.label }),
2069
+ /* @__PURE__ */ f("div", { style: { fontSize: 12, color: "#757575", marginTop: 2 }, children: u.description ?? `${u.descriptors.length} action${u.descriptors.length === 1 ? "" : "s"}` })
2070
2070
  ] }),
2071
- /* @__PURE__ */ u(Zt, { size: 18, color: "#9e9e9e" })
2071
+ /* @__PURE__ */ f(Zt, { size: 18, color: "#9e9e9e" })
2072
2072
  ]
2073
2073
  },
2074
- `app-${f.key}`
2074
+ `app-${u.key}`
2075
2075
  )),
2076
- s.map((f) => /* @__PURE__ */ w(
2076
+ s.map((u) => /* @__PURE__ */ w(
2077
2077
  "div",
2078
2078
  {
2079
2079
  className: Ze,
2080
2080
  style: Je,
2081
- onClick: () => r(f),
2081
+ onClick: () => r(u),
2082
2082
  role: "button",
2083
2083
  tabIndex: 0,
2084
2084
  onKeyDown: (h) => {
2085
- h.key === "Enter" && r(f);
2085
+ h.key === "Enter" && r(u);
2086
2086
  },
2087
2087
  onMouseEnter: (h) => {
2088
2088
  h.currentTarget.style.background = "#f5f5f5";
@@ -2091,25 +2091,25 @@ const Ce = ({ isOpen: e, onClose: t, title: n, icon: r, children: o, footer: i,
2091
2091
  h.currentTarget.style.background = "";
2092
2092
  },
2093
2093
  children: [
2094
- f.icon && /* @__PURE__ */ u("div", { style: { flexShrink: 0 }, children: f.icon }),
2095
- /* @__PURE__ */ u("span", { style: { fontSize: 14, fontWeight: 500, color: "#212121" }, children: f.label })
2094
+ u.icon && /* @__PURE__ */ f("div", { style: { flexShrink: 0 }, children: u.icon }),
2095
+ /* @__PURE__ */ f("span", { style: { fontSize: 14, fontWeight: 500, color: "#212121" }, children: u.label })
2096
2096
  ]
2097
2097
  },
2098
- f.type
2098
+ u.type
2099
2099
  )),
2100
- i.length === 0 && s.length === 0 && /* @__PURE__ */ u("p", { className: "ff-text-muted ff-text-center", style: { fontSize: 13 }, children: n.noActions })
2100
+ i.length === 0 && s.length === 0 && /* @__PURE__ */ f("p", { className: "ff-text-muted ff-text-center", style: { fontSize: 13 }, children: n.noActions })
2101
2101
  ] }) : (
2102
2102
  /* Stage 2 — actions for the selected app */
2103
- a.descriptors.map((f) => /* @__PURE__ */ w(
2103
+ a.descriptors.map((u) => /* @__PURE__ */ w(
2104
2104
  "div",
2105
2105
  {
2106
2106
  className: Ze,
2107
2107
  style: Je,
2108
- onClick: () => r(f),
2108
+ onClick: () => r(u),
2109
2109
  role: "button",
2110
2110
  tabIndex: 0,
2111
2111
  onKeyDown: (h) => {
2112
- h.key === "Enter" && r(f);
2112
+ h.key === "Enter" && r(u);
2113
2113
  },
2114
2114
  onMouseEnter: (h) => {
2115
2115
  h.currentTarget.style.background = "#f5f5f5";
@@ -2118,11 +2118,11 @@ const Ce = ({ isOpen: e, onClose: t, title: n, icon: r, children: o, footer: i,
2118
2118
  h.currentTarget.style.background = "";
2119
2119
  },
2120
2120
  children: [
2121
- f.icon && /* @__PURE__ */ u("div", { style: { flexShrink: 0 }, children: f.icon }),
2122
- /* @__PURE__ */ u("span", { style: { fontSize: 14, fontWeight: 500, color: "#212121" }, children: f.label })
2121
+ u.icon && /* @__PURE__ */ f("div", { style: { flexShrink: 0 }, children: u.icon }),
2122
+ /* @__PURE__ */ f("span", { style: { fontSize: 14, fontWeight: 500, color: "#212121" }, children: u.label })
2123
2123
  ]
2124
2124
  },
2125
- f.type
2125
+ u.type
2126
2126
  ))
2127
2127
  ) })
2128
2128
  ] })
@@ -2139,7 +2139,7 @@ function Ut(e) {
2139
2139
  }) : Array.isArray(e.fields) && e.fields.length > 0;
2140
2140
  }
2141
2141
  const is = ({ open: e, nodeId: t, descriptor: n, initialValues: r, messages: o, onSave: i, onClose: s }) => {
2142
- const [l, d] = L({ layout: "flat", fields: [] }), [a, c] = L(!1), [f, h] = L(null), [g, E] = L({});
2142
+ const [l, d] = L({ layout: "flat", fields: [] }), [a, c] = L(!1), [u, h] = L(null), [g, E] = L({});
2143
2143
  se(() => {
2144
2144
  E((r == null ? void 0 : r[Kt]) ?? {});
2145
2145
  }, [r, t]), se(() => {
@@ -2148,22 +2148,22 @@ const is = ({ open: e, nodeId: t, descriptor: n, initialValues: r, messages: o,
2148
2148
  d({ layout: "flat", fields: [] }), c(!1);
2149
2149
  return;
2150
2150
  }
2151
- const O = n.formSchema;
2152
- return typeof O == "function" ? (c(!0), O(t).then((z) => {
2151
+ const M = n.formSchema;
2152
+ return typeof M == "function" ? (c(!0), M(t).then((z) => {
2153
2153
  k || (d(Ht(z)), c(!1));
2154
2154
  }).catch((z) => {
2155
2155
  k || (d({ layout: "flat", fields: [] }), h(z instanceof Error ? z.message : "Unable to load configuration."), c(!1));
2156
- })) : (d(Ht(O)), c(!1)), () => {
2156
+ })) : (d(Ht(M)), c(!1)), () => {
2157
2157
  k = !0;
2158
2158
  };
2159
2159
  }, [n, t]);
2160
- const m = t ? `node-config-form-${t}` : "node-config-form", p = !a && !f && Ut(l), x = p ? /* @__PURE__ */ w(Se, { children: [
2161
- /* @__PURE__ */ u(Le, { type: "button", variant: "text", size: "small", sx: { textTransform: "none", color: "#475569" }, onClick: s, children: o.cancel }),
2162
- /* @__PURE__ */ u(
2160
+ const b = t ? `node-config-form-${t}` : "node-config-form", p = !a && !u && Ut(l), x = p ? /* @__PURE__ */ w(Se, { children: [
2161
+ /* @__PURE__ */ f(Le, { type: "button", variant: "text", size: "small", sx: { textTransform: "none", color: "#475569" }, onClick: s, children: o.cancel }),
2162
+ /* @__PURE__ */ f(
2163
2163
  Le,
2164
2164
  {
2165
2165
  type: "submit",
2166
- form: m,
2166
+ form: b,
2167
2167
  variant: "contained",
2168
2168
  size: "small",
2169
2169
  disableElevation: !0,
@@ -2178,14 +2178,14 @@ const is = ({ open: e, nodeId: t, descriptor: n, initialValues: r, messages: o,
2178
2178
  }
2179
2179
  )
2180
2180
  ] }) : null;
2181
- return n != null && n.customPanel && t ? /* @__PURE__ */ u(Ce, { isOpen: e, onClose: s, title: n.label ?? o.configureStep, icon: n.icon, width: 500, children: n.customPanel({
2181
+ return n != null && n.customPanel && t ? /* @__PURE__ */ f(Ce, { isOpen: e, onClose: s, title: n.label ?? o.configureStep, icon: n.icon, width: 500, children: n.customPanel({
2182
2182
  nodeId: t,
2183
2183
  data: r ?? {},
2184
2184
  onSave: (k) => {
2185
2185
  i(t, k), s();
2186
2186
  },
2187
2187
  onClose: s
2188
- }) }) : /* @__PURE__ */ u(
2188
+ }) }) : /* @__PURE__ */ f(
2189
2189
  Ce,
2190
2190
  {
2191
2191
  isOpen: e,
@@ -2194,22 +2194,22 @@ const is = ({ open: e, nodeId: t, descriptor: n, initialValues: r, messages: o,
2194
2194
  icon: n == null ? void 0 : n.icon,
2195
2195
  width: 500,
2196
2196
  footer: x,
2197
- children: /* @__PURE__ */ w(ne, { sx: { p: 2 }, children: [
2198
- a && /* @__PURE__ */ u("p", { className: "ff-text-muted", style: { fontSize: 13 }, children: o.loadingConfiguration }),
2199
- !a && f && /* @__PURE__ */ u("p", { style: { fontSize: 13, color: "#d32f2f" }, children: f }),
2200
- !a && !f && !Ut(l) && /* @__PURE__ */ u("p", { className: "ff-text-muted", style: { fontSize: 13 }, children: o.noConfigurationNeeded }),
2201
- p && /* @__PURE__ */ u(
2197
+ children: /* @__PURE__ */ w(re, { sx: { p: 2 }, children: [
2198
+ a && /* @__PURE__ */ f("p", { className: "ff-text-muted", style: { fontSize: 13 }, children: o.loadingConfiguration }),
2199
+ !a && u && /* @__PURE__ */ f("p", { style: { fontSize: 13, color: "#d32f2f" }, children: u }),
2200
+ !a && !u && !Ut(l) && /* @__PURE__ */ f("p", { className: "ff-text-muted", style: { fontSize: 13 }, children: o.noConfigurationNeeded }),
2201
+ p && /* @__PURE__ */ f(
2202
2202
  xr,
2203
2203
  {
2204
2204
  schema: l,
2205
2205
  initialValues: r ?? {},
2206
- formId: m,
2206
+ formId: b,
2207
2207
  conditionConfig: g,
2208
2208
  onConditionConfigChange: E,
2209
2209
  onSubmit: (k) => {
2210
2210
  if (!t) return;
2211
- const O = Object.keys(g).length > 0;
2212
- i(t, { ...k, [Kt]: O ? g : void 0 }), s();
2211
+ const M = Object.keys(g).length > 0;
2212
+ i(t, { ...k, [Kt]: M ? g : void 0 }), s();
2213
2213
  }
2214
2214
  }
2215
2215
  )
@@ -2230,26 +2230,26 @@ const is = ({ open: e, nodeId: t, descriptor: n, initialValues: r, messages: o,
2230
2230
  return;
2231
2231
  }
2232
2232
  s({ status: "loading" }), o(n).then((l) => s({ status: "loaded", state: l })).catch((l) => s({ status: "error", message: (l == null ? void 0 : l.message) ?? "Failed to load workflow" }));
2233
- }, [e, n, o]), /* @__PURE__ */ u(
2233
+ }, [e, n, o]), /* @__PURE__ */ f(
2234
2234
  Ce,
2235
2235
  {
2236
2236
  isOpen: e,
2237
2237
  onClose: t,
2238
2238
  title: r ? `Preview: ${r}` : "Sub-Workflow Preview",
2239
- icon: /* @__PURE__ */ u(cr, { size: 18, color: "#00695c" }),
2239
+ icon: /* @__PURE__ */ f(cr, { size: 18, color: "#00695c" }),
2240
2240
  width: 700,
2241
2241
  children: /* @__PURE__ */ w("div", { style: { height: "100%", display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", padding: 24 }, children: [
2242
- i.status === "idle" && /* @__PURE__ */ u("span", { style: { color: "#9e9e9e", fontSize: 14 }, children: "Select a workflow to preview" }),
2242
+ i.status === "idle" && /* @__PURE__ */ f("span", { style: { color: "#9e9e9e", fontSize: 14 }, children: "Select a workflow to preview" }),
2243
2243
  i.status === "loading" && /* @__PURE__ */ w("div", { style: { textAlign: "center", color: "#9e9e9e" }, children: [
2244
- /* @__PURE__ */ u("div", { style: { width: 32, height: 32, borderRadius: "50%", border: "3px solid #e0e0e0", borderTopColor: "#00897b", animation: "spin 0.8s linear infinite", margin: "0 auto 12px" } }),
2245
- /* @__PURE__ */ u("span", { style: { fontSize: 14 }, children: "Loading workflow…" }),
2246
- /* @__PURE__ */ u("style", { children: "@keyframes spin { to { transform: rotate(360deg); } }" })
2244
+ /* @__PURE__ */ f("div", { style: { width: 32, height: 32, borderRadius: "50%", border: "3px solid #e0e0e0", borderTopColor: "#00897b", animation: "spin 0.8s linear infinite", margin: "0 auto 12px" } }),
2245
+ /* @__PURE__ */ f("span", { style: { fontSize: 14 }, children: "Loading workflow…" }),
2246
+ /* @__PURE__ */ f("style", { children: "@keyframes spin { to { transform: rotate(360deg); } }" })
2247
2247
  ] }),
2248
2248
  i.status === "error" && /* @__PURE__ */ w("div", { style: { textAlign: "center", color: "#c62828" }, children: [
2249
- /* @__PURE__ */ u(dr, { size: 32, style: { marginBottom: 8 } }),
2250
- /* @__PURE__ */ u("p", { style: { margin: 0, fontSize: 14 }, children: i.message })
2249
+ /* @__PURE__ */ f(dr, { size: 32, style: { marginBottom: 8 } }),
2250
+ /* @__PURE__ */ f("p", { style: { margin: 0, fontSize: 14 }, children: i.message })
2251
2251
  ] }),
2252
- i.status === "loaded" && /* @__PURE__ */ u("div", { style: { width: "100%", flex: 1 }, children: /* @__PURE__ */ u(ls, { state: i.state }) })
2252
+ i.status === "loaded" && /* @__PURE__ */ f("div", { style: { width: "100%", flex: 1 }, children: /* @__PURE__ */ f(ls, { state: i.state }) })
2253
2253
  ] })
2254
2254
  }
2255
2255
  );
@@ -2263,7 +2263,7 @@ const is = ({ open: e, nodeId: t, descriptor: n, initialValues: r, messages: o,
2263
2263
  ]).then(([i, s, l]) => {
2264
2264
  n(() => i), o({ nodeTypeRegistry: s, templateRegistry: l });
2265
2265
  });
2266
- }, []), !t || !r ? /* @__PURE__ */ u("div", { style: { color: "#9e9e9e", fontSize: 13, textAlign: "center" }, children: "Loading canvas…" }) : /* @__PURE__ */ u("div", { style: { width: "100%", height: 480, border: "1px solid #e0e0e0", borderRadius: 8, overflow: "hidden" }, children: /* @__PURE__ */ u(
2266
+ }, []), !t || !r ? /* @__PURE__ */ f("div", { style: { color: "#9e9e9e", fontSize: 13, textAlign: "center" }, children: "Loading canvas…" }) : /* @__PURE__ */ f("div", { style: { width: "100%", height: 480, border: "1px solid #e0e0e0", borderRadius: 8, overflow: "hidden" }, children: /* @__PURE__ */ f(
2267
2267
  t,
2268
2268
  {
2269
2269
  nodeRegistry: r.nodeTypeRegistry,
@@ -2307,53 +2307,53 @@ function ds(e, t, n, r = "TB") {
2307
2307
  return { ...i, position: { x: s.x - l / 2, y: s.y - d / 2 } };
2308
2308
  });
2309
2309
  }
2310
- const fe = (e) => e === "filter" || e === "approval";
2310
+ const ue = (e) => e === "filter" || e === "approval";
2311
2311
  function cs(e, t, n, r) {
2312
- const s = tt, l = 30, d = 30, a = {}, c = {}, f = /* @__PURE__ */ new Map();
2313
- for (const p of e) f.set(p.id, p);
2312
+ const s = tt, l = 30, d = 30, a = {}, c = {}, u = /* @__PURE__ */ new Map();
2313
+ for (const p of e) u.set(p.id, p);
2314
2314
  for (const p of Object.values(t))
2315
2315
  for (const x of Object.values(p))
2316
- for (const k of x) f.set(k.id, k);
2316
+ for (const k of x) u.set(k.id, k);
2317
2317
  const h = (p, x, k) => {
2318
- const O = r[p] ?? { width: me, height: 80 };
2319
- return a[p] = { x: x - O.width / 2, y: k }, k + O.height;
2318
+ const M = r[p] ?? { width: me, height: 80 };
2319
+ return a[p] = { x: x - M.width / 2, y: k }, k + M.height;
2320
2320
  }, g = (p, x, k) => {
2321
- let O = k;
2321
+ let M = k;
2322
2322
  for (const z of p)
2323
- O = h(z.id, x, O) + s, fe(z.kind) && t[z.id] && (O = E(z.id, x, O));
2324
- return O;
2323
+ M = h(z.id, x, M) + s, ue(z.kind) && t[z.id] && (M = E(z.id, x, M));
2324
+ return M;
2325
2325
  }, E = (p, x, k) => {
2326
- const O = x + 180, z = t[p], W = Object.keys(z), $ = f.get(p), P = ($ == null ? void 0 : $.branchLabels) ?? { pass: "Pass", fail: "Fail" }, M = a[p], H = r[p] ?? { width: me, height: 80 }, oe = M.y + H.height;
2327
- if (($ == null ? void 0 : $.branchStyle) === "inline-gate") {
2328
- const ie = [], he = x + H.width / 2 + 140;
2329
- let ee = M.y + H.height / 2;
2326
+ const M = x + 180, z = t[p], W = Object.keys(z), G = u.get(p), P = (G == null ? void 0 : G.branchLabels) ?? { pass: "Pass", fail: "Fail" }, I = a[p], Y = r[p] ?? { width: me, height: 80 }, J = I.y + Y.height;
2327
+ if ((G == null ? void 0 : G.branchStyle) === "inline-gate") {
2328
+ const ie = [], he = x + Y.width / 2 + 140;
2329
+ let te = I.y + Y.height / 2;
2330
2330
  W.slice(1).forEach((ge) => {
2331
2331
  var we, Ee;
2332
- ie.push({ y: ee - oe, label: P[ge] ?? ge, isPass: !1 });
2333
- const De = ee - (((Ee = r[(we = z[ge][0]) == null ? void 0 : we.id]) == null ? void 0 : Ee.height) ?? 50) / 2;
2334
- ee = g(z[ge], he, De) + l;
2332
+ ie.push({ y: te - J, label: P[ge] ?? ge, isPass: !1 });
2333
+ const De = te - (((Ee = r[(we = z[ge][0]) == null ? void 0 : we.id]) == null ? void 0 : Ee.height) ?? 50) / 2;
2334
+ te = g(z[ge], he, De) + l;
2335
2335
  });
2336
- const Oe = g(z[W[0]], x, k);
2337
- return c[p] = { branches: ie, height: Math.max(ee, Oe) - oe, indent: 180 }, Math.max(Oe, ee);
2336
+ const Ie = g(z[W[0]], x, k);
2337
+ return c[p] = { branches: ie, height: Math.max(te, Ie) - J, indent: 180 }, Math.max(Ie, te);
2338
2338
  }
2339
2339
  const le = [];
2340
2340
  let A = k;
2341
2341
  return W.forEach((ie, he) => {
2342
- const Ie = z[ie], ee = A;
2342
+ const Oe = z[ie], te = A;
2343
2343
  le.push({
2344
- y: ee - oe,
2344
+ y: te - J,
2345
2345
  label: P[ie] ?? ie,
2346
2346
  isPass: he === 0
2347
- }), A = g(Ie, O, A + d), he < W.length - 1 && (A += l);
2347
+ }), A = g(Oe, M, A + d), he < W.length - 1 && (A += l);
2348
2348
  }), c[p] = {
2349
2349
  branches: le,
2350
- height: A - oe,
2350
+ height: A - J,
2351
2351
  indent: 180
2352
2352
  }, A;
2353
2353
  };
2354
- let m = nt;
2354
+ let b = nt;
2355
2355
  for (const p of e)
2356
- m = h(p.id, 400, m) + s, fe(p.kind) && t[p.id] && (m = E(p.id, 400, m));
2356
+ b = h(p.id, 400, b) + s, ue(p.kind) && t[p.id] && (b = E(p.id, 400, b));
2357
2357
  return {
2358
2358
  nodes: n.map((p) => a[p.id] ? { ...p, position: a[p.id] } : p),
2359
2359
  railSpecs: c
@@ -2369,7 +2369,7 @@ function qt(e) {
2369
2369
  selectable: !1
2370
2370
  };
2371
2371
  }
2372
- function fs(e, t, n, r, o) {
2372
+ function us(e, t, n, r, o) {
2373
2373
  return {
2374
2374
  id: `e-${e.id}-${t.id}`,
2375
2375
  source: e.id,
@@ -2383,45 +2383,51 @@ function fs(e, t, n, r, o) {
2383
2383
  }
2384
2384
  };
2385
2385
  }
2386
- function us(e, t, n, r, o = {}, i = "TB", s = "horizontal") {
2387
- const l = o.edgeColor ?? "#b0bec5", d = [], a = [], c = (m, p, x) => {
2388
- const k = t[m];
2386
+ function fs(e, t, n, r, o = {}, i = "TB", s = "horizontal") {
2387
+ const l = o.edgeColor ?? "#b0bec5", d = [], a = [], c = (b, p, x) => {
2388
+ const k = t[b];
2389
2389
  if (!k) return;
2390
- const z = p ?? { pass: "Pass", fail: "Fail" }, W = Object.keys(k), $ = x === "inline-gate", P = (M, H, oe, le) => {
2391
- if (M.length !== 0) {
2392
- M.forEach((A) => d.push(qt(A))), $ && le === 0 ? a.push({
2393
- id: `e-${m}-${H}-start`,
2394
- source: m,
2390
+ const z = p ?? { pass: "Pass", fail: "Fail" }, W = Object.keys(k), G = x === "inline-gate", P = (I, Y, J, le) => {
2391
+ if (I.length !== 0) {
2392
+ I.forEach((A) => d.push(qt(A))), G && le === 0 ? a.push({
2393
+ id: `e-${b}-${Y}-start`,
2394
+ source: b,
2395
2395
  sourceHandle: "pass",
2396
- target: M[0].id,
2397
- type: "plusEdge",
2396
+ target: I[0].id,
2397
+ type: "gatewayBranchEdge",
2398
+ style: { stroke: l },
2399
+ data: { branch: Y, filterId: b, label: J, isFirst: !0, onAddStepClick: n, verticalRouting: !0, railless: !0 }
2400
+ }) : G ? a.push({
2401
+ id: `e-${b}-${Y}-start`,
2402
+ source: b,
2403
+ sourceHandle: "fail",
2404
+ target: I[0].id,
2405
+ targetHandle: "left",
2406
+ type: "gatewayBranchEdge",
2398
2407
  style: { stroke: l },
2399
- data: { onAddStepClick: n, referenceNodeType: "filterNode", filterId: m, branch: H }
2408
+ data: { branch: Y, filterId: b, label: J, isFirst: !1, sideRouting: !0 }
2400
2409
  }) : a.push({
2401
- id: `e-${m}-${H}-start`,
2402
- source: m,
2403
- // inline-gate Fail leaves the dedicated RIGHT handle so it routes out
2404
- // to the side instead of tangling with the Pass edge at the bottom.
2405
- ...$ ? { sourceHandle: "fail" } : {},
2406
- target: M[0].id,
2410
+ id: `e-${b}-${Y}-start`,
2411
+ source: b,
2412
+ target: I[0].id,
2407
2413
  type: "gatewayBranchEdge",
2408
2414
  style: { stroke: l },
2409
- data: { branch: H, filterId: m, label: oe, isFirst: le === 0, onAddStepClick: n, verticalRouting: s === "vertical" && !$, sideRouting: $ }
2415
+ data: { branch: Y, filterId: b, label: J, isFirst: le === 0, onAddStepClick: n, verticalRouting: s === "vertical" }
2410
2416
  });
2411
- for (let A = 1; A < M.length; A++)
2412
- fe(M[A - 1].kind) || a.push(fs(M[A - 1], M[A], l, n, { filterId: m, branch: H }));
2413
- for (const A of M)
2414
- fe(A.kind) && t[A.id] && c(A.id, A.branchLabels, A.branchStyle);
2417
+ for (let A = 1; A < I.length; A++)
2418
+ ue(I[A - 1].kind) || a.push(us(I[A - 1], I[A], l, n, { filterId: b, branch: Y }));
2419
+ for (const A of I)
2420
+ ue(A.kind) && t[A.id] && c(A.id, A.branchLabels, A.branchStyle);
2415
2421
  }
2416
2422
  };
2417
- W.forEach((M, H) => {
2418
- P(k[M], M, z[M] ?? M, H);
2423
+ W.forEach((I, Y) => {
2424
+ P(k[I], I, z[I] ?? I, Y);
2419
2425
  });
2420
2426
  };
2421
- for (let m = 0; m < e.length; m++) {
2422
- const p = e[m];
2423
- if (d.push(qt(p)), m > 0) {
2424
- const x = e[m - 1], k = x.kind === "start" || x.kind === "addTrigger";
2427
+ for (let b = 0; b < e.length; b++) {
2428
+ const p = e[b];
2429
+ if (d.push(qt(p)), b > 0) {
2430
+ const x = e[b - 1], k = x.kind === "start" || x.kind === "addTrigger";
2425
2431
  if (x.kind === "filter" || x.kind === "approval") continue;
2426
2432
  a.push({
2427
2433
  id: `e-${x.id}-${p.id}`,
@@ -2437,37 +2443,37 @@ function us(e, t, n, r, o = {}, i = "TB", s = "horizontal") {
2437
2443
  }
2438
2444
  (p.kind === "filter" || p.kind === "approval") && t[p.id] && c(p.id, p.branchLabels, p.branchStyle);
2439
2445
  }
2440
- const f = {};
2441
- if (d.forEach((m) => {
2442
- f[m.id] = {
2446
+ const u = {};
2447
+ if (d.forEach((b) => {
2448
+ u[b.id] = {
2443
2449
  width: me,
2444
- height: r[m.id] ?? rt[m.type ?? ""] ?? 80
2450
+ height: r[b.id] ?? rt[b.type ?? ""] ?? 80
2445
2451
  };
2446
2452
  }), !(Object.keys(t).length > 0)) {
2447
2453
  if (i === "LR") {
2448
- let O = nt;
2454
+ let M = nt;
2449
2455
  return { nodes: d.map((W) => {
2450
- const $ = f[W.id].width, P = f[W.id].height, M = { ...W, position: { x: O, y: 300 - P / 2 } };
2451
- return O += $ + tt, M;
2456
+ const G = u[W.id].width, P = u[W.id].height, I = { ...W, position: { x: M, y: 300 - P / 2 } };
2457
+ return M += G + tt, I;
2452
2458
  }), edges: a };
2453
2459
  }
2454
- const m = 400;
2460
+ const b = 400;
2455
2461
  let p = nt;
2456
2462
  return { nodes: d.map((k) => {
2457
- const O = f[k.id].height, z = { ...k, position: { x: m - me / 2, y: p } };
2458
- return p += O + tt, z;
2463
+ const M = u[k.id].height, z = { ...k, position: { x: b - me / 2, y: p } };
2464
+ return p += M + tt, z;
2459
2465
  }), edges: a };
2460
2466
  }
2461
- const g = e.some((m) => m.branchStyle === "inline-gate") || Object.values(t).some(
2462
- (m) => Object.values(m).flat().some((p) => p.branchStyle === "inline-gate")
2467
+ const g = e.some((b) => b.branchStyle === "inline-gate") || Object.values(t).some(
2468
+ (b) => Object.values(b).flat().some((p) => p.branchStyle === "inline-gate")
2463
2469
  );
2464
2470
  if (s === "vertical" || g) {
2465
- const { nodes: m, railSpecs: p } = cs(e, t, d, f);
2466
- return { nodes: m.map(
2471
+ const { nodes: b, railSpecs: p } = cs(e, t, d, u);
2472
+ return { nodes: b.map(
2467
2473
  (k) => p[k.id] ? { ...k, data: { ...k.data, _branchRail: p[k.id] } } : k
2468
2474
  ), edges: a };
2469
2475
  }
2470
- return { nodes: ds(d, a, f, i), edges: a };
2476
+ return { nodes: ds(d, a, u, i), edges: a };
2471
2477
  }
2472
2478
  const Xt = ({
2473
2479
  nodeRegistry: e,
@@ -2481,87 +2487,87 @@ const Xt = ({
2481
2487
  messages: d,
2482
2488
  canvasOptions: a = {},
2483
2489
  renderTriggerSelector: c,
2484
- loadTriggerSources: f,
2490
+ loadTriggerSources: u,
2485
2491
  renderNodePicker: h,
2486
2492
  renderNodeConfig: g,
2487
2493
  onNodeClick: E,
2488
- maxNodes: m,
2494
+ maxNodes: b,
2489
2495
  layoutDirection: p = "TB",
2490
2496
  executionRecord: x,
2491
2497
  onFetchWorkflow: k,
2492
- hideHeader: O = !1,
2498
+ hideHeader: M = !1,
2493
2499
  workflowName: z,
2494
2500
  onWorkflowNameChange: W,
2495
- onCancel: $,
2501
+ onCancel: G,
2496
2502
  workflowStatus: P,
2497
- workflowStatusColor: M,
2498
- saveLabel: H,
2499
- optionsResolvers: oe
2503
+ workflowStatusColor: I,
2504
+ saveLabel: Y,
2505
+ optionsResolvers: J
2500
2506
  }) => {
2501
2507
  const {
2502
2508
  fitView: le = !0,
2503
2509
  fitViewPadding: A = 0.3,
2504
2510
  showControls: ie = !0,
2505
2511
  showMiniMap: he = !1,
2506
- panOnScroll: Ie = !0,
2507
- zoomOnScroll: ee = !1,
2508
- minZoom: Oe = 0.25,
2512
+ panOnScroll: Oe = !0,
2513
+ zoomOnScroll: te = !1,
2514
+ minZoom: Ie = 0.25,
2509
2515
  maxZoom: ge = 2,
2510
2516
  snapToGrid: De = !1,
2511
2517
  snapGrid: ct = [15, 15],
2512
2518
  branchLayout: we = "horizontal",
2513
2519
  nodeBody: Ee = "full"
2514
- } = a, xe = V(() => _r(d), [d]), [R, ae] = L(() => (n == null ? void 0 : n.slots) ?? Vt()), [Y, te] = L(() => (n == null ? void 0 : n.branches) ?? {}), [pe, X] = L(null), [We, ft] = L(null), [J, Me] = L(null), [de, ut] = L(null), [je, ht] = L(null), [j, gt] = L(() => {
2520
+ } = a, xe = V(() => _r(d), [d]), [R, ae] = L(() => (n == null ? void 0 : n.slots) ?? Vt()), [K, ne] = L(() => (n == null ? void 0 : n.branches) ?? {}), [pe, X] = L(null), [We, ut] = L(null), [Z, Me] = L(null), [de, ft] = L(null), [je, ht] = L(null), [j, gt] = L(() => {
2515
2521
  const y = n == null ? void 0 : n.slots.find((S) => S.kind === "triggerFixed"), v = y != null && y.id.startsWith("trigger-") ? y.id.slice(8) : void 0;
2516
2522
  return v ? t.lookup(v) ?? null : null;
2517
2523
  }), [pt, Mn] = L({}), jn = U((y) => {
2518
2524
  Mn(y);
2519
2525
  }, []), zn = V(() => ({ ...Un, ...r }), [r]), Ln = V(() => ({ ...as, ...o }), [o]), Pn = V(() => {
2520
- const y = R.filter((S) => S.kind === "userTask").length, v = Object.values(Y).flatMap((S) => Object.values(S).flat()).filter((S) => S.kind === "userTask").length;
2526
+ const y = R.filter((S) => S.kind === "userTask").length, v = Object.values(K).flatMap((S) => Object.values(S).flat()).filter((S) => S.kind === "userTask").length;
2521
2527
  return y + v;
2522
- }, [R, Y]), yt = m ?? (j == null ? void 0 : j.maxTasks), bt = yt !== void 0 && Pn >= yt, ce = U((y) => {
2528
+ }, [R, K]), yt = b ?? (j == null ? void 0 : j.maxTasks), bt = yt !== void 0 && Pn >= yt, ce = U((y) => {
2523
2529
  const v = R.find((S) => S.id === y);
2524
2530
  if (v) return v;
2525
- for (const S of Object.values(Y)) {
2531
+ for (const S of Object.values(K)) {
2526
2532
  const C = Object.values(S).flat().find((T) => T.id === y);
2527
2533
  if (C) return C;
2528
2534
  }
2529
2535
  return null;
2530
- }, [R, Y]), $e = U((y) => {
2531
- s || (ft(y), X("nodeConfig"));
2536
+ }, [R, K]), $e = U((y) => {
2537
+ s || (ut(y), X("nodeConfig"));
2532
2538
  }, [s]), mt = U((y) => {
2533
2539
  if (!s) {
2534
2540
  if (R.some((v) => v.id === y)) {
2535
2541
  const v = R.find((S) => S.id === y);
2536
2542
  if ((v == null ? void 0 : v.kind) === "triggerFixed") {
2537
- ae(Vt()), te({}), gt(null);
2543
+ ae(Vt()), ne({}), gt(null);
2538
2544
  return;
2539
2545
  }
2540
2546
  ae((S) => {
2541
2547
  const C = S.filter((T) => T.id !== y);
2542
- return fe((v == null ? void 0 : v.kind) ?? "") && !C.some((T) => T.kind === "end") ? [...C, { id: "end", kind: "end", reactFlowType: "endNode" }] : C;
2543
- }), te((S) => {
2544
- const C = { ...S }, T = (b) => {
2545
- C[b] && (Object.values(C[b]).flat().filter((N) => fe(N.kind)).forEach((N) => T(N.id)), delete C[b]);
2548
+ return ue((v == null ? void 0 : v.kind) ?? "") && !C.some((T) => T.kind === "end") ? [...C, { id: "end", kind: "end", reactFlowType: "endNode" }] : C;
2549
+ }), ne((S) => {
2550
+ const C = { ...S }, T = (m) => {
2551
+ C[m] && (Object.values(C[m]).flat().filter((N) => ue(N.kind)).forEach((N) => T(N.id)), delete C[m]);
2546
2552
  };
2547
2553
  return T(y), C;
2548
2554
  });
2549
2555
  return;
2550
2556
  }
2551
- te((v) => {
2552
- const S = (T, b) => {
2557
+ ne((v) => {
2558
+ const S = (T, m) => {
2553
2559
  const N = [];
2554
2560
  for (const _ of T)
2555
- fe(_.kind) && b[_.id] && (N.push(_.id), Object.values(b[_.id]).forEach((I) => N.push(...S(I, b))));
2561
+ ue(_.kind) && m[_.id] && (N.push(_.id), Object.values(m[_.id]).forEach((O) => N.push(...S(O, m))));
2556
2562
  return N;
2557
2563
  }, C = { ...v };
2558
2564
  for (const T of Object.keys(C))
2559
- for (const b of Object.keys(C[T])) {
2560
- const N = C[T][b], _ = N.findIndex((F) => F.id === y);
2565
+ for (const m of Object.keys(C[T])) {
2566
+ const N = C[T][m], _ = N.findIndex((F) => F.id === y);
2561
2567
  if (_ === -1 || N[_].kind === "end") continue;
2562
- const I = N[_];
2568
+ const O = N[_];
2563
2569
  let B = N.filter((F) => F.id !== y);
2564
- return I.kind === "filter" && ((I.id in C ? S([I], C) : []).forEach((D) => delete C[D]), delete C[I.id], B.some((D) => D.kind === "end") || (B = [...B, { id: `end-${T}-${b}`, kind: "end", reactFlowType: "endNode" }])), C[T] = { ...C[T], [b]: B }, C;
2570
+ return O.kind === "filter" && ((O.id in C ? S([O], C) : []).forEach((D) => delete C[D]), delete C[O.id], B.some((D) => D.kind === "end") || (B = [...B, { id: `end-${T}-${m}`, kind: "end", reactFlowType: "endNode" }])), C[T] = { ...C[T], [m]: B }, C;
2565
2571
  }
2566
2572
  return C;
2567
2573
  });
@@ -2569,21 +2575,21 @@ const Xt = ({
2569
2575
  }, [s, R]), Ge = U(() => {
2570
2576
  s || X("triggerSelect");
2571
2577
  }, [s]), vt = U((y, v) => {
2572
- s || bt || (Me(y), ut(v.filterId && v.branch ? { filterId: v.filterId, branch: v.branch } : null), X("nodePicker"));
2578
+ s || bt || (Me(y), ft(v.filterId && v.branch ? { filterId: v.filterId, branch: v.branch } : null), X("nodePicker"));
2573
2579
  }, [s, bt]), wt = U((y, v) => {
2574
2580
  if (gt(y), X(null), y.skeletonState) {
2575
- const C = Array.isArray(v) && v.length > 0, T = (y.skeletonState.slots ?? []).map((b) => b.kind !== "triggerFixed" ? b : {
2576
- ...b,
2581
+ const C = Array.isArray(v) && v.length > 0, T = (y.skeletonState.slots ?? []).map((m) => m.kind !== "triggerFixed" ? m : {
2582
+ ...m,
2577
2583
  nodeData: {
2578
2584
  label: y.label,
2579
- ...b.nodeData ?? {},
2585
+ ...m.nodeData ?? {},
2580
2586
  ...C && { sources: v }
2581
2587
  }
2582
2588
  });
2583
- te(y.skeletonState.branches ?? {}), ae(T);
2589
+ ne(y.skeletonState.branches ?? {}), ae(T);
2584
2590
  return;
2585
2591
  }
2586
- te({});
2592
+ ne({});
2587
2593
  const S = Array.isArray(v) && v.length > 0;
2588
2594
  ae([
2589
2595
  { id: "start", kind: "start", reactFlowType: "startNode" },
@@ -2611,25 +2617,25 @@ const Xt = ({
2611
2617
  branch: de,
2612
2618
  template: j
2613
2619
  };
2614
- if (!J) return y;
2620
+ if (!Z) return y;
2615
2621
  if (de) {
2616
- const { filterId: C, branch: T } = de, b = R.findIndex((F) => F.id === C), N = b >= 0 ? R.slice(0, b + 1) : [], _ = ((S = Y[C]) == null ? void 0 : S[T]) ?? [], I = _.findIndex((F) => F.id === J), B = I >= 0 ? _.slice(0, I + 1) : [];
2617
- return y.upstreamSlots = [...N, ...B], y.downstreamSlots = I >= 0 ? _.slice(I + 1) : _, y.insertAfterSlot = B[B.length - 1] ?? null, y;
2622
+ const { filterId: C, branch: T } = de, m = R.findIndex((F) => F.id === C), N = m >= 0 ? R.slice(0, m + 1) : [], _ = ((S = K[C]) == null ? void 0 : S[T]) ?? [], O = _.findIndex((F) => F.id === Z), B = O >= 0 ? _.slice(0, O + 1) : [];
2623
+ return y.upstreamSlots = [...N, ...B], y.downstreamSlots = O >= 0 ? _.slice(O + 1) : _, y.insertAfterSlot = B[B.length - 1] ?? null, y;
2618
2624
  }
2619
- const v = R.findIndex((C) => C.id === J);
2625
+ const v = R.findIndex((C) => C.id === Z);
2620
2626
  return y.upstreamSlots = v >= 0 ? R.slice(0, v + 1) : [], y.downstreamSlots = v >= 0 ? R.slice(v + 1) : [], y.insertAfterSlot = y.upstreamSlots[y.upstreamSlots.length - 1] ?? null, y;
2621
- }, [R, Y, J, de, j]), Ye = (y, v) => y.descriptorType === v || y.id === v || y.kind === v, xt = U(() => {
2622
- const y = e.list(), v = j != null && j.availableTasks ? y.filter((b) => j.availableTasks.includes(b.type)) : y, S = Et(), C = [
2627
+ }, [R, K, Z, de, j]), Ye = (y, v) => y.descriptorType === v || y.id === v || y.kind === v, xt = U(() => {
2628
+ const y = e.list(), v = j != null && j.availableTasks ? y.filter((m) => j.availableTasks.includes(m.type)) : y, S = Et(), C = [
2623
2629
  ...R,
2624
- ...Object.values(Y).flatMap((b) => Object.values(b).flat())
2625
- ], T = (b) => C.some((N) => b.some((_) => Ye(N, _)));
2626
- return v.filter((b) => b.maxPerWorkflow !== void 0 && R.filter((_) => _.descriptorType === b.type).length + Object.values(Y).flatMap((_) => Object.values(_).flat()).filter((_) => _.descriptorType === b.type).length >= b.maxPerWorkflow ? !1 : b.canInsert ? b.canInsert(S) : !(b.insertAfter && b.insertAfter.length > 0 && T(b.insertAfter) && !S.upstreamSlots.some(
2627
- (_) => b.insertAfter.some((I) => Ye(_, I))
2628
- ) || b.insertBefore && b.insertBefore.length > 0 && T(b.insertBefore) && !S.downstreamSlots.some(
2629
- (_) => b.insertBefore.some((I) => Ye(_, I))
2630
+ ...Object.values(K).flatMap((m) => Object.values(m).flat())
2631
+ ], T = (m) => C.some((N) => m.some((_) => Ye(N, _)));
2632
+ return v.filter((m) => m.maxPerWorkflow !== void 0 && R.filter((_) => _.descriptorType === m.type).length + Object.values(K).flatMap((_) => Object.values(_).flat()).filter((_) => _.descriptorType === m.type).length >= m.maxPerWorkflow ? !1 : m.canInsert ? m.canInsert(S) : !(m.insertAfter && m.insertAfter.length > 0 && T(m.insertAfter) && !S.upstreamSlots.some(
2633
+ (_) => m.insertAfter.some((O) => Ye(_, O))
2634
+ ) || m.insertBefore && m.insertBefore.length > 0 && T(m.insertBefore) && !S.downstreamSlots.some(
2635
+ (_) => m.insertBefore.some((O) => Ye(_, O))
2630
2636
  )));
2631
- }, [e, j, R, Y, Et]), kt = U((y) => {
2632
- if (!J) return;
2637
+ }, [e, j, R, K, Et]), kt = U((y) => {
2638
+ if (!Z) return;
2633
2639
  const v = `${y.type}-${Date.now()}`, S = y.reactFlowType === "filterNode" || y.reactFlowType === "approvalNode" || y.reactFlowType === "conditionBranchNode", C = y.branchLabels ?? { pass: "Pass", fail: "Fail" }, T = {
2634
2640
  id: v,
2635
2641
  kind: S ? y.reactFlowType === "approvalNode" ? "approval" : "filter" : "userTask",
@@ -2642,45 +2648,45 @@ const Xt = ({
2642
2648
  ...y.branchStyle ? { branchStyle: y.branchStyle } : {}
2643
2649
  };
2644
2650
  if (de) {
2645
- const { filterId: b, branch: N } = de;
2646
- te((_) => {
2647
- const I = [..._[b][N]];
2651
+ const { filterId: m, branch: N } = de;
2652
+ ne((_) => {
2653
+ const O = [..._[m][N]];
2648
2654
  if (S) {
2649
- const Z = I.filter((ye) => ye.kind !== "end"), ke = Z.findIndex((ye) => ye.id === J), Dn = ke === -1 ? Z.length : ke + 1;
2650
- return Z.splice(Dn, 0, T), {
2655
+ const Q = O.filter((ye) => ye.kind !== "end"), ke = Q.findIndex((ye) => ye.id === Z), Dn = ke === -1 ? Q.length : ke + 1;
2656
+ return Q.splice(Dn, 0, T), {
2651
2657
  ..._,
2652
- [b]: { ..._[b], [N]: Z },
2658
+ [m]: { ..._[m], [N]: Q },
2653
2659
  [v]: Object.fromEntries(
2654
2660
  Object.keys(C).map((ye) => [ye, [{ id: `end-${v}-${ye}`, kind: "end", reactFlowType: "endNode" }]])
2655
2661
  )
2656
2662
  };
2657
2663
  }
2658
- const B = I.findIndex((Z) => Z.id === J), F = I.findIndex((Z) => Z.kind === "end"), D = B === -1 ? F === -1 ? I.length : F : B + 1;
2659
- return I.splice(D, 0, T), { ..._, [b]: { ..._[b], [N]: I } };
2664
+ const B = O.findIndex((Q) => Q.id === Z), F = O.findIndex((Q) => Q.kind === "end"), D = B === -1 ? F === -1 ? O.length : F : B + 1;
2665
+ return O.splice(D, 0, T), { ..._, [m]: { ..._[m], [N]: O } };
2660
2666
  });
2661
2667
  } else if (S) {
2662
- const b = y.branchStyle === "inline-gate", N = R.filter((F) => F.kind !== "end"), _ = N.findIndex((F) => F.id === J), I = _ >= 0 ? N.slice(_ + 1) : [];
2668
+ const m = y.branchStyle === "inline-gate", N = R.filter((F) => F.kind !== "end"), _ = N.findIndex((F) => F.id === Z), O = _ >= 0 ? N.slice(_ + 1) : [];
2663
2669
  ae(() => [...N.slice(0, _ + 1), T]);
2664
2670
  const B = Object.keys(C);
2665
- te((F) => ({
2671
+ ne((F) => ({
2666
2672
  ...F,
2667
2673
  [v]: Object.fromEntries(
2668
- B.map((D, Z) => {
2674
+ B.map((D, Q) => {
2669
2675
  const ke = { id: `end-${v}-${D}`, kind: "end", reactFlowType: "endNode" };
2670
- return b && Z === 0 && I.length > 0 ? [D, [...I, ke]] : [D, [ke]];
2676
+ return m && Q === 0 && O.length > 0 ? [D, [...O, ke]] : [D, [ke]];
2671
2677
  })
2672
2678
  )
2673
2679
  }));
2674
2680
  } else
2675
- ae((b) => {
2676
- const N = b.findIndex((_) => _.id === J);
2677
- return N === -1 ? b : [...b.slice(0, N + 1), T, ...b.slice(N + 1)];
2681
+ ae((m) => {
2682
+ const N = m.findIndex((_) => _.id === Z);
2683
+ return N === -1 ? m : [...m.slice(0, N + 1), T, ...m.slice(N + 1)];
2678
2684
  });
2679
- Me(null), ut(null), ft(v), X("nodeConfig");
2680
- }, [J, de]), _t = U((y, v) => {
2681
- const S = (b) => {
2682
- const N = b.label || b.key;
2683
- switch (b.kind) {
2685
+ Me(null), ft(null), ut(v), X("nodeConfig");
2686
+ }, [Z, de]), _t = U((y, v) => {
2687
+ const S = (m) => {
2688
+ const N = m.label || m.key;
2689
+ switch (m.kind) {
2684
2690
  case "if":
2685
2691
  return `IF · ${N}`;
2686
2692
  case "elseif":
@@ -2690,54 +2696,54 @@ const Xt = ({
2690
2696
  default:
2691
2697
  return N;
2692
2698
  }
2693
- }, C = (b) => {
2699
+ }, C = (m) => {
2694
2700
  const N = ce(y);
2695
- if ((N == null ? void 0 : N.descriptorType) !== "conditionBranch") return b;
2696
- const I = (v.branchConfigs ?? []).map((D) => D.key).filter(Boolean);
2697
- if (I.length === 0) return b;
2698
- const B = b[y] ?? {}, F = {};
2699
- return I.forEach((D) => {
2701
+ if ((N == null ? void 0 : N.descriptorType) !== "conditionBranch") return m;
2702
+ const O = (v.branchConfigs ?? []).map((D) => D.key).filter(Boolean);
2703
+ if (O.length === 0) return m;
2704
+ const B = m[y] ?? {}, F = {};
2705
+ return O.forEach((D) => {
2700
2706
  F[D] = B[D] ?? [{ id: `end-${y}-${D}`, kind: "end", reactFlowType: "endNode" }];
2701
- }), { ...b, [y]: F };
2702
- }, T = (b, N) => {
2703
- if (b.descriptorType !== "conditionBranch") return { ...b, formData: N };
2704
- const _ = N.branchConfigs ?? [], I = {};
2707
+ }), { ...m, [y]: F };
2708
+ }, T = (m, N) => {
2709
+ if (m.descriptorType !== "conditionBranch") return { ...m, formData: N };
2710
+ const _ = N.branchConfigs ?? [], O = {};
2705
2711
  return _.forEach((B) => {
2706
- B.key && (I[B.key] = S(B));
2707
- }), { ...b, formData: N, branchLabels: I };
2712
+ B.key && (O[B.key] = S(B));
2713
+ }), { ...m, formData: N, branchLabels: O };
2708
2714
  };
2709
- if (R.some((b) => b.id === y)) {
2710
- te((b) => {
2711
- const N = C(b);
2715
+ if (R.some((m) => m.id === y)) {
2716
+ ne((m) => {
2717
+ const N = C(m);
2712
2718
  return ae(
2713
2719
  (_) => _.map(
2714
- (I) => I.id === y ? T(I, v) : I
2720
+ (O) => O.id === y ? T(O, v) : O
2715
2721
  )
2716
2722
  ), N;
2717
2723
  });
2718
2724
  return;
2719
2725
  }
2720
- te((b) => {
2721
- const _ = { ...C(b) };
2722
- for (const I of Object.keys(_)) {
2726
+ ne((m) => {
2727
+ const _ = { ...C(m) };
2728
+ for (const O of Object.keys(_)) {
2723
2729
  const B = (F) => F.map((D) => D.id === y ? T(D, v) : D);
2724
- for (const F of Object.keys(_[I]))
2725
- if (_[I][F].some((D) => D.id === y))
2726
- return _[I] = { ..._[I], [F]: B(_[I][F]) }, _;
2730
+ for (const F of Object.keys(_[O]))
2731
+ if (_[O][F].some((D) => D.id === y))
2732
+ return _[O] = { ..._[O], [F]: B(_[O][F]) }, _;
2727
2733
  }
2728
2734
  return _;
2729
2735
  });
2730
- }, [R, Y, ce]), K = V(() => ce(We ?? ""), [ce, We]), St = V(() => {
2731
- if ((K == null ? void 0 : K.kind) === "triggerFixed") {
2736
+ }, [R, K, ce]), H = V(() => ce(We ?? ""), [ce, We]), St = V(() => {
2737
+ if ((H == null ? void 0 : H.kind) === "triggerFixed") {
2732
2738
  const y = (j == null ? void 0 : j.triggerCategory) === "scheduler", v = (j == null ? void 0 : j.triggerConfigTitle) ?? (y ? "Scheduler" : j == null ? void 0 : j.label) ?? "Trigger", S = j == null ? void 0 : j.triggerCustomPanel;
2733
2739
  if (S)
2734
2740
  return {
2735
- type: K.id,
2741
+ type: H.id,
2736
2742
  label: v,
2737
2743
  icon: j == null ? void 0 : j.icon,
2738
2744
  reactFlowType: "triggerNode",
2739
2745
  formSchema: [],
2740
- customPanel: ({ nodeId: T, data: b, onSave: N, onClose: _ }) => S({ data: b, onSave: N, onClose: _ }),
2746
+ customPanel: ({ nodeId: T, data: m, onSave: N, onClose: _ }) => S({ data: m, onSave: N, onClose: _ }),
2741
2747
  matches: () => !1,
2742
2748
  bpmnEntry: (T) => T,
2743
2749
  bpmnExit: (T) => T,
@@ -2745,7 +2751,7 @@ const Xt = ({
2745
2751
  };
2746
2752
  const C = j == null ? void 0 : j.triggerConfigSchema;
2747
2753
  return Array.isArray(C) && C.length > 0 ? {
2748
- type: K.id,
2754
+ type: H.id,
2749
2755
  // Title the config by what it IS (a scheduler), not the workflow name
2750
2756
  // (which would read as "Identify Dormant Account").
2751
2757
  label: v,
@@ -2758,10 +2764,10 @@ const Xt = ({
2758
2764
  emitBpmnElements: () => []
2759
2765
  } : null;
2760
2766
  }
2761
- return K != null && K.descriptorType ? e.forType(K.descriptorType) ?? null : null;
2762
- }, [K, e, j]), { nodes: Nt, edges: Fn } = V(
2763
- () => us(R, Y, s ? null : vt, pt, l, p, we),
2764
- [R, Y, s, vt, pt, l, p, we]
2767
+ return H != null && H.descriptorType ? e.forType(H.descriptorType) ?? null : null;
2768
+ }, [H, e, j]), { nodes: Nt, edges: Fn } = V(
2769
+ () => fs(R, K, s ? null : vt, pt, l, p, we),
2770
+ [R, K, s, vt, pt, l, p, we]
2765
2771
  ), Ct = V(() => {
2766
2772
  const y = x ? new Map(x.steps.map((v) => [v.nodeId, v])) : null;
2767
2773
  return Nt.map((v) => {
@@ -2771,15 +2777,15 @@ const Xt = ({
2771
2777
  C && (S = { _executionStatus: C.status, _executionError: C.error });
2772
2778
  }
2773
2779
  return v.type === "subWorkflowNode" && k && (S.onPreview = (C) => {
2774
- var b;
2780
+ var m;
2775
2781
  const T = ce(v.id);
2776
- ht({ workflowId: C, workflowLabel: ((b = T == null ? void 0 : T.formData) == null ? void 0 : b.workflowLabel) ?? void 0 });
2782
+ ht({ workflowId: C, workflowLabel: ((m = T == null ? void 0 : T.formData) == null ? void 0 : m.workflowLabel) ?? void 0 });
2777
2783
  }), Object.keys(S).length > 0 ? { ...v, data: { ...v.data, ...S } } : v;
2778
2784
  });
2779
2785
  }, [Nt, x, k, ce]), Rn = V(() => ({ onEditNode: $e, onDeleteNode: mt, onAddStep: () => {
2780
2786
  }, onClickAddTrigger: Ge, messages: xe, nodeRegistry: e, nodeBody: Ee, activeTemplate: j }), [$e, mt, Ge, xe, e, Ee, j]), An = U(async () => {
2781
- i && await i({ slots: R, branches: Y });
2782
- }, [i, R, Y]), Bn = V(() => Sr({
2787
+ i && await i({ slots: R, branches: K });
2788
+ }, [i, R, K]), Bn = V(() => Sr({
2783
2789
  palette: {
2784
2790
  primary: { main: l.primaryColor ?? "#1976d2" },
2785
2791
  secondary: { main: l.secondaryColor ?? "#9c27b0" },
@@ -2791,7 +2797,7 @@ const Xt = ({
2791
2797
  shape: { borderRadius: l.borderRadius ?? 6 },
2792
2798
  typography: l.fontFamily ? { fontFamily: l.fontFamily } : {}
2793
2799
  }), [l]);
2794
- return /* @__PURE__ */ u(Nr, { theme: Bn, children: /* @__PURE__ */ u(kr, { resolvers: oe, children: /* @__PURE__ */ u(Qn.Provider, { value: Rn, children: /* @__PURE__ */ w(
2800
+ return /* @__PURE__ */ f(Nr, { theme: Bn, children: /* @__PURE__ */ f(kr, { resolvers: J, children: /* @__PURE__ */ f(Qn.Provider, { value: Rn, children: /* @__PURE__ */ w(
2795
2801
  "div",
2796
2802
  {
2797
2803
  className: "flowforge-canvas",
@@ -2813,16 +2819,16 @@ const Xt = ({
2813
2819
  "--ff-font-family": l.fontFamily
2814
2820
  },
2815
2821
  children: [
2816
- !O && (i || $ || z) && /* @__PURE__ */ u(
2822
+ !M && (i || G || z) && /* @__PURE__ */ f(
2817
2823
  ns,
2818
2824
  {
2819
2825
  workflowName: z,
2820
2826
  onWorkflowNameChange: W,
2821
2827
  status: P,
2822
- statusColor: M,
2828
+ statusColor: I,
2823
2829
  onSave: i ? An : void 0,
2824
- onCancel: $,
2825
- saveLabel: H
2830
+ onCancel: G,
2831
+ saveLabel: Y
2826
2832
  }
2827
2833
  ),
2828
2834
  /* @__PURE__ */ w("div", { style: { flex: 1, minHeight: 0, position: "relative" }, children: [
@@ -2837,9 +2843,9 @@ const Xt = ({
2837
2843
  fitViewOptions: { padding: A },
2838
2844
  nodesDraggable: !1,
2839
2845
  nodesConnectable: !1,
2840
- panOnScroll: Ie,
2841
- zoomOnScroll: ee,
2842
- minZoom: Oe,
2846
+ panOnScroll: Oe,
2847
+ zoomOnScroll: te,
2848
+ minZoom: Ie,
2843
2849
  maxZoom: ge,
2844
2850
  snapToGrid: De,
2845
2851
  snapGrid: ct,
@@ -2849,7 +2855,7 @@ const Xt = ({
2849
2855
  S && (E != null && E(S) || (S.kind === "addTrigger" || S.kind === "triggerFixed" ? Ge() : (S.kind === "userTask" || S.kind === "filter" || S.kind === "approval") && $e(v.id)));
2850
2856
  },
2851
2857
  children: [
2852
- l.background !== "none" && /* @__PURE__ */ u(
2858
+ l.background !== "none" && /* @__PURE__ */ f(
2853
2859
  Yn,
2854
2860
  {
2855
2861
  variant: l.background,
@@ -2857,20 +2863,20 @@ const Xt = ({
2857
2863
  gap: 20
2858
2864
  }
2859
2865
  ),
2860
- ie && /* @__PURE__ */ u(Kn, { showInteractive: !1 }),
2861
- he && /* @__PURE__ */ u(Hn, { zoomable: !0, pannable: !0 }),
2862
- /* @__PURE__ */ u(es, { onHeightsReady: jn, nodeCount: Ct.length })
2866
+ ie && /* @__PURE__ */ f(Kn, { showInteractive: !1 }),
2867
+ he && /* @__PURE__ */ f(Hn, { zoomable: !0, pannable: !0 }),
2868
+ /* @__PURE__ */ f(es, { onHeightsReady: jn, nodeCount: Ct.length })
2863
2869
  ]
2864
2870
  }
2865
2871
  ),
2866
- c ? pe === "triggerSelect" && c(t.list(), wt, () => X(null)) : /* @__PURE__ */ u(rs, { open: pe === "triggerSelect", templates: t.list(), messages: xe, onSelect: wt, onClose: () => X(null), loadTriggerSources: f }),
2872
+ c ? pe === "triggerSelect" && c(t.list(), wt, () => X(null)) : /* @__PURE__ */ f(rs, { open: pe === "triggerSelect", templates: t.list(), messages: xe, onSelect: wt, onClose: () => X(null), loadTriggerSources: u }),
2867
2873
  h ? pe === "nodePicker" && h(xt(), kt, () => {
2868
2874
  X(null), Me(null);
2869
- }) : /* @__PURE__ */ u(os, { open: pe === "nodePicker", availableDescriptors: xt(), messages: xe, onSelect: kt, onClose: () => {
2875
+ }) : /* @__PURE__ */ f(os, { open: pe === "nodePicker", availableDescriptors: xt(), messages: xe, onSelect: kt, onClose: () => {
2870
2876
  X(null), Me(null);
2871
2877
  } }),
2872
- g ? pe === "nodeConfig" && g(St ?? void 0, K, _t, () => X(null)) : /* @__PURE__ */ u(is, { open: pe === "nodeConfig", nodeId: We, descriptor: St, initialValues: K == null ? void 0 : K.formData, messages: xe, onSave: _t, onClose: () => X(null) }),
2873
- k && je && /* @__PURE__ */ u(
2878
+ g ? pe === "nodeConfig" && g(St ?? void 0, H, _t, () => X(null)) : /* @__PURE__ */ f(is, { open: pe === "nodeConfig", nodeId: We, descriptor: St, initialValues: H == null ? void 0 : H.formData, messages: xe, onSave: _t, onClose: () => X(null) }),
2879
+ k && je && /* @__PURE__ */ f(
2874
2880
  ss,
2875
2881
  {
2876
2882
  isOpen: !!je,
@@ -2921,15 +2927,15 @@ function gs({ template: e, onSelect: t }) {
2921
2927
  },
2922
2928
  children: [
2923
2929
  /* @__PURE__ */ w("div", { style: { display: "flex", alignItems: "flex-start", gap: 10 }, children: [
2924
- e.icon && /* @__PURE__ */ u("div", { style: { flexShrink: 0, width: 36, height: 36, borderRadius: 8, background: "#f5f5f5", display: "flex", alignItems: "center", justifyContent: "center" }, children: e.icon }),
2930
+ e.icon && /* @__PURE__ */ f("div", { style: { flexShrink: 0, width: 36, height: 36, borderRadius: 8, background: "#f5f5f5", display: "flex", alignItems: "center", justifyContent: "center" }, children: e.icon }),
2925
2931
  /* @__PURE__ */ w("div", { style: { flex: 1, minWidth: 0 }, children: [
2926
- /* @__PURE__ */ u("div", { style: { fontWeight: 600, fontSize: 14, color: "#212121", marginBottom: 2 }, children: e.label }),
2927
- e.description && /* @__PURE__ */ u("div", { style: { fontSize: 12, color: "#757575", lineHeight: 1.4, display: "-webkit-box", WebkitLineClamp: 2, WebkitBoxOrient: "vertical", overflow: "hidden" }, children: e.description })
2932
+ /* @__PURE__ */ f("div", { style: { fontWeight: 600, fontSize: 14, color: "#212121", marginBottom: 2 }, children: e.label }),
2933
+ e.description && /* @__PURE__ */ f("div", { style: { fontSize: 12, color: "#757575", lineHeight: 1.4, display: "-webkit-box", WebkitLineClamp: 2, WebkitBoxOrient: "vertical", overflow: "hidden" }, children: e.description })
2928
2934
  ] })
2929
2935
  ] }),
2930
2936
  /* @__PURE__ */ w("div", { style: { display: "flex", alignItems: "center", flexWrap: "wrap", gap: 4 }, children: [
2931
- n && /* @__PURE__ */ u("span", { style: { fontSize: 10, fontWeight: 600, padding: "2px 7px", borderRadius: 10, background: n.bg, color: n.color }, children: n.label }),
2932
- (i = e.tags) == null ? void 0 : i.map((s) => /* @__PURE__ */ u("span", { style: { fontSize: 10, padding: "2px 7px", borderRadius: 10, background: "#f5f5f5", color: "#616161" }, children: s }, s)),
2937
+ n && /* @__PURE__ */ f("span", { style: { fontSize: 10, fontWeight: 600, padding: "2px 7px", borderRadius: 10, background: n.bg, color: n.color }, children: n.label }),
2938
+ (i = e.tags) == null ? void 0 : i.map((s) => /* @__PURE__ */ f("span", { style: { fontSize: 10, padding: "2px 7px", borderRadius: 10, background: "#f5f5f5", color: "#616161" }, children: s }, s)),
2933
2939
  r > 0 && /* @__PURE__ */ w("span", { style: { fontSize: 10, color: "#9e9e9e", marginLeft: "auto" }, children: [
2934
2940
  r,
2935
2941
  " step",
@@ -2959,20 +2965,20 @@ const js = ({
2959
2965
  if (i !== Qe && (a = a.filter((c) => c.category === i)), r.trim()) {
2960
2966
  const c = r.toLowerCase();
2961
2967
  a = a.filter(
2962
- (f) => {
2968
+ (u) => {
2963
2969
  var h, g;
2964
- return f.label.toLowerCase().includes(c) || ((h = f.description) == null ? void 0 : h.toLowerCase().includes(c)) || ((g = f.tags) == null ? void 0 : g.some((E) => E.toLowerCase().includes(c)));
2970
+ return u.label.toLowerCase().includes(c) || ((h = u.description) == null ? void 0 : h.toLowerCase().includes(c)) || ((g = u.tags) == null ? void 0 : g.some((E) => E.toLowerCase().includes(c)));
2965
2971
  }
2966
2972
  );
2967
2973
  }
2968
- return [...a].sort((c, f) => (f.popularity ?? 0) - (c.popularity ?? 0));
2974
+ return [...a].sort((c, u) => (u.popularity ?? 0) - (c.popularity ?? 0));
2969
2975
  }, [e, i, r]);
2970
2976
  return /* @__PURE__ */ w("div", { style: { display: "flex", flexDirection: "column", height: "100%", fontFamily: "inherit" }, children: [
2971
2977
  /* @__PURE__ */ w("div", { style: { padding: "24px 24px 0", borderBottom: "1px solid #f0f0f0", paddingBottom: 16 }, children: [
2972
2978
  /* @__PURE__ */ w("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", marginBottom: 16 }, children: [
2973
2979
  /* @__PURE__ */ w("div", { children: [
2974
- /* @__PURE__ */ u("h2", { style: { margin: 0, fontSize: 20, fontWeight: 700, color: "#212121" }, children: "Workflow Templates" }),
2975
- /* @__PURE__ */ u("p", { style: { margin: "4px 0 0", fontSize: 13, color: "#757575" }, children: "Choose a pre-built template or start from scratch" })
2980
+ /* @__PURE__ */ f("h2", { style: { margin: 0, fontSize: 20, fontWeight: 700, color: "#212121" }, children: "Workflow Templates" }),
2981
+ /* @__PURE__ */ f("p", { style: { margin: "4px 0 0", fontSize: 13, color: "#757575" }, children: "Choose a pre-built template or start from scratch" })
2976
2982
  ] }),
2977
2983
  n && /* @__PURE__ */ w(
2978
2984
  "button",
@@ -2980,15 +2986,15 @@ const js = ({
2980
2986
  onClick: n,
2981
2987
  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" },
2982
2988
  children: [
2983
- /* @__PURE__ */ u(fr, { size: 16 }),
2989
+ /* @__PURE__ */ f(ur, { size: 16 }),
2984
2990
  "Start from Scratch"
2985
2991
  ]
2986
2992
  }
2987
2993
  )
2988
2994
  ] }),
2989
2995
  /* @__PURE__ */ w("div", { style: { display: "flex", alignItems: "center", gap: 8, background: "#f5f5f5", borderRadius: 8, padding: "8px 12px", marginBottom: 12 }, children: [
2990
- /* @__PURE__ */ u(ur, { size: 18, color: "#9e9e9e" }),
2991
- /* @__PURE__ */ u(
2996
+ /* @__PURE__ */ f(fr, { size: 18, color: "#9e9e9e" }),
2997
+ /* @__PURE__ */ f(
2992
2998
  "input",
2993
2999
  {
2994
3000
  value: r,
@@ -2998,7 +3004,7 @@ const js = ({
2998
3004
  }
2999
3005
  )
3000
3006
  ] }),
3001
- l.length > 1 && /* @__PURE__ */ u("div", { style: { display: "flex", gap: 4, flexWrap: "wrap" }, children: l.map((a) => /* @__PURE__ */ u(
3007
+ l.length > 1 && /* @__PURE__ */ f("div", { style: { display: "flex", gap: 4, flexWrap: "wrap" }, children: l.map((a) => /* @__PURE__ */ f(
3002
3008
  "button",
3003
3009
  {
3004
3010
  onClick: () => s(a),
@@ -3018,22 +3024,22 @@ const js = ({
3018
3024
  a
3019
3025
  )) })
3020
3026
  ] }),
3021
- /* @__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: [
3022
- /* @__PURE__ */ u(hr, { size: 36, style: { marginBottom: 8 } }),
3023
- /* @__PURE__ */ u("p", { style: { margin: 0, fontSize: 14 }, children: "No templates found" })
3024
- ] }) : /* @__PURE__ */ u("div", { style: { display: "grid", gridTemplateColumns: "repeat(auto-fill, minmax(280px, 1fr))", gap: 16 }, children: d.map((a) => /* @__PURE__ */ u(gs, { template: a, onSelect: () => t(a) }, a.triggerKey)) }) })
3027
+ /* @__PURE__ */ f("div", { style: { flex: 1, overflowY: "auto", padding: 24 }, children: d.length === 0 ? /* @__PURE__ */ w("div", { style: { textAlign: "center", padding: "40px 0", color: "#9e9e9e" }, children: [
3028
+ /* @__PURE__ */ f(hr, { size: 36, style: { marginBottom: 8 } }),
3029
+ /* @__PURE__ */ f("p", { style: { margin: 0, fontSize: 14 }, children: "No templates found" })
3030
+ ] }) : /* @__PURE__ */ f("div", { style: { display: "grid", gridTemplateColumns: "repeat(auto-fill, minmax(280px, 1fr))", gap: 16 }, children: d.map((a) => /* @__PURE__ */ f(gs, { template: a, onSelect: () => t(a) }, a.triggerKey)) }) })
3025
3031
  ] });
3026
3032
  }, ze = {
3027
- running: { label: "Running", color: re.running, icon: G.createElement(nn, { size: 14 }) },
3028
- success: { label: "Success", color: re.success, icon: G.createElement(tn, { size: 14 }) },
3029
- failed: { label: "Failed", color: re.failed, icon: G.createElement(en, { size: 14 }) },
3030
- cancelled: { label: "Cancelled", color: re.cancelled, icon: G.createElement(Qt, { size: 14 }) }
3033
+ running: { label: "Running", color: oe.running, icon: $.createElement(nn, { size: 14 }) },
3034
+ success: { label: "Success", color: oe.success, icon: $.createElement(tn, { size: 14 }) },
3035
+ failed: { label: "Failed", color: oe.failed, icon: $.createElement(en, { size: 14 }) },
3036
+ cancelled: { label: "Cancelled", color: oe.cancelled, icon: $.createElement(Qt, { size: 14 }) }
3031
3037
  }, ps = {
3032
- pending: { color: re.pending, icon: G.createElement(gr, { size: 14 }) },
3033
- running: { color: re.running, icon: G.createElement(nn, { size: 14 }) },
3034
- success: { color: re.success, icon: G.createElement(tn, { size: 14 }) },
3035
- failed: { color: re.failed, icon: G.createElement(en, { size: 14 }) },
3036
- skipped: { color: re.skipped, icon: G.createElement(Qt, { size: 14 }) }
3038
+ pending: { color: oe.pending, icon: $.createElement(gr, { size: 14 }) },
3039
+ running: { color: oe.running, icon: $.createElement(nn, { size: 14 }) },
3040
+ success: { color: oe.success, icon: $.createElement(tn, { size: 14 }) },
3041
+ failed: { color: oe.failed, icon: $.createElement(en, { size: 14 }) },
3042
+ skipped: { color: oe.skipped, icon: $.createElement(Qt, { size: 14 }) }
3037
3043
  };
3038
3044
  function ot(e) {
3039
3045
  try {
@@ -3042,7 +3048,7 @@ function ot(e) {
3042
3048
  return e;
3043
3049
  }
3044
3050
  }
3045
- function On(e, t) {
3051
+ function In(e, t) {
3046
3052
  try {
3047
3053
  const n = new Date(t ?? (/* @__PURE__ */ new Date()).toISOString()).getTime() - new Date(e).getTime();
3048
3054
  return n < 1e3 ? `${n}ms` : n < 6e4 ? `${(n / 1e3).toFixed(1)}s` : `${Math.floor(n / 6e4)}m ${Math.floor(n % 6e4 / 1e3)}s`;
@@ -3066,23 +3072,23 @@ function ys({ step: e }) {
3066
3072
  o && (i.key === "Enter" || i.key === " ") && n((s) => !s);
3067
3073
  },
3068
3074
  children: [
3069
- /* @__PURE__ */ u("span", { style: { color: r.color, flexShrink: 0 }, children: G.cloneElement(r.icon, { color: r.color }) }),
3070
- /* @__PURE__ */ u("span", { style: { flex: 1, fontSize: 13, color: "#212121" }, children: e.label || e.nodeId }),
3071
- e.branchTaken && /* @__PURE__ */ u("span", { style: { fontSize: 10, padding: "1px 6px", borderRadius: 10, background: "#e3f2fd", color: "#1565c0", fontWeight: 600 }, children: e.branchTaken }),
3072
- /* @__PURE__ */ u("span", { style: { fontSize: 11, color: "#9e9e9e", flexShrink: 0 }, children: e.startedAt ? On(e.startedAt, e.completedAt) : "—" }),
3073
- o && /* @__PURE__ */ u("span", { style: { color: "#9e9e9e", flexShrink: 0 }, children: t ? G.createElement(yr, { size: 16 }) : G.createElement(br, { size: 16 }) })
3075
+ /* @__PURE__ */ f("span", { style: { color: r.color, flexShrink: 0 }, children: $.cloneElement(r.icon, { color: r.color }) }),
3076
+ /* @__PURE__ */ f("span", { style: { flex: 1, fontSize: 13, color: "#212121" }, children: e.label || e.nodeId }),
3077
+ e.branchTaken && /* @__PURE__ */ f("span", { style: { fontSize: 10, padding: "1px 6px", borderRadius: 10, background: "#e3f2fd", color: "#1565c0", fontWeight: 600 }, children: e.branchTaken }),
3078
+ /* @__PURE__ */ f("span", { style: { fontSize: 11, color: "#9e9e9e", flexShrink: 0 }, children: e.startedAt ? In(e.startedAt, e.completedAt) : "—" }),
3079
+ o && /* @__PURE__ */ f("span", { style: { color: "#9e9e9e", flexShrink: 0 }, children: t ? $.createElement(yr, { size: 16 }) : $.createElement(br, { size: 16 }) })
3074
3080
  ]
3075
3081
  }
3076
3082
  ),
3077
3083
  t && o && /* @__PURE__ */ w("div", { style: { padding: "0 12px 10px 32px", fontSize: 12 }, children: [
3078
- e.error && /* @__PURE__ */ u("div", { style: { padding: "6px 10px", borderRadius: 6, background: "#ffebee", color: "#c62828", marginBottom: 6 }, children: e.error }),
3084
+ e.error && /* @__PURE__ */ f("div", { style: { padding: "6px 10px", borderRadius: 6, background: "#ffebee", color: "#c62828", marginBottom: 6 }, children: e.error }),
3079
3085
  e.inputs && Object.keys(e.inputs).length > 0 && /* @__PURE__ */ w("details", { style: { marginBottom: 4 }, children: [
3080
- /* @__PURE__ */ u("summary", { style: { cursor: "pointer", color: "#616161", marginBottom: 4 }, children: "Inputs" }),
3081
- /* @__PURE__ */ u("pre", { style: { margin: 0, fontSize: 11, background: "#f5f5f5", padding: 8, borderRadius: 4, overflowX: "auto" }, children: JSON.stringify(e.inputs, null, 2) })
3086
+ /* @__PURE__ */ f("summary", { style: { cursor: "pointer", color: "#616161", marginBottom: 4 }, children: "Inputs" }),
3087
+ /* @__PURE__ */ f("pre", { style: { margin: 0, fontSize: 11, background: "#f5f5f5", padding: 8, borderRadius: 4, overflowX: "auto" }, children: JSON.stringify(e.inputs, null, 2) })
3082
3088
  ] }),
3083
3089
  e.outputs && Object.keys(e.outputs).length > 0 && /* @__PURE__ */ w("details", { children: [
3084
- /* @__PURE__ */ u("summary", { style: { cursor: "pointer", color: "#616161", marginBottom: 4 }, children: "Outputs" }),
3085
- /* @__PURE__ */ u("pre", { style: { margin: 0, fontSize: 11, background: "#f5f5f5", padding: 8, borderRadius: 4, overflowX: "auto" }, children: JSON.stringify(e.outputs, null, 2) })
3090
+ /* @__PURE__ */ f("summary", { style: { cursor: "pointer", color: "#616161", marginBottom: 4 }, children: "Outputs" }),
3091
+ /* @__PURE__ */ f("pre", { style: { margin: 0, fontSize: 11, background: "#f5f5f5", padding: 8, borderRadius: 4, overflowX: "auto" }, children: JSON.stringify(e.outputs, null, 2) })
3086
3092
  ] })
3087
3093
  ] })
3088
3094
  ] });
@@ -3109,9 +3115,9 @@ function bs({ record: e, selected: t, onSelect: n }) {
3109
3115
  outline: "none"
3110
3116
  },
3111
3117
  children: [
3112
- /* @__PURE__ */ u("span", { style: { color: r.color, flexShrink: 0 }, children: G.cloneElement(r.icon, { color: r.color, size: 16 }) }),
3118
+ /* @__PURE__ */ f("span", { style: { color: r.color, flexShrink: 0 }, children: $.cloneElement(r.icon, { color: r.color, size: 16 }) }),
3113
3119
  /* @__PURE__ */ w("div", { style: { flex: 1, minWidth: 0 }, children: [
3114
- /* @__PURE__ */ u("div", { style: { fontSize: 12, color: "#212121", fontWeight: t ? 600 : 400, whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }, children: ot(e.triggeredAt) }),
3120
+ /* @__PURE__ */ f("div", { style: { fontSize: 12, color: "#212121", fontWeight: t ? 600 : 400, whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }, children: ot(e.triggeredAt) }),
3115
3121
  /* @__PURE__ */ w("div", { style: { fontSize: 11, color: "#9e9e9e" }, children: [
3116
3122
  e.triggeredBy ? `by ${e.triggeredBy}` : "System",
3117
3123
  " · ",
@@ -3120,8 +3126,8 @@ function bs({ record: e, selected: t, onSelect: n }) {
3120
3126
  e.steps.length !== 1 ? "s" : ""
3121
3127
  ] })
3122
3128
  ] }),
3123
- /* @__PURE__ */ u("span", { style: { fontSize: 11, fontWeight: 600, color: r.color, flexShrink: 0 }, children: r.label }),
3124
- /* @__PURE__ */ u(Zt, { size: 14, color: "#bdbdbd" })
3129
+ /* @__PURE__ */ f("span", { style: { fontSize: 11, fontWeight: 600, color: r.color, flexShrink: 0 }, children: r.label }),
3130
+ /* @__PURE__ */ f(Zt, { size: 14, color: "#bdbdbd" })
3125
3131
  ]
3126
3132
  }
3127
3133
  );
@@ -3130,9 +3136,9 @@ const zs = ({ records: e, onViewOnCanvas: t }) => {
3130
3136
  var s;
3131
3137
  const [n, r] = L(((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());
3132
3138
  return e.length === 0 ? /* @__PURE__ */ w("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", height: 300, color: "#9e9e9e", gap: 8 }, children: [
3133
- /* @__PURE__ */ u(Ot, { size: 36 }),
3134
- /* @__PURE__ */ u("p", { style: { margin: 0, fontSize: 14 }, children: "No executions yet" }),
3135
- /* @__PURE__ */ u("p", { style: { margin: 0, fontSize: 12 }, children: "Run history will appear here" })
3139
+ /* @__PURE__ */ f(It, { size: 36 }),
3140
+ /* @__PURE__ */ f("p", { style: { margin: 0, fontSize: 14 }, children: "No executions yet" }),
3141
+ /* @__PURE__ */ f("p", { style: { margin: 0, fontSize: 12 }, children: "Run history will appear here" })
3136
3142
  ] }) : /* @__PURE__ */ w("div", { style: { display: "flex", height: "100%", fontFamily: "inherit", border: "1px solid #e0e0e0", borderRadius: 8, overflow: "hidden" }, children: [
3137
3143
  /* @__PURE__ */ w("div", { style: { width: 260, flexShrink: 0, borderRight: "1px solid #e0e0e0", overflowY: "auto", background: "#fafafa" }, children: [
3138
3144
  /* @__PURE__ */ w("div", { style: { padding: "12px 14px", borderBottom: "1px solid #e0e0e0", fontWeight: 600, fontSize: 13, color: "#212121" }, children: [
@@ -3140,30 +3146,30 @@ const zs = ({ records: e, onViewOnCanvas: t }) => {
3140
3146
  e.length,
3141
3147
  ")"
3142
3148
  ] }),
3143
- i.map((l) => /* @__PURE__ */ u(bs, { record: l, selected: l.id === n, onSelect: () => r(l.id) }, l.id))
3149
+ i.map((l) => /* @__PURE__ */ f(bs, { record: l, selected: l.id === n, onSelect: () => r(l.id) }, l.id))
3144
3150
  ] }),
3145
- /* @__PURE__ */ u("div", { style: { flex: 1, overflowY: "auto" }, children: o ? /* @__PURE__ */ w("div", { children: [
3151
+ /* @__PURE__ */ f("div", { style: { flex: 1, overflowY: "auto" }, children: o ? /* @__PURE__ */ w("div", { children: [
3146
3152
  /* @__PURE__ */ w("div", { style: { padding: "16px 20px", borderBottom: "1px solid #f0f0f0", display: "flex", alignItems: "flex-start", justifyContent: "space-between", gap: 12 }, children: [
3147
3153
  /* @__PURE__ */ w("div", { children: [
3148
3154
  /* @__PURE__ */ w("div", { style: { display: "flex", alignItems: "center", gap: 8, marginBottom: 4 }, children: [
3149
- G.cloneElement(ze[o.status].icon, { color: ze[o.status].color, size: 18 }),
3150
- /* @__PURE__ */ u("span", { style: { fontWeight: 700, fontSize: 15, color: "#212121" }, children: ze[o.status].label })
3155
+ $.cloneElement(ze[o.status].icon, { color: ze[o.status].color, size: 18 }),
3156
+ /* @__PURE__ */ f("span", { style: { fontWeight: 700, fontSize: 15, color: "#212121" }, children: ze[o.status].label })
3151
3157
  ] }),
3152
3158
  /* @__PURE__ */ w("div", { style: { fontSize: 12, color: "#757575", display: "flex", flexDirection: "column", gap: 2 }, children: [
3153
3159
  /* @__PURE__ */ w("span", { style: { display: "flex", alignItems: "center", gap: 4 }, children: [
3154
- /* @__PURE__ */ u(Ot, { size: 13 }),
3160
+ /* @__PURE__ */ f(It, { size: 13 }),
3155
3161
  " ",
3156
3162
  ot(o.triggeredAt),
3157
- o.completedAt && ` → ${ot(o.completedAt)} (${On(o.triggeredAt, o.completedAt)})`
3163
+ o.completedAt && ` → ${ot(o.completedAt)} (${In(o.triggeredAt, o.completedAt)})`
3158
3164
  ] }),
3159
3165
  o.triggeredBy && /* @__PURE__ */ w("span", { style: { display: "flex", alignItems: "center", gap: 4 }, children: [
3160
- /* @__PURE__ */ u(pr, { size: 13 }),
3166
+ /* @__PURE__ */ f(pr, { size: 13 }),
3161
3167
  " ",
3162
3168
  o.triggeredBy
3163
3169
  ] })
3164
3170
  ] })
3165
3171
  ] }),
3166
- t && /* @__PURE__ */ u(
3172
+ t && /* @__PURE__ */ f(
3167
3173
  "button",
3168
3174
  {
3169
3175
  onClick: () => t(o),
@@ -3172,20 +3178,20 @@ const zs = ({ records: e, onViewOnCanvas: t }) => {
3172
3178
  }
3173
3179
  )
3174
3180
  ] }),
3175
- o.error && /* @__PURE__ */ u("div", { style: { margin: "12px 16px", padding: "10px 14px", borderRadius: 6, background: "#ffebee", color: "#c62828", fontSize: 13 }, children: o.error }),
3181
+ o.error && /* @__PURE__ */ f("div", { style: { margin: "12px 16px", padding: "10px 14px", borderRadius: 6, background: "#ffebee", color: "#c62828", fontSize: 13 }, children: o.error }),
3176
3182
  /* @__PURE__ */ w("div", { children: [
3177
3183
  /* @__PURE__ */ w("div", { style: { padding: "10px 12px", fontSize: 12, fontWeight: 600, color: "#757575", borderBottom: "1px solid #f0f0f0" }, children: [
3178
3184
  "STEPS (",
3179
3185
  o.steps.length,
3180
3186
  ")"
3181
3187
  ] }),
3182
- o.steps.map((l, d) => /* @__PURE__ */ u(ys, { step: l }, `${l.nodeId}-${d}`))
3188
+ o.steps.map((l, d) => /* @__PURE__ */ f(ys, { step: l }, `${l.nodeId}-${d}`))
3183
3189
  ] }),
3184
- o.inputs && Object.keys(o.inputs).length > 0 && /* @__PURE__ */ u("div", { style: { padding: "10px 16px" }, children: /* @__PURE__ */ w("details", { children: [
3185
- /* @__PURE__ */ u("summary", { style: { cursor: "pointer", fontSize: 12, fontWeight: 600, color: "#757575", marginBottom: 6 }, children: "TRIGGER INPUTS" }),
3186
- /* @__PURE__ */ u("pre", { style: { margin: 0, fontSize: 11, background: "#f5f5f5", padding: 10, borderRadius: 4, overflowX: "auto" }, children: JSON.stringify(o.inputs, null, 2) })
3190
+ o.inputs && Object.keys(o.inputs).length > 0 && /* @__PURE__ */ f("div", { style: { padding: "10px 16px" }, children: /* @__PURE__ */ w("details", { children: [
3191
+ /* @__PURE__ */ f("summary", { style: { cursor: "pointer", fontSize: 12, fontWeight: 600, color: "#757575", marginBottom: 6 }, children: "TRIGGER INPUTS" }),
3192
+ /* @__PURE__ */ f("pre", { style: { margin: 0, fontSize: 11, background: "#f5f5f5", padding: 10, borderRadius: 4, overflowX: "auto" }, children: JSON.stringify(o.inputs, null, 2) })
3187
3193
  ] }) })
3188
- ] }) : /* @__PURE__ */ u("div", { style: { display: "flex", alignItems: "center", justifyContent: "center", height: "100%", color: "#9e9e9e", fontSize: 14 }, children: "Select a run to see details" }) })
3194
+ ] }) : /* @__PURE__ */ f("div", { style: { display: "flex", alignItems: "center", justifyContent: "center", height: "100%", color: "#9e9e9e", fontSize: 14 }, children: "Select a run to see details" }) })
3189
3195
  ] });
3190
3196
  };
3191
3197
  export {
@@ -3195,4 +3201,4 @@ export {
3195
3201
  ns as a,
3196
3202
  js as b
3197
3203
  };
3198
- //# sourceMappingURL=WorkflowExecutionHistory-CxKMGSch.js.map
3204
+ //# sourceMappingURL=WorkflowExecutionHistory-DmfGMs7_.js.map