@metadev/daga-react 4.2.9 → 4.2.10

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,9 +1,9 @@
1
- import { jsx as v, jsxs as M, Fragment as no } from "react/jsx-runtime";
1
+ import { jsx as v, jsxs as M, Fragment as ro } from "react/jsx-runtime";
2
2
  import * as x from "d3";
3
- import { debounceTime as ro, Subject as Yt, merge as ao, map as lo } from "rxjs";
4
- import { createContext as Ve, useState as U, useContext as Ft, useRef as rt, useEffect as Ct, useMemo as co } from "react";
5
- var g = /* @__PURE__ */ ((s) => (s.Bottom = "bottom", s.Left = "left", s.Right = "right", s.Top = "top", s))(g || {}), jt = /* @__PURE__ */ ((s) => (s.BottomLeft = "bottom-left", s.BottomRight = "bottom-right", s.TopLeft = "top-left", s.TopRight = "top-right", s))(jt || {}), Lt = /* @__PURE__ */ ((s) => (s.Left = "left", s.Center = "center", s.Right = "right", s))(Lt || {}), Zt = /* @__PURE__ */ ((s) => (s.Top = "top", s.Center = "center", s.Bottom = "bottom", s))(Zt || {});
6
- const At = (s) => [Math.round(s[0]), Math.round(s[1])], ut = (s, t, e) => t < e ? t <= s && s <= e : e <= s && s <= t, $e = (s, t, e) => (s - t[0]) / (t[1] - t[0]) * (e[1] - e[0]) + e[0], Kt = (s, t, e, a, l, n, i) => {
3
+ import { debounceTime as ao, Subject as Xt, merge as lo, map as co } from "rxjs";
4
+ import { createContext as Oe, useState as U, useContext as Ut, useRef as rt, useEffect as Ct, useMemo as ho } from "react";
5
+ var g = /* @__PURE__ */ ((s) => (s.Bottom = "bottom", s.Left = "left", s.Right = "right", s.Top = "top", s))(g || {}), Wt = /* @__PURE__ */ ((s) => (s.BottomLeft = "bottom-left", s.BottomRight = "bottom-right", s.TopLeft = "top-left", s.TopRight = "top-right", s))(Wt || {}), Lt = /* @__PURE__ */ ((s) => (s.Left = "left", s.Center = "center", s.Right = "right", s))(Lt || {}), Kt = /* @__PURE__ */ ((s) => (s.Top = "top", s.Center = "center", s.Bottom = "bottom", s))(Kt || {});
6
+ const At = (s) => [Math.round(s[0]), Math.round(s[1])], ut = (s, t, e) => t < e ? t <= s && s <= e : e <= s && s <= t, Ie = (s, t, e) => (s - t[0]) / (t[1] - t[0]) * (e[1] - e[0]) + e[0], qt = (s, t, e, a, l, n, i) => {
7
7
  const r = (() => {
8
8
  switch (n) {
9
9
  case "start":
@@ -16,7 +16,7 @@ const At = (s) => [Math.round(s[0]), Math.round(s[1])], ut = (s, t, e) => t < e
16
16
  }
17
17
  case "floating":
18
18
  default:
19
- return $e(s[0], t, a);
19
+ return Ie(s[0], t, a);
20
20
  }
21
21
  })(), o = (() => {
22
22
  switch (i) {
@@ -30,11 +30,11 @@ const At = (s) => [Math.round(s[0]), Math.round(s[1])], ut = (s, t, e) => t < e
30
30
  }
31
31
  case "floating":
32
32
  default:
33
- return $e(s[1], e, l);
33
+ return Ie(s[1], e, l);
34
34
  }
35
35
  })();
36
36
  return [r, o];
37
- }, Oe = (s, t) => ((s[0] - t[0]) ** 2 + (s[1] - t[1]) ** 2) ** 0.5, ho = (s, t) => (ut(
37
+ }, He = (s, t) => ((s[0] - t[0]) ** 2 + (s[1] - t[1]) ** 2) ** 0.5, go = (s, t) => (ut(
38
38
  s[0][0],
39
39
  t[0][0],
40
40
  t[1][0]
@@ -67,10 +67,10 @@ const At = (s) => [Math.round(s[0]), Math.round(s[1])], ut = (s, t, e) => t < e
67
67
  s[1][1],
68
68
  s[0][1]
69
69
  ));
70
- var $ = /* @__PURE__ */ ((s) => (s.Blur = "blur", s.Change = "change", s.Click = "click", s.ContextMenu = "contextmenu", s.DoubleClick = "dblclick", s.Focus = "focus", s.FocusIn = "focusin", s.FocusOut = "focusout", s.Input = "input", s.KeyDown = "keydown", s.KeyUp = "keyup", s.MouseDown = "mousedown", s.MouseEnter = "mouseenter", s.MouseLeave = "mouseleave", s.MouseMove = "mousemove", s.MouseOut = "mouseout", s.MouseOver = "mouseover", s.MouseUp = "mouseup", s.TouchStart = "touchstart", s.TouchEnd = "touchend", s.Wheel = "wheel", s))($ || {}), Z = /* @__PURE__ */ ((s) => (s.Alt = "Alt", s.AltGraph = "AltGraph", s.ArrowDown = "ArrowDown", s.ArrowLeft = "ArrowLeft", s.ArrowRight = "ArrowRight", s.ArrowUp = "ArrowUp", s.Backspace = "Backspace", s.Control = "Control", s.Delete = "Delete", s.End = "End", s.Enter = "Enter", s.Escape = "Escape", s.Home = "Home", s.OS = "OS", s.PageDown = "PageDown", s.PageUp = "PageUp", s.Shift = "Shift", s.Tab = "Tab", s))(Z || {}), I = /* @__PURE__ */ ((s) => (s.Drag = "drag", s.Start = "start", s.End = "end", s))(I || {}), ge = /* @__PURE__ */ ((s) => (s.Zoom = "zoom", s.Start = "start", s.End = "end", s))(ge || {});
71
- const fe = (s) => s.replace(/([!"#$%&'()*+,\-./:;<=>?@[\\\]^`{|}])/g, "\\$1");
72
- var He = /* @__PURE__ */ ((s) => (s.Straight = "straight", s.Bezier = "bezier", s.Square = "square", s))(He || {}), ye = /* @__PURE__ */ ((s) => (s.Solid = "solid", s.Dashed = "dashed", s.GappedDashes = "gapped-dashes", s.Dotted = "dotted", s))(ye || {});
73
- const go = 20, fo = (s, t, e, a, l) => {
70
+ var $ = /* @__PURE__ */ ((s) => (s.Blur = "blur", s.Change = "change", s.Click = "click", s.ContextMenu = "contextmenu", s.DoubleClick = "dblclick", s.Focus = "focus", s.FocusIn = "focusin", s.FocusOut = "focusout", s.Input = "input", s.KeyDown = "keydown", s.KeyUp = "keyup", s.MouseDown = "mousedown", s.MouseEnter = "mouseenter", s.MouseLeave = "mouseleave", s.MouseMove = "mousemove", s.MouseOut = "mouseout", s.MouseOver = "mouseover", s.MouseUp = "mouseup", s.TouchStart = "touchstart", s.TouchEnd = "touchend", s.Wheel = "wheel", s))($ || {}), Z = /* @__PURE__ */ ((s) => (s.Alt = "Alt", s.AltGraph = "AltGraph", s.ArrowDown = "ArrowDown", s.ArrowLeft = "ArrowLeft", s.ArrowRight = "ArrowRight", s.ArrowUp = "ArrowUp", s.Backspace = "Backspace", s.Control = "Control", s.Delete = "Delete", s.End = "End", s.Enter = "Enter", s.Escape = "Escape", s.Home = "Home", s.OS = "OS", s.PageDown = "PageDown", s.PageUp = "PageUp", s.Shift = "Shift", s.Tab = "Tab", s))(Z || {}), I = /* @__PURE__ */ ((s) => (s.Drag = "drag", s.Start = "start", s.End = "end", s))(I || {}), fe = /* @__PURE__ */ ((s) => (s.Zoom = "zoom", s.Start = "start", s.End = "end", s))(fe || {});
71
+ const ue = (s) => s.replace(/([!"#$%&'()*+,\-./:;<=>?@[\\\]^`{|}])/g, "\\$1");
72
+ var _e = /* @__PURE__ */ ((s) => (s.Straight = "straight", s.Bezier = "bezier", s.Square = "square", s))(_e || {}), be = /* @__PURE__ */ ((s) => (s.Solid = "solid", s.Dashed = "dashed", s.GappedDashes = "gapped-dashes", s.Dotted = "dotted", s))(be || {});
73
+ const fo = 20, uo = (s, t, e, a, l) => {
74
74
  if (typeof s == "function")
75
75
  return s(
76
76
  t,
@@ -83,7 +83,7 @@ const go = 20, fo = (s, t, e, a, l) => {
83
83
  if (t.length === 1)
84
84
  return `M ${t[0][0]} ${t[0][1]}`;
85
85
  {
86
- l = l || go;
86
+ l = l || fo;
87
87
  let n = "", i, r;
88
88
  switch (s) {
89
89
  case "straight":
@@ -272,7 +272,7 @@ const go = 20, fo = (s, t, e, a, l) => {
272
272
  }
273
273
  return n;
274
274
  }
275
- }, ue = (s, t) => {
275
+ }, pe = (s, t) => {
276
276
  switch (s) {
277
277
  case "dotted":
278
278
  return `${t}`;
@@ -289,63 +289,70 @@ const go = 20, fo = (s, t, e, a, l) => {
289
289
  return e >= 0 && s.splice(e, 1), s;
290
290
  };
291
291
  var Tt = /* @__PURE__ */ ((s) => (s.Ellipse = "ellipse", s.Empty = "empty", s.Folder = "folder", s.Hexagon = "hexagon", s.Octagon = "octagon", s.Pill = "pill", s.Rectangle = "rectangle", s.Rhombus = "rhombus", s.RoundedRectangle = "rounded-rectangle", s.StickyNote = "sticky-note", s))(Tt || {});
292
- const pe = (s, t, e, a, l) => {
292
+ const me = (s, t, e, a, l) => {
293
293
  if (typeof s == "function")
294
294
  return s(t, e, a, l);
295
295
  switch (s) {
296
296
  case "ellipse":
297
- return _e(t, e, a, l);
297
+ return Ge(t, e, a, l);
298
298
  case "empty":
299
- return uo();
299
+ return po();
300
300
  case "folder":
301
- return po(t, e, a, l);
302
- case "hexagon":
303
301
  return mo(t, e, a, l);
304
- case "octagon":
302
+ case "hexagon":
305
303
  return vo(t, e, a, l);
304
+ case "octagon":
305
+ return yo(t, e, a, l);
306
306
  case "pill":
307
- return Wt(t, e, a, l);
307
+ return Zt(t, e, a, l);
308
308
  case "rectangle":
309
- return Ie(t, e, a, l);
309
+ return Ae(t, e, a, l);
310
310
  case "rhombus":
311
- return yo(t, e, a, l);
312
- case "rounded-rectangle":
313
311
  return bo(t, e, a, l);
314
- case "sticky-note":
312
+ case "rounded-rectangle":
315
313
  return ko(t, e, a, l);
314
+ case "sticky-note":
315
+ return wo(t, e, a, l);
316
316
  default:
317
- return Ie(t, e, a, l);
317
+ return Ae(t, e, a, l);
318
318
  }
319
- }, _e = (s, t, e, a) => `M ${s + e / 2} ${t} A ${e / 2} ${a / 2} 0 0 0 ${s + e / 2} ${t + a} A ${e / 2} ${a / 2} 0 1 0 ${s + e / 2} ${t} Z`, uo = () => "Z", po = (s, t, e, a) => `M ${s} ${t} L ${s + e / 3} ${t} L ${s + e / 2} ${t + a / 6} L ${s + e} ${t + a / 6} L ${s + e} ${t + a} L ${s} ${t + a} Z`, mo = (s, t, e, a) => `M ${s + e / 4} ${t} L ${s + 3 * e / 4} ${t} L ${s + e} ${t + a / 2} L ${s + 3 * e / 4} ${t + a} L ${s + e / 4} ${t + a} L ${s} ${t + a / 2} Z`, vo = (s, t, e, a) => `M ${s + e / 4} ${t} L ${s + 3 * e / 4} ${t} L ${s + e} ${t + a / 4} L ${s + e} ${t + 3 * a / 4} L ${s + 3 * e / 4} ${t + a} L ${s + e / 4} ${t + a} L ${s} ${t + 3 * a / 4} L ${s} ${t + a / 4} L ${s + e / 4} ${t} Z`, Wt = (s, t, e, a) => a < e ? `M ${s + a / 2} ${t} L ${s + e - a / 2} ${t} A ${a / 2} ${a / 2} 0 0 1 ${s + e} ${t + a / 2} A ${a / 2} ${a / 2} 0 0 1 ${s + e - a / 2} ${t + a} L ${s + a / 2} ${t + a} A ${a / 2} ${a / 2} 0 0 1 ${s} ${t + a / 2} A ${a / 2} ${a / 2} 0 0 1 ${s + a / 2} ${t} Z` : a > e ? `M ${s} ${t + e / 2} L ${s} ${t + a - e / 2} A ${e / 2} ${e / 2} 0 0 0 ${s + e / 2} ${t + a} A ${e / 2} ${e / 2} 0 0 0 ${s + e} ${t + a - e / 2} L ${s + e} ${t + e / 2} A ${e / 2} ${e / 2} 0 0 0 ${s + e / 2} ${t} A ${e / 2} ${e / 2} 0 0 0 ${s} ${t + e / 2} Z` : _e(s, t, e, a), Ie = (s, t, e, a) => `M ${s} ${t} L ${s + e} ${t} L ${s + e} ${t + a} L ${s} ${t + a} Z`, yo = (s, t, e, a) => `M ${s + e / 2} ${t} L ${s + e} ${t + a / 2} L ${s + e / 2} ${t + a} L ${s} ${t + a / 2} Z`, bo = (s, t, e, a) => `M ${s + e / 4} ${t} L ${s + 3 * e / 4} ${t} A ${e / 4} ${a / 4} 0 0 1 ${s + e} ${t + a / 4} L ${s + e} ${t + 3 * a / 4} A ${e / 4} ${a / 4} 0 0 1 ${s + 3 * e / 4} ${t + a} L ${s + e / 4} ${t + a} A ${e / 4} ${a / 4} 0 0 1 ${s} ${t + 3 * a / 4} L ${s} ${t + a / 4} A ${e / 4} ${a / 4} 0 0 1 ${s + e / 4} ${t} Z`, ko = (s, t, e, a) => `M ${s} ${t} L ${s + 3 * e / 4} ${t} L ${s + 3 * e / 4} ${t + a / 4} L ${s + 3 * e / 4} ${t} L ${s + e} ${t + a / 4} L ${s + 3 * e / 4} ${t + a / 4} L ${s + e} ${t + a / 4} L ${s + e} ${t + a} L ${s} ${t + a} Z`;
319
+ }, Ge = (s, t, e, a) => `M ${s + e / 2} ${t} A ${e / 2} ${a / 2} 0 0 0 ${s + e / 2} ${t + a} A ${e / 2} ${a / 2} 0 1 0 ${s + e / 2} ${t} Z`, po = () => "Z", mo = (s, t, e, a) => `M ${s} ${t} L ${s + e / 3} ${t} L ${s + e / 2} ${t + a / 6} L ${s + e} ${t + a / 6} L ${s + e} ${t + a} L ${s} ${t + a} Z`, vo = (s, t, e, a) => `M ${s + e / 4} ${t} L ${s + 3 * e / 4} ${t} L ${s + e} ${t + a / 2} L ${s + 3 * e / 4} ${t + a} L ${s + e / 4} ${t + a} L ${s} ${t + a / 2} Z`, yo = (s, t, e, a) => `M ${s + e / 4} ${t} L ${s + 3 * e / 4} ${t} L ${s + e} ${t + a / 4} L ${s + e} ${t + 3 * a / 4} L ${s + 3 * e / 4} ${t + a} L ${s + e / 4} ${t + a} L ${s} ${t + 3 * a / 4} L ${s} ${t + a / 4} L ${s + e / 4} ${t} Z`, Zt = (s, t, e, a) => a < e ? `M ${s + a / 2} ${t} L ${s + e - a / 2} ${t} A ${a / 2} ${a / 2} 0 0 1 ${s + e} ${t + a / 2} A ${a / 2} ${a / 2} 0 0 1 ${s + e - a / 2} ${t + a} L ${s + a / 2} ${t + a} A ${a / 2} ${a / 2} 0 0 1 ${s} ${t + a / 2} A ${a / 2} ${a / 2} 0 0 1 ${s + a / 2} ${t} Z` : a > e ? `M ${s} ${t + e / 2} L ${s} ${t + a - e / 2} A ${e / 2} ${e / 2} 0 0 0 ${s + e / 2} ${t + a} A ${e / 2} ${e / 2} 0 0 0 ${s + e} ${t + a - e / 2} L ${s + e} ${t + e / 2} A ${e / 2} ${e / 2} 0 0 0 ${s + e / 2} ${t} A ${e / 2} ${e / 2} 0 0 0 ${s} ${t + e / 2} Z` : Ge(s, t, e, a), Ae = (s, t, e, a) => `M ${s} ${t} L ${s + e} ${t} L ${s + e} ${t + a} L ${s} ${t + a} Z`, bo = (s, t, e, a) => `M ${s + e / 2} ${t} L ${s + e} ${t + a / 2} L ${s + e / 2} ${t + a} L ${s} ${t + a / 2} Z`, ko = (s, t, e, a) => `M ${s + e / 4} ${t} L ${s + 3 * e / 4} ${t} A ${e / 4} ${a / 4} 0 0 1 ${s + e} ${t + a / 4} L ${s + e} ${t + 3 * a / 4} A ${e / 4} ${a / 4} 0 0 1 ${s + 3 * e / 4} ${t + a} L ${s + e / 4} ${t + a} A ${e / 4} ${a / 4} 0 0 1 ${s} ${t + 3 * a / 4} L ${s} ${t + a / 4} A ${e / 4} ${a / 4} 0 0 1 ${s + e / 4} ${t} Z`, wo = (s, t, e, a) => `M ${s} ${t} L ${s + 3 * e / 4} ${t} L ${s + 3 * e / 4} ${t + a / 4} L ${s + 3 * e / 4} ${t} L ${s + e} ${t + a / 4} L ${s + 3 * e / 4} ${t + a / 4} L ${s + e} ${t + a / 4} L ${s + e} ${t + a} L ${s} ${t + a} Z`;
320
320
  var L = /* @__PURE__ */ ((s) => (s.AllScroll = "all-scroll", s.Auto = "auto", s.Crosshair = "crosshair", s.EWResize = "ew-resize", s.Grab = "grab", s.Grabbing = "grabbing", s.Move = "move", s.NoDrop = "no-drop", s.NSResize = "ns-resize", s.NotAllowed = "not-allowed", s.ZoomIn = "zoom-in", s.ZoomOut = "zoom-out", s))(L || {});
321
- const wo = (s) => Math.max(...s.split(`
322
- `).map((t) => t.length)), So = (s) => s.match(/\n/g)?.length || 0, W = [];
321
+ const So = (s) => Math.max(...s.split(`
322
+ `).map((t) => t.length)), Co = (s) => s.match(/\n/g)?.length || 0, W = [];
323
323
  for (let s = 0; s < 256; ++s)
324
324
  W.push((s + 256).toString(16).slice(1));
325
- function Co(s, t = 0) {
325
+ function $o(s, t = 0) {
326
326
  return (W[s[t + 0]] + W[s[t + 1]] + W[s[t + 2]] + W[s[t + 3]] + "-" + W[s[t + 4]] + W[s[t + 5]] + "-" + W[s[t + 6]] + W[s[t + 7]] + "-" + W[s[t + 8]] + W[s[t + 9]] + "-" + W[s[t + 10]] + W[s[t + 11]] + W[s[t + 12]] + W[s[t + 13]] + W[s[t + 14]] + W[s[t + 15]]).toLowerCase();
327
327
  }
328
- let ne;
329
- const $o = new Uint8Array(16);
330
- function Io() {
331
- if (!ne) {
328
+ let re;
329
+ const Io = new Uint8Array(16);
330
+ function Ao() {
331
+ if (!re) {
332
332
  if (typeof crypto > "u" || !crypto.getRandomValues)
333
333
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
334
- ne = crypto.getRandomValues.bind(crypto);
334
+ re = crypto.getRandomValues.bind(crypto);
335
335
  }
336
- return ne($o);
336
+ return re(Io);
337
337
  }
338
- const Ao = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Ae = { randomUUID: Ao };
339
- function xe(s, t, e) {
340
- if (Ae.randomUUID && !s)
341
- return Ae.randomUUID();
338
+ const xo = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), xe = { randomUUID: xo };
339
+ function Le(s, t, e) {
340
+ if (xe.randomUUID && !s)
341
+ return xe.randomUUID();
342
342
  s = s || {};
343
- const a = s.random ?? s.rng?.() ?? Io();
343
+ const a = s.random ?? s.rng?.() ?? Ao();
344
344
  if (a.length < 16)
345
345
  throw new Error("Random bytes length must be >= 16");
346
- return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, Co(a);
346
+ return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, $o(a);
347
347
  }
348
- const st = (s) => {
348
+ const Nt = (s) => {
349
+ if (typeof s != "object")
350
+ return s;
351
+ const t = {};
352
+ for (const e of Object.entries(s))
353
+ typeof e[1] == "object" ? t[e[0]] = Nt(e[1]) : t[e[0]] = e[1];
354
+ return t;
355
+ }, st = (s) => {
349
356
  const { selected: t, highlighted: e, selectedAndHighlighted: a, ...l } = s, n = l, i = {
350
357
  ...n,
351
358
  ...t
@@ -365,7 +372,7 @@ const st = (s) => {
365
372
  selectedAndHighlightedLook: o
366
373
  };
367
374
  };
368
- class Jt {
375
+ class Qt {
369
376
  constructor() {
370
377
  this.entities = [], this.entityMap = {};
371
378
  }
@@ -476,7 +483,7 @@ class Jt {
476
483
  yield t;
477
484
  }
478
485
  }
479
- const Nt = 0;
486
+ const Pt = 0;
480
487
  class It {
481
488
  constructor(t, e) {
482
489
  this.selfRemoved = !1, this.selfRemovedTimestamp = null, this.model = t, this._id = e;
@@ -506,10 +513,10 @@ class It {
506
513
  * @private
507
514
  */
508
515
  select() {
509
- return this.model.canvas?.selectCanvasView()?.select(`[id='${fe(this.id)}']`);
516
+ return this.model.canvas?.selectCanvasView()?.select(`[id='${ue(this.id)}']`);
510
517
  }
511
518
  }
512
- class ft extends Jt {
519
+ class ft extends Qt {
513
520
  all(t = !1) {
514
521
  return t ? super.all() : super.filter((e) => !e.removed);
515
522
  }
@@ -547,13 +554,13 @@ class ft extends Jt {
547
554
  yield e;
548
555
  }
549
556
  }
550
- class xo {
557
+ class Lo {
551
558
  constructor(t, e, a, l, n, i, r) {
552
559
  this.name = t, this.label = e, this.type = a, this.defaultValue = l, this.basic = n, this.editable = i, this.rootAttribute = r, this.options = void 0, this.properties = void 0;
553
560
  }
554
561
  }
555
562
  var T = /* @__PURE__ */ ((s) => (s.Boolean = "boolean", s.Color = "color", s.Date = "date", s.Datetime = "datetime", s.Number = "number", s.Object = "object", s.Option = "option", s.OptionList = "option-list", s.OptionSet = "option-set", s.Text = "text", s.TextArea = "text-area", s.TextList = "text-list", s.TextSet = "text-set", s.TextMap = "text-map", s.Time = "time", s.Url = "url", s))(T || {});
556
- class Qt {
563
+ class te {
557
564
  constructor(t = []) {
558
565
  this.propertyList = t, this.propertyMap = {};
559
566
  for (const e of this.propertyList)
@@ -572,11 +579,11 @@ class Qt {
572
579
  function kt(s, t) {
573
580
  return !t || s[0] > t[0] ? !0 : s[0] === t[0] ? s[1] >= t[1] : !1;
574
581
  }
575
- const Le = (s) => s == null || s === "" || s instanceof Array && s.length === 0 || s instanceof Object && Object.keys(s).length === 0, St = (s, t) => s === t || JSON.stringify(s) === JSON.stringify(t), Ge = (s, t, e) => {
582
+ const Ee = (s) => s == null || s === "" || s instanceof Array && s.length === 0 || s instanceof Object && Object.keys(s).length === 0, St = (s, t) => s === t || JSON.stringify(s) === JSON.stringify(t), Fe = (s, t, e) => {
576
583
  const a = {}, l = {};
577
584
  for (const n in e.propertySet.propertyMap)
578
585
  if (e.propertySet.propertyMap[n].type === T.Object) {
579
- const i = Ge(
586
+ const i = Fe(
580
587
  s[n],
581
588
  t[n],
582
589
  e.getSubValueSet(n)
@@ -585,7 +592,7 @@ const Le = (s) => s == null || s === "" || s instanceof Array && s.length === 0
585
592
  } else
586
593
  St(s[n], t[n]) || (a[n] = s[n], l[n] = t[n]);
587
594
  return [a, l];
588
- }, Lo = (s) => s != null && s.constructor === Object;
595
+ }, Eo = (s) => s != null && s.constructor === Object;
589
596
  class yt {
590
597
  constructor(t, e) {
591
598
  this.displayedProperties = [], this.hiddenProperties = [], this.values = {}, this.valueSets = {}, this.ownTimestamps = {}, this.propertySet = t, this.rootElement = e, this.resetValues();
@@ -697,7 +704,7 @@ class yt {
697
704
  */
698
705
  hasValue(t) {
699
706
  const e = this.getValue(t);
700
- return !Le(e);
707
+ return !Ee(e);
701
708
  }
702
709
  /**
703
710
  * Checks if the value under the key is not empty or the default value.
@@ -707,7 +714,7 @@ class yt {
707
714
  */
708
715
  hasSetValue(t) {
709
716
  const e = this.getValue(t), a = this.propertySet.getProperty(t);
710
- return a && a.type === T.Object ? this.getSubValueSet(t).hasAnySetValue() : !Le(e) && !St(e, a?.defaultValue);
717
+ return a && a.type === T.Object ? this.getSubValueSet(t).hasAnySetValue() : !Ee(e) && !St(e, a?.defaultValue);
711
718
  }
712
719
  /**
713
720
  * Checks if any of the values in the set are not empty or the default value.
@@ -790,7 +797,7 @@ class yt {
790
797
  this.displayedProperties = [], this.hiddenProperties = [], this.ownTimestamps = {};
791
798
  for (const t in this.propertySet.propertyMap) {
792
799
  const e = this.propertySet.getProperty(t), a = e.rootAttribute;
793
- e.type === T.Object ? this.valueSets[t] = this.constructSubValueSet(t) : this.values[t] = structuredClone(e.defaultValue), a != null && e.defaultValue !== void 0 && !St(
800
+ e.type === T.Object ? this.valueSets[t] = this.constructSubValueSet(t) : this.values[t] = Nt(e.defaultValue), a != null && e.defaultValue !== void 0 && !St(
794
801
  this.getRootElementValue(a),
795
802
  e.defaultValue
796
803
  ) && this.setRootElementValue(a, this.values[t]), e.basic !== !1 ? this.displayedProperties.push(e) : this.hiddenProperties.push(e);
@@ -803,9 +810,9 @@ class yt {
803
810
  * @returns The constructed ValueSet.
804
811
  */
805
812
  constructSubValueSet(t) {
806
- const e = this.propertySet.getProperty(t), a = new Qt(e.properties), l = new yt(a, this.rootElement);
813
+ const e = this.propertySet.getProperty(t), a = new te(e.properties), l = new yt(a, this.rootElement);
807
814
  return l.overwriteValues(
808
- structuredClone(e.defaultValue)
815
+ Nt(e.defaultValue)
809
816
  ), l;
810
817
  }
811
818
  /**
@@ -841,8 +848,8 @@ const et = {
841
848
  lookType: "connection-look",
842
849
  color: "#000000",
843
850
  thickness: 1,
844
- shape: He.Straight,
845
- style: ye.Solid,
851
+ shape: _e.Straight,
852
+ style: be.Solid,
846
853
  selected: {
847
854
  color: "#AA00AA"
848
855
  },
@@ -856,7 +863,7 @@ const et = {
856
863
  endTypes: [],
857
864
  properties: []
858
865
  };
859
- class Fe {
866
+ class Ue {
860
867
  constructor(t) {
861
868
  const e = {
862
869
  ...et,
@@ -878,7 +885,7 @@ class Fe {
878
885
  this.defaultEndMarkerLook = l.defaultLook, this.selectedEndMarkerLook = l.selectedLook, this.highlightedEndMarkerLook = l.highlightedLook, this.selectedAndHighlightedEndMarkerLook = l.selectedAndHighlightedLook;
879
886
  } else
880
887
  this.defaultEndMarkerLook = null, this.selectedEndMarkerLook = null, this.highlightedEndMarkerLook = null, this.selectedAndHighlightedEndMarkerLook = null;
881
- this.startTypes = e.startTypes, this.endTypes = e.endTypes, this.propertySet = new Qt(e.properties);
888
+ this.startTypes = e.startTypes, this.endTypes = e.endTypes, this.propertySet = new te(e.properties);
882
889
  }
883
890
  canStartFromType(t) {
884
891
  return this.startTypes.indexOf(t) >= 0;
@@ -1137,16 +1144,16 @@ class dt extends It {
1137
1144
  }
1138
1145
  }
1139
1146
  getPriority() {
1140
- return this.start ? this.end ? Math.min(this.start.getPriority(), this.end.getPriority()) : this.start.getPriority() : this.end ? this.end.getPriority() : Nt;
1147
+ return this.start ? this.end ? Math.min(this.start.getPriority(), this.end.getPriority()) : this.start.getPriority() : this.end ? this.end.getPriority() : Pt;
1141
1148
  }
1142
1149
  }
1143
- class Eo extends ft {
1150
+ class Mo extends ft {
1144
1151
  /**
1145
1152
  * Instance a set of connections for the given model. This method is used internally.
1146
1153
  * @private
1147
1154
  */
1148
1155
  constructor(t) {
1149
- super(), this.types = new Jt(), this.model = t;
1156
+ super(), this.types = new Qt(), this.model = t;
1150
1157
  }
1151
1158
  /**
1152
1159
  * Instance a new connection and add it to this set.
@@ -1159,7 +1166,7 @@ class Eo extends ft {
1159
1166
  */
1160
1167
  new(t, e, a, l) {
1161
1168
  let n;
1162
- if (t instanceof Fe)
1169
+ if (t instanceof Ue)
1163
1170
  n = t;
1164
1171
  else {
1165
1172
  const r = this.types.get(t);
@@ -1193,7 +1200,7 @@ const V = {
1193
1200
  selectedColor: "#000000",
1194
1201
  backgroundColor: "#00000000",
1195
1202
  horizontalAlign: Lt.Center,
1196
- verticalAlign: Zt.Center,
1203
+ verticalAlign: Kt.Center,
1197
1204
  orientation: g.Top,
1198
1205
  fit: !1,
1199
1206
  shrink: !0
@@ -1252,10 +1259,10 @@ class ht extends It {
1252
1259
  this.coords = t, this.updateInView();
1253
1260
  }
1254
1261
  getPriority() {
1255
- return this.rootElement?.getPriority() || Nt;
1262
+ return this.rootElement?.getPriority() || Pt;
1256
1263
  }
1257
1264
  }
1258
- class Mo extends ft {
1265
+ class To extends ft {
1259
1266
  /**
1260
1267
  * Instance a set of fields for the given model. This method is used internally.
1261
1268
  * @private
@@ -1293,22 +1300,22 @@ class Mo extends ft {
1293
1300
  e && (e.rootElement?.label !== void 0 && e.rootElement.label === e && (e.rootElement.label = void 0), super.remove(t), e.updateInView());
1294
1301
  }
1295
1302
  }
1296
- const K = (s) => s?.margin === null || s?.margin === void 0 ? V.margin : typeof s.margin == "number" ? s.margin : s.margin.length === 0 ? V.margin : s.margin.length === 1 || s.margin.length === 2 ? s.margin[0] : (s.margin.length === 3, s.margin[2]), B = (s) => s?.margin === null || s?.margin === void 0 ? V.margin : typeof s.margin == "number" ? s.margin : s.margin.length === 0 ? V.margin : s.margin.length === 1 ? s.margin[0] : s.margin.length === 2 || s.margin.length === 3 ? s.margin[1] : s.margin[3], ot = (s) => s?.margin === null || s?.margin === void 0 ? V.margin : typeof s.margin == "number" ? s.margin : s.margin.length === 0 ? V.margin : s.margin.length === 1 ? s.margin[0] : (s.margin.length === 2 || s.margin.length === 3, s.margin[1]), F = (s) => s?.margin === null || s?.margin === void 0 ? V.margin : typeof s.margin == "number" ? s.margin : s.margin.length === 0 ? V.margin : (s.margin.length === 1 || s.margin.length === 2 || s.margin.length === 3, s.margin[0]), Rt = (s) => s?.padding === null || s?.padding === void 0 ? V.padding : typeof s.padding == "number" ? s.padding : s.padding.length === 0 ? V.padding : s.padding.length === 1 || s.padding.length === 2 ? s.padding[0] : (s.padding.length === 3, s.padding[2]), Vt = (s) => s?.padding === null || s?.padding === void 0 ? V.padding : typeof s.padding == "number" ? s.padding : s.padding.length === 0 ? V.padding : s.padding.length === 1 ? s.padding[0] : s.padding.length === 2 || s.padding.length === 3 ? s.padding[1] : s.padding[3], Ot = (s) => s?.padding === null || s?.padding === void 0 ? V.padding : typeof s.padding == "number" ? s.padding : s.padding.length === 0 ? V.padding : s.padding.length === 1 ? s.padding[0] : (s.padding.length === 2 || s.padding.length === 3, s.padding[1]), Ht = (s) => s?.padding === null || s?.padding === void 0 ? V.padding : typeof s.padding == "number" ? s.padding : s.padding.length === 0 ? V.padding : (s.padding.length === 1 || s.padding.length === 2 || s.padding.length === 3, s.padding[0]), Ee = 1, Me = 1, To = 1, No = 1;
1297
- class Po {
1303
+ const K = (s) => s?.margin === null || s?.margin === void 0 ? V.margin : typeof s.margin == "number" ? s.margin : s.margin.length === 0 ? V.margin : s.margin.length === 1 || s.margin.length === 2 ? s.margin[0] : (s.margin.length === 3, s.margin[2]), B = (s) => s?.margin === null || s?.margin === void 0 ? V.margin : typeof s.margin == "number" ? s.margin : s.margin.length === 0 ? V.margin : s.margin.length === 1 ? s.margin[0] : s.margin.length === 2 || s.margin.length === 3 ? s.margin[1] : s.margin[3], ot = (s) => s?.margin === null || s?.margin === void 0 ? V.margin : typeof s.margin == "number" ? s.margin : s.margin.length === 0 ? V.margin : s.margin.length === 1 ? s.margin[0] : (s.margin.length === 2 || s.margin.length === 3, s.margin[1]), F = (s) => s?.margin === null || s?.margin === void 0 ? V.margin : typeof s.margin == "number" ? s.margin : s.margin.length === 0 ? V.margin : (s.margin.length === 1 || s.margin.length === 2 || s.margin.length === 3, s.margin[0]), Vt = (s) => s?.padding === null || s?.padding === void 0 ? V.padding : typeof s.padding == "number" ? s.padding : s.padding.length === 0 ? V.padding : s.padding.length === 1 || s.padding.length === 2 ? s.padding[0] : (s.padding.length === 3, s.padding[2]), Ot = (s) => s?.padding === null || s?.padding === void 0 ? V.padding : typeof s.padding == "number" ? s.padding : s.padding.length === 0 ? V.padding : s.padding.length === 1 ? s.padding[0] : s.padding.length === 2 || s.padding.length === 3 ? s.padding[1] : s.padding[3], Ht = (s) => s?.padding === null || s?.padding === void 0 ? V.padding : typeof s.padding == "number" ? s.padding : s.padding.length === 0 ? V.padding : s.padding.length === 1 ? s.padding[0] : (s.padding.length === 2 || s.padding.length === 3, s.padding[1]), _t = (s) => s?.padding === null || s?.padding === void 0 ? V.padding : typeof s.padding == "number" ? s.padding : s.padding.length === 0 ? V.padding : (s.padding.length === 1 || s.padding.length === 2 || s.padding.length === 3, s.padding[0]), Me = 1, Te = 1, No = 1, Po = 1;
1304
+ class zo {
1298
1305
  constructor(t) {
1299
1306
  this.margin = t.margin || 0, this.defaultWidths = t.defaultWidths || null, this.defaultHeights = t.defaultHeights || null, this.minWidths = t.minWidths || null, this.minHeights = t.minHeights || null, this.sections = [];
1300
1307
  for (const e of t.sections) {
1301
1308
  const a = [];
1302
1309
  this.sections.push(a);
1303
1310
  for (const l of e)
1304
- a.push(new zo(l));
1311
+ a.push(new Ro(l));
1305
1312
  }
1306
1313
  }
1307
1314
  }
1308
- class zo {
1315
+ class Ro {
1309
1316
  constructor(t) {
1310
- this.label = t.label || null, this.ports = t.ports || [], this.priority = t.priority || Nt, this.resizableX = t.resizableX, this.resizableY = t.resizableY;
1311
- const e = st(t.look || Ue);
1317
+ this.label = t.label || null, this.ports = t.ports || [], this.priority = t.priority || Pt, this.resizableX = t.resizableX, this.resizableY = t.resizableY;
1318
+ const e = st(t.look || De);
1312
1319
  this.defaultLook = e.defaultLook, this.selectedLook = e.selectedLook, this.highlightedLook = e.highlightedLook, this.selectedAndHighlightedLook = e.selectedAndHighlightedLook;
1313
1320
  }
1314
1321
  }
@@ -1392,13 +1399,13 @@ class D extends It {
1392
1399
  return this.node?.type?.sectionGrid?.sections?.[this.indexYInNode]?.[this.indexXInNode];
1393
1400
  }
1394
1401
  getMinWidth() {
1395
- return this.node?.type?.sectionGrid?.minWidths?.[this.indexXInNode] || To;
1402
+ return this.node?.type?.sectionGrid?.minWidths?.[this.indexXInNode] || No;
1396
1403
  }
1397
1404
  getMinHeight() {
1398
- return this.node?.type?.sectionGrid?.minHeights?.[this.indexYInNode] || No;
1405
+ return this.node?.type?.sectionGrid?.minHeights?.[this.indexYInNode] || Po;
1399
1406
  }
1400
1407
  getPriority() {
1401
- return this.node?.type?.sectionGrid?.sections?.[this.indexYInNode]?.[this.indexXInNode]?.priority || Nt;
1408
+ return this.node?.type?.sectionGrid?.sections?.[this.indexYInNode]?.[this.indexXInNode]?.priority || Pt;
1402
1409
  }
1403
1410
  /**
1404
1411
  * Returns whether this section can be resized horizontally.
@@ -1538,7 +1545,7 @@ class D extends It {
1538
1545
  const l = [this.coords[0], this.coords[0] + this.width], n = [this.coords[1], this.coords[1] + this.height];
1539
1546
  for (const r of this.ports)
1540
1547
  r.move(
1541
- Kt(
1548
+ qt(
1542
1549
  r.coords,
1543
1550
  e,
1544
1551
  a,
@@ -1555,7 +1562,7 @@ class D extends It {
1555
1562
  ], this.label.width = this.width - B(i?.label) - ot(i?.label), this.label.height = this.height - F(i?.label) - K(i?.label), this.label.updateInView());
1556
1563
  for (const r of this.decorators)
1557
1564
  r.move(
1558
- Kt(
1565
+ qt(
1559
1566
  r.coords,
1560
1567
  e,
1561
1568
  a,
@@ -1568,7 +1575,7 @@ class D extends It {
1568
1575
  this.model.canvas?.autoTightenConnections !== !1 && this.getConnections().forEach((r) => r.tighten()), this.updateInView();
1569
1576
  }
1570
1577
  }
1571
- class Ro extends ft {
1578
+ class Vo extends ft {
1572
1579
  /**
1573
1580
  * Instance a set of sections for the given model. This method is used internally.
1574
1581
  * @private
@@ -1615,7 +1622,7 @@ class Ro extends ft {
1615
1622
  const m = {
1616
1623
  ...V,
1617
1624
  ...y.type?.label
1618
- }, p = 6 * m.fontSize + Vt(m) + Ot(m), u = m.fontSize + Ht(m) + Rt(m);
1625
+ }, p = 6 * m.fontSize + Ot(m) + Ht(m), u = m.fontSize + _t(m) + Vt(m);
1619
1626
  let k;
1620
1627
  switch (y.direction) {
1621
1628
  case g.Bottom:
@@ -1692,7 +1699,7 @@ class Ro extends ft {
1692
1699
  }
1693
1700
  }
1694
1701
  }
1695
- const Ue = {
1702
+ const De = {
1696
1703
  lookType: "shaped-look",
1697
1704
  shape: Tt.Rectangle,
1698
1705
  fillColor: "#FFFFFF",
@@ -1719,22 +1726,22 @@ const Ue = {
1719
1726
  ports: [],
1720
1727
  decorators: [],
1721
1728
  sectionGrid: null,
1722
- look: Ue,
1729
+ look: De,
1723
1730
  isUnique: !1,
1724
1731
  canBeParentless: !0,
1725
1732
  childrenTypes: [],
1726
- priority: Nt,
1733
+ priority: Pt,
1727
1734
  properties: []
1728
1735
  };
1729
- class De {
1736
+ class Be {
1730
1737
  constructor(t) {
1731
1738
  const e = {
1732
1739
  ...gt,
1733
1740
  ...t
1734
1741
  };
1735
- this.id = e.id, this.name = e.name, this.defaultWidth = e.defaultWidth, this.defaultHeight = e.defaultHeight, this.minWidth = e.minWidth, this.minHeight = e.minHeight, this.resizableX = e.resizableX, this.resizableY = e.resizableY, this.snapToGridOffset = e.snapToGridOffset, this.bottomPadding = Oo(e), this.leftPadding = Ho(e), this.rightPadding = _o(e), this.topPadding = Go(e), this.label = e.label, this.ports = e.ports, this.decorators = e.decorators, this.sectionGrid = e.sectionGrid ? new Po(e.sectionGrid) : null;
1742
+ this.id = e.id, this.name = e.name, this.defaultWidth = e.defaultWidth, this.defaultHeight = e.defaultHeight, this.minWidth = e.minWidth, this.minHeight = e.minHeight, this.resizableX = e.resizableX, this.resizableY = e.resizableY, this.snapToGridOffset = e.snapToGridOffset, this.bottomPadding = Ho(e), this.leftPadding = _o(e), this.rightPadding = Go(e), this.topPadding = Fo(e), this.label = e.label, this.ports = e.ports, this.decorators = e.decorators, this.sectionGrid = e.sectionGrid ? new zo(e.sectionGrid) : null;
1736
1743
  const a = st(e.look);
1737
- this.defaultLook = a.defaultLook, this.selectedLook = a.selectedLook, this.highlightedLook = a.highlightedLook, this.selectedAndHighlightedLook = a.selectedAndHighlightedLook, this.isUnique = e.isUnique, this.canBeParentless = e.canBeParentless, this.childrenTypes = e.childrenTypes, this.priority = e.priority, this.propertySet = new Qt(t?.properties || []);
1744
+ this.defaultLook = a.defaultLook, this.selectedLook = a.selectedLook, this.highlightedLook = a.highlightedLook, this.selectedAndHighlightedLook = a.selectedAndHighlightedLook, this.isUnique = e.isUnique, this.canBeParentless = e.canBeParentless, this.childrenTypes = e.childrenTypes, this.priority = e.priority, this.propertySet = new te(t?.properties || []);
1738
1745
  }
1739
1746
  }
1740
1747
  class z extends It {
@@ -2160,7 +2167,7 @@ class z extends It {
2160
2167
  }
2161
2168
  for (const i of this.ports)
2162
2169
  i.move(
2163
- Kt(
2170
+ qt(
2164
2171
  i.coords,
2165
2172
  e,
2166
2173
  a,
@@ -2176,7 +2183,7 @@ class z extends It {
2176
2183
  ], this.label.width = this.width - B(this.type.label) - ot(this.type.label), this.label.height = this.height - F(this.type.label) - K(this.type.label), this.label.updateInView());
2177
2184
  for (const i of this.decorators)
2178
2185
  i.move(
2179
- Kt(
2186
+ qt(
2180
2187
  i.coords,
2181
2188
  e,
2182
2189
  a,
@@ -2291,13 +2298,13 @@ class z extends It {
2291
2298
  this.stretch(g.Bottom, e + a);
2292
2299
  }
2293
2300
  }
2294
- class Vo extends ft {
2301
+ class Oo extends ft {
2295
2302
  /**
2296
2303
  * Instance a set of nodes for the given model. This method is used internally.
2297
2304
  * @private
2298
2305
  */
2299
2306
  constructor(t) {
2300
- super(), this.types = new Jt(), this.model = t;
2307
+ super(), this.types = new Qt(), this.model = t;
2301
2308
  }
2302
2309
  /**
2303
2310
  * Instance a new node and add it to this set.
@@ -2309,7 +2316,7 @@ class Vo extends ft {
2309
2316
  */
2310
2317
  new(t, e, a) {
2311
2318
  let l;
2312
- if (t instanceof De)
2319
+ if (t instanceof Be)
2313
2320
  l = t;
2314
2321
  else {
2315
2322
  const i = this.types.get(t);
@@ -2328,11 +2335,11 @@ class Vo extends ft {
2328
2335
  d,
2329
2336
  r,
2330
2337
  [o, i],
2331
- l.sectionGrid.defaultWidths?.[d] || Ee,
2332
- l.sectionGrid.defaultHeights?.[r] || Me,
2338
+ l.sectionGrid.defaultWidths?.[d] || Me,
2339
+ l.sectionGrid.defaultHeights?.[r] || Te,
2333
2340
  `${n.id}_${r}_${d}`
2334
- ), o += (l.sectionGrid.defaultWidths?.[d] || Ee) + (l.sectionGrid.margin || 0);
2335
- i += (l.sectionGrid.defaultHeights?.[r] || Me) + (l.sectionGrid.margin || 0);
2341
+ ), o += (l.sectionGrid.defaultWidths?.[d] || Me) + (l.sectionGrid.margin || 0);
2342
+ i += (l.sectionGrid.defaultHeights?.[r] || Te) + (l.sectionGrid.margin || 0);
2336
2343
  }
2337
2344
  }
2338
2345
  if (l.ports.length > 0)
@@ -2357,7 +2364,7 @@ class Vo extends ft {
2357
2364
  const c = {
2358
2365
  ...V,
2359
2366
  ...d.type?.label
2360
- }, h = 6 * c.fontSize + Vt(c) + Ot(c), f = c.fontSize + Ht(c) + Rt(c);
2367
+ }, h = 6 * c.fontSize + Ot(c) + Ht(c), f = c.fontSize + _t(c) + Vt(c);
2361
2368
  let y;
2362
2369
  switch (d.direction) {
2363
2370
  case g.Bottom:
@@ -2470,12 +2477,12 @@ class Vo extends ft {
2470
2477
  return a;
2471
2478
  }
2472
2479
  }
2473
- const Be = (s) => {
2480
+ const Ye = (s) => {
2474
2481
  for (let t = 0; t < s.length; ++t)
2475
2482
  for (let e = 0; e < s.length; ++e)
2476
2483
  e !== t && s[e].isAncestorOf(s[t]) && (s.splice(e, 1), --e, t > e && --t);
2477
2484
  return s;
2478
- }, Oo = (s) => s?.padding === null || s?.padding === void 0 ? gt.padding : typeof s.padding == "number" ? s.padding : s.padding.length === 0 ? gt.padding : s.padding.length === 1 || s.padding.length === 2 ? s.padding[0] : (s.padding.length === 3, s.padding[2]), Ho = (s) => s?.padding === null || s?.padding === void 0 ? gt.padding : typeof s.padding == "number" ? s.padding : s.padding.length === 0 ? gt.padding : s.padding.length === 1 ? s.padding[0] : s.padding.length === 2 || s.padding.length === 3 ? s.padding[1] : s.padding[3], _o = (s) => s?.padding === null || s?.padding === void 0 ? gt.padding : typeof s.padding == "number" ? s.padding : s.padding.length === 0 ? gt.padding : s.padding.length === 1 ? s.padding[0] : (s.padding.length === 2 || s.padding.length === 3, s.padding[1]), Go = (s) => s?.padding === null || s?.padding === void 0 ? gt.padding : typeof s.padding == "number" ? s.padding : s.padding.length === 0 ? gt.padding : (s.padding.length === 1 || s.padding.length === 2 || s.padding.length === 3, s.padding[0]), Ye = {
2485
+ }, Ho = (s) => s?.padding === null || s?.padding === void 0 ? gt.padding : typeof s.padding == "number" ? s.padding : s.padding.length === 0 ? gt.padding : s.padding.length === 1 || s.padding.length === 2 ? s.padding[0] : (s.padding.length === 3, s.padding[2]), _o = (s) => s?.padding === null || s?.padding === void 0 ? gt.padding : typeof s.padding == "number" ? s.padding : s.padding.length === 0 ? gt.padding : s.padding.length === 1 ? s.padding[0] : s.padding.length === 2 || s.padding.length === 3 ? s.padding[1] : s.padding[3], Go = (s) => s?.padding === null || s?.padding === void 0 ? gt.padding : typeof s.padding == "number" ? s.padding : s.padding.length === 0 ? gt.padding : s.padding.length === 1 ? s.padding[0] : (s.padding.length === 2 || s.padding.length === 3, s.padding[1]), Fo = (s) => s?.padding === null || s?.padding === void 0 ? gt.padding : typeof s.padding == "number" ? s.padding : s.padding.length === 0 ? gt.padding : (s.padding.length === 1 || s.padding.length === 2 || s.padding.length === 3, s.padding[0]), Xe = {
2479
2486
  lookType: "shaped-look",
2480
2487
  shape: Tt.Ellipse,
2481
2488
  fillColor: "transparent",
@@ -2487,18 +2494,18 @@ const Be = (s) => {
2487
2494
  highlighted: {
2488
2495
  fillColor: "rgba(0, 255, 255, 0.5)"
2489
2496
  }
2490
- }, Xt = st(Ye), Xe = {
2497
+ }, jt = st(Xe), je = {
2491
2498
  name: "",
2492
2499
  label: null,
2493
2500
  allowsOutgoing: !0,
2494
2501
  allowsIncoming: !0,
2495
2502
  width: 24,
2496
- look: Ye
2503
+ look: Xe
2497
2504
  };
2498
- class Fo {
2505
+ class Uo {
2499
2506
  constructor(t) {
2500
2507
  const e = {
2501
- ...Xe,
2508
+ ...je,
2502
2509
  ...t
2503
2510
  };
2504
2511
  this.id = e.id, this.name = e.name, this.label = e.label, this.allowsOutgoing = e.allowsOutgoing, this.allowsIncoming = e.allowsIncoming, this.width = e.width;
@@ -2559,7 +2566,7 @@ class bt extends It {
2559
2566
  * @private
2560
2567
  */
2561
2568
  get look() {
2562
- return this.selected ? this.highlighted ? this._selectedAndHighlightedLook !== void 0 ? this._selectedAndHighlightedLook : (this.type || Xt)?.selectedAndHighlightedLook : this._selectedLook !== void 0 ? this._selectedLook : (this.type || Xt)?.selectedLook : this.highlighted ? this._highlightedLook !== void 0 ? this._highlightedLook : (this.type || Xt)?.highlightedLook : this._defaultLook !== void 0 ? this._defaultLook : (this.type || Xt)?.defaultLook;
2569
+ return this.selected ? this.highlighted ? this._selectedAndHighlightedLook !== void 0 ? this._selectedAndHighlightedLook : (this.type || jt)?.selectedAndHighlightedLook : this._selectedLook !== void 0 ? this._selectedLook : (this.type || jt)?.selectedLook : this.highlighted ? this._highlightedLook !== void 0 ? this._highlightedLook : (this.type || jt)?.highlightedLook : this._defaultLook !== void 0 ? this._defaultLook : (this.type || jt)?.defaultLook;
2563
2570
  }
2564
2571
  /**
2565
2572
  * An alias for the `lookConfig` attribute.
@@ -2606,7 +2613,7 @@ class bt extends It {
2606
2613
  * @private
2607
2614
  */
2608
2615
  get width() {
2609
- return this.type?.width || Xe.width;
2616
+ return this.type?.width || je.width;
2610
2617
  }
2611
2618
  /**
2612
2619
  * Current height of this port. Same as the width.
@@ -2656,7 +2663,7 @@ class bt extends It {
2656
2663
  return this.rootElement.node;
2657
2664
  }
2658
2665
  getPriority() {
2659
- return this.rootElement?.getPriority() || Nt;
2666
+ return this.rootElement?.getPriority() || Pt;
2660
2667
  }
2661
2668
  /**
2662
2669
  * Change the coordinates of this port to the given coordinates and move its labels correspondingly.
@@ -2679,16 +2686,16 @@ class bt extends It {
2679
2686
  ]), this.updateInView();
2680
2687
  }
2681
2688
  distanceTo(t) {
2682
- return Oe(this.coords, t);
2689
+ return He(this.coords, t);
2683
2690
  }
2684
2691
  }
2685
- class Uo extends ft {
2692
+ class Do extends ft {
2686
2693
  /**
2687
2694
  * Instance a set of ports for the given model. This method is used internally.
2688
2695
  * @private
2689
2696
  */
2690
2697
  constructor(t) {
2691
- super(), this.types = new Jt(), this.model = t;
2698
+ super(), this.types = new Qt(), this.model = t;
2692
2699
  }
2693
2700
  /**
2694
2701
  * Instance a new port and add it to this set. This method is normally called when instancing an element with a port and it is rarely called by itself.
@@ -2719,7 +2726,7 @@ class Uo extends ft {
2719
2726
  }
2720
2727
  }
2721
2728
  }
2722
- class je {
2729
+ class We {
2723
2730
  import(t, e) {
2724
2731
  t.clear(), e.id && (t.id = e.id), t.name = e.name, t.description = e.description, t.type = e.type, t.createdAt = new Date(e.createdAt), t.updatedAt = new Date(e.updatedAt);
2725
2732
  for (const a of e.nodes || [])
@@ -2976,14 +2983,14 @@ class je {
2976
2983
  t && e && (t.selfRemoved = e.selfRemoved, t.selfRemovedTimestamp = e.selfRemovedTimestamp, t.textTimestamp = e.textTimestamp);
2977
2984
  }
2978
2985
  }
2979
- class te {
2986
+ class ee {
2980
2987
  constructor(t, e, a, l, n, i, r) {
2981
2988
  this.canvas = t, this.id = e, this.typeId = a, this.coords = l, this.parentId = n, this.label = i, this.values = r;
2982
2989
  }
2983
2990
  do() {
2984
2991
  const t = this.canvas.model.nodes.new(this.typeId, this.coords, this.id);
2985
2992
  this.parentId !== void 0 && this.canvas.model.nodes.get(this.parentId)?.addChild(t), t.label && (t.label.text = this.label || ""), this.values !== void 0 ? t.valueSet.setValues(
2986
- structuredClone({
2993
+ Nt({
2987
2994
  ...t.valueSet.getValues(),
2988
2995
  ...this.values
2989
2996
  })
@@ -3001,7 +3008,7 @@ class te {
3001
3008
  };
3002
3009
  }
3003
3010
  static deserialize(t, e) {
3004
- return new te(
3011
+ return new ee(
3005
3012
  t,
3006
3013
  e.id,
3007
3014
  e.typeId,
@@ -3012,7 +3019,7 @@ class te {
3012
3019
  );
3013
3020
  }
3014
3021
  }
3015
- class be {
3022
+ class ke {
3016
3023
  constructor(t, e, a, l, n, i, r) {
3017
3024
  this.canvas = t, this.nodeId = e, this.copyColumnIndex = a, this.copyRowIndex = l, this.removeColumnIndex = n, this.removeRowIndex = i, this.timestamp = r;
3018
3025
  }
@@ -3032,7 +3039,7 @@ class be {
3032
3039
  };
3033
3040
  }
3034
3041
  static deserialize(t, e) {
3035
- return new be(
3042
+ return new ke(
3036
3043
  t,
3037
3044
  e.nodeId,
3038
3045
  e.copyColumnIndex,
@@ -3043,7 +3050,7 @@ class be {
3043
3050
  );
3044
3051
  }
3045
3052
  }
3046
- class ke {
3053
+ class we {
3047
3054
  constructor(t, e, a) {
3048
3055
  this.canvas = t, this.to = e, this.timestamp = a;
3049
3056
  }
@@ -3064,14 +3071,14 @@ class ke {
3064
3071
  };
3065
3072
  }
3066
3073
  static deserialize(t, e) {
3067
- return new ke(
3074
+ return new we(
3068
3075
  t,
3069
3076
  e.to,
3070
3077
  e.timestamp
3071
3078
  );
3072
3079
  }
3073
3080
  }
3074
- class _t {
3081
+ class Gt {
3075
3082
  constructor(t, e, a, l) {
3076
3083
  this.canvas = t, this.nodeIds = e, this.delta = a, this.timestamp = l;
3077
3084
  }
@@ -3093,7 +3100,7 @@ class _t {
3093
3100
  };
3094
3101
  }
3095
3102
  static deserialize(t, e) {
3096
- return new _t(
3103
+ return new Gt(
3097
3104
  t,
3098
3105
  e.nodeIds,
3099
3106
  e.delta,
@@ -3134,7 +3141,7 @@ class it {
3134
3141
  );
3135
3142
  }
3136
3143
  }
3137
- class Gt {
3144
+ class Ft {
3138
3145
  constructor(t, e, a, l, n) {
3139
3146
  this.canvas = t, this.childId = e, this.parentId = a, this.childGeometry = l, this.timestamp = n;
3140
3147
  }
@@ -3152,7 +3159,7 @@ class Gt {
3152
3159
  };
3153
3160
  }
3154
3161
  static deserialize(t, e) {
3155
- return new Gt(
3162
+ return new Ft(
3156
3163
  t,
3157
3164
  e.childId,
3158
3165
  e.parentId,
@@ -3161,7 +3168,7 @@ class Gt {
3161
3168
  );
3162
3169
  }
3163
3170
  }
3164
- class ee {
3171
+ class oe {
3165
3172
  constructor(t, e, a, l, n) {
3166
3173
  this.canvas = t, this.id = e, this.typeId = a, this.startId = l, this.endId = n;
3167
3174
  }
@@ -3179,7 +3186,7 @@ class ee {
3179
3186
  };
3180
3187
  }
3181
3188
  static deserialize(t, e) {
3182
- return new ee(
3189
+ return new oe(
3183
3190
  t,
3184
3191
  e.id,
3185
3192
  e.typeId,
@@ -3285,12 +3292,12 @@ class at {
3285
3292
  );
3286
3293
  }
3287
3294
  }
3288
- class oe {
3295
+ class ie {
3289
3296
  constructor(t, e, a) {
3290
3297
  this.canvas = t, this.nodes = e, this.connections = a;
3291
3298
  }
3292
3299
  do() {
3293
- const t = new je();
3300
+ const t = new We();
3294
3301
  this.canvas.userSelection.clear();
3295
3302
  for (const e of this.nodes) {
3296
3303
  const a = t.importNode(this.canvas.model, e);
@@ -3312,16 +3319,16 @@ class oe {
3312
3319
  };
3313
3320
  }
3314
3321
  static deserialize(t, e) {
3315
- return new oe(
3322
+ return new ie(
3316
3323
  t,
3317
3324
  e.nodes,
3318
3325
  e.connections
3319
3326
  );
3320
3327
  }
3321
3328
  }
3322
- class Do {
3329
+ class Bo {
3323
3330
  constructor(t) {
3324
- this.isInRoom = !1, this.canvas = t, this.replicaId = xe();
3331
+ this.isInRoom = !1, this.canvas = t, this.replicaId = Le();
3325
3332
  }
3326
3333
  /**
3327
3334
  * Returns a fresh timestamp, suitable for use by new CollabActions.
@@ -3333,7 +3340,7 @@ class Do {
3333
3340
  * Returns a fresh unique ID, suitable for use by new CollabActions.
3334
3341
  */
3335
3342
  freshId() {
3336
- return "id" + xe();
3343
+ return "id" + Le();
3337
3344
  }
3338
3345
  /**
3339
3346
  * Performs the action - immediately locally, and eventually for remote collaborators.
@@ -3356,22 +3363,22 @@ class Do {
3356
3363
  t.timestamp[0]
3357
3364
  )), t.type) {
3358
3365
  case "addNode": {
3359
- te.deserialize(this.canvas, t).do();
3366
+ ee.deserialize(this.canvas, t).do();
3360
3367
  break;
3361
3368
  }
3362
3369
  case "addSection": {
3363
- be.deserialize(this.canvas, t).do();
3370
+ ke.deserialize(this.canvas, t).do();
3364
3371
  break;
3365
3372
  }
3366
3373
  case "applyLayout": {
3367
- ke.deserialize(
3374
+ we.deserialize(
3368
3375
  this.canvas,
3369
3376
  t
3370
3377
  ).do();
3371
3378
  break;
3372
3379
  }
3373
3380
  case "move": {
3374
- _t.deserialize(this.canvas, t).do();
3381
+ Gt.deserialize(this.canvas, t).do();
3375
3382
  break;
3376
3383
  }
3377
3384
  case "setGeometry": {
@@ -3382,11 +3389,11 @@ class Do {
3382
3389
  break;
3383
3390
  }
3384
3391
  case "setParent": {
3385
- Gt.deserialize(this.canvas, t).do();
3392
+ Ft.deserialize(this.canvas, t).do();
3386
3393
  break;
3387
3394
  }
3388
3395
  case "addConnection": {
3389
- ee.deserialize(
3396
+ oe.deserialize(
3390
3397
  this.canvas,
3391
3398
  t
3392
3399
  ).do();
@@ -3411,7 +3418,7 @@ class Do {
3411
3418
  break;
3412
3419
  }
3413
3420
  case "paste": {
3414
- oe.deserialize(this.canvas, t).do();
3421
+ ie.deserialize(this.canvas, t).do();
3415
3422
  break;
3416
3423
  }
3417
3424
  default:
@@ -3422,7 +3429,7 @@ class Do {
3422
3429
  }
3423
3430
  }
3424
3431
  }
3425
- class Bo {
3432
+ class Yo {
3426
3433
  constructor(t, e) {
3427
3434
  this.canvas = t, this.maximum = e, this.history = [], this.index = 0;
3428
3435
  }
@@ -3475,12 +3482,12 @@ class Bo {
3475
3482
  }
3476
3483
  }
3477
3484
  var w = /* @__PURE__ */ ((s) => (s.AddConnection = "add-connection", s.AddNode = "add-node", s.AddSectionAction = "add-section", s.ApplyLayout = "apply-layout", s.Clipboard = "clipboard", s.ContextMenu = "context-menu", s.EditField = "edit-field", s.MoveNode = "move-node", s.Paste = "paste", s.Remove = "remove", s.StretchNode = "stretch-node", s.StretchSection = "stretch-section", s.UpdateValues = "update-values", s.Zoom = "zoom", s))(w || {});
3478
- class Yo {
3485
+ class Xo {
3479
3486
  constructor(t, e, a, l, n, i, r, o, d) {
3480
3487
  this.canvas = t, this.type = e, this.coords = a, this.parentId = l, this.ancestorId = n, this.fromAncestorGeometry = i, this.toAncestorGeometry = r, this.label = o, this.values = d, this.id = this.canvas.collabEngine.freshId();
3481
3488
  }
3482
3489
  do() {
3483
- const t = new te(
3490
+ const t = new ee(
3484
3491
  this.canvas,
3485
3492
  this.id,
3486
3493
  this.type.id,
@@ -3545,12 +3552,12 @@ class Yo {
3545
3552
  return t === void 0;
3546
3553
  }
3547
3554
  }
3548
- class re {
3555
+ class ae {
3549
3556
  constructor(t, e, a) {
3550
3557
  this.canvas = t, this.nodeIds = e, this.delta = a;
3551
3558
  }
3552
3559
  do() {
3553
- const t = new _t(
3560
+ const t = new Gt(
3554
3561
  this.canvas,
3555
3562
  this.nodeIds,
3556
3563
  this.delta,
@@ -3559,7 +3566,7 @@ class re {
3559
3566
  return this.canvas.collabEngine.doCollaboratively(t), this.nodeIds.map((e) => this.canvas.model.nodes.get(e) !== void 0).includes(!0) && (this.delta[0] !== 0 || this.delta[1] !== 0);
3560
3567
  }
3561
3568
  undo() {
3562
- const t = new _t(
3569
+ const t = new Gt(
3563
3570
  this.canvas,
3564
3571
  this.nodeIds,
3565
3572
  [-this.delta[0], -this.delta[1]],
@@ -3633,12 +3640,12 @@ class X {
3633
3640
  return t !== void 0;
3634
3641
  }
3635
3642
  }
3636
- class Xo {
3643
+ class jo {
3637
3644
  constructor(t, e, a, l, n, i, r, o, d) {
3638
3645
  this.canvas = t, this.childId = e, this.fromParentId = a, this.toParentId = l, this.fromChildGeometry = n, this.toChildGeometry = i, this.ancestorId = r, this.fromAncestorGeometry = o, this.toAncestorGeometry = d;
3639
3646
  }
3640
3647
  do() {
3641
- const t = this.canvas.model.nodes.get(this.childId), e = new Gt(
3648
+ const t = this.canvas.model.nodes.get(this.childId), e = new Ft(
3642
3649
  this.canvas,
3643
3650
  this.childId,
3644
3651
  this.toParentId,
@@ -3657,7 +3664,7 @@ class Xo {
3657
3664
  return t !== void 0;
3658
3665
  }
3659
3666
  undo() {
3660
- const t = this.canvas.model.nodes.get(this.childId), e = new Gt(
3667
+ const t = this.canvas.model.nodes.get(this.childId), e = new Ft(
3661
3668
  this.canvas,
3662
3669
  this.childId,
3663
3670
  this.fromParentId,
@@ -3679,12 +3686,12 @@ class Xo {
3679
3686
  return this.do();
3680
3687
  }
3681
3688
  }
3682
- class ae {
3689
+ class le {
3683
3690
  constructor(t, e, a, l) {
3684
3691
  this.canvas = t, this.type = e, this.startId = a, this.endId = l, this.id = this.canvas.collabEngine.freshId();
3685
3692
  }
3686
3693
  do() {
3687
- const t = new ee(
3694
+ const t = new oe(
3688
3695
  this.canvas,
3689
3696
  this.id,
3690
3697
  this.type.id,
@@ -3720,7 +3727,7 @@ class ae {
3720
3727
  return this.canvas.collabEngine.doCollaboratively(e), t === void 0;
3721
3728
  }
3722
3729
  }
3723
- class Te {
3730
+ class Ne {
3724
3731
  constructor(t, e, a, l) {
3725
3732
  this.canvas = t, this.fieldId = e, this.from = a, this.to = l;
3726
3733
  }
@@ -3762,7 +3769,7 @@ class Te {
3762
3769
  return t !== void 0;
3763
3770
  }
3764
3771
  }
3765
- class jo {
3772
+ class Wo {
3766
3773
  constructor(t, e, a, l) {
3767
3774
  this.canvas = t, this.id = e, this.from = a, this.to = l;
3768
3775
  }
@@ -3802,7 +3809,7 @@ class jo {
3802
3809
  return !e.rootElement.removed;
3803
3810
  }
3804
3811
  }
3805
- class Wo {
3812
+ class Zo {
3806
3813
  constructor(t, e, a, l, n, i) {
3807
3814
  this.canvas = t, this.nodeIds = e, this.sectionIds = a, this.portIds = l, this.connectionIds = n, this.fieldIds = i;
3808
3815
  }
@@ -3844,7 +3851,7 @@ class Wo {
3844
3851
  return this.do();
3845
3852
  }
3846
3853
  }
3847
- class Zo {
3854
+ class Ko {
3848
3855
  constructor(t, e, a, l) {
3849
3856
  this.canvas = t, this.nodes = e, this.connections = a, this.coords = l;
3850
3857
  }
@@ -3897,7 +3904,7 @@ class Zo {
3897
3904
  n.points[r][1] + e[1]
3898
3905
  ];
3899
3906
  }
3900
- const l = new oe(
3907
+ const l = new ie(
3901
3908
  this.canvas,
3902
3909
  this.nodes,
3903
3910
  this.connections
@@ -3935,7 +3942,7 @@ class Zo {
3935
3942
  return this.canvas.collabEngine.doCollaboratively(e), t;
3936
3943
  }
3937
3944
  }
3938
- class ie {
3945
+ class se {
3939
3946
  constructor(t) {
3940
3947
  this.type = t, this.defaultPrevented = !1;
3941
3948
  }
@@ -3943,8 +3950,8 @@ class ie {
3943
3950
  this.defaultPrevented = !0;
3944
3951
  }
3945
3952
  }
3946
- var We = /* @__PURE__ */ ((s) => (s[s.DoubleClick = 0] = "DoubleClick", s[s.SecondaryClick = 1] = "SecondaryClick", s[s.Selection = 2] = "Selection", s[s.Highlight = 3] = "Highlight", s))(We || {});
3947
- class pt extends ie {
3953
+ var Ze = /* @__PURE__ */ ((s) => (s[s.DoubleClick = 0] = "DoubleClick", s[s.SecondaryClick = 1] = "SecondaryClick", s[s.Selection = 2] = "Selection", s[s.Highlight = 3] = "Highlight", s))(Ze || {});
3954
+ class pt extends se {
3948
3955
  /**
3949
3956
  * Create a diagram double click event.
3950
3957
  *
@@ -3959,7 +3966,7 @@ class pt extends ie {
3959
3966
  ), this.cause = t, this.target = e, this.coords = a;
3960
3967
  }
3961
3968
  }
3962
- class mt extends ie {
3969
+ class mt extends se {
3963
3970
  /**
3964
3971
  * Create a diagram secondary click event.
3965
3972
  *
@@ -3974,7 +3981,7 @@ class mt extends ie {
3974
3981
  ), this.cause = t, this.target = e, this.coords = a;
3975
3982
  }
3976
3983
  }
3977
- class G extends ie {
3984
+ class G extends se {
3978
3985
  /**
3979
3986
  * Create a diagram selection event.
3980
3987
  *
@@ -3988,7 +3995,7 @@ class G extends ie {
3988
3995
  ), this.targets = t, this.selected = e;
3989
3996
  }
3990
3997
  }
3991
- class Q extends ie {
3998
+ class Q extends se {
3992
3999
  /**
3993
4000
  * Create a diagram highlight event.
3994
4001
  *
@@ -4001,7 +4008,7 @@ class Q extends ie {
4001
4008
  ), this.target = t;
4002
4009
  }
4003
4010
  }
4004
- class Ze extends It {
4011
+ class Ke extends It {
4005
4012
  constructor(t, e, a, l, n, i, r, o, d = "floating", c = "floating") {
4006
4013
  if (t.objects.get(o) !== void 0)
4007
4014
  throw new Error(`DiagramDecorator with id "${o}" already exists`);
@@ -4030,7 +4037,7 @@ class Ze extends It {
4030
4037
  return this.priority;
4031
4038
  }
4032
4039
  }
4033
- class Ko extends ft {
4040
+ class qo extends ft {
4034
4041
  /**
4035
4042
  * Instance a set of decorators for the given model. This method is used internally.
4036
4043
  * @private
@@ -4050,7 +4057,7 @@ class Ko extends ft {
4050
4057
  * @returns The instanced decorator.
4051
4058
  */
4052
4059
  new(t, e, a, l, n, i, r, o = "floating", d = "floating") {
4053
- const c = new Ze(
4060
+ const c = new Ke(
4054
4061
  this.model,
4055
4062
  t,
4056
4063
  e,
@@ -4069,7 +4076,7 @@ class Ko extends ft {
4069
4076
  e && ((e.rootElement instanceof z || e.rootElement instanceof D) && Y(e.rootElement.decorators, e), super.remove(t), e.updateInView());
4070
4077
  }
4071
4078
  }
4072
- class qo extends It {
4079
+ class Jo extends It {
4073
4080
  constructor(t, e, a, l, n, i, r) {
4074
4081
  if (t.objects.get(r) !== void 0)
4075
4082
  throw new Error(`DiagramObject with id "${r}" already exists`);
@@ -4098,7 +4105,7 @@ class qo extends It {
4098
4105
  return this.priority;
4099
4106
  }
4100
4107
  }
4101
- class Jo extends ft {
4108
+ class Qo extends ft {
4102
4109
  /**
4103
4110
  * Instance a set of objects for the given model. This method is used internally.
4104
4111
  * @private
@@ -4118,7 +4125,7 @@ class Jo extends ft {
4118
4125
  * @returns The instanced object.
4119
4126
  */
4120
4127
  new(t, e, a, l, n, i) {
4121
- const r = new qo(
4128
+ const r = new Jo(
4122
4129
  this.model,
4123
4130
  t,
4124
4131
  e,
@@ -4134,9 +4141,9 @@ class Jo extends ft {
4134
4141
  e && (super.remove(t), e.updateInView());
4135
4142
  }
4136
4143
  }
4137
- class Ke {
4144
+ class qe {
4138
4145
  constructor(t, e, a, l, n, i = []) {
4139
- this.nodes = new Vo(this), this.sections = new Ro(this), this.ports = new Uo(this), this.connections = new Eo(this), this.fields = new Mo(this), this.objects = new Jo(this), this.decorators = new Ko(this), this.canvas = t, this.id = e, this.name = a, this.description = l, this.type = n, this.createdAt = /* @__PURE__ */ new Date(), this.updatedAt = /* @__PURE__ */ new Date(), this.logicalClock = 0, this.valueSet = new yt(new Qt(i), this);
4146
+ this.nodes = new Oo(this), this.sections = new Vo(this), this.ports = new Do(this), this.connections = new Mo(this), this.fields = new To(this), this.objects = new Qo(this), this.decorators = new qo(this), this.canvas = t, this.id = e, this.name = a, this.description = l, this.type = n, this.createdAt = /* @__PURE__ */ new Date(), this.updatedAt = /* @__PURE__ */ new Date(), this.logicalClock = 0, this.valueSet = new yt(new te(i), this);
4140
4147
  }
4141
4148
  /**
4142
4149
  * Deletes everything in this diagram.
@@ -4146,7 +4153,7 @@ class Ke {
4146
4153
  this.canvas?.cancelAllUserActions(), this.id = void 0, this.name = "", this.description = void 0, this.createdAt = /* @__PURE__ */ new Date(), this.updatedAt = /* @__PURE__ */ new Date(), this.logicalClock = 0, this.nodes.clear(), this.sections.clear(), this.ports.clear(), this.connections.clear(), this.fields.clear(), this.objects.clear(), this.decorators.clear(), this.valueSet.resetValues(), this.canvas?.updateModelInView();
4147
4154
  }
4148
4155
  }
4149
- const vt = (s) => !!s.button, le = (s, t, e, a, l, n, i, r) => fo(
4156
+ const vt = (s) => !!s.button, de = (s, t, e, a, l, n, i, r) => uo(
4150
4157
  s,
4151
4158
  [t, e],
4152
4159
  a,
@@ -4159,17 +4166,17 @@ const vt = (s) => !!s.button, le = (s, t, e, a, l, n, i, r) => fo(
4159
4166
  ) * n
4160
4167
  ), S = (s) => {
4161
4168
  s ? x.select("body").style("cursor", s) : x.select("body").style("cursor", L.Auto);
4162
- }, ct = (s) => s instanceof z ? s : s instanceof D ? s.node || s : s.rootElement instanceof z || s.rootElement instanceof D || s.rootElement instanceof bt ? ct(s.rootElement) : s, de = (s) => {
4169
+ }, ct = (s) => s instanceof z ? s : s instanceof D ? s.node || s : s.rootElement instanceof z || s.rootElement instanceof D || s.rootElement instanceof bt ? ct(s.rootElement) : s, ce = (s) => {
4163
4170
  s.filter(".shaped-look").append("path"), s.filter(".image-look").append("image").attr("preserveAspectRatio", "none"), s.filter(".stretchable-image-look").append("image").attr("class", "top-left-image").attr("preserveAspectRatio", "none"), s.filter(".stretchable-image-look").append("image").attr("class", "top-image").attr("preserveAspectRatio", "none"), s.filter(".stretchable-image-look").append("image").attr("class", "top-right-image").attr("preserveAspectRatio", "none"), s.filter(".stretchable-image-look").append("image").attr("class", "left-image").attr("preserveAspectRatio", "none"), s.filter(".stretchable-image-look").append("image").attr("class", "center-image").attr("preserveAspectRatio", "none"), s.filter(".stretchable-image-look").append("image").attr("class", "right-image").attr("preserveAspectRatio", "none"), s.filter(".stretchable-image-look").append("image").attr("class", "bottom-left-image").attr("preserveAspectRatio", "none"), s.filter(".stretchable-image-look").append("image").attr("class", "bottom-image").attr("preserveAspectRatio", "none"), s.filter(".stretchable-image-look").append("image").attr("class", "bottom-right-image").attr("preserveAspectRatio", "none");
4164
- }, Pt = {
4171
+ }, zt = {
4165
4172
  fillColor: "#FFFFFF",
4166
4173
  borderColor: "#000000",
4167
4174
  borderThickness: 1,
4168
- borderStyle: ye.Solid
4169
- }, ce = (s) => {
4175
+ borderStyle: be.Solid
4176
+ }, he = (s) => {
4170
4177
  s.filter(".shaped-look").select("path").attr(
4171
4178
  "d",
4172
- (t) => pe(
4179
+ (t) => me(
4173
4180
  t.look.shape || Tt.Rectangle,
4174
4181
  0,
4175
4182
  0,
@@ -4178,18 +4185,18 @@ const vt = (s) => !!s.button, le = (s, t, e, a, l, n, i, r) => fo(
4178
4185
  )
4179
4186
  ).attr(
4180
4187
  "fill",
4181
- (t) => t.look.fillColor || Pt.fillColor
4188
+ (t) => t.look.fillColor || zt.fillColor
4182
4189
  ).attr(
4183
4190
  "stroke",
4184
- (t) => t.look.borderColor || Pt.borderColor
4191
+ (t) => t.look.borderColor || zt.borderColor
4185
4192
  ).attr(
4186
4193
  "stroke-width",
4187
- (t) => `${t.look.borderThickness || Pt.borderThickness}px`
4194
+ (t) => `${t.look.borderThickness || zt.borderThickness}px`
4188
4195
  ).attr(
4189
4196
  "stroke-dasharray",
4190
- (t) => ue(
4191
- t.look.borderStyle || Pt.borderStyle,
4192
- t.type?.defaultLook?.borderThickness || t.look?.borderThickness || Pt.borderThickness
4197
+ (t) => pe(
4198
+ t.look.borderStyle || zt.borderStyle,
4199
+ t.type?.defaultLook?.borderThickness || t.look?.borderThickness || zt.borderThickness
4193
4200
  )
4194
4201
  ), s.filter(".image-look").select("image").attr("x", 0).attr("y", 0).attr("width", (t) => t.width).attr("height", (t) => t.height).attr("href", (t) => t.look.backgroundImage), s.filter(".stretchable-image-look").select("image.top-left-image").attr("x", 0).attr("y", 0).attr("width", (t) => t.look.leftMargin).attr("height", (t) => t.look.topMargin).attr(
4195
4202
  "href",
@@ -4228,13 +4235,13 @@ const vt = (s) => !!s.button, le = (s, t, e, a, l, n, i, r) => fo(
4228
4235
  "href",
4229
4236
  (t) => t.look.backgroundImageBottomRight
4230
4237
  );
4231
- }, zt = {
4238
+ }, Rt = {
4232
4239
  style: "dots",
4233
4240
  color: "rgba(0, 0, 0, 0.1)",
4234
4241
  snap: !1,
4235
4242
  spacing: 10,
4236
4243
  thickness: 0.05
4237
- }, Qo = (s, t, e) => {
4244
+ }, ti = (s, t, e) => {
4238
4245
  const a = t.append("defs");
4239
4246
  if (s.gridSize > 0 && isFinite(s.gridSize)) {
4240
4247
  const l = a.append("pattern").attr("id", e).attr("x", -s.gridSize / 2).attr("y", -s.gridSize / 2).attr("width", s.gridSize).attr("height", s.gridSize).attr("patternUnits", "userSpaceOnUse");
@@ -4254,17 +4261,17 @@ const vt = (s) => !!s.button, le = (s, t, e, a, l, n, i, r) => fo(
4254
4261
  }
4255
4262
  t.select("rect").attr("fill", `url(#${e})`);
4256
4263
  }
4257
- }, me = 96, j = 32, xt = me + j, ti = Math.PI / 4, ei = 100, Ne = {
4264
+ }, ve = 96, j = 32, xt = ve + j, ei = Math.PI / 4, oi = 100, Pe = {
4258
4265
  customButtons: []
4259
4266
  };
4260
- class oi {
4267
+ class ii {
4261
4268
  /**
4262
4269
  * Constructs a context menu object.
4263
4270
  * @public
4264
4271
  * @param canvas A canvas.
4265
4272
  */
4266
4273
  constructor(t, e) {
4267
- this.canvas = t, this.config = e || Ne;
4274
+ this.canvas = t, this.config = e || Pe;
4268
4275
  }
4269
4276
  /**
4270
4277
  * Opens the context menu at the location determined by the given mouse event.
@@ -4307,7 +4314,7 @@ class oi {
4307
4314
  i.userSelection.removeFromModel(), i.cancelAllUserActions();
4308
4315
  }
4309
4316
  });
4310
- for (const i of this.config.customButtons || Ne.customButtons)
4317
+ for (const i of this.config.customButtons || Pe.customButtons)
4311
4318
  (i.condition === void 0 || i.condition(this.canvas)) && n.push(i);
4312
4319
  n.length === 0 && n.push({
4313
4320
  name: "NONE",
@@ -4315,7 +4322,7 @@ class oi {
4315
4322
  onPress: void 0
4316
4323
  });
4317
4324
  for (let i = 0; i < n.length; ++i) {
4318
- const r = n[i], o = r.onPress, d = (i + 0.5 - n.length / 2) * ti, c = l.append("xhtml:div").attr(
4325
+ const r = n[i], o = r.onPress, d = (i + 0.5 - n.length / 2) * ei, c = l.append("xhtml:div").attr(
4319
4326
  "class",
4320
4327
  `daga-context-menu-button ${r.onPress !== void 0 ? " daga-clickable" : ""}`
4321
4328
  ).attr("tabindex", 0).style("position", "absolute").style("box-sizing", "border-box").style("width", `${2 * j}px`).style("height", `${2 * j}px`).style("border-radius", `${j}px`).style("pointer-events", "auto").on($.Click, (h) => {
@@ -4323,14 +4330,14 @@ class oi {
4323
4330
  }).on($.KeyDown, (h) => {
4324
4331
  o && h.key === Z.Enter && (h.preventDefault(), o(this.canvas));
4325
4332
  });
4326
- r.imageClass !== void 0 ? c.append("xhtml:div").style("position", "absolute").style("left", `${0.75 * j}px`).style("top", `${0.5 * j}px`).style("width", `${0.5 * j}px`).style("height", `${0.5 * j}px`).style("background-size", "contain").style("background-repeat", "no-repeat").attr("class", r.imageClass) : r.image !== void 0 && c.append("xhtml:img").style("position", "absolute").style("left", `${0.75 * j}px`).style("top", `${0.5 * j}px`).style("width", `${0.5 * j}px`).style("height", `${0.5 * j}px`).attr("src", r.image), c.append("xhtml:span").style("position", "absolute").style("left", `${0.2 * j}px`).style("top", `${1.1 * j}px`).style("text-align", "center").style("width", `${1.6 * j}px`).style("height", `${0.35 * j}px`).style("margin", "0").style("font-size", `${0.35 * j}px`).style("font-weight", "700").style("user-select", "none").text(r.name), c.transition().ease(x.easeLinear).duration(ei).tween("progress", () => (h) => {
4333
+ r.imageClass !== void 0 ? c.append("xhtml:div").style("position", "absolute").style("left", `${0.75 * j}px`).style("top", `${0.5 * j}px`).style("width", `${0.5 * j}px`).style("height", `${0.5 * j}px`).style("background-size", "contain").style("background-repeat", "no-repeat").attr("class", r.imageClass) : r.image !== void 0 && c.append("xhtml:img").style("position", "absolute").style("left", `${0.75 * j}px`).style("top", `${0.5 * j}px`).style("width", `${0.5 * j}px`).style("height", `${0.5 * j}px`).attr("src", r.image), c.append("xhtml:span").style("position", "absolute").style("left", `${0.2 * j}px`).style("top", `${1.1 * j}px`).style("text-align", "center").style("width", `${1.6 * j}px`).style("height", `${0.35 * j}px`).style("margin", "0").style("font-size", `${0.35 * j}px`).style("font-weight", "700").style("user-select", "none").text(r.name), c.transition().ease(x.easeLinear).duration(oi).tween("progress", () => (h) => {
4327
4334
  const f = d * h;
4328
4335
  return c.style(
4329
4336
  "left",
4330
- `${Math.sin(f) * me - j + xt}px`
4337
+ `${Math.sin(f) * ve - j + xt}px`
4331
4338
  ).style(
4332
4339
  "top",
4333
- `${-Math.cos(f) * me - j + xt}px`
4340
+ `${-Math.cos(f) * ve - j + xt}px`
4334
4341
  );
4335
4342
  });
4336
4343
  }
@@ -4343,7 +4350,7 @@ class oi {
4343
4350
  this.contextMenuContainer?.remove(), this.contextMenuContainer = void 0;
4344
4351
  }
4345
4352
  }
4346
- class ii extends ft {
4353
+ class si extends ft {
4347
4354
  /**
4348
4355
  * Constructs a user highlight object.
4349
4356
  * @public
@@ -4365,7 +4372,7 @@ class ii extends ft {
4365
4372
  * @param element
4366
4373
  */
4367
4374
  focusOn(t) {
4368
- this.clear(), this.focus = t, (t instanceof ht || t instanceof Ze) && t.rootElement ? this.focusOn(t.rootElement) : this.add(t);
4375
+ this.clear(), this.focus = t, (t instanceof ht || t instanceof Ke) && t.rootElement ? this.focusOn(t.rootElement) : this.add(t);
4369
4376
  }
4370
4377
  add(t) {
4371
4378
  if (super.add(t), t instanceof z) {
@@ -4397,13 +4404,13 @@ class ii extends ft {
4397
4404
  this.focus = void 0;
4398
4405
  }
4399
4406
  }
4400
- const si = 1;
4401
- class qe {
4407
+ const ni = 1;
4408
+ class Je {
4402
4409
  export(t, e = !1) {
4403
4410
  const a = {
4404
4411
  name: t.name,
4405
4412
  type: t.type,
4406
- typeVersion: si,
4413
+ typeVersion: ni,
4407
4414
  createdAt: t.createdAt,
4408
4415
  updatedAt: t.updatedAt,
4409
4416
  nodes: [],
@@ -4541,17 +4548,17 @@ class qe {
4541
4548
  } : {};
4542
4549
  }
4543
4550
  }
4544
- const ni = "Diagram properties";
4545
- class ri extends ft {
4551
+ const ri = "Diagram properties";
4552
+ class ai extends ft {
4546
4553
  /**
4547
4554
  * Constructs a user selection object.
4548
4555
  * @public
4549
4556
  * @param canvas A canvas.
4550
4557
  */
4551
4558
  constructor(t, e) {
4552
- super(), this.canvas = t, this.canvas.propertyEditorChanges$.pipe(ro(2e3)).subscribe(() => {
4559
+ super(), this.canvas = t, this.canvas.propertyEditorChanges$.pipe(ao(2e3)).subscribe(() => {
4553
4560
  this.makeUpdateValuesAction();
4554
- }), console.log(e), this.diagramPropertiesText = e !== void 0 ? e : ni;
4561
+ }), console.log(e), this.diagramPropertiesText = e !== void 0 ? e : ri;
4555
4562
  }
4556
4563
  add(t) {
4557
4564
  if (!this.contains(t.id) && (this.length === 0 ? this.propertyEditorSelection === void 0 && (t instanceof z || t instanceof dt) ? this.openInPropertyEditor(t) : this.propertyEditorSelection === void 0 && t instanceof D ? this.openInPropertyEditor(t.node) : this.openInPropertyEditor(void 0) : this.openInPropertyEditor(void 0), super.add(t), t.updateInView(), t instanceof z && t.sections))
@@ -4600,7 +4607,7 @@ class ri extends ft {
4600
4607
  const t = [], e = [], a = [], l = [], n = [];
4601
4608
  for (const r of this.all())
4602
4609
  r instanceof z ? t.push(r.id) : r instanceof D ? e.push(r.id) : r instanceof bt ? a.push(r.id) : r instanceof dt ? l.push(r.id) : r instanceof ht && n.push(r.id);
4603
- const i = new Wo(
4610
+ const i = new Zo(
4604
4611
  this.canvas,
4605
4612
  t,
4606
4613
  e,
@@ -4616,7 +4623,7 @@ class ri extends ft {
4616
4623
  * @public
4617
4624
  */
4618
4625
  copyToClipboard() {
4619
- const t = { type: "daga-user-selection", nodes: [], connections: [] }, e = new qe();
4626
+ const t = { type: "daga-user-selection", nodes: [], connections: [] }, e = new Je();
4620
4627
  for (const a of this.all())
4621
4628
  a instanceof z && t.nodes.push(e.exportNode(a, !1)), a instanceof dt && t.connections.push(
4622
4629
  e.exportConnection(a, !1)
@@ -4640,7 +4647,7 @@ class ri extends ft {
4640
4647
  const a = JSON.parse(e);
4641
4648
  if (a.type !== "daga-user-selection")
4642
4649
  return;
4643
- const l = new Zo(
4650
+ const l = new Ko(
4644
4651
  this.canvas,
4645
4652
  a.nodes,
4646
4653
  a.connections,
@@ -4666,26 +4673,22 @@ class ri extends ft {
4666
4673
  if (a === void 0)
4667
4674
  return;
4668
4675
  const l = t?.valueSet;
4669
- l ? (this.propertyEditorSelection = t, e && (this.propertyEditorValues = structuredClone(
4670
- l.getValues()
4671
- )), a && (t instanceof z || t instanceof dt ? (t instanceof z ? t.name ? a.title = `${t.type.name}: ${t.name}` : a.title = t.type.name : t instanceof dt && (a.title = t.type.name), a.valueSet = void 0, a.valueSet = l) : (a.title = this.diagramPropertiesText, a.valueSet = void 0, a.valueSet = l))) : (this.propertyEditorSelection = void 0, this.propertyEditorValues = void 0, a && (a.title = "", a.valueSet = void 0));
4676
+ l ? (this.propertyEditorSelection = t, e && (this.propertyEditorValues = Nt(l.getValues())), a && (t instanceof z || t instanceof dt ? (t instanceof z ? t.name ? a.title = `${t.type.name}: ${t.name}` : a.title = t.type.name : t instanceof dt && (a.title = t.type.name), a.valueSet = void 0, a.valueSet = l) : (a.title = this.diagramPropertiesText, a.valueSet = void 0, a.valueSet = l))) : (this.propertyEditorSelection = void 0, this.propertyEditorValues = void 0, a && (a.title = "", a.valueSet = void 0));
4672
4677
  }
4673
4678
  makeUpdateValuesAction() {
4674
4679
  if (this.propertyEditorSelection === void 0 || this.propertyEditorValues === void 0)
4675
4680
  return;
4676
- const t = this.propertyEditorSelection instanceof Ke ? void 0 : this.propertyEditorSelection.id;
4681
+ const t = this.propertyEditorSelection instanceof qe ? void 0 : this.propertyEditorSelection.id;
4677
4682
  if (St(
4678
4683
  this.propertyEditorValues,
4679
4684
  this.propertyEditorSelection?.valueSet.getValues()
4680
4685
  ))
4681
4686
  return;
4682
- const e = this.propertyEditorValues, a = structuredClone(
4683
- this.propertyEditorSelection?.valueSet.getValues()
4684
- ), [l, n] = Ge(
4687
+ const e = this.propertyEditorValues, a = Nt(this.propertyEditorSelection?.valueSet.getValues()), [l, n] = Fe(
4685
4688
  e,
4686
4689
  a,
4687
4690
  this.propertyEditorSelection?.valueSet
4688
- ), i = new jo(
4691
+ ), i = new Wo(
4689
4692
  this.canvas,
4690
4693
  t,
4691
4694
  l,
@@ -4694,10 +4697,10 @@ class ri extends ft {
4694
4697
  i.do(), this.canvas.actionStack.add(i), this.propertyEditorValues = a;
4695
4698
  }
4696
4699
  }
4697
- const ai = (s) => s * Math.PI / 180, Pe = (s, t, e) => {
4698
- const a = ai(e), l = Math.sin(a), n = Math.cos(a), i = (Math.abs(s * n) - Math.abs(t * l)) / (n * n - l * l), r = (Math.abs(s * l) - Math.abs(t * n)) / (l * l - n * n);
4700
+ const li = (s) => s * Math.PI / 180, ze = (s, t, e) => {
4701
+ const a = li(e), l = Math.sin(a), n = Math.cos(a), i = (Math.abs(s * n) - Math.abs(t * l)) / (n * n - l * l), r = (Math.abs(s * l) - Math.abs(t * n)) / (l * l - n * n);
4699
4702
  return [i, r];
4700
- }, li = 12, H = 6, di = 25, he = "diagram-connection-unfinished", qt = class qt {
4703
+ }, di = 12, H = 6, ci = 25, ge = "diagram-connection-unfinished", Jt = class Jt {
4701
4704
  /**
4702
4705
  * Constructs a canvas object.
4703
4706
  * @public
@@ -4705,24 +4708,24 @@ const ai = (s) => s * Math.PI / 180, Pe = (s, t, e) => {
4705
4708
  * @param config The configuration object used to set the parameters of this canvas.
4706
4709
  */
4707
4710
  constructor(t, e) {
4708
- if (this.backgroundPatternId = `daga-background-pattern-id-${qt.canvasCount++}`, this.zoomTransform = x.zoomIdentity, this.draggingFrom = [0, 0], this.dragging = !1, this.secondaryButton = !1, this.validatorChange$ = new Yt(), this.diagramChange$ = new Yt(), this.diagramEvent$ = new Yt(), this.propertyEditorChanges$ = new Yt(), this.parentComponent = t, this.model = new Ke(
4711
+ if (this.backgroundPatternId = `daga-background-pattern-id-${Jt.canvasCount++}`, this.zoomTransform = x.zoomIdentity, this.draggingFrom = [0, 0], this.dragging = !1, this.secondaryButton = !1, this.validatorChange$ = new Xt(), this.diagramChange$ = new Xt(), this.diagramEvent$ = new Xt(), this.propertyEditorChanges$ = new Xt(), this.parentComponent = t, this.model = new qe(
4709
4712
  this,
4710
4713
  void 0,
4711
4714
  e.name || "unnamed",
4712
4715
  "",
4713
4716
  e.type || "",
4714
4717
  e.properties || []
4715
- ), this.userSelection = new ri(
4718
+ ), this.userSelection = new ai(
4716
4719
  this,
4717
4720
  e.components?.propertyEditor?.title
4718
- ), this.userHighlight = new ii(
4721
+ ), this.userHighlight = new si(
4719
4722
  this,
4720
4723
  e.canvas?.highlightSections !== !1
4721
- ), this.contextMenu = new oi(this, e.canvas?.contextMenu), this.backgroundColor = e.canvas?.backgroundColor || "#FFFFFF", this.gridStyle = e.canvas?.grid?.style ?? zt.style, this.gridSize = e.canvas?.grid?.enabled === !1 || e.canvas?.grid === void 0 ? 0 : Math.abs(e.canvas?.grid?.spacing || zt.spacing), this.gridThickness = Math.abs(
4722
- e.canvas?.grid?.thickness || zt.thickness
4723
- ), this.gridColor = e.canvas?.grid?.color || zt.color, this.snapToGrid = e.canvas?.grid?.enabled === !1 || e.canvas?.grid === void 0 ? !1 : e.canvas?.grid?.snap || zt.snap, this.zoomFactor = e.canvas?.zoomFactor || 2, this.panRate = e.canvas?.panRate || 100, this.inferConnectionType = e.connectionSettings?.inferConnectionType || !1, this.autoTightenConnections = e.connectionSettings?.autoTighten !== !1, this.allowConnectionLoops = e.connectionSettings?.allowLoops || !1, this.allowSharingPorts = e.connectionSettings?.sharePorts !== !1, this.allowSharingBothPorts = e.connectionSettings?.shareBothPorts || !1, this.portHighlightRadius = e.connectionSettings?.portHighlightRadius || 100, this.multipleSelectionOn = !1, this.priorityThresholds = e.canvas?.priorityThresholds || [], this.priorityThreshold = this.priorityThresholds ? this.priorityThresholds[0] : void 0, this.layoutFormat = e.layoutFormat, this.userActions = e.userActions || {}, this.validators = [], this.actionStack = new Bo(this, di), this.collabEngine = new Do(this), e.nodeTypes)
4724
+ ), this.contextMenu = new ii(this, e.canvas?.contextMenu), this.backgroundColor = e.canvas?.backgroundColor || "#FFFFFF", this.gridStyle = e.canvas?.grid?.style ?? Rt.style, this.gridSize = e.canvas?.grid?.enabled === !1 || e.canvas?.grid === void 0 ? 0 : Math.abs(e.canvas?.grid?.spacing || Rt.spacing), this.gridThickness = Math.abs(
4725
+ e.canvas?.grid?.thickness || Rt.thickness
4726
+ ), this.gridColor = e.canvas?.grid?.color || Rt.color, this.snapToGrid = e.canvas?.grid?.enabled === !1 || e.canvas?.grid === void 0 ? !1 : e.canvas?.grid?.snap || Rt.snap, this.zoomFactor = e.canvas?.zoomFactor || 2, this.panRate = e.canvas?.panRate || 100, this.inferConnectionType = e.connectionSettings?.inferConnectionType || !1, this.autoTightenConnections = e.connectionSettings?.autoTighten !== !1, this.allowConnectionLoops = e.connectionSettings?.allowLoops || !1, this.allowSharingPorts = e.connectionSettings?.sharePorts !== !1, this.allowSharingBothPorts = e.connectionSettings?.shareBothPorts || !1, this.portHighlightRadius = e.connectionSettings?.portHighlightRadius || 100, this.multipleSelectionOn = !1, this.priorityThresholds = e.canvas?.priorityThresholds || [], this.priorityThreshold = this.priorityThresholds ? this.priorityThresholds[0] : void 0, this.layoutFormat = e.layoutFormat, this.userActions = e.userActions || {}, this.validators = [], this.actionStack = new Yo(this, ci), this.collabEngine = new Bo(this), e.nodeTypes)
4724
4727
  for (const a of e.nodeTypes) {
4725
- const l = new De({
4728
+ const l = new Be({
4726
4729
  ...e.nodeTypeDefaults,
4727
4730
  ...a
4728
4731
  });
@@ -4730,7 +4733,7 @@ const ai = (s) => s * Math.PI / 180, Pe = (s, t, e) => {
4730
4733
  }
4731
4734
  if (e.portTypes)
4732
4735
  for (const a of e.portTypes) {
4733
- const l = new Fo({
4736
+ const l = new Uo({
4734
4737
  ...e.portTypeDefaults,
4735
4738
  ...a
4736
4739
  });
@@ -4738,7 +4741,7 @@ const ai = (s) => s * Math.PI / 180, Pe = (s, t, e) => {
4738
4741
  }
4739
4742
  if (e.connectionTypes) {
4740
4743
  for (const a of e.connectionTypes) {
4741
- const l = new Fe({
4744
+ const l = new Ue({
4742
4745
  ...e.connectionTypeDefaults,
4743
4746
  ...a
4744
4747
  });
@@ -4826,7 +4829,7 @@ const ai = (s) => s * Math.PI / 180, Pe = (s, t, e) => {
4826
4829
  });
4827
4830
  const a = this.selectSVGElement().append("g").attr("class", "daga-canvas-view").attr("width", "100%").attr("height", "100%");
4828
4831
  a.call(
4829
- this.zoomBehavior = x.zoom().filter((l) => l.type !== $.DoubleClick).on(ge.Zoom, (l) => {
4832
+ this.zoomBehavior = x.zoom().filter((l) => l.type !== $.DoubleClick).on(fe.Zoom, (l) => {
4830
4833
  if (l.sourceEvent) {
4831
4834
  if (!this.canUserPerformAction(w.Zoom)) {
4832
4835
  S(L.NotAllowed);
@@ -4840,7 +4843,7 @@ const ai = (s) => s * Math.PI / 180, Pe = (s, t, e) => {
4840
4843
  "patternTransform",
4841
4844
  n
4842
4845
  ), this.contextMenu.close();
4843
- }).on(ge.End, () => {
4846
+ }).on(fe.End, () => {
4844
4847
  S();
4845
4848
  })
4846
4849
  ), a.append("rect").attr("x", 0).attr("y", 0).attr("width", "100%").attr("height", "100%").attr("fill", this.backgroundColor).attr("stroke-width", "0").on($.MouseMove, (l) => {
@@ -4866,7 +4869,7 @@ const ai = (s) => s * Math.PI / 180, Pe = (s, t, e) => {
4866
4869
  }).on(I.End, (l) => {
4867
4870
  this.finishMultipleSelection(l);
4868
4871
  })
4869
- ), Qo(this, a, this.backgroundPatternId), a.append("g").attr("class", "daga-canvas-elements");
4872
+ ), ti(this, a, this.backgroundPatternId), a.append("g").attr("class", "daga-canvas-elements");
4870
4873
  }
4871
4874
  getZoomLevel() {
4872
4875
  return this.zoomTransform.k;
@@ -5000,7 +5003,7 @@ const ai = (s) => s * Math.PI / 180, Pe = (s, t, e) => {
5000
5003
  }).on(I.End, (i, r) => {
5001
5004
  this.multipleSelectionOn || this.secondaryButton ? this.finishMultipleSelection(i) : this.finishMovingNode(i, r), this.secondaryButton = !1;
5002
5005
  })
5003
- ), de(
5006
+ ), ce(
5004
5007
  l
5005
5008
  ), l.filter(".resizable-x").append("line").attr("class", "left-resizer").attr("stroke", "transparent").attr("stroke-width", `${H}px`).on($.MouseOver, (i, r) => {
5006
5009
  this.canUserPerformAction(w.StretchNode) && r.type.resizableX && !r.removed && S(L.EWResize);
@@ -5120,7 +5123,7 @@ const ai = (s) => s * Math.PI / 180, Pe = (s, t, e) => {
5120
5123
  }
5121
5124
  S();
5122
5125
  })
5123
- ), n.attr("transform", (i) => `translate(${i.coords[0]},${i.coords[1]})`).attr("opacity", (i) => i.removed ? 0.5 : 1), ce(
5126
+ ), n.attr("transform", (i) => `translate(${i.coords[0]},${i.coords[1]})`).attr("opacity", (i) => i.removed ? 0.5 : 1), he(
5124
5127
  n
5125
5128
  ), n.filter(".resizable-x").select("line.left-resizer").attr("x1", H / 2).attr("x2", H / 2).attr("y1", 0).attr("y2", (i) => i.height), n.filter(".resizable-y").select("line.top-resizer").attr("x1", 0).attr("x2", (i) => i.width).attr("y1", H / 2).attr("y2", H / 2), n.filter(".resizable-x").select("line.right-resizer").attr("x1", (i) => i.width - H / 2).attr("x2", (i) => i.width - H / 2).attr("y1", 0).attr("y2", (i) => i.height), n.filter(".resizable-y").select("line.bottom-resizer").attr("x1", 0).attr("x2", (i) => i.width).attr("y1", (i) => i.height - H / 2).attr("y2", (i) => i.height - H / 2);
5126
5129
  }
@@ -5193,7 +5196,7 @@ const ai = (s) => s * Math.PI / 180, Pe = (s, t, e) => {
5193
5196
  }
5194
5197
  this.secondaryButton = !1;
5195
5198
  })
5196
- ), de(
5199
+ ), ce(
5197
5200
  l
5198
5201
  ), l.filter(".resizable-x").append("line").attr("class", "left-resizer").attr("stroke", "transparent").attr("stroke-width", `${H}px`).on($.MouseOver, (i, r) => {
5199
5202
  this.canUserPerformAction(w.StretchSection) && r.getResizableX() && !r.removed && S(L.EWResize);
@@ -5335,7 +5338,7 @@ const ai = (s) => s * Math.PI / 180, Pe = (s, t, e) => {
5335
5338
  }
5336
5339
  S();
5337
5340
  })
5338
- ), n.attr("transform", (i) => `translate(${i.coords[0]},${i.coords[1]})`).attr("opacity", (i) => i.removed ? 0.5 : 1), ce(
5341
+ ), n.attr("transform", (i) => `translate(${i.coords[0]},${i.coords[1]})`).attr("opacity", (i) => i.removed ? 0.5 : 1), he(
5339
5342
  n
5340
5343
  ), n.filter(".resizable-x").select("line.left-resizer").attr("x1", H / 2).attr("x2", H / 2).attr("y1", 0).attr("y2", (i) => i.height), n.filter(".resizable-y").select("line.top-resizer").attr("x1", 0).attr("x2", (i) => i.width).attr("y1", H / 2).attr("y2", H / 2), n.filter(".resizable-x").select("line.right-resizer").attr("x1", (i) => i.width - H / 2).attr("x2", (i) => i.width - H / 2).attr("y1", 0).attr("y2", (i) => i.height), n.filter(".resizable-y").select("line.bottom-resizer").attr("x1", 0).attr("x2", (i) => i.width).attr("y1", (i) => i.height - H / 2).attr("y2", (i) => i.height - H / 2);
5341
5344
  }
@@ -5405,7 +5408,7 @@ const ai = (s) => s * Math.PI / 180, Pe = (s, t, e) => {
5405
5408
  const o = [i.x, i.y];
5406
5409
  this.unfinishedConnectionTracer?.attr(
5407
5410
  "d",
5408
- le(
5411
+ de(
5409
5412
  this.unfinishedConnection.look.shape || et.look.shape,
5410
5413
  this.unfinishedConnection.startCoords,
5411
5414
  o,
@@ -5430,7 +5433,7 @@ const ai = (s) => s * Math.PI / 180, Pe = (s, t, e) => {
5430
5433
  ];
5431
5434
  } else
5432
5435
  this.unfinishedConnection.endCoords = o;
5433
- if (this.updateConnectionsInView(he), this.model.ports.length > 0) {
5436
+ if (this.updateConnectionsInView(ge), this.model.ports.length > 0) {
5434
5437
  const c = this.getPointerLocationRelativeToCanvas(i);
5435
5438
  let h = Number.POSITIVE_INFINITY, f;
5436
5439
  for (const y of this.model.ports) {
@@ -5473,12 +5476,12 @@ const ai = (s) => s * Math.PI / 180, Pe = (s, t, e) => {
5473
5476
  }
5474
5477
  this.secondaryButton = !1;
5475
5478
  })
5476
- ), l.filter(".image-look").append("image"), de(
5479
+ ), l.filter(".image-look").append("image"), ce(
5477
5480
  l
5478
5481
  ), n.attr(
5479
5482
  "transform",
5480
5483
  (i) => `translate(${i.coords[0] - i.width / 2},${i.coords[1] - i.width / 2})`
5481
- ).attr("opacity", (i) => i.removed ? 0.5 : 1), ce(
5484
+ ).attr("opacity", (i) => i.removed ? 0.5 : 1), he(
5482
5485
  n
5483
5486
  );
5484
5487
  }
@@ -5521,7 +5524,7 @@ const ai = (s) => s * Math.PI / 180, Pe = (s, t, e) => {
5521
5524
  })
5522
5525
  ), n.append("path").attr("class", "diagram-connection-path"), n.append("path").attr("class", "diagram-connection-path-box"), n.append("marker").attr("id", (r) => `${r.id}-start-marker`).attr("class", "diagram-connection-start-marker").append("image").attr("preserveAspectRatio", "none"), n.append("marker").attr("id", (r) => `${r.id}-end-marker`).attr("class", "diagram-connection-end-marker").append("image").attr("preserveAspectRatio", "none"), n.append("g").attr("class", "diagram-connection-start-label"), n.select("g.diagram-connection-start-label").append("path"), n.select("g.diagram-connection-start-label").append("text").style("user-select", "none"), n.append("g").attr("class", "diagram-connection-middle-label"), n.select("g.diagram-connection-middle-label").append("path"), n.select("g.diagram-connection-middle-label").append("text").style("user-select", "none"), n.append("g").attr("class", "diagram-connection-end-label"), n.select("g.diagram-connection-end-label").append("path"), n.select("g.diagram-connection-end-label").append("text").style("user-select", "none"), i.attr("opacity", (r) => r.removed ? 0.5 : 1).select("path.diagram-connection-path").attr(
5523
5526
  "d",
5524
- (r) => le(
5527
+ (r) => de(
5525
5528
  r.look.shape || et.look.shape,
5526
5529
  r.startCoords,
5527
5530
  r.endCoords,
@@ -5536,13 +5539,13 @@ const ai = (s) => s * Math.PI / 180, Pe = (s, t, e) => {
5536
5539
  (r) => r.look.color || et.look.color
5537
5540
  ).attr("stroke-width", (r) => `${r.look.thickness}px`).attr(
5538
5541
  "stroke-dasharray",
5539
- (r) => ue(
5542
+ (r) => pe(
5540
5543
  r.look.style || et.look.style,
5541
5544
  r.type.defaultLook.thickness || et.look.thickness
5542
5545
  )
5543
5546
  ).attr("fill", "none"), i.select("path.diagram-connection-path-box").attr(
5544
5547
  "d",
5545
- (r) => le(
5548
+ (r) => de(
5546
5549
  r.look.shape || et.look.shape,
5547
5550
  r.startCoords,
5548
5551
  r.endCoords,
@@ -5554,10 +5557,10 @@ const ai = (s) => s * Math.PI / 180, Pe = (s, t, e) => {
5554
5557
  )
5555
5558
  ).attr("stroke", "transparent").attr("pointer-events", "stroke").attr(
5556
5559
  "stroke-width",
5557
- (r) => `${(r.look.thickness || et.look.thickness) + li}px`
5560
+ (r) => `${(r.look.thickness || et.look.thickness) + di}px`
5558
5561
  ).attr(
5559
5562
  "stroke-dasharray",
5560
- (r) => ue(
5563
+ (r) => pe(
5561
5564
  r.look.style || et.look.style,
5562
5565
  r.type.defaultLook.thickness || et.look.thickness
5563
5566
  )
@@ -5608,7 +5611,7 @@ const ai = (s) => s * Math.PI / 180, Pe = (s, t, e) => {
5608
5611
  }
5609
5612
  }).on($.DoubleClick, (i, r) => {
5610
5613
  const o = new pt(i, r);
5611
- this.diagramEvent$.next(o), !o.defaultPrevented && this.canUserPerformAction(w.EditField) && r.editable && !r.removed && (this.currentAction = new Te(this, r.id, r.text, ""), this.createInputField(
5614
+ this.diagramEvent$.next(o), !o.defaultPrevented && this.canUserPerformAction(w.EditField) && r.editable && !r.removed && (this.currentAction = new Ne(this, r.id, r.text, ""), this.createInputField(
5612
5615
  r.text,
5613
5616
  r.coords,
5614
5617
  r.width,
@@ -5619,7 +5622,7 @@ const ai = (s) => s * Math.PI / 180, Pe = (s, t, e) => {
5619
5622
  (d) => {
5620
5623
  },
5621
5624
  (d) => {
5622
- r.text = d, this.currentAction instanceof Te && (this.currentAction.to = d, this.currentAction.do(), this.actionStack.add(this.currentAction), this.currentAction = void 0);
5625
+ r.text = d, this.currentAction instanceof Ne && (this.currentAction.to = d, this.currentAction.do(), this.actionStack.add(this.currentAction), this.currentAction = void 0);
5623
5626
  }
5624
5627
  ));
5625
5628
  }).call(
@@ -5651,13 +5654,13 @@ const ai = (s) => s * Math.PI / 180, Pe = (s, t, e) => {
5651
5654
  (i) => i.horizontalAlign === Lt.Center ? "center" : i.horizontalAlign === Lt.Right ? "flex-end" : "flex-start"
5652
5655
  ).style(
5653
5656
  "align-items",
5654
- (i) => i.verticalAlign === Zt.Center ? "center" : i.verticalAlign === Zt.Bottom ? "end" : "start"
5657
+ (i) => i.verticalAlign === Kt.Center ? "center" : i.verticalAlign === Kt.Bottom ? "end" : "start"
5655
5658
  ).select("p").style(
5656
5659
  "max-width",
5657
- (i) => i.fit ? "default" : `${Pe(i.width, i.height, i.orientation)[0]}px`
5660
+ (i) => i.fit ? "default" : `${ze(i.width, i.height, i.orientation)[0]}px`
5658
5661
  ).style(
5659
5662
  "max-height",
5660
- (i) => i.fit ? "default" : `${Pe(i.width, i.height, i.orientation)[1]}px`
5663
+ (i) => i.fit ? "default" : `${ze(i.width, i.height, i.orientation)[1]}px`
5661
5664
  ).style("overflow", (i) => i.fit ? "default" : "clip").style("text-overflow", (i) => i.fit ? "default" : "ellipsis").style(
5662
5665
  "text-align",
5663
5666
  (i) => i.horizontalAlign === Lt.Center ? "center" : i.horizontalAlign === Lt.Right ? "end" : "start"
@@ -5775,7 +5778,7 @@ const ai = (s) => s * Math.PI / 180, Pe = (s, t, e) => {
5775
5778
  }
5776
5779
  updateConnectionLabelsInView(t) {
5777
5780
  const e = this.selectCanvasView().select(
5778
- `[id='${fe(t.id)}']`
5781
+ `[id='${ue(t.id)}']`
5779
5782
  ), l = e.select("path").node(), n = {
5780
5783
  ...V,
5781
5784
  ...t.type.label
@@ -5825,7 +5828,7 @@ const ai = (s) => s * Math.PI / 180, Pe = (s, t, e) => {
5825
5828
  ).style("font-kerning", "none").text(t.startLabel);
5826
5829
  const y = e.select("g.diagram-connection-start-label text").node()?.getBoundingClientRect();
5827
5830
  if (y) {
5828
- const u = t.startLabel ? y.width / this.zoomTransform.k + Vt(n) + Ot(n) : 0, k = t.startLabel ? y.height / this.zoomTransform.k + Ht(n) + Rt(n) : 0;
5831
+ const u = t.startLabel ? y.width / this.zoomTransform.k + Ot(n) + Ht(n) : 0, k = t.startLabel ? y.height / this.zoomTransform.k + _t(n) + Vt(n) : 0;
5829
5832
  let b;
5830
5833
  switch (t.startDirection) {
5831
5834
  case g.Left:
@@ -5860,7 +5863,7 @@ const ai = (s) => s * Math.PI / 180, Pe = (s, t, e) => {
5860
5863
  }
5861
5864
  e.select("g.diagram-connection-start-label path").attr(
5862
5865
  "d",
5863
- Wt(
5866
+ Zt(
5864
5867
  -u / 2,
5865
5868
  -k / 2,
5866
5869
  u,
@@ -5877,10 +5880,10 @@ const ai = (s) => s * Math.PI / 180, Pe = (s, t, e) => {
5877
5880
  ).style("font-kerning", "none").text(t.middleLabel);
5878
5881
  const m = e.select("g.diagram-connection-middle-label text").node()?.getBoundingClientRect();
5879
5882
  if (m) {
5880
- const u = t.middleLabel ? m.width / this.zoomTransform.k + Vt(n) + Ot(n) : 0, k = t.middleLabel ? m.height / this.zoomTransform.k + Ht(n) + Rt(n) : 0, b = l.getPointAtLength(i / 2);
5883
+ const u = t.middleLabel ? m.width / this.zoomTransform.k + Ot(n) + Ht(n) : 0, k = t.middleLabel ? m.height / this.zoomTransform.k + _t(n) + Vt(n) : 0, b = l.getPointAtLength(i / 2);
5881
5884
  e.select("g.diagram-connection-middle-label path").attr(
5882
5885
  "d",
5883
- Wt(
5886
+ Zt(
5884
5887
  -u / 2,
5885
5888
  -k / 2,
5886
5889
  u,
@@ -5897,7 +5900,7 @@ const ai = (s) => s * Math.PI / 180, Pe = (s, t, e) => {
5897
5900
  ).style("font-kerning", "none").text(t.endLabel);
5898
5901
  const p = e.select("g.diagram-connection-end-label text").node()?.getBoundingClientRect();
5899
5902
  if (p) {
5900
- const u = t.endLabel ? p.width / this.zoomTransform.k + Vt(n) + Ot(n) : 0, k = t.endLabel ? p.height / this.zoomTransform.k + Ht(n) + Rt(n) : 0;
5903
+ const u = t.endLabel ? p.width / this.zoomTransform.k + Ot(n) + Ht(n) : 0, k = t.endLabel ? p.height / this.zoomTransform.k + _t(n) + Vt(n) : 0;
5901
5904
  let b;
5902
5905
  switch (t.endDirection) {
5903
5906
  case g.Left:
@@ -5932,7 +5935,7 @@ const ai = (s) => s * Math.PI / 180, Pe = (s, t, e) => {
5932
5935
  }
5933
5936
  e.select("g.diagram-connection-end-label path").attr(
5934
5937
  "d",
5935
- Wt(
5938
+ Zt(
5936
5939
  -u / 2,
5937
5940
  -k / 2,
5938
5941
  u,
@@ -5947,7 +5950,7 @@ const ai = (s) => s * Math.PI / 180, Pe = (s, t, e) => {
5947
5950
  }
5948
5951
  updateConnectionMarkersInView(t) {
5949
5952
  const e = this.selectCanvasView().select(
5950
- `[id='${fe(t.id)}']`
5953
+ `[id='${ue(t.id)}']`
5951
5954
  ), a = e.select("marker.diagram-connection-start-marker"), l = e.select("marker.diagram-connection-end-marker");
5952
5955
  t.startMarkerLook !== null ? a.attr("orient", "auto-start-reverse").attr("markerWidth", t.startMarkerLook.width).attr("markerHeight", t.startMarkerLook.height).attr("refX", t.startMarkerLook.refX).attr("refY", t.startMarkerLook.refY).select("image").attr("href", t.startMarkerLook.image).attr("width", t.startMarkerLook.width).attr("height", t.startMarkerLook.height) : a.attr("orient", "auto-start-reverse").attr("markerWidth", 0).attr("markerHeight", 0), t.endMarkerLook !== null ? l.attr("orient", "auto-start-reverse").attr("markerWidth", t.endMarkerLook.width).attr("markerHeight", t.endMarkerLook.height).attr("refX", t.endMarkerLook.refX).attr("refY", t.endMarkerLook.refY).select("image").attr("href", t.endMarkerLook.image).attr("width", t.endMarkerLook.width).attr("height", t.endMarkerLook.height) : l.attr("orient", "auto-start-reverse").attr("markerWidth", 0).attr("markerHeight", 0);
5953
5956
  }
@@ -6040,7 +6043,7 @@ const ai = (s) => s * Math.PI / 180, Pe = (s, t, e) => {
6040
6043
  this.connectionType,
6041
6044
  t,
6042
6045
  void 0,
6043
- he
6046
+ ge
6044
6047
  );
6045
6048
  else if (this.inferConnectionType) {
6046
6049
  let e = this.model.connections.types.all().find(
@@ -6053,7 +6056,7 @@ const ai = (s) => s * Math.PI / 180, Pe = (s, t, e) => {
6053
6056
  e,
6054
6057
  t,
6055
6058
  void 0,
6056
- he
6059
+ ge
6057
6060
  ));
6058
6061
  }
6059
6062
  }
@@ -6079,7 +6082,7 @@ const ai = (s) => s * Math.PI / 180, Pe = (s, t, e) => {
6079
6082
  ) && this.unfinishedConnection?.start?.allowsOutgoing && this.unfinishedConnection.type.canFinishOnType(
6080
6083
  t.getNode()?.type?.id || ""
6081
6084
  ) && t.allowsIncoming) {
6082
- const e = new ae(
6085
+ const e = new le(
6083
6086
  this,
6084
6087
  this.unfinishedConnection.type,
6085
6088
  this.unfinishedConnection.start?.id,
@@ -6091,7 +6094,7 @@ const ai = (s) => s * Math.PI / 180, Pe = (s, t, e) => {
6091
6094
  ) && this.unfinishedConnection?.start?.allowsIncoming && this.unfinishedConnection.type.canStartFromType(
6092
6095
  t.getNode()?.type?.id || ""
6093
6096
  ) && t.allowsOutgoing) {
6094
- const e = new ae(
6097
+ const e = new le(
6095
6098
  this,
6096
6099
  this.unfinishedConnection.type,
6097
6100
  t.id,
@@ -6109,7 +6112,7 @@ const ai = (s) => s * Math.PI / 180, Pe = (s, t, e) => {
6109
6112
  this.unfinishedConnection?.start?.getNode()?.type?.id || ""
6110
6113
  ) && this.unfinishedConnection?.start?.allowsIncoming && l.canStartFromType(t.getNode()?.type?.id || "") && t.allowsOutgoing
6111
6114
  ), a = !0), e !== void 0) {
6112
- const l = new ae(
6115
+ const l = new le(
6113
6116
  this,
6114
6117
  e,
6115
6118
  a ? t.id : this.unfinishedConnection.start?.id,
@@ -6146,7 +6149,7 @@ const ai = (s) => s * Math.PI / 180, Pe = (s, t, e) => {
6146
6149
  }
6147
6150
  }).on($.Input, () => {
6148
6151
  const p = h.property("value");
6149
- h.attr("cols", wo(p) + 1), h.attr("rows", So(p) + 1), h.style("width", ""), h.style("height", ""), f = h.property("scrollWidth") + 1, y = h.property("scrollHeight") + 1;
6152
+ h.attr("cols", So(p) + 1), h.attr("rows", Co(p) + 1), h.style("width", ""), h.style("height", ""), f = h.property("scrollWidth") + 1, y = h.property("scrollHeight") + 1;
6150
6153
  const u = Math.max(f, a), k = Math.max(y, l);
6151
6154
  c?.attr("width", `${u}px`), h.style("width", `${u}px`), c?.attr("height", `${k}px`), h.style("height", `${k}px`), o && o(p);
6152
6155
  }).on($.Click, (p) => {
@@ -6177,7 +6180,7 @@ const ai = (s) => s * Math.PI / 180, Pe = (s, t, e) => {
6177
6180
  startMovingNode(t, e) {
6178
6181
  if (this.canUserPerformAction(w.MoveNode) && !e.removed)
6179
6182
  if (S(L.Grabbing), this.draggingFrom = [t.x, t.y], e.selected && this.userSelection.count((a) => a instanceof z) > 1)
6180
- this.currentAction = new re(
6183
+ this.currentAction = new ae(
6181
6184
  this,
6182
6185
  this.userSelection.filter((a) => a instanceof z).map((a) => a.id),
6183
6186
  e.coords
@@ -6202,7 +6205,7 @@ const ai = (s) => s * Math.PI / 180, Pe = (s, t, e) => {
6202
6205
  * Method to call to continue the moving of a node triggered by a user drag event.
6203
6206
  */
6204
6207
  continueMovingNode(t, e) {
6205
- if (this.canUserPerformAction(w.MoveNode) && (this.currentAction instanceof re || this.currentAction instanceof X) && !e.removed) {
6208
+ if (this.canUserPerformAction(w.MoveNode) && (this.currentAction instanceof ae || this.currentAction instanceof X) && !e.removed) {
6206
6209
  const a = [
6207
6210
  t.x - e.width / 2,
6208
6211
  t.y - e.height / 2
@@ -6225,7 +6228,7 @@ const ai = (s) => s * Math.PI / 180, Pe = (s, t, e) => {
6225
6228
  if (this.snapToGrid && (a = this.getClosestGridPoint([
6226
6229
  a[0] - e.type.snapToGridOffset[0],
6227
6230
  a[1] - e.type.snapToGridOffset[1]
6228
- ]), a[0] += e.type.snapToGridOffset[0], a[1] += e.type.snapToGridOffset[1]), this.currentAction instanceof re) {
6231
+ ]), a[0] += e.type.snapToGridOffset[0], a[1] += e.type.snapToGridOffset[1]), this.currentAction instanceof ae) {
6229
6232
  const l = this.currentAction.delta;
6230
6233
  this.currentAction.delta = [
6231
6234
  a[0] - l[0],
@@ -6238,11 +6241,11 @@ const ai = (s) => s * Math.PI / 180, Pe = (s, t, e) => {
6238
6241
  e.move(a);
6239
6242
  const n = this.model.nodes.getAtCoordinates(t.x, t.y).filter((o) => o.id !== e.id && !o.isDescendantOf(e)).filter(
6240
6243
  (o) => o.type.childrenTypes.includes(e.type.id)
6241
- ), i = Be(
6244
+ ), i = Ye(
6242
6245
  n
6243
6246
  ), r = i[i.length - 1];
6244
6247
  if (r !== e.parent && (e.type.canBeParentless || r !== void 0)) {
6245
- const o = r?.getLastAncestor(), d = this.currentAction.from, c = new Xo(
6248
+ const o = r?.getLastAncestor(), d = this.currentAction.from, c = new jo(
6246
6249
  this,
6247
6250
  e.id,
6248
6251
  e.parent?.id,
@@ -6288,7 +6291,7 @@ const ai = (s) => s * Math.PI / 180, Pe = (s, t, e) => {
6288
6291
  const e = this.getPointerLocationRelativeToCanvas(t);
6289
6292
  this.multipleSelectionContainer?.remove(), this.multipleSelectionContainer = void 0, this.userSelection.clear();
6290
6293
  for (const a of this.model.nodes)
6291
- ho(
6294
+ go(
6292
6295
  [
6293
6296
  a.coords,
6294
6297
  [a.coords[0] + a.width, a.coords[1] + a.height]
@@ -6300,9 +6303,9 @@ const ai = (s) => s * Math.PI / 180, Pe = (s, t, e) => {
6300
6303
  ), S();
6301
6304
  }
6302
6305
  };
6303
- qt.canvasCount = 0;
6304
- let ve = qt;
6305
- class Je {
6306
+ Jt.canvasCount = 0;
6307
+ let ye = Jt;
6308
+ class Qe {
6306
6309
  constructor() {
6307
6310
  this.grid = [[void 0]], this.offsetX = 0, this.offsetY = 0;
6308
6311
  }
@@ -6414,16 +6417,16 @@ class Je {
6414
6417
  }
6415
6418
  }
6416
6419
  }
6417
- class ci {
6420
+ class hi {
6418
6421
  constructor(t) {
6419
6422
  this.gapSize = t;
6420
6423
  }
6421
6424
  apply(t) {
6422
6425
  if (t.nodes.length === 0)
6423
6426
  return t;
6424
- const e = new Je(), a = t.nodes.filter((r) => !r.parent);
6427
+ const e = new Qe(), a = t.nodes.filter((r) => !r.parent);
6425
6428
  for (; a.length > 0; )
6426
- Qe(
6429
+ to(
6427
6430
  a[0],
6428
6431
  e,
6429
6432
  [0, 0],
@@ -6441,25 +6444,25 @@ class ci {
6441
6444
  return t;
6442
6445
  }
6443
6446
  }
6444
- const Qe = (s, t, e, a) => {
6447
+ const to = (s, t, e, a) => {
6445
6448
  const l = t.getClosestEmptyCoordinate(e);
6446
6449
  t.set(l, s), Y(a, s);
6447
6450
  for (const n of s.getAdjacentNodes())
6448
- a.includes(n) && Qe(
6451
+ a.includes(n) && to(
6449
6452
  n,
6450
6453
  t,
6451
6454
  l,
6452
6455
  a
6453
6456
  );
6454
6457
  };
6455
- class hi {
6458
+ class gi {
6456
6459
  constructor(t) {
6457
6460
  this.gapSize = t;
6458
6461
  }
6459
6462
  apply(t) {
6460
6463
  if (t.nodes.length === 0)
6461
6464
  return t;
6462
- const e = new Je(), a = t.nodes.filter((c) => !c.parent), l = {}, n = a[0];
6465
+ const e = new Qe(), a = t.nodes.filter((c) => !c.parent), l = {}, n = a[0];
6463
6466
  let i = [n];
6464
6467
  for (l[n.id] = [0, 0]; a.length > 0; ) {
6465
6468
  const c = [];
@@ -6493,7 +6496,7 @@ class hi {
6493
6496
  return t;
6494
6497
  }
6495
6498
  }
6496
- class se {
6499
+ class ne {
6497
6500
  constructor(t) {
6498
6501
  this.gapSize = t;
6499
6502
  }
@@ -6527,14 +6530,14 @@ class se {
6527
6530
  return t;
6528
6531
  }
6529
6532
  }
6530
- class gi {
6533
+ class fi {
6531
6534
  constructor(t) {
6532
6535
  this.gapSize = t;
6533
6536
  }
6534
6537
  apply(t) {
6535
6538
  if (t.nodes.length === 0)
6536
6539
  return t;
6537
- new se(this.gapSize).apply(t);
6540
+ new ne(this.gapSize).apply(t);
6538
6541
  const e = this.gapSize !== void 0 ? this.gapSize : (t.canvas?.gridSize || 0) * 2, a = 0.99, l = 1, n = 0.1, i = 2e5, r = 0.5, o = 1, d = 2e-3;
6539
6542
  let c = 100;
6540
6543
  for (; c > l; ) {
@@ -6554,7 +6557,7 @@ class gi {
6554
6557
  ], u = [
6555
6558
  m.coords[0] + m.width / 2,
6556
6559
  m.coords[1] + m.height / 2
6557
- ], k = Oe(
6560
+ ], k = He(
6558
6561
  f.coords,
6559
6562
  m.coords
6560
6563
  ), b = [m.coords[0], m.coords[1]];
@@ -6580,7 +6583,7 @@ class gi {
6580
6583
  return t;
6581
6584
  }
6582
6585
  }
6583
- class fi {
6586
+ class ui {
6584
6587
  constructor(t) {
6585
6588
  this.gapSize = t;
6586
6589
  }
@@ -6595,7 +6598,7 @@ class fi {
6595
6598
  return t;
6596
6599
  }
6597
6600
  }
6598
- class ui {
6601
+ class pi {
6599
6602
  constructor(t) {
6600
6603
  this.gapSize = t;
6601
6604
  }
@@ -6608,7 +6611,7 @@ class ui {
6608
6611
  ...t.nodes.map((c) => c.getPriority())
6609
6612
  );
6610
6613
  if (e === a)
6611
- return new se(this.gapSize).apply(t), t;
6614
+ return new ne(this.gapSize).apply(t), t;
6612
6615
  const l = this.gapSize !== void 0 ? this.gapSize : (t.canvas?.gridSize || 0) * 2, n = t.nodes.filter((c) => !c.parent), i = [], r = t.nodes.filter((c) => !c.parent).filter((c) => c.getPriority() >= e), o = [];
6613
6616
  if (r.length > 1) {
6614
6617
  const c = r[0];
@@ -6662,7 +6665,7 @@ class ui {
6662
6665
  return t;
6663
6666
  }
6664
6667
  }
6665
- class pi {
6668
+ class mi {
6666
6669
  constructor(t) {
6667
6670
  this.gapSize = t;
6668
6671
  }
@@ -6675,17 +6678,17 @@ class pi {
6675
6678
  ...t.nodes.map((c) => c.getPriority())
6676
6679
  );
6677
6680
  if (e === a)
6678
- return new se(this.gapSize).apply(t), t;
6681
+ return new ne(this.gapSize).apply(t), t;
6679
6682
  const l = this.gapSize !== void 0 ? this.gapSize : (t.canvas?.gridSize || 0) * 2, n = t.nodes.filter((c) => !c.parent).sort((c, h) => h.getPriority() - c.getPriority()), i = [];
6680
6683
  for (; n.length > 0; ) {
6681
6684
  const c = n[0];
6682
6685
  n.splice(0, 1);
6683
- const h = new we(void 0, c);
6684
- to(h, n), i.push(h);
6686
+ const h = new Se(void 0, c);
6687
+ eo(h, n), i.push(h);
6685
6688
  }
6686
6689
  const r = [];
6687
6690
  for (const c of i)
6688
- r.push([c]), eo(c, r, r.length);
6691
+ r.push([c]), oo(c, r, r.length);
6689
6692
  const o = Math.max(...t.nodes.map((c) => c.height));
6690
6693
  let d = 0;
6691
6694
  for (let c = 0; c < r.length; ++c) {
@@ -6704,29 +6707,29 @@ class pi {
6704
6707
  return t;
6705
6708
  }
6706
6709
  }
6707
- const to = (s, t) => {
6710
+ const eo = (s, t) => {
6708
6711
  for (const e of s.node.getAdjacentNodes().sort((a, l) => l.getPriority() - a.getPriority())) {
6709
6712
  const a = t.indexOf(e);
6710
6713
  if (a >= 0) {
6711
6714
  t.splice(a, 1);
6712
6715
  const l = s.addBranch(e);
6713
- to(l, t);
6716
+ eo(l, t);
6714
6717
  }
6715
6718
  }
6716
- }, eo = (s, t, e) => {
6719
+ }, oo = (s, t, e) => {
6717
6720
  if (s.branches.length > 0) {
6718
6721
  for (; e >= t.length; )
6719
6722
  t.push([]);
6720
6723
  for (const a of s.branches)
6721
- t[e].push(a), eo(a, t, e + 1);
6724
+ t[e].push(a), oo(a, t, e + 1);
6722
6725
  }
6723
6726
  };
6724
- class we {
6727
+ class Se {
6725
6728
  constructor(t, e) {
6726
6729
  this.parent = t, this.branches = [], this.depth = 0, this.node = e;
6727
6730
  }
6728
6731
  addBranch(t) {
6729
- const e = new we(this, t);
6732
+ const e = new Se(this, t);
6730
6733
  return e.depth = this.depth + 1, this.branches.push(e), e;
6731
6734
  }
6732
6735
  countBranchHeight() {
@@ -6740,7 +6743,7 @@ class we {
6740
6743
  }
6741
6744
  }
6742
6745
  }
6743
- class mi {
6746
+ class vi {
6744
6747
  constructor(t) {
6745
6748
  this.gapSize = t;
6746
6749
  }
@@ -6755,17 +6758,17 @@ class mi {
6755
6758
  return t;
6756
6759
  }
6757
6760
  }
6758
- const ze = {
6759
- adjacency: new ci(),
6760
- breadth: new se(),
6761
- "breadth-adjacency": new hi(),
6762
- force: new gi(),
6763
- horizontal: new fi(),
6764
- priority: new ui(),
6765
- tree: new pi(),
6766
- vertical: new mi()
6767
- }, vi = Ve({}), $t = Ve({});
6768
- class yi {
6761
+ const Re = {
6762
+ adjacency: new hi(),
6763
+ breadth: new ne(),
6764
+ "breadth-adjacency": new gi(),
6765
+ force: new fi(),
6766
+ horizontal: new ui(),
6767
+ priority: new pi(),
6768
+ tree: new mi(),
6769
+ vertical: new vi()
6770
+ }, yi = Oe({}), $t = Oe({});
6771
+ class bi {
6769
6772
  constructor(t, e) {
6770
6773
  this.onTitleChange = t, this.onValueSetChange = e;
6771
6774
  }
@@ -6784,7 +6787,7 @@ class yi {
6784
6787
  highlightProperty(...t) {
6785
6788
  }
6786
6789
  }
6787
- const Se = ({
6790
+ const Ce = ({
6788
6791
  direction: s,
6789
6792
  collapsableSelector: t,
6790
6793
  collapsableAdditionalSelector: e,
@@ -6829,10 +6832,10 @@ const Se = ({
6829
6832
  children: /* @__PURE__ */ v("div", { className: f() })
6830
6833
  }
6831
6834
  ) });
6832
- }, bi = () => {
6833
- const s = Ft($t), t = rt(null), [e, a] = U([]);
6834
- ao(s.validatorChange$, s.diagramChange$).pipe(
6835
- lo(() => l())
6835
+ }, ki = () => {
6836
+ const s = Ut($t), t = rt(null), [e, a] = U([]);
6837
+ lo(s.validatorChange$, s.diagramChange$).pipe(
6838
+ co(() => l())
6836
6839
  ).subscribe();
6837
6840
  const l = () => {
6838
6841
  a([]);
@@ -6864,7 +6867,7 @@ const Se = ({
6864
6867
  " errors found"
6865
6868
  ] }),
6866
6869
  /* @__PURE__ */ v("div", { className: "daga-collapse-button-container", children: /* @__PURE__ */ v(
6867
- Se,
6870
+ Ce,
6868
6871
  {
6869
6872
  collapsableSelector: t,
6870
6873
  collapsableAdditionalSelector: ".daga-error-panel",
@@ -6886,7 +6889,7 @@ const Se = ({
6886
6889
  r
6887
6890
  )) }) })
6888
6891
  ] }) });
6889
- }, ki = 200, Re = (s) => (s || "").toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g, ""), oo = ({
6892
+ }, wi = 200, Ve = (s) => (s || "").toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g, ""), io = ({
6890
6893
  disabled: s,
6891
6894
  options: t,
6892
6895
  value: e,
@@ -6924,12 +6927,12 @@ const Se = ({
6924
6927
  }
6925
6928
  }, N = () => {
6926
6929
  if (!s) {
6927
- const A = Re(n.trim());
6930
+ const A = Ve(n.trim());
6928
6931
  d([]), h([]), y([]), p([]);
6929
6932
  for (const _ of t) {
6930
- const q = Re(_.label).indexOf(A);
6933
+ const q = Ve(_.label).indexOf(A);
6931
6934
  if (q >= 0) {
6932
- const Ut = _.label.substring(0, q), J = _.label.substring(
6935
+ const Dt = _.label.substring(0, q), J = _.label.substring(
6933
6936
  q,
6934
6937
  q + A.length
6935
6938
  ), wt = _.label.substring(
@@ -6937,7 +6940,7 @@ const Se = ({
6937
6940
  );
6938
6941
  d((nt) => [...nt, _]), h((nt) => [
6939
6942
  ...nt,
6940
- Ut
6943
+ Dt
6941
6944
  ]), y((nt) => [
6942
6945
  ...nt,
6943
6946
  J
@@ -6960,7 +6963,7 @@ const Se = ({
6960
6963
  }, tt = () => {
6961
6964
  setTimeout(() => {
6962
6965
  R();
6963
- }, ki);
6966
+ }, wi);
6964
6967
  }, E = (A) => {
6965
6968
  const _ = l.current?.querySelectorAll("li")[A];
6966
6969
  _ && _.scrollIntoView({ block: "center" });
@@ -7009,7 +7012,7 @@ const Se = ({
7009
7012
  ]
7010
7013
  }
7011
7014
  );
7012
- }, wi = (s, t) => s.find((e) => e.key === t)?.label || `${t}`, Si = ({
7015
+ }, Si = (s, t) => s.find((e) => e.key === t)?.label || `${t}`, Ci = ({
7013
7016
  disabled: s,
7014
7017
  allowRepeats: t,
7015
7018
  options: e,
@@ -7018,7 +7021,7 @@ const Se = ({
7018
7021
  }) => {
7019
7022
  const [n, i] = U(), [r, o] = U([]), [d, c] = U([]);
7020
7023
  Ct(() => {
7021
- const u = a.length === 0, k = a.map((b) => wi(e, b));
7024
+ const u = a.length === 0, k = a.map((b) => Si(e, b));
7022
7025
  o(k), u && l(a), p();
7023
7026
  }, [a, e]);
7024
7027
  const h = (u) => {
@@ -7054,7 +7057,7 @@ const Se = ({
7054
7057
  ] }, k)),
7055
7058
  !s && /* @__PURE__ */ M("div", { className: "daga-value-item-input", children: [
7056
7059
  /* @__PURE__ */ v("div", { className: "daga-input daga-relatively-positioned", children: /* @__PURE__ */ v(
7057
- oo,
7060
+ io,
7058
7061
  {
7059
7062
  disabled: s,
7060
7063
  options: t ? e || [] : d || [],
@@ -7065,7 +7068,7 @@ const Se = ({
7065
7068
  /* @__PURE__ */ v("button", { className: "daga-property-button", onClick: y, children: /* @__PURE__ */ v("div", { className: "daga-icon daga-add-icon" }) })
7066
7069
  ] })
7067
7070
  ] });
7068
- }, Ci = ({
7071
+ }, $i = ({
7069
7072
  disabled: s,
7070
7073
  allowRepeats: t,
7071
7074
  value: e,
@@ -7091,7 +7094,7 @@ const Se = ({
7091
7094
  }, h = (f) => {
7092
7095
  f.key === "Enter" && d();
7093
7096
  };
7094
- return /* @__PURE__ */ M(no, { children: [
7097
+ return /* @__PURE__ */ M(ro, { children: [
7095
7098
  e.map((f, y) => /* @__PURE__ */ M("div", { className: "daga-value-item-element", children: [
7096
7099
  /* @__PURE__ */ v(
7097
7100
  "input",
@@ -7128,7 +7131,7 @@ const Se = ({
7128
7131
  /* @__PURE__ */ v("button", { className: "daga-property-button", onClick: d, children: /* @__PURE__ */ v("div", { className: "daga-icon daga-add-icon" }) })
7129
7132
  ] })
7130
7133
  ] });
7131
- }, $i = ({
7134
+ }, Ii = ({
7132
7135
  disabled: s,
7133
7136
  value: t,
7134
7137
  onChange: e
@@ -7243,12 +7246,12 @@ const Se = ({
7243
7246
  /* @__PURE__ */ v("button", { className: "daga-property-button", onClick: f, children: /* @__PURE__ */ v("div", { className: "daga-icon daga-add-icon" }) })
7244
7247
  ] })
7245
7248
  ] });
7246
- }, io = ({
7249
+ }, so = ({
7247
7250
  valueSet: s,
7248
7251
  onValueChange: t,
7249
7252
  depth: e
7250
7253
  }) => {
7251
- const l = Ft($t).canUserPerformAction(w.UpdateValues) && s?.rootElement?.removed !== !0, n = (o) => "daga-property-name-" + o.replace(/\s/g, ""), i = (o) => {
7254
+ const l = Ut($t).canUserPerformAction(w.UpdateValues) && s?.rootElement?.removed !== !0, n = (o) => "daga-property-name-" + o.replace(/\s/g, ""), i = (o) => {
7252
7255
  if (typeof o == "string")
7253
7256
  return o;
7254
7257
  if (o == null || isNaN(o.valueOf()))
@@ -7383,7 +7386,7 @@ const Se = ({
7383
7386
  )
7384
7387
  ] }),
7385
7388
  o.type === T.Option && /* @__PURE__ */ v("div", { className: "daga-relatively-positioned", children: /* @__PURE__ */ v(
7386
- oo,
7389
+ io,
7387
7390
  {
7388
7391
  disabled: o.editable === !1 || !l,
7389
7392
  options: o.options || [],
@@ -7392,7 +7395,7 @@ const Se = ({
7392
7395
  }
7393
7396
  ) }),
7394
7397
  (o.type === T.OptionList || o.type === T.OptionSet) && /* @__PURE__ */ v(
7395
- Si,
7398
+ Ci,
7396
7399
  {
7397
7400
  disabled: o.editable === !1 || !l,
7398
7401
  allowRepeats: o.type === T.OptionList,
@@ -7402,7 +7405,7 @@ const Se = ({
7402
7405
  }
7403
7406
  ),
7404
7407
  (o.type === T.TextList || o.type === T.TextSet) && /* @__PURE__ */ v(
7405
- Ci,
7408
+ $i,
7406
7409
  {
7407
7410
  disabled: o.editable === !1 || !l,
7408
7411
  allowRepeats: o.type === T.TextList,
@@ -7411,7 +7414,7 @@ const Se = ({
7411
7414
  }
7412
7415
  ),
7413
7416
  o.type === T.TextMap && /* @__PURE__ */ v(
7414
- $i,
7417
+ Ii,
7415
7418
  {
7416
7419
  disabled: o.editable === !1 || !l,
7417
7420
  value: s?.getValue(o.name),
@@ -7419,7 +7422,7 @@ const Se = ({
7419
7422
  }
7420
7423
  ),
7421
7424
  o.type === T.Object && /* @__PURE__ */ v("div", { className: "daga-left-bar", children: /* @__PURE__ */ v(
7422
- io,
7425
+ so,
7423
7426
  {
7424
7427
  valueSet: s.getSubValueSet(o.name),
7425
7428
  onValueChange: t,
@@ -7430,8 +7433,8 @@ const Se = ({
7430
7433
  },
7431
7434
  o.name
7432
7435
  )) });
7433
- }, so = ({ valueSet: s, depth: t }) => {
7434
- const e = Ft($t), a = rt(null), l = (o) => "daga-property-name-" + o.replace(/\s/g, ""), n = () => {
7436
+ }, no = ({ valueSet: s, depth: t }) => {
7437
+ const e = Ut($t), a = rt(null), l = (o) => "daga-property-name-" + o.replace(/\s/g, ""), n = () => {
7435
7438
  for (const o of s?.displayedProperties || []) {
7436
7439
  let d = 0, c = 0, h = 0;
7437
7440
  const f = x.select(a.current).select(
@@ -7493,7 +7496,7 @@ const Se = ({
7493
7496
  if (s === void 0)
7494
7497
  return;
7495
7498
  let d;
7496
- o instanceof xo ? d = o : o instanceof Event ? d = s?.propertySet.getProperty(
7499
+ o instanceof Lo ? d = o : o instanceof Event ? d = s?.propertySet.getProperty(
7497
7500
  o.target?.value || ""
7498
7501
  ) : d = s?.propertySet.getProperty(o || ""), d && s?.hideProperty(d), n();
7499
7502
  };
@@ -7523,9 +7526,9 @@ const Se = ({
7523
7526
  )
7524
7527
  ] })
7525
7528
  ] }),
7526
- o.type !== T.Object && /* @__PURE__ */ v("div", { className: "daga-property-value", children: Ii(s?.getValue(o.name)) }),
7529
+ o.type !== T.Object && /* @__PURE__ */ v("div", { className: "daga-property-value", children: Ai(s?.getValue(o.name)) }),
7527
7530
  o.type === T.Object && /* @__PURE__ */ v(
7528
- so,
7531
+ no,
7529
7532
  {
7530
7533
  valueSet: s?.getSubValueSet(o.name),
7531
7534
  depth: t + 1
@@ -7545,7 +7548,7 @@ const Se = ({
7545
7548
  o.name
7546
7549
  ))
7547
7550
  ] });
7548
- }, Ii = (s) => Array.isArray(s) ? s.join(", ") : Lo(s) ? Object.entries(s).map((t) => t.map((e) => JSON.stringify(e)).join(": ")).join(", ") : s instanceof Date ? s.toLocaleString() : s == null ? "" : "" + s, Ai = ({ location: s, direction: t, width: e, height: a, title: l, valueSet: n, onValueChange: i }) => {
7551
+ }, Ai = (s) => Array.isArray(s) ? s.join(", ") : Eo(s) ? Object.entries(s).map((t) => t.map((e) => JSON.stringify(e)).join(": ")).join(", ") : s instanceof Date ? s.toLocaleString() : s == null ? "" : "" + s, xi = ({ location: s, direction: t, width: e, height: a, title: l, valueSet: n, onValueChange: i }) => {
7549
7552
  const r = rt(null), [o, d] = U(!1), [c, h] = U(!1), f = () => x.select(r.current);
7550
7553
  return Ct(() => {
7551
7554
  if (r.current)
@@ -7566,7 +7569,7 @@ const Se = ({
7566
7569
  className: `daga-panel daga-bottom daga-${s} daga-${t}`,
7567
7570
  children: [
7568
7571
  /* @__PURE__ */ v(
7569
- Se,
7572
+ Ce,
7570
7573
  {
7571
7574
  disabled: !n || !n.propertySet || !n.propertySet.hasProperties(),
7572
7575
  collapsed: o,
@@ -7597,20 +7600,20 @@ const Se = ({
7597
7600
  )
7598
7601
  ] }),
7599
7602
  !c && /* @__PURE__ */ v(
7600
- io,
7603
+ so,
7601
7604
  {
7602
7605
  valueSet: n,
7603
7606
  onValueChange: i,
7604
7607
  depth: 0
7605
7608
  }
7606
7609
  ),
7607
- c && /* @__PURE__ */ v(so, { valueSet: n, depth: 0 })
7610
+ c && /* @__PURE__ */ v(no, { valueSet: n, depth: 0 })
7608
7611
  ] }) })
7609
7612
  ]
7610
7613
  }
7611
7614
  ) });
7612
- }, xi = 6, Li = (s) => {
7613
- const t = Ft($t), [e, a] = U(
7615
+ }, Li = 6, Ei = (s) => {
7616
+ const t = Ut($t), [e, a] = U(
7614
7617
  s.currentPalette || s.palettes[0]
7615
7618
  ), [l, n] = U(0), [i, r] = U(
7616
7619
  void 0
@@ -7668,7 +7671,7 @@ const Se = ({
7668
7671
  }).on(I.End, (O) => {
7669
7672
  if (t.canUserPerformAction(w.AddNode)) {
7670
7673
  if (S(L.Auto), E.style("position", "relative").style("left", 0).style("top", 0).style("z-index", "auto"), p.isUnique && t.model.nodes.find(
7671
- (Bt) => !Bt.removed && Bt.type.id === p.id
7674
+ (Yt) => !Yt.removed && Yt.type.id === p.id
7672
7675
  ) !== void 0)
7673
7676
  return;
7674
7677
  const A = t.getPointerLocationRelativeToScreen(O);
@@ -7695,24 +7698,24 @@ const Se = ({
7695
7698
  lt[0],
7696
7699
  lt[1]
7697
7700
  ).filter(
7698
- (Bt) => Bt.type.childrenTypes.includes(p.id)
7699
- ), wt = Be(
7701
+ (Yt) => Yt.type.childrenTypes.includes(p.id)
7702
+ ), wt = Ye(
7700
7703
  J
7701
7704
  ), nt = wt[wt.length - 1];
7702
7705
  if (!p.canBeParentless && nt === void 0)
7703
7706
  return;
7704
- const Dt = nt?.getLastAncestor(), Ce = new Yo(
7707
+ const Bt = nt?.getLastAncestor(), $e = new Xo(
7705
7708
  t,
7706
7709
  p,
7707
7710
  q,
7708
7711
  nt?.id,
7709
- Dt?.id,
7710
- Dt?.getGeometry(),
7712
+ Bt?.id,
7713
+ Bt?.getGeometry(),
7711
7714
  void 0,
7712
7715
  u.label,
7713
7716
  u.values
7714
7717
  );
7715
- Ce.do(), t?.actionStack.add(Ce), S();
7718
+ $e.do(), t?.actionStack.add($e), S();
7716
7719
  }
7717
7720
  })
7718
7721
  ).append("svg").attr("class", `palette-node ${p.id}`).attr("viewBox", `0 0 ${R} ${N}`).attr("preserveAspectRatio", "none").style("position", "relative").style("left", 0).style("top", 0).style("width", `${tt}px`).style("height", `${P}px`), C = u.look || p.defaultLook;
@@ -7720,7 +7723,7 @@ const Se = ({
7720
7723
  case "shaped-look":
7721
7724
  E.append("path").attr(
7722
7725
  "d",
7723
- pe(
7726
+ me(
7724
7727
  C.shape || Tt.Rectangle,
7725
7728
  (C.borderThickness || 1) / 2,
7726
7729
  (C.borderThickness || 1) / 2,
@@ -7781,7 +7784,7 @@ const Se = ({
7781
7784
  });
7782
7785
  b.append("path").attr(
7783
7786
  "d",
7784
- pe(
7787
+ me(
7785
7788
  Tt.Rectangle,
7786
7789
  0,
7787
7790
  0,
@@ -7790,7 +7793,7 @@ const Se = ({
7790
7793
  )
7791
7794
  ).attr("fill", u.backgroundColor).attr("stroke", "black").attr("stroke-width", "1px"), u.icon !== "" && b.append("image").attr("x", 0).attr("y", 0).attr("width", u.width).attr("height", u.height).attr("href", u.icon), u.label !== "" && b.append("text").attr(
7792
7795
  "transform",
7793
- `translate(${u.width / 2},${u.height / 2 + xi})`
7796
+ `translate(${u.width / 2},${u.height / 2 + Li})`
7794
7797
  ).attr("x", 0).attr("y", 0).attr("font-size", "20px").attr("text-anchor", "middle").attr("font-family", "'Wonder Unit Sans', sans-serif").attr("font-weight", 400).attr("fill", "#000000").attr("stroke", "none").style("font-kerning", "none").style("user-select", "none").text(u.label);
7795
7798
  };
7796
7799
  return Ct(() => {
@@ -7812,7 +7815,7 @@ const Se = ({
7812
7815
  className: `daga-panel daga-${s.location} daga-${s.direction}`,
7813
7816
  children: [
7814
7817
  /* @__PURE__ */ v(
7815
- Se,
7818
+ Ce,
7816
7819
  {
7817
7820
  direction: s.direction,
7818
7821
  collapsableSelector: o,
@@ -7838,7 +7841,7 @@ const Se = ({
7838
7841
  ]
7839
7842
  }
7840
7843
  ) });
7841
- }, Ei = ({
7844
+ }, Mi = ({
7842
7845
  location: s,
7843
7846
  direction: t,
7844
7847
  enableAction: e,
@@ -7875,22 +7878,22 @@ const Se = ({
7875
7878
  if (!d)
7876
7879
  if (o) {
7877
7880
  o = !1;
7878
- const Dt = `${4 * J.selectChildren().size()}rem`;
7879
- J.transition().duration(500).ease(x.easeLinear).style(c, Dt).style("transform", `${h}(1)`), setTimeout(() => {
7881
+ const Bt = `${4 * J.selectChildren().size()}rem`;
7882
+ J.transition().duration(500).ease(x.easeLinear).style(c, Bt).style("transform", `${h}(1)`), setTimeout(() => {
7880
7883
  d = !1;
7881
7884
  }, 500);
7882
7885
  } else
7883
7886
  o = !0, J.transition().duration(500).ease(x.easeLinear).style(c, "0rem").style("transform", `${h}(0)`), setTimeout(() => {
7884
7887
  d = !1;
7885
7888
  }, 500);
7886
- }, b = Ft($t), N = () => {
7889
+ }, b = Ut($t), N = () => {
7887
7890
  b.zoomBy(b.zoomFactor);
7888
7891
  }, R = () => {
7889
7892
  b.zoomBy(1 / b.zoomFactor);
7890
7893
  }, P = () => {
7891
7894
  b.center();
7892
7895
  }, tt = () => {
7893
- b.layoutFormat && b.layoutFormat in ze && ze[b.layoutFormat].apply(b.model);
7896
+ b.layoutFormat && b.layoutFormat in Re && Re[b.layoutFormat].apply(b.model);
7894
7897
  }, E = () => {
7895
7898
  r = !r, x.select(
7896
7899
  u.current
@@ -7911,12 +7914,12 @@ const Se = ({
7911
7914
  b.userSelection.pasteFromClipboard();
7912
7915
  }, q = () => {
7913
7916
  b.userSelection.removeFromModel();
7914
- }, Ut = () => {
7917
+ }, Dt = () => {
7915
7918
  b.multipleSelectionOn = !0, x.select(
7916
7919
  p.current
7917
7920
  ).classed("daga-on", !0).classed("daga-off", !1);
7918
7921
  const J = b.diagramEvent$.subscribe((wt) => {
7919
- wt.type === We.Selection && (x.select(
7922
+ wt.type === Ze.Selection && (x.select(
7920
7923
  p.current
7921
7924
  ).classed("daga-on", !1).classed("daga-off", !0), J.unsubscribe());
7922
7925
  });
@@ -7934,7 +7937,7 @@ const Se = ({
7934
7937
  e && /* @__PURE__ */ v("button", { className: "daga-redo", onClick: O, children: /* @__PURE__ */ v("span", { className: "daga-tooltip", children: "Redo" }) }),
7935
7938
  n && /* @__PURE__ */ v("button", { className: "daga-copy", onClick: A, children: /* @__PURE__ */ v("span", { className: "daga-tooltip", children: "Copy" }) }),
7936
7939
  n && /* @__PURE__ */ v("button", { className: "daga-cut", onClick: _, children: /* @__PURE__ */ v("span", { className: "daga-tooltip", children: "Cut" }) }),
7937
- n && /* @__PURE__ */ v("button", { className: `daga-multiple-selection ${r ? "daga-on" : "daga-off"}`, onClick: Ut, ref: p, children: /* @__PURE__ */ v("span", { className: "daga-tooltip", children: "Multiple selection" }) }),
7940
+ n && /* @__PURE__ */ v("button", { className: `daga-multiple-selection ${r ? "daga-on" : "daga-off"}`, onClick: Dt, ref: p, children: /* @__PURE__ */ v("span", { className: "daga-tooltip", children: "Multiple selection" }) }),
7938
7941
  n && /* @__PURE__ */ v("button", { className: "daga-paste", onClick: lt, children: /* @__PURE__ */ v("span", { className: "daga-tooltip", children: "Paste" }) }),
7939
7942
  n && /* @__PURE__ */ v("button", { className: "daga-delete", onClick: q, children: /* @__PURE__ */ v("span", { className: "daga-tooltip", children: "Delete" }) }),
7940
7943
  l && b.layoutFormat && /* @__PURE__ */ v("button", { className: "daga-layout", onClick: tt, children: /* @__PURE__ */ v("span", { className: "daga-tooltip", children: "Apply layout" }) }),
@@ -7944,14 +7947,14 @@ const Se = ({
7944
7947
  ]
7945
7948
  }
7946
7949
  ) });
7947
- }, Pi = ({
7950
+ }, zi = ({
7948
7951
  config: s,
7949
7952
  model: t,
7950
7953
  onCanvasCreated: e,
7951
7954
  onDiagramEvent: a,
7952
7955
  onModelChange: l
7953
7956
  }) => {
7954
- const n = new je(), i = new qe(), r = rt(null), o = rt(void 0), d = rt(!1), c = [], [h, f] = U(void 0), [y, m] = U(void 0), p = {
7957
+ const n = new We(), i = new Je(), r = rt(null), o = rt(void 0), d = rt(!1), c = [], [h, f] = U(void 0), [y, m] = U(void 0), p = {
7955
7958
  zoomIn: () => {
7956
7959
  },
7957
7960
  zoomOut: () => {
@@ -7969,14 +7972,14 @@ const Se = ({
7969
7972
  }, u = {
7970
7973
  refreshPalette: () => {
7971
7974
  }
7972
- }, k = new yi(
7975
+ }, k = new bi(
7973
7976
  (E) => f(E),
7974
7977
  (E) => m(E)
7975
7978
  ), b = {
7976
7979
  diagramButtons: p,
7977
7980
  palette: u,
7978
7981
  propertyEditor: k
7979
- }, N = (E = !1) => ((!o.current || E) && (c.forEach((C) => C.unsubscribe()), o.current = new ve(b, s)), o.current), R = N(), P = (E) => {
7982
+ }, N = (E = !1) => ((!o.current || E) && (c.forEach((C) => C.unsubscribe()), o.current = new ye(b, s)), o.current), R = N(), P = (E) => {
7980
7983
  R.initView(E), c.push(
7981
7984
  R.diagramEvent$.subscribe((C) => {
7982
7985
  a?.(C);
@@ -7990,7 +7993,7 @@ const Se = ({
7990
7993
  };
7991
7994
  Ct(() => {
7992
7995
  r.current && (d.current || (P(r.current), d.current = !0, e?.(R)));
7993
- }, [r.current]), co(() => {
7996
+ }, [r.current]), ho(() => {
7994
7997
  r.current && (N(!0), P(r.current), e?.(R));
7995
7998
  }, [s]), Ct(() => {
7996
7999
  t && n.import(R.model, t);
@@ -8005,13 +8008,13 @@ const Se = ({
8005
8008
  A.setValues(y.getValues()), A.rootElement = y.rootElement, k.valueSet = A, y.rootElement.valueSet = A, R.propertyEditorChanges$?.next();
8006
8009
  }
8007
8010
  };
8008
- return /* @__PURE__ */ v("daga-diagram", { children: /* @__PURE__ */ v(vi.Provider, { value: s, children: /* @__PURE__ */ v($t.Provider, { value: R, children: /* @__PURE__ */ M("daga-diagram-editor", { children: [
8011
+ return /* @__PURE__ */ v("daga-diagram", { children: /* @__PURE__ */ v(yi.Provider, { value: s, children: /* @__PURE__ */ v($t.Provider, { value: R, children: /* @__PURE__ */ M("daga-diagram-editor", { children: [
8009
8012
  /* @__PURE__ */ v("div", { className: "daga-append-to", ref: r }),
8010
8013
  /* @__PURE__ */ M($t.Provider, { value: R, children: [
8011
8014
  s.components?.buttons !== void 0 && s.components?.buttons?.enabled !== !1 && /* @__PURE__ */ v(
8012
- Ei,
8015
+ Mi,
8013
8016
  {
8014
- location: s.components?.buttons?.location || jt.BottomRight,
8017
+ location: s.components?.buttons?.location || Wt.BottomRight,
8015
8018
  direction: s.components?.buttons?.direction || g.Top,
8016
8019
  enableAction: s.components?.buttons?.enableAction !== !1,
8017
8020
  enableFilter: s.components?.buttons?.enableFilter === !0,
@@ -8021,9 +8024,9 @@ const Se = ({
8021
8024
  }
8022
8025
  ),
8023
8026
  s.components?.palette !== void 0 && s.components?.palette?.enabled !== !1 && s.components?.palette?.sections && (s.components?.palette?.sections?.length || 0) > 0 && /* @__PURE__ */ v(
8024
- Li,
8027
+ Ei,
8025
8028
  {
8026
- location: s.components?.palette?.location || jt.TopLeft,
8029
+ location: s.components?.palette?.location || Wt.TopLeft,
8027
8030
  direction: s.components?.palette?.direction || g.Bottom,
8028
8031
  width: s.components?.palette?.width || "12rem",
8029
8032
  height: s.components?.palette?.height,
@@ -8031,9 +8034,9 @@ const Se = ({
8031
8034
  }
8032
8035
  ),
8033
8036
  s.components?.propertyEditor !== void 0 && s.components?.propertyEditor?.enabled !== !1 && /* @__PURE__ */ v(
8034
- Ai,
8037
+ xi,
8035
8038
  {
8036
- location: s.components?.propertyEditor?.location || jt.TopRight,
8039
+ location: s.components?.propertyEditor?.location || Wt.TopRight,
8037
8040
  direction: s.components?.propertyEditor?.direction || g.Bottom,
8038
8041
  width: s.components?.propertyEditor?.width || "24rem",
8039
8042
  height: s.components?.propertyEditor?.height,
@@ -8042,10 +8045,10 @@ const Se = ({
8042
8045
  onValueChange: tt
8043
8046
  }
8044
8047
  ),
8045
- s.components?.errors !== void 0 && s.components?.errors?.enabled !== !1 && /* @__PURE__ */ v(bi, {})
8048
+ s.components?.errors !== void 0 && s.components?.errors?.enabled !== !1 && /* @__PURE__ */ v(ki, {})
8046
8049
  ] })
8047
8050
  ] }) }) }) });
8048
8051
  };
8049
8052
  export {
8050
- Pi as DagaDiagram
8053
+ zi as DagaDiagram
8051
8054
  };