@notmrabhi/flowforge 0.1.39 → 0.1.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/dist/GatewayBranchEdge-Dvkwkx-b.js +2 -0
  2. package/dist/GatewayBranchEdge-Dvkwkx-b.js.map +1 -0
  3. package/dist/{GatewayBranchEdge-DffZFc99.js → GatewayBranchEdge-F2AGJpun.js} +653 -580
  4. package/dist/GatewayBranchEdge-F2AGJpun.js.map +1 -0
  5. package/dist/canvas.cjs +1 -1
  6. package/dist/canvas.js +2 -2
  7. package/dist/core.cjs +1 -1
  8. package/dist/core.js +23 -22
  9. package/dist/core.js.map +1 -1
  10. package/dist/defaultUi.cjs +1 -1
  11. package/dist/defaultUi.js +1 -1
  12. package/dist/index-B6xrei80.js +87 -0
  13. package/dist/index-B6xrei80.js.map +1 -0
  14. package/dist/index-BrJBVztu.js +2 -0
  15. package/dist/index-BrJBVztu.js.map +1 -0
  16. package/dist/index-CXmgrKoe.js +2 -0
  17. package/dist/index-CXmgrKoe.js.map +1 -0
  18. package/dist/index-Dcur-XJ9.js +36 -0
  19. package/dist/index-Dcur-XJ9.js.map +1 -0
  20. package/dist/index.cjs +1 -1
  21. package/dist/index.cjs.map +1 -1
  22. package/dist/index.js +54 -53
  23. package/dist/index.js.map +1 -1
  24. package/dist/nodeRegistry.cjs +1 -1
  25. package/dist/nodeRegistry.cjs.map +1 -1
  26. package/dist/nodeRegistry.js +23 -543
  27. package/dist/nodeRegistry.js.map +1 -1
  28. package/dist/subWorkflowDescriptor-DYOYgBzX.js +535 -0
  29. package/dist/subWorkflowDescriptor-DYOYgBzX.js.map +1 -0
  30. package/dist/subWorkflowDescriptor-JDKi2INh.js +2 -0
  31. package/dist/subWorkflowDescriptor-JDKi2INh.js.map +1 -0
  32. package/dist/{templateSkeletons-CEqw1Djn.js → templateSkeletons-BQQ7UKp6.js} +4 -4
  33. package/dist/{templateSkeletons-CEqw1Djn.js.map → templateSkeletons-BQQ7UKp6.js.map} +1 -1
  34. package/dist/{templateSkeletons-Sd2FDF9w.js → templateSkeletons-C00QyIgk.js} +2 -2
  35. package/dist/{templateSkeletons-Sd2FDF9w.js.map → templateSkeletons-C00QyIgk.js.map} +1 -1
  36. package/package.json +1 -1
  37. package/dist/GatewayBranchEdge-CYoEUE5g.js +0 -2
  38. package/dist/GatewayBranchEdge-CYoEUE5g.js.map +0 -1
  39. package/dist/GatewayBranchEdge-DffZFc99.js.map +0 -1
@@ -1,14 +1,14 @@
1
- import { jsxs as n, jsx as e, Fragment as $ } from "react/jsx-runtime";
2
- import { Handle as b, Position as x, getStraightPath as U, BaseEdge as H } from "reactflow";
3
- import { Tooltip as W, Chip as V } from "@mui/material";
4
- import { GrTrigger as pe } from "react-icons/gr";
5
- import { createContext as ge, useContext as he } from "react";
6
- import { d as ye } from "./messages-CO299wPN.js";
7
- import { MdOutlineModeEdit as A, MdInfoOutline as B, MdInput as re, MdDeleteOutline as R, MdCheckCircle as ue, MdPeople as me, MdSchedule as be, MdWebhook as se, MdNotifications as O, MdSms as xe, MdEmail as Ne, MdContentCopy as ke, MdHttp as ve, MdCallSplit as we, MdAccountTree as Se, MdOpenInNew as Ee } from "react-icons/md";
8
- import { FaCheckCircle as fe, FaTimesCircle as ce } from "react-icons/fa";
9
- import { FiFilter as Ce } from "react-icons/fi";
10
- import { a as j, H as Te, B as G } from "./canvasTokens-CAD6G24b.js";
11
- const ze = ge({
1
+ import { jsxs as t, jsx as e, Fragment as B } from "react/jsx-runtime";
2
+ import { Handle as x, Position as N, getStraightPath as H, BaseEdge as G } from "reactflow";
3
+ import { Tooltip as $, Chip as q } from "@mui/material";
4
+ import { GrTrigger as Ne } from "react-icons/gr";
5
+ import { createContext as ke, useContext as ve } from "react";
6
+ import { d as we } from "./messages-CO299wPN.js";
7
+ import { MdOutlineModeEdit as D, MdInfoOutline as j, MdInput as fe, MdDeleteOutline as F, MdCheckCircle as Se, MdPeople as Ce, MdSchedule as Ee, MdWebhook as de, MdNotifications as U, MdSms as Te, MdEmail as ze, MdContentCopy as Ie, MdHttp as Pe, MdCallSplit as Ae, MdAccountTree as De, MdOpenInNew as Re } from "react-icons/md";
8
+ import { FaCheckCircle as ae, FaTimesCircle as pe } from "react-icons/fa";
9
+ import { FiFilter as Le } from "react-icons/fi";
10
+ import { a as K, H as We, B as Y } from "./canvasTokens-CAD6G24b.js";
11
+ const Fe = ke({
12
12
  onEditNode: () => {
13
13
  },
14
14
  onDeleteNode: () => {
@@ -17,91 +17,91 @@ const ze = ge({
17
17
  },
18
18
  onClickAddTrigger: () => {
19
19
  },
20
- messages: ye,
20
+ messages: we,
21
21
  nodeRegistry: null,
22
22
  nodeBody: "full"
23
- }), z = () => he(ze), Ie = () => /* @__PURE__ */ n("div", { style: { width: 350, display: "flex", justifyContent: "center" }, children: [
24
- /* @__PURE__ */ e(b, { type: "source", position: x.Bottom, style: { opacity: 0, left: "50%" } }),
23
+ }), I = () => ve(Fe), $e = () => /* @__PURE__ */ t("div", { style: { width: 350, display: "flex", justifyContent: "center" }, children: [
24
+ /* @__PURE__ */ e(x, { type: "source", position: N.Bottom, style: { opacity: 0, left: "50%" } }),
25
25
  /* @__PURE__ */ e("div", { style: { padding: "8px 28px", borderRadius: 999, background: "#f5f5f5", border: "1.5px solid #bdbdbd", fontSize: 13, fontWeight: 500, color: "#424242", userSelect: "none" }, children: "Start" })
26
- ] }), Pe = () => /* @__PURE__ */ n("div", { style: { width: 350, display: "flex", justifyContent: "center" }, children: [
27
- /* @__PURE__ */ e(b, { type: "target", position: x.Top, style: { opacity: 0, left: "50%" } }),
26
+ ] }), Be = () => /* @__PURE__ */ t("div", { style: { width: 350, display: "flex", justifyContent: "center" }, children: [
27
+ /* @__PURE__ */ e(x, { type: "target", position: N.Top, style: { opacity: 0, left: "50%" } }),
28
28
  /* @__PURE__ */ e("div", { style: { padding: "8px 28px", borderRadius: 999, background: "#f5f5f5", border: "1.5px solid #bdbdbd", fontSize: 13, fontWeight: 500, color: "#424242", userSelect: "none" }, children: "End" })
29
- ] }), Ae = () => {
30
- const { onClickAddTrigger: t, messages: l } = z();
31
- return /* @__PURE__ */ n("div", { style: { width: 350, display: "flex", justifyContent: "center" }, children: [
32
- /* @__PURE__ */ e(b, { type: "target", position: x.Top, style: { opacity: 0, left: "50%" } }),
33
- /* @__PURE__ */ e(W, { title: l.addTriggerTooltip, placement: "top", arrow: !0, children: /* @__PURE__ */ n(
29
+ ] }), je = () => {
30
+ const { onClickAddTrigger: n, messages: i } = I();
31
+ return /* @__PURE__ */ t("div", { style: { width: 350, display: "flex", justifyContent: "center" }, children: [
32
+ /* @__PURE__ */ e(x, { type: "target", position: N.Top, style: { opacity: 0, left: "50%" } }),
33
+ /* @__PURE__ */ e($, { title: i.addTriggerTooltip, placement: "top", arrow: !0, children: /* @__PURE__ */ t(
34
34
  "div",
35
35
  {
36
- onClick: t,
36
+ onClick: n,
37
37
  role: "button",
38
38
  tabIndex: 0,
39
- onKeyDown: (c) => {
40
- c.key === "Enter" && t();
39
+ onKeyDown: (f) => {
40
+ f.key === "Enter" && n();
41
41
  },
42
42
  style: { padding: "10px 24px", borderRadius: 8, border: "1.5px dashed #d0d0d0", background: "#fff", cursor: "pointer", display: "flex", alignItems: "center", justifyContent: "center", gap: 8 },
43
43
  children: [
44
- /* @__PURE__ */ e(pe, { size: 16 }),
45
- /* @__PURE__ */ e("span", { className: "ff-text-black", style: { fontSize: 13 }, "data-testid": "add-trigger-btn-text", children: l.addTriggerButton })
44
+ /* @__PURE__ */ e(Ne, { size: 16 }),
45
+ /* @__PURE__ */ e("span", { className: "ff-text-black", style: { fontSize: 13 }, "data-testid": "add-trigger-btn-text", children: i.addTriggerButton })
46
46
  ]
47
47
  }
48
48
  ) }),
49
- /* @__PURE__ */ e(b, { type: "source", position: x.Bottom, style: { opacity: 0, left: "50%" } })
49
+ /* @__PURE__ */ e(x, { type: "source", position: N.Bottom, style: { opacity: 0, left: "50%" } })
50
50
  ] });
51
- }, De = ({ id: t }) => {
52
- const { onAddStep: l } = z();
53
- return /* @__PURE__ */ n(
51
+ }, Ke = ({ id: n }) => {
52
+ const { onAddStep: i } = I();
53
+ return /* @__PURE__ */ t(
54
54
  "div",
55
55
  {
56
- onClick: () => l(t),
56
+ onClick: () => i(n),
57
57
  role: "button",
58
58
  tabIndex: 0,
59
- onKeyDown: (c) => {
60
- c.key === "Enter" && l(t);
59
+ onKeyDown: (f) => {
60
+ f.key === "Enter" && i(n);
61
61
  },
62
62
  style: { width: 28, height: 28, borderRadius: "50%", border: "1.5px solid #9e9e9e", background: "#fff", display: "flex", alignItems: "center", justifyContent: "center", cursor: "pointer", fontSize: 18, color: "#757575", lineHeight: 1, userSelect: "none" },
63
63
  children: [
64
- /* @__PURE__ */ e(b, { type: "target", position: x.Top, style: { opacity: 0 } }),
64
+ /* @__PURE__ */ e(x, { type: "target", position: N.Top, style: { opacity: 0 } }),
65
65
  "+",
66
- /* @__PURE__ */ e(b, { type: "source", position: x.Bottom, style: { opacity: 0 } })
66
+ /* @__PURE__ */ e(x, { type: "source", position: N.Bottom, style: { opacity: 0 } })
67
67
  ]
68
68
  }
69
69
  );
70
70
  };
71
- function de(t) {
72
- return t ? t.replace(/[_-]+/g, " ").toLowerCase().replace(/\b\w/g, (l) => l.toUpperCase()) : "";
71
+ function ge(n) {
72
+ return n ? n.replace(/[_-]+/g, " ").toLowerCase().replace(/\b\w/g, (i) => i.toUpperCase()) : "";
73
73
  }
74
- function Le(t) {
75
- if (typeof t != "string" && t.label) return t.label;
76
- const l = typeof t == "string" ? t : t.value ?? "";
77
- return de(l);
74
+ function Me(n) {
75
+ if (typeof n != "string" && n.label) return n.label;
76
+ const i = typeof n == "string" ? n : n.value ?? "";
77
+ return ge(i);
78
78
  }
79
- const Re = ({ data: t }) => {
80
- const { onClickAddTrigger: l } = z(), {
81
- type: c,
82
- eventType: a,
79
+ const _e = ({ data: n }) => {
80
+ const { onClickAddTrigger: i } = I(), {
81
+ type: f,
82
+ eventType: p,
83
83
  sources: s,
84
84
  label: r,
85
85
  source: h,
86
86
  previewWorkflow: o,
87
- executionStatus: i,
87
+ executionStatus: l,
88
88
  infoText: d = "This node decides the flow trigger type and configuration."
89
- } = t ?? {}, u = (m) => {
90
- m == null || m.stopPropagation(), l();
91
- }, y = Array.isArray(s) && s.length > 0, N = !!(r || h), p = c === "scheduler" ? "Scheduler Trigger" : c === "event" || y || N ? "Event Trigger Source" : "Select Trigger", f = (() => {
92
- if (c === "scheduler")
89
+ } = n ?? {}, u = (m) => {
90
+ m == null || m.stopPropagation(), i();
91
+ }, y = Array.isArray(s) && s.length > 0, k = !!(r || h), g = f === "scheduler" ? "Scheduler Trigger" : f === "event" || y || k ? "Event Trigger Source" : "Select Trigger", c = (() => {
92
+ if (f === "scheduler")
93
93
  return /* @__PURE__ */ e("span", { children: "Scheduler to be configured" });
94
- if (c === "event" || y) {
95
- const m = r || de(a);
96
- return /* @__PURE__ */ n("div", { children: [
97
- /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center", children: [
94
+ if (f === "event" || y) {
95
+ const m = r || ge(p);
96
+ return /* @__PURE__ */ t("div", { children: [
97
+ /* @__PURE__ */ t("div", { className: "ff-d-flex ff-align-items-center", children: [
98
98
  /* @__PURE__ */ e("span", { style: { fontWeight: 600 }, children: m }),
99
99
  /* @__PURE__ */ e("span", { className: "ff-ms-2 ff-text-muted", style: { fontSize: 12 }, children: "via" })
100
100
  ] }),
101
- /* @__PURE__ */ e("div", { className: "ff-d-flex ff-flex-wrap ff-mt-2", style: { gap: 4 }, children: y ? s.map((S, v) => /* @__PURE__ */ e(
102
- V,
101
+ /* @__PURE__ */ e("div", { className: "ff-d-flex ff-flex-wrap ff-mt-2", style: { gap: 4 }, children: y ? s.map((C, v) => /* @__PURE__ */ e(
102
+ q,
103
103
  {
104
- label: Le(S),
104
+ label: Me(C),
105
105
  variant: "outlined",
106
106
  size: "small",
107
107
  className: "ff-text-dark"
@@ -110,9 +110,9 @@ const Re = ({ data: t }) => {
110
110
  )) : /* @__PURE__ */ e("span", { className: "ff-text-muted", style: { fontSize: 12 }, children: "No source selected" }) })
111
111
  ] });
112
112
  }
113
- return N ? /* @__PURE__ */ n("div", { className: "ff-d-flex ff-flex-wrap ff-align-items-center", style: { gap: 6 }, children: [
113
+ return k ? /* @__PURE__ */ t("div", { className: "ff-d-flex ff-flex-wrap ff-align-items-center", style: { gap: 6 }, children: [
114
114
  r && /* @__PURE__ */ e("span", { style: { fontWeight: 600 }, children: r }),
115
- h && /* @__PURE__ */ e(V, { label: h, variant: "outlined", size: "small" })
115
+ h && /* @__PURE__ */ e(q, { label: h, variant: "outlined", size: "small" })
116
116
  ] }) : /* @__PURE__ */ e(
117
117
  "span",
118
118
  {
@@ -126,10 +126,10 @@ const Re = ({ data: t }) => {
126
126
  children: "Click to select a trigger to start your workflow"
127
127
  }
128
128
  );
129
- })(), w = i ? /* @__PURE__ */ n($, { children: [
130
- i.status === "success" && /* @__PURE__ */ e(fe, { size: 16, color: "#1DBF60", style: { marginRight: 8 } }),
131
- i.status === "failed" && /* @__PURE__ */ e(ce, { size: 16, color: "#f44336", style: { marginRight: 8 } })
132
- ] }) : /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center", children: [
129
+ })(), S = l ? /* @__PURE__ */ t(B, { children: [
130
+ l.status === "success" && /* @__PURE__ */ e(ae, { size: 16, color: "#1DBF60", style: { marginRight: 8 } }),
131
+ l.status === "failed" && /* @__PURE__ */ e(pe, { size: 16, color: "#f44336", style: { marginRight: 8 } })
132
+ ] }) : /* @__PURE__ */ t("div", { className: "ff-d-flex ff-align-items-center", children: [
133
133
  !o && /* @__PURE__ */ e(
134
134
  "div",
135
135
  {
@@ -142,16 +142,16 @@ const Re = ({ data: t }) => {
142
142
  className: "ff-me-2",
143
143
  style: { cursor: "pointer", color: "#212121" },
144
144
  "aria-label": "Edit trigger",
145
- children: /* @__PURE__ */ e(A, { size: 16 })
145
+ children: /* @__PURE__ */ e(D, { size: 16 })
146
146
  }
147
147
  ),
148
- /* @__PURE__ */ e(W, { title: /* @__PURE__ */ e("div", { children: d }), placement: "right", arrow: !0, children: /* @__PURE__ */ e("span", { children: /* @__PURE__ */ e(B, { color: "gray", size: 16 }) }) })
148
+ /* @__PURE__ */ e($, { title: /* @__PURE__ */ e("div", { children: d }), placement: "right", arrow: !0, children: /* @__PURE__ */ e("span", { children: /* @__PURE__ */ e(j, { color: "gray", size: 16 }) }) })
149
149
  ] });
150
- return /* @__PURE__ */ n("div", { style: { width: 350 }, children: [
151
- /* @__PURE__ */ e(b, { type: "target", position: x.Top, style: { opacity: 0 } }),
152
- /* @__PURE__ */ n("div", { style: { border: "1.5px solid #a5d6a7", borderRadius: 8, background: "#fff", overflow: "hidden" }, children: [
153
- /* @__PURE__ */ n("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center", style: { padding: "12px 14px" }, children: [
154
- /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
150
+ return /* @__PURE__ */ t("div", { style: { width: 350 }, children: [
151
+ /* @__PURE__ */ e(x, { type: "target", position: N.Top, style: { opacity: 0 } }),
152
+ /* @__PURE__ */ t("div", { style: { border: "1.5px solid #a5d6a7", borderRadius: 8, background: "#fff", overflow: "hidden" }, children: [
153
+ /* @__PURE__ */ t("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center", style: { padding: "12px 14px" }, children: [
154
+ /* @__PURE__ */ t("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
155
155
  /* @__PURE__ */ e(
156
156
  "div",
157
157
  {
@@ -165,12 +165,12 @@ const Re = ({ data: t }) => {
165
165
  justifyContent: "center",
166
166
  flexShrink: 0
167
167
  },
168
- children: /* @__PURE__ */ e(re, { size: 16, color: "#388e3c" })
168
+ children: /* @__PURE__ */ e(fe, { size: 16, color: "#388e3c" })
169
169
  }
170
170
  ),
171
- /* @__PURE__ */ e("span", { style: { fontSize: 14, fontWeight: 500, color: "#212121" }, children: p })
171
+ /* @__PURE__ */ e("span", { style: { fontSize: 14, fontWeight: 500, color: "#212121" }, children: g })
172
172
  ] }),
173
- /* @__PURE__ */ e("div", { className: "ff-d-flex ff-align-items-center", children: w })
173
+ /* @__PURE__ */ e("div", { className: "ff-d-flex ff-align-items-center", children: S })
174
174
  ] }),
175
175
  /* @__PURE__ */ e(
176
176
  "div",
@@ -184,34 +184,34 @@ const Re = ({ data: t }) => {
184
184
  borderRadius: 6,
185
185
  textAlign: "left"
186
186
  },
187
- children: f
187
+ children: c
188
188
  }
189
189
  )
190
190
  ] }),
191
- /* @__PURE__ */ e(b, { type: "source", position: x.Bottom, style: { opacity: 0 }, id: "1" })
191
+ /* @__PURE__ */ e(x, { type: "source", position: N.Bottom, style: { opacity: 0 }, id: "1" })
192
192
  ] });
193
193
  };
194
- function We(t) {
195
- return t ? t === "END_USER_CREATION" ? "New User Registration" : t === "END_USER_UPDATION" ? "On User Update" : t.replace(/[_-]+/g, " ").replace(/\b\w/g, (l) => l.toUpperCase()) : "";
194
+ function Oe(n) {
195
+ return n ? n === "END_USER_CREATION" ? "New User Registration" : n === "END_USER_UPDATION" ? "On User Update" : n.replace(/[_-]+/g, " ").replace(/\b\w/g, (i) => i.toUpperCase()) : "";
196
196
  }
197
- function Fe(t) {
198
- const l = typeof t == "string" ? t : t.value ?? "";
199
- return l === "SIGNUP_FLOW" ? "User Self-Registration" : l === "ADMIN_CREATION_FLOW" ? "Create User via Admin Portal" : l === "SHEDULAR" || l === "SCHEDULER" ? "Scheduler" : typeof t != "string" && t.label ? t.label : l.replace(/[_-]+/g, " ").replace(/\b\w/g, (c) => c.toUpperCase());
197
+ function Ue(n) {
198
+ const i = typeof n == "string" ? n : n.value ?? "";
199
+ return i === "SIGNUP_FLOW" ? "User Self-Registration" : i === "ADMIN_CREATION_FLOW" ? "Create User via Admin Portal" : i === "SHEDULAR" || i === "SCHEDULER" ? "Scheduler" : typeof n != "string" && n.label ? n.label : i.replace(/[_-]+/g, " ").replace(/\b\w/g, (f) => f.toUpperCase());
200
200
  }
201
- const $e = ({ data: t }) => {
201
+ const He = ({ data: n }) => {
202
202
  const {
203
- header: l = "Event",
204
- title: c,
205
- eventType: a,
203
+ header: i = "Event",
204
+ title: f,
205
+ eventType: p,
206
206
  sources: s,
207
207
  executionStatus: r,
208
208
  infoText: h = "This event is raised by the system. It cannot be configured."
209
- } = t ?? {}, o = c ?? We(a) ?? "—";
210
- return /* @__PURE__ */ n("div", { style: { width: 350 }, children: [
211
- /* @__PURE__ */ e(b, { type: "target", position: x.Top, style: { opacity: 0 } }),
212
- /* @__PURE__ */ n("div", { style: { border: "1.5px solid #a5d6a7", borderRadius: 8, background: "#fff", overflow: "hidden" }, children: [
213
- /* @__PURE__ */ n("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center", style: { padding: "12px 14px" }, children: [
214
- /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
209
+ } = n ?? {}, o = f ?? Oe(p) ?? "—";
210
+ return /* @__PURE__ */ t("div", { style: { width: 350 }, children: [
211
+ /* @__PURE__ */ e(x, { type: "target", position: N.Top, style: { opacity: 0 } }),
212
+ /* @__PURE__ */ t("div", { style: { border: "1.5px solid #a5d6a7", borderRadius: 8, background: "#fff", overflow: "hidden" }, children: [
213
+ /* @__PURE__ */ t("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center", style: { padding: "12px 14px" }, children: [
214
+ /* @__PURE__ */ t("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
215
215
  /* @__PURE__ */ e(
216
216
  "div",
217
217
  {
@@ -225,18 +225,18 @@ const $e = ({ data: t }) => {
225
225
  justifyContent: "center",
226
226
  flexShrink: 0
227
227
  },
228
- children: /* @__PURE__ */ e(re, { size: 16, color: "#388e3c" })
228
+ children: /* @__PURE__ */ e(fe, { size: 16, color: "#388e3c" })
229
229
  }
230
230
  ),
231
- /* @__PURE__ */ e("span", { style: { fontSize: 14, fontWeight: 500, color: "#212121" }, children: l })
231
+ /* @__PURE__ */ e("span", { style: { fontSize: 14, fontWeight: 500, color: "#212121" }, children: i })
232
232
  ] }),
233
- /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center", children: [
234
- (r == null ? void 0 : r.status) === "success" && /* @__PURE__ */ e(fe, { size: 16, color: "#1DBF60", style: { marginRight: 8 } }),
235
- (r == null ? void 0 : r.status) === "failed" && /* @__PURE__ */ e(ce, { size: 16, color: "#f44336", style: { marginRight: 8 } }),
236
- !r && /* @__PURE__ */ e(W, { title: /* @__PURE__ */ e("div", { children: h }), placement: "right", arrow: !0, children: /* @__PURE__ */ e("span", { children: /* @__PURE__ */ e(B, { color: "gray", size: 16 }) }) })
233
+ /* @__PURE__ */ t("div", { className: "ff-d-flex ff-align-items-center", children: [
234
+ (r == null ? void 0 : r.status) === "success" && /* @__PURE__ */ e(ae, { size: 16, color: "#1DBF60", style: { marginRight: 8 } }),
235
+ (r == null ? void 0 : r.status) === "failed" && /* @__PURE__ */ e(pe, { size: 16, color: "#f44336", style: { marginRight: 8 } }),
236
+ !r && /* @__PURE__ */ e($, { title: /* @__PURE__ */ e("div", { children: h }), placement: "right", arrow: !0, children: /* @__PURE__ */ e("span", { children: /* @__PURE__ */ e(j, { color: "gray", size: 16 }) }) })
237
237
  ] })
238
238
  ] }),
239
- /* @__PURE__ */ n(
239
+ /* @__PURE__ */ t(
240
240
  "div",
241
241
  {
242
242
  style: {
@@ -250,12 +250,12 @@ const $e = ({ data: t }) => {
250
250
  },
251
251
  children: [
252
252
  /* @__PURE__ */ e("div", { style: { fontWeight: 600 }, children: o }),
253
- Array.isArray(s) && s.length > 0 && /* @__PURE__ */ n($, { children: [
253
+ Array.isArray(s) && s.length > 0 && /* @__PURE__ */ t(B, { children: [
254
254
  /* @__PURE__ */ e("div", { className: "ff-text-muted", style: { fontSize: 12, marginTop: 4 }, children: "via" }),
255
- /* @__PURE__ */ e("div", { className: "ff-d-flex ff-flex-wrap ff-mt-1", style: { gap: 4 }, children: s.map((i, d) => /* @__PURE__ */ e(
256
- V,
255
+ /* @__PURE__ */ e("div", { className: "ff-d-flex ff-flex-wrap ff-mt-1", style: { gap: 4 }, children: s.map((l, d) => /* @__PURE__ */ e(
256
+ q,
257
257
  {
258
- label: Fe(i),
258
+ label: Ue(l),
259
259
  variant: "outlined",
260
260
  size: "small",
261
261
  className: "ff-text-dark"
@@ -267,40 +267,40 @@ const $e = ({ data: t }) => {
267
267
  }
268
268
  )
269
269
  ] }),
270
- /* @__PURE__ */ e(b, { type: "source", position: x.Bottom, style: { opacity: 0 }, id: "1" })
270
+ /* @__PURE__ */ e(x, { type: "source", position: N.Bottom, style: { opacity: 0 }, id: "1" })
271
271
  ] });
272
- }, ae = ({ rail: t, cardWidth: l }) => {
273
- const c = l / 2;
274
- l / 2 + t.indent;
275
- const a = "var(--ff-edge-color, #b0bec5)";
276
- return /* @__PURE__ */ n(
272
+ }, he = ({ rail: n, cardWidth: i }) => {
273
+ const f = i / 2;
274
+ i / 2 + n.indent;
275
+ const p = "var(--ff-edge-color, #b0bec5)";
276
+ return /* @__PURE__ */ t(
277
277
  "svg",
278
278
  {
279
- width: l + t.indent + 200,
280
- height: t.height,
279
+ width: i + n.indent + 200,
280
+ height: n.height,
281
281
  style: { position: "absolute", left: 0, top: "100%", pointerEvents: "none", overflow: "visible" },
282
282
  children: [
283
- /* @__PURE__ */ e("line", { x1: c, y1: 0, x2: c, y2: t.height, stroke: a, strokeWidth: 1.5 }),
284
- t.branches.map((s, r) => {
283
+ /* @__PURE__ */ e("line", { x1: f, y1: 0, x2: f, y2: n.height, stroke: p, strokeWidth: 1.5 }),
284
+ n.branches.map((s, r) => {
285
285
  const h = s.y;
286
- return /* @__PURE__ */ n("g", { transform: `translate(0, ${h})`, children: [
286
+ return /* @__PURE__ */ t("g", { transform: `translate(0, ${h})`, children: [
287
287
  /* @__PURE__ */ e(
288
288
  "rect",
289
289
  {
290
- x: c - 5,
290
+ x: f - 5,
291
291
  y: -5,
292
292
  width: 10,
293
293
  height: 10,
294
294
  fill: "#fff",
295
- stroke: a,
295
+ stroke: p,
296
296
  strokeWidth: 1.5,
297
- transform: `rotate(45, ${c}, 0)`
297
+ transform: `rotate(45, ${f}, 0)`
298
298
  }
299
299
  ),
300
300
  /* @__PURE__ */ e(
301
301
  "text",
302
302
  {
303
- x: c + 14,
303
+ x: f + 14,
304
304
  y: 4,
305
305
  fontSize: 12,
306
306
  fontWeight: 500,
@@ -314,29 +314,29 @@ const $e = ({ data: t }) => {
314
314
  ]
315
315
  }
316
316
  );
317
- }, Be = ({ id: t, data: l }) => {
318
- const { onEditNode: c, onDeleteNode: a } = z(), { conditions: s = [], infoText: r = "Filter conditions applied to workflow data", _branchRail: h } = l;
319
- return /* @__PURE__ */ n("div", { style: { width: 350, position: "relative" }, children: [
320
- /* @__PURE__ */ e(b, { type: "target", position: x.Top, style: { opacity: 0 } }),
321
- /* @__PURE__ */ n("div", { style: { border: "1.5px solid #ffe082", borderRadius: 8, background: "#fff" }, children: [
322
- /* @__PURE__ */ n("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center", style: { padding: "10px 6px" }, children: [
323
- /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center", children: [
324
- /* @__PURE__ */ e("div", { className: "ff-d-flex ff-align-items-center ff-justify-content-center ff-rounded", style: { width: 25, height: 25, background: "rgba(255,160,0,0.1)" }, children: /* @__PURE__ */ e(Ce, { className: "ff-text-warning", size: 16 }) }),
317
+ }, Ge = ({ id: n, data: i }) => {
318
+ const { onEditNode: f, onDeleteNode: p } = I(), { conditions: s = [], infoText: r = "Filter conditions applied to workflow data", _branchRail: h } = i;
319
+ return /* @__PURE__ */ t("div", { style: { width: 350, position: "relative" }, children: [
320
+ /* @__PURE__ */ e(x, { type: "target", position: N.Top, style: { opacity: 0 } }),
321
+ /* @__PURE__ */ t("div", { style: { border: "1.5px solid #ffe082", borderRadius: 8, background: "#fff" }, children: [
322
+ /* @__PURE__ */ t("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center", style: { padding: "10px 6px" }, children: [
323
+ /* @__PURE__ */ t("div", { className: "ff-d-flex ff-align-items-center", children: [
324
+ /* @__PURE__ */ e("div", { className: "ff-d-flex ff-align-items-center ff-justify-content-center ff-rounded", style: { width: 25, height: 25, background: "rgba(255,160,0,0.1)" }, children: /* @__PURE__ */ e(Le, { className: "ff-text-warning", size: 16 }) }),
325
325
  /* @__PURE__ */ e("span", { className: "ff-ms-2 ff-fw-medium ff-text-dark", style: { fontSize: 14 }, children: "Filter" })
326
326
  ] }),
327
- /* @__PURE__ */ n("div", { className: "node-actions ff-d-flex ff-align-items-center", children: [
327
+ /* @__PURE__ */ t("div", { className: "node-actions ff-d-flex ff-align-items-center", children: [
328
328
  /* @__PURE__ */ e(
329
329
  "div",
330
330
  {
331
331
  role: "button",
332
332
  tabIndex: 0,
333
333
  onClick: (o) => {
334
- o.stopPropagation(), c(t);
334
+ o.stopPropagation(), f(n);
335
335
  },
336
336
  onKeyDown: (o) => {
337
- o.key === "Enter" && (o.stopPropagation(), c(t));
337
+ o.key === "Enter" && (o.stopPropagation(), f(n));
338
338
  },
339
- children: /* @__PURE__ */ e(A, { size: 16 })
339
+ children: /* @__PURE__ */ e(D, { size: 16 })
340
340
  }
341
341
  ),
342
342
  /* @__PURE__ */ e(
@@ -346,77 +346,84 @@ const $e = ({ data: t }) => {
346
346
  role: "button",
347
347
  tabIndex: 0,
348
348
  onClick: (o) => {
349
- o.stopPropagation(), a(t);
349
+ o.stopPropagation(), p(n);
350
350
  },
351
351
  onKeyDown: (o) => {
352
- o.key === "Enter" && (o.stopPropagation(), a(t));
352
+ o.key === "Enter" && (o.stopPropagation(), p(n));
353
353
  },
354
- children: /* @__PURE__ */ e(R, { color: "red", size: 16 })
354
+ children: /* @__PURE__ */ e(F, { color: "red", size: 16 })
355
355
  }
356
356
  ),
357
- /* @__PURE__ */ e(W, { title: r, placement: "right", arrow: !0, children: /* @__PURE__ */ e("div", { className: "ff-ms-2", children: /* @__PURE__ */ e(B, { color: "gray", size: 16 }) }) })
357
+ /* @__PURE__ */ e($, { title: r, placement: "right", arrow: !0, children: /* @__PURE__ */ e("div", { className: "ff-ms-2", children: /* @__PURE__ */ e(j, { color: "gray", size: 16 }) }) })
358
358
  ] })
359
359
  ] }),
360
- /* @__PURE__ */ e("div", { style: { margin: "0 6px 10px", padding: "10px 12px", borderRadius: 6, background: "#fafafa", fontSize: 12 }, children: s.length === 0 ? /* @__PURE__ */ e("span", { className: "ff-text-muted", children: "No conditions configured" }) : s.map((o, i) => /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-mb-1", children: [
360
+ /* @__PURE__ */ e("div", { style: { margin: "0 6px 10px", padding: "10px 12px", borderRadius: 6, background: "#fafafa", fontSize: 12 }, children: s.length === 0 ? /* @__PURE__ */ e("span", { className: "ff-text-muted", children: "No conditions configured" }) : s.map((o, l) => /* @__PURE__ */ t("div", { className: "ff-d-flex ff-align-items-center ff-mb-1", children: [
361
361
  /* @__PURE__ */ e("p", { className: "ff-m-0 ff-fw-bold ff-me-1 ff-text-truncate", style: { maxWidth: 100 }, title: o.field, children: o.field }),
362
362
  /* @__PURE__ */ e("span", { className: "ff-text-muted", children: o.operator }),
363
363
  /* @__PURE__ */ e("p", { className: "ff-text-dark ff-text-truncate ff-mx-1 ff-m-0", title: o.value, children: o.value }),
364
- i < s.length - 1 && /* @__PURE__ */ e("p", { className: "ff-bg-primary ff-text-white ff-fw-bold ff-ms-1 ff-px-1 ff-rounded-1 ff-m-0", children: o.logicalOperator })
365
- ] }, i)) })
364
+ l < s.length - 1 && /* @__PURE__ */ e("p", { className: "ff-bg-primary ff-text-white ff-fw-bold ff-ms-1 ff-px-1 ff-rounded-1 ff-m-0", children: o.logicalOperator })
365
+ ] }, l)) })
366
366
  ] }),
367
- /* @__PURE__ */ e(b, { type: "source", position: x.Bottom, style: { opacity: 0 } }),
368
- h && /* @__PURE__ */ e(ae, { rail: h, cardWidth: 350 })
367
+ /* @__PURE__ */ e(x, { type: "source", position: N.Bottom, style: { opacity: 0 } }),
368
+ h && /* @__PURE__ */ e(he, { rail: h, cardWidth: 350 })
369
369
  ] });
370
- }, je = ({ id: t, data: l }) => {
371
- const { onEditNode: c, onDeleteNode: a, nodeRegistry: s, nodeBody: r = "full" } = z(), { title: h = "Task", descriptorType: o, groupBlocks: i, groups: d, roles: u, groupId: y, roleId: N, infoText: p = "" } = l, f = o ? s == null ? void 0 : s.forType(o) : void 0, w = f == null ? void 0 : f.icon, m = (g) => g == null ? "" : typeof g == "string" ? g : typeof g == "object" && "label" in g ? String(g.label) : String(g), S = (g) => Array.isArray(g) ? g.map(m).filter(Boolean) : g != null && g !== "" ? [m(g)] : [], v = /* @__PURE__ */ new Set([
370
+ }, Ve = ({ id: n, data: i }) => {
371
+ const { onEditNode: f, onDeleteNode: p, nodeRegistry: s, nodeBody: r = "full" } = I(), { title: h = "Task", descriptorType: o, groupBlocks: l, groups: d, roles: u, groupId: y, roleId: k, infoText: g = "" } = i, c = o ? s == null ? void 0 : s.forType(o) : void 0, S = c == null ? void 0 : c.icon, m = (a) => a == null ? "" : typeof a == "string" ? a : typeof a == "object" && "label" in a ? String(a.label) : String(a), C = (a) => Array.isArray(a) ? a.map(m).filter(Boolean) : a != null && a !== "" ? [m(a)] : [], v = /* @__PURE__ */ new Set([
372
372
  "descriptorType",
373
373
  "title",
374
374
  "header",
375
375
  "icon",
376
376
  "infoText",
377
- "label"
378
- ]), D = f == null ? void 0 : f.formSchema, C = (g) => {
379
- if (Array.isArray(D)) {
380
- const k = D.find((L) => (L == null ? void 0 : L.id) === g || (L == null ? void 0 : L.name) === g);
381
- if (k != null && k.label) return k.label;
377
+ "label",
378
+ // FlowForm's condition-builder sidecar rendered separately below as
379
+ // proper "When ..." rows, not as a JSON dump in the generic body.
380
+ "conditionConfig",
381
+ "_conditionConfig"
382
+ ]), R = c == null ? void 0 : c.formSchema, T = (a) => {
383
+ if (Array.isArray(R)) {
384
+ const b = R.find((w) => (w == null ? void 0 : w.id) === a || (w == null ? void 0 : w.name) === a);
385
+ if (b != null && b.label) return b.label;
382
386
  }
383
- return g.replace(/[_-]+/g, " ").replace(/\b\w/g, (k) => k.toUpperCase());
384
- }, P = (g) => {
385
- if (Array.isArray(g)) {
386
- const k = g.map(
387
- (F) => typeof F == "object" && F ? F.label ?? F.name ?? F.value ?? "" : String(F)
388
- ).filter(Boolean), L = k.slice(0, 3).join(", ");
389
- return k.length > 3 ? `${L} +${k.length - 3}` : L;
387
+ return a.replace(/[_-]+/g, " ").replace(/\b\w/g, (b) => b.toUpperCase());
388
+ }, P = (a) => {
389
+ if (Array.isArray(a)) {
390
+ const b = a.map(
391
+ (W) => typeof W == "object" && W ? W.label ?? W.name ?? W.value ?? "" : String(W)
392
+ ).filter(Boolean), w = b.slice(0, 3).join(", ");
393
+ return b.length > 3 ? `${w} +${b.length - 3}` : w;
390
394
  }
391
- if (g && typeof g == "object") {
392
- const k = g;
393
- return k.label ?? k.name ?? k.value ?? JSON.stringify(g);
395
+ if (a && typeof a == "object") {
396
+ const b = a;
397
+ return b.label ?? b.name ?? b.value ?? JSON.stringify(a);
394
398
  }
395
- return String(g);
396
- }, I = Object.entries(l || {}).filter(
397
- ([g, k]) => !v.has(g) && k !== "" && k !== null && k !== void 0 && !(Array.isArray(k) && k.length === 0)
398
- ), T = (i == null ? void 0 : i.flatMap((g) => g.groups ?? [])) ?? [...S(d), ...S(u), ...S(y), ...S(N)], E = T.length > 0;
399
- return /* @__PURE__ */ n("div", { style: { width: 350 }, children: [
400
- /* @__PURE__ */ e(b, { type: "target", position: x.Top, style: { opacity: 0 } }),
401
- /* @__PURE__ */ n("div", { style: { border: "1.5px solid #b0bec5", borderRadius: 8, background: "#fff" }, children: [
402
- /* @__PURE__ */ n("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center", style: { padding: "10px 6px" }, children: [
403
- /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
404
- w && /* @__PURE__ */ e("div", { style: { display: "flex", alignItems: "center" }, children: w }),
399
+ return String(a);
400
+ }, A = Object.entries(i || {}).filter(
401
+ ([a, b]) => !v.has(a) && b !== "" && b !== null && b !== void 0 && !(Array.isArray(b) && b.length === 0)
402
+ ), z = (i == null ? void 0 : i.conditionConfig) ?? (i == null ? void 0 : i._conditionConfig), E = z && typeof z == "object" ? Object.entries(z).filter(([, a]) => Array.isArray(a) && a.length > 0).map(([a, b]) => ({
403
+ path: a,
404
+ entries: b
405
+ })) : [], L = (l == null ? void 0 : l.flatMap((a) => a.groups ?? [])) ?? [...C(d), ...C(u), ...C(y), ...C(k)], V = L.length > 0;
406
+ return /* @__PURE__ */ t("div", { style: { width: 350 }, children: [
407
+ /* @__PURE__ */ e(x, { type: "target", position: N.Top, style: { opacity: 0 } }),
408
+ /* @__PURE__ */ t("div", { style: { border: "1.5px solid #b0bec5", borderRadius: 8, background: "#fff" }, children: [
409
+ /* @__PURE__ */ t("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center", style: { padding: "10px 6px" }, children: [
410
+ /* @__PURE__ */ t("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
411
+ S && /* @__PURE__ */ e("div", { style: { display: "flex", alignItems: "center" }, children: S }),
405
412
  /* @__PURE__ */ e("span", { className: "ff-text-dark", style: { fontSize: 14, fontWeight: 500 }, children: h })
406
413
  ] }),
407
- /* @__PURE__ */ n("div", { className: "node-actions ff-d-flex ff-align-items-center", children: [
414
+ /* @__PURE__ */ t("div", { className: "node-actions ff-d-flex ff-align-items-center", children: [
408
415
  /* @__PURE__ */ e(
409
416
  "div",
410
417
  {
411
418
  role: "button",
412
419
  tabIndex: 0,
413
- onClick: (g) => {
414
- g.stopPropagation(), c(t);
420
+ onClick: (a) => {
421
+ a.stopPropagation(), f(n);
415
422
  },
416
- onKeyDown: (g) => {
417
- g.key === "Enter" && (g.stopPropagation(), c(t));
423
+ onKeyDown: (a) => {
424
+ a.key === "Enter" && (a.stopPropagation(), f(n));
418
425
  },
419
- children: /* @__PURE__ */ e(A, { size: 16 })
426
+ children: /* @__PURE__ */ e(D, { size: 16 })
420
427
  }
421
428
  ),
422
429
  /* @__PURE__ */ e(
@@ -425,85 +432,151 @@ const $e = ({ data: t }) => {
425
432
  className: "ff-ms-2",
426
433
  role: "button",
427
434
  tabIndex: 0,
428
- onClick: (g) => {
429
- g.stopPropagation(), a(t);
435
+ onClick: (a) => {
436
+ a.stopPropagation(), p(n);
430
437
  },
431
- onKeyDown: (g) => {
432
- g.key === "Enter" && (g.stopPropagation(), a(t));
438
+ onKeyDown: (a) => {
439
+ a.key === "Enter" && (a.stopPropagation(), p(n));
433
440
  },
434
- children: /* @__PURE__ */ e(R, { color: "red", size: 16 })
441
+ children: /* @__PURE__ */ e(F, { color: "red", size: 16 })
435
442
  }
436
443
  ),
437
- p && /* @__PURE__ */ e(W, { title: p, placement: "right", arrow: !0, children: /* @__PURE__ */ e("div", { className: "ff-ms-2", children: /* @__PURE__ */ e(B, { color: "gray", size: 16 }) }) })
444
+ g && /* @__PURE__ */ e($, { title: g, placement: "right", arrow: !0, children: /* @__PURE__ */ e("div", { className: "ff-ms-2", children: /* @__PURE__ */ e(j, { color: "gray", size: 16 }) }) })
438
445
  ] })
439
446
  ] }),
440
- r !== "title-only" && /* @__PURE__ */ e("div", { style: { margin: "0 10px 12px", padding: "14px 16px", borderRadius: 6, background: "#fafafa", fontSize: 12, textAlign: "left" }, children: f != null && f.renderNode ? f.renderNode(l) : I.length > 0 ? /* @__PURE__ */ n("div", { style: { display: "flex", flexDirection: "column", gap: 4 }, children: [
441
- I.slice(0, 4).map(([g, k]) => /* @__PURE__ */ n(
442
- "div",
443
- {
444
- style: {
445
- display: "flex",
446
- alignItems: "baseline",
447
- gap: 6,
448
- color: "#475569",
449
- overflow: "hidden"
450
- },
451
- children: [
452
- /* @__PURE__ */ n("span", { style: { fontWeight: 600, color: "#0f172a", flexShrink: 0 }, children: [
453
- C(g),
447
+ r !== "title-only" && // Body container matches IAM ActionNodeLabel: 12px text, left-aligned.
448
+ // We use a single bg-light rounded pill that wraps everything, the
449
+ // same way IAM's groupBlocks each render as bg-light rounded my-2 p-2.
450
+ /* @__PURE__ */ e(
451
+ "div",
452
+ {
453
+ style: {
454
+ margin: "0 10px 12px",
455
+ padding: 8,
456
+ borderRadius: 4,
457
+ background: "#f8f9fa",
458
+ fontSize: 12,
459
+ textAlign: "left",
460
+ color: "#212529"
461
+ },
462
+ children: c != null && c.renderNode ? c.renderNode(i) : A.length > 0 || E.length > 0 ? /* @__PURE__ */ t("div", { style: { display: "flex", flexDirection: "column", gap: 4 }, children: [
463
+ A.slice(0, 4).map(([a, b]) => /* @__PURE__ */ t("div", { style: { display: "flex", alignItems: "baseline", gap: 4 }, children: [
464
+ /* @__PURE__ */ t("span", { style: { fontWeight: 700, color: "#212529", flexShrink: 0 }, children: [
465
+ T(a),
454
466
  ":"
455
467
  ] }),
456
468
  /* @__PURE__ */ e(
457
469
  "span",
458
470
  {
459
- title: P(k),
471
+ title: P(b),
460
472
  style: {
473
+ color: "#212529",
461
474
  overflow: "hidden",
462
475
  textOverflow: "ellipsis",
463
476
  whiteSpace: "nowrap",
464
477
  minWidth: 0,
465
478
  flex: 1
466
479
  },
467
- children: P(k)
480
+ children: P(b)
468
481
  }
469
482
  )
470
- ]
471
- },
472
- g
473
- )),
474
- I.length > 4 && /* @__PURE__ */ n("div", { style: { color: "#94a3b8", fontSize: 11 }, children: [
475
- "+",
476
- I.length - 4,
477
- " more"
478
- ] })
479
- ] }) : E ? /* @__PURE__ */ e("div", { className: "ff-d-flex ff-flex-wrap ff-gap-1", children: T.map((g, k) => /* @__PURE__ */ e("span", { className: "ff-badge ff-bg-dark ff-text-white ff-py-1 ff-px-2 ff-rounded", style: { fontSize: 11 }, title: g, children: g }, k)) }) : /* @__PURE__ */ e("span", { style: { color: "#94a3b8" }, children: "Click edit to configure" }) })
483
+ ] }, a)),
484
+ A.length > 4 && /* @__PURE__ */ t("div", { style: { color: "#6c757d", fontSize: 11 }, children: [
485
+ "+",
486
+ A.length - 4,
487
+ " more"
488
+ ] }),
489
+ E.map((a, b) => /* @__PURE__ */ t("div", { style: { marginTop: 4 }, children: [
490
+ /* @__PURE__ */ e("div", { style: { color: "#6c757d", marginBottom: 2 }, children: "When" }),
491
+ a.entries.slice(0, 3).map((w, W, ye) => {
492
+ const ue = w.field || "", me = w.fieldLabel || T(ue), be = w.operator || "", Z = w.value == null ? "" : typeof w.value == "object" ? P(w.value) : String(w.value), xe = w.connector || "and";
493
+ return /* @__PURE__ */ t(
494
+ "div",
495
+ {
496
+ style: {
497
+ display: "flex",
498
+ alignItems: "center",
499
+ flexWrap: "wrap",
500
+ marginTop: 2
501
+ },
502
+ children: [
503
+ /* @__PURE__ */ e("span", { style: { fontWeight: 700, marginRight: 4, color: "#212529" }, children: me }),
504
+ /* @__PURE__ */ e("span", { style: { color: "#6c757d", marginRight: 4 }, children: be }),
505
+ /* @__PURE__ */ e("span", { style: { color: "#212529", marginRight: 4 }, title: Z, children: Z }),
506
+ W < ye.length - 1 && /* @__PURE__ */ e(
507
+ "span",
508
+ {
509
+ style: {
510
+ background: "#0d6efd",
511
+ color: "#fff",
512
+ fontWeight: 700,
513
+ marginLeft: 4,
514
+ padding: "0 4px",
515
+ borderRadius: 2,
516
+ textTransform: "uppercase",
517
+ fontSize: 10
518
+ },
519
+ children: xe
520
+ }
521
+ )
522
+ ]
523
+ },
524
+ W
525
+ );
526
+ }),
527
+ a.entries.length > 3 && /* @__PURE__ */ t("div", { style: { color: "#6c757d", fontSize: 11 }, children: [
528
+ "+",
529
+ a.entries.length - 3,
530
+ " more"
531
+ ] })
532
+ ] }, `cond-${b}`))
533
+ ] }) : V ? (
534
+ // Dark badges matching IAM's bg-dark text-white py-1 px-2 rounded
535
+ /* @__PURE__ */ e("div", { style: { display: "flex", flexWrap: "wrap", gap: 4 }, children: L.map((a, b) => /* @__PURE__ */ e(
536
+ "span",
537
+ {
538
+ title: a,
539
+ style: {
540
+ background: "#212529",
541
+ color: "#fff",
542
+ padding: "4px 8px",
543
+ borderRadius: 4,
544
+ fontSize: 11
545
+ },
546
+ children: a
547
+ },
548
+ b
549
+ )) })
550
+ ) : /* @__PURE__ */ e("span", { style: { color: "#6c757d" }, children: "Click edit to configure" })
551
+ }
552
+ )
480
553
  ] }),
481
- /* @__PURE__ */ e(b, { type: "source", position: x.Bottom, style: { opacity: 0 } })
554
+ /* @__PURE__ */ e(x, { type: "source", position: N.Bottom, style: { opacity: 0 } })
482
555
  ] });
483
- }, q = 5, Me = ({ id: t, data: l }) => {
484
- const { onEditNode: c, onDeleteNode: a } = z(), { approvalData: s, isPreview: r = !1, _branchRail: h } = l, o = (s == null ? void 0 : s.policy) ?? {}, i = o.stages ?? [], d = i.length, u = i.slice(0, q), y = d - q, N = o.name ?? o.policyName ?? "Untitled Policy";
485
- return /* @__PURE__ */ n("div", { style: { width: 350, position: "relative" }, children: [
486
- /* @__PURE__ */ e(b, { type: "target", position: x.Top, style: { opacity: 0 } }),
487
- /* @__PURE__ */ n("div", { style: { border: "1.5px solid #ffe082", borderRadius: 8, background: "#fff" }, children: [
488
- /* @__PURE__ */ n("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center", style: { padding: "10px 6px" }, children: [
489
- /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
490
- /* @__PURE__ */ e("div", { className: "ff-d-flex ff-align-items-center ff-justify-content-center ff-rounded", style: { width: 25, height: 25, background: "rgba(251,192,45,0.2)" }, children: /* @__PURE__ */ e(ue, { style: { color: "#FBC02D" }, size: 16 }) }),
556
+ }, J = 5, qe = ({ id: n, data: i }) => {
557
+ const { onEditNode: f, onDeleteNode: p } = I(), { approvalData: s, isPreview: r = !1, _branchRail: h } = i, o = (s == null ? void 0 : s.policy) ?? {}, l = o.stages ?? [], d = l.length, u = l.slice(0, J), y = d - J, k = o.name ?? o.policyName ?? "Untitled Policy";
558
+ return /* @__PURE__ */ t("div", { style: { width: 350, position: "relative" }, children: [
559
+ /* @__PURE__ */ e(x, { type: "target", position: N.Top, style: { opacity: 0 } }),
560
+ /* @__PURE__ */ t("div", { style: { border: "1.5px solid #ffe082", borderRadius: 8, background: "#fff" }, children: [
561
+ /* @__PURE__ */ t("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center", style: { padding: "10px 6px" }, children: [
562
+ /* @__PURE__ */ t("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
563
+ /* @__PURE__ */ e("div", { className: "ff-d-flex ff-align-items-center ff-justify-content-center ff-rounded", style: { width: 25, height: 25, background: "rgba(251,192,45,0.2)" }, children: /* @__PURE__ */ e(Se, { style: { color: "#FBC02D" }, size: 16 }) }),
491
564
  /* @__PURE__ */ e("span", { className: "ff-fw-medium ff-text-dark", style: { fontSize: 14 }, children: "Approval Policy" })
492
565
  ] }),
493
- /* @__PURE__ */ n("div", { className: "node-actions ff-d-flex ff-align-items-center", children: [
566
+ /* @__PURE__ */ t("div", { className: "node-actions ff-d-flex ff-align-items-center", children: [
494
567
  !r && /* @__PURE__ */ e(
495
568
  "div",
496
569
  {
497
570
  role: "button",
498
571
  tabIndex: 0,
499
572
  style: { cursor: "pointer" },
500
- onClick: (p) => {
501
- p.stopPropagation(), c(t);
573
+ onClick: (g) => {
574
+ g.stopPropagation(), f(n);
502
575
  },
503
- onKeyDown: (p) => {
504
- p.key === "Enter" && (p.stopPropagation(), c(t));
576
+ onKeyDown: (g) => {
577
+ g.key === "Enter" && (g.stopPropagation(), f(n));
505
578
  },
506
- children: /* @__PURE__ */ e(A, { size: 16, className: "ff-text-secondary" })
579
+ children: /* @__PURE__ */ e(D, { size: 16, className: "ff-text-secondary" })
507
580
  }
508
581
  ),
509
582
  !r && /* @__PURE__ */ e(
@@ -513,55 +586,55 @@ const $e = ({ data: t }) => {
513
586
  role: "button",
514
587
  tabIndex: 0,
515
588
  style: { cursor: "pointer" },
516
- onClick: (p) => {
517
- p.stopPropagation(), a(t);
589
+ onClick: (g) => {
590
+ g.stopPropagation(), p(n);
518
591
  },
519
- onKeyDown: (p) => {
520
- p.key === "Enter" && (p.stopPropagation(), a(t));
592
+ onKeyDown: (g) => {
593
+ g.key === "Enter" && (g.stopPropagation(), p(n));
521
594
  },
522
- children: /* @__PURE__ */ e(R, { color: "red", size: 16 })
595
+ children: /* @__PURE__ */ e(F, { color: "red", size: 16 })
523
596
  }
524
597
  ),
525
- /* @__PURE__ */ e(W, { title: "This approval policy determines who must approve a request before the workflow continues.", arrow: !0, placement: "right", children: /* @__PURE__ */ e("span", { className: "ff-ms-2 ff-d-inline-flex", children: /* @__PURE__ */ e(B, { color: "gray", size: 16 }) }) })
598
+ /* @__PURE__ */ e($, { title: "This approval policy determines who must approve a request before the workflow continues.", arrow: !0, placement: "right", children: /* @__PURE__ */ e("span", { className: "ff-ms-2 ff-d-inline-flex", children: /* @__PURE__ */ e(j, { color: "gray", size: 16 }) }) })
526
599
  ] })
527
600
  ] }),
528
- /* @__PURE__ */ n("div", { style: { margin: "0 6px 10px", padding: "10px 12px", borderRadius: 6, background: "#FCFCFC" }, children: [
529
- /* @__PURE__ */ n("div", { className: "ff-d-flex ff-justify-content-start ff-align-items-center ff-mb-2", children: [
530
- /* @__PURE__ */ e("h6", { className: "ff-text-dark ff-mb-0 ff-text-truncate ff-flex-grow-1 ff-me-2", style: { fontSize: 13, fontWeight: 700 }, title: N, children: N }),
531
- /* @__PURE__ */ n("span", { className: "ff-badge ff-rounded-pill ff-px-2 ff-py-1 ff-flex-shrink-0", style: { background: "#FFF9C4", color: "#616161", fontSize: 11, fontWeight: 600 }, children: [
601
+ /* @__PURE__ */ t("div", { style: { margin: "0 6px 10px", padding: "10px 12px", borderRadius: 6, background: "#FCFCFC" }, children: [
602
+ /* @__PURE__ */ t("div", { className: "ff-d-flex ff-justify-content-start ff-align-items-center ff-mb-2", children: [
603
+ /* @__PURE__ */ e("h6", { className: "ff-text-dark ff-mb-0 ff-text-truncate ff-flex-grow-1 ff-me-2", style: { fontSize: 13, fontWeight: 700 }, title: k, children: k }),
604
+ /* @__PURE__ */ t("span", { className: "ff-badge ff-rounded-pill ff-px-2 ff-py-1 ff-flex-shrink-0", style: { background: "#FFF9C4", color: "#616161", fontSize: 11, fontWeight: 600 }, children: [
532
605
  d,
533
606
  " Stage",
534
607
  d !== 1 ? "s" : ""
535
608
  ] })
536
609
  ] }),
537
- i.length > 0 ? /* @__PURE__ */ n("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: [
538
- u.map((p, f) => {
539
- var P, I, T;
540
- const w = ((P = p.stageName) == null ? void 0 : P.trim()) || `Stage ${f + 1}`, m = Array.isArray(p.userIds) ? p.userIds.length : 0, S = ((I = p.groupName) == null ? void 0 : I.trim()) ?? "", v = ((T = p.roleName) == null ? void 0 : T.trim()) ?? "", D = m > 0 || S || v;
541
- let C = "Not configured";
542
- return S ? C = `Group: ${S}` : v ? C = `Role: ${v}` : m > 0 && (C = `${m} approver${m !== 1 ? "s" : ""}`), /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
543
- /* @__PURE__ */ e("div", { className: "ff-rounded-circle ff-d-flex ff-align-items-center ff-justify-content-center ff-flex-shrink-0", style: { width: 28, height: 28, background: "#FFF9C4", color: "#5D4037", fontSize: 12, fontWeight: 700 }, children: f + 1 }),
544
- /* @__PURE__ */ n("div", { className: "ff-flex-grow-1 ff-rounded ff-p-2 ff-d-flex ff-justify-content-between ff-align-items-center ff-border", style: { background: "#FFFDE7", borderColor: "#FEE79A" }, children: [
545
- /* @__PURE__ */ e("span", { style: { fontSize: 12, fontWeight: 700, color: "#212121" }, children: w }),
546
- /* @__PURE__ */ n("span", { className: `ff-d-flex ff-align-items-center ff-gap-1 ${D ? "ff-text-dark" : "ff-text-muted"}`, style: { fontSize: 12 }, children: [
547
- /* @__PURE__ */ e(me, { size: 16, className: "ff-flex-shrink-0", style: { color: D ? "#5D4037" : "#9E9E9E" } }),
548
- C
610
+ l.length > 0 ? /* @__PURE__ */ t("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: [
611
+ u.map((g, c) => {
612
+ var P, A, z;
613
+ const S = ((P = g.stageName) == null ? void 0 : P.trim()) || `Stage ${c + 1}`, m = Array.isArray(g.userIds) ? g.userIds.length : 0, C = ((A = g.groupName) == null ? void 0 : A.trim()) ?? "", v = ((z = g.roleName) == null ? void 0 : z.trim()) ?? "", R = m > 0 || C || v;
614
+ let T = "Not configured";
615
+ return C ? T = `Group: ${C}` : v ? T = `Role: ${v}` : m > 0 && (T = `${m} approver${m !== 1 ? "s" : ""}`), /* @__PURE__ */ t("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
616
+ /* @__PURE__ */ e("div", { className: "ff-rounded-circle ff-d-flex ff-align-items-center ff-justify-content-center ff-flex-shrink-0", style: { width: 28, height: 28, background: "#FFF9C4", color: "#5D4037", fontSize: 12, fontWeight: 700 }, children: c + 1 }),
617
+ /* @__PURE__ */ t("div", { className: "ff-flex-grow-1 ff-rounded ff-p-2 ff-d-flex ff-justify-content-between ff-align-items-center ff-border", style: { background: "#FFFDE7", borderColor: "#FEE79A" }, children: [
618
+ /* @__PURE__ */ e("span", { style: { fontSize: 12, fontWeight: 700, color: "#212121" }, children: S }),
619
+ /* @__PURE__ */ t("span", { className: `ff-d-flex ff-align-items-center ff-gap-1 ${R ? "ff-text-dark" : "ff-text-muted"}`, style: { fontSize: 12 }, children: [
620
+ /* @__PURE__ */ e(Ce, { size: 16, className: "ff-flex-shrink-0", style: { color: R ? "#5D4037" : "#9E9E9E" } }),
621
+ T
549
622
  ] })
550
623
  ] })
551
- ] }, f);
624
+ ] }, c);
552
625
  }),
553
- y > 0 && /* @__PURE__ */ n(
626
+ y > 0 && /* @__PURE__ */ t(
554
627
  "div",
555
628
  {
556
629
  className: "ff-text-center ff-fw-bold ff-py-2 ff-border ff-rounded",
557
630
  style: { fontSize: 11, color: "#1976d2", borderColor: "#FEE79A", background: "#FFFDE7", borderStyle: "dashed", cursor: r ? "default" : "pointer" },
558
631
  role: r ? void 0 : "button",
559
632
  tabIndex: r ? void 0 : 0,
560
- onClick: (p) => {
561
- r || (p.stopPropagation(), c(t));
633
+ onClick: (g) => {
634
+ r || (g.stopPropagation(), f(n));
562
635
  },
563
- onKeyDown: (p) => {
564
- r || p.key !== "Enter" || (p.stopPropagation(), c(t));
636
+ onKeyDown: (g) => {
637
+ r || g.key !== "Enter" || (g.stopPropagation(), f(n));
565
638
  },
566
639
  children: [
567
640
  "+ ",
@@ -574,32 +647,32 @@ const $e = ({ data: t }) => {
574
647
  ] }) : /* @__PURE__ */ e("div", { className: "ff-text-center ff-py-3 ff-rounded ff-border", style: { fontSize: 12, color: "#9e9e9e", background: "#FFFDE7", borderColor: "#FEE79A", borderStyle: "dashed" }, children: "No stages configured" })
575
648
  ] })
576
649
  ] }),
577
- /* @__PURE__ */ e(b, { type: "source", position: x.Bottom, style: { opacity: 0 } }),
578
- h && /* @__PURE__ */ e(ae, { rail: h, cardWidth: 350 })
650
+ /* @__PURE__ */ e(x, { type: "source", position: N.Bottom, style: { opacity: 0 } }),
651
+ h && /* @__PURE__ */ e(he, { rail: h, cardWidth: 350 })
579
652
  ] });
580
- }, Ke = ({ id: t, data: l }) => {
581
- const { onEditNode: c, onDeleteNode: a } = z(), { duration: s, unit: r } = l, h = s != null && r, o = h ? `Wait ${s} ${r}` : "Not configured";
582
- return /* @__PURE__ */ n("div", { style: { width: 350 }, children: [
583
- /* @__PURE__ */ e(b, { type: "target", position: x.Top, style: { opacity: 0 } }),
584
- /* @__PURE__ */ n("div", { style: { border: "1.5px solid #b0bec5", borderRadius: 8, background: "#fff" }, children: [
585
- /* @__PURE__ */ n("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center ff-mx-2 ff-mt-2 ff-mb-1", children: [
586
- /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
587
- /* @__PURE__ */ e("div", { className: "ff-d-flex ff-align-items-center ff-justify-content-center ff-rounded", style: { width: 25, height: 25, background: "rgba(33,150,243,0.1)" }, children: /* @__PURE__ */ e(be, { size: 16, color: "#1976d2" }) }),
653
+ }, Ze = ({ id: n, data: i }) => {
654
+ const { onEditNode: f, onDeleteNode: p } = I(), { duration: s, unit: r } = i, h = s != null && r, o = h ? `Wait ${s} ${r}` : "Not configured";
655
+ return /* @__PURE__ */ t("div", { style: { width: 350 }, children: [
656
+ /* @__PURE__ */ e(x, { type: "target", position: N.Top, style: { opacity: 0 } }),
657
+ /* @__PURE__ */ t("div", { style: { border: "1.5px solid #b0bec5", borderRadius: 8, background: "#fff" }, children: [
658
+ /* @__PURE__ */ t("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center ff-mx-2 ff-mt-2 ff-mb-1", children: [
659
+ /* @__PURE__ */ t("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
660
+ /* @__PURE__ */ e("div", { className: "ff-d-flex ff-align-items-center ff-justify-content-center ff-rounded", style: { width: 25, height: 25, background: "rgba(33,150,243,0.1)" }, children: /* @__PURE__ */ e(Ee, { size: 16, color: "#1976d2" }) }),
588
661
  /* @__PURE__ */ e("span", { className: "ff-fw-medium ff-text-dark", style: { fontSize: 14 }, children: "Delay" })
589
662
  ] }),
590
- /* @__PURE__ */ n("div", { className: "node-actions ff-d-flex ff-align-items-center", children: [
663
+ /* @__PURE__ */ t("div", { className: "node-actions ff-d-flex ff-align-items-center", children: [
591
664
  /* @__PURE__ */ e(
592
665
  "div",
593
666
  {
594
667
  role: "button",
595
668
  tabIndex: 0,
596
- onClick: (i) => {
597
- i.stopPropagation(), c(t);
669
+ onClick: (l) => {
670
+ l.stopPropagation(), f(n);
598
671
  },
599
- onKeyDown: (i) => {
600
- i.key === "Enter" && (i.stopPropagation(), c(t));
672
+ onKeyDown: (l) => {
673
+ l.key === "Enter" && (l.stopPropagation(), f(n));
601
674
  },
602
- children: /* @__PURE__ */ e(A, { size: 16 })
675
+ children: /* @__PURE__ */ e(D, { size: 16 })
603
676
  }
604
677
  ),
605
678
  /* @__PURE__ */ e(
@@ -608,90 +681,90 @@ const $e = ({ data: t }) => {
608
681
  className: "ff-ms-2",
609
682
  role: "button",
610
683
  tabIndex: 0,
611
- onClick: (i) => {
612
- i.stopPropagation(), a(t);
684
+ onClick: (l) => {
685
+ l.stopPropagation(), p(n);
613
686
  },
614
- onKeyDown: (i) => {
615
- i.key === "Enter" && (i.stopPropagation(), a(t));
687
+ onKeyDown: (l) => {
688
+ l.key === "Enter" && (l.stopPropagation(), p(n));
616
689
  },
617
- children: /* @__PURE__ */ e(R, { color: "red", size: 16 })
690
+ children: /* @__PURE__ */ e(F, { color: "red", size: 16 })
618
691
  }
619
692
  )
620
693
  ] })
621
694
  ] }),
622
695
  /* @__PURE__ */ e("div", { className: "ff-mx-2 ff-mb-2 ff-p-2 ff-rounded", style: { background: "#fafafa", fontSize: 12 }, children: /* @__PURE__ */ e("span", { className: h ? "ff-text-dark ff-fw-medium" : "ff-text-muted", children: o }) })
623
696
  ] }),
624
- /* @__PURE__ */ e(b, { type: "source", position: x.Bottom, style: { opacity: 0 } })
697
+ /* @__PURE__ */ e(x, { type: "source", position: N.Bottom, style: { opacity: 0 } })
625
698
  ] });
626
- }, Z = {
627
- email: { label: "Email", bg: "#e3f2fd", color: "#1565c0", iconType: Ne },
628
- slack: { label: "Slack", bg: "#e8f5e9", color: "#2e7d32", iconType: O },
629
- teams: { label: "MS Teams", bg: "#ede7f6", color: "#4527a0", iconType: O },
630
- sms: { label: "SMS", bg: "#fce4ec", color: "#880e4f", iconType: xe },
631
- "in-app": { label: "In-App", bg: "#fff3e0", color: "#e65100", iconType: O },
632
- webhook: { label: "Webhook", bg: "#f3e5f5", color: "#6a1b9a", iconType: se }
633
- }, _e = {
699
+ }, Q = {
700
+ email: { label: "Email", bg: "#e3f2fd", color: "#1565c0", iconType: ze },
701
+ slack: { label: "Slack", bg: "#e8f5e9", color: "#2e7d32", iconType: U },
702
+ teams: { label: "MS Teams", bg: "#ede7f6", color: "#4527a0", iconType: U },
703
+ sms: { label: "SMS", bg: "#fce4ec", color: "#880e4f", iconType: Te },
704
+ "in-app": { label: "In-App", bg: "#fff3e0", color: "#e65100", iconType: U },
705
+ webhook: { label: "Webhook", bg: "#f3e5f5", color: "#6a1b9a", iconType: de }
706
+ }, Ye = {
634
707
  label: "Notification",
635
708
  bg: "rgba(156,39,176,0.1)",
636
709
  color: "#7b1fa2",
637
- iconType: O
710
+ iconType: U
638
711
  };
639
- function Oe(t) {
640
- var l;
641
- switch (t.channel) {
712
+ function Je(n) {
713
+ var i;
714
+ switch (n.channel) {
642
715
  case "email":
643
- return ((l = t.emailTo) == null ? void 0 : l.join(", ")) ?? t.recipient ?? null;
716
+ return ((i = n.emailTo) == null ? void 0 : i.join(", ")) ?? n.recipient ?? null;
644
717
  case "slack":
645
- return t.slackChannel ?? null;
718
+ return n.slackChannel ?? null;
646
719
  case "teams":
647
- return t.teamsMessage ? "Message configured" : null;
720
+ return n.teamsMessage ? "Message configured" : null;
648
721
  case "sms":
649
- return t.smsTo ?? null;
722
+ return n.smsTo ?? null;
650
723
  case "in-app":
651
- return t.inAppRecipient ?? null;
724
+ return n.inAppRecipient ?? null;
652
725
  case "webhook":
653
- return t.webhookUrl ?? null;
726
+ return n.webhookUrl ?? null;
654
727
  default:
655
- return t.recipient ?? null;
728
+ return n.recipient ?? null;
656
729
  }
657
730
  }
658
- function Ue(t) {
659
- switch (t.channel) {
731
+ function Qe(n) {
732
+ switch (n.channel) {
660
733
  case "email":
661
- return t.emailSubject ?? t.subject ?? null;
734
+ return n.emailSubject ?? n.subject ?? null;
662
735
  case "slack": {
663
- const l = t.slackMessage;
664
- return l ? l.length > 60 ? `${l.slice(0, 60)}…` : l : null;
736
+ const i = n.slackMessage;
737
+ return i ? i.length > 60 ? `${i.slice(0, 60)}…` : i : null;
665
738
  }
666
739
  case "in-app":
667
- return t.inAppTitle ?? null;
740
+ return n.inAppTitle ?? null;
668
741
  default:
669
- return t.subject ?? null;
742
+ return n.subject ?? null;
670
743
  }
671
744
  }
672
- const He = ({ id: t, data: l }) => {
673
- const { onEditNode: c, onDeleteNode: a } = z(), s = l, r = s.channel && Z[s.channel] ? Z[s.channel] : _e, h = Oe(s), o = Ue(s), i = !!(s.channel && h), d = r.iconType;
674
- return /* @__PURE__ */ n("div", { style: { width: j }, children: [
675
- /* @__PURE__ */ e(b, { type: "target", position: x.Top, style: { opacity: 0 } }),
676
- /* @__PURE__ */ n("div", { style: { border: "1.5px solid #b0bec5", borderRadius: 8, background: "#fff" }, children: [
677
- /* @__PURE__ */ n("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center", style: { padding: "10px 6px" }, children: [
678
- /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
745
+ const Xe = ({ id: n, data: i }) => {
746
+ const { onEditNode: f, onDeleteNode: p } = I(), s = i, r = s.channel && Q[s.channel] ? Q[s.channel] : Ye, h = Je(s), o = Qe(s), l = !!(s.channel && h), d = r.iconType;
747
+ return /* @__PURE__ */ t("div", { style: { width: K }, children: [
748
+ /* @__PURE__ */ e(x, { type: "target", position: N.Top, style: { opacity: 0 } }),
749
+ /* @__PURE__ */ t("div", { style: { border: "1.5px solid #b0bec5", borderRadius: 8, background: "#fff" }, children: [
750
+ /* @__PURE__ */ t("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center", style: { padding: "10px 6px" }, children: [
751
+ /* @__PURE__ */ t("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
679
752
  /* @__PURE__ */ e("div", { className: "ff-d-flex ff-align-items-center ff-justify-content-center ff-rounded", style: { width: 25, height: 25, background: r.bg }, children: /* @__PURE__ */ e(d, { size: 16, color: r.color }) }),
680
753
  /* @__PURE__ */ e("span", { className: "ff-fw-medium ff-text-dark", style: { fontSize: 14 }, children: s.channel ? `${r.label} Notification` : "Notification" })
681
754
  ] }),
682
- /* @__PURE__ */ n("div", { className: "node-actions ff-d-flex ff-align-items-center", children: [
755
+ /* @__PURE__ */ t("div", { className: "node-actions ff-d-flex ff-align-items-center", children: [
683
756
  /* @__PURE__ */ e(
684
757
  "div",
685
758
  {
686
759
  role: "button",
687
760
  tabIndex: 0,
688
761
  onClick: (u) => {
689
- u.stopPropagation(), c(t);
762
+ u.stopPropagation(), f(n);
690
763
  },
691
764
  onKeyDown: (u) => {
692
- (u.key === "Enter" || u.key === " ") && (u.stopPropagation(), c(t));
765
+ (u.key === "Enter" || u.key === " ") && (u.stopPropagation(), f(n));
693
766
  },
694
- children: /* @__PURE__ */ e(A, { size: 16 })
767
+ children: /* @__PURE__ */ e(D, { size: 16 })
695
768
  }
696
769
  ),
697
770
  /* @__PURE__ */ e(
@@ -701,42 +774,42 @@ const He = ({ id: t, data: l }) => {
701
774
  role: "button",
702
775
  tabIndex: 0,
703
776
  onClick: (u) => {
704
- u.stopPropagation(), a(t);
777
+ u.stopPropagation(), p(n);
705
778
  },
706
779
  onKeyDown: (u) => {
707
- (u.key === "Enter" || u.key === " ") && (u.stopPropagation(), a(t));
780
+ (u.key === "Enter" || u.key === " ") && (u.stopPropagation(), p(n));
708
781
  },
709
- children: /* @__PURE__ */ e(R, { color: "red", size: 16 })
782
+ children: /* @__PURE__ */ e(F, { color: "red", size: 16 })
710
783
  }
711
784
  )
712
785
  ] })
713
786
  ] }),
714
- /* @__PURE__ */ e("div", { style: { margin: "0 6px 10px", padding: "10px 12px", borderRadius: 6, background: "#fafafa", fontSize: 12 }, children: i ? /* @__PURE__ */ n("div", { className: "ff-d-flex ff-flex-column ff-gap-1", children: [
715
- /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
787
+ /* @__PURE__ */ e("div", { style: { margin: "0 6px 10px", padding: "10px 12px", borderRadius: 6, background: "#fafafa", fontSize: 12 }, children: l ? /* @__PURE__ */ t("div", { className: "ff-d-flex ff-flex-column ff-gap-1", children: [
788
+ /* @__PURE__ */ t("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
716
789
  /* @__PURE__ */ e("span", { className: "ff-px-2 ff-py-1 ff-rounded", style: { fontSize: 10, background: r.bg, color: r.color, fontWeight: 600, flexShrink: 0 }, children: r.label }),
717
790
  /* @__PURE__ */ e("span", { className: "ff-text-dark ff-text-truncate", style: { maxWidth: 220 }, children: h })
718
791
  ] }),
719
792
  o && /* @__PURE__ */ e("span", { className: "ff-text-muted ff-text-truncate", style: { maxWidth: 280 }, children: o })
720
793
  ] }) : /* @__PURE__ */ e("span", { className: "ff-text-muted", children: "Not configured" }) })
721
794
  ] }),
722
- /* @__PURE__ */ e(b, { type: "source", position: x.Bottom, style: { opacity: 0 } })
795
+ /* @__PURE__ */ e(x, { type: "source", position: N.Bottom, style: { opacity: 0 } })
723
796
  ] });
724
- }, Y = {
797
+ }, X = {
725
798
  "api-key": "API Key",
726
799
  hmac: "HMAC"
727
- }, Ve = ({ data: t }) => {
728
- const { onClickAddTrigger: l } = z(), { label: c = "Webhook Trigger", endpointUrl: a, authMethod: s, source: r } = t, h = (i) => {
729
- i.stopPropagation(), l();
730
- }, o = (i) => {
731
- i.stopPropagation(), a && navigator.clipboard.writeText(a).catch(() => {
800
+ }, et = ({ data: n }) => {
801
+ const { onClickAddTrigger: i } = I(), { label: f = "Webhook Trigger", endpointUrl: p, authMethod: s, source: r } = n, h = (l) => {
802
+ l.stopPropagation(), i();
803
+ }, o = (l) => {
804
+ l.stopPropagation(), p && navigator.clipboard.writeText(p).catch(() => {
732
805
  });
733
806
  };
734
- return /* @__PURE__ */ n("div", { style: { width: j }, children: [
735
- /* @__PURE__ */ e(b, { type: "target", position: x.Top, style: { opacity: 0 } }),
736
- /* @__PURE__ */ n("div", { style: { border: "1.5px solid #90caf9", borderRadius: 8, background: "#fff", overflow: "hidden" }, children: [
737
- /* @__PURE__ */ n("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center", style: { padding: "10px 6px" }, children: [
738
- /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
739
- /* @__PURE__ */ e("div", { style: { width: 28, height: 28, borderRadius: 6, background: "rgba(33,150,243,0.1)", display: "flex", alignItems: "center", justifyContent: "center", flexShrink: 0 }, children: /* @__PURE__ */ e(se, { size: 16, color: "#1565c0" }) }),
807
+ return /* @__PURE__ */ t("div", { style: { width: K }, children: [
808
+ /* @__PURE__ */ e(x, { type: "target", position: N.Top, style: { opacity: 0 } }),
809
+ /* @__PURE__ */ t("div", { style: { border: "1.5px solid #90caf9", borderRadius: 8, background: "#fff", overflow: "hidden" }, children: [
810
+ /* @__PURE__ */ t("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center", style: { padding: "10px 6px" }, children: [
811
+ /* @__PURE__ */ t("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
812
+ /* @__PURE__ */ e("div", { style: { width: 28, height: 28, borderRadius: 6, background: "rgba(33,150,243,0.1)", display: "flex", alignItems: "center", justifyContent: "center", flexShrink: 0 }, children: /* @__PURE__ */ e(de, { size: 16, color: "#1565c0" }) }),
740
813
  /* @__PURE__ */ e("span", { style: { fontSize: 13, fontWeight: 600, color: "#212121" }, children: "Webhook Trigger" })
741
814
  ] }),
742
815
  /* @__PURE__ */ e(
@@ -745,65 +818,65 @@ const He = ({ id: t, data: l }) => {
745
818
  role: "button",
746
819
  tabIndex: 0,
747
820
  onClick: h,
748
- onKeyDown: (i) => {
749
- (i.key === "Enter" || i.key === " ") && h(i);
821
+ onKeyDown: (l) => {
822
+ (l.key === "Enter" || l.key === " ") && h(l);
750
823
  },
751
824
  className: "ff-d-flex ff-align-items-center",
752
825
  style: { paddingRight: 4, cursor: "pointer" },
753
- children: /* @__PURE__ */ e(A, { size: 16, color: "#555" })
826
+ children: /* @__PURE__ */ e(D, { size: 16, color: "#555" })
754
827
  }
755
828
  )
756
829
  ] }),
757
- /* @__PURE__ */ n("div", { style: { margin: "0 6px 10px", padding: "10px 12px", borderRadius: 6, background: "#e3f2fd", border: "1px solid #90caf9" }, children: [
758
- /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-flex-wrap ff-gap-2 ff-mb-1", children: [
759
- /* @__PURE__ */ e("span", { style: { fontSize: 12, color: "#1565c0", fontWeight: 600 }, children: c }),
830
+ /* @__PURE__ */ t("div", { style: { margin: "0 6px 10px", padding: "10px 12px", borderRadius: 6, background: "#e3f2fd", border: "1px solid #90caf9" }, children: [
831
+ /* @__PURE__ */ t("div", { className: "ff-d-flex ff-align-items-center ff-flex-wrap ff-gap-2 ff-mb-1", children: [
832
+ /* @__PURE__ */ e("span", { style: { fontSize: 12, color: "#1565c0", fontWeight: 600 }, children: f }),
760
833
  r && /* @__PURE__ */ e("span", { className: "ff-px-2 ff-py-1 ff-rounded", style: { fontSize: 11, background: "#fff", border: "1px solid #90caf9", color: "#1565c0" }, children: r }),
761
- s && s !== "none" && Y[s] && /* @__PURE__ */ e("span", { className: "ff-px-2 ff-py-1 ff-rounded", style: { fontSize: 10, background: "#1565c0", color: "#fff", fontWeight: 600 }, children: Y[s] })
834
+ s && s !== "none" && X[s] && /* @__PURE__ */ e("span", { className: "ff-px-2 ff-py-1 ff-rounded", style: { fontSize: 10, background: "#1565c0", color: "#fff", fontWeight: 600 }, children: X[s] })
762
835
  ] }),
763
- a && /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-gap-1", style: { marginTop: 4 }, children: [
764
- /* @__PURE__ */ e("span", { style: { fontSize: 10, color: "#1565c0", fontFamily: "monospace", flex: 1, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: a }),
765
- /* @__PURE__ */ e(W, { title: "Copy URL", placement: "top", arrow: !0, children: /* @__PURE__ */ e(
836
+ p && /* @__PURE__ */ t("div", { className: "ff-d-flex ff-align-items-center ff-gap-1", style: { marginTop: 4 }, children: [
837
+ /* @__PURE__ */ e("span", { style: { fontSize: 10, color: "#1565c0", fontFamily: "monospace", flex: 1, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: p }),
838
+ /* @__PURE__ */ e($, { title: "Copy URL", placement: "top", arrow: !0, children: /* @__PURE__ */ e(
766
839
  "div",
767
840
  {
768
841
  role: "button",
769
842
  tabIndex: 0,
770
843
  onClick: o,
771
- onKeyDown: (i) => {
772
- (i.key === "Enter" || i.key === " ") && o(i);
844
+ onKeyDown: (l) => {
845
+ (l.key === "Enter" || l.key === " ") && o(l);
773
846
  },
774
847
  style: { cursor: "pointer", flexShrink: 0 },
775
- children: /* @__PURE__ */ e(ke, { size: 12, color: "#1565c0" })
848
+ children: /* @__PURE__ */ e(Ie, { size: 12, color: "#1565c0" })
776
849
  }
777
850
  ) })
778
851
  ] })
779
852
  ] })
780
853
  ] }),
781
- /* @__PURE__ */ e(b, { type: "source", position: x.Bottom, style: { opacity: 0 } })
854
+ /* @__PURE__ */ e(x, { type: "source", position: N.Bottom, style: { opacity: 0 } })
782
855
  ] });
783
- }, Ge = ({ id: t, data: l }) => {
784
- var N;
785
- const { onEditNode: c, onDeleteNode: a, nodeRegistry: s } = z(), { method: r, url: h, descriptorType: o } = l, i = o ? (N = s == null ? void 0 : s.forType(o)) == null ? void 0 : N.icon : /* @__PURE__ */ e(ve, { size: 16, color: "#546e7a" }), d = !!(r && h), u = (r == null ? void 0 : r.toUpperCase()) ?? "", y = Te[u] ?? null;
786
- return /* @__PURE__ */ n("div", { style: { width: j }, children: [
787
- /* @__PURE__ */ e(b, { type: "target", position: x.Top, style: { opacity: 0 } }),
788
- /* @__PURE__ */ n("div", { style: { border: "1.5px solid #b0bec5", borderRadius: 8, background: "#fff" }, children: [
789
- /* @__PURE__ */ n("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center", style: { padding: "10px 6px" }, children: [
790
- /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
791
- /* @__PURE__ */ e("div", { style: { width: 25, height: 25, display: "flex", alignItems: "center", justifyContent: "center" }, children: i }),
856
+ }, tt = ({ id: n, data: i }) => {
857
+ var k;
858
+ const { onEditNode: f, onDeleteNode: p, nodeRegistry: s } = I(), { method: r, url: h, descriptorType: o } = i, l = o ? (k = s == null ? void 0 : s.forType(o)) == null ? void 0 : k.icon : /* @__PURE__ */ e(Pe, { size: 16, color: "#546e7a" }), d = !!(r && h), u = (r == null ? void 0 : r.toUpperCase()) ?? "", y = We[u] ?? null;
859
+ return /* @__PURE__ */ t("div", { style: { width: K }, children: [
860
+ /* @__PURE__ */ e(x, { type: "target", position: N.Top, style: { opacity: 0 } }),
861
+ /* @__PURE__ */ t("div", { style: { border: "1.5px solid #b0bec5", borderRadius: 8, background: "#fff" }, children: [
862
+ /* @__PURE__ */ t("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center", style: { padding: "10px 6px" }, children: [
863
+ /* @__PURE__ */ t("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
864
+ /* @__PURE__ */ e("div", { style: { width: 25, height: 25, display: "flex", alignItems: "center", justifyContent: "center" }, children: l }),
792
865
  /* @__PURE__ */ e("span", { className: "ff-fw-medium ff-text-dark", style: { fontSize: 14 }, children: "REST API Call" })
793
866
  ] }),
794
- /* @__PURE__ */ n("div", { className: "node-actions ff-d-flex ff-align-items-center", children: [
867
+ /* @__PURE__ */ t("div", { className: "node-actions ff-d-flex ff-align-items-center", children: [
795
868
  /* @__PURE__ */ e(
796
869
  "div",
797
870
  {
798
871
  role: "button",
799
872
  tabIndex: 0,
800
- onClick: (p) => {
801
- p.stopPropagation(), c(t);
873
+ onClick: (g) => {
874
+ g.stopPropagation(), f(n);
802
875
  },
803
- onKeyDown: (p) => {
804
- (p.key === "Enter" || p.key === " ") && (p.stopPropagation(), c(t));
876
+ onKeyDown: (g) => {
877
+ (g.key === "Enter" || g.key === " ") && (g.stopPropagation(), f(n));
805
878
  },
806
- children: /* @__PURE__ */ e(A, { size: 16 })
879
+ children: /* @__PURE__ */ e(D, { size: 16 })
807
880
  }
808
881
  ),
809
882
  /* @__PURE__ */ e(
@@ -812,25 +885,25 @@ const He = ({ id: t, data: l }) => {
812
885
  className: "ff-ms-2",
813
886
  role: "button",
814
887
  tabIndex: 0,
815
- onClick: (p) => {
816
- p.stopPropagation(), a(t);
888
+ onClick: (g) => {
889
+ g.stopPropagation(), p(n);
817
890
  },
818
- onKeyDown: (p) => {
819
- (p.key === "Enter" || p.key === " ") && (p.stopPropagation(), a(t));
891
+ onKeyDown: (g) => {
892
+ (g.key === "Enter" || g.key === " ") && (g.stopPropagation(), p(n));
820
893
  },
821
- children: /* @__PURE__ */ e(R, { color: "red", size: 16 })
894
+ children: /* @__PURE__ */ e(F, { color: "red", size: 16 })
822
895
  }
823
896
  )
824
897
  ] })
825
898
  ] }),
826
- /* @__PURE__ */ e("div", { style: { margin: "0 6px 10px", padding: "10px 12px", borderRadius: 6, background: "#fafafa", fontSize: 12 }, children: d ? /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
899
+ /* @__PURE__ */ e("div", { style: { margin: "0 6px 10px", padding: "10px 12px", borderRadius: 6, background: "#fafafa", fontSize: 12 }, children: d ? /* @__PURE__ */ t("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
827
900
  y && /* @__PURE__ */ e("span", { style: { fontSize: 10, fontWeight: 700, padding: "2px 6px", borderRadius: 4, background: y.bg, color: y.color, flexShrink: 0 }, children: u }),
828
901
  /* @__PURE__ */ e("span", { className: "ff-text-dark ff-text-truncate", style: { fontFamily: "monospace", fontSize: 11 }, title: h, children: h })
829
902
  ] }) : /* @__PURE__ */ e("span", { className: "ff-text-muted", children: "Not configured" }) })
830
903
  ] }),
831
- /* @__PURE__ */ e(b, { type: "source", position: x.Bottom, style: { opacity: 0 } })
904
+ /* @__PURE__ */ e(x, { type: "source", position: N.Bottom, style: { opacity: 0 } })
832
905
  ] });
833
- }, qe = {
906
+ }, nt = {
834
907
  eq: "=",
835
908
  neq: "≠",
836
909
  gt: ">",
@@ -842,29 +915,29 @@ const He = ({ id: t, data: l }) => {
842
915
  endsWith: "ends with",
843
916
  isEmpty: "is empty",
844
917
  isNotEmpty: "is not empty"
845
- }, Ze = ({ id: t, data: l }) => {
846
- const { onEditNode: c, onDeleteNode: a } = z(), { title: s = "Condition Branch", branchConfigs: r = [], defaultBranch: h } = l, o = r.length > 0;
847
- return /* @__PURE__ */ n("div", { style: { width: j }, children: [
848
- /* @__PURE__ */ e(b, { type: "target", position: x.Top, style: { opacity: 0 } }),
849
- /* @__PURE__ */ n("div", { style: { border: "1.5px solid #b39ddb", borderRadius: 8, background: "#fff" }, children: [
850
- /* @__PURE__ */ n("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center", style: { padding: "10px 6px" }, children: [
851
- /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
852
- /* @__PURE__ */ e("div", { style: { width: 25, height: 25, borderRadius: 6, background: "rgba(103,58,183,0.1)", display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ e(we, { size: 16, color: "#512da8" }) }),
918
+ }, ot = ({ id: n, data: i }) => {
919
+ const { onEditNode: f, onDeleteNode: p } = I(), { title: s = "Condition Branch", branchConfigs: r = [], defaultBranch: h } = i, o = r.length > 0;
920
+ return /* @__PURE__ */ t("div", { style: { width: K }, children: [
921
+ /* @__PURE__ */ e(x, { type: "target", position: N.Top, style: { opacity: 0 } }),
922
+ /* @__PURE__ */ t("div", { style: { border: "1.5px solid #b39ddb", borderRadius: 8, background: "#fff" }, children: [
923
+ /* @__PURE__ */ t("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center", style: { padding: "10px 6px" }, children: [
924
+ /* @__PURE__ */ t("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
925
+ /* @__PURE__ */ e("div", { style: { width: 25, height: 25, borderRadius: 6, background: "rgba(103,58,183,0.1)", display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ e(Ae, { size: 16, color: "#512da8" }) }),
853
926
  /* @__PURE__ */ e("span", { className: "ff-fw-medium ff-text-dark", style: { fontSize: 14 }, children: s })
854
927
  ] }),
855
- /* @__PURE__ */ n("div", { className: "node-actions ff-d-flex ff-align-items-center", children: [
928
+ /* @__PURE__ */ t("div", { className: "node-actions ff-d-flex ff-align-items-center", children: [
856
929
  /* @__PURE__ */ e(
857
930
  "div",
858
931
  {
859
932
  role: "button",
860
933
  tabIndex: 0,
861
- onClick: (i) => {
862
- i.stopPropagation(), c(t);
934
+ onClick: (l) => {
935
+ l.stopPropagation(), f(n);
863
936
  },
864
- onKeyDown: (i) => {
865
- (i.key === "Enter" || i.key === " ") && (i.stopPropagation(), c(t));
937
+ onKeyDown: (l) => {
938
+ (l.key === "Enter" || l.key === " ") && (l.stopPropagation(), f(n));
866
939
  },
867
- children: /* @__PURE__ */ e(A, { size: 16 })
940
+ children: /* @__PURE__ */ e(D, { size: 16 })
868
941
  }
869
942
  ),
870
943
  /* @__PURE__ */ e(
@@ -873,66 +946,66 @@ const He = ({ id: t, data: l }) => {
873
946
  className: "ff-ms-2",
874
947
  role: "button",
875
948
  tabIndex: 0,
876
- onClick: (i) => {
877
- i.stopPropagation(), a(t);
949
+ onClick: (l) => {
950
+ l.stopPropagation(), p(n);
878
951
  },
879
- onKeyDown: (i) => {
880
- (i.key === "Enter" || i.key === " ") && (i.stopPropagation(), a(t));
952
+ onKeyDown: (l) => {
953
+ (l.key === "Enter" || l.key === " ") && (l.stopPropagation(), p(n));
881
954
  },
882
- children: /* @__PURE__ */ e(R, { color: "red", size: 16 })
955
+ children: /* @__PURE__ */ e(F, { color: "red", size: 16 })
883
956
  }
884
957
  )
885
958
  ] })
886
959
  ] }),
887
- /* @__PURE__ */ e("div", { style: { margin: "0 6px 10px", padding: "10px 12px", borderRadius: 6, background: "#fafafa", fontSize: 12 }, children: o ? /* @__PURE__ */ n("div", { style: { display: "flex", flexDirection: "column", gap: 4 }, children: [
888
- r.map((i, d) => {
889
- var p, f;
890
- const u = G[d % G.length], y = (p = i.conditions) == null ? void 0 : p[0], N = (((f = i.conditions) == null ? void 0 : f.length) ?? 0) - 1;
891
- return /* @__PURE__ */ n("div", { style: { display: "flex", alignItems: "center", gap: 6 }, children: [
892
- /* @__PURE__ */ e("span", { style: { fontSize: 10, fontWeight: 600, padding: "2px 7px", borderRadius: 10, background: u.bg, color: u.color, flexShrink: 0 }, children: i.label || i.key }),
893
- y ? /* @__PURE__ */ n("span", { style: { fontSize: 11, color: "#616161", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: [
960
+ /* @__PURE__ */ e("div", { style: { margin: "0 6px 10px", padding: "10px 12px", borderRadius: 6, background: "#fafafa", fontSize: 12 }, children: o ? /* @__PURE__ */ t("div", { style: { display: "flex", flexDirection: "column", gap: 4 }, children: [
961
+ r.map((l, d) => {
962
+ var g, c;
963
+ const u = Y[d % Y.length], y = (g = l.conditions) == null ? void 0 : g[0], k = (((c = l.conditions) == null ? void 0 : c.length) ?? 0) - 1;
964
+ return /* @__PURE__ */ t("div", { style: { display: "flex", alignItems: "center", gap: 6 }, children: [
965
+ /* @__PURE__ */ e("span", { style: { fontSize: 10, fontWeight: 600, padding: "2px 7px", borderRadius: 10, background: u.bg, color: u.color, flexShrink: 0 }, children: l.label || l.key }),
966
+ y ? /* @__PURE__ */ t("span", { style: { fontSize: 11, color: "#616161", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: [
894
967
  y.field,
895
968
  " ",
896
- qe[y.operator] ?? y.operator,
969
+ nt[y.operator] ?? y.operator,
897
970
  y.value ? ` ${y.value}` : "",
898
- N > 0 ? ` +${N} more` : ""
971
+ k > 0 ? ` +${k} more` : ""
899
972
  ] }) : /* @__PURE__ */ e("span", { style: { fontSize: 11, color: "#9e9e9e" }, children: "No conditions yet" })
900
- ] }, i.key);
973
+ ] }, l.key);
901
974
  }),
902
- h && /* @__PURE__ */ n("div", { style: { display: "flex", alignItems: "center", gap: 6, marginTop: 2 }, children: [
975
+ h && /* @__PURE__ */ t("div", { style: { display: "flex", alignItems: "center", gap: 6, marginTop: 2 }, children: [
903
976
  /* @__PURE__ */ e("span", { style: { fontSize: 10, fontWeight: 600, padding: "2px 7px", borderRadius: 10, background: "#f5f5f5", color: "#757575", flexShrink: 0 }, children: "Default" }),
904
977
  /* @__PURE__ */ e("span", { style: { fontSize: 11, color: "#9e9e9e" }, children: "fallback path" })
905
978
  ] })
906
979
  ] }) : /* @__PURE__ */ e("span", { className: "ff-text-muted", children: "Not configured — click edit to add branches" }) })
907
980
  ] }),
908
- /* @__PURE__ */ e(b, { type: "source", position: x.Bottom, style: { opacity: 0 } })
981
+ /* @__PURE__ */ e(x, { type: "source", position: N.Bottom, style: { opacity: 0 } })
909
982
  ] });
910
- }, Ye = ({ id: t, data: l }) => {
911
- var p;
912
- const { onEditNode: c, onDeleteNode: a, nodeRegistry: s } = z(), { title: r = "Sub-Workflow", workflowId: h, workflowLabel: o, descriptorType: i, onPreview: d } = l, u = i ? (p = s == null ? void 0 : s.forType(i)) == null ? void 0 : p.icon : /* @__PURE__ */ e(Se, { size: 16, color: "#00695c" }), y = !!h, N = (f) => {
913
- f.stopPropagation(), h && d && d(h);
983
+ }, it = ({ id: n, data: i }) => {
984
+ var g;
985
+ const { onEditNode: f, onDeleteNode: p, nodeRegistry: s } = I(), { title: r = "Sub-Workflow", workflowId: h, workflowLabel: o, descriptorType: l, onPreview: d } = i, u = l ? (g = s == null ? void 0 : s.forType(l)) == null ? void 0 : g.icon : /* @__PURE__ */ e(De, { size: 16, color: "#00695c" }), y = !!h, k = (c) => {
986
+ c.stopPropagation(), h && d && d(h);
914
987
  };
915
- return /* @__PURE__ */ n("div", { style: { width: j }, children: [
916
- /* @__PURE__ */ e(b, { type: "target", position: x.Top, style: { opacity: 0 } }),
917
- /* @__PURE__ */ n("div", { style: { border: "1.5px solid #80cbc4", borderRadius: 8, background: "#fff" }, children: [
918
- /* @__PURE__ */ n("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center", style: { padding: "10px 6px" }, children: [
919
- /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
988
+ return /* @__PURE__ */ t("div", { style: { width: K }, children: [
989
+ /* @__PURE__ */ e(x, { type: "target", position: N.Top, style: { opacity: 0 } }),
990
+ /* @__PURE__ */ t("div", { style: { border: "1.5px solid #80cbc4", borderRadius: 8, background: "#fff" }, children: [
991
+ /* @__PURE__ */ t("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center", style: { padding: "10px 6px" }, children: [
992
+ /* @__PURE__ */ t("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
920
993
  /* @__PURE__ */ e("div", { style: { width: 25, height: 25, borderRadius: 6, background: "rgba(0,137,123,0.1)", display: "flex", alignItems: "center", justifyContent: "center" }, children: u }),
921
994
  /* @__PURE__ */ e("span", { className: "ff-fw-medium ff-text-dark", style: { fontSize: 14 }, children: r })
922
995
  ] }),
923
- /* @__PURE__ */ n("div", { className: "node-actions ff-d-flex ff-align-items-center", children: [
996
+ /* @__PURE__ */ t("div", { className: "node-actions ff-d-flex ff-align-items-center", children: [
924
997
  /* @__PURE__ */ e(
925
998
  "div",
926
999
  {
927
1000
  role: "button",
928
1001
  tabIndex: 0,
929
- onClick: (f) => {
930
- f.stopPropagation(), c(t);
1002
+ onClick: (c) => {
1003
+ c.stopPropagation(), f(n);
931
1004
  },
932
- onKeyDown: (f) => {
933
- (f.key === "Enter" || f.key === " ") && (f.stopPropagation(), c(t));
1005
+ onKeyDown: (c) => {
1006
+ (c.key === "Enter" || c.key === " ") && (c.stopPropagation(), f(n));
934
1007
  },
935
- children: /* @__PURE__ */ e(A, { size: 16 })
1008
+ children: /* @__PURE__ */ e(D, { size: 16 })
936
1009
  }
937
1010
  ),
938
1011
  /* @__PURE__ */ e(
@@ -941,141 +1014,141 @@ const He = ({ id: t, data: l }) => {
941
1014
  className: "ff-ms-2",
942
1015
  role: "button",
943
1016
  tabIndex: 0,
944
- onClick: (f) => {
945
- f.stopPropagation(), a(t);
1017
+ onClick: (c) => {
1018
+ c.stopPropagation(), p(n);
946
1019
  },
947
- onKeyDown: (f) => {
948
- (f.key === "Enter" || f.key === " ") && (f.stopPropagation(), a(t));
1020
+ onKeyDown: (c) => {
1021
+ (c.key === "Enter" || c.key === " ") && (c.stopPropagation(), p(n));
949
1022
  },
950
- children: /* @__PURE__ */ e(R, { color: "red", size: 16 })
1023
+ children: /* @__PURE__ */ e(F, { color: "red", size: 16 })
951
1024
  }
952
1025
  )
953
1026
  ] })
954
1027
  ] }),
955
- /* @__PURE__ */ e("div", { style: { margin: "0 6px 10px", padding: "10px 12px", borderRadius: 6, background: y ? "#e0f2f1" : "#fafafa", fontSize: 12, border: y ? "1px solid #b2dfdb" : "none" }, children: y ? /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-justify-content-between", children: [
956
- /* @__PURE__ */ n("div", { className: "ff-d-flex ff-flex-column ff-gap-1", children: [
1028
+ /* @__PURE__ */ e("div", { style: { margin: "0 6px 10px", padding: "10px 12px", borderRadius: 6, background: y ? "#e0f2f1" : "#fafafa", fontSize: 12, border: y ? "1px solid #b2dfdb" : "none" }, children: y ? /* @__PURE__ */ t("div", { className: "ff-d-flex ff-align-items-center ff-justify-content-between", children: [
1029
+ /* @__PURE__ */ t("div", { className: "ff-d-flex ff-flex-column ff-gap-1", children: [
957
1030
  /* @__PURE__ */ e("span", { style: { fontSize: 12, fontWeight: 600, color: "#00695c" }, children: o || h }),
958
- /* @__PURE__ */ n("span", { style: { fontSize: 10, color: "#80cbc4", fontFamily: "monospace" }, children: [
1031
+ /* @__PURE__ */ t("span", { style: { fontSize: 10, color: "#80cbc4", fontFamily: "monospace" }, children: [
959
1032
  "ID: ",
960
1033
  h
961
1034
  ] })
962
1035
  ] }),
963
- d && /* @__PURE__ */ n(
1036
+ d && /* @__PURE__ */ t(
964
1037
  "div",
965
1038
  {
966
1039
  role: "button",
967
1040
  tabIndex: 0,
968
- onClick: N,
969
- onKeyDown: (f) => {
970
- (f.key === "Enter" || f.key === " ") && N(f);
1041
+ onClick: k,
1042
+ onKeyDown: (c) => {
1043
+ (c.key === "Enter" || c.key === " ") && k(c);
971
1044
  },
972
1045
  style: { cursor: "pointer", display: "flex", alignItems: "center", gap: 3, fontSize: 11, color: "#00897b" },
973
1046
  children: [
974
- /* @__PURE__ */ e(Ee, { size: 13 }),
1047
+ /* @__PURE__ */ e(Re, { size: 13 }),
975
1048
  "Preview"
976
1049
  ]
977
1050
  }
978
1051
  )
979
1052
  ] }) : /* @__PURE__ */ e("span", { className: "ff-text-muted", children: "Not configured — select a workflow" }) })
980
1053
  ] }),
981
- /* @__PURE__ */ e(b, { type: "source", position: x.Bottom, style: { opacity: 0 } })
1054
+ /* @__PURE__ */ e(x, { type: "source", position: N.Bottom, style: { opacity: 0 } })
982
1055
  ] });
983
- }, at = {
984
- startNode: Ie,
985
- endNode: Pe,
986
- addTriggerNode: Ae,
987
- addStepNode: De,
988
- triggerNode: Re,
989
- eventNode: $e,
990
- filterNode: Be,
991
- actionNode: je,
992
- approvalNode: Me,
993
- delayNode: Ke,
994
- notificationNode: He,
995
- webhookTriggerNode: Ve,
996
- restApiNode: Ge,
997
- conditionBranchNode: Ze,
998
- subWorkflowNode: Ye
999
- }, Je = 11.5, J = 2, M = 6, Q = 40, X = 20, ee = 4, pt = ({
1000
- id: t,
1001
- sourceX: l,
1002
- sourceY: c,
1003
- targetX: a,
1056
+ }, xt = {
1057
+ startNode: $e,
1058
+ endNode: Be,
1059
+ addTriggerNode: je,
1060
+ addStepNode: Ke,
1061
+ triggerNode: _e,
1062
+ eventNode: He,
1063
+ filterNode: Ge,
1064
+ actionNode: Ve,
1065
+ approvalNode: qe,
1066
+ delayNode: Ze,
1067
+ notificationNode: Xe,
1068
+ webhookTriggerNode: et,
1069
+ restApiNode: tt,
1070
+ conditionBranchNode: ot,
1071
+ subWorkflowNode: it
1072
+ }, lt = 11.5, ee = 2, M = 6, te = 40, ne = 20, oe = 4, Nt = ({
1073
+ id: n,
1074
+ sourceX: i,
1075
+ sourceY: f,
1076
+ targetX: p,
1004
1077
  targetY: s,
1005
1078
  sourcePosition: r,
1006
1079
  targetPosition: h,
1007
1080
  source: o,
1008
- target: i,
1081
+ target: l,
1009
1082
  data: d
1010
1083
  }) => {
1011
- const [u, y, N] = U({
1012
- sourceX: l,
1013
- sourceY: c,
1014
- targetX: a,
1084
+ const [u, y, k] = H({
1085
+ sourceX: i,
1086
+ sourceY: f,
1087
+ targetX: p,
1015
1088
  targetY: s
1016
- }), p = d == null ? void 0 : d.label, f = p === "Pass", w = f || p === "Fail", m = l + (a - l) / 3, S = c + (s - c) / 3, v = l + 2 * (a - l) / 3, D = c + 2 * (s - c) / 3, C = d == null ? void 0 : d.onAddStepClick, P = (g) => {
1017
- if (g.stopPropagation(), typeof C != "function") return;
1018
- const k = {
1019
- edgeId: t,
1089
+ }), g = d == null ? void 0 : d.label, c = g === "Pass", S = c || g === "Fail", m = i + (p - i) / 3, C = f + (s - f) / 3, v = i + 2 * (p - i) / 3, R = f + 2 * (s - f) / 3, T = d == null ? void 0 : d.onAddStepClick, P = (L) => {
1090
+ if (L.stopPropagation(), typeof T != "function") return;
1091
+ const V = {
1092
+ edgeId: n,
1020
1093
  nodeId: o,
1021
1094
  sourceNodeId: o,
1022
- targetNodeId: i,
1095
+ targetNodeId: l,
1023
1096
  position: "between",
1024
1097
  referenceNodeId: o,
1025
1098
  referenceNodeType: d == null ? void 0 : d.referenceNodeType,
1026
1099
  stepVisibility: d == null ? void 0 : d.stepVisibility
1027
1100
  };
1028
- C(o, k);
1029
- }, I = (g) => {
1030
- (g.key === "Enter" || g.key === " ") && (g.preventDefault(), P(g));
1031
- }, T = () => /* @__PURE__ */ n($, { children: [
1032
- /* @__PURE__ */ n("g", { className: "plus-icon-container", children: [
1033
- /* @__PURE__ */ e("circle", { r: Je, className: "edge-plus-circle" }),
1034
- /* @__PURE__ */ e("line", { x1: 0, y1: -M, x2: 0, y2: M, strokeWidth: J, strokeLinecap: "round", className: "plus-line" }),
1035
- /* @__PURE__ */ e("line", { x1: -M, y1: 0, x2: M, y2: 0, strokeWidth: J, strokeLinecap: "round", className: "plus-line" })
1101
+ T(o, V);
1102
+ }, A = (L) => {
1103
+ (L.key === "Enter" || L.key === " ") && (L.preventDefault(), P(L));
1104
+ }, z = () => /* @__PURE__ */ t(B, { children: [
1105
+ /* @__PURE__ */ t("g", { className: "plus-icon-container", children: [
1106
+ /* @__PURE__ */ e("circle", { r: lt, className: "edge-plus-circle" }),
1107
+ /* @__PURE__ */ e("line", { x1: 0, y1: -M, x2: 0, y2: M, strokeWidth: ee, strokeLinecap: "round", className: "plus-line" }),
1108
+ /* @__PURE__ */ e("line", { x1: -M, y1: 0, x2: M, y2: 0, strokeWidth: ee, strokeLinecap: "round", className: "plus-line" })
1036
1109
  ] }),
1037
- /* @__PURE__ */ n("g", { className: "edge-plus-tooltip", transform: "translate(18, 0)", children: [
1110
+ /* @__PURE__ */ t("g", { className: "edge-plus-tooltip", transform: "translate(18, 0)", children: [
1038
1111
  /* @__PURE__ */ e("rect", { x: 0, y: -10, width: 65, height: 20, rx: 4, className: "tooltip-bg" }),
1039
1112
  /* @__PURE__ */ e("path", { d: "M0 -4 L-4 0 L0 4 Z", className: "tooltip-bg" }),
1040
1113
  /* @__PURE__ */ e("text", { x: 32, y: 0, textAnchor: "middle", dominantBaseline: "central", fill: "white", style: { fontSize: 10, fontWeight: 600, pointerEvents: "none" }, children: "Add Step" })
1041
1114
  ] })
1042
- ] }), E = C ? {
1115
+ ] }), E = T ? {
1043
1116
  onClick: P,
1044
- onKeyDown: I,
1117
+ onKeyDown: A,
1045
1118
  role: "button",
1046
1119
  tabIndex: 0,
1047
1120
  style: { cursor: "pointer", pointerEvents: "all" }
1048
1121
  } : {
1049
1122
  style: { cursor: "default", pointerEvents: "all" }
1050
1123
  };
1051
- return /* @__PURE__ */ n("g", { className: "edge-with-plus-wrapper", children: [
1052
- /* @__PURE__ */ e(H, { id: t, path: u }),
1053
- w ? /* @__PURE__ */ n($, { children: [
1054
- /* @__PURE__ */ n("g", { transform: `translate(${m}, ${S})`, children: [
1055
- /* @__PURE__ */ e("rect", { x: -Q / 2, y: -X / 2, width: Q, height: X, rx: ee, ry: ee, fill: f ? "#ADE6C5" : "#FDBFBF" }),
1056
- /* @__PURE__ */ e("text", { textAnchor: "middle", dominantBaseline: "central", fill: f ? "#1DBF60" : "#C50000", style: { fontSize: 12, fontWeight: 500 }, children: p })
1124
+ return /* @__PURE__ */ t("g", { className: "edge-with-plus-wrapper", children: [
1125
+ /* @__PURE__ */ e(G, { id: n, path: u }),
1126
+ S ? /* @__PURE__ */ t(B, { children: [
1127
+ /* @__PURE__ */ t("g", { transform: `translate(${m}, ${C})`, children: [
1128
+ /* @__PURE__ */ e("rect", { x: -te / 2, y: -ne / 2, width: te, height: ne, rx: oe, ry: oe, fill: c ? "#ADE6C5" : "#FDBFBF" }),
1129
+ /* @__PURE__ */ e("text", { textAnchor: "middle", dominantBaseline: "central", fill: c ? "#1DBF60" : "#C50000", style: { fontSize: 12, fontWeight: 500 }, children: g })
1057
1130
  ] }),
1058
- /* @__PURE__ */ e("g", { className: "nodrag nopan edge-plus-svg", transform: `translate(${v}, ${D})`, "data-testid": "plus-node-icon", ...E, children: /* @__PURE__ */ e(T, {}) })
1059
- ] }) : /* @__PURE__ */ e("g", { className: "nodrag nopan edge-plus-svg", transform: `translate(${y}, ${N})`, "data-testid": "plus-node-icon", ...E, children: /* @__PURE__ */ e(T, {}) })
1131
+ /* @__PURE__ */ e("g", { className: "nodrag nopan edge-plus-svg", transform: `translate(${v}, ${R})`, "data-testid": "plus-node-icon", ...E, children: /* @__PURE__ */ e(z, {}) })
1132
+ ] }) : /* @__PURE__ */ e("g", { className: "nodrag nopan edge-plus-svg", transform: `translate(${y}, ${k})`, "data-testid": "plus-node-icon", ...E, children: /* @__PURE__ */ e(z, {}) })
1060
1133
  ] });
1061
- }, Qe = 11.5, te = 2, K = 6, gt = ({
1062
- id: t,
1063
- sourceX: l,
1064
- sourceY: c,
1065
- targetX: a,
1134
+ }, rt = 11.5, ie = 2, _ = 6, kt = ({
1135
+ id: n,
1136
+ sourceX: i,
1137
+ sourceY: f,
1138
+ targetX: p,
1066
1139
  targetY: s,
1067
1140
  source: r,
1068
1141
  target: h,
1069
1142
  data: o
1070
1143
  }) => {
1071
- const [i, d, u] = U({
1072
- sourceX: l,
1073
- sourceY: c,
1074
- targetX: a,
1144
+ const [l, d, u] = H({
1145
+ sourceX: i,
1146
+ sourceY: f,
1147
+ targetX: p,
1075
1148
  targetY: s
1076
- }), y = o == null ? void 0 : o.onAddStepClick, N = (f) => {
1077
- f.stopPropagation(), typeof y == "function" && y(r, {
1078
- edgeId: t,
1149
+ }), y = o == null ? void 0 : o.onAddStepClick, k = (c) => {
1150
+ c.stopPropagation(), typeof y == "function" && y(r, {
1151
+ edgeId: n,
1079
1152
  nodeId: r,
1080
1153
  sourceNodeId: r,
1081
1154
  targetNodeId: h,
@@ -1086,12 +1159,12 @@ const He = ({ id: t, data: l }) => {
1086
1159
  filterId: o == null ? void 0 : o.filterId,
1087
1160
  branch: o == null ? void 0 : o.branch
1088
1161
  });
1089
- }, p = (f) => {
1090
- (f.key === "Enter" || f.key === " ") && (f.preventDefault(), N(f));
1162
+ }, g = (c) => {
1163
+ (c.key === "Enter" || c.key === " ") && (c.preventDefault(), k(c));
1091
1164
  };
1092
- return /* @__PURE__ */ n("g", { className: "edge-with-plus-wrapper", children: [
1093
- /* @__PURE__ */ e(H, { id: t, path: i, style: { stroke: "#b0bec5" } }),
1094
- /* @__PURE__ */ n(
1165
+ return /* @__PURE__ */ t("g", { className: "edge-with-plus-wrapper", children: [
1166
+ /* @__PURE__ */ e(G, { id: n, path: l, style: { stroke: "#b0bec5" } }),
1167
+ /* @__PURE__ */ t(
1095
1168
  "g",
1096
1169
  {
1097
1170
  className: "nodrag nopan edge-plus-svg",
@@ -1101,21 +1174,21 @@ const He = ({ id: t, data: l }) => {
1101
1174
  pointerEvents: "all",
1102
1175
  outline: "none"
1103
1176
  },
1104
- onClick: y ? N : void 0,
1105
- onKeyDown: y ? p : void 0,
1177
+ onClick: y ? k : void 0,
1178
+ onKeyDown: y ? g : void 0,
1106
1179
  role: y ? "button" : void 0,
1107
1180
  tabIndex: y ? 0 : void 0,
1108
1181
  "data-testid": "plus-node-icon",
1109
1182
  children: [
1110
- /* @__PURE__ */ e("circle", { r: Qe, className: "edge-plus-circle" }),
1183
+ /* @__PURE__ */ e("circle", { r: rt, className: "edge-plus-circle" }),
1111
1184
  /* @__PURE__ */ e(
1112
1185
  "line",
1113
1186
  {
1114
1187
  x1: 0,
1115
- y1: -K,
1188
+ y1: -_,
1116
1189
  x2: 0,
1117
- y2: K,
1118
- strokeWidth: te,
1190
+ y2: _,
1191
+ strokeWidth: ie,
1119
1192
  strokeLinecap: "round",
1120
1193
  className: "plus-line"
1121
1194
  }
@@ -1123,16 +1196,16 @@ const He = ({ id: t, data: l }) => {
1123
1196
  /* @__PURE__ */ e(
1124
1197
  "line",
1125
1198
  {
1126
- x1: -K,
1199
+ x1: -_,
1127
1200
  y1: 0,
1128
- x2: K,
1201
+ x2: _,
1129
1202
  y2: 0,
1130
- strokeWidth: te,
1203
+ strokeWidth: ie,
1131
1204
  strokeLinecap: "round",
1132
1205
  className: "plus-line"
1133
1206
  }
1134
1207
  ),
1135
- /* @__PURE__ */ n("g", { className: "edge-plus-tooltip", transform: "translate(18, 0)", children: [
1208
+ /* @__PURE__ */ t("g", { className: "edge-plus-tooltip", transform: "translate(18, 0)", children: [
1136
1209
  /* @__PURE__ */ e(
1137
1210
  "rect",
1138
1211
  {
@@ -1162,22 +1235,22 @@ const He = ({ id: t, data: l }) => {
1162
1235
  }
1163
1236
  )
1164
1237
  ] });
1165
- }, ht = ({ id: t, sourceX: l, sourceY: c, targetX: a, targetY: s }) => {
1166
- const [r] = U({ sourceX: l, sourceY: c, targetX: a, targetY: s });
1167
- return /* @__PURE__ */ e(H, { id: t, path: r, style: { stroke: "#b0bec5" } });
1168
- }, Xe = 11.5, ne = 2, _ = 6, et = -24, oe = 40, ie = 20, le = 4, yt = ({
1169
- id: t,
1170
- sourceX: l,
1171
- sourceY: c,
1172
- targetX: a,
1238
+ }, vt = ({ id: n, sourceX: i, sourceY: f, targetX: p, targetY: s }) => {
1239
+ const [r] = H({ sourceX: i, sourceY: f, targetX: p, targetY: s });
1240
+ return /* @__PURE__ */ e(G, { id: n, path: r, style: { stroke: "#b0bec5" } });
1241
+ }, st = 11.5, le = 2, O = 6, ct = -24, re = 40, se = 20, ce = 4, wt = ({
1242
+ id: n,
1243
+ sourceX: i,
1244
+ sourceY: f,
1245
+ targetX: p,
1173
1246
  targetY: s,
1174
1247
  source: r,
1175
1248
  target: h,
1176
1249
  data: o
1177
1250
  }) => {
1178
- const [i, d, u] = U({ sourceX: l, sourceY: c, targetX: a, targetY: s }), y = o == null ? void 0 : o.label, N = y === "Pass", p = N || y === "Fail", f = o == null ? void 0 : o.onAddStepClick, w = (o == null ? void 0 : o.showPlus) !== !1 && !!f, m = (v) => {
1179
- v.stopPropagation(), typeof f == "function" && f(r, {
1180
- edgeId: t,
1251
+ const [l, d, u] = H({ sourceX: i, sourceY: f, targetX: p, targetY: s }), y = o == null ? void 0 : o.label, k = y === "Pass", g = k || y === "Fail", c = o == null ? void 0 : o.onAddStepClick, S = (o == null ? void 0 : o.showPlus) !== !1 && !!c, m = (v) => {
1252
+ v.stopPropagation(), typeof c == "function" && c(r, {
1253
+ edgeId: n,
1181
1254
  nodeId: r,
1182
1255
  sourceNodeId: r,
1183
1256
  targetNodeId: h,
@@ -1186,43 +1259,43 @@ const He = ({ id: t, data: l }) => {
1186
1259
  referenceNodeType: o == null ? void 0 : o.referenceNodeType,
1187
1260
  stepVisibility: o == null ? void 0 : o.stepVisibility
1188
1261
  });
1189
- }, S = (v) => {
1262
+ }, C = (v) => {
1190
1263
  (v.key === "Enter" || v.key === " ") && (v.preventDefault(), m(v));
1191
1264
  };
1192
- return /* @__PURE__ */ n("g", { className: "edge-with-plus-wrapper", children: [
1193
- /* @__PURE__ */ e(H, { id: t, path: i, style: { stroke: "#b0bec5" } }),
1194
- /* @__PURE__ */ n(
1265
+ return /* @__PURE__ */ t("g", { className: "edge-with-plus-wrapper", children: [
1266
+ /* @__PURE__ */ e(G, { id: n, path: l, style: { stroke: "#b0bec5" } }),
1267
+ /* @__PURE__ */ t(
1195
1268
  "g",
1196
1269
  {
1197
1270
  className: "nodrag nopan edge-plus-svg",
1198
1271
  transform: `translate(${d}, ${u})`,
1199
- style: { cursor: f ? "pointer" : "default", pointerEvents: "all", outline: "none" },
1200
- onClick: f ? m : void 0,
1201
- onKeyDown: f ? S : void 0,
1202
- role: f ? "button" : void 0,
1203
- tabIndex: f ? 0 : void 0,
1272
+ style: { cursor: c ? "pointer" : "default", pointerEvents: "all", outline: "none" },
1273
+ onClick: c ? m : void 0,
1274
+ onKeyDown: c ? C : void 0,
1275
+ role: c ? "button" : void 0,
1276
+ tabIndex: c ? 0 : void 0,
1204
1277
  children: [
1205
- p && /* @__PURE__ */ n("g", { transform: `translate(0, ${w ? et : 0})`, children: [
1278
+ g && /* @__PURE__ */ t("g", { transform: `translate(0, ${S ? ct : 0})`, children: [
1206
1279
  /* @__PURE__ */ e(
1207
1280
  "rect",
1208
1281
  {
1209
- x: -oe / 2,
1210
- y: -ie / 2,
1211
- width: oe,
1212
- height: ie,
1213
- rx: le,
1214
- ry: le,
1215
- fill: N ? "#ADE6C5" : "#FDBFBF"
1282
+ x: -re / 2,
1283
+ y: -se / 2,
1284
+ width: re,
1285
+ height: se,
1286
+ rx: ce,
1287
+ ry: ce,
1288
+ fill: k ? "#ADE6C5" : "#FDBFBF"
1216
1289
  }
1217
1290
  ),
1218
- /* @__PURE__ */ e("text", { textAnchor: "middle", dominantBaseline: "central", fill: N ? "#1DBF60" : "#C50000", style: { fontSize: 12, fontWeight: 500 }, children: y })
1291
+ /* @__PURE__ */ e("text", { textAnchor: "middle", dominantBaseline: "central", fill: k ? "#1DBF60" : "#C50000", style: { fontSize: 12, fontWeight: 500 }, children: y })
1219
1292
  ] }),
1220
- w && /* @__PURE__ */ n("g", { className: "plus-icon-container", children: [
1221
- /* @__PURE__ */ e("circle", { r: Xe, className: "edge-plus-circle" }),
1222
- /* @__PURE__ */ e("line", { x1: 0, y1: -_, x2: 0, y2: _, strokeWidth: ne, strokeLinecap: "round", className: "plus-line" }),
1223
- /* @__PURE__ */ e("line", { x1: -_, y1: 0, x2: _, y2: 0, strokeWidth: ne, strokeLinecap: "round", className: "plus-line" })
1293
+ S && /* @__PURE__ */ t("g", { className: "plus-icon-container", children: [
1294
+ /* @__PURE__ */ e("circle", { r: st, className: "edge-plus-circle" }),
1295
+ /* @__PURE__ */ e("line", { x1: 0, y1: -O, x2: 0, y2: O, strokeWidth: le, strokeLinecap: "round", className: "plus-line" }),
1296
+ /* @__PURE__ */ e("line", { x1: -O, y1: 0, x2: O, y2: 0, strokeWidth: le, strokeLinecap: "round", className: "plus-line" })
1224
1297
  ] }),
1225
- w && /* @__PURE__ */ n("g", { className: "edge-plus-tooltip", transform: "translate(22, 0)", children: [
1298
+ S && /* @__PURE__ */ t("g", { className: "edge-plus-tooltip", transform: "translate(22, 0)", children: [
1226
1299
  /* @__PURE__ */ e("rect", { x: 0, y: -10, width: 65, height: 20, rx: 4, className: "tooltip-bg" }),
1227
1300
  /* @__PURE__ */ e("path", { d: "M0 -4 L-4 0 L0 4 Z", className: "tooltip-bg" }),
1228
1301
  /* @__PURE__ */ e("text", { x: 32, y: 0, textAnchor: "middle", dominantBaseline: "central", fill: "white", style: { fontSize: 10, fontWeight: 600, pointerEvents: "none" }, children: "Add Step" })
@@ -1231,41 +1304,41 @@ const He = ({ id: t, data: l }) => {
1231
1304
  }
1232
1305
  )
1233
1306
  ] });
1234
- }, ut = ({
1235
- id: t,
1236
- source: l,
1237
- target: c,
1238
- sourceX: a,
1307
+ }, St = ({
1308
+ id: n,
1309
+ source: i,
1310
+ target: f,
1311
+ sourceX: p,
1239
1312
  sourceY: s,
1240
1313
  targetX: r,
1241
1314
  targetY: h,
1242
1315
  style: o = {},
1243
- markerEnd: i,
1316
+ markerEnd: l,
1244
1317
  data: d
1245
1318
  }) => {
1246
- const u = (d == null ? void 0 : d.verticalRouting) ?? !1, y = 30, N = u ? (() => {
1319
+ const u = (d == null ? void 0 : d.verticalRouting) ?? !1, y = 30, k = u ? (() => {
1247
1320
  const E = h - y;
1248
- return `M ${a},${E} L ${r},${E} L ${r},${h}`;
1321
+ return `M ${p},${E} L ${r},${E} L ${r},${h}`;
1249
1322
  })() : (() => {
1250
1323
  const E = s + 30;
1251
- return `M ${a},${s} L ${a},${E} L ${r},${E} L ${r},${h}`;
1252
- })(), p = o.stroke || "#d1d5db", f = d == null ? void 0 : d.label, w = (d == null ? void 0 : d.isFirst) ?? !1, m = d == null ? void 0 : d.onAddStepClick, S = u ? h - y : s + 30, v = a + (r - a) * (u ? 0.25 : 0.35), D = a + (r - a) * (u ? 0.65 : 0.7), C = S, P = (E) => {
1253
- E.stopPropagation(), m && m(l, {
1254
- edgeId: t,
1255
- nodeId: l,
1256
- sourceNodeId: l,
1257
- targetNodeId: c,
1324
+ return `M ${p},${s} L ${p},${E} L ${r},${E} L ${r},${h}`;
1325
+ })(), g = o.stroke || "#d1d5db", c = d == null ? void 0 : d.label, S = (d == null ? void 0 : d.isFirst) ?? !1, m = d == null ? void 0 : d.onAddStepClick, C = u ? h - y : s + 30, v = p + (r - p) * (u ? 0.25 : 0.35), R = p + (r - p) * (u ? 0.65 : 0.7), T = C, P = (E) => {
1326
+ E.stopPropagation(), m && m(i, {
1327
+ edgeId: n,
1328
+ nodeId: i,
1329
+ sourceNodeId: i,
1330
+ targetNodeId: f,
1258
1331
  position: "between",
1259
- referenceNodeId: l,
1332
+ referenceNodeId: i,
1260
1333
  filterId: d == null ? void 0 : d.filterId,
1261
1334
  branch: d == null ? void 0 : d.branch
1262
1335
  });
1263
- }, I = 11.5, T = 6;
1264
- return /* @__PURE__ */ n("g", { children: [
1265
- /* @__PURE__ */ e("path", { id: t, d: N, fill: "none", stroke: p, strokeWidth: 1.5, markerEnd: i }),
1266
- f && !u && /* @__PURE__ */ e("g", { transform: `translate(${v}, ${C})`, children: (() => {
1267
- const E = Math.max(44, f.length * 7 + 20);
1268
- return /* @__PURE__ */ n($, { children: [
1336
+ }, A = 11.5, z = 6;
1337
+ return /* @__PURE__ */ t("g", { children: [
1338
+ /* @__PURE__ */ e("path", { id: n, d: k, fill: "none", stroke: g, strokeWidth: 1.5, markerEnd: l }),
1339
+ c && !u && /* @__PURE__ */ e("g", { transform: `translate(${v}, ${T})`, children: (() => {
1340
+ const E = Math.max(44, c.length * 7 + 20);
1341
+ return /* @__PURE__ */ t(B, { children: [
1269
1342
  /* @__PURE__ */ e(
1270
1343
  "rect",
1271
1344
  {
@@ -1274,8 +1347,8 @@ const He = ({ id: t, data: l }) => {
1274
1347
  width: E,
1275
1348
  height: 22,
1276
1349
  rx: 11,
1277
- fill: w ? "#e8f5e9" : "#ffebee",
1278
- stroke: w ? "#81c784" : "#e57373",
1350
+ fill: S ? "#e8f5e9" : "#ffebee",
1351
+ stroke: S ? "#81c784" : "#e57373",
1279
1352
  strokeWidth: 1
1280
1353
  }
1281
1354
  ),
@@ -1287,47 +1360,47 @@ const He = ({ id: t, data: l }) => {
1287
1360
  textAnchor: "middle",
1288
1361
  fontSize: 10,
1289
1362
  fontWeight: 600,
1290
- fill: w ? "#2e7d32" : "#c62828",
1363
+ fill: S ? "#2e7d32" : "#c62828",
1291
1364
  style: { fontFamily: "sans-serif", pointerEvents: "none" },
1292
- children: f
1365
+ children: c
1293
1366
  }
1294
1367
  )
1295
1368
  ] });
1296
1369
  })() }),
1297
- m && /* @__PURE__ */ n(
1370
+ m && /* @__PURE__ */ t(
1298
1371
  "g",
1299
1372
  {
1300
- transform: `translate(${D}, ${C})`,
1373
+ transform: `translate(${R}, ${T})`,
1301
1374
  onClick: P,
1302
1375
  style: { cursor: "pointer", pointerEvents: "all" },
1303
1376
  className: "nodrag nopan edge-plus-svg",
1304
1377
  children: [
1305
- /* @__PURE__ */ e("circle", { r: I, className: "edge-plus-circle" }),
1306
- /* @__PURE__ */ e("line", { x1: 0, y1: -T, x2: 0, y2: T, strokeWidth: 2, strokeLinecap: "round", className: "plus-line" }),
1307
- /* @__PURE__ */ e("line", { x1: -T, y1: 0, x2: T, y2: 0, strokeWidth: 2, strokeLinecap: "round", className: "plus-line" })
1378
+ /* @__PURE__ */ e("circle", { r: A, className: "edge-plus-circle" }),
1379
+ /* @__PURE__ */ e("line", { x1: 0, y1: -z, x2: 0, y2: z, strokeWidth: 2, strokeLinecap: "round", className: "plus-line" }),
1380
+ /* @__PURE__ */ e("line", { x1: -z, y1: 0, x2: z, y2: 0, strokeWidth: 2, strokeLinecap: "round", className: "plus-line" })
1308
1381
  ]
1309
1382
  }
1310
1383
  )
1311
1384
  ] });
1312
1385
  };
1313
1386
  export {
1314
- je as A,
1315
- Ke as D,
1316
- pt as E,
1317
- Be as F,
1318
- ut as G,
1319
- yt as L,
1320
- He as N,
1321
- ht as P,
1322
- Ge as R,
1323
- Ie as S,
1324
- Re as T,
1325
- Ve as W,
1326
- Ae as a,
1327
- Me as b,
1328
- Pe as c,
1329
- gt as d,
1330
- at as e,
1331
- ze as f
1387
+ Ve as A,
1388
+ Ze as D,
1389
+ Nt as E,
1390
+ Ge as F,
1391
+ St as G,
1392
+ wt as L,
1393
+ Xe as N,
1394
+ vt as P,
1395
+ tt as R,
1396
+ $e as S,
1397
+ _e as T,
1398
+ et as W,
1399
+ je as a,
1400
+ qe as b,
1401
+ Be as c,
1402
+ kt as d,
1403
+ xt as e,
1404
+ Fe as f
1332
1405
  };
1333
- //# sourceMappingURL=GatewayBranchEdge-DffZFc99.js.map
1406
+ //# sourceMappingURL=GatewayBranchEdge-F2AGJpun.js.map