@emporix/process-diagram 2.0.0-beta.13 → 2.0.0-beta.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,37 +1,37 @@
1
- import { jsxs as m, Fragment as o1, jsx as e } from "react/jsx-runtime";
2
- import R, { forwardRef as B1, useState as $, useRef as O, useCallback as D, useImperativeHandle as P1, useEffect as Y, createContext as M1, useMemo as H, useContext as L1, useLayoutEffect as S1 } from "react";
3
- import { createPortal as T1 } from "react-dom";
4
- const $1 = "_container_1vo7a_1", O1 = "_step_1vo7a_7", E1 = "_selected_1vo7a_23", j1 = "_selectedInvalid_1vo7a_29", H1 = "_isSet_1vo7a_35", W1 = "_invalid_1vo7a_39", R1 = "_filterFlag_1vo7a_45", z1 = "_title_1vo7a_73", F1 = "_icon_1vo7a_90", D1 = "_content_1vo7a_108", A1 = "_dotsButton_1vo7a_114", N = {
5
- container: $1,
6
- step: O1,
7
- selected: E1,
8
- selectedInvalid: j1,
9
- isSet: H1,
10
- invalid: W1,
11
- filterFlag: R1,
12
- title: z1,
13
- icon: F1,
14
- content: D1,
15
- dotsButton: A1
1
+ import { jsxs as m, Fragment as i1, jsx as e } from "react/jsx-runtime";
2
+ import R, { forwardRef as P1, useState as O, useRef as E, useCallback as D, useImperativeHandle as M1, useEffect as Y, createContext as L1, useMemo as H, useContext as S1, useLayoutEffect as T1 } from "react";
3
+ import { createPortal as $1 } from "react-dom";
4
+ const O1 = "_container_1vo7a_1", E1 = "_step_1vo7a_7", j1 = "_selected_1vo7a_23", H1 = "_selectedInvalid_1vo7a_29", W1 = "_isSet_1vo7a_35", R1 = "_invalid_1vo7a_39", z1 = "_filterFlag_1vo7a_45", F1 = "_title_1vo7a_73", D1 = "_icon_1vo7a_90", A1 = "_content_1vo7a_108", V1 = "_dotsButton_1vo7a_114", k = {
5
+ container: O1,
6
+ step: E1,
7
+ selected: j1,
8
+ selectedInvalid: H1,
9
+ isSet: W1,
10
+ invalid: R1,
11
+ filterFlag: z1,
12
+ title: F1,
13
+ icon: D1,
14
+ content: A1,
15
+ dotsButton: V1
16
16
  };
17
- var f1 = {
17
+ var v1 = {
18
18
  color: void 0,
19
19
  size: void 0,
20
20
  className: void 0,
21
21
  style: void 0,
22
22
  attr: void 0
23
- }, p1 = R.createContext && /* @__PURE__ */ R.createContext(f1), V1 = ["attr", "size", "title"];
24
- function Z1(t, n) {
23
+ }, h1 = R.createContext && /* @__PURE__ */ R.createContext(v1), Z1 = ["attr", "size", "title"];
24
+ function Y1(t, n) {
25
25
  if (t == null) return {};
26
- var o = Y1(t, n), i, r;
26
+ var o = X1(t, n), i, r;
27
27
  if (Object.getOwnPropertySymbols) {
28
- var c = Object.getOwnPropertySymbols(t);
29
- for (r = 0; r < c.length; r++)
30
- i = c[r], !(n.indexOf(i) >= 0) && Object.prototype.propertyIsEnumerable.call(t, i) && (o[i] = t[i]);
28
+ var a = Object.getOwnPropertySymbols(t);
29
+ for (r = 0; r < a.length; r++)
30
+ i = a[r], !(n.indexOf(i) >= 0) && Object.prototype.propertyIsEnumerable.call(t, i) && (o[i] = t[i]);
31
31
  }
32
32
  return o;
33
33
  }
34
- function Y1(t, n) {
34
+ function X1(t, n) {
35
35
  if (t == null) return {};
36
36
  var o = {};
37
37
  for (var i in t)
@@ -41,17 +41,17 @@ function Y1(t, n) {
41
41
  }
42
42
  return o;
43
43
  }
44
- function U() {
45
- return U = Object.assign ? Object.assign.bind() : function(t) {
44
+ function K() {
45
+ return K = Object.assign ? Object.assign.bind() : function(t) {
46
46
  for (var n = 1; n < arguments.length; n++) {
47
47
  var o = arguments[n];
48
48
  for (var i in o)
49
49
  Object.prototype.hasOwnProperty.call(o, i) && (t[i] = o[i]);
50
50
  }
51
51
  return t;
52
- }, U.apply(this, arguments);
52
+ }, K.apply(this, arguments);
53
53
  }
54
- function u1(t, n) {
54
+ function C1(t, n) {
55
55
  var o = Object.keys(t);
56
56
  if (Object.getOwnPropertySymbols) {
57
57
  var i = Object.getOwnPropertySymbols(t);
@@ -61,21 +61,21 @@ function u1(t, n) {
61
61
  }
62
62
  return o;
63
63
  }
64
- function K(t) {
64
+ function U(t) {
65
65
  for (var n = 1; n < arguments.length; n++) {
66
66
  var o = arguments[n] != null ? arguments[n] : {};
67
- n % 2 ? u1(Object(o), !0).forEach(function(i) {
68
- X1(t, i, o[i]);
69
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(o)) : u1(Object(o)).forEach(function(i) {
67
+ n % 2 ? C1(Object(o), !0).forEach(function(i) {
68
+ G1(t, i, o[i]);
69
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(o)) : C1(Object(o)).forEach(function(i) {
70
70
  Object.defineProperty(t, i, Object.getOwnPropertyDescriptor(o, i));
71
71
  });
72
72
  }
73
73
  return t;
74
74
  }
75
- function X1(t, n, o) {
76
- return n = G1(n), n in t ? Object.defineProperty(t, n, { value: o, enumerable: !0, configurable: !0, writable: !0 }) : t[n] = o, t;
75
+ function G1(t, n, o) {
76
+ return n = K1(n), n in t ? Object.defineProperty(t, n, { value: o, enumerable: !0, configurable: !0, writable: !0 }) : t[n] = o, t;
77
77
  }
78
- function G1(t) {
78
+ function K1(t) {
79
79
  var n = U1(t, "string");
80
80
  return typeof n == "symbol" ? n : n + "";
81
81
  }
@@ -89,43 +89,43 @@ function U1(t, n) {
89
89
  }
90
90
  return (n === "string" ? String : Number)(t);
91
91
  }
92
- function v1(t) {
93
- return t && t.map((n, o) => /* @__PURE__ */ R.createElement(n.tag, K({
92
+ function _1(t) {
93
+ return t && t.map((n, o) => /* @__PURE__ */ R.createElement(n.tag, U({
94
94
  key: o
95
- }, n.attr), v1(n.child)));
95
+ }, n.attr), _1(n.child)));
96
96
  }
97
97
  function V(t) {
98
- return (n) => /* @__PURE__ */ R.createElement(K1, U({
99
- attr: K({}, t.attr)
100
- }, n), v1(t.child));
98
+ return (n) => /* @__PURE__ */ R.createElement(q1, K({
99
+ attr: U({}, t.attr)
100
+ }, n), _1(t.child));
101
101
  }
102
- function K1(t) {
102
+ function q1(t) {
103
103
  var n = (o) => {
104
104
  var {
105
105
  attr: i,
106
106
  size: r,
107
- title: c
108
- } = t, a = Z1(t, V1), d = r || o.size || "1em", s;
109
- return o.className && (s = o.className), t.className && (s = (s ? s + " " : "") + t.className), /* @__PURE__ */ R.createElement("svg", U({
107
+ title: a
108
+ } = t, l = Y1(t, Z1), d = r || o.size || "1em", s;
109
+ return o.className && (s = o.className), t.className && (s = (s ? s + " " : "") + t.className), /* @__PURE__ */ R.createElement("svg", K({
110
110
  stroke: "currentColor",
111
111
  fill: "currentColor",
112
112
  strokeWidth: "0"
113
- }, o.attr, i, a, {
113
+ }, o.attr, i, l, {
114
114
  className: s,
115
- style: K(K({
115
+ style: U(U({
116
116
  color: t.color || o.color
117
117
  }, o.style), t.style),
118
118
  height: d,
119
119
  width: d,
120
120
  xmlns: "http://www.w3.org/2000/svg"
121
- }), c && /* @__PURE__ */ R.createElement("title", null, c), t.children);
121
+ }), a && /* @__PURE__ */ R.createElement("title", null, a), t.children);
122
122
  };
123
- return p1 !== void 0 ? /* @__PURE__ */ R.createElement(p1.Consumer, null, (o) => n(o)) : n(f1);
123
+ return h1 !== void 0 ? /* @__PURE__ */ R.createElement(h1.Consumer, null, (o) => n(o)) : n(v1);
124
124
  }
125
- function q1(t) {
125
+ function J1(t) {
126
126
  return V({ attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "M5.52.359A.5.5 0 0 1 6 0h4a.5.5 0 0 1 .474.658L8.694 6H12.5a.5.5 0 0 1 .395.807l-7 9a.5.5 0 0 1-.873-.454L6.823 9.5H3.5a.5.5 0 0 1-.48-.641zM6.374 1 4.168 8.5H7.5a.5.5 0 0 1 .478.647L6.78 13.04 11.478 7H8a.5.5 0 0 1-.474-.658L9.306 1z" }, child: [] }] })(t);
127
127
  }
128
- function _1(t) {
128
+ function x1(t) {
129
129
  return V({ attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "M12.146.146a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1 0 .708l-10 10a.5.5 0 0 1-.168.11l-5 2a.5.5 0 0 1-.65-.65l2-5a.5.5 0 0 1 .11-.168zM11.207 2.5 13.5 4.793 14.793 3.5 12.5 1.207zm1.586 3L10.5 3.207 4 9.707V10h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.293zm-9.761 5.175-.106.106-1.528 3.821 3.821-1.528.106-.106A.5.5 0 0 1 5 12.5V12h-.5a.5.5 0 0 1-.5-.5V11h-.5a.5.5 0 0 1-.468-.325" }, child: [] }] })(t);
130
130
  }
131
131
  function q(t) {
@@ -134,15 +134,15 @@ function q(t) {
134
134
  function J(t) {
135
135
  return V({ attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0z" }, child: [] }, { tag: "path", attr: { d: "M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1zM4.118 4 4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4zM2.5 3h11V2h-11z" }, child: [] }] })(t);
136
136
  }
137
- const J1 = "_panel_19663_1", Q1 = "_panelExiting_19663_13", tt = "_menuItem_19663_37", et = "_disabled_19663_52", nt = "_menuItemIcon_19663_57", ot = "_menuItemText_19663_63", it = "_overlay_19663_69", j = {
138
- panel: J1,
139
- panelExiting: Q1,
140
- menuItem: tt,
141
- disabled: et,
142
- menuItemIcon: nt,
143
- menuItemText: ot,
144
- overlay: it
145
- }, rt = (t) => {
137
+ const Q1 = "_panel_19663_1", tt = "_panelExiting_19663_13", et = "_menuItem_19663_37", nt = "_disabled_19663_52", ot = "_menuItemIcon_19663_57", it = "_menuItemText_19663_63", rt = "_overlay_19663_69", j = {
138
+ panel: Q1,
139
+ panelExiting: tt,
140
+ menuItem: et,
141
+ disabled: nt,
142
+ menuItemIcon: ot,
143
+ menuItemText: it,
144
+ overlay: rt
145
+ }, st = (t) => {
146
146
  const o = t.currentTarget ?? t.target;
147
147
  if (o?.getBoundingClientRect) {
148
148
  const r = o.getBoundingClientRect();
@@ -153,77 +153,77 @@ const J1 = "_panel_19663_1", Q1 = "_panelExiting_19663_13", tt = "_menuItem_1966
153
153
  top: (i.clientY ?? 0) + 2,
154
154
  left: i.clientX ?? 0
155
155
  };
156
- }, Q = B1(function({ model: n, popup: o = !0, onHide: i, onClick: r }, c) {
157
- const [a, d] = $(!1), [s, l] = $(!1), [u, w] = $({ top: 0, left: 0 }), v = O(null), _ = D(() => {
158
- s || l(!0);
156
+ }, Q = P1(function({ model: n, popup: o = !0, onHide: i, onClick: r }, a) {
157
+ const [l, d] = O(!1), [s, c] = O(!1), [u, x] = O({ top: 0, left: 0 }), f = E(null), v = D(() => {
158
+ s || c(!0);
159
159
  }, [s]), b = D(
160
160
  (p) => {
161
- s && p.animationName.includes("menuOut") && (d(!1), l(!1), i?.());
161
+ s && p.animationName.includes("menuOut") && (d(!1), c(!1), i?.());
162
162
  },
163
163
  [s, i]
164
- ), k = D((p) => {
165
- w(rt(p)), l(!1), d(!0);
164
+ ), B = D((p) => {
165
+ x(st(p)), c(!1), d(!0);
166
166
  }, []), g = D(
167
167
  (p) => {
168
- a ? _() : k(p);
168
+ l ? v() : B(p);
169
169
  },
170
- [a, _, k]
170
+ [l, v, B]
171
171
  );
172
- P1(
173
- c,
172
+ M1(
173
+ a,
174
174
  () => ({
175
- show: k,
176
- hide: _,
175
+ show: B,
176
+ hide: v,
177
177
  toggle: g
178
178
  }),
179
- [k, _, g]
179
+ [B, v, g]
180
180
  ), Y(() => {
181
- if (!a) return;
182
- const p = (I) => {
183
- I.key === "Escape" && _();
184
- }, x = (I) => {
185
- const h = v.current;
186
- h && !h.contains(I.target) && (I.stopPropagation(), _());
181
+ if (!l) return;
182
+ const p = (y) => {
183
+ y.key === "Escape" && v();
184
+ }, _ = (y) => {
185
+ const N = f.current;
186
+ N && !N.contains(y.target) && (y.stopPropagation(), v());
187
187
  };
188
- return document.addEventListener("keydown", p), document.addEventListener("mousedown", x), () => {
189
- document.removeEventListener("keydown", p), document.removeEventListener("mousedown", x);
188
+ return document.addEventListener("keydown", p), document.addEventListener("mousedown", _), () => {
189
+ document.removeEventListener("keydown", p), document.removeEventListener("mousedown", _);
190
190
  };
191
- }, [a, _]);
192
- const B = (p, x) => {
193
- x.stopPropagation(), p.command?.({ originalEvent: x, item: p }), _();
194
- }, C = (p, x) => {
195
- const I = (h) => B(p, h);
196
- return p.template ? /* @__PURE__ */ e(R.Fragment, { children: p.template(p, { onClick: I }) }, x) : /* @__PURE__ */ m(
191
+ }, [l, v]);
192
+ const M = (p, _) => {
193
+ _.stopPropagation(), p.command?.({ originalEvent: _, item: p }), v();
194
+ }, C = (p, _) => {
195
+ const y = (N) => M(p, N);
196
+ return p.template ? /* @__PURE__ */ e(R.Fragment, { children: p.template(p, { onClick: y }) }, _) : /* @__PURE__ */ m(
197
197
  "button",
198
198
  {
199
199
  type: "button",
200
200
  className: `${j.menuItem} ${p.disabled && j.disabled}`,
201
- onClick: (h) => {
202
- p.disabled || I(h);
201
+ onClick: (N) => {
202
+ p.disabled || y(N);
203
203
  },
204
204
  children: [
205
205
  p.icon && /* @__PURE__ */ e("span", { className: j.menuItemIcon, children: p.icon }),
206
206
  /* @__PURE__ */ e("span", { className: j.menuItemText, children: p.label })
207
207
  ]
208
208
  },
209
- x
209
+ _
210
210
  );
211
211
  };
212
- return !a || !o ? null : T1(
213
- /* @__PURE__ */ m(o1, { children: [
212
+ return !l || !o ? null : $1(
213
+ /* @__PURE__ */ m(i1, { children: [
214
214
  /* @__PURE__ */ e(
215
215
  "div",
216
216
  {
217
217
  className: j.overlay,
218
218
  "aria-hidden": !0,
219
- onClick: () => _(),
219
+ onClick: () => v(),
220
220
  onMouseDown: (p) => p.stopPropagation()
221
221
  }
222
222
  ),
223
223
  /* @__PURE__ */ e(
224
224
  "div",
225
225
  {
226
- ref: v,
226
+ ref: f,
227
227
  className: `${j.panel} ${s ? j.panelExiting : ""}`,
228
228
  role: "menu",
229
229
  style: { top: u.top, left: u.left },
@@ -237,7 +237,7 @@ const J1 = "_panel_19663_1", Q1 = "_panelExiting_19663_13", tt = "_menuItem_1966
237
237
  ] }),
238
238
  document.body
239
239
  );
240
- }), r1 = () => (t, n) => /* @__PURE__ */ m(
240
+ }), t1 = () => (t, n) => /* @__PURE__ */ m(
241
241
  "button",
242
242
  {
243
243
  className: j.menuItem,
@@ -247,7 +247,7 @@ const J1 = "_panel_19663_1", Q1 = "_panelExiting_19663_13", tt = "_menuItem_1966
247
247
  /* @__PURE__ */ e("span", { className: j.menuItemText, children: t.label })
248
248
  ]
249
249
  }
250
- ), st = ({
250
+ ), lt = ({
251
251
  width: t = 16,
252
252
  height: n = 16,
253
253
  color: o = "#3B64A0"
@@ -282,7 +282,7 @@ const J1 = "_panel_19663_1", Q1 = "_panelExiting_19663_13", tt = "_menuItem_1966
282
282
  )
283
283
  ]
284
284
  }
285
- ), lt = ({
285
+ ), ct = ({
286
286
  width: t = 16,
287
287
  height: n = 16,
288
288
  color: o = "#3B64A0"
@@ -313,7 +313,7 @@ const J1 = "_panel_19663_1", Q1 = "_panelExiting_19663_13", tt = "_menuItem_1966
313
313
  )
314
314
  ]
315
315
  }
316
- ), h1 = ({
316
+ ), r1 = ({
317
317
  width: t = 16,
318
318
  height: n = 16,
319
319
  color: o = "#3B64A0"
@@ -342,16 +342,16 @@ const J1 = "_panel_19663_1", Q1 = "_panelExiting_19663_13", tt = "_menuItem_1966
342
342
  )
343
343
  ]
344
344
  }
345
- ), x1 = M1(
345
+ ), w1 = L1(
346
346
  void 0
347
- ), Te = ({ children: t }) => {
348
- const [n, o] = $([]), i = D((a, d) => {
349
- o((s) => (s.forEach((l) => {
350
- l.current && l !== a && l.current.hide(d);
351
- }), [])), a.current?.toggle(d), o([a]);
352
- }, []), r = D((a) => {
353
- o((d) => d.filter((s) => s !== a));
354
- }, []), c = H(
347
+ ), $e = ({ children: t }) => {
348
+ const [n, o] = O([]), i = D((l, d) => {
349
+ o((s) => (s.forEach((c) => {
350
+ c.current && c !== l && c.current.hide(d);
351
+ }), [])), l.current?.toggle(d), o([l]);
352
+ }, []), r = D((l) => {
353
+ o((d) => d.filter((s) => s !== l));
354
+ }, []), a = H(
355
355
  () => ({
356
356
  openMenus: n,
357
357
  openMenu: i,
@@ -359,13 +359,13 @@ const J1 = "_panel_19663_1", Q1 = "_panelExiting_19663_13", tt = "_menuItem_1966
359
359
  }),
360
360
  [n, i, r]
361
361
  );
362
- return /* @__PURE__ */ e(x1.Provider, { value: c, children: t });
363
- }, s1 = () => {
364
- const t = L1(x1);
362
+ return /* @__PURE__ */ e(w1.Provider, { value: a, children: t });
363
+ }, l1 = () => {
364
+ const t = S1(w1);
365
365
  if (t === void 0)
366
366
  throw new Error("useMenuProvider must be used within a MenuProvider");
367
367
  return t;
368
- }, ct = ({ color: t = "#E32012" }) => /* @__PURE__ */ m(
368
+ }, at = ({ color: t = "#E32012" }) => /* @__PURE__ */ m(
369
369
  "svg",
370
370
  {
371
371
  xmlns: "http://www.w3.org/2000/svg",
@@ -384,59 +384,59 @@ const J1 = "_panel_19663_1", Q1 = "_panelExiting_19663_13", tt = "_menuItem_1966
384
384
  /* @__PURE__ */ e("defs", { children: /* @__PURE__ */ e("clipPath", { id: "clip0_3105_5367", children: /* @__PURE__ */ e("rect", { width: "16", height: "16", fill: "white" }) }) })
385
385
  ]
386
386
  }
387
- ), l1 = (t) => {
387
+ ), c1 = (t) => {
388
388
  const {
389
389
  isSet: n,
390
390
  isSelected: o,
391
391
  isFilter: i,
392
392
  className: r,
393
- title: c,
394
- icon: a,
393
+ title: a,
394
+ icon: l,
395
395
  contextMenuItems: d = void 0,
396
396
  onDeleteStep: s,
397
- onUpdateFilter: l,
397
+ onUpdateFilter: c,
398
398
  onSelectStep: u,
399
- subtitle: w,
400
- isInvalid: v,
401
- localId: _
402
- } = t, b = O(null), { openMenu: k, closeMenu: g } = s1(), B = r1(), C = H(() => {
403
- const f = [];
404
- return f.push({
399
+ subtitle: x,
400
+ isInvalid: f,
401
+ localId: v
402
+ } = t, b = E(null), { openMenu: B, closeMenu: g } = l1(), M = t1(), C = H(() => {
403
+ const h = [];
404
+ return h.push({
405
405
  label: "Add Step Filter",
406
- icon: /* @__PURE__ */ e("div", { className: "mr-2 flex items-center justify-center", children: /* @__PURE__ */ e(h1, {}) }),
407
- command: (y) => {
408
- y?.originalEvent?.stopPropagation(), l && l(_);
406
+ icon: /* @__PURE__ */ e("div", { className: "mr-2 flex items-center justify-center", children: /* @__PURE__ */ e(r1, {}) }),
407
+ command: (w) => {
408
+ w?.originalEvent?.stopPropagation(), c && c(v);
409
409
  },
410
- template: B
411
- }), s && f.push({
410
+ template: M
411
+ }), s && h.push({
412
412
  label: "Remove",
413
413
  icon: /* @__PURE__ */ e(J, { color: "#3B64A0", size: 18 }),
414
- command: (y) => {
415
- y?.originalEvent?.stopPropagation(), s(_);
414
+ command: (w) => {
415
+ w?.originalEvent?.stopPropagation(), s(v);
416
416
  },
417
- template: B
418
- }), f;
419
- }, [l, s, _, B]), p = H(() => d ?? C, [d, C]), x = (f) => {
420
- f.stopPropagation(), k(b, f);
421
- }, I = H(() => o && v ? N.step + " " + N.selectedInvalid : o ? N.step + " " + N.selected : n ? N.step + " " + N.isSet : v ? N.step + " " + N.invalid : N.step, [n, o, v]), h = H(() => v ? /* @__PURE__ */ e(ct, { color: "#E32012" }) : a, [a, v]);
422
- return /* @__PURE__ */ e("div", { className: N.container + " " + r, children: /* @__PURE__ */ m("div", { children: [
423
- /* @__PURE__ */ m("div", { className: I, onClick: () => u(_), children: [
424
- /* @__PURE__ */ m("div", { className: N.content, children: [
425
- /* @__PURE__ */ e("div", { className: `${N.icon} ${v && N.invalid}`, children: h }),
426
- /* @__PURE__ */ e("div", { className: N.title, children: c })
417
+ template: M
418
+ }), h;
419
+ }, [c, s, v, M]), p = H(() => d ?? C, [d, C]), _ = (h) => {
420
+ h.stopPropagation(), B(b, h);
421
+ }, y = H(() => o && f ? k.step + " " + k.selectedInvalid : o ? k.step + " " + k.selected : n ? k.step + " " + k.isSet : f ? k.step + " " + k.invalid : k.step, [n, o, f]), N = H(() => f ? /* @__PURE__ */ e(at, { color: "#E32012" }) : l, [l, f]);
422
+ return /* @__PURE__ */ e("div", { className: k.container + " " + r, children: /* @__PURE__ */ m("div", { children: [
423
+ /* @__PURE__ */ m("div", { className: y, onClick: () => u(v), children: [
424
+ /* @__PURE__ */ m("div", { className: k.content, children: [
425
+ /* @__PURE__ */ e("div", { className: `${k.icon} ${f && k.invalid}`, children: N }),
426
+ /* @__PURE__ */ e("div", { className: k.title, children: a })
427
427
  ] }),
428
428
  /* @__PURE__ */ e(
429
429
  "button",
430
430
  {
431
- className: N.dotsButton,
432
- onClick: x,
431
+ className: k.dotsButton,
432
+ onClick: _,
433
433
  "aria-haspopup": !0,
434
434
  "aria-label": "Step options",
435
435
  children: /* @__PURE__ */ e(
436
436
  q,
437
437
  {
438
- className: N.dots,
439
- color: v ? "#E32012" : "#3B64A0",
438
+ className: k.dots,
439
+ color: f ? "#E32012" : "#3B64A0",
440
440
  size: 16
441
441
  }
442
442
  )
@@ -448,7 +448,7 @@ const J1 = "_panel_19663_1", Q1 = "_panelExiting_19663_13", tt = "_menuItem_1966
448
448
  model: p,
449
449
  popup: !0,
450
450
  ref: b,
451
- onClick: (f) => f.stopPropagation(),
451
+ onClick: (h) => h.stopPropagation(),
452
452
  onHide: () => g(b)
453
453
  }
454
454
  )
@@ -456,54 +456,54 @@ const J1 = "_panel_19663_1", Q1 = "_panelExiting_19663_13", tt = "_menuItem_1966
456
456
  i && /* @__PURE__ */ m(
457
457
  "div",
458
458
  {
459
- className: N.filterFlag,
459
+ className: k.filterFlag,
460
460
  role: "button",
461
461
  tabIndex: 0,
462
462
  onClick: () => {
463
- l && l(_);
463
+ c && c(v);
464
464
  },
465
- onKeyDown: (f) => {
466
- (f.key === "Enter" || f.key === " ") && l && (f.preventDefault(), l(_));
465
+ onKeyDown: (h) => {
466
+ (h.key === "Enter" || h.key === " ") && c && (h.preventDefault(), c(v));
467
467
  },
468
468
  children: [
469
- /* @__PURE__ */ e(h1, { color: "#3B64A0" }),
469
+ /* @__PURE__ */ e(r1, { color: "#3B64A0" }),
470
470
  /* @__PURE__ */ e("span", { children: "Filter" }),
471
471
  /* @__PURE__ */ e(
472
472
  q,
473
473
  {
474
- className: N.dots,
475
- color: v ? "#E32012" : "#3B64A0",
474
+ className: k.dots,
475
+ color: f ? "#E32012" : "#3B64A0",
476
476
  style: { height: "10px" }
477
477
  }
478
478
  )
479
479
  ]
480
480
  }
481
481
  ),
482
- w && /* @__PURE__ */ e("div", { className: N.subtitle, children: w })
482
+ x && /* @__PURE__ */ e("div", { className: k.subtitle, children: x })
483
483
  ] }) });
484
- }, at = () => /* @__PURE__ */ m("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: [
484
+ }, dt = () => /* @__PURE__ */ m("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: [
485
485
  /* @__PURE__ */ m("g", { clipPath: "url(#clip0_6551_9169)", children: [
486
486
  /* @__PURE__ */ e("rect", { width: "24", height: "24", rx: "12", fill: "#0C971F" }),
487
487
  /* @__PURE__ */ e("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M11 6C11 5.44772 11.4477 5 12 5C12.5523 5 13 5.44772 13 6V11H18C18.5523 11 19 11.4477 19 12C19 12.5523 18.5523 13 18 13H13V18C13 18.5523 12.5523 19 12 19C11.4477 19 11 18.5523 11 18V13H6C5.44772 13 5 12.5523 5 12C5 11.4477 5.44772 11 6 11H11V6Z", fill: "white" })
488
488
  ] }),
489
489
  /* @__PURE__ */ e("rect", { x: "0.75", y: "0.75", width: "22.5", height: "22.5", rx: "11.25", stroke: "#14BC2B", strokeWidth: "1.5" }),
490
490
  /* @__PURE__ */ e("defs", { children: /* @__PURE__ */ e("clipPath", { id: "clip0_6551_9169", children: /* @__PURE__ */ e("rect", { width: "24", height: "24", rx: "12", fill: "white" }) }) })
491
- ] }), dt = "_multipleTriggersIcon_oxhdi_1", pt = {
492
- multipleTriggersIcon: dt
493
- }, ut = () => /* @__PURE__ */ e("div", { className: pt.multipleTriggersIcon, children: /* @__PURE__ */ e("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ e("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M1.5 3.75C1.5 3.15326 1.73705 2.58097 2.15901 2.15901C2.58097 1.73705 3.15326 1.5 3.75 1.5H5.25C5.84674 1.5 6.41903 1.73705 6.84099 2.15901C7.26295 2.58097 7.5 3.15326 7.5 3.75L13.701 3.75C13.8661 3.46404 14.1209 3.24054 14.426 3.11418C14.7311 2.98782 15.0693 2.96565 15.3883 3.05111C15.7072 3.13657 15.9891 3.32489 16.1901 3.58686C16.3911 3.84882 16.5 4.1698 16.5 4.5C16.5 4.8302 16.3911 5.15118 16.1901 5.41314C15.9891 5.67511 15.7072 5.86343 15.3883 5.94889C15.0693 6.03435 14.7311 6.01218 14.426 5.88582C14.1209 5.75946 13.8661 5.53596 13.701 5.25H10.686C10.956 5.52 11.196 5.8215 11.412 6.1575C12.369 7.6455 12.75 9.6885 12.75 12C12.75 14.9895 13.1355 16.638 13.8195 17.55C14.3535 18.264 15.162 18.6315 16.5 18.726C16.5063 18.1334 16.7462 17.5673 17.1674 17.1505C17.5887 16.7337 18.1574 16.5 18.75 16.5H20.25C20.8467 16.5 21.419 16.7371 21.841 17.159C22.2629 17.581 22.5 18.1533 22.5 18.75V20.25C22.5 20.8467 22.2629 21.419 21.841 21.841C21.419 22.2629 20.8467 22.5 20.25 22.5H18.75C18.1533 22.5 17.581 22.2629 17.159 21.841C16.7371 21.419 16.5 20.8467 16.5 20.25H10.299C10.1339 20.536 9.87905 20.7595 9.57399 20.8858C9.26892 21.0122 8.93068 21.0344 8.61173 20.9489C8.29278 20.8634 8.01095 20.6751 7.80993 20.4131C7.60892 20.1512 7.49996 19.8302 7.49996 19.5C7.49996 19.1698 7.60892 18.8488 7.80993 18.5869C8.01095 18.3249 8.29278 18.1366 8.61173 18.0511C8.93068 17.9656 9.26892 17.9878 9.57399 18.1142C9.87905 18.2405 10.1339 18.464 10.299 18.75H12.8655C12.7785 18.6538 12.6959 18.5537 12.618 18.45C11.6145 17.1105 11.25 15.0105 11.25 12C11.25 9.81 10.881 8.1045 10.1505 6.9675C9.5655 6.06 8.7225 5.4675 7.5 5.2995C7.48706 5.88762 7.2443 6.44728 6.82374 6.85859C6.40318 7.2699 5.83826 7.50014 5.25 7.5H3.75C3.15326 7.5 2.58097 7.26295 2.15901 6.84099C1.73705 6.41903 1.5 5.84674 1.5 5.25V3.75ZM3.75 3C3.55109 3 3.36032 3.07902 3.21967 3.21967C3.07902 3.36032 3 3.55109 3 3.75V5.25C3 5.44891 3.07902 5.63968 3.21967 5.78033C3.36032 5.92098 3.55109 6 3.75 6H5.25C5.44891 6 5.63968 5.92098 5.78033 5.78033C5.92098 5.63968 6 5.44891 6 5.25V3.75C6 3.55109 5.92098 3.36032 5.78033 3.21967C5.63968 3.07902 5.44891 3 5.25 3H3.75ZM18.75 18C18.5511 18 18.3603 18.079 18.2197 18.2197C18.079 18.3603 18 18.5511 18 18.75V20.25C18 20.4489 18.079 20.6397 18.2197 20.7803C18.3603 20.921 18.5511 21 18.75 21H20.25C20.4489 21 20.6397 20.921 20.7803 20.7803C20.921 20.6397 21 20.4489 21 20.25V18.75C21 18.5511 20.921 18.3603 20.7803 18.2197C20.6397 18.079 20.4489 18 20.25 18H18.75Z", fill: "white" }) }) }), ht = "_trigger_kfg1y_1", Ct = "_title_kfg1y_7", mt = "_empty_kfg1y_15", gt = "_triggerContainer_kfg1y_21", ft = "_stepsContainer_kfg1y_25", vt = "_stepItem_kfg1y_51", _t = "_curvesSvg_kfg1y_70", xt = "_centralNode_kfg1y_78", wt = "_iconWrapper_kfg1y_104", yt = "_fadeIn_kfg1y_127", It = "_fadeOut_kfg1y_130", bt = "_operationContainer_kfg1y_134", L = {
494
- trigger: ht,
495
- title: Ct,
496
- empty: mt,
497
- triggerContainer: gt,
498
- stepsContainer: ft,
499
- stepItem: vt,
500
- curvesSvg: _t,
501
- centralNode: xt,
502
- iconWrapper: wt,
503
- fadeIn: yt,
504
- fadeOut: It,
505
- operationContainer: bt
506
- }, Nt = () => /* @__PURE__ */ e(
491
+ ] }), pt = "_multipleTriggersIcon_oxhdi_1", ut = {
492
+ multipleTriggersIcon: pt
493
+ }, ht = () => /* @__PURE__ */ e("div", { className: ut.multipleTriggersIcon, children: /* @__PURE__ */ e("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ e("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M1.5 3.75C1.5 3.15326 1.73705 2.58097 2.15901 2.15901C2.58097 1.73705 3.15326 1.5 3.75 1.5H5.25C5.84674 1.5 6.41903 1.73705 6.84099 2.15901C7.26295 2.58097 7.5 3.15326 7.5 3.75L13.701 3.75C13.8661 3.46404 14.1209 3.24054 14.426 3.11418C14.7311 2.98782 15.0693 2.96565 15.3883 3.05111C15.7072 3.13657 15.9891 3.32489 16.1901 3.58686C16.3911 3.84882 16.5 4.1698 16.5 4.5C16.5 4.8302 16.3911 5.15118 16.1901 5.41314C15.9891 5.67511 15.7072 5.86343 15.3883 5.94889C15.0693 6.03435 14.7311 6.01218 14.426 5.88582C14.1209 5.75946 13.8661 5.53596 13.701 5.25H10.686C10.956 5.52 11.196 5.8215 11.412 6.1575C12.369 7.6455 12.75 9.6885 12.75 12C12.75 14.9895 13.1355 16.638 13.8195 17.55C14.3535 18.264 15.162 18.6315 16.5 18.726C16.5063 18.1334 16.7462 17.5673 17.1674 17.1505C17.5887 16.7337 18.1574 16.5 18.75 16.5H20.25C20.8467 16.5 21.419 16.7371 21.841 17.159C22.2629 17.581 22.5 18.1533 22.5 18.75V20.25C22.5 20.8467 22.2629 21.419 21.841 21.841C21.419 22.2629 20.8467 22.5 20.25 22.5H18.75C18.1533 22.5 17.581 22.2629 17.159 21.841C16.7371 21.419 16.5 20.8467 16.5 20.25H10.299C10.1339 20.536 9.87905 20.7595 9.57399 20.8858C9.26892 21.0122 8.93068 21.0344 8.61173 20.9489C8.29278 20.8634 8.01095 20.6751 7.80993 20.4131C7.60892 20.1512 7.49996 19.8302 7.49996 19.5C7.49996 19.1698 7.60892 18.8488 7.80993 18.5869C8.01095 18.3249 8.29278 18.1366 8.61173 18.0511C8.93068 17.9656 9.26892 17.9878 9.57399 18.1142C9.87905 18.2405 10.1339 18.464 10.299 18.75H12.8655C12.7785 18.6538 12.6959 18.5537 12.618 18.45C11.6145 17.1105 11.25 15.0105 11.25 12C11.25 9.81 10.881 8.1045 10.1505 6.9675C9.5655 6.06 8.7225 5.4675 7.5 5.2995C7.48706 5.88762 7.2443 6.44728 6.82374 6.85859C6.40318 7.2699 5.83826 7.50014 5.25 7.5H3.75C3.15326 7.5 2.58097 7.26295 2.15901 6.84099C1.73705 6.41903 1.5 5.84674 1.5 5.25V3.75ZM3.75 3C3.55109 3 3.36032 3.07902 3.21967 3.21967C3.07902 3.36032 3 3.55109 3 3.75V5.25C3 5.44891 3.07902 5.63968 3.21967 5.78033C3.36032 5.92098 3.55109 6 3.75 6H5.25C5.44891 6 5.63968 5.92098 5.78033 5.78033C5.92098 5.63968 6 5.44891 6 5.25V3.75C6 3.55109 5.92098 3.36032 5.78033 3.21967C5.63968 3.07902 5.44891 3 5.25 3H3.75ZM18.75 18C18.5511 18 18.3603 18.079 18.2197 18.2197C18.079 18.3603 18 18.5511 18 18.75V20.25C18 20.4489 18.079 20.6397 18.2197 20.7803C18.3603 20.921 18.5511 21 18.75 21H20.25C20.4489 21 20.6397 20.921 20.7803 20.7803C20.921 20.6397 21 20.4489 21 20.25V18.75C21 18.5511 20.921 18.3603 20.7803 18.2197C20.6397 18.079 20.4489 18 20.25 18H18.75Z", fill: "white" }) }) }), Ct = "_trigger_kfg1y_1", mt = "_title_kfg1y_7", gt = "_empty_kfg1y_15", ft = "_triggerContainer_kfg1y_21", vt = "_stepsContainer_kfg1y_25", _t = "_stepItem_kfg1y_51", xt = "_curvesSvg_kfg1y_70", wt = "_centralNode_kfg1y_78", yt = "_iconWrapper_kfg1y_104", It = "_fadeIn_kfg1y_127", bt = "_fadeOut_kfg1y_130", Nt = "_operationContainer_kfg1y_134", S = {
494
+ trigger: Ct,
495
+ title: mt,
496
+ empty: gt,
497
+ triggerContainer: ft,
498
+ stepsContainer: vt,
499
+ stepItem: _t,
500
+ curvesSvg: xt,
501
+ centralNode: wt,
502
+ iconWrapper: yt,
503
+ fadeIn: It,
504
+ fadeOut: bt,
505
+ operationContainer: Nt
506
+ }, kt = () => /* @__PURE__ */ e(
507
507
  "div",
508
508
  {
509
509
  style: {
@@ -513,41 +513,41 @@ const J1 = "_panel_19663_1", Q1 = "_panelExiting_19663_13", tt = "_menuItem_1966
513
513
  borderTop: "1px solid #a1bbdc"
514
514
  }
515
515
  }
516
- ), kt = 80, X = 34, Bt = ({
516
+ ), Bt = 80, X = 34, Pt = ({
517
517
  steps: t,
518
518
  title: n,
519
519
  className: o,
520
520
  onDeleteTrigger: i,
521
521
  onAddTrigger: r,
522
- onSelectStep: c,
523
- onUpdateFilter: a,
522
+ onSelectStep: a,
523
+ onUpdateFilter: l,
524
524
  onCenterYUpdate: d
525
525
  }) => {
526
- const s = O(null), l = O([]), [u, w] = $([]), [v, _] = $({ width: 0, height: 0 }), [b, k] = $(!1), [g, B] = $(!1), C = O(null);
526
+ const s = E(null), c = E([]), [u, x] = O([]), [f, v] = O({ width: 0, height: 0 }), [b, B] = O(!1), [g, M] = O(!1), C = E(null);
527
527
  Y(() => {
528
528
  const h = () => {
529
529
  if (!s.current) return;
530
- const f = [];
531
- if (l.current.forEach((y, M) => {
532
- if (y && s.current) {
533
- const T = s.current.getBoundingClientRect(), S = y.getBoundingClientRect();
534
- f.push({
535
- localId: t[M]?.localId ?? `step-${M}`,
536
- top: S.top - T.top,
537
- right: S.right - T.left,
538
- centerY: S.top - T.top + S.height / 2
530
+ const w = [];
531
+ if (c.current.forEach((I, T) => {
532
+ if (I && s.current) {
533
+ const $ = s.current.getBoundingClientRect(), P = I.getBoundingClientRect();
534
+ w.push({
535
+ localId: t[T]?.localId ?? `step-${T}`,
536
+ top: P.top - $.top,
537
+ right: P.right - $.left,
538
+ centerY: P.top - $.top + P.height / 2
539
539
  });
540
540
  }
541
- }), w(f), s.current && f.length > 0) {
542
- const y = s.current.getBoundingClientRect(), M = Math.min(...f.map((W) => W.top)), T = l.current.filter(Boolean).map((W) => W?.offsetHeight || 68), S = Math.max(
543
- ...f.map((W, k1) => W.top + (T[k1] || 68))
544
- ), t1 = Math.max(...f.map((W) => W.right)) + 0, e1 = Math.max(
545
- y.height,
546
- S - M + 100
541
+ }), x(w), s.current && w.length > 0) {
542
+ const I = s.current.getBoundingClientRect(), T = Math.min(...w.map((W) => W.top)), $ = c.current.filter(Boolean).map((W) => W?.offsetHeight || 68), P = Math.max(
543
+ ...w.map((W, B1) => W.top + ($[B1] || 68))
544
+ ), e1 = Math.max(...w.map((W) => W.right)) + 0, n1 = Math.max(
545
+ I.height,
546
+ P - T + 100
547
547
  );
548
- _({
549
- width: t1,
550
- height: e1
548
+ v({
549
+ width: e1,
550
+ height: n1
551
551
  });
552
552
  }
553
553
  };
@@ -556,55 +556,65 @@ const J1 = "_panel_19663_1", Q1 = "_panelExiting_19663_13", tt = "_menuItem_1966
556
556
  let h = !0;
557
557
  if (b) {
558
558
  C.current && (clearTimeout(C.current), C.current = null);
559
- const f = setTimeout(() => {
560
- h && B(!0);
559
+ const w = setTimeout(() => {
560
+ h && M(!0);
561
561
  }, 0);
562
562
  return () => {
563
- h = !1, clearTimeout(f);
563
+ h = !1, clearTimeout(w);
564
564
  };
565
565
  }
566
566
  return C.current = setTimeout(() => {
567
- h && B(!1);
567
+ h && M(!1);
568
568
  }, 140), () => {
569
569
  h = !1, C.current && (clearTimeout(C.current), C.current = null);
570
570
  };
571
571
  }, [b]);
572
- const p = u.length > 0 ? kt : 0, x = H(() => u.length > 1 ? u.reduce((h, f) => h + f.top + X, 0) / u.length : u.length === 1 ? u[0].top + X : 0, [u]);
573
- if (Y(() => {
574
- d?.(x);
575
- }, [x, d]), t.length === 0)
576
- return /* @__PURE__ */ m("div", { className: `${L.trigger} ${o || ""}`, children: [
577
- n && /* @__PURE__ */ e("h3", { className: L.title, children: n }),
578
- /* @__PURE__ */ e("div", { className: L.empty, children: "No steps" })
572
+ const p = u.length > 0 ? Bt : 0, _ = H(() => u.length > 1 ? u.reduce((h, w) => h + w.top + X, 0) / u.length : u.length === 1 ? u[0].top + X : 0, [u]);
573
+ Y(() => {
574
+ d?.(_);
575
+ }, [_, d]);
576
+ const y = t1();
577
+ if (t.length === 0)
578
+ return /* @__PURE__ */ m("div", { className: `${S.trigger} ${o || ""}`, children: [
579
+ n && /* @__PURE__ */ e("h3", { className: S.title, children: n }),
580
+ /* @__PURE__ */ e("div", { className: S.empty, children: "No steps" })
579
581
  ] });
580
- const I = (h, f, y, M) => {
581
- const T = y - h, S = Math.min(T * 0.6, 60), E = h + S, t1 = f, e1 = y - S;
582
- return `M ${h} ${f} C ${E} ${t1}, ${e1} ${M}, ${y} ${M}`;
582
+ const N = (h, w, I, T) => {
583
+ const $ = I - h, P = Math.min($ * 0.6, 60), u1 = h + P, e1 = w, n1 = I - P;
584
+ return `M ${h} ${w} C ${u1} ${e1}, ${n1} ${T}, ${I} ${T}`;
583
585
  };
584
- return /* @__PURE__ */ m("div", { className: `${L.trigger} ${o || ""}`, ref: s, children: [
585
- n && /* @__PURE__ */ e("h3", { className: L.title, children: n }),
586
- /* @__PURE__ */ m("div", { className: L.triggerContainer, children: [
587
- /* @__PURE__ */ e("div", { className: L.stepsContainer, children: t.map((h, f) => /* @__PURE__ */ e(
586
+ return /* @__PURE__ */ m("div", { className: `${S.trigger} ${o || ""}`, ref: s, children: [
587
+ n && /* @__PURE__ */ e("h3", { className: S.title, children: n }),
588
+ /* @__PURE__ */ m("div", { className: S.triggerContainer, children: [
589
+ /* @__PURE__ */ e("div", { className: S.stepsContainer, children: t.map((h, w) => /* @__PURE__ */ e(
588
590
  "div",
589
591
  {
590
- ref: (y) => {
591
- l.current[f] = y;
592
+ ref: (I) => {
593
+ c.current[w] = I;
592
594
  },
593
595
  children: /* @__PURE__ */ e(
594
- l1,
596
+ c1,
595
597
  {
596
598
  title: h.title,
597
- className: L.stepItem,
599
+ className: S.stepItem,
598
600
  localId: h.localId,
599
- idx: f,
601
+ idx: w,
600
602
  isSet: h.isSet,
601
603
  isSelected: h.isSelected,
602
604
  isInvalid: h.isInvalid,
603
605
  isFilter: h.isFilter,
604
606
  icon: h.icon,
605
- onSelectStep: c,
606
- onUpdateFilter: a,
607
+ onSelectStep: a,
608
+ onUpdateFilter: l,
607
609
  contextMenuItems: [
610
+ {
611
+ label: "Add Step Filter",
612
+ icon: /* @__PURE__ */ e("div", { className: "mr-2 flex items-center justify-center", children: /* @__PURE__ */ e(r1, {}) }),
613
+ command: (I) => {
614
+ I?.originalEvent?.stopPropagation(), l && l(h.localId);
615
+ },
616
+ template: y
617
+ },
608
618
  {
609
619
  label: "Delete",
610
620
  icon: /* @__PURE__ */ e(J, { className: "mr-2", color: "#3B64A0", size: 18 }),
@@ -615,11 +625,11 @@ const J1 = "_panel_19663_1", Q1 = "_panelExiting_19663_13", tt = "_menuItem_1966
615
625
  },
616
626
  {
617
627
  label: "",
618
- template: () => /* @__PURE__ */ e(Nt, {})
628
+ template: () => /* @__PURE__ */ e(kt, {})
619
629
  },
620
630
  {
621
631
  label: "Add More Triggers",
622
- icon: /* @__PURE__ */ e(q1, { className: "mr-2", color: "#3B64A0", size: 18 }),
632
+ icon: /* @__PURE__ */ e(J1, { className: "mr-2", color: "#3B64A0", size: 18 }),
623
633
  command: () => {
624
634
  r?.();
625
635
  }
@@ -633,15 +643,15 @@ const J1 = "_panel_19663_1", Q1 = "_panelExiting_19663_13", tt = "_menuItem_1966
633
643
  /* @__PURE__ */ e("div", { style: { position: "relative" }, children: u.length > 1 && /* @__PURE__ */ e(
634
644
  "svg",
635
645
  {
636
- className: L.curvesSvg,
637
- width: v.width,
638
- height: v.height,
646
+ className: S.curvesSvg,
647
+ width: f.width,
648
+ height: f.height,
639
649
  children: u.map((h) => {
640
- const y = u.length === 1 ? u[0].top + X : h.top + X;
650
+ const I = u.length === 1 ? u[0].top + X : h.top + X;
641
651
  return /* @__PURE__ */ e(
642
652
  "path",
643
653
  {
644
- d: I(0, y, p, x),
654
+ d: N(0, I, p, _),
645
655
  stroke: "#3b64a0",
646
656
  strokeWidth: "2",
647
657
  fill: "none",
@@ -656,19 +666,19 @@ const J1 = "_panel_19663_1", Q1 = "_panelExiting_19663_13", tt = "_menuItem_1966
656
666
  /* @__PURE__ */ e(
657
667
  "div",
658
668
  {
659
- className: L.centralNode,
669
+ className: S.centralNode,
660
670
  style: {
661
671
  "--node-x": `${p}px`,
662
- "--node-y": `${x}px`
672
+ "--node-y": `${_}px`
663
673
  },
664
- onMouseEnter: () => k(!0),
665
- onMouseLeave: () => k(!1),
674
+ onMouseEnter: () => B(!0),
675
+ onMouseLeave: () => B(!1),
666
676
  children: g ? /* @__PURE__ */ e(
667
677
  "div",
668
678
  {
669
- className: `${L.iconWrapper} ${b ? L.fadeIn : L.fadeOut}`,
679
+ className: `${S.iconWrapper} ${b ? S.fadeIn : S.fadeOut}`,
670
680
  onClick: r,
671
- children: /* @__PURE__ */ e(at, {})
681
+ children: /* @__PURE__ */ e(dt, {})
672
682
  }
673
683
  ) : null
674
684
  }
@@ -676,25 +686,25 @@ const J1 = "_panel_19663_1", Q1 = "_panelExiting_19663_13", tt = "_menuItem_1966
676
686
  /* @__PURE__ */ e(
677
687
  "div",
678
688
  {
679
- className: L.operationContainer,
689
+ className: S.operationContainer,
680
690
  style: {
681
691
  "--op-x": `${p + 16}px`,
682
- "--op-y": `${x}px`
692
+ "--op-y": `${_}px`
683
693
  },
684
- children: /* @__PURE__ */ e(ut, {})
694
+ children: /* @__PURE__ */ e(ht, {})
685
695
  }
686
696
  )
687
697
  ] }) : null
688
698
  ] })
689
699
  ] });
690
700
  };
691
- function Pt(t) {
701
+ function Mt(t) {
692
702
  return V({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "circle", attr: { cx: "12", cy: "12", r: "4" }, child: [] }, { tag: "line", attr: { x1: "1.05", y1: "12", x2: "7", y2: "12" }, child: [] }, { tag: "line", attr: { x1: "17.01", y1: "12", x2: "22.96", y2: "12" }, child: [] }] })(t);
693
703
  }
694
- function Mt(t) {
704
+ function Lt(t) {
695
705
  return V({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "polygon", attr: { points: "13 2 3 14 12 14 11 22 21 10 12 10 13 2" }, child: [] }] })(t);
696
706
  }
697
- const Lt = () => /* @__PURE__ */ m(
707
+ const St = () => /* @__PURE__ */ m(
698
708
  "svg",
699
709
  {
700
710
  width: "24",
@@ -723,59 +733,57 @@ const Lt = () => /* @__PURE__ */ m(
723
733
  )
724
734
  ]
725
735
  }
726
- ), St = "_stepLinkIcon_18u2g_1", Tt = "_stepLinkLine_18u2g_15", $t = "_stepLinkContainer_18u2g_39", G = {
727
- stepLinkIcon: St,
728
- stepLinkLine: Tt,
729
- stepLinkContainer: $t
736
+ ), Tt = "_stepLinkIcon_18u2g_1", $t = "_stepLinkLine_18u2g_15", Ot = "_stepLinkContainer_18u2g_39", G = {
737
+ stepLinkIcon: Tt,
738
+ stepLinkLine: $t,
739
+ stepLinkContainer: Ot
730
740
  }, A = ({
731
741
  onAddStep: t,
732
742
  onAddTrigger: n,
733
743
  onAddCondition: o,
734
744
  onAddLoop: i,
735
745
  iteratorEnabled: r = !0,
736
- conditionsEnabled: c = !0,
737
- stepId: a,
746
+ conditionsEnabled: a = !0,
747
+ stepId: l,
738
748
  index: d = 0,
739
749
  style: s,
740
- pathId: l
750
+ pathId: c
741
751
  }) => {
742
- const u = r1(), w = O(null);
743
- console.log("conditionsEnabled", c), console.log("iteratorEnabled", r);
744
- const v = [
752
+ const u = t1(), x = E(null), f = [
745
753
  ...d > 0 ? [
746
754
  {
747
755
  label: "Trigger",
748
- icon: /* @__PURE__ */ e(Mt, { color: "#3B64A0", size: 18 }),
756
+ icon: /* @__PURE__ */ e(Lt, { color: "#3B64A0", size: 18 }),
749
757
  command: () => {
750
- n?.(a, l, "trigger");
758
+ n?.(l, c, "trigger");
751
759
  },
752
760
  template: u
753
761
  }
754
762
  ] : [],
755
763
  {
756
764
  label: "Step",
757
- icon: /* @__PURE__ */ e(Pt, { color: "#3B64A0", size: 18 }),
758
- command: () => t?.(a, l, d > 0 ? "append" : "prepend"),
765
+ icon: /* @__PURE__ */ e(Mt, { color: "#3B64A0", size: 18 }),
766
+ command: () => t?.(l, c, d > 0 ? "append" : "prepend"),
759
767
  template: u
760
768
  },
761
- ...c ? [
769
+ ...a ? [
762
770
  {
763
771
  label: "Condition",
764
- icon: /* @__PURE__ */ e(st, { width: 18, height: 18 }),
765
- command: () => o?.(a, l, d > 0 ? "append" : "prepend"),
772
+ icon: /* @__PURE__ */ e(lt, { width: 18, height: 18 }),
773
+ command: () => o?.(l, c, d > 0 ? "append" : "prepend"),
766
774
  template: u
767
775
  }
768
776
  ] : [],
769
777
  ...r ? [
770
778
  {
771
779
  label: "Loop",
772
- icon: /* @__PURE__ */ e(lt, { width: 18, height: 18 }),
773
- command: () => i?.(a, l, d > 0 ? "append" : "prepend"),
780
+ icon: /* @__PURE__ */ e(ct, { width: 18, height: 18 }),
781
+ command: () => i?.(l, c, d > 0 ? "append" : "prepend"),
774
782
  template: u
775
783
  }
776
784
  ] : []
777
- ], _ = (b) => {
778
- w.current?.show(b);
785
+ ], v = (b) => {
786
+ x.current?.show(b);
779
787
  };
780
788
  return /* @__PURE__ */ m(
781
789
  "div",
@@ -789,28 +797,28 @@ const Lt = () => /* @__PURE__ */ m(
789
797
  "div",
790
798
  {
791
799
  className: G.stepLinkIcon,
792
- onClick: _,
800
+ onClick: v,
793
801
  "aria-haspopup": !0,
794
- children: /* @__PURE__ */ e(Lt, {})
802
+ children: /* @__PURE__ */ e(St, {})
795
803
  }
796
804
  ),
797
- /* @__PURE__ */ e(Q, { model: v, popup: !0, ref: w }),
805
+ /* @__PURE__ */ e(Q, { model: f, popup: !0, ref: x }),
798
806
  /* @__PURE__ */ e("div", { className: G.stepLinkLine })
799
807
  ]
800
808
  }
801
809
  );
802
- }, Ot = "_steps_yug55_1", Et = "_stepContainer_yug55_8", jt = "_stepContainerWithPaths_yug55_14", n1 = {
803
- steps: Ot,
804
- stepContainer: Et,
805
- stepContainerWithPaths: jt
806
- }, Ht = (t, n, o, i) => {
807
- const r = o - t, c = Math.min(r * 0.66, 66), a = t + c, d = n, s = o - c;
808
- return `M ${t} ${n} C ${a} ${d}, ${s} ${i}, ${o} ${i}`;
809
- }, Wt = ({
810
+ }, Et = "_steps_yug55_1", jt = "_stepContainer_yug55_8", Ht = "_stepContainerWithPaths_yug55_14", o1 = {
811
+ steps: Et,
812
+ stepContainer: jt,
813
+ stepContainerWithPaths: Ht
814
+ }, Wt = (t, n, o, i) => {
815
+ const r = o - t, a = Math.min(r * 0.66, 66), l = t + a, d = n, s = o - a;
816
+ return `M ${t} ${n} C ${l} ${d}, ${s} ${i}, ${o} ${i}`;
817
+ }, Rt = ({
810
818
  width: t,
811
819
  height: n
812
820
  }) => {
813
- const a = Ht(0, 1, t, n);
821
+ const l = Wt(0, 1, t, n);
814
822
  return /* @__PURE__ */ e("div", { style: { position: "absolute" }, children: /* @__PURE__ */ e(
815
823
  "svg",
816
824
  {
@@ -821,7 +829,7 @@ const Lt = () => /* @__PURE__ */ m(
821
829
  children: /* @__PURE__ */ e(
822
830
  "path",
823
831
  {
824
- d: a,
832
+ d: l,
825
833
  stroke: "#3b64a0",
826
834
  strokeWidth: "2",
827
835
  fill: "none",
@@ -830,14 +838,14 @@ const Lt = () => /* @__PURE__ */ m(
830
838
  )
831
839
  }
832
840
  ) });
833
- }, Rt = "_column_1uiy3_1", zt = "_row_1uiy3_19", Ft = "_stepsContainer_1uiy3_24", Z = {
834
- column: Rt,
835
- row: zt,
836
- stepsContainer: Ft
837
- }, Dt = "_wrapper_1nl2d_1", At = "_tooltip_1nl2d_5", C1 = {
838
- wrapper: Dt,
839
- tooltip: At
840
- }, Vt = ({
841
+ }, zt = "_column_1uiy3_1", Ft = "_row_1uiy3_19", Dt = "_stepsContainer_1uiy3_24", Z = {
842
+ column: zt,
843
+ row: Ft,
844
+ stepsContainer: Dt
845
+ }, At = "_wrapper_1nl2d_1", Vt = "_tooltip_1nl2d_5", m1 = {
846
+ wrapper: At,
847
+ tooltip: Vt
848
+ }, Zt = ({
841
849
  content: t,
842
850
  children: n,
843
851
  maxWidth: o = 500,
@@ -845,46 +853,46 @@ const Lt = () => /* @__PURE__ */ m(
845
853
  }) => /* @__PURE__ */ m(
846
854
  "div",
847
855
  {
848
- className: `${C1.wrapper} ${i ?? ""}`.trim(),
856
+ className: `${m1.wrapper} ${i ?? ""}`.trim(),
849
857
  style: { "--tooltip-max-width": `${o}px` },
850
858
  children: [
851
859
  n,
852
- t ? /* @__PURE__ */ e("div", { className: C1.tooltip, role: "tooltip", children: t }) : null
860
+ t ? /* @__PURE__ */ e("div", { className: m1.tooltip, role: "tooltip", children: t }) : null
853
861
  ]
854
862
  }
855
- ), Zt = "_conditionContainer_n6c2x_1", Yt = "_connectorLine_n6c2x_6", Xt = "_conditionWrapper_n6c2x_12", Gt = "_condition_n6c2x_1", Ut = "_conditionFits_n6c2x_53", Kt = "_connectorDot_n6c2x_57", z = {
856
- conditionContainer: Zt,
857
- connectorLine: Yt,
858
- conditionWrapper: Xt,
859
- condition: Gt,
863
+ ), Yt = "_conditionContainer_n6c2x_1", Xt = "_connectorLine_n6c2x_6", Gt = "_conditionWrapper_n6c2x_12", Kt = "_condition_n6c2x_1", Ut = "_conditionFits_n6c2x_53", qt = "_connectorDot_n6c2x_57", z = {
864
+ conditionContainer: Yt,
865
+ connectorLine: Xt,
866
+ conditionWrapper: Gt,
867
+ condition: Kt,
860
868
  conditionFits: Ut,
861
- connectorDot: Kt
862
- }, w1 = ({
869
+ connectorDot: qt
870
+ }, y1 = ({
863
871
  expression: t,
864
872
  style: n
865
873
  }) => {
866
- const o = O(null), i = O(null), [r, c] = $(!1);
867
- S1(() => {
868
- const s = o.current, l = i.current;
869
- if (!s || !l) return;
870
- const { paddingLeft: u, paddingRight: w } = getComputedStyle(s), v = Number.parseFloat(u) + Number.parseFloat(w);
871
- c(l.offsetWidth >= s.clientWidth - v);
874
+ const o = E(null), i = E(null), [r, a] = O(!1);
875
+ T1(() => {
876
+ const s = o.current, c = i.current;
877
+ if (!s || !c) return;
878
+ const { paddingLeft: u, paddingRight: x } = getComputedStyle(s), f = Number.parseFloat(u) + Number.parseFloat(x);
879
+ a(c.offsetWidth >= s.clientWidth - f);
872
880
  }, [t]);
873
- const a = t && r ? t : "", d = `${z.condition} ${r ? "" : z.conditionFits}`.trim();
881
+ const l = t && r ? t : "", d = `${z.condition} ${r ? "" : z.conditionFits}`.trim();
874
882
  return /* @__PURE__ */ m("div", { className: z.conditionContainer, style: n, children: [
875
883
  /* @__PURE__ */ e("div", { className: z.connectorLine }),
876
- /* @__PURE__ */ e(Vt, { content: a, className: z.conditionWrapper, children: /* @__PURE__ */ e("div", { ref: o, className: d, children: /* @__PURE__ */ e("span", { ref: i, children: t }) }) }),
884
+ /* @__PURE__ */ e(Zt, { content: l, className: z.conditionWrapper, children: /* @__PURE__ */ e("div", { ref: o, className: d, children: /* @__PURE__ */ e("span", { ref: i, children: t }) }) }),
877
885
  /* @__PURE__ */ e("div", { className: z.connectorLine }),
878
886
  /* @__PURE__ */ e("div", { className: z.connectorDot })
879
887
  ] });
880
- }, qt = "data:image/svg+xml,%3csvg%20width='44'%20height='44'%20viewBox='0%200%2044%2044'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='21.8125'%20y='-2.52539'%20width='34.4207'%20height='34.4207'%20rx='6.09524'%20transform='rotate(45%2021.8125%20-2.52539)'%20fill='%236B90C0'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M31.3947%2013.0355C31.4679%2013.1085%2031.526%2013.1952%2031.5656%2013.2907C31.6052%2013.3861%2031.6256%2013.4885%2031.6256%2013.5918C31.6256%2013.6952%2031.6052%2013.7975%2031.5656%2013.8929C31.526%2013.9884%2031.4679%2014.0751%2031.3947%2014.1481L14.109%2031.4338C13.9615%2031.5813%2013.7614%2031.6642%2013.5527%2031.6642C13.3441%2031.6642%2013.144%2031.5813%2012.9965%2031.4338C12.8489%2031.2863%2012.766%2031.0862%2012.766%2030.8775C12.766%2030.6689%2012.8489%2030.4688%2012.9965%2030.3212L30.2822%2013.0355C30.3552%2012.9623%2030.4419%2012.9043%2030.5373%2012.8647C30.6328%2012.8251%2030.7351%2012.8047%2030.8385%2012.8047C30.9418%2012.8047%2031.0441%2012.8251%2031.1396%2012.8647C31.2351%2012.9043%2031.3218%2012.9623%2031.3947%2013.0355Z'%20fill='white'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12.9965%2013.0355C12.9233%2013.1085%2012.8652%2013.1952%2012.8256%2013.2907C12.786%2013.3861%2012.7656%2013.4885%2012.7656%2013.5918C12.7656%2013.6952%2012.786%2013.7975%2012.8256%2013.8929C12.8652%2013.9884%2012.9233%2014.0751%2012.9965%2014.1481L30.2822%2031.4338C30.4297%2031.5813%2030.6298%2031.6642%2030.8385%2031.6642C31.0471%2031.6642%2031.2472%2031.5813%2031.3947%2031.4338C31.5423%2031.2863%2031.6252%2031.0862%2031.6252%2030.8775C31.6252%2030.6689%2031.5423%2030.4688%2031.3947%2030.3212L14.109%2013.0355C14.036%2012.9623%2013.9493%2012.9043%2013.8539%2012.8647C13.7584%2012.8251%2013.6561%2012.8047%2013.5527%2012.8047C13.4494%2012.8047%2013.3471%2012.8251%2013.2516%2012.8647C13.1561%2012.9043%2013.0694%2012.9623%2012.9965%2013.0355Z'%20fill='white'/%3e%3c/svg%3e", Jt = "data:image/svg+xml,%3csvg%20width='28'%20height='28'%20viewBox='0%200%2028%2028'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='1'%20y='1'%20width='26'%20height='26'%20rx='13'%20fill='white'/%3e%3crect%20x='1'%20y='1'%20width='26'%20height='26'%20rx='13'%20stroke='%236B90C0'%20stroke-width='2'/%3e%3ccircle%20cx='14'%20cy='14'%20r='6'%20fill='%236B90C0'/%3e%3c/svg%3e", Qt = "_ifStatement_xtij3_1", te = "_conditionIcon_xtij3_7", ee = "_ifStatementContainer_xtij3_21", ne = "_menuButton_xtij3_27", oe = "_menuIcon_xtij3_52", ie = "_ifdotIcon_xtij3_59", F = {
881
- ifStatement: Qt,
882
- conditionIcon: te,
883
- ifStatementContainer: ee,
884
- menuButton: ne,
885
- menuIcon: oe,
886
- ifdotIcon: ie
887
- }, re = ({ style: t }) => /* @__PURE__ */ e(
888
+ }, Jt = "data:image/svg+xml,%3csvg%20width='44'%20height='44'%20viewBox='0%200%2044%2044'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='21.8125'%20y='-2.52539'%20width='34.4207'%20height='34.4207'%20rx='6.09524'%20transform='rotate(45%2021.8125%20-2.52539)'%20fill='%236B90C0'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M31.3947%2013.0355C31.4679%2013.1085%2031.526%2013.1952%2031.5656%2013.2907C31.6052%2013.3861%2031.6256%2013.4885%2031.6256%2013.5918C31.6256%2013.6952%2031.6052%2013.7975%2031.5656%2013.8929C31.526%2013.9884%2031.4679%2014.0751%2031.3947%2014.1481L14.109%2031.4338C13.9615%2031.5813%2013.7614%2031.6642%2013.5527%2031.6642C13.3441%2031.6642%2013.144%2031.5813%2012.9965%2031.4338C12.8489%2031.2863%2012.766%2031.0862%2012.766%2030.8775C12.766%2030.6689%2012.8489%2030.4688%2012.9965%2030.3212L30.2822%2013.0355C30.3552%2012.9623%2030.4419%2012.9043%2030.5373%2012.8647C30.6328%2012.8251%2030.7351%2012.8047%2030.8385%2012.8047C30.9418%2012.8047%2031.0441%2012.8251%2031.1396%2012.8647C31.2351%2012.9043%2031.3218%2012.9623%2031.3947%2013.0355Z'%20fill='white'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12.9965%2013.0355C12.9233%2013.1085%2012.8652%2013.1952%2012.8256%2013.2907C12.786%2013.3861%2012.7656%2013.4885%2012.7656%2013.5918C12.7656%2013.6952%2012.786%2013.7975%2012.8256%2013.8929C12.8652%2013.9884%2012.9233%2014.0751%2012.9965%2014.1481L30.2822%2031.4338C30.4297%2031.5813%2030.6298%2031.6642%2030.8385%2031.6642C31.0471%2031.6642%2031.2472%2031.5813%2031.3947%2031.4338C31.5423%2031.2863%2031.6252%2031.0862%2031.6252%2030.8775C31.6252%2030.6689%2031.5423%2030.4688%2031.3947%2030.3212L14.109%2013.0355C14.036%2012.9623%2013.9493%2012.9043%2013.8539%2012.8647C13.7584%2012.8251%2013.6561%2012.8047%2013.5527%2012.8047C13.4494%2012.8047%2013.3471%2012.8251%2013.2516%2012.8647C13.1561%2012.9043%2013.0694%2012.9623%2012.9965%2013.0355Z'%20fill='white'/%3e%3c/svg%3e", Qt = "data:image/svg+xml,%3csvg%20width='28'%20height='28'%20viewBox='0%200%2028%2028'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='1'%20y='1'%20width='26'%20height='26'%20rx='13'%20fill='white'/%3e%3crect%20x='1'%20y='1'%20width='26'%20height='26'%20rx='13'%20stroke='%236B90C0'%20stroke-width='2'/%3e%3ccircle%20cx='14'%20cy='14'%20r='6'%20fill='%236B90C0'/%3e%3c/svg%3e", te = "_ifStatement_xtij3_1", ee = "_conditionIcon_xtij3_7", ne = "_ifStatementContainer_xtij3_21", oe = "_menuButton_xtij3_27", ie = "_menuIcon_xtij3_52", re = "_ifdotIcon_xtij3_59", F = {
889
+ ifStatement: te,
890
+ conditionIcon: ee,
891
+ ifStatementContainer: ne,
892
+ menuButton: oe,
893
+ menuIcon: ie,
894
+ ifdotIcon: re
895
+ }, se = ({ style: t }) => /* @__PURE__ */ e(
888
896
  "div",
889
897
  {
890
898
  style: {
@@ -894,12 +902,12 @@ const Lt = () => /* @__PURE__ */ m(
894
902
  ...t
895
903
  }
896
904
  }
897
- ), se = (t) => {
898
- const { enabled: n = !0, onDelete: o, onSelect: i } = t, r = O(null), { openMenu: c, closeMenu: a } = s1(), d = H(
905
+ ), le = (t) => {
906
+ const { enabled: n = !0, onDelete: o, onSelect: i } = t, r = E(null), { openMenu: a, closeMenu: l } = l1(), d = H(
899
907
  () => [
900
908
  {
901
909
  label: "Edit",
902
- icon: /* @__PURE__ */ e(_1, { color: "#3B64A0", size: 18 }),
910
+ icon: /* @__PURE__ */ e(x1, { color: "#3B64A0", size: 18 }),
903
911
  command: () => i?.()
904
912
  },
905
913
  {
@@ -910,13 +918,13 @@ const Lt = () => /* @__PURE__ */ m(
910
918
  ],
911
919
  [i, o]
912
920
  ), s = (u) => {
913
- u.stopPropagation(), c(r, u);
914
- }, l = (u) => {
921
+ u.stopPropagation(), a(r, u);
922
+ }, c = (u) => {
915
923
  u.target.closest(`.${F.menuButton}`) || i?.();
916
924
  };
917
925
  return /* @__PURE__ */ m("div", { className: F.ifStatementContainer, children: [
918
926
  /* @__PURE__ */ e(
919
- re,
927
+ se,
920
928
  {
921
929
  style: { position: "absolute", top: "22.5px", left: 0, zIndex: 1 }
922
930
  }
@@ -924,9 +932,9 @@ const Lt = () => /* @__PURE__ */ m(
924
932
  /* @__PURE__ */ e("div", { className: F.ifStatement, children: /* @__PURE__ */ e(
925
933
  "img",
926
934
  {
927
- src: qt,
935
+ src: Jt,
928
936
  alt: "condition",
929
- onClick: (u) => l(u),
937
+ onClick: (u) => c(u),
930
938
  className: F.conditionIcon
931
939
  }
932
940
  ) }),
@@ -947,70 +955,70 @@ const Lt = () => /* @__PURE__ */ m(
947
955
  ref: r,
948
956
  model: d,
949
957
  popup: !0,
950
- onHide: () => a(r)
958
+ onHide: () => l(r)
951
959
  }
952
960
  ),
953
- /* @__PURE__ */ e("img", { src: Jt, alt: "ifdot", className: F.ifdotIcon })
961
+ /* @__PURE__ */ e("img", { src: Qt, alt: "ifdot", className: F.ifdotIcon })
954
962
  ] });
955
- }, m1 = 34.5, le = 33, y1 = (t) => {
963
+ }, g1 = 34.5, ce = 33, I1 = (t) => {
956
964
  const {
957
965
  items: n,
958
966
  pathId: o,
959
967
  onAddStep: i,
960
968
  onAddTrigger: r,
961
- onAddCondition: c,
962
- onAddLoop: a,
969
+ onAddCondition: a,
970
+ onAddLoop: l,
963
971
  onDeleteStep: d,
964
972
  onUpdateFilter: s,
965
- onSelectStep: l,
973
+ onSelectStep: c,
966
974
  onResize: u,
967
- iteratorEnabled: w,
968
- conditionsEnabled: v
969
- } = t, _ = O(null), b = O([]), [k, g] = $([]);
975
+ iteratorEnabled: x,
976
+ conditionsEnabled: f
977
+ } = t, v = E(null), b = E([]), [B, g] = O([]);
970
978
  Y(() => {
971
979
  const C = () => {
972
- const I = _.current;
973
- if (!I || n.length === 0) {
980
+ const y = v.current;
981
+ if (!y || n.length === 0) {
974
982
  g([]);
975
983
  return;
976
984
  }
977
- const h = [], f = Number.parseFloat(
978
- getComputedStyle(I).zoom || "1"
985
+ const N = [], h = Number.parseFloat(
986
+ getComputedStyle(y).zoom || "1"
979
987
  );
980
- for (let y = 0; y < n.length; y++) {
981
- const M = b.current[y];
982
- if (M)
983
- if (M.offsetParent == null) {
984
- const T = I.getBoundingClientRect(), S = M.getBoundingClientRect();
985
- h.push((S.top - T.top) / f + m1);
988
+ for (let w = 0; w < n.length; w++) {
989
+ const I = b.current[w];
990
+ if (I)
991
+ if (I.offsetParent == null) {
992
+ const T = y.getBoundingClientRect(), $ = I.getBoundingClientRect();
993
+ N.push(($.top - T.top) / h + g1);
986
994
  } else
987
- h.push(M.offsetTop - le + m1);
995
+ N.push(I.offsetTop - ce + g1);
988
996
  }
989
- h.length === n.length && g(h);
997
+ N.length === n.length && g(N);
990
998
  };
991
999
  C();
992
- const p = new ResizeObserver(C), x = _.current;
993
- return x && p.observe(x), window.addEventListener("resize", C), () => {
1000
+ const p = new ResizeObserver(C), _ = v.current;
1001
+ return _ && p.observe(_), window.addEventListener("resize", C), () => {
994
1002
  p.disconnect(), window.removeEventListener("resize", C);
995
1003
  };
996
1004
  }, [n]);
997
- const B = H(() => k.length !== n.length || n.length <= 1 ? null : n.map((C, p) => p).filter((C) => C > 0).map((C) => {
998
- const p = k[C];
999
- return p === void 0 ? null : /* @__PURE__ */ e(Wt, { width: 100, height: p }, C);
1000
- }), [n, k]);
1005
+ const M = H(() => B.length !== n.length || n.length <= 1 ? null : n.map((C, p) => p).filter((C) => C > 0).map((C) => {
1006
+ const p = B[C];
1007
+ return p === void 0 ? null : /* @__PURE__ */ e(Rt, { width: 100, height: p }, C);
1008
+ }), [n, B]);
1001
1009
  return /* @__PURE__ */ m("div", { className: Z.row, children: [
1002
1010
  /* @__PURE__ */ e(
1003
- se,
1011
+ le,
1004
1012
  {
1005
1013
  onDelete: () => o != null && d?.(o),
1006
- enabled: v,
1007
- onSelect: o != null && l ? () => l(o) : void 0
1014
+ enabled: f,
1015
+ onSelect: o != null && c ? () => c(o) : void 0
1008
1016
  }
1009
1017
  ),
1010
1018
  /* @__PURE__ */ m(
1011
1019
  "div",
1012
1020
  {
1013
- ref: _,
1021
+ ref: v,
1014
1022
  className: Z.column,
1015
1023
  style: { marginTop: "33px" },
1016
1024
  children: [
@@ -1027,56 +1035,56 @@ const Lt = () => /* @__PURE__ */ m(
1027
1035
  }
1028
1036
  }
1029
1037
  ),
1030
- B
1038
+ M
1031
1039
  ]
1032
1040
  }
1033
1041
  ),
1034
1042
  /* @__PURE__ */ e("div", { className: Z.column, children: n.map((C, p) => {
1035
- let x;
1043
+ let _;
1036
1044
  if (C.paths)
1037
- x = /* @__PURE__ */ e(
1038
- y1,
1045
+ _ = /* @__PURE__ */ e(
1046
+ I1,
1039
1047
  {
1040
1048
  items: C.paths,
1041
1049
  pathId: o,
1042
1050
  onAddStep: i,
1043
1051
  onAddTrigger: r,
1044
- onAddCondition: c,
1045
- onAddLoop: a,
1052
+ onAddCondition: a,
1053
+ onAddLoop: l,
1046
1054
  onDeleteStep: d,
1047
1055
  onUpdateFilter: s,
1048
- onSelectStep: l,
1056
+ onSelectStep: c,
1049
1057
  onResize: u,
1050
- iteratorEnabled: w,
1051
- conditionsEnabled: v
1058
+ iteratorEnabled: x,
1059
+ conditionsEnabled: f
1052
1060
  },
1053
1061
  C.localId
1054
1062
  );
1055
1063
  else if (C.steps) {
1056
- const I = C;
1057
- x = /* @__PURE__ */ m("div", { className: Z.stepsContainer, children: [
1064
+ const y = C;
1065
+ _ = /* @__PURE__ */ m("div", { className: Z.stepsContainer, children: [
1058
1066
  /* @__PURE__ */ e(
1059
- w1,
1067
+ y1,
1060
1068
  {
1061
- expression: I.condition,
1069
+ expression: y.condition,
1062
1070
  style: { marginTop: "25px" }
1063
1071
  }
1064
1072
  ),
1065
1073
  /* @__PURE__ */ e(
1066
- c1,
1074
+ a1,
1067
1075
  {
1068
1076
  steps: C.steps,
1069
1077
  pathId: C.localId,
1070
- iteratorEnabled: w,
1071
- conditionsEnabled: v,
1072
- onSelectStep: l ?? (() => {
1078
+ iteratorEnabled: x,
1079
+ conditionsEnabled: f,
1080
+ onSelectStep: c ?? (() => {
1073
1081
  }),
1074
1082
  onAddStep: i ?? (() => {
1075
1083
  }),
1076
1084
  onAddTrigger: r,
1077
- onAddCondition: c ?? (() => {
1085
+ onAddCondition: a ?? (() => {
1078
1086
  }),
1079
- onAddLoop: a,
1087
+ onAddLoop: l,
1080
1088
  onDeleteStep: d,
1081
1089
  onUpdateFilter: s,
1082
1090
  onResize: u
@@ -1085,14 +1093,14 @@ const Lt = () => /* @__PURE__ */ m(
1085
1093
  )
1086
1094
  ] });
1087
1095
  } else
1088
- x = /* @__PURE__ */ e(
1089
- l1,
1096
+ _ = /* @__PURE__ */ e(
1097
+ c1,
1090
1098
  {
1091
1099
  localId: C.localId,
1092
1100
  title: "title" in C ? C.title : "",
1093
1101
  idx: 1,
1094
1102
  icon: "icon" in C ? C.icon : void 0,
1095
- onSelectStep: l,
1103
+ onSelectStep: c,
1096
1104
  onDeleteStep: d,
1097
1105
  onUpdateFilter: s
1098
1106
  },
@@ -1101,11 +1109,11 @@ const Lt = () => /* @__PURE__ */ m(
1101
1109
  return /* @__PURE__ */ e(
1102
1110
  "div",
1103
1111
  {
1104
- ref: (I) => {
1105
- b.current[p] = I;
1112
+ ref: (y) => {
1113
+ b.current[p] = y;
1106
1114
  },
1107
1115
  style: { width: "100%" },
1108
- children: x
1116
+ children: _
1109
1117
  },
1110
1118
  C.localId
1111
1119
  );
@@ -1125,17 +1133,17 @@ const Lt = () => /* @__PURE__ */ m(
1125
1133
  }
1126
1134
  }
1127
1135
  ),
1128
- B
1136
+ M
1129
1137
  ] }),
1130
1138
  /* @__PURE__ */ e(
1131
1139
  A,
1132
1140
  {
1133
1141
  onAddStep: i,
1134
1142
  onAddTrigger: r,
1135
- onAddCondition: c,
1136
- onAddLoop: a,
1137
- iteratorEnabled: w,
1138
- conditionsEnabled: v,
1143
+ onAddCondition: a,
1144
+ onAddLoop: l,
1145
+ iteratorEnabled: x,
1146
+ conditionsEnabled: f,
1139
1147
  stepId: o,
1140
1148
  pathId: o,
1141
1149
  index: 1,
@@ -1158,25 +1166,25 @@ const Lt = () => /* @__PURE__ */ m(
1158
1166
  }
1159
1167
  )
1160
1168
  ] });
1161
- }, i1 = 68, c1 = ({
1169
+ }, s1 = 68, a1 = ({
1162
1170
  pathId: t,
1163
1171
  steps: n,
1164
1172
  centerY: o,
1165
1173
  className: i,
1166
1174
  iteratorEnabled: r,
1167
- conditionsEnabled: c,
1168
- onAddStep: a,
1175
+ conditionsEnabled: a,
1176
+ onAddStep: l,
1169
1177
  onDeleteStep: d,
1170
1178
  onUpdateFilter: s,
1171
- onAddTrigger: l,
1179
+ onAddTrigger: c,
1172
1180
  onAddCondition: u,
1173
- onAddLoop: w,
1174
- onSelectStep: v,
1175
- onResize: _,
1181
+ onAddLoop: x,
1182
+ onSelectStep: f,
1183
+ onResize: v,
1176
1184
  isDescendent: b = !0
1177
1185
  }) => {
1178
- const k = o === void 0 ? void 0 : { marginTop: Math.max(0, o - i1 / 2) };
1179
- return console.log("conditionsEnabled", c), console.log("iteratorEnabled", r), n.length === 0 ? /* @__PURE__ */ m(
1186
+ const B = o === void 0 ? void 0 : { marginTop: Math.max(0, o - s1 / 2) };
1187
+ return n.length === 0 ? /* @__PURE__ */ m(
1180
1188
  "div",
1181
1189
  {
1182
1190
  style: {
@@ -1186,7 +1194,7 @@ const Lt = () => /* @__PURE__ */ m(
1186
1194
  flexDirection: "row",
1187
1195
  flex: 1,
1188
1196
  minWidth: 0,
1189
- ...k
1197
+ ...B
1190
1198
  },
1191
1199
  children: [
1192
1200
  /* @__PURE__ */ e(
@@ -1207,13 +1215,13 @@ const Lt = () => /* @__PURE__ */ m(
1207
1215
  A,
1208
1216
  {
1209
1217
  onAddStep: () => {
1210
- a?.(void 0, t);
1218
+ l?.(void 0, t);
1211
1219
  },
1212
- onAddTrigger: l,
1220
+ onAddTrigger: c,
1213
1221
  onAddCondition: u,
1214
- onAddLoop: w,
1222
+ onAddLoop: x,
1215
1223
  iteratorEnabled: r,
1216
- conditionsEnabled: c,
1224
+ conditionsEnabled: a,
1217
1225
  stepId: t,
1218
1226
  index: 0,
1219
1227
  style: {
@@ -1240,8 +1248,8 @@ const Lt = () => /* @__PURE__ */ m(
1240
1248
  ) : /* @__PURE__ */ e(
1241
1249
  "div",
1242
1250
  {
1243
- className: n1.steps + (i ? " " + i : ""),
1244
- style: k,
1251
+ className: o1.steps + (i ? " " + i : ""),
1252
+ style: B,
1245
1253
  children: /* @__PURE__ */ m(
1246
1254
  "div",
1247
1255
  {
@@ -1258,13 +1266,13 @@ const Lt = () => /* @__PURE__ */ m(
1258
1266
  A,
1259
1267
  {
1260
1268
  onAddStep: () => {
1261
- a?.(n[0].localId, t, "prepend");
1269
+ l?.(n[0].localId, t, "prepend");
1262
1270
  },
1263
- onAddTrigger: l,
1271
+ onAddTrigger: c,
1264
1272
  onAddCondition: u,
1265
- onAddLoop: w,
1273
+ onAddLoop: x,
1266
1274
  iteratorEnabled: r,
1267
- conditionsEnabled: c,
1275
+ conditionsEnabled: a,
1268
1276
  stepId: n[0].localId,
1269
1277
  pathId: t,
1270
1278
  index: 0,
@@ -1273,62 +1281,62 @@ const Lt = () => /* @__PURE__ */ m(
1273
1281
  }
1274
1282
  }
1275
1283
  ),
1276
- n.map((g, B) => {
1284
+ n.map((g, M) => {
1277
1285
  const C = !!g.paths, p = "condition" in g && typeof g.condition == "string";
1278
- let x;
1279
- return C && g.paths ? x = /* @__PURE__ */ e(
1280
- y1,
1286
+ let _;
1287
+ return C && g.paths ? _ = /* @__PURE__ */ e(
1288
+ I1,
1281
1289
  {
1282
1290
  items: g.paths,
1283
1291
  pathId: g.localId,
1284
1292
  iteratorEnabled: r,
1285
- conditionsEnabled: c,
1286
- onAddStep: a,
1293
+ conditionsEnabled: a,
1294
+ onAddStep: l,
1287
1295
  onAddCondition: u,
1288
- onAddLoop: w,
1296
+ onAddLoop: x,
1289
1297
  onDeleteStep: d,
1290
- onAddTrigger: l,
1291
- onSelectStep: v,
1298
+ onAddTrigger: c,
1299
+ onSelectStep: f,
1292
1300
  onUpdateFilter: s,
1293
- onResize: _
1301
+ onResize: v
1294
1302
  },
1295
1303
  g.title
1296
- ) : p ? x = /* @__PURE__ */ m(o1, { children: [
1304
+ ) : p ? _ = /* @__PURE__ */ m(i1, { children: [
1297
1305
  /* @__PURE__ */ e(
1298
- be,
1306
+ Ne,
1299
1307
  {
1300
1308
  value: g,
1301
1309
  iteratorEnabled: r,
1302
- conditionsEnabled: c,
1303
- onAddStep: a,
1304
- onAddTrigger: l,
1310
+ conditionsEnabled: a,
1311
+ onAddStep: l,
1312
+ onAddTrigger: c,
1305
1313
  onAddCondition: u,
1306
- onAddLoop: w,
1314
+ onAddLoop: x,
1307
1315
  onDeleteStep: d,
1308
1316
  onUpdateFilter: s,
1309
- onSelectStep: v,
1310
- onResize: _
1317
+ onSelectStep: f,
1318
+ onResize: v
1311
1319
  },
1312
1320
  g.localId
1313
1321
  ),
1314
1322
  /* @__PURE__ */ e(
1315
1323
  A,
1316
1324
  {
1317
- onAddStep: a,
1318
- onAddTrigger: l,
1325
+ onAddStep: l,
1326
+ onAddTrigger: c,
1319
1327
  onAddCondition: u,
1320
- onAddLoop: w,
1328
+ onAddLoop: x,
1321
1329
  iteratorEnabled: r,
1322
- conditionsEnabled: c,
1330
+ conditionsEnabled: a,
1323
1331
  stepId: g.localId,
1324
1332
  pathId: t,
1325
- index: B + 1,
1333
+ index: M + 1,
1326
1334
  style: { marginTop: "34px", height: 0 }
1327
1335
  }
1328
1336
  )
1329
- ] }) : x = /* @__PURE__ */ m(o1, { children: [
1337
+ ] }) : _ = /* @__PURE__ */ m(i1, { children: [
1330
1338
  /* @__PURE__ */ e(
1331
- l1,
1339
+ c1,
1332
1340
  {
1333
1341
  localId: g.localId,
1334
1342
  title: g.title,
@@ -1337,7 +1345,7 @@ const Lt = () => /* @__PURE__ */ m(
1337
1345
  isSet: g.isSet,
1338
1346
  isInvalid: g.isInvalid,
1339
1347
  isFilter: g.isFilter,
1340
- onSelectStep: v,
1348
+ onSelectStep: f,
1341
1349
  onDeleteStep: d,
1342
1350
  onUpdateFilter: s
1343
1351
  },
@@ -1346,22 +1354,22 @@ const Lt = () => /* @__PURE__ */ m(
1346
1354
  /* @__PURE__ */ e(
1347
1355
  A,
1348
1356
  {
1349
- onAddStep: a,
1350
- onAddTrigger: l,
1357
+ onAddStep: l,
1358
+ onAddTrigger: c,
1351
1359
  onAddCondition: u,
1352
- onAddLoop: w,
1360
+ onAddLoop: x,
1353
1361
  iteratorEnabled: r,
1354
- conditionsEnabled: c,
1362
+ conditionsEnabled: a,
1355
1363
  stepId: g.localId,
1356
1364
  pathId: t,
1357
- index: B + 1
1365
+ index: M + 1
1358
1366
  }
1359
1367
  )
1360
1368
  ] }), /* @__PURE__ */ e(
1361
1369
  "div",
1362
1370
  {
1363
- className: n1.stepContainer + (C || p ? " " + n1.stepContainerWithPaths : ""),
1364
- children: x
1371
+ className: o1.stepContainer + (C || p ? " " + o1.stepContainerWithPaths : ""),
1372
+ children: _
1365
1373
  },
1366
1374
  g.localId
1367
1375
  );
@@ -1382,7 +1390,7 @@ const Lt = () => /* @__PURE__ */ m(
1382
1390
  )
1383
1391
  }
1384
1392
  );
1385
- }, ce = () => /* @__PURE__ */ m(
1393
+ }, ae = () => /* @__PURE__ */ m(
1386
1394
  "svg",
1387
1395
  {
1388
1396
  width: "24",
@@ -1409,151 +1417,151 @@ const Lt = () => /* @__PURE__ */ m(
1409
1417
  )
1410
1418
  ]
1411
1419
  }
1412
- ), ae = "_container_1ktj6_1", de = "_collapsed_1ktj6_16", pe = "_loopNodeWrapper_1ktj6_21", ue = "_loopIconWrapper_1ktj6_31", he = "_loopBox_1ktj6_40", Ce = "_dotsButton_1ktj6_57", me = "_label_1ktj6_77", ge = "_limit_1ktj6_84", fe = "_expandable_1ktj6_90", ve = "_expandableCollapsed_1ktj6_98", _e = "_connector_1ktj6_105", xe = "_line_1ktj6_113", we = "_circleDot_1ktj6_121", ye = "_innerDot_1ktj6_136", Ie = "_stepsWrapper_1ktj6_143", P = {
1413
- container: ae,
1414
- collapsed: de,
1415
- loopNodeWrapper: pe,
1416
- loopIconWrapper: ue,
1417
- loopBox: he,
1418
- dotsButton: Ce,
1419
- label: me,
1420
- limit: ge,
1421
- expandable: fe,
1422
- expandableCollapsed: ve,
1423
- connector: _e,
1424
- line: xe,
1425
- circleDot: we,
1426
- innerDot: ye,
1427
- stepsWrapper: Ie
1428
- }, be = ({
1420
+ ), de = "_container_1ktj6_1", pe = "_collapsed_1ktj6_16", ue = "_loopNodeWrapper_1ktj6_21", he = "_loopIconWrapper_1ktj6_31", Ce = "_loopBox_1ktj6_40", me = "_dotsButton_1ktj6_57", ge = "_label_1ktj6_77", fe = "_limit_1ktj6_84", ve = "_expandable_1ktj6_90", _e = "_expandableCollapsed_1ktj6_98", xe = "_connector_1ktj6_105", we = "_line_1ktj6_113", ye = "_circleDot_1ktj6_121", Ie = "_innerDot_1ktj6_136", be = "_stepsWrapper_1ktj6_143", L = {
1421
+ container: de,
1422
+ collapsed: pe,
1423
+ loopNodeWrapper: ue,
1424
+ loopIconWrapper: he,
1425
+ loopBox: Ce,
1426
+ dotsButton: me,
1427
+ label: ge,
1428
+ limit: fe,
1429
+ expandable: ve,
1430
+ expandableCollapsed: _e,
1431
+ connector: xe,
1432
+ line: we,
1433
+ circleDot: ye,
1434
+ innerDot: Ie,
1435
+ stepsWrapper: be
1436
+ }, Ne = ({
1429
1437
  value: t,
1430
1438
  iteratorEnabled: n = !0,
1431
1439
  conditionsEnabled: o = !0,
1432
1440
  onAddStep: i,
1433
1441
  onAddTrigger: r,
1434
- onAddCondition: c,
1435
- onAddLoop: a,
1442
+ onAddCondition: a,
1443
+ onAddLoop: l,
1436
1444
  onDeleteStep: d,
1437
1445
  onUpdateFilter: s,
1438
- onSelectStep: l,
1446
+ onSelectStep: c,
1439
1447
  onResize: u
1440
1448
  }) => {
1441
- const { localId: w, limit: v, steps: _, condition: b } = t, k = _ ?? [], g = () => {
1442
- }, [B, C] = $(!1), p = O(null), { openMenu: x, closeMenu: I } = s1(), h = r1(), f = H(
1449
+ const { localId: x, limit: f, steps: v, condition: b } = t, B = v ?? [], g = () => {
1450
+ }, [M, C] = O(!1), p = E(null), { openMenu: _, closeMenu: y } = l1(), N = t1(), h = H(
1443
1451
  () => [
1444
1452
  {
1445
1453
  label: "Edit",
1446
- icon: /* @__PURE__ */ e(_1, { color: "#3B64A0", size: 18 }),
1447
- command: (E) => {
1448
- E?.originalEvent?.stopPropagation(), l?.(w);
1454
+ icon: /* @__PURE__ */ e(x1, { color: "#3B64A0", size: 18 }),
1455
+ command: (P) => {
1456
+ P?.originalEvent?.stopPropagation(), c?.(x);
1449
1457
  },
1450
- template: h
1458
+ template: N
1451
1459
  },
1452
1460
  {
1453
1461
  label: "Remove",
1454
1462
  icon: /* @__PURE__ */ e(J, { color: "#3B64A0", size: 18 }),
1455
- command: (E) => {
1456
- E?.originalEvent?.stopPropagation(), d && d(w);
1463
+ command: (P) => {
1464
+ P?.originalEvent?.stopPropagation(), d && d(x);
1457
1465
  },
1458
- template: h
1466
+ template: N
1459
1467
  }
1460
1468
  ],
1461
- [l, d, w, h]
1462
- ), y = (E) => {
1463
- E.stopPropagation(), x(p, E);
1464
- }, M = () => {
1465
- C((E) => !E), u?.();
1466
- }, T = P.container + (B ? "" : " " + P.collapsed), S = P.expandable + (B ? "" : " " + P.expandableCollapsed);
1469
+ [c, d, x, N]
1470
+ ), w = (P) => {
1471
+ P.stopPropagation(), _(p, P);
1472
+ }, I = () => {
1473
+ C((P) => !P), u?.();
1474
+ }, T = L.container + (M ? "" : " " + L.collapsed), $ = L.expandable + (M ? "" : " " + L.expandableCollapsed);
1467
1475
  return /* @__PURE__ */ m("div", { className: T, children: [
1468
- /* @__PURE__ */ m("div", { className: P.loopNodeWrapper, children: [
1469
- /* @__PURE__ */ m("div", { className: P.loopBox, children: [
1470
- /* @__PURE__ */ e("div", { onClick: M, className: P.loopIconWrapper, children: /* @__PURE__ */ e(ce, {}) }),
1471
- n && /* @__PURE__ */ e("button", { className: P.dotsButton, onClick: y, children: /* @__PURE__ */ e(q, { size: 16 }) }),
1476
+ /* @__PURE__ */ m("div", { className: L.loopNodeWrapper, children: [
1477
+ /* @__PURE__ */ m("div", { className: L.loopBox, children: [
1478
+ /* @__PURE__ */ e("div", { onClick: I, className: L.loopIconWrapper, children: /* @__PURE__ */ e(ae, {}) }),
1479
+ n && /* @__PURE__ */ e("button", { className: L.dotsButton, onClick: w, children: /* @__PURE__ */ e(q, { size: 16 }) }),
1472
1480
  /* @__PURE__ */ e(
1473
1481
  Q,
1474
1482
  {
1475
- model: f,
1483
+ model: h,
1476
1484
  popup: !0,
1477
1485
  ref: p,
1478
- onHide: () => I(p)
1486
+ onHide: () => y(p)
1479
1487
  }
1480
1488
  )
1481
1489
  ] }),
1482
- /* @__PURE__ */ e("div", { className: P.label, children: "Loop" }),
1483
- v != null && /* @__PURE__ */ m("div", { className: P.limit, children: [
1484
- v,
1490
+ /* @__PURE__ */ e("div", { className: L.label, children: "Loop" }),
1491
+ f != null && /* @__PURE__ */ m("div", { className: L.limit, children: [
1492
+ f,
1485
1493
  "x"
1486
1494
  ] })
1487
1495
  ] }),
1488
- /* @__PURE__ */ m("div", { className: S, children: [
1489
- /* @__PURE__ */ m("div", { className: P.connector, children: [
1490
- /* @__PURE__ */ e("div", { className: P.line }),
1491
- /* @__PURE__ */ e("div", { className: P.circleDot, children: /* @__PURE__ */ e("div", { className: P.innerDot }) }),
1492
- /* @__PURE__ */ e("div", { className: P.line })
1496
+ /* @__PURE__ */ m("div", { className: $, children: [
1497
+ /* @__PURE__ */ m("div", { className: L.connector, children: [
1498
+ /* @__PURE__ */ e("div", { className: L.line }),
1499
+ /* @__PURE__ */ e("div", { className: L.circleDot, children: /* @__PURE__ */ e("div", { className: L.innerDot }) }),
1500
+ /* @__PURE__ */ e("div", { className: L.line })
1493
1501
  ] }),
1494
- /* @__PURE__ */ e(w1, { expression: b ?? "", style: { marginTop: "25.5px" } }),
1495
- /* @__PURE__ */ e("div", { className: P.stepsWrapper, children: /* @__PURE__ */ e(
1496
- c1,
1502
+ /* @__PURE__ */ e(y1, { expression: b ?? "", style: { marginTop: "25.5px" } }),
1503
+ /* @__PURE__ */ e("div", { className: L.stepsWrapper, children: /* @__PURE__ */ e(
1504
+ a1,
1497
1505
  {
1498
- steps: k,
1499
- pathId: w,
1506
+ steps: B,
1507
+ pathId: x,
1500
1508
  iteratorEnabled: n,
1501
1509
  conditionsEnabled: o,
1502
1510
  onAddStep: i ?? g,
1503
1511
  onAddTrigger: r,
1504
- onAddCondition: c ?? g,
1505
- onAddLoop: a,
1512
+ onAddCondition: a ?? g,
1513
+ onAddLoop: l,
1506
1514
  onDeleteStep: d,
1507
1515
  onUpdateFilter: s ?? g,
1508
- onSelectStep: l ?? g,
1516
+ onSelectStep: c ?? g,
1509
1517
  isDescendent: !0
1510
1518
  }
1511
1519
  ) })
1512
1520
  ] })
1513
1521
  ] });
1514
- }, Ne = "_container_kielx_1", ke = {
1515
- container: Ne
1516
- }, $e = ({
1522
+ }, ke = "_container_kielx_1", Be = {
1523
+ container: ke
1524
+ }, Oe = ({
1517
1525
  process: t,
1518
1526
  iteratorEnabled: n = !0,
1519
1527
  conditionsEnabled: o = !0,
1520
1528
  addMultipleTriggers: i,
1521
1529
  onAddStep: r,
1522
- onAddTrigger: c,
1523
- onAddCondition: a,
1530
+ onAddTrigger: a,
1531
+ onAddCondition: l,
1524
1532
  onAddLoop: d,
1525
1533
  onResize: s,
1526
- onDeleteTrigger: l,
1534
+ onDeleteTrigger: c,
1527
1535
  onDeleteStep: u,
1528
- onUpdateFilter: w,
1529
- onSelectStep: v
1536
+ onUpdateFilter: x,
1537
+ onSelectStep: f
1530
1538
  }) => {
1531
- const [_, b] = $(0);
1532
- return /* @__PURE__ */ m("div", { className: ke.container, children: [
1539
+ const [v, b] = O(0);
1540
+ return /* @__PURE__ */ m("div", { className: Be.container, children: [
1533
1541
  /* @__PURE__ */ e(
1534
- Bt,
1542
+ Pt,
1535
1543
  {
1536
1544
  steps: t.triggers,
1537
1545
  onAddTrigger: i,
1538
- onUpdateFilter: w,
1539
- onDeleteTrigger: l,
1540
- onSelectStep: v,
1546
+ onUpdateFilter: x,
1547
+ onDeleteTrigger: c,
1548
+ onSelectStep: f,
1541
1549
  onCenterYUpdate: b
1542
1550
  }
1543
1551
  ),
1544
1552
  t.steps.length > 0 ? /* @__PURE__ */ e(
1545
- c1,
1553
+ a1,
1546
1554
  {
1547
1555
  steps: t.steps,
1548
- centerY: _,
1556
+ centerY: v,
1549
1557
  onAddStep: r,
1550
- onAddTrigger: c,
1551
- onAddCondition: a,
1558
+ onAddTrigger: a,
1559
+ onAddCondition: l,
1552
1560
  onAddLoop: d,
1553
1561
  onResize: s,
1554
1562
  onDeleteStep: u,
1555
- onUpdateFilter: w,
1556
- onSelectStep: v,
1563
+ onUpdateFilter: x,
1564
+ onSelectStep: f,
1557
1565
  iteratorEnabled: n,
1558
1566
  conditionsEnabled: o,
1559
1567
  isDescendent: !1,
@@ -1563,102 +1571,102 @@ const Lt = () => /* @__PURE__ */ m(
1563
1571
  A,
1564
1572
  {
1565
1573
  onAddStep: () => r(),
1566
- onAddTrigger: c,
1567
- onAddCondition: a,
1574
+ onAddTrigger: a,
1575
+ onAddCondition: l,
1568
1576
  onAddLoop: d,
1569
1577
  iteratorEnabled: n,
1570
1578
  conditionsEnabled: o,
1571
1579
  index: 0,
1572
1580
  style: {
1573
- height: i1,
1574
- marginTop: Math.max(0, _ - i1 / 2)
1581
+ height: s1,
1582
+ marginTop: Math.max(0, v - s1 / 2)
1575
1583
  }
1576
1584
  }
1577
1585
  )
1578
1586
  ] });
1579
1587
  };
1580
- class Be extends Error {
1588
+ class Pe extends Error {
1581
1589
  constructor(n) {
1582
1590
  super(n), this.name = "AddStepError";
1583
1591
  }
1584
1592
  }
1585
- const g1 = (t) => "condition" in t && typeof t.condition == "string", I1 = (t, n, o, i) => {
1593
+ const f1 = (t) => "condition" in t && typeof t.condition == "string", b1 = (t, n, o, i) => {
1586
1594
  const r = i === "prepend" ? n : n + 1;
1587
1595
  return [...t.slice(0, r), o, ...t.slice(r)];
1588
- }, a1 = (t, n, o, i) => {
1596
+ }, d1 = (t, n, o, i) => {
1589
1597
  for (let r = 0; r < t.length; r++) {
1590
1598
  if (t[r].localId === n)
1591
- return I1(t, r, i, o);
1592
- const c = t[r], a = c.steps?.length && a1(c.steps, n, o, i);
1593
- if (a)
1599
+ return b1(t, r, i, o);
1600
+ const a = t[r], l = a.steps?.length && d1(a.steps, n, o, i);
1601
+ if (l)
1594
1602
  return t.map(
1595
- (s, l) => l === r ? { ...s, steps: a } : s
1603
+ (s, c) => c === r ? { ...s, steps: l } : s
1596
1604
  );
1597
- const d = c.paths?.length && b1(c.paths, n, o, i);
1605
+ const d = a.paths?.length && N1(a.paths, n, o, i);
1598
1606
  if (d)
1599
1607
  return t.map(
1600
- (s, l) => l === r ? { ...s, paths: d } : s
1608
+ (s, c) => c === r ? { ...s, paths: d } : s
1601
1609
  );
1602
1610
  }
1603
1611
  return null;
1604
- }, Pe = (t, n, o) => {
1612
+ }, Me = (t, n, o) => {
1605
1613
  const i = t.steps ?? [], r = n === "prepend" ? [o, ...i] : [...i, o];
1606
1614
  return { ...t, steps: r };
1607
- }, b1 = (t, n, o, i) => {
1615
+ }, N1 = (t, n, o, i) => {
1608
1616
  for (let r = 0; r < t.length; r++) {
1609
- const c = t[r];
1610
- if (c.localId === n)
1611
- return g1(c) ? t.map(
1612
- (a, d) => d === r ? Pe(c, o, i) : a
1613
- ) : I1(t, r, i, o);
1614
- if (g1(c)) {
1615
- const a = c.steps?.length && a1(c.steps, n, o, i);
1616
- if (a)
1617
+ const a = t[r];
1618
+ if (a.localId === n)
1619
+ return f1(a) ? t.map(
1620
+ (l, d) => d === r ? Me(a, o, i) : l
1621
+ ) : b1(t, r, i, o);
1622
+ if (f1(a)) {
1623
+ const l = a.steps?.length && d1(a.steps, n, o, i);
1624
+ if (l)
1617
1625
  return t.map(
1618
- (s, l) => l === r ? { ...s, steps: a } : s
1626
+ (s, c) => c === r ? { ...s, steps: l } : s
1619
1627
  );
1620
- const d = c.paths?.length && b1(c.paths, n, o, i);
1628
+ const d = a.paths?.length && N1(a.paths, n, o, i);
1621
1629
  if (d)
1622
1630
  return t.map(
1623
- (s, l) => l === r ? { ...s, paths: d } : s
1631
+ (s, c) => c === r ? { ...s, paths: d } : s
1624
1632
  );
1625
1633
  }
1626
1634
  }
1627
1635
  return null;
1628
- }, Oe = (t, n, o, i) => {
1629
- const r = a1(t.steps, n, o, i);
1636
+ }, Ee = (t, n, o, i) => {
1637
+ const r = d1(t.steps, n, o, i);
1630
1638
  if (r)
1631
1639
  return { ...t, steps: r };
1632
- throw new Be(`Step or path with id "${n}" not found`);
1633
- }, N1 = (t, n) => ({
1640
+ throw new Pe(`Step or path with id "${n}" not found`);
1641
+ }, k1 = (t, n) => ({
1634
1642
  ...t,
1635
- ...t.steps != null && { steps: d1(t.steps, n) },
1643
+ ...t.steps != null && { steps: p1(t.steps, n) },
1636
1644
  ...t.paths != null && {
1637
- paths: t.paths.map((o) => N1(o, n))
1645
+ paths: t.paths.map((o) => k1(o, n))
1638
1646
  }
1639
- }), d1 = (t, n) => t.filter((o) => o.localId !== n).map((o) => ({
1647
+ }), p1 = (t, n) => t.filter((o) => o.localId !== n).map((o) => ({
1640
1648
  ...o,
1641
- ...o.steps != null && { steps: d1(o.steps, n) },
1649
+ ...o.steps != null && { steps: p1(o.steps, n) },
1642
1650
  ...o.paths != null && {
1643
- paths: o.paths.map((i) => N1(i, n))
1651
+ paths: o.paths.map((i) => k1(i, n))
1644
1652
  }
1645
- })), Ee = (t, n) => {
1646
- const o = d1(t.steps, n);
1653
+ })), je = (t, n) => {
1654
+ const o = p1(t.steps, n);
1647
1655
  return {
1648
1656
  ...t,
1649
1657
  steps: o
1650
1658
  };
1651
1659
  };
1652
1660
  export {
1653
- Be as AddStepError,
1654
- be as Iterator,
1661
+ Pe as AddStepError,
1662
+ Ne as Iterator,
1655
1663
  Q as Menu,
1656
- Te as MenuProvider,
1657
- $e as ProcessDiagram,
1658
- l1 as ProcessStep,
1659
- Bt as Trigger,
1660
- Oe as addStep,
1661
- Ee as deleteStep,
1662
- s1 as useMenuProvider
1664
+ $e as MenuProvider,
1665
+ Oe as ProcessDiagram,
1666
+ c1 as ProcessStep,
1667
+ Pt as Trigger,
1668
+ Ee as addStep,
1669
+ je as deleteStep,
1670
+ l1 as useMenuProvider
1663
1671
  };
1664
1672
  //# sourceMappingURL=index.mjs.map