@metadev/daga-react 0.0.4 → 1.0.0

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/index.mjs CHANGED
@@ -1,12 +1,12 @@
1
1
  import { jsx as w, jsxs as P, Fragment as Ni } from "react/jsx-runtime";
2
2
  import * as T from "d3";
3
3
  import { debounceTime as Pi, Subject as Be, merge as zi, map as Ri } from "rxjs";
4
- import { createContext as ci, useState as G, useContext as He, useRef as le, useEffect as Se, useMemo as Vi } from "react";
4
+ import { createContext as di, useState as G, useContext as He, useRef as le, useEffect as Se, useMemo as Vi } from "react";
5
5
  var v = /* @__PURE__ */ ((i) => (i.Bottom = "bottom", i.Left = "left", i.Right = "right", i.Top = "top", i))(v || {}), je = /* @__PURE__ */ ((i) => (i.BottomLeft = "bottom-left", i.BottomRight = "bottom-right", i.TopLeft = "top-left", i.TopRight = "top-right", i))(je || {}), $e = /* @__PURE__ */ ((i) => (i.Left = "left", i.Center = "center", i.Right = "right", i))($e || {}), Xe = /* @__PURE__ */ ((i) => (i.Top = "top", i.Center = "center", i.Bottom = "bottom", i))(Xe || {});
6
- const xe = (i) => [Math.round(i[0]), Math.round(i[1])], pe = (i, e, t) => e < t ? e <= i && i <= t : t <= i && i <= e, Qt = (i, e, t) => (i - e[0]) / (e[1] - e[0]) * (t[1] - t[0]) + t[0], We = (i, e, t, n, a) => [
7
- Qt(i[0], e, n),
8
- Qt(i[1], t, a)
9
- ], hi = (i, e) => ((i[0] - e[0]) ** 2 + (i[1] - e[1]) ** 2) ** 0.5, _i = (i, e) => (pe(
6
+ const xe = (i) => [Math.round(i[0]), Math.round(i[1])], pe = (i, e, t) => e < t ? e <= i && i <= t : t <= i && i <= e, Jt = (i, e, t) => (i - e[0]) / (e[1] - e[0]) * (t[1] - t[0]) + t[0], We = (i, e, t, n, a) => [
7
+ Jt(i[0], e, n),
8
+ Jt(i[1], t, a)
9
+ ], ci = (i, e) => ((i[0] - e[0]) ** 2 + (i[1] - e[1]) ** 2) ** 0.5, _i = (i, e) => (pe(
10
10
  i[0][0],
11
11
  e[0][0],
12
12
  e[1][0]
@@ -39,7 +39,7 @@ const xe = (i) => [Math.round(i[0]), Math.round(i[1])], pe = (i, e, t) => e < t
39
39
  i[1][1],
40
40
  i[0][1]
41
41
  ));
42
- var L = /* @__PURE__ */ ((i) => (i.Blur = "blur", i.Change = "change", i.Click = "click", i.ContextMenu = "contextmenu", i.DoubleClick = "dblclick", i.Focus = "focus", i.FocusIn = "focusin", i.FocusOut = "focusout", i.Input = "input", i.KeyDown = "keydown", i.KeyUp = "keyup", i.MouseDown = "mousedown", i.MouseEnter = "mouseenter", i.MouseLeave = "mouseleave", i.MouseMove = "mousemove", i.MouseOut = "mouseout", i.MouseOver = "mouseover", i.MouseUp = "mouseup", i.TouchStart = "touchstart", i.TouchEnd = "touchend", i.Wheel = "wheel", i))(L || {}), te = /* @__PURE__ */ ((i) => (i.Alt = "Alt", i.AltGraph = "AltGraph", i.ArrowDown = "ArrowDown", i.ArrowLeft = "ArrowLeft", i.ArrowRight = "ArrowRight", i.ArrowUp = "ArrowUp", i.Backspace = "Backspace", i.Control = "Control", i.Delete = "Delete", i.End = "End", i.Enter = "Enter", i.Escape = "Escape", i.Home = "Home", i.OS = "OS", i.PageDown = "PageDown", i.PageUp = "PageUp", i.Shift = "Shift", i.Tab = "Tab", i))(te || {}), x = /* @__PURE__ */ ((i) => (i.Drag = "drag", i.Start = "start", i.End = "end", i))(x || {}), ht = /* @__PURE__ */ ((i) => (i.Zoom = "zoom", i.Start = "start", i.End = "end", i))(ht || {}), ui = /* @__PURE__ */ ((i) => (i.Straight = "straight", i.Bezier = "bezier", i.Square = "square", i))(ui || {}), gi = /* @__PURE__ */ ((i) => (i.Solid = "solid", i.Dashed = "dashed", i.GappedDashes = "gapped-dashes", i.Dotted = "dotted", i))(gi || {});
42
+ var L = /* @__PURE__ */ ((i) => (i.Blur = "blur", i.Change = "change", i.Click = "click", i.ContextMenu = "contextmenu", i.DoubleClick = "dblclick", i.Focus = "focus", i.FocusIn = "focusin", i.FocusOut = "focusout", i.Input = "input", i.KeyDown = "keydown", i.KeyUp = "keyup", i.MouseDown = "mousedown", i.MouseEnter = "mouseenter", i.MouseLeave = "mouseleave", i.MouseMove = "mousemove", i.MouseOut = "mouseout", i.MouseOver = "mouseover", i.MouseUp = "mouseup", i.TouchStart = "touchstart", i.TouchEnd = "touchend", i.Wheel = "wheel", i))(L || {}), te = /* @__PURE__ */ ((i) => (i.Alt = "Alt", i.AltGraph = "AltGraph", i.ArrowDown = "ArrowDown", i.ArrowLeft = "ArrowLeft", i.ArrowRight = "ArrowRight", i.ArrowUp = "ArrowUp", i.Backspace = "Backspace", i.Control = "Control", i.Delete = "Delete", i.End = "End", i.Enter = "Enter", i.Escape = "Escape", i.Home = "Home", i.OS = "OS", i.PageDown = "PageDown", i.PageUp = "PageUp", i.Shift = "Shift", i.Tab = "Tab", i))(te || {}), x = /* @__PURE__ */ ((i) => (i.Drag = "drag", i.Start = "start", i.End = "end", i))(x || {}), ht = /* @__PURE__ */ ((i) => (i.Zoom = "zoom", i.Start = "start", i.End = "end", i))(ht || {}), hi = /* @__PURE__ */ ((i) => (i.Straight = "straight", i.Bezier = "bezier", i.Square = "square", i))(hi || {}), ui = /* @__PURE__ */ ((i) => (i.Solid = "solid", i.Dashed = "dashed", i.GappedDashes = "gapped-dashes", i.Dotted = "dotted", i))(ui || {});
43
43
  const Oi = 20, Di = (i, e, t, n, a) => {
44
44
  if (typeof i == "function")
45
45
  return i(
@@ -199,7 +199,7 @@ const Oi = 20, Di = (i, e, t, n, a) => {
199
199
  }
200
200
  return l;
201
201
  }
202
- }, ei = (i, e) => {
202
+ }, Qt = (i, e) => {
203
203
  switch (i) {
204
204
  case "dotted":
205
205
  return `${e}`;
@@ -215,13 +215,13 @@ const Oi = 20, Di = (i, e, t, n, a) => {
215
215
  const t = i.indexOf(e);
216
216
  return t >= 0 && i.splice(t, 1), i;
217
217
  };
218
- var Ze = /* @__PURE__ */ ((i) => (i.Ellipse = "ellipse", i.Empty = "empty", i.Folder = "folder", i.Hexagon = "hexagon", i.Octagon = "octagon", i.Pill = "pill", i.Rectangle = "rectangle", i.Rhombus = "rhombus", i.RoundedRectangle = "rounded-rectangle", i.StickyNote = "sticky-note", i))(Ze || {});
218
+ var Ke = /* @__PURE__ */ ((i) => (i.Ellipse = "ellipse", i.Empty = "empty", i.Folder = "folder", i.Hexagon = "hexagon", i.Octagon = "octagon", i.Pill = "pill", i.Rectangle = "rectangle", i.Rhombus = "rhombus", i.RoundedRectangle = "rounded-rectangle", i.StickyNote = "sticky-note", i))(Ke || {});
219
219
  const ut = (i, e, t, n, a) => {
220
220
  if (typeof i == "function")
221
221
  return i(e, t, n, a);
222
222
  switch (i) {
223
223
  case "ellipse":
224
- return fi(e, t, n, a);
224
+ return gi(e, t, n, a);
225
225
  case "empty":
226
226
  return Hi();
227
227
  case "folder":
@@ -233,7 +233,7 @@ const ut = (i, e, t, n, a) => {
233
233
  case "pill":
234
234
  return Ye(e, t, n, a);
235
235
  case "rectangle":
236
- return ti(e, t, n, a);
236
+ return ei(e, t, n, a);
237
237
  case "rhombus":
238
238
  return Ui(e, t, n, a);
239
239
  case "rounded-rectangle":
@@ -241,40 +241,40 @@ const ut = (i, e, t, n, a) => {
241
241
  case "sticky-note":
242
242
  return Yi(e, t, n, a);
243
243
  default:
244
- return ti(e, t, n, a);
244
+ return ei(e, t, n, a);
245
245
  }
246
- }, fi = (i, e, t, n) => `M ${i + t / 2} ${e} A ${t / 2} ${n / 2} 0 0 0 ${i + t / 2} ${e + n} A ${t / 2} ${n / 2} 0 1 0 ${i + t / 2} ${e} Z`, Hi = () => "Z", Gi = (i, e, t, n) => `M ${i} ${e} L ${i + t / 3} ${e} L ${i + t / 2} ${e + n / 6} L ${i + t} ${e + n / 6} L ${i + t} ${e + n} L ${i} ${e + n} Z`, Fi = (i, e, t, n) => `M ${i + t / 4} ${e} L ${i + 3 * t / 4} ${e} L ${i + t} ${e + n / 2} L ${i + 3 * t / 4} ${e + n} L ${i + t / 4} ${e + n} L ${i} ${e + n / 2} Z`, Bi = (i, e, t, n) => `M ${i + t / 4} ${e} L ${i + 3 * t / 4} ${e} L ${i + t} ${e + n / 4} L ${i + t} ${e + 3 * n / 4} L ${i + 3 * t / 4} ${e + n} L ${i + t / 4} ${e + n} L ${i} ${e + 3 * n / 4} L ${i} ${e + n / 4} L ${i + t / 4} ${e} Z`, Ye = (i, e, t, n) => n < t ? `M ${i + n / 2} ${e} L ${i + t - n / 2} ${e} A ${n / 2} ${n / 2} 0 0 1 ${i + t} ${e + n / 2} A ${n / 2} ${n / 2} 0 0 1 ${i + t - n / 2} ${e + n} L ${i + n / 2} ${e + n} A ${n / 2} ${n / 2} 0 0 1 ${i} ${e + n / 2} A ${n / 2} ${n / 2} 0 0 1 ${i + n / 2} ${e} Z` : n > t ? `M ${i} ${e + t / 2} L ${i} ${e + n - t / 2} A ${t / 2} ${t / 2} 0 0 0 ${i + t / 2} ${e + n} A ${t / 2} ${t / 2} 0 0 0 ${i + t} ${e + n - t / 2} L ${i + t} ${e + t / 2} A ${t / 2} ${t / 2} 0 0 0 ${i + t / 2} ${e} A ${t / 2} ${t / 2} 0 0 0 ${i} ${e + t / 2} Z` : fi(i, e, t, n), ti = (i, e, t, n) => `M ${i} ${e} L ${i + t} ${e} L ${i + t} ${e + n} L ${i} ${e + n} Z`, Ui = (i, e, t, n) => `M ${i + t / 2} ${e} L ${i + t} ${e + n / 2} L ${i + t / 2} ${e + n} L ${i} ${e + n / 2} Z`, ji = (i, e, t, n) => `M ${i + t / 4} ${e} L ${i + 3 * t / 4} ${e} A ${t / 4} ${n / 4} 0 0 1 ${i + t} ${e + n / 4} L ${i + t} ${e + 3 * n / 4} A ${t / 4} ${n / 4} 0 0 1 ${i + 3 * t / 4} ${e + n} L ${i + t / 4} ${e + n} A ${t / 4} ${n / 4} 0 0 1 ${i} ${e + 3 * n / 4} L ${i} ${e + n / 4} A ${t / 4} ${n / 4} 0 0 1 ${i + t / 4} ${e} Z`, Yi = (i, e, t, n) => `M ${i} ${e} L ${i + 3 * t / 4} ${e} L ${i + 3 * t / 4} ${e + n / 4} L ${i + 3 * t / 4} ${e} L ${i + t} ${e + n / 4} L ${i + 3 * t / 4} ${e + n / 4} L ${i + t} ${e + n / 4} L ${i + t} ${e + n} L ${i} ${e + n} Z`;
246
+ }, gi = (i, e, t, n) => `M ${i + t / 2} ${e} A ${t / 2} ${n / 2} 0 0 0 ${i + t / 2} ${e + n} A ${t / 2} ${n / 2} 0 1 0 ${i + t / 2} ${e} Z`, Hi = () => "Z", Gi = (i, e, t, n) => `M ${i} ${e} L ${i + t / 3} ${e} L ${i + t / 2} ${e + n / 6} L ${i + t} ${e + n / 6} L ${i + t} ${e + n} L ${i} ${e + n} Z`, Fi = (i, e, t, n) => `M ${i + t / 4} ${e} L ${i + 3 * t / 4} ${e} L ${i + t} ${e + n / 2} L ${i + 3 * t / 4} ${e + n} L ${i + t / 4} ${e + n} L ${i} ${e + n / 2} Z`, Bi = (i, e, t, n) => `M ${i + t / 4} ${e} L ${i + 3 * t / 4} ${e} L ${i + t} ${e + n / 4} L ${i + t} ${e + 3 * n / 4} L ${i + 3 * t / 4} ${e + n} L ${i + t / 4} ${e + n} L ${i} ${e + 3 * n / 4} L ${i} ${e + n / 4} L ${i + t / 4} ${e} Z`, Ye = (i, e, t, n) => n < t ? `M ${i + n / 2} ${e} L ${i + t - n / 2} ${e} A ${n / 2} ${n / 2} 0 0 1 ${i + t} ${e + n / 2} A ${n / 2} ${n / 2} 0 0 1 ${i + t - n / 2} ${e + n} L ${i + n / 2} ${e + n} A ${n / 2} ${n / 2} 0 0 1 ${i} ${e + n / 2} A ${n / 2} ${n / 2} 0 0 1 ${i + n / 2} ${e} Z` : n > t ? `M ${i} ${e + t / 2} L ${i} ${e + n - t / 2} A ${t / 2} ${t / 2} 0 0 0 ${i + t / 2} ${e + n} A ${t / 2} ${t / 2} 0 0 0 ${i + t} ${e + n - t / 2} L ${i + t} ${e + t / 2} A ${t / 2} ${t / 2} 0 0 0 ${i + t / 2} ${e} A ${t / 2} ${t / 2} 0 0 0 ${i} ${e + t / 2} Z` : gi(i, e, t, n), ei = (i, e, t, n) => `M ${i} ${e} L ${i + t} ${e} L ${i + t} ${e + n} L ${i} ${e + n} Z`, Ui = (i, e, t, n) => `M ${i + t / 2} ${e} L ${i + t} ${e + n / 2} L ${i + t / 2} ${e + n} L ${i} ${e + n / 2} Z`, ji = (i, e, t, n) => `M ${i + t / 4} ${e} L ${i + 3 * t / 4} ${e} A ${t / 4} ${n / 4} 0 0 1 ${i + t} ${e + n / 4} L ${i + t} ${e + 3 * n / 4} A ${t / 4} ${n / 4} 0 0 1 ${i + 3 * t / 4} ${e + n} L ${i + t / 4} ${e + n} A ${t / 4} ${n / 4} 0 0 1 ${i} ${e + 3 * n / 4} L ${i} ${e + n / 4} A ${t / 4} ${n / 4} 0 0 1 ${i + t / 4} ${e} Z`, Yi = (i, e, t, n) => `M ${i} ${e} L ${i + 3 * t / 4} ${e} L ${i + 3 * t / 4} ${e + n / 4} L ${i + 3 * t / 4} ${e} L ${i + t} ${e + n / 4} L ${i + 3 * t / 4} ${e + n / 4} L ${i + t} ${e + n / 4} L ${i + t} ${e + n} L ${i} ${e + n} Z`;
247
247
  var $ = /* @__PURE__ */ ((i) => (i.AllScroll = "all-scroll", i.Auto = "auto", i.Crosshair = "crosshair", i.EWResize = "ew-resize", i.Grab = "grab", i.Grabbing = "grabbing", i.Move = "move", i.NoDrop = "no-drop", i.NSResize = "ns-resize", i.NotAllowed = "not-allowed", i.ZoomIn = "zoom-in", i.ZoomOut = "zoom-out", i))($ || {});
248
248
  const Xi = (i) => Math.max(...i.split(`
249
249
  `).map((e) => e.length)), Wi = (i) => {
250
250
  var e;
251
251
  return ((e = i.match(/\n/g)) == null ? void 0 : e.length) || 0;
252
- }, Z = [];
252
+ }, q = [];
253
253
  for (let i = 0; i < 256; ++i)
254
- Z.push((i + 256).toString(16).slice(1));
255
- function Ki(i, e = 0) {
256
- return (Z[i[e + 0]] + Z[i[e + 1]] + Z[i[e + 2]] + Z[i[e + 3]] + "-" + Z[i[e + 4]] + Z[i[e + 5]] + "-" + Z[i[e + 6]] + Z[i[e + 7]] + "-" + Z[i[e + 8]] + Z[i[e + 9]] + "-" + Z[i[e + 10]] + Z[i[e + 11]] + Z[i[e + 12]] + Z[i[e + 13]] + Z[i[e + 14]] + Z[i[e + 15]]).toLowerCase();
254
+ q.push((i + 256).toString(16).slice(1));
255
+ function Zi(i, e = 0) {
256
+ return (q[i[e + 0]] + q[i[e + 1]] + q[i[e + 2]] + q[i[e + 3]] + "-" + q[i[e + 4]] + q[i[e + 5]] + "-" + q[i[e + 6]] + q[i[e + 7]] + "-" + q[i[e + 8]] + q[i[e + 9]] + "-" + q[i[e + 10]] + q[i[e + 11]] + q[i[e + 12]] + q[i[e + 13]] + q[i[e + 14]] + q[i[e + 15]]).toLowerCase();
257
257
  }
258
258
  let nt;
259
- const Zi = new Uint8Array(16);
259
+ const Ki = new Uint8Array(16);
260
260
  function qi() {
261
261
  if (!nt) {
262
262
  if (typeof crypto > "u" || !crypto.getRandomValues)
263
263
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
264
264
  nt = crypto.getRandomValues.bind(crypto);
265
265
  }
266
- return nt(Zi);
266
+ return nt(Ki);
267
267
  }
268
- const Ji = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), ii = { randomUUID: Ji };
269
- function oi(i, e, t) {
268
+ const Ji = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), ti = { randomUUID: Ji };
269
+ function ii(i, e, t) {
270
270
  var a;
271
- if (ii.randomUUID && !i)
272
- return ii.randomUUID();
271
+ if (ti.randomUUID && !i)
272
+ return ti.randomUUID();
273
273
  i = i || {};
274
274
  const n = i.random ?? ((a = i.rng) == null ? void 0 : a.call(i)) ?? qi();
275
275
  if (n.length < 16)
276
276
  throw new Error("Random bytes length must be >= 16");
277
- return n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128, Ki(n);
277
+ return n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128, Zi(n);
278
278
  }
279
279
  const oe = (i) => {
280
280
  const { selected: e, highlighted: t, ...n } = i, a = n, l = {
@@ -613,7 +613,7 @@ class ke {
613
613
  */
614
614
  hasValue(e) {
615
615
  const t = this.getValue(e);
616
- return !ni(t);
616
+ return !oi(t);
617
617
  }
618
618
  /**
619
619
  * Checks if the value under the key is not empty or the default value.
@@ -623,7 +623,7 @@ class ke {
623
623
  */
624
624
  hasSetValue(e) {
625
625
  const t = this.getValue(e), n = this.propertySet.getProperty(e);
626
- return n && n.type === "object" ? this.getSubValueSet(e).hasAnySetValue() : !ni(t) && !Ae(t, n == null ? void 0 : n.defaultValue);
626
+ return n && n.type === "object" ? this.getSubValueSet(e).hasAnySetValue() : !oi(t) && !Ae(t, n == null ? void 0 : n.defaultValue);
627
627
  }
628
628
  /**
629
629
  * Checks if any of the values in the set are not empty or the default value.
@@ -747,31 +747,28 @@ class ke {
747
747
  this.hiddenProperties.includes(e) || (this.hiddenProperties.push(e), j(this.displayedProperties, e));
748
748
  }
749
749
  }
750
- const ni = (i) => i == null || i === "" || i instanceof Array && i.length === 0 || i instanceof Object && Object.keys(i).length === 0, Ae = (i, e) => i === e || JSON.stringify(i) === JSON.stringify(e), mi = (i, e) => {
751
- const t = {}, n = {}, a = [];
752
- for (const l in i)
753
- a.push(l);
754
- for (const l in e)
755
- l in i || a.push(l);
756
- for (const l of a)
757
- if (gt(i[l]) && gt(e[l])) {
758
- const o = mi(
750
+ const oi = (i) => i == null || i === "" || i instanceof Array && i.length === 0 || i instanceof Object && Object.keys(i).length === 0, Ae = (i, e) => i === e || JSON.stringify(i) === JSON.stringify(e), fi = (i, e, t) => {
751
+ const n = {}, a = {};
752
+ for (const l in t.propertySet.propertyMap)
753
+ if (t.propertySet.propertyMap[l].type === "object") {
754
+ const o = fi(
759
755
  i[l],
760
- e[l]
756
+ e[l],
757
+ t.getSubValueSet(l)
761
758
  );
762
- Object.keys(o[0]).length > 0 && Object.keys(o[1]).length > 0 && (t[l] = o[0], n[l] = o[1]);
759
+ Object.keys(o[0]).length > 0 && Object.keys(o[1]).length > 0 && (n[l] = o[0], a[l] = o[1]);
763
760
  } else
764
- Ae(i[l], e[l]) || (t[l] = i[l], n[l] = e[l]);
765
- return [t, n];
766
- }, gt = (i) => i != null && i.constructor === Object, eo = {
761
+ Ae(i[l], e[l]) || (n[l] = i[l], a[l] = e[l]);
762
+ return [n, a];
763
+ }, eo = (i) => i != null && i.constructor === Object, to = {
767
764
  name: "",
768
765
  label: null,
769
766
  look: {
770
767
  lookType: "connection-look",
771
768
  color: "#000000",
772
769
  thickness: 1,
773
- shape: ui.Straight,
774
- style: gi.Solid,
770
+ shape: hi.Straight,
771
+ style: ui.Solid,
775
772
  selected: {
776
773
  color: "#AA00AA"
777
774
  },
@@ -785,10 +782,10 @@ const ni = (i) => i == null || i === "" || i instanceof Array && i.length === 0
785
782
  endTypes: [],
786
783
  properties: []
787
784
  };
788
- class pi {
785
+ class mi {
789
786
  constructor(e) {
790
787
  const t = {
791
- ...eo,
788
+ ...to,
792
789
  ...e
793
790
  };
794
791
  this.id = t.id, this.name = t.name, this.label = t.label;
@@ -1026,7 +1023,7 @@ class ce extends Le {
1026
1023
  return this.start ? this.end ? Math.min(this.start.getPriority(), this.end.getPriority()) : this.start.getPriority() : this.end ? this.end.getPriority() : Pe;
1027
1024
  }
1028
1025
  }
1029
- class to extends fe {
1026
+ class io extends fe {
1030
1027
  /**
1031
1028
  * Instance a set of connections for the given model. This method is used internally.
1032
1029
  * @private
@@ -1045,7 +1042,7 @@ class to extends fe {
1045
1042
  */
1046
1043
  new(e, t, n, a) {
1047
1044
  let l;
1048
- if (e instanceof pi)
1045
+ if (e instanceof mi)
1049
1046
  l = e;
1050
1047
  else {
1051
1048
  const s = this.types.get(e);
@@ -1128,7 +1125,7 @@ class ue extends Le {
1128
1125
  return ((e = this.rootElement) == null ? void 0 : e.getPriority()) || Pe;
1129
1126
  }
1130
1127
  }
1131
- class io extends fe {
1128
+ class oo extends fe {
1132
1129
  /**
1133
1130
  * Instance a set of fields for the given model. This method is used internally.
1134
1131
  * @private
@@ -1165,26 +1162,26 @@ class io extends fe {
1165
1162
  t && (((n = t.rootElement) == null ? void 0 : n.label) !== void 0 && t.rootElement.label === t && (t.rootElement.label = void 0), super.remove(e), t.updateInView());
1166
1163
  }
1167
1164
  }
1168
- const se = (i) => (i == null ? void 0 : i.margin) === null || (i == null ? void 0 : i.margin) === void 0 ? V.margin : typeof i.margin == "number" ? i.margin : i.margin.length === 0 ? V.margin : i.margin.length === 1 || i.margin.length === 2 ? i.margin[0] : (i.margin.length === 3, i.margin[2]), J = (i) => (i == null ? void 0 : i.margin) === null || (i == null ? void 0 : i.margin) === void 0 ? V.margin : typeof i.margin == "number" ? i.margin : i.margin.length === 0 ? V.margin : i.margin.length === 1 ? i.margin[0] : i.margin.length === 2 || i.margin.length === 3 ? i.margin[1] : i.margin[3], he = (i) => (i == null ? void 0 : i.margin) === null || (i == null ? void 0 : i.margin) === void 0 ? V.margin : typeof i.margin == "number" ? i.margin : i.margin.length === 0 ? V.margin : i.margin.length === 1 ? i.margin[0] : (i.margin.length === 2 || i.margin.length === 3, i.margin[1]), W = (i) => (i == null ? void 0 : i.margin) === null || (i == null ? void 0 : i.margin) === void 0 ? V.margin : typeof i.margin == "number" ? i.margin : i.margin.length === 0 ? V.margin : (i.margin.length === 1 || i.margin.length === 2 || i.margin.length === 3, i.margin[0]), ze = (i) => (i == null ? void 0 : i.padding) === null || (i == null ? void 0 : i.padding) === void 0 ? V.padding : typeof i.padding == "number" ? i.padding : i.padding.length === 0 ? V.padding : i.padding.length === 1 || i.padding.length === 2 ? i.padding[0] : (i.padding.length === 3, i.padding[2]), Re = (i) => (i == null ? void 0 : i.padding) === null || (i == null ? void 0 : i.padding) === void 0 ? V.padding : typeof i.padding == "number" ? i.padding : i.padding.length === 0 ? V.padding : i.padding.length === 1 ? i.padding[0] : i.padding.length === 2 || i.padding.length === 3 ? i.padding[1] : i.padding[3], Ve = (i) => (i == null ? void 0 : i.padding) === null || (i == null ? void 0 : i.padding) === void 0 ? V.padding : typeof i.padding == "number" ? i.padding : i.padding.length === 0 ? V.padding : i.padding.length === 1 ? i.padding[0] : (i.padding.length === 2 || i.padding.length === 3, i.padding[1]), _e = (i) => (i == null ? void 0 : i.padding) === null || (i == null ? void 0 : i.padding) === void 0 ? V.padding : typeof i.padding == "number" ? i.padding : i.padding.length === 0 ? V.padding : (i.padding.length === 1 || i.padding.length === 2 || i.padding.length === 3, i.padding[0]), si = 1, ri = 1, oo = 1, no = 1;
1169
- class so {
1165
+ const se = (i) => (i == null ? void 0 : i.margin) === null || (i == null ? void 0 : i.margin) === void 0 ? V.margin : typeof i.margin == "number" ? i.margin : i.margin.length === 0 ? V.margin : i.margin.length === 1 || i.margin.length === 2 ? i.margin[0] : (i.margin.length === 3, i.margin[2]), Q = (i) => (i == null ? void 0 : i.margin) === null || (i == null ? void 0 : i.margin) === void 0 ? V.margin : typeof i.margin == "number" ? i.margin : i.margin.length === 0 ? V.margin : i.margin.length === 1 ? i.margin[0] : i.margin.length === 2 || i.margin.length === 3 ? i.margin[1] : i.margin[3], he = (i) => (i == null ? void 0 : i.margin) === null || (i == null ? void 0 : i.margin) === void 0 ? V.margin : typeof i.margin == "number" ? i.margin : i.margin.length === 0 ? V.margin : i.margin.length === 1 ? i.margin[0] : (i.margin.length === 2 || i.margin.length === 3, i.margin[1]), W = (i) => (i == null ? void 0 : i.margin) === null || (i == null ? void 0 : i.margin) === void 0 ? V.margin : typeof i.margin == "number" ? i.margin : i.margin.length === 0 ? V.margin : (i.margin.length === 1 || i.margin.length === 2 || i.margin.length === 3, i.margin[0]), ze = (i) => (i == null ? void 0 : i.padding) === null || (i == null ? void 0 : i.padding) === void 0 ? V.padding : typeof i.padding == "number" ? i.padding : i.padding.length === 0 ? V.padding : i.padding.length === 1 || i.padding.length === 2 ? i.padding[0] : (i.padding.length === 3, i.padding[2]), Re = (i) => (i == null ? void 0 : i.padding) === null || (i == null ? void 0 : i.padding) === void 0 ? V.padding : typeof i.padding == "number" ? i.padding : i.padding.length === 0 ? V.padding : i.padding.length === 1 ? i.padding[0] : i.padding.length === 2 || i.padding.length === 3 ? i.padding[1] : i.padding[3], Ve = (i) => (i == null ? void 0 : i.padding) === null || (i == null ? void 0 : i.padding) === void 0 ? V.padding : typeof i.padding == "number" ? i.padding : i.padding.length === 0 ? V.padding : i.padding.length === 1 ? i.padding[0] : (i.padding.length === 2 || i.padding.length === 3, i.padding[1]), _e = (i) => (i == null ? void 0 : i.padding) === null || (i == null ? void 0 : i.padding) === void 0 ? V.padding : typeof i.padding == "number" ? i.padding : i.padding.length === 0 ? V.padding : (i.padding.length === 1 || i.padding.length === 2 || i.padding.length === 3, i.padding[0]), ni = 1, si = 1, no = 1, so = 1;
1166
+ class ro {
1170
1167
  constructor(e) {
1171
1168
  this.margin = e.margin || 0, this.defaultWidths = e.defaultWidths || null, this.defaultHeights = e.defaultHeights || null, this.minWidths = e.minWidths || null, this.minHeights = e.minHeights || null, this.sections = [];
1172
1169
  for (const t of e.sections) {
1173
1170
  const n = [];
1174
1171
  this.sections.push(n);
1175
1172
  for (const a of t)
1176
- n.push(new ro(a));
1173
+ n.push(new ao(a));
1177
1174
  }
1178
1175
  }
1179
1176
  }
1180
- class ro {
1177
+ class ao {
1181
1178
  constructor(e) {
1182
1179
  this.label = e.label || null, this.ports = e.ports || [], this.priority = e.priority || Pe;
1183
- const t = oe(e.look || yi);
1180
+ const t = oe(e.look || pi);
1184
1181
  this.defaultLook = t.defaultLook, this.selectedLook = t.selectedLook, this.highlightedLook = t.highlightedLook, this.selectedAndHighlightedLook = t.selectedAndHighlightedLook;
1185
1182
  }
1186
1183
  }
1187
- class q extends Le {
1184
+ class J extends Le {
1188
1185
  constructor(e, t, n, a, l, o, s, r) {
1189
1186
  if (e.sections.get(r) !== void 0)
1190
1187
  throw new Error(`DiagramSection with id "${r}" already exists`);
@@ -1256,11 +1253,11 @@ class q extends Le {
1256
1253
  }
1257
1254
  getMinWidth() {
1258
1255
  var e, t, n, a;
1259
- return ((a = (n = (t = (e = this.node) == null ? void 0 : e.type) == null ? void 0 : t.sectionGrid) == null ? void 0 : n.minWidths) == null ? void 0 : a[this.indexXInNode]) || oo;
1256
+ return ((a = (n = (t = (e = this.node) == null ? void 0 : e.type) == null ? void 0 : t.sectionGrid) == null ? void 0 : n.minWidths) == null ? void 0 : a[this.indexXInNode]) || no;
1260
1257
  }
1261
1258
  getMinHeight() {
1262
1259
  var e, t, n, a;
1263
- return ((a = (n = (t = (e = this.node) == null ? void 0 : e.type) == null ? void 0 : t.sectionGrid) == null ? void 0 : n.minHeights) == null ? void 0 : a[this.indexYInNode]) || no;
1260
+ return ((a = (n = (t = (e = this.node) == null ? void 0 : e.type) == null ? void 0 : t.sectionGrid) == null ? void 0 : n.minHeights) == null ? void 0 : a[this.indexYInNode]) || so;
1264
1261
  }
1265
1262
  getPriority() {
1266
1263
  var e, t, n, a, l, o;
@@ -1394,9 +1391,9 @@ class q extends Le {
1394
1391
  );
1395
1392
  const o = this.type;
1396
1393
  this.label && (this.label.coords = [
1397
- this.coords[0] + J(o == null ? void 0 : o.label),
1394
+ this.coords[0] + Q(o == null ? void 0 : o.label),
1398
1395
  this.coords[1] + W(o == null ? void 0 : o.label)
1399
- ], this.label.width = this.width - J(o == null ? void 0 : o.label) - he(o == null ? void 0 : o.label), this.label.height = this.height - W(o == null ? void 0 : o.label) - se(o == null ? void 0 : o.label), this.label.updateInView());
1396
+ ], this.label.width = this.width - Q(o == null ? void 0 : o.label) - he(o == null ? void 0 : o.label), this.label.height = this.height - W(o == null ? void 0 : o.label) - se(o == null ? void 0 : o.label), this.label.updateInView());
1400
1397
  for (const s of this.decorators)
1401
1398
  s.move(
1402
1399
  We(
@@ -1410,7 +1407,7 @@ class q extends Le {
1410
1407
  this.getConnections().forEach((s) => s.tighten()), this.updateInView();
1411
1408
  }
1412
1409
  }
1413
- class ao extends fe {
1410
+ class lo extends fe {
1414
1411
  /**
1415
1412
  * Instance a set of sections for the given model. This method is used internally.
1416
1413
  * @private
@@ -1424,7 +1421,7 @@ class ao extends fe {
1424
1421
  */
1425
1422
  new(e, t, n, a, l, o, s) {
1426
1423
  var h, f, y, g, m, u, b, k, p, S;
1427
- const r = new q(
1424
+ const r = new J(
1428
1425
  this.model,
1429
1426
  e,
1430
1427
  t,
@@ -1502,14 +1499,14 @@ class ao extends fe {
1502
1499
  this.model.fields.new(
1503
1500
  r,
1504
1501
  [
1505
- r.coords[0] + J(C),
1502
+ r.coords[0] + Q(C),
1506
1503
  r.coords[1] + W(C)
1507
1504
  ],
1508
1505
  C.fontSize,
1509
1506
  C.fontFamily,
1510
1507
  C.color,
1511
1508
  C.selectedColor,
1512
- r.width - J(C) - he(C),
1509
+ r.width - Q(C) - he(C),
1513
1510
  r.height - W(C) - se(C),
1514
1511
  C.horizontalAlign,
1515
1512
  C.verticalAlign,
@@ -1529,9 +1526,9 @@ class ao extends fe {
1529
1526
  }
1530
1527
  }
1531
1528
  }
1532
- const yi = {
1529
+ const pi = {
1533
1530
  lookType: "shaped-look",
1534
- shape: Ze.Rectangle,
1531
+ shape: Ke.Rectangle,
1535
1532
  fillColor: "#FFFFFF",
1536
1533
  borderColor: "#000000",
1537
1534
  borderThickness: 1,
@@ -1554,20 +1551,20 @@ const yi = {
1554
1551
  label: null,
1555
1552
  ports: [],
1556
1553
  sectionGrid: null,
1557
- look: yi,
1554
+ look: pi,
1558
1555
  isUnique: !1,
1559
1556
  canBeParentless: !0,
1560
1557
  childrenTypes: [],
1561
1558
  priority: Pe,
1562
1559
  properties: []
1563
1560
  };
1564
- class bi {
1561
+ class yi {
1565
1562
  constructor(e) {
1566
1563
  const t = {
1567
1564
  ...ge,
1568
1565
  ...e
1569
1566
  };
1570
- this.id = t.id, this.name = t.name, this.defaultWidth = t.defaultWidth, this.defaultHeight = t.defaultHeight, this.minWidth = t.minWidth, this.minHeight = t.minHeight, this.resizableX = t.resizableX, this.resizableY = t.resizableY, this.bottomPadding = co(t), this.leftPadding = ho(t), this.rightPadding = uo(t), this.topPadding = go(t), this.label = t.label, this.ports = t.ports, this.sectionGrid = t.sectionGrid ? new so(t.sectionGrid) : null;
1567
+ this.id = t.id, this.name = t.name, this.defaultWidth = t.defaultWidth, this.defaultHeight = t.defaultHeight, this.minWidth = t.minWidth, this.minHeight = t.minHeight, this.resizableX = t.resizableX, this.resizableY = t.resizableY, this.bottomPadding = ho(t), this.leftPadding = uo(t), this.rightPadding = go(t), this.topPadding = fo(t), this.label = t.label, this.ports = t.ports, this.sectionGrid = t.sectionGrid ? new ro(t.sectionGrid) : null;
1571
1568
  const n = oe(t.look);
1572
1569
  this.defaultLook = n.defaultLook, this.selectedLook = n.selectedLook, this.highlightedLook = n.highlightedLook, this.selectedAndHighlightedLook = n.selectedAndHighlightedLook, this.isUnique = t.isUnique, this.canBeParentless = t.canBeParentless, this.childrenTypes = t.childrenTypes, this.priority = t.priority, this.propertySet = new Je((e == null ? void 0 : e.properties) || []);
1573
1570
  }
@@ -1968,9 +1965,9 @@ class _ extends Le {
1968
1965
  )
1969
1966
  );
1970
1967
  this.label && (this.label.coords = [
1971
- this.coords[0] + J(this.type.label),
1968
+ this.coords[0] + Q(this.type.label),
1972
1969
  this.coords[1] + W(this.type.label)
1973
- ], this.label.width = this.width - J(this.type.label) - he(this.type.label), this.label.height = this.height - W(this.type.label) - se(this.type.label), this.label.updateInView());
1970
+ ], this.label.width = this.width - Q(this.type.label) - he(this.type.label), this.label.height = this.height - W(this.type.label) - se(this.type.label), this.label.updateInView());
1974
1971
  for (const o of this.decorators)
1975
1972
  o.move(
1976
1973
  We(
@@ -1984,7 +1981,7 @@ class _ extends Le {
1984
1981
  this.getConnections().forEach((o) => o.tighten()), this.updateInView();
1985
1982
  }
1986
1983
  }
1987
- class lo extends fe {
1984
+ class co extends fe {
1988
1985
  /**
1989
1986
  * Instance a set of nodes for the given model. This method is used internally.
1990
1987
  * @private
@@ -2003,7 +2000,7 @@ class lo extends fe {
2003
2000
  new(e, t, n) {
2004
2001
  var o, s, r, d, c, h, f;
2005
2002
  let a;
2006
- if (e instanceof bi)
2003
+ if (e instanceof yi)
2007
2004
  a = e;
2008
2005
  else {
2009
2006
  const y = this.types.get(e);
@@ -2022,11 +2019,11 @@ class lo extends fe {
2022
2019
  u,
2023
2020
  g,
2024
2021
  [m, y],
2025
- ((o = a.sectionGrid.defaultWidths) == null ? void 0 : o[u]) || si,
2026
- ((s = a.sectionGrid.defaultHeights) == null ? void 0 : s[g]) || ri,
2022
+ ((o = a.sectionGrid.defaultWidths) == null ? void 0 : o[u]) || ni,
2023
+ ((s = a.sectionGrid.defaultHeights) == null ? void 0 : s[g]) || si,
2027
2024
  `${l.id}_${g}_${u}`
2028
- ), m += (((r = a.sectionGrid.defaultWidths) == null ? void 0 : r[u]) || si) + (a.sectionGrid.margin || 0);
2029
- y += (((d = a.sectionGrid.defaultHeights) == null ? void 0 : d[g]) || ri) + (a.sectionGrid.margin || 0);
2025
+ ), m += (((r = a.sectionGrid.defaultWidths) == null ? void 0 : r[u]) || ni) + (a.sectionGrid.margin || 0);
2026
+ y += (((d = a.sectionGrid.defaultHeights) == null ? void 0 : d[g]) || si) + (a.sectionGrid.margin || 0);
2030
2027
  }
2031
2028
  }
2032
2029
  if (a.ports.length > 0)
@@ -2094,14 +2091,14 @@ class lo extends fe {
2094
2091
  this.model.fields.new(
2095
2092
  l,
2096
2093
  [
2097
- l.coords[0] + J(y),
2094
+ l.coords[0] + Q(y),
2098
2095
  l.coords[1] + W(y)
2099
2096
  ],
2100
2097
  y.fontSize,
2101
2098
  y.fontFamily,
2102
2099
  y.color,
2103
2100
  y.selectedColor,
2104
- l.width - J(y) - he(y),
2101
+ l.width - Q(y) - he(y),
2105
2102
  l.height - W(y) - se(y),
2106
2103
  y.horizontalAlign,
2107
2104
  y.verticalAlign,
@@ -2140,14 +2137,14 @@ class lo extends fe {
2140
2137
  return n;
2141
2138
  }
2142
2139
  }
2143
- const vi = (i) => {
2140
+ const bi = (i) => {
2144
2141
  for (let e = 0; e < i.length; ++e)
2145
2142
  for (let t = 0; t < i.length; ++t)
2146
2143
  t !== e && i[t].isAncestorOf(i[e]) && (i.splice(t, 1), --t, e > t && --e);
2147
2144
  return i;
2148
- }, co = (i) => (i == null ? void 0 : i.padding) === null || (i == null ? void 0 : i.padding) === void 0 ? ge.padding : typeof i.padding == "number" ? i.padding : i.padding.length === 0 ? ge.padding : i.padding.length === 1 || i.padding.length === 2 ? i.padding[0] : (i.padding.length === 3, i.padding[2]), ho = (i) => (i == null ? void 0 : i.padding) === null || (i == null ? void 0 : i.padding) === void 0 ? ge.padding : typeof i.padding == "number" ? i.padding : i.padding.length === 0 ? ge.padding : i.padding.length === 1 ? i.padding[0] : i.padding.length === 2 || i.padding.length === 3 ? i.padding[1] : i.padding[3], uo = (i) => (i == null ? void 0 : i.padding) === null || (i == null ? void 0 : i.padding) === void 0 ? ge.padding : typeof i.padding == "number" ? i.padding : i.padding.length === 0 ? ge.padding : i.padding.length === 1 ? i.padding[0] : (i.padding.length === 2 || i.padding.length === 3, i.padding[1]), go = (i) => (i == null ? void 0 : i.padding) === null || (i == null ? void 0 : i.padding) === void 0 ? ge.padding : typeof i.padding == "number" ? i.padding : i.padding.length === 0 ? ge.padding : (i.padding.length === 1 || i.padding.length === 2 || i.padding.length === 3, i.padding[0]), ki = {
2145
+ }, ho = (i) => (i == null ? void 0 : i.padding) === null || (i == null ? void 0 : i.padding) === void 0 ? ge.padding : typeof i.padding == "number" ? i.padding : i.padding.length === 0 ? ge.padding : i.padding.length === 1 || i.padding.length === 2 ? i.padding[0] : (i.padding.length === 3, i.padding[2]), uo = (i) => (i == null ? void 0 : i.padding) === null || (i == null ? void 0 : i.padding) === void 0 ? ge.padding : typeof i.padding == "number" ? i.padding : i.padding.length === 0 ? ge.padding : i.padding.length === 1 ? i.padding[0] : i.padding.length === 2 || i.padding.length === 3 ? i.padding[1] : i.padding[3], go = (i) => (i == null ? void 0 : i.padding) === null || (i == null ? void 0 : i.padding) === void 0 ? ge.padding : typeof i.padding == "number" ? i.padding : i.padding.length === 0 ? ge.padding : i.padding.length === 1 ? i.padding[0] : (i.padding.length === 2 || i.padding.length === 3, i.padding[1]), fo = (i) => (i == null ? void 0 : i.padding) === null || (i == null ? void 0 : i.padding) === void 0 ? ge.padding : typeof i.padding == "number" ? i.padding : i.padding.length === 0 ? ge.padding : (i.padding.length === 1 || i.padding.length === 2 || i.padding.length === 3, i.padding[0]), vi = {
2149
2146
  lookType: "shaped-look",
2150
- shape: Ze.Ellipse,
2147
+ shape: Ke.Ellipse,
2151
2148
  fillColor: "transparent",
2152
2149
  borderColor: "transparent",
2153
2150
  borderThickness: 0,
@@ -2157,18 +2154,18 @@ const vi = (i) => {
2157
2154
  highlighted: {
2158
2155
  fillColor: "rgba(0, 255, 255, 0.5)"
2159
2156
  }
2160
- }, Ue = oe(ki), wi = {
2157
+ }, Ue = oe(vi), ki = {
2161
2158
  name: "",
2162
2159
  label: null,
2163
2160
  allowsOutgoing: !0,
2164
2161
  allowsIncoming: !0,
2165
2162
  width: 24,
2166
- look: ki
2163
+ look: vi
2167
2164
  };
2168
- class fo {
2165
+ class mo {
2169
2166
  constructor(e) {
2170
2167
  const t = {
2171
- ...wi,
2168
+ ...ki,
2172
2169
  ...e
2173
2170
  };
2174
2171
  this.id = t.id, this.name = t.name, this.label = t.label, this.allowsOutgoing = t.allowsOutgoing, this.allowsIncoming = t.allowsIncoming, this.width = t.width;
@@ -2267,7 +2264,7 @@ class we extends Le {
2267
2264
  */
2268
2265
  get width() {
2269
2266
  var e;
2270
- return ((e = this.type) == null ? void 0 : e.width) || wi.width;
2267
+ return ((e = this.type) == null ? void 0 : e.width) || ki.width;
2271
2268
  }
2272
2269
  /**
2273
2270
  * Current height of this port. Same as the width.
@@ -2315,7 +2312,7 @@ class we extends Le {
2315
2312
  getNode() {
2316
2313
  if (this.rootElement instanceof _)
2317
2314
  return this.rootElement;
2318
- if (this.rootElement instanceof q)
2315
+ if (this.rootElement instanceof J)
2319
2316
  return this.rootElement.node;
2320
2317
  }
2321
2318
  getPriority() {
@@ -2343,10 +2340,10 @@ class we extends Le {
2343
2340
  ]), this.updateInView();
2344
2341
  }
2345
2342
  distanceTo(e) {
2346
- return hi(this.coords, e);
2343
+ return ci(this.coords, e);
2347
2344
  }
2348
2345
  }
2349
- class mo extends fe {
2346
+ class po extends fe {
2350
2347
  /**
2351
2348
  * Instance a set of ports for the given model. This method is used internally.
2352
2349
  * @private
@@ -2377,11 +2374,11 @@ class mo extends fe {
2377
2374
  this.model.connections.remove(t.outgoingConnections[0].id);
2378
2375
  for (; t.incomingConnections.length > 0; )
2379
2376
  this.model.connections.remove(t.incomingConnections[0].id);
2380
- t.label && this.model.fields.remove(t.label.id), (t.rootElement instanceof _ || t.rootElement instanceof q) && j(t.rootElement.ports, t), super.remove(e), t.updateInView();
2377
+ t.label && this.model.fields.remove(t.label.id), (t.rootElement instanceof _ || t.rootElement instanceof J) && j(t.rootElement.ports, t), super.remove(e), t.updateInView();
2381
2378
  }
2382
2379
  }
2383
2380
  }
2384
- class Ci {
2381
+ class wi {
2385
2382
  import(e, t) {
2386
2383
  e.clear(), t.id && (e.id = t.id), e.name = t.name, e.description = t.description, e.type = t.type, e.createdAt = new Date(t.createdAt), e.updatedAt = new Date(t.updatedAt);
2387
2384
  for (const n of t.nodes || [])
@@ -2403,10 +2400,10 @@ class Ci {
2403
2400
  e,
2404
2401
  g,
2405
2402
  [
2406
- g.coords[0] + J(u),
2403
+ g.coords[0] + Q(u),
2407
2404
  g.coords[1] + W(u)
2408
2405
  ],
2409
- g.width - J(u) - he(u),
2406
+ g.width - Q(u) - he(u),
2410
2407
  g.height - W(u) - se(u),
2411
2408
  u.fontSize,
2412
2409
  u.fontFamily,
@@ -2425,7 +2422,7 @@ class Ci {
2425
2422
  b !== void 0 && ((a = g.children) == null || a.push(b), b.parent = g);
2426
2423
  }
2427
2424
  for (const u of t.sections || []) {
2428
- const b = new q(
2425
+ const b = new J(
2429
2426
  e,
2430
2427
  g,
2431
2428
  u.indexXInNode,
@@ -2443,10 +2440,10 @@ class Ci {
2443
2440
  e,
2444
2441
  b,
2445
2442
  [
2446
- b.coords[0] + J(p),
2443
+ b.coords[0] + Q(p),
2447
2444
  b.coords[1] + W(p)
2448
2445
  ],
2449
- b.width - J(p) - he(p),
2446
+ b.width - Q(p) - he(p),
2450
2447
  b.height - W(p) - se(p),
2451
2448
  p.fontSize,
2452
2449
  p.fontFamily,
@@ -2650,7 +2647,7 @@ class Qe {
2650
2647
  );
2651
2648
  }
2652
2649
  }
2653
- class pt {
2650
+ class mt {
2654
2651
  constructor(e, t, n) {
2655
2652
  this.canvas = e, this.to = t, this.timestamp = n;
2656
2653
  }
@@ -2671,7 +2668,7 @@ class pt {
2671
2668
  };
2672
2669
  }
2673
2670
  static deserialize(e, t) {
2674
- return new pt(
2671
+ return new mt(
2675
2672
  e,
2676
2673
  t.to,
2677
2674
  t.timestamp
@@ -2899,7 +2896,7 @@ class tt {
2899
2896
  this.canvas = e, this.nodes = t, this.connections = n;
2900
2897
  }
2901
2898
  do() {
2902
- const e = new Ci();
2899
+ const e = new wi();
2903
2900
  this.canvas.userSelection.clear();
2904
2901
  for (const t of this.nodes) {
2905
2902
  const n = e.importNode(this.canvas.model, t);
@@ -2928,9 +2925,9 @@ class tt {
2928
2925
  );
2929
2926
  }
2930
2927
  }
2931
- class po {
2928
+ class yo {
2932
2929
  constructor(e) {
2933
- this.isInRoom = !1, this.canvas = e, this.replicaId = oi();
2930
+ this.isInRoom = !1, this.canvas = e, this.replicaId = ii();
2934
2931
  }
2935
2932
  /**
2936
2933
  * Returns a fresh timestamp, suitable for use by new CollabActions.
@@ -2942,7 +2939,7 @@ class po {
2942
2939
  * Returns a fresh unique ID, suitable for use by new CollabActions.
2943
2940
  */
2944
2941
  freshId() {
2945
- return "id" + oi();
2942
+ return "id" + ii();
2946
2943
  }
2947
2944
  /**
2948
2945
  * Performs the action - immediately locally, and eventually for remote collaborators.
@@ -2969,7 +2966,7 @@ class po {
2969
2966
  break;
2970
2967
  }
2971
2968
  case "applyLayout": {
2972
- pt.deserialize(
2969
+ mt.deserialize(
2973
2970
  this.canvas,
2974
2971
  e
2975
2972
  ).do();
@@ -3027,7 +3024,7 @@ class po {
3027
3024
  }
3028
3025
  }
3029
3026
  }
3030
- class yo {
3027
+ class bo {
3031
3028
  constructor(e, t) {
3032
3029
  this.canvas = e, this.maximum = t, this.history = [], this.index = 0;
3033
3030
  }
@@ -3080,7 +3077,7 @@ class yo {
3080
3077
  }
3081
3078
  }
3082
3079
  var A = /* @__PURE__ */ ((i) => (i.AddConnection = "add-connection", i.AddNode = "add-node", i.ApplyLayout = "apply-layout", i.Clipboard = "clipboard", i.ContextMenu = "context-menu", i.EditField = "edit-field", i.MoveNode = "move-node", i.Paste = "paste", i.Remove = "remove", i.StretchNode = "stretch-node", i.StretchSection = "stretch-section", i.UpdateValues = "update-values", i.Zoom = "zoom", i))(A || {});
3083
- class bo {
3080
+ class vo {
3084
3081
  constructor(e, t, n, a, l, o, s, r, d) {
3085
3082
  this.canvas = e, this.type = t, this.coords = n, this.parentId = a, this.ancestorId = l, this.fromAncestorGeometry = o, this.toAncestorGeometry = s, this.label = r, this.values = d, this.id = this.canvas.collabEngine.freshId();
3086
3083
  }
@@ -3238,7 +3235,7 @@ class X {
3238
3235
  return e !== void 0;
3239
3236
  }
3240
3237
  }
3241
- class vo {
3238
+ class ko {
3242
3239
  constructor(e, t, n, a, l, o, s, r, d) {
3243
3240
  this.canvas = e, this.childId = t, this.fromParentId = n, this.toParentId = a, this.fromChildGeometry = l, this.toChildGeometry = o, this.ancestorId = s, this.fromAncestorGeometry = r, this.toAncestorGeometry = d;
3244
3241
  }
@@ -3325,7 +3322,7 @@ class rt {
3325
3322
  return this.canvas.collabEngine.doCollaboratively(t), e === void 0;
3326
3323
  }
3327
3324
  }
3328
- class ai {
3325
+ class ri {
3329
3326
  constructor(e, t, n, a) {
3330
3327
  this.canvas = e, this.fieldId = t, this.from = n, this.to = a;
3331
3328
  }
@@ -3367,7 +3364,7 @@ class ai {
3367
3364
  return e !== void 0;
3368
3365
  }
3369
3366
  }
3370
- class ko {
3367
+ class wo {
3371
3368
  constructor(e, t, n, a) {
3372
3369
  this.canvas = e, this.id = t, this.from = n, this.to = a;
3373
3370
  }
@@ -3407,7 +3404,7 @@ class ko {
3407
3404
  return !t.rootElement.removed;
3408
3405
  }
3409
3406
  }
3410
- class wo {
3407
+ class Co {
3411
3408
  constructor(e, t, n, a, l, o) {
3412
3409
  this.canvas = e, this.nodeIds = t, this.sectionIds = n, this.portIds = a, this.connectionIds = l, this.fieldIds = o;
3413
3410
  }
@@ -3449,7 +3446,7 @@ class wo {
3449
3446
  return this.do();
3450
3447
  }
3451
3448
  }
3452
- class Co {
3449
+ class Ao {
3453
3450
  constructor(e, t, n, a) {
3454
3451
  this.canvas = e, this.nodes = t, this.connections = n, this.coords = a;
3455
3452
  }
@@ -3542,6 +3539,7 @@ class it {
3542
3539
  this.defaultPrevented = !0;
3543
3540
  }
3544
3541
  }
3542
+ var Ci = /* @__PURE__ */ ((i) => (i[i.DoubleClick = 0] = "DoubleClick", i[i.SecondaryClick = 1] = "SecondaryClick", i[i.Selection = 2] = "Selection", i[i.Highlight = 3] = "Highlight", i))(Ci || {});
3545
3543
  class ye extends it {
3546
3544
  /**
3547
3545
  * Create a diagram double click event.
@@ -3599,7 +3597,7 @@ class ne extends it {
3599
3597
  ), this.target = e;
3600
3598
  }
3601
3599
  }
3602
- class Ao extends Le {
3600
+ class So extends Le {
3603
3601
  constructor(e, t, n, a, l, o, s, r) {
3604
3602
  if (e.objects.get(r) !== void 0)
3605
3603
  throw new Error(`DiagramDecorator with id "${r}" already exists`);
@@ -3634,7 +3632,7 @@ class Ao extends Le {
3634
3632
  return this.priority;
3635
3633
  }
3636
3634
  }
3637
- class So extends fe {
3635
+ class Io extends fe {
3638
3636
  /**
3639
3637
  * Instance a set of decorators for the given model. This method is used internally.
3640
3638
  * @private
@@ -3654,7 +3652,7 @@ class So extends fe {
3654
3652
  * @returns The instanced decorator.
3655
3653
  */
3656
3654
  new(e, t, n, a, l, o, s) {
3657
- const r = new Ao(
3655
+ const r = new So(
3658
3656
  this.model,
3659
3657
  e,
3660
3658
  t,
@@ -3668,10 +3666,10 @@ class So extends fe {
3668
3666
  }
3669
3667
  remove(e) {
3670
3668
  const t = this.get(e, !0);
3671
- t && ((t.rootElement instanceof _ || t.rootElement instanceof q) && j(t.rootElement.decorators, t), super.remove(e), t.updateInView());
3669
+ t && ((t.rootElement instanceof _ || t.rootElement instanceof J) && j(t.rootElement.decorators, t), super.remove(e), t.updateInView());
3672
3670
  }
3673
3671
  }
3674
- class Io extends Le {
3672
+ class Lo extends Le {
3675
3673
  constructor(e, t, n, a, l, o, s) {
3676
3674
  if (e.objects.get(s) !== void 0)
3677
3675
  throw new Error(`DiagramObject with id "${s}" already exists`);
@@ -3706,7 +3704,7 @@ class Io extends Le {
3706
3704
  return this.priority;
3707
3705
  }
3708
3706
  }
3709
- class Lo extends fe {
3707
+ class Eo extends fe {
3710
3708
  /**
3711
3709
  * Instance a set of objects for the given model. This method is used internally.
3712
3710
  * @private
@@ -3726,7 +3724,7 @@ class Lo extends fe {
3726
3724
  * @returns The instanced object.
3727
3725
  */
3728
3726
  new(e, t, n, a, l, o) {
3729
- const s = new Io(
3727
+ const s = new Lo(
3730
3728
  this.model,
3731
3729
  e,
3732
3730
  t,
@@ -3744,7 +3742,7 @@ class Lo extends fe {
3744
3742
  }
3745
3743
  class Ai {
3746
3744
  constructor(e, t, n, a, l, o = []) {
3747
- this.nodes = new lo(this), this.sections = new ao(this), this.ports = new mo(this), this.connections = new to(this), this.fields = new io(this), this.objects = new Lo(this), this.decorators = new So(this), this.canvas = e, this.id = t, this.name = n, this.description = a, this.type = l, this.createdAt = /* @__PURE__ */ new Date(), this.updatedAt = /* @__PURE__ */ new Date(), this.logicalClock = 0, this.valueSet = new ke(new Je(o), this);
3745
+ this.nodes = new co(this), this.sections = new lo(this), this.ports = new po(this), this.connections = new io(this), this.fields = new oo(this), this.objects = new Eo(this), this.decorators = new Io(this), this.canvas = e, this.id = t, this.name = n, this.description = a, this.type = l, this.createdAt = /* @__PURE__ */ new Date(), this.updatedAt = /* @__PURE__ */ new Date(), this.logicalClock = 0, this.valueSet = new ke(new Je(o), this);
3748
3746
  }
3749
3747
  /**
3750
3748
  * Deletes everything in this diagram.
@@ -3768,7 +3766,7 @@ const ve = (i) => !!i.button, at = (i, e, t, n, a, l, o, s) => Di(
3768
3766
  ) * l
3769
3767
  ), I = (i) => {
3770
3768
  i ? T.select("body").style("cursor", i) : T.select("body").style("cursor", $.Auto);
3771
- }, Ce = (i) => i instanceof _ ? i : i instanceof q ? i.node || i : i.rootElement instanceof _ || i.rootElement instanceof q || i.rootElement instanceof we ? Ce(i.rootElement) : i, lt = (i) => {
3769
+ }, Ce = (i) => i instanceof _ ? i : i instanceof J ? i.node || i : i.rootElement instanceof _ || i.rootElement instanceof J || i.rootElement instanceof we ? Ce(i.rootElement) : i, lt = (i) => {
3772
3770
  i.filter(".shaped-look").append("path"), i.filter(".image-look").append("image").attr("preserveAspectRatio", "none"), i.filter(".stretchable-image-look").append("image").attr("class", "top-left-image").attr("preserveAspectRatio", "none"), i.filter(".stretchable-image-look").append("image").attr("class", "top-image").attr("preserveAspectRatio", "none"), i.filter(".stretchable-image-look").append("image").attr("class", "top-right-image").attr("preserveAspectRatio", "none"), i.filter(".stretchable-image-look").append("image").attr("class", "left-image").attr("preserveAspectRatio", "none"), i.filter(".stretchable-image-look").append("image").attr("class", "center-image").attr("preserveAspectRatio", "none"), i.filter(".stretchable-image-look").append("image").attr("class", "right-image").attr("preserveAspectRatio", "none"), i.filter(".stretchable-image-look").append("image").attr("class", "bottom-left-image").attr("preserveAspectRatio", "none"), i.filter(".stretchable-image-look").append("image").attr("class", "bottom-image").attr("preserveAspectRatio", "none"), i.filter(".stretchable-image-look").append("image").attr("class", "bottom-right-image").attr("preserveAspectRatio", "none");
3773
3771
  }, dt = (i) => {
3774
3772
  i.filter(".shaped-look").select("path").attr(
@@ -3811,8 +3809,8 @@ const ve = (i) => !!i.button, at = (i, e, t, n, a, l, o, s) => Di(
3811
3809
  "href",
3812
3810
  (e) => e.look.backgroundImageBottomRight
3813
3811
  );
3814
- }, ft = 96, ee = 32, Te = ft + ee, Eo = Math.PI / 4, xo = 100;
3815
- class To {
3812
+ }, gt = 96, ee = 32, Te = gt + ee, xo = Math.PI / 4, To = 100;
3813
+ class $o {
3816
3814
  /**
3817
3815
  * Constructs a context menu object.
3818
3816
  * @public
@@ -3867,7 +3865,7 @@ class To {
3867
3865
  onPress: void 0
3868
3866
  });
3869
3867
  for (let o = 0; o < l.length; ++o) {
3870
- const s = l[o], r = s.onPress, d = (o + 0.5 - l.length / 2) * Eo, c = a.append("xhtml:div").attr(
3868
+ const s = l[o], r = s.onPress, d = (o + 0.5 - l.length / 2) * xo, c = a.append("xhtml:div").attr(
3871
3869
  "class",
3872
3870
  `daga-context-menu-button ${s.imageClass}-button${s.onPress != null ? " daga-clickable" : ""}`
3873
3871
  ).attr("tabindex", 0).style("position", "absolute").style("box-sizing", "border-box").style("width", `${2 * ee}px`).style("height", `${2 * ee}px`).style("border-radius", `${ee}px`).style("pointer-events", "auto").on(L.Click, (h) => {
@@ -3875,14 +3873,14 @@ class To {
3875
3873
  }).on(L.KeyDown, (h) => {
3876
3874
  r && h.key === te.Enter && r(h);
3877
3875
  });
3878
- c.append("xhtml:div").style("position", "absolute").style("left", `${0.75 * ee}px`).style("top", `${0.5 * ee}px`).style("width", `${0.5 * ee}px`).style("height", `${0.5 * ee}px`).style("background-size", "contain").style("background-repeat", "no-repeat").attr("class", s.imageClass), c.append("xhtml:span").style("position", "absolute").style("left", `${0.2 * ee}px`).style("top", `${1.1 * ee}px`).style("text-align", "center").style("width", `${1.6 * ee}px`).style("height", `${0.35 * ee}px`).style("margin", "0").style("font-size", `${0.35 * ee}px`).style("font-weight", "700").style("user-select", "none").text(s.name), c.transition().ease(T.easeLinear).duration(xo).tween("progress", () => (h) => {
3876
+ c.append("xhtml:div").style("position", "absolute").style("left", `${0.75 * ee}px`).style("top", `${0.5 * ee}px`).style("width", `${0.5 * ee}px`).style("height", `${0.5 * ee}px`).style("background-size", "contain").style("background-repeat", "no-repeat").attr("class", s.imageClass), c.append("xhtml:span").style("position", "absolute").style("left", `${0.2 * ee}px`).style("top", `${1.1 * ee}px`).style("text-align", "center").style("width", `${1.6 * ee}px`).style("height", `${0.35 * ee}px`).style("margin", "0").style("font-size", `${0.35 * ee}px`).style("font-weight", "700").style("user-select", "none").text(s.name), c.transition().ease(T.easeLinear).duration(To).tween("progress", () => (h) => {
3879
3877
  const f = d * h;
3880
3878
  return c.style(
3881
3879
  "left",
3882
- `${Math.sin(f) * ft - ee + Te}px`
3880
+ `${Math.sin(f) * gt - ee + Te}px`
3883
3881
  ).style(
3884
3882
  "top",
3885
- `${-Math.cos(f) * ft - ee + Te}px`
3883
+ `${-Math.cos(f) * gt - ee + Te}px`
3886
3884
  );
3887
3885
  });
3888
3886
  }
@@ -3896,7 +3894,7 @@ class To {
3896
3894
  (e = this.contextMenuContainer) == null || e.remove(), this.contextMenuContainer = void 0;
3897
3895
  }
3898
3896
  }
3899
- class $o extends fe {
3897
+ class Mo extends fe {
3900
3898
  /**
3901
3899
  * Constructs a user highlight object.
3902
3900
  * @public
@@ -3925,7 +3923,7 @@ class $o extends fe {
3925
3923
  for (const t of e.ports)
3926
3924
  super.add(t), this.canvas.updatePortsInView(t.id);
3927
3925
  e.label && (super.add(e.label), this.canvas.updateFieldsInView(e.label.id)), this.canvas.updateNodesInView(e.id);
3928
- } else if (e instanceof q) {
3926
+ } else if (e instanceof J) {
3929
3927
  for (const t of e.ports)
3930
3928
  super.add(t), this.canvas.updatePortsInView(t.id);
3931
3929
  e.label && (super.add(e.label), this.canvas.updateFieldsInView(e.label.id)), this.canvas.updateSectionsInView(e.id);
@@ -3939,13 +3937,13 @@ class $o extends fe {
3939
3937
  this.focus = void 0;
3940
3938
  }
3941
3939
  }
3942
- const Mo = 1;
3940
+ const No = 1;
3943
3941
  class Si {
3944
3942
  export(e, t = !1) {
3945
3943
  const n = {
3946
3944
  name: e.name,
3947
3945
  type: e.type,
3948
- typeVersion: Mo,
3946
+ typeVersion: No,
3949
3947
  createdAt: e.createdAt,
3950
3948
  updatedAt: e.updatedAt,
3951
3949
  nodes: [],
@@ -4085,8 +4083,8 @@ class Si {
4085
4083
  } : {};
4086
4084
  }
4087
4085
  }
4088
- const No = "Diagram properties";
4089
- class Po extends fe {
4086
+ const Po = "Diagram properties";
4087
+ class zo extends fe {
4090
4088
  /**
4091
4089
  * Constructs a user selection object.
4092
4090
  * @public
@@ -4098,7 +4096,7 @@ class Po extends fe {
4098
4096
  });
4099
4097
  }
4100
4098
  add(e) {
4101
- if (!this.contains(e.id) && (this.length === 0 ? this.propertyEditorSelection === void 0 && (e instanceof _ || e instanceof ce) ? this.openInPropertyEditor(e) : this.propertyEditorSelection === void 0 && e instanceof q ? this.openInPropertyEditor(e.node) : this.openInPropertyEditor(void 0) : this.openInPropertyEditor(void 0), super.add(e), e.updateInView(), e instanceof _ && e.sections))
4099
+ if (!this.contains(e.id) && (this.length === 0 ? this.propertyEditorSelection === void 0 && (e instanceof _ || e instanceof ce) ? this.openInPropertyEditor(e) : this.propertyEditorSelection === void 0 && e instanceof J ? this.openInPropertyEditor(e.node) : this.openInPropertyEditor(void 0) : this.openInPropertyEditor(void 0), super.add(e), e.updateInView(), e instanceof _ && e.sections))
4102
4100
  for (const t of e.sections)
4103
4101
  super.add(t), t.updateInView();
4104
4102
  }
@@ -4143,8 +4141,8 @@ class Po extends fe {
4143
4141
  if (this.length > 0) {
4144
4142
  const e = [], t = [], n = [], a = [], l = [];
4145
4143
  for (const s of this.all())
4146
- s instanceof _ ? e.push(s.id) : s instanceof q ? t.push(s.id) : s instanceof we ? n.push(s.id) : s instanceof ce ? a.push(s.id) : s instanceof ue && l.push(s.id);
4147
- const o = new wo(
4144
+ s instanceof _ ? e.push(s.id) : s instanceof J ? t.push(s.id) : s instanceof we ? n.push(s.id) : s instanceof ce ? a.push(s.id) : s instanceof ue && l.push(s.id);
4145
+ const o = new Co(
4148
4146
  this.canvas,
4149
4147
  e,
4150
4148
  t,
@@ -4184,7 +4182,7 @@ class Po extends fe {
4184
4182
  const n = JSON.parse(t);
4185
4183
  if (n.type !== "daga-user-selection")
4186
4184
  return;
4187
- const a = new Co(
4185
+ const a = new Ao(
4188
4186
  this.canvas,
4189
4187
  n.nodes,
4190
4188
  n.connections,
@@ -4209,10 +4207,10 @@ class Po extends fe {
4209
4207
  if (t === void 0)
4210
4208
  return;
4211
4209
  const n = e == null ? void 0 : e.valueSet;
4212
- n ? (this.propertyEditorSelection = e, this.propertyEditorValues = structuredClone(n.getValues()), t && (e instanceof _ || e instanceof ce ? (e instanceof _ ? e.name ? t.title = `${e.type.name}: ${e.name}` : t.title = e.type.name : e instanceof ce && (t.title = e.type.name), t.valueSet = void 0, t.valueSet = n) : (t.title = No, t.valueSet = void 0, t.valueSet = n))) : (this.propertyEditorSelection = void 0, this.propertyEditorValues = void 0, t && (t.title = "", t.valueSet = void 0));
4210
+ n ? (this.propertyEditorSelection = e, this.propertyEditorValues = structuredClone(n.getValues()), t && (e instanceof _ || e instanceof ce ? (e instanceof _ ? e.name ? t.title = `${e.type.name}: ${e.name}` : t.title = e.type.name : e instanceof ce && (t.title = e.type.name), t.valueSet = void 0, t.valueSet = n) : (t.title = Po, t.valueSet = void 0, t.valueSet = n))) : (this.propertyEditorSelection = void 0, this.propertyEditorValues = void 0, t && (t.title = "", t.valueSet = void 0));
4213
4211
  }
4214
4212
  makeUpdateValuesAction() {
4215
- var s, r;
4213
+ var s, r, d;
4216
4214
  if (this.propertyEditorSelection === void 0 || this.propertyEditorValues === void 0)
4217
4215
  return;
4218
4216
  const e = this.propertyEditorSelection instanceof Ai ? void 0 : this.propertyEditorSelection.id;
@@ -4223,7 +4221,11 @@ class Po extends fe {
4223
4221
  return;
4224
4222
  const t = this.propertyEditorValues, n = structuredClone(
4225
4223
  (r = this.propertyEditorSelection) == null ? void 0 : r.valueSet.getValues()
4226
- ), [a, l] = mi(t, n), o = new ko(
4224
+ ), [a, l] = fi(
4225
+ t,
4226
+ n,
4227
+ (d = this.propertyEditorSelection) == null ? void 0 : d.valueSet
4228
+ ), o = new wo(
4227
4229
  this.canvas,
4228
4230
  e,
4229
4231
  a,
@@ -4232,7 +4234,7 @@ class Po extends fe {
4232
4234
  o.do(), this.canvas.actionStack.add(o), this.propertyEditorValues = n;
4233
4235
  }
4234
4236
  }
4235
- const zo = 12, D = 6, Ro = 25, ct = "diagram-connection-unfinished", Vo = 100, Ke = class Ke {
4237
+ const Ro = 12, H = 6, Vo = 25, ct = "diagram-connection-unfinished", _o = 100, Ze = class Ze {
4236
4238
  /**
4237
4239
  * Constructs a canvas object.
4238
4240
  * @public
@@ -4241,16 +4243,16 @@ const zo = 12, D = 6, Ro = 25, ct = "diagram-connection-unfinished", Vo = 100, K
4241
4243
  */
4242
4244
  constructor(e, t) {
4243
4245
  var n, a, l, o, s, r, d, c, h, f, y, g, m, u, b, k, p, S;
4244
- if (this.backgroundPatternId = `daga-background-pattern-id-${Ke.canvasCount++}`, this.zoomTransform = T.zoomIdentity, this.draggingFrom = [0, 0], this.dragging = !1, this.secondaryButton = !1, this.validatorChange$ = new Be(), this.diagramChange$ = new Be(), this.diagramEvent$ = new Be(), this.propertyEditorChanges$ = new Be(), this.parentComponent = e, this.model = new Ai(
4246
+ if (this.backgroundPatternId = `daga-background-pattern-id-${Ze.canvasCount++}`, this.zoomTransform = T.zoomIdentity, this.draggingFrom = [0, 0], this.dragging = !1, this.secondaryButton = !1, this.validatorChange$ = new Be(), this.diagramChange$ = new Be(), this.diagramEvent$ = new Be(), this.propertyEditorChanges$ = new Be(), this.parentComponent = e, this.model = new Ai(
4245
4247
  this,
4246
4248
  void 0,
4247
4249
  t.name || "unnamed",
4248
4250
  "",
4249
4251
  t.type || "",
4250
4252
  t.properties || []
4251
- ), this.userSelection = new Po(this), this.userHighlight = new $o(this), this.contextMenu = new To(this), this.backgroundColor = ((n = t.canvas) == null ? void 0 : n.backgroundColor) || "#FFFFFF", this.gridSize = ((l = (a = t.canvas) == null ? void 0 : a.grid) == null ? void 0 : l.enabled) === !1 || ((o = t.canvas) == null ? void 0 : o.grid) === void 0 ? 0 : Math.abs(((r = (s = t.canvas) == null ? void 0 : s.grid) == null ? void 0 : r.spacing) || 10), this.gridThickness = Math.abs(((c = (d = t.canvas) == null ? void 0 : d.grid) == null ? void 0 : c.thickness) || 0.05), this.gridColor = ((f = (h = t.canvas) == null ? void 0 : h.grid) == null ? void 0 : f.color) || "rgba(0, 0, 0, 0.1)", this.snapToGrid = ((g = (y = t.canvas) == null ? void 0 : y.grid) == null ? void 0 : g.enabled) === !1 || ((m = t.canvas) == null ? void 0 : m.grid) === void 0 ? !1 : ((b = (u = t.canvas) == null ? void 0 : u.grid) == null ? void 0 : b.snap) || !1, this.zoomFactor = ((k = t.canvas) == null ? void 0 : k.zoomFactor) || 2, this.panRate = ((p = t.canvas) == null ? void 0 : p.panRate) || 100, this.inferConnectionType = t.inferConnectionType || !1, this.multipleSelectionOn = !1, this.priorityThresholds = ((S = t.canvas) == null ? void 0 : S.priorityThresholds) || [], this.priorityThreshold = this.priorityThresholds ? this.priorityThresholds[0] : void 0, this.layoutFormat = t.layoutFormat, this.userActions = t.userActions || {}, this.validators = [], this.actionStack = new yo(this, Ro), this.collabEngine = new po(this), t.nodeTypes)
4253
+ ), this.userSelection = new zo(this), this.userHighlight = new Mo(this), this.contextMenu = new $o(this), this.backgroundColor = ((n = t.canvas) == null ? void 0 : n.backgroundColor) || "#FFFFFF", this.gridSize = ((l = (a = t.canvas) == null ? void 0 : a.grid) == null ? void 0 : l.enabled) === !1 || ((o = t.canvas) == null ? void 0 : o.grid) === void 0 ? 0 : Math.abs(((r = (s = t.canvas) == null ? void 0 : s.grid) == null ? void 0 : r.spacing) || 10), this.gridThickness = Math.abs(((c = (d = t.canvas) == null ? void 0 : d.grid) == null ? void 0 : c.thickness) || 0.05), this.gridColor = ((f = (h = t.canvas) == null ? void 0 : h.grid) == null ? void 0 : f.color) || "rgba(0, 0, 0, 0.1)", this.snapToGrid = ((g = (y = t.canvas) == null ? void 0 : y.grid) == null ? void 0 : g.enabled) === !1 || ((m = t.canvas) == null ? void 0 : m.grid) === void 0 ? !1 : ((b = (u = t.canvas) == null ? void 0 : u.grid) == null ? void 0 : b.snap) || !1, this.zoomFactor = ((k = t.canvas) == null ? void 0 : k.zoomFactor) || 2, this.panRate = ((p = t.canvas) == null ? void 0 : p.panRate) || 100, this.inferConnectionType = t.inferConnectionType || !1, this.multipleSelectionOn = !1, this.priorityThresholds = ((S = t.canvas) == null ? void 0 : S.priorityThresholds) || [], this.priorityThreshold = this.priorityThresholds ? this.priorityThresholds[0] : void 0, this.layoutFormat = t.layoutFormat, this.userActions = t.userActions || {}, this.validators = [], this.actionStack = new bo(this, Vo), this.collabEngine = new yo(this), t.nodeTypes)
4252
4254
  for (const C of t.nodeTypes) {
4253
- const E = new bi({
4255
+ const E = new yi({
4254
4256
  ...t.nodeTypeDefaults,
4255
4257
  ...C
4256
4258
  });
@@ -4258,7 +4260,7 @@ const zo = 12, D = 6, Ro = 25, ct = "diagram-connection-unfinished", Vo = 100, K
4258
4260
  }
4259
4261
  if (t.portTypes)
4260
4262
  for (const C of t.portTypes) {
4261
- const E = new fo({
4263
+ const E = new mo({
4262
4264
  ...t.portTypeDefaults,
4263
4265
  ...C
4264
4266
  });
@@ -4266,7 +4268,7 @@ const zo = 12, D = 6, Ro = 25, ct = "diagram-connection-unfinished", Vo = 100, K
4266
4268
  }
4267
4269
  if (t.connectionTypes) {
4268
4270
  for (const C of t.connectionTypes) {
4269
- const E = new pi({
4271
+ const E = new mi({
4270
4272
  ...t.connectionTypeDefaults,
4271
4273
  ...C
4272
4274
  });
@@ -4541,7 +4543,7 @@ const zo = 12, D = 6, Ro = 25, ct = "diagram-connection-unfinished", Vo = 100, K
4541
4543
  })
4542
4544
  ), lt(
4543
4545
  a
4544
- ), a.filter(".resizable-x").append("line").attr("class", "left-resizer").attr("stroke", "transparent").attr("stroke-width", `${D}px`).on(L.MouseOver, (o, s) => {
4546
+ ), a.filter(".resizable-x").append("line").attr("class", "left-resizer").attr("stroke", "transparent").attr("stroke-width", `${H}px`).on(L.MouseOver, (o, s) => {
4545
4547
  this.canUserPerformAction(A.StretchNode) && s.type.resizableX && !s.removed && I($.EWResize);
4546
4548
  }).on(L.MouseOut, (o, s) => {
4547
4549
  this.canUserPerformAction(A.StretchNode) && s.type.resizableX && !s.removed && I();
@@ -4566,7 +4568,7 @@ const zo = 12, D = 6, Ro = 25, ct = "diagram-connection-unfinished", Vo = 100, K
4566
4568
  }
4567
4569
  I();
4568
4570
  })
4569
- ), a.filter(".resizable-y").append("line").attr("class", "top-resizer").attr("stroke", "transparent").attr("stroke-width", `${D}px`).on(L.MouseOver, (o, s) => {
4571
+ ), a.filter(".resizable-y").append("line").attr("class", "top-resizer").attr("stroke", "transparent").attr("stroke-width", `${H}px`).on(L.MouseOver, (o, s) => {
4570
4572
  this.canUserPerformAction(A.StretchNode) && s.type.resizableY && !s.removed && I($.NSResize);
4571
4573
  }).on(L.MouseOut, (o, s) => {
4572
4574
  this.canUserPerformAction(A.StretchNode) && s.type.resizableY && !s.removed && I();
@@ -4591,7 +4593,7 @@ const zo = 12, D = 6, Ro = 25, ct = "diagram-connection-unfinished", Vo = 100, K
4591
4593
  }
4592
4594
  I();
4593
4595
  })
4594
- ), a.filter(".resizable-x").append("line").attr("class", "right-resizer").attr("stroke", "transparent").attr("stroke-width", `${D}px`).on(L.MouseOver, (o, s) => {
4596
+ ), a.filter(".resizable-x").append("line").attr("class", "right-resizer").attr("stroke", "transparent").attr("stroke-width", `${H}px`).on(L.MouseOver, (o, s) => {
4595
4597
  this.canUserPerformAction(A.StretchNode) && s.type.resizableX && !s.removed && I($.EWResize);
4596
4598
  }).on(L.MouseOut, (o, s) => {
4597
4599
  this.canUserPerformAction(A.StretchNode) && s.type.resizableX && !s.removed && I();
@@ -4616,7 +4618,7 @@ const zo = 12, D = 6, Ro = 25, ct = "diagram-connection-unfinished", Vo = 100, K
4616
4618
  }
4617
4619
  I();
4618
4620
  })
4619
- ), a.filter(".resizable-y").append("line").attr("class", "bottom-resizer").attr("stroke", "transparent").attr("stroke-width", `${D}px`).on(L.MouseOver, (o, s) => {
4621
+ ), a.filter(".resizable-y").append("line").attr("class", "bottom-resizer").attr("stroke", "transparent").attr("stroke-width", `${H}px`).on(L.MouseOver, (o, s) => {
4620
4622
  this.canUserPerformAction(A.StretchNode) && s.type.resizableY && !s.removed && I($.NSResize);
4621
4623
  }).on(L.MouseOut, (o, s) => {
4622
4624
  this.canUserPerformAction(A.StretchNode) && s.type.resizableY && !s.removed && I();
@@ -4649,7 +4651,7 @@ const zo = 12, D = 6, Ro = 25, ct = "diagram-connection-unfinished", Vo = 100, K
4649
4651
  })
4650
4652
  ), l.attr("transform", (o) => `translate(${o.coords[0]},${o.coords[1]})`).attr("opacity", (o) => o.removed ? 0.5 : 1), dt(
4651
4653
  l
4652
- ), l.filter(".resizable-x").select("line.left-resizer").attr("x1", D / 2).attr("x2", D / 2).attr("y1", 0).attr("y2", (o) => o.height), l.filter(".resizable-y").select("line.top-resizer").attr("x1", 0).attr("x2", (o) => o.width).attr("y1", D / 2).attr("y2", D / 2), l.filter(".resizable-x").select("line.right-resizer").attr("x1", (o) => o.width - D / 2).attr("x2", (o) => o.width - D / 2).attr("y1", 0).attr("y2", (o) => o.height), l.filter(".resizable-y").select("line.bottom-resizer").attr("x1", 0).attr("x2", (o) => o.width).attr("y1", (o) => o.height - D / 2).attr("y2", (o) => o.height - D / 2);
4654
+ ), l.filter(".resizable-x").select("line.left-resizer").attr("x1", H / 2).attr("x2", H / 2).attr("y1", 0).attr("y2", (o) => o.height), l.filter(".resizable-y").select("line.top-resizer").attr("x1", 0).attr("x2", (o) => o.width).attr("y1", H / 2).attr("y2", H / 2), l.filter(".resizable-x").select("line.right-resizer").attr("x1", (o) => o.width - H / 2).attr("x2", (o) => o.width - H / 2).attr("y1", 0).attr("y2", (o) => o.height), l.filter(".resizable-y").select("line.bottom-resizer").attr("x1", 0).attr("x2", (o) => o.width).attr("y1", (o) => o.height - H / 2).attr("y2", (o) => o.height - H / 2);
4653
4655
  }
4654
4656
  updateSectionsInView(...e) {
4655
4657
  let t = this.selectCanvasElements().selectAll("g.diagram-section").data(
@@ -4725,7 +4727,7 @@ const zo = 12, D = 6, Ro = 25, ct = "diagram-connection-unfinished", Vo = 100, K
4725
4727
  })
4726
4728
  ), lt(
4727
4729
  a
4728
- ), a.filter(".resizable-x").append("line").attr("class", "left-resizer").attr("stroke", "transparent").attr("stroke-width", `${D}px`).on(L.MouseOver, (o, s) => {
4730
+ ), a.filter(".resizable-x").append("line").attr("class", "left-resizer").attr("stroke", "transparent").attr("stroke-width", `${H}px`).on(L.MouseOver, (o, s) => {
4729
4731
  var r, d;
4730
4732
  this.canUserPerformAction(A.StretchSection) && ((d = (r = s.node) == null ? void 0 : r.type) != null && d.resizableX) && !s.removed && I($.EWResize);
4731
4733
  }).on(L.MouseOut, (o, s) => {
@@ -4765,7 +4767,7 @@ const zo = 12, D = 6, Ro = 25, ct = "diagram-connection-unfinished", Vo = 100, K
4765
4767
  }
4766
4768
  I();
4767
4769
  })
4768
- ), a.filter(".resizable-y").append("line").attr("class", "top-resizer").attr("stroke", "transparent").attr("stroke-width", `${D}px`).on(L.MouseOver, (o, s) => {
4770
+ ), a.filter(".resizable-y").append("line").attr("class", "top-resizer").attr("stroke", "transparent").attr("stroke-width", `${H}px`).on(L.MouseOver, (o, s) => {
4769
4771
  var r, d;
4770
4772
  this.canUserPerformAction(A.StretchSection) && ((d = (r = s.node) == null ? void 0 : r.type) != null && d.resizableY) && !s.removed && I($.NSResize);
4771
4773
  }).on(L.MouseOut, (o, s) => {
@@ -4805,7 +4807,7 @@ const zo = 12, D = 6, Ro = 25, ct = "diagram-connection-unfinished", Vo = 100, K
4805
4807
  }
4806
4808
  I();
4807
4809
  })
4808
- ), a.filter(".resizable-x").append("line").attr("class", "right-resizer").attr("stroke", "transparent").attr("stroke-width", `${D}px`).on(L.MouseOver, (o, s) => {
4810
+ ), a.filter(".resizable-x").append("line").attr("class", "right-resizer").attr("stroke", "transparent").attr("stroke-width", `${H}px`).on(L.MouseOver, (o, s) => {
4809
4811
  var r, d;
4810
4812
  this.canUserPerformAction(A.StretchSection) && ((d = (r = s.node) == null ? void 0 : r.type) != null && d.resizableX) && !s.removed && I($.EWResize);
4811
4813
  }).on(L.MouseOut, (o, s) => {
@@ -4845,7 +4847,7 @@ const zo = 12, D = 6, Ro = 25, ct = "diagram-connection-unfinished", Vo = 100, K
4845
4847
  }
4846
4848
  I();
4847
4849
  })
4848
- ), a.filter(".resizable-y").append("line").attr("class", "bottom-resizer").attr("stroke", "transparent").attr("stroke-width", `${D}px`).on(L.MouseOver, (o, s) => {
4850
+ ), a.filter(".resizable-y").append("line").attr("class", "bottom-resizer").attr("stroke", "transparent").attr("stroke-width", `${H}px`).on(L.MouseOver, (o, s) => {
4849
4851
  var r, d;
4850
4852
  this.canUserPerformAction(A.StretchSection) && ((d = (r = s.node) == null ? void 0 : r.type) != null && d.resizableY) && !s.removed && I($.NSResize);
4851
4853
  }).on(L.MouseOut, (o, s) => {
@@ -4887,7 +4889,7 @@ const zo = 12, D = 6, Ro = 25, ct = "diagram-connection-unfinished", Vo = 100, K
4887
4889
  })
4888
4890
  ), l.attr("transform", (o) => `translate(${o.coords[0]},${o.coords[1]})`).attr("opacity", (o) => o.removed ? 0.5 : 1), dt(
4889
4891
  l
4890
- ), l.filter(".resizable-x").select("line.left-resizer").attr("x1", D / 2).attr("x2", D / 2).attr("y1", 0).attr("y2", (o) => o.height), l.filter(".resizable-y").select("line.top-resizer").attr("x1", 0).attr("x2", (o) => o.width).attr("y1", D / 2).attr("y2", D / 2), l.filter(".resizable-x").select("line.right-resizer").attr("x1", (o) => o.width - D / 2).attr("x2", (o) => o.width - D / 2).attr("y1", 0).attr("y2", (o) => o.height), l.filter(".resizable-y").select("line.bottom-resizer").attr("x1", 0).attr("x2", (o) => o.width).attr("y1", (o) => o.height - D / 2).attr("y2", (o) => o.height - D / 2);
4892
+ ), l.filter(".resizable-x").select("line.left-resizer").attr("x1", H / 2).attr("x2", H / 2).attr("y1", 0).attr("y2", (o) => o.height), l.filter(".resizable-y").select("line.top-resizer").attr("x1", 0).attr("x2", (o) => o.width).attr("y1", H / 2).attr("y2", H / 2), l.filter(".resizable-x").select("line.right-resizer").attr("x1", (o) => o.width - H / 2).attr("x2", (o) => o.width - H / 2).attr("y1", 0).attr("y2", (o) => o.height), l.filter(".resizable-y").select("line.bottom-resizer").attr("x1", 0).attr("x2", (o) => o.width).attr("y1", (o) => o.height - H / 2).attr("y2", (o) => o.height - H / 2);
4891
4893
  }
4892
4894
  updatePortsInView(...e) {
4893
4895
  let t = this.selectCanvasElements().selectAll("g.diagram-port").data(
@@ -4989,7 +4991,7 @@ const zo = 12, D = 6, Ro = 25, ct = "diagram-connection-unfinished", Vo = 100, K
4989
4991
  const k = b.distanceTo(g);
4990
4992
  k < m && (m = k, u = b);
4991
4993
  }
4992
- u && m < Vo ? this.userHighlight.focusOn(u) : this.userHighlight.clear();
4994
+ u && m < _o ? this.userHighlight.focusOn(u) : this.userHighlight.clear();
4993
4995
  }
4994
4996
  }
4995
4997
  }).on(x.End, (o, s) => {
@@ -5004,11 +5006,11 @@ const zo = 12, D = 6, Ro = 25, ct = "diagram-connection-unfinished", Vo = 100, K
5004
5006
  this.finishConnection(d);
5005
5007
  else if (d instanceof ue && d.rootElement instanceof we)
5006
5008
  this.finishConnection(d.rootElement);
5007
- else if (d instanceof _ || d instanceof q || d instanceof ue) {
5009
+ else if (d instanceof _ || d instanceof J || d instanceof ue) {
5008
5010
  let c;
5009
- if (d instanceof _ || d instanceof q)
5011
+ if (d instanceof _ || d instanceof J)
5010
5012
  c = d;
5011
- else if (d.rootElement instanceof _ || d.rootElement instanceof q)
5013
+ else if (d.rootElement instanceof _ || d.rootElement instanceof J)
5012
5014
  c = d.rootElement;
5013
5015
  else {
5014
5016
  this.dropConnection();
@@ -5089,7 +5091,7 @@ const zo = 12, D = 6, Ro = 25, ct = "diagram-connection-unfinished", Vo = 100, K
5089
5091
  }
5090
5092
  ).attr("marker-start", (s) => `url(#${s.id}-start-marker)`).attr("marker-end", (s) => `url(#${s.id}-end-marker)`).attr("stroke", (s) => s.look.color).attr("stroke-width", (s) => `${s.look.thickness}px`).attr(
5091
5093
  "stroke-dasharray",
5092
- (s) => ei(s.look.style, s.look.thickness)
5094
+ (s) => Qt(s.look.style, s.look.thickness)
5093
5095
  ).attr("fill", "none"), o.select("path.diagram-connection-path-box").attr(
5094
5096
  "d",
5095
5097
  (s) => {
@@ -5107,10 +5109,10 @@ const zo = 12, D = 6, Ro = 25, ct = "diagram-connection-unfinished", Vo = 100, K
5107
5109
  }
5108
5110
  ).attr("stroke", "transparent").attr("pointer-events", "stroke").attr(
5109
5111
  "stroke-width",
5110
- (s) => `${s.look.thickness + zo}px`
5112
+ (s) => `${s.look.thickness + Ro}px`
5111
5113
  ).attr(
5112
5114
  "stroke-dasharray",
5113
- (s) => ei(s.look.style, s.look.thickness)
5115
+ (s) => Qt(s.look.style, s.look.thickness)
5114
5116
  ).attr("fill", "none"), o.data().forEach((s) => {
5115
5117
  this.updateConnectionLabelsInView(s), this.updateConnectionMarkersInView(s);
5116
5118
  });
@@ -5158,7 +5160,7 @@ const zo = 12, D = 6, Ro = 25, ct = "diagram-connection-unfinished", Vo = 100, K
5158
5160
  }
5159
5161
  }).on(L.DoubleClick, (o, s) => {
5160
5162
  const r = new ye(o, s);
5161
- this.diagramEvent$.next(r), !r.defaultPrevented && this.canUserPerformAction(A.EditField) && s.editable && !s.removed && (this.currentAction = new ai(this, s.id, s.text, ""), this.createInputField(
5163
+ this.diagramEvent$.next(r), !r.defaultPrevented && this.canUserPerformAction(A.EditField) && s.editable && !s.removed && (this.currentAction = new ri(this, s.id, s.text, ""), this.createInputField(
5162
5164
  s.text,
5163
5165
  s.coords,
5164
5166
  s.width,
@@ -5169,7 +5171,7 @@ const zo = 12, D = 6, Ro = 25, ct = "diagram-connection-unfinished", Vo = 100, K
5169
5171
  s.text = d;
5170
5172
  },
5171
5173
  (d) => {
5172
- s.text = d, this.currentAction instanceof ai && (this.currentAction.to = d, this.currentAction.do(), this.actionStack.add(this.currentAction), this.currentAction = void 0);
5174
+ s.text = d, this.currentAction instanceof ri && (this.currentAction.to = d, this.currentAction.do(), this.actionStack.add(this.currentAction), this.currentAction = void 0);
5173
5175
  }
5174
5176
  ));
5175
5177
  }).call(
@@ -5178,21 +5180,21 @@ const zo = 12, D = 6, Ro = 25, ct = "diagram-connection-unfinished", Vo = 100, K
5178
5180
  this.startMultipleSelection(o);
5179
5181
  else {
5180
5182
  let r;
5181
- s.rootElement instanceof _ ? r = s.rootElement : s.rootElement instanceof q && (r = s.rootElement.node), r ? this.startMovingNode(o, r) : I($.NotAllowed);
5183
+ s.rootElement instanceof _ ? r = s.rootElement : s.rootElement instanceof J && (r = s.rootElement.node), r ? this.startMovingNode(o, r) : I($.NotAllowed);
5182
5184
  }
5183
5185
  }).on(x.Drag, (o, s) => {
5184
5186
  if (this.multipleSelectionOn || this.secondaryButton)
5185
5187
  this.continueMultipleSelection(o);
5186
5188
  else {
5187
5189
  let r;
5188
- s.rootElement instanceof _ ? r = s.rootElement : s.rootElement instanceof q && (r = s.rootElement.node), r ? this.continueMovingNode(o, r) : I($.NotAllowed);
5190
+ s.rootElement instanceof _ ? r = s.rootElement : s.rootElement instanceof J && (r = s.rootElement.node), r ? this.continueMovingNode(o, r) : I($.NotAllowed);
5189
5191
  }
5190
5192
  }).on(x.End, (o, s) => {
5191
5193
  if (this.multipleSelectionOn || this.secondaryButton)
5192
5194
  this.finishMultipleSelection(o);
5193
5195
  else {
5194
5196
  let r;
5195
- s.rootElement instanceof _ ? r = s.rootElement : s.rootElement instanceof q && (r = s.rootElement.node), r ? this.finishMovingNode(o, r) : I();
5197
+ s.rootElement instanceof _ ? r = s.rootElement : s.rootElement instanceof J && (r = s.rootElement.node), r ? this.finishMovingNode(o, r) : I();
5196
5198
  }
5197
5199
  this.secondaryButton = !1;
5198
5200
  })
@@ -5291,7 +5293,7 @@ const zo = 12, D = 6, Ro = 25, ct = "diagram-connection-unfinished", Vo = 100, K
5291
5293
  if (c) {
5292
5294
  const y = e.startLabel ? c.width / this.zoomTransform.k + Re(l) + Ve(l) : 0, g = e.startLabel ? c.height / this.zoomTransform.k + _e(l) + ze(l) : 0, m = a.getPointAtLength(
5293
5295
  Math.max(
5294
- J(l) + y / 2,
5296
+ Q(l) + y / 2,
5295
5297
  he(l) + y / 2,
5296
5298
  W(l) + g / 2,
5297
5299
  se(l) + g / 2
@@ -5338,7 +5340,7 @@ const zo = 12, D = 6, Ro = 25, ct = "diagram-connection-unfinished", Vo = 100, K
5338
5340
  if (f) {
5339
5341
  const y = e.endLabel ? f.width / this.zoomTransform.k + Re(l) + Ve(l) : 0, g = e.endLabel ? f.height / this.zoomTransform.k + _e(l) + ze(l) : 0, m = a.getPointAtLength(
5340
5342
  d - Math.max(
5341
- J(l) + y / 2,
5343
+ Q(l) + y / 2,
5342
5344
  he(l) + y / 2,
5343
5345
  W(l) + g / 2,
5344
5346
  se(l) + g / 2
@@ -5369,10 +5371,10 @@ const zo = 12, D = 6, Ro = 25, ct = "diagram-connection-unfinished", Vo = 100, K
5369
5371
  if (t) {
5370
5372
  if (t.rootElement instanceof _ && t.fit) {
5371
5373
  const o = this.minimumSizeOfField(t);
5372
- let s = o[0] + J(t.rootElement.type.label) + he(t.rootElement.type.label) - t.rootElement.width, r = o[1] + W(t.rootElement.type.label) + se(t.rootElement.type.label) - t.rootElement.height;
5374
+ let s = o[0] + Q(t.rootElement.type.label) + he(t.rootElement.type.label) - t.rootElement.width, r = o[1] + W(t.rootElement.type.label) + se(t.rootElement.type.label) - t.rootElement.height;
5373
5375
  this.snapToGrid && (s = Math.ceil(s / this.gridSize) * this.gridSize, r = Math.ceil(r / this.gridSize) * this.gridSize), t.rootElement.width + s < t.rootElement.type.minWidth && (s = t.rootElement.type.minWidth - t.rootElement.width), t.rootElement.height + r < t.rootElement.type.minHeight && (r = t.rootElement.type.minHeight - t.rootElement.height), t.rootElement.stretch(v.Right, s), t.rootElement.stretch(v.Bottom, r);
5374
5376
  }
5375
- if (t.rootElement instanceof q && t.fit) {
5377
+ if (t.rootElement instanceof J && t.fit) {
5376
5378
  const o = this.minimumSizeOfField(t);
5377
5379
  let s = o[0], r = o[1];
5378
5380
  for (const f of ((n = t.rootElement.node) == null ? void 0 : n.sections) || [])
@@ -5385,7 +5387,7 @@ const zo = 12, D = 6, Ro = 25, ct = "diagram-connection-unfinished", Vo = 100, K
5385
5387
  )));
5386
5388
  o[0] < s && (o[0] = s), o[1] < r && (o[1] = r);
5387
5389
  const d = t.rootElement.type;
5388
- let c = o[0] + J(d == null ? void 0 : d.label) + he(d == null ? void 0 : d.label) - t.rootElement.width, h = o[1] + W(d == null ? void 0 : d.label) + se(d == null ? void 0 : d.label) - t.rootElement.height;
5390
+ let c = o[0] + Q(d == null ? void 0 : d.label) + he(d == null ? void 0 : d.label) - t.rootElement.width, h = o[1] + W(d == null ? void 0 : d.label) + se(d == null ? void 0 : d.label) - t.rootElement.height;
5389
5391
  this.snapToGrid && (c = Math.ceil(c / this.gridSize) * this.gridSize, h = Math.ceil(h / this.gridSize) * this.gridSize), t.rootElement.width + c < (t.rootElement.getMinWidth() || 0) && (c = (t.rootElement.getMinWidth() || 0) - t.rootElement.width), t.rootElement.height + h < (t.rootElement.getMinHeight() || 0) && (h = (t.rootElement.getMinHeight() || 0) - t.rootElement.height), (a = t.rootElement.node) == null || a.stretchSections(
5390
5392
  v.Right,
5391
5393
  c,
@@ -5500,18 +5502,18 @@ const zo = 12, D = 6, Ro = 25, ct = "diagram-connection-unfinished", Vo = 100, K
5500
5502
  } else if (this.inferConnectionType) {
5501
5503
  let E = this.model.connections.types.all().find(
5502
5504
  (M) => {
5503
- var F, N, R, K, O, Y, H, Q;
5505
+ var F, N, R, K, O, Y, D, Z;
5504
5506
  return M.canStartFromType(
5505
5507
  ((K = (R = (N = (F = this.unfinishedConnection) == null ? void 0 : F.start) == null ? void 0 : N.getNode()) == null ? void 0 : R.type) == null ? void 0 : K.id) || ""
5506
- ) && ((Y = (O = this.unfinishedConnection) == null ? void 0 : O.start) == null ? void 0 : Y.allowsOutgoing) && M.canFinishOnType(((Q = (H = e.getNode()) == null ? void 0 : H.type) == null ? void 0 : Q.id) || "") && e.allowsIncoming;
5508
+ ) && ((Y = (O = this.unfinishedConnection) == null ? void 0 : O.start) == null ? void 0 : Y.allowsOutgoing) && M.canFinishOnType(((Z = (D = e.getNode()) == null ? void 0 : D.type) == null ? void 0 : Z.id) || "") && e.allowsIncoming;
5507
5509
  }
5508
5510
  ), z = !1;
5509
5511
  if (E === void 0 && (E = this.model.connections.types.all().find(
5510
5512
  (M) => {
5511
- var F, N, R, K, O, Y, H, Q;
5513
+ var F, N, R, K, O, Y, D, Z;
5512
5514
  return M.canFinishOnType(
5513
5515
  ((K = (R = (N = (F = this.unfinishedConnection) == null ? void 0 : F.start) == null ? void 0 : N.getNode()) == null ? void 0 : R.type) == null ? void 0 : K.id) || ""
5514
- ) && ((Y = (O = this.unfinishedConnection) == null ? void 0 : O.start) == null ? void 0 : Y.allowsIncoming) && M.canStartFromType(((Q = (H = e.getNode()) == null ? void 0 : H.type) == null ? void 0 : Q.id) || "") && e.allowsOutgoing;
5516
+ ) && ((Y = (O = this.unfinishedConnection) == null ? void 0 : O.start) == null ? void 0 : Y.allowsIncoming) && M.canStartFromType(((Z = (D = e.getNode()) == null ? void 0 : D.type) == null ? void 0 : Z.id) || "") && e.allowsOutgoing;
5515
5517
  }
5516
5518
  ), z = !0), E !== void 0) {
5517
5519
  const M = new rt(
@@ -5645,11 +5647,11 @@ const zo = 12, D = 6, Ro = 25, ct = "diagram-connection-unfinished", Vo = 100, K
5645
5647
  t.move(o);
5646
5648
  const r = this.model.nodes.getAtCoordinates(e.x, e.y).filter((h) => h.id !== t.id && !h.isDescendantOf(t)).filter(
5647
5649
  (h) => h.type.childrenTypes.includes(t.type.id)
5648
- ), d = vi(
5650
+ ), d = bi(
5649
5651
  r
5650
5652
  ), c = d[d.length - 1];
5651
5653
  if (c !== t.parent && (t.type.canBeParentless || c !== void 0)) {
5652
- const h = c == null ? void 0 : c.getLastAncestor(), f = this.currentAction.from, y = new vo(
5654
+ const h = c == null ? void 0 : c.getLastAncestor(), f = this.currentAction.from, y = new ko(
5653
5655
  this,
5654
5656
  t.id,
5655
5657
  (n = t.parent) == null ? void 0 : n.id,
@@ -5697,8 +5699,8 @@ const zo = 12, D = 6, Ro = 25, ct = "diagram-connection-unfinished", Vo = 100, K
5697
5699
  ), I();
5698
5700
  }
5699
5701
  };
5700
- Ke.canvasCount = 0;
5701
- let mt = Ke;
5702
+ Ze.canvasCount = 0;
5703
+ let ft = Ze;
5702
5704
  class Ii {
5703
5705
  constructor() {
5704
5706
  this.grid = [[void 0]], this.offsetX = 0, this.offsetY = 0;
@@ -5811,7 +5813,7 @@ class Ii {
5811
5813
  }
5812
5814
  }
5813
5815
  }
5814
- class _o {
5816
+ class Oo {
5815
5817
  apply(e) {
5816
5818
  var s;
5817
5819
  if (e.nodes.length === 0)
@@ -5847,7 +5849,7 @@ const Li = (i, e, t, n) => {
5847
5849
  n
5848
5850
  );
5849
5851
  };
5850
- class Oo {
5852
+ class Do {
5851
5853
  apply(e) {
5852
5854
  var c;
5853
5855
  if (e.nodes.length === 0)
@@ -5918,7 +5920,7 @@ class ot {
5918
5920
  return e;
5919
5921
  }
5920
5922
  }
5921
- class Do {
5923
+ class Ho {
5922
5924
  apply(e) {
5923
5925
  var h;
5924
5926
  if (e.nodes.length === 0)
@@ -5943,7 +5945,7 @@ class Do {
5943
5945
  ], b = [
5944
5946
  m.coords[0] + m.width / 2,
5945
5947
  m.coords[1] + m.height / 2
5946
- ], k = hi(
5948
+ ], k = ci(
5947
5949
  y.coords,
5948
5950
  m.coords
5949
5951
  ), p = [m.coords[0], m.coords[1]];
@@ -5966,7 +5968,7 @@ class Do {
5966
5968
  return e;
5967
5969
  }
5968
5970
  }
5969
- class Ho {
5971
+ class Go {
5970
5972
  apply(e) {
5971
5973
  var l;
5972
5974
  if (e.nodes.length === 0)
@@ -5979,7 +5981,7 @@ class Ho {
5979
5981
  return e;
5980
5982
  }
5981
5983
  }
5982
- class Go {
5984
+ class Fo {
5983
5985
  apply(e) {
5984
5986
  var c;
5985
5987
  if (e.nodes.length === 0)
@@ -6044,7 +6046,7 @@ class Go {
6044
6046
  return e;
6045
6047
  }
6046
6048
  }
6047
- class Fo {
6049
+ class Bo {
6048
6050
  apply(e) {
6049
6051
  var c;
6050
6052
  if (e.nodes.length === 0)
@@ -6060,7 +6062,7 @@ class Fo {
6060
6062
  for (; l.length > 0; ) {
6061
6063
  const h = l[0];
6062
6064
  l.splice(0, 1);
6063
- const f = new yt(void 0, h);
6065
+ const f = new pt(void 0, h);
6064
6066
  Ei(f, l), o.push(f);
6065
6067
  }
6066
6068
  const s = [];
@@ -6101,12 +6103,12 @@ const Ei = (i, e) => {
6101
6103
  e[t].push(n), xi(n, e, t + 1);
6102
6104
  }
6103
6105
  };
6104
- class yt {
6106
+ class pt {
6105
6107
  constructor(e, t) {
6106
6108
  this.parent = e, this.branches = [], this.depth = 0, this.node = t;
6107
6109
  }
6108
6110
  addBranch(e) {
6109
- const t = new yt(this, e);
6111
+ const t = new pt(this, e);
6110
6112
  return t.depth = this.depth + 1, this.branches.push(t), t;
6111
6113
  }
6112
6114
  countBranchHeight() {
@@ -6120,7 +6122,7 @@ class yt {
6120
6122
  }
6121
6123
  }
6122
6124
  }
6123
- class Bo {
6125
+ class Uo {
6124
6126
  apply(e) {
6125
6127
  var l;
6126
6128
  if (e.nodes.length === 0)
@@ -6133,17 +6135,17 @@ class Bo {
6133
6135
  return e;
6134
6136
  }
6135
6137
  }
6136
- const li = {
6137
- adjacency: new _o(),
6138
+ const ai = {
6139
+ adjacency: new Oo(),
6138
6140
  breadth: new ot(),
6139
- "breadth-adjacency": new Oo(),
6140
- force: new Do(),
6141
- horizontal: new Ho(),
6142
- priority: new Go(),
6143
- tree: new Fo(),
6144
- vertical: new Bo()
6145
- }, Uo = ci({}), Ie = ci({});
6146
- class jo {
6141
+ "breadth-adjacency": new Do(),
6142
+ force: new Ho(),
6143
+ horizontal: new Go(),
6144
+ priority: new Fo(),
6145
+ tree: new Bo(),
6146
+ vertical: new Uo()
6147
+ }, jo = di({}), Ie = di({});
6148
+ class Yo {
6147
6149
  constructor(e, t) {
6148
6150
  this.onTitleChange = e, this.onValueSetChange = t;
6149
6151
  }
@@ -6160,10 +6162,9 @@ class jo {
6160
6162
  this._valueSet = e, this.onValueSetChange(e);
6161
6163
  }
6162
6164
  highlightProperty(...e) {
6163
- console.log("highlightProperty", e);
6164
6165
  }
6165
6166
  }
6166
- const bt = ({
6167
+ const yt = ({
6167
6168
  direction: i,
6168
6169
  collapsableSelector: e,
6169
6170
  collapsableAdditionalSelector: t,
@@ -6208,7 +6209,7 @@ const bt = ({
6208
6209
  children: /* @__PURE__ */ w("div", { className: f() })
6209
6210
  }
6210
6211
  ) });
6211
- }, Yo = () => {
6212
+ }, Xo = () => {
6212
6213
  const i = He(Ie), e = le(null), [t, n] = G([]);
6213
6214
  zi(i.validatorChange$, i.diagramChange$).pipe(
6214
6215
  Ri(() => a())
@@ -6244,7 +6245,7 @@ const bt = ({
6244
6245
  " errors found"
6245
6246
  ] }),
6246
6247
  /* @__PURE__ */ w("div", { className: "daga-collapse-button-container", children: /* @__PURE__ */ w(
6247
- bt,
6248
+ yt,
6248
6249
  {
6249
6250
  collapsableSelector: e,
6250
6251
  collapsableAdditionalSelector: ".daga-error-panel",
@@ -6266,7 +6267,7 @@ const bt = ({
6266
6267
  s
6267
6268
  )) }) })
6268
6269
  ] }) });
6269
- }, Xo = 200, di = (i) => (i || "").toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g, ""), Ti = ({
6270
+ }, Wo = 200, li = (i) => (i || "").toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g, ""), Ti = ({
6270
6271
  disabled: i,
6271
6272
  options: e,
6272
6273
  value: t,
@@ -6305,15 +6306,15 @@ const bt = ({
6305
6306
  }
6306
6307
  }, p = () => {
6307
6308
  if (!i) {
6308
- const N = di(l.trim());
6309
+ const N = li(l.trim());
6309
6310
  d([]), h([]), y([]), m([]);
6310
6311
  for (const R of e) {
6311
- const O = di(R.label).indexOf(N);
6312
+ const O = li(R.label).indexOf(N);
6312
6313
  if (O >= 0) {
6313
- const Y = R.label.substring(0, O), H = R.label.substring(
6314
+ const Y = R.label.substring(0, O), D = R.label.substring(
6314
6315
  O,
6315
6316
  O + N.length
6316
- ), Q = R.label.substring(
6317
+ ), Z = R.label.substring(
6317
6318
  O + N.length
6318
6319
  );
6319
6320
  d((re) => [...re, R]), h((re) => [
@@ -6321,10 +6322,10 @@ const bt = ({
6321
6322
  Y
6322
6323
  ]), y((re) => [
6323
6324
  ...re,
6324
- H
6325
+ D
6325
6326
  ]), m((re) => [
6326
6327
  ...re,
6327
- Q
6328
+ Z
6328
6329
  ]);
6329
6330
  }
6330
6331
  }
@@ -6341,7 +6342,7 @@ const bt = ({
6341
6342
  }, E = () => {
6342
6343
  setTimeout(() => {
6343
6344
  S();
6344
- }, Xo);
6345
+ }, Wo);
6345
6346
  }, z = (N) => {
6346
6347
  var K;
6347
6348
  const R = (K = a.current) == null ? void 0 : K.querySelectorAll("li")[N];
@@ -6391,7 +6392,7 @@ const bt = ({
6391
6392
  ]
6392
6393
  }
6393
6394
  );
6394
- }, Wo = (i, e) => {
6395
+ }, Zo = (i, e) => {
6395
6396
  var t;
6396
6397
  return ((t = i.find((n) => n.key === e)) == null ? void 0 : t.label) || `${e}`;
6397
6398
  }, Ko = ({
@@ -6403,7 +6404,7 @@ const bt = ({
6403
6404
  }) => {
6404
6405
  const [l, o] = G(), [s, r] = G([]), [d, c] = G([]);
6405
6406
  Se(() => {
6406
- const u = n.length === 0, b = n.map((k) => Wo(t, k));
6407
+ const u = n.length === 0, b = n.map((k) => Zo(t, k));
6407
6408
  r(b), u && a(n), m();
6408
6409
  }, [n, t]);
6409
6410
  const h = (u) => {
@@ -6450,7 +6451,7 @@ const bt = ({
6450
6451
  /* @__PURE__ */ w("button", { className: "daga-property-button", onClick: y, children: /* @__PURE__ */ w("div", { className: "daga-icon daga-add-icon" }) })
6451
6452
  ] })
6452
6453
  ] });
6453
- }, Zo = ({
6454
+ }, qo = ({
6454
6455
  disabled: i,
6455
6456
  allowRepeats: e,
6456
6457
  value: t,
@@ -6513,7 +6514,7 @@ const bt = ({
6513
6514
  /* @__PURE__ */ w("button", { className: "daga-property-button", onClick: d, children: /* @__PURE__ */ w("div", { className: "daga-icon daga-add-icon" }) })
6514
6515
  ] })
6515
6516
  ] });
6516
- }, qo = ({
6517
+ }, Jo = ({
6517
6518
  disabled: i,
6518
6519
  value: e,
6519
6520
  onChange: t
@@ -6554,7 +6555,7 @@ const bt = ({
6554
6555
  const k = {};
6555
6556
  Object.keys(e).forEach((p) => {
6556
6557
  k[p] = e[p];
6557
- }), k[u] = b, console.log("addToValue", k), t(k), a(""), o("");
6558
+ }), k[u] = b, t(k), a(""), o("");
6558
6559
  }
6559
6560
  }, y = () => {
6560
6561
  a("");
@@ -6770,7 +6771,7 @@ const bt = ({
6770
6771
  }
6771
6772
  ),
6772
6773
  (d.type === B.TextList || d.type === B.TextSet) && /* @__PURE__ */ w(
6773
- Zo,
6774
+ qo,
6774
6775
  {
6775
6776
  disabled: !d.editable || !a,
6776
6777
  allowRepeats: d.type === B.TextList,
@@ -6779,7 +6780,7 @@ const bt = ({
6779
6780
  }
6780
6781
  ),
6781
6782
  d.type === B.TextMap && /* @__PURE__ */ w(
6782
- qo,
6783
+ Jo,
6783
6784
  {
6784
6785
  disabled: !d.editable || !a,
6785
6786
  value: i == null ? void 0 : i.getValue(d.name),
@@ -6895,7 +6896,7 @@ const bt = ({
6895
6896
  )
6896
6897
  ] })
6897
6898
  ] }),
6898
- r.type !== B.Object && /* @__PURE__ */ w("div", { className: "daga-property-value", children: Jo(i == null ? void 0 : i.getValue(r.name)) }),
6899
+ r.type !== B.Object && /* @__PURE__ */ w("div", { className: "daga-property-value", children: Qo(i == null ? void 0 : i.getValue(r.name)) }),
6899
6900
  r.type === B.Object && /* @__PURE__ */ w(
6900
6901
  Mi,
6901
6902
  {
@@ -6917,7 +6918,7 @@ const bt = ({
6917
6918
  r.name
6918
6919
  ))
6919
6920
  ] });
6920
- }, Jo = (i) => Array.isArray(i) ? i.join(", ") : gt(i) ? Object.entries(i).map((e) => e.map((t) => JSON.stringify(t)).join(": ")).join(", ") : i instanceof Date ? i.toLocaleString() : i == null ? "" : "" + i, Qo = ({ location: i, direction: e, width: t, title: n, valueSet: a, onValueChange: l }) => {
6921
+ }, Qo = (i) => Array.isArray(i) ? i.join(", ") : eo(i) ? Object.entries(i).map((e) => e.map((t) => JSON.stringify(t)).join(": ")).join(", ") : i instanceof Date ? i.toLocaleString() : i == null ? "" : "" + i, en = ({ location: i, direction: e, width: t, title: n, valueSet: a, onValueChange: l }) => {
6921
6922
  const o = le(null), [s, r] = G(!1), [d, c] = G(!1), h = () => T.select(o.current);
6922
6923
  return Se(() => {
6923
6924
  if (o.current)
@@ -6938,7 +6939,7 @@ const bt = ({
6938
6939
  className: `daga-panel daga-bottom daga-${i} daga-${e}`,
6939
6940
  children: [
6940
6941
  /* @__PURE__ */ w(
6941
- bt,
6942
+ yt,
6942
6943
  {
6943
6944
  disabled: !a || !a.propertySet || !a.propertySet.hasProperties(),
6944
6945
  collapsed: s,
@@ -6981,7 +6982,7 @@ const bt = ({
6981
6982
  ]
6982
6983
  }
6983
6984
  ) });
6984
- }, en = (i) => {
6985
+ }, tn = (i) => {
6985
6986
  const e = He(Ie), [t, n] = G(
6986
6987
  i.currentPalette || i.palettes[0]
6987
6988
  ), [a, l] = G(0), [o, s] = G(
@@ -7041,7 +7042,7 @@ const bt = ({
7041
7042
  var C;
7042
7043
  if (e.canUserPerformAction(A.AddNode)) {
7043
7044
  if (I($.Auto), k.style("position", "relative").style("left", 0).style("top", 0).style("z-index", "auto"), m.isUnique && e.model.nodes.find(
7044
- (Q) => !Q.removed && Q.type.id === m.id
7045
+ (Z) => !Z.removed && Z.type.id === m.id
7045
7046
  ) !== void 0)
7046
7047
  return;
7047
7048
  const E = e.getPointerLocationRelativeToScreen(S);
@@ -7065,13 +7066,13 @@ const bt = ({
7065
7066
  M[0],
7066
7067
  M[1]
7067
7068
  ).filter(
7068
- (Q) => Q.type.childrenTypes.includes(m.id)
7069
- ), K = vi(
7069
+ (Z) => Z.type.childrenTypes.includes(m.id)
7070
+ ), K = bi(
7070
7071
  R
7071
7072
  ), O = K[K.length - 1];
7072
7073
  if (!m.canBeParentless && O === void 0)
7073
7074
  return;
7074
- const Y = O == null ? void 0 : O.getLastAncestor(), H = new bo(
7075
+ const Y = O == null ? void 0 : O.getLastAncestor(), D = new vo(
7075
7076
  e,
7076
7077
  m,
7077
7078
  F,
@@ -7082,7 +7083,7 @@ const bt = ({
7082
7083
  u.label,
7083
7084
  u.values
7084
7085
  );
7085
- H.do(), e == null || e.actionStack.add(H), I();
7086
+ D.do(), e == null || e.actionStack.add(D), I();
7086
7087
  }
7087
7088
  })
7088
7089
  ).append("svg").attr("class", `palette-node ${m.id}`).style("position", "relative").style("left", 0).style("top", 0).style("width", "100%").style("height", "100%"), p = u.look || m.defaultLook;
@@ -7131,7 +7132,7 @@ const bt = ({
7131
7132
  };
7132
7133
  k.append("text").attr(
7133
7134
  "transform",
7134
- `translate(${(J(S) + m.defaultWidth) / 2},${(W(S) + m.defaultHeight) / 2})`
7135
+ `translate(${(Q(S) + m.defaultWidth) / 2},${(W(S) + m.defaultHeight) / 2})`
7135
7136
  ).attr("x", 0).attr("y", 0).attr("font-size", `${S.fontSize}px`).attr("text-anchor", "middle").attr("font-family", S.fontFamily).attr("font-weight", 400).attr("fill", S.color).attr("stroke", "none").style("font-kerning", "none").style("user-select", "none").text(u.label);
7136
7137
  }
7137
7138
  }, g = (m, u, b) => {
@@ -7144,7 +7145,7 @@ const bt = ({
7144
7145
  k.append("path").attr(
7145
7146
  "d",
7146
7147
  ut(
7147
- Ze.Rectangle,
7148
+ Ke.Rectangle,
7148
7149
  0,
7149
7150
  0,
7150
7151
  u.width,
@@ -7174,7 +7175,7 @@ const bt = ({
7174
7175
  className: `daga-panel daga-${i.location} daga-${i.direction}`,
7175
7176
  children: [
7176
7177
  /* @__PURE__ */ w(
7177
- bt,
7178
+ yt,
7178
7179
  {
7179
7180
  direction: i.direction,
7180
7181
  collapsableSelector: r,
@@ -7200,7 +7201,7 @@ const bt = ({
7200
7201
  ]
7201
7202
  }
7202
7203
  ) });
7203
- }, tn = ({
7204
+ }, on = ({
7204
7205
  location: i,
7205
7206
  direction: e,
7206
7207
  enableAction: t,
@@ -7231,18 +7232,18 @@ const bt = ({
7231
7232
  ).style(`margin-${y}`, "-1rem").style(c, "0rem").style("transform", `${h}(0)`).style("transform-origin", f);
7232
7233
  });
7233
7234
  const b = async () => {
7234
- const H = T.select(
7235
+ const D = T.select(
7235
7236
  g.current
7236
7237
  );
7237
7238
  if (!d)
7238
7239
  if (r) {
7239
7240
  r = !1;
7240
- const Ge = `${4 * H.selectChildren().size()}rem`;
7241
- H.transition().duration(500).ease(T.easeLinear).style(c, Ge).style("transform", `${h}(1)`), setTimeout(() => {
7241
+ const Ge = `${4 * D.selectChildren().size()}rem`;
7242
+ D.transition().duration(500).ease(T.easeLinear).style(c, Ge).style("transform", `${h}(1)`), setTimeout(() => {
7242
7243
  d = !1;
7243
7244
  }, 500);
7244
7245
  } else
7245
- r = !0, H.transition().duration(500).ease(T.easeLinear).style(c, "0rem").style("transform", `${h}(0)`), setTimeout(() => {
7246
+ r = !0, D.transition().duration(500).ease(T.easeLinear).style(c, "0rem").style("transform", `${h}(0)`), setTimeout(() => {
7246
7247
  d = !1;
7247
7248
  }, 500);
7248
7249
  }, k = He(Ie), p = () => {
@@ -7252,14 +7253,14 @@ const bt = ({
7252
7253
  }, C = () => {
7253
7254
  k.center();
7254
7255
  }, E = () => {
7255
- k.layoutFormat && k.layoutFormat in li && li[k.layoutFormat].apply(k.model);
7256
+ k.layoutFormat && k.layoutFormat in ai && ai[k.layoutFormat].apply(k.model);
7256
7257
  }, z = () => {
7257
7258
  s = !s, T.select(
7258
7259
  u.current
7259
7260
  ).classed("daga-on", s).classed("daga-off", !s);
7260
- const H = k.getPriorityThresholdOptions();
7261
- H && H.length >= 2 && k.setPriorityThreshold(
7262
- H[s ? 1 : 0]
7261
+ const D = k.getPriorityThresholdOptions();
7262
+ D && D.length >= 2 && k.setPriorityThreshold(
7263
+ D[s ? 1 : 0]
7263
7264
  );
7264
7265
  }, M = () => {
7265
7266
  k.actionStack.undo();
@@ -7277,6 +7278,11 @@ const bt = ({
7277
7278
  k.multipleSelectionOn = !0, T.select(
7278
7279
  m.current
7279
7280
  ).classed("daga-on", !0).classed("daga-off", !1);
7281
+ const D = k.diagramEvent$.subscribe((Z) => {
7282
+ Z.type === Ci.Selection && (T.select(
7283
+ m.current
7284
+ ).classed("daga-on", !1).classed("daga-off", !0), D.unsubscribe());
7285
+ });
7280
7286
  };
7281
7287
  return /* @__PURE__ */ w("daga-diagram-buttons", { children: /* @__PURE__ */ P(
7282
7288
  "div",
@@ -7301,48 +7307,40 @@ const bt = ({
7301
7307
  ]
7302
7308
  }
7303
7309
  ) });
7304
- }, rn = ({
7310
+ }, an = ({
7305
7311
  config: i,
7306
7312
  model: e,
7307
7313
  onCanvasCreated: t,
7308
7314
  onDiagramEvent: n,
7309
7315
  onModelChange: a
7310
7316
  }) => {
7311
- var z, M, F, N, R, K, O, Y, H, Q, re, Ge, vt, kt, wt, Ct, At, St, It, Lt, Et, xt, Tt, $t, Mt, Nt, Pt, zt, Rt, Vt, _t, Ot, Dt, Ht, Gt, Ft, Bt, Ut, jt, Yt, Xt, Wt, Kt, Zt, qt;
7312
- const l = new Ci(), o = new Si(), s = le(null), r = le(void 0), d = le(!1), c = [], [h, f] = G(void 0), [y, g] = G(void 0), m = {
7317
+ var z, M, F, N, R, K, O, Y, D, Z, re, Ge, bt, vt, kt, wt, Ct, At, St, It, Lt, Et, xt, Tt, $t, Mt, Nt, Pt, zt, Rt, Vt, _t, Ot, Dt, Ht, Gt, Ft, Bt, Ut, jt, Yt, Xt, Wt, Zt, Kt;
7318
+ const l = new wi(), o = new Si(), s = le(null), r = le(void 0), d = le(!1), c = [], [h, f] = G(void 0), [y, g] = G(void 0), m = {
7313
7319
  zoomIn: () => {
7314
- console.log("zoomIn");
7315
7320
  },
7316
7321
  zoomOut: () => {
7317
- console.log("zoomOut");
7318
7322
  },
7319
7323
  center: () => {
7320
- console.log("center");
7321
7324
  },
7322
7325
  layout: () => {
7323
- console.log("layout");
7324
7326
  },
7325
7327
  filter: () => {
7326
- console.log("filter");
7327
7328
  },
7328
7329
  undo: () => {
7329
- console.log("undo");
7330
7330
  },
7331
7331
  redo: () => {
7332
- console.log("redo");
7333
7332
  }
7334
7333
  }, u = {
7335
7334
  refreshPalette: () => {
7336
- console.log("refreshPalette");
7337
7335
  }
7338
- }, b = new jo(
7336
+ }, b = new Yo(
7339
7337
  (ae) => f(ae),
7340
7338
  (ae) => g(ae)
7341
7339
  ), k = {
7342
7340
  diagramButtons: m,
7343
7341
  palette: u,
7344
7342
  propertyEditor: b
7345
- }, p = (ae = !1) => ((!r.current || ae) && (c.forEach((me) => me.unsubscribe()), r.current = new mt(k, i)), r.current), S = p(), C = (ae) => {
7343
+ }, p = (ae = !1) => ((!r.current || ae) && (c.forEach((me) => me.unsubscribe()), r.current = new ft(k, i)), r.current), S = p(), C = (ae) => {
7346
7344
  S.initView(ae), c.push(
7347
7345
  S.diagramEvent$.subscribe((me) => {
7348
7346
  n == null || n(me);
@@ -7362,54 +7360,54 @@ const bt = ({
7362
7360
  e && l.import(S.model, e);
7363
7361
  }, [e]);
7364
7362
  const E = (ae, me) => {
7365
- var Jt;
7363
+ var qt;
7366
7364
  if (y !== void 0 && ae.editable && !Ae(y.getValue(ae.name), me)) {
7367
7365
  const Fe = new ke(
7368
7366
  y.propertySet,
7369
7367
  y.rootElement
7370
7368
  );
7371
- Fe.setValues(y.values), Fe.setValue(ae.name, me), b.valueSet = Fe, y.rootElement.valueSet = Fe, (Jt = S.propertyEditorChanges$) == null || Jt.next();
7369
+ Fe.setValues(y.getValues()), Fe.setValue(ae.name, me), b.valueSet = Fe, y.rootElement.valueSet = Fe, (qt = S.propertyEditorChanges$) == null || qt.next();
7372
7370
  }
7373
7371
  };
7374
- return /* @__PURE__ */ w("daga-diagram", { children: /* @__PURE__ */ w(Uo.Provider, { value: i, children: /* @__PURE__ */ w(Ie.Provider, { value: S, children: /* @__PURE__ */ P("daga-diagram-editor", { children: [
7372
+ return /* @__PURE__ */ w("daga-diagram", { children: /* @__PURE__ */ w(jo.Provider, { value: i, children: /* @__PURE__ */ w(Ie.Provider, { value: S, children: /* @__PURE__ */ P("daga-diagram-editor", { children: [
7375
7373
  /* @__PURE__ */ w("div", { className: "daga-append-to", ref: s }),
7376
7374
  /* @__PURE__ */ P(Ie.Provider, { value: S, children: [
7377
7375
  ((z = i.components) == null ? void 0 : z.buttons) !== void 0 && ((F = (M = i.components) == null ? void 0 : M.buttons) == null ? void 0 : F.enabled) !== !1 && /* @__PURE__ */ w(
7378
- tn,
7376
+ on,
7379
7377
  {
7380
7378
  location: ((R = (N = i.components) == null ? void 0 : N.buttons) == null ? void 0 : R.location) || je.BottomRight,
7381
7379
  direction: ((O = (K = i.components) == null ? void 0 : K.buttons) == null ? void 0 : O.direction) || v.Top,
7382
- enableAction: ((H = (Y = i.components) == null ? void 0 : Y.buttons) == null ? void 0 : H.enableAction) === !0,
7383
- enableFilter: ((re = (Q = i.components) == null ? void 0 : Q.buttons) == null ? void 0 : re.enableFilter) === !0,
7384
- enableLayout: ((vt = (Ge = i.components) == null ? void 0 : Ge.buttons) == null ? void 0 : vt.enableLayout) === !0,
7385
- enableSelection: ((wt = (kt = i.components) == null ? void 0 : kt.buttons) == null ? void 0 : wt.enableSelection) === !0,
7386
- enableZoom: ((At = (Ct = i.components) == null ? void 0 : Ct.buttons) == null ? void 0 : At.enableZoom) !== !1
7380
+ enableAction: ((D = (Y = i.components) == null ? void 0 : Y.buttons) == null ? void 0 : D.enableAction) !== !1,
7381
+ enableFilter: ((re = (Z = i.components) == null ? void 0 : Z.buttons) == null ? void 0 : re.enableFilter) === !0,
7382
+ enableLayout: ((bt = (Ge = i.components) == null ? void 0 : Ge.buttons) == null ? void 0 : bt.enableLayout) === !0,
7383
+ enableSelection: ((kt = (vt = i.components) == null ? void 0 : vt.buttons) == null ? void 0 : kt.enableSelection) !== !1,
7384
+ enableZoom: ((Ct = (wt = i.components) == null ? void 0 : wt.buttons) == null ? void 0 : Ct.enableZoom) !== !1
7387
7385
  }
7388
7386
  ),
7389
- ((St = i.components) == null ? void 0 : St.palette) !== void 0 && ((Lt = (It = i.components) == null ? void 0 : It.palette) == null ? void 0 : Lt.enabled) !== !1 && ((xt = (Et = i.components) == null ? void 0 : Et.palette) == null ? void 0 : xt.sections) && (((Mt = ($t = (Tt = i.components) == null ? void 0 : Tt.palette) == null ? void 0 : $t.sections) == null ? void 0 : Mt.length) || 0) > 0 && /* @__PURE__ */ w(
7390
- en,
7387
+ ((At = i.components) == null ? void 0 : At.palette) !== void 0 && ((It = (St = i.components) == null ? void 0 : St.palette) == null ? void 0 : It.enabled) !== !1 && ((Et = (Lt = i.components) == null ? void 0 : Lt.palette) == null ? void 0 : Et.sections) && ((($t = (Tt = (xt = i.components) == null ? void 0 : xt.palette) == null ? void 0 : Tt.sections) == null ? void 0 : $t.length) || 0) > 0 && /* @__PURE__ */ w(
7388
+ tn,
7391
7389
  {
7392
- location: ((Pt = (Nt = i.components) == null ? void 0 : Nt.palette) == null ? void 0 : Pt.location) || je.TopLeft,
7393
- direction: ((Rt = (zt = i.components) == null ? void 0 : zt.palette) == null ? void 0 : Rt.direction) || v.Bottom,
7394
- width: ((_t = (Vt = i.components) == null ? void 0 : Vt.palette) == null ? void 0 : _t.width) || "12rem",
7395
- palettes: ((Dt = (Ot = i.components) == null ? void 0 : Ot.palette) == null ? void 0 : Dt.sections) || []
7390
+ location: ((Nt = (Mt = i.components) == null ? void 0 : Mt.palette) == null ? void 0 : Nt.location) || je.TopLeft,
7391
+ direction: ((zt = (Pt = i.components) == null ? void 0 : Pt.palette) == null ? void 0 : zt.direction) || v.Bottom,
7392
+ width: ((Vt = (Rt = i.components) == null ? void 0 : Rt.palette) == null ? void 0 : Vt.width) || "12rem",
7393
+ palettes: ((Ot = (_t = i.components) == null ? void 0 : _t.palette) == null ? void 0 : Ot.sections) || []
7396
7394
  }
7397
7395
  ),
7398
- ((Ht = i.components) == null ? void 0 : Ht.propertyEditor) !== void 0 && ((Ft = (Gt = i.components) == null ? void 0 : Gt.propertyEditor) == null ? void 0 : Ft.enabled) !== !1 && /* @__PURE__ */ w(
7399
- Qo,
7396
+ ((Dt = i.components) == null ? void 0 : Dt.propertyEditor) !== void 0 && ((Gt = (Ht = i.components) == null ? void 0 : Ht.propertyEditor) == null ? void 0 : Gt.enabled) !== !1 && /* @__PURE__ */ w(
7397
+ en,
7400
7398
  {
7401
- location: ((Ut = (Bt = i.components) == null ? void 0 : Bt.propertyEditor) == null ? void 0 : Ut.location) || je.TopRight,
7402
- direction: ((Yt = (jt = i.components) == null ? void 0 : jt.propertyEditor) == null ? void 0 : Yt.direction) || v.Bottom,
7403
- width: ((Wt = (Xt = i.components) == null ? void 0 : Xt.propertyEditor) == null ? void 0 : Wt.width) || "24rem",
7399
+ location: ((Bt = (Ft = i.components) == null ? void 0 : Ft.propertyEditor) == null ? void 0 : Bt.location) || je.TopRight,
7400
+ direction: ((jt = (Ut = i.components) == null ? void 0 : Ut.propertyEditor) == null ? void 0 : jt.direction) || v.Bottom,
7401
+ width: ((Xt = (Yt = i.components) == null ? void 0 : Yt.propertyEditor) == null ? void 0 : Xt.width) || "24rem",
7404
7402
  title: h,
7405
7403
  valueSet: y,
7406
7404
  onValueChange: E
7407
7405
  }
7408
7406
  ),
7409
- ((Kt = i.components) == null ? void 0 : Kt.errors) !== void 0 && ((qt = (Zt = i.components) == null ? void 0 : Zt.errors) == null ? void 0 : qt.enabled) !== !1 && /* @__PURE__ */ w(Yo, {})
7407
+ ((Wt = i.components) == null ? void 0 : Wt.errors) !== void 0 && ((Kt = (Zt = i.components) == null ? void 0 : Zt.errors) == null ? void 0 : Kt.enabled) !== !1 && /* @__PURE__ */ w(Xo, {})
7410
7408
  ] })
7411
7409
  ] }) }) }) });
7412
7410
  };
7413
7411
  export {
7414
- rn as DagaDiagram
7412
+ an as DagaDiagram
7415
7413
  };