@nice2dev/ui-diagrams 1.1.9 → 1.1.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/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsxs as v, jsx as l, Fragment as je } from "react/jsx-runtime";
2
- import { NiceButton as B, NiceIcon as te, NiceSelect as ze, NiceNumberInput as Re, NiceTextInput as ot, NiceColorPicker as Le, NiceCheckbox as Ue, NiceSlider as He, NiceAppShell as cr, NiceTutorialButton as Et, resolveTutorial as Lt } from "@nice2dev/ui";
3
- import Wt, { useMemo as ae, useContext as lr, createContext as dr, useRef as Ve, useState as K, useCallback as G, useEffect as Be } from "react";
2
+ import { NiceButton as Y, NiceIcon as te, NiceSelect as ze, NiceNumberInput as Oe, NiceTextInput as ot, NiceColorPicker as We, NiceCheckbox as Ue, NiceSlider as He, NiceAppShell as cr, NiceTutorialButton as Et, resolveTutorial as Lt } from "@nice2dev/ui";
3
+ import Wt, { useMemo as ae, useContext as lr, createContext as dr, useRef as Ve, useState as K, useCallback as G, useEffect as Ye } from "react";
4
4
  class ur {
5
5
  constructor(e) {
6
6
  this.liquidFlows = /* @__PURE__ */ new Map(), this.glowStates = /* @__PURE__ */ new Map(), this.particles = [], this.emitters = [], this.rafId = 0, this.running = !1, this.lastTime = 0, this.tick = () => {
@@ -92,7 +92,7 @@ class ur {
92
92
  };
93
93
  }
94
94
  }
95
- function _o(r, e, t) {
95
+ function Co(r, e, t) {
96
96
  if (!t)
97
97
  return { x: 0, y: 0 };
98
98
  const i = document.createElementNS("http://www.w3.org/2000/svg", "path");
@@ -129,18 +129,18 @@ function St(r, e) {
129
129
  continue;
130
130
  const y = b.position.x + b.size.width / 2, S = b.position.y + b.size.height / 2, C = w.position.x + w.size.width / 2, z = w.position.y + w.size.height / 2, _ = h.style.strokeColor ?? "#666", x = h.style.strokeWidth ?? 2, P = h.style.targetArrow !== "none" ? ' marker-end="url(#arrowhead)"' : "";
131
131
  if (h.style.lineType === "bezier") {
132
- const L = (y + C) / 2, O = S, W = (y + C) / 2, F = z;
132
+ const L = (y + C) / 2, R = S, W = (y + C) / 2, F = z;
133
133
  g.push(
134
- `<path d="M${y},${S} C${L},${O} ${W},${F} ${C},${z}" fill="none" stroke="${_}" stroke-width="${x}"${P} />`
134
+ `<path d="M${y},${S} C${L},${R} ${W},${F} ${C},${z}" fill="none" stroke="${_}" stroke-width="${x}"${P} />`
135
135
  );
136
136
  } else
137
137
  g.push(
138
138
  `<line x1="${y}" y1="${S}" x2="${C}" y2="${z}" stroke="${_}" stroke-width="${x}"${P} />`
139
139
  );
140
140
  if (h.label) {
141
- const L = (y + C) / 2, O = (S + z) / 2;
141
+ const L = (y + C) / 2, R = (S + z) / 2;
142
142
  g.push(
143
- `<text x="${L}" y="${O - 6}" text-anchor="middle" font-size="12" fill="#333">${zt(h.label)}</text>`
143
+ `<text x="${L}" y="${R - 6}" text-anchor="middle" font-size="12" fill="#333">${zt(h.label)}</text>`
144
144
  );
145
145
  }
146
146
  }
@@ -548,7 +548,7 @@ function qt({ locale: r = "en", overrides: e, children: t }) {
548
548
  function ct() {
549
549
  return lr(Ft);
550
550
  }
551
- function Mo(r) {
551
+ function So(r) {
552
552
  const e = [];
553
553
  let t;
554
554
  try {
@@ -578,7 +578,7 @@ class bt {
578
578
  const t = (/* @__PURE__ */ new Date()).toISOString();
579
579
  return {
580
580
  version: "1.0",
581
- id: We(),
581
+ id: Fe(),
582
582
  title: "Untitled Diagram",
583
583
  diagramType: e,
584
584
  nodes: [],
@@ -643,7 +643,7 @@ class bt {
643
643
  addNode(e, t, i = "roundedRect", a = { width: 160, height: 60 }) {
644
644
  this.pushUndo("Add node");
645
645
  const o = gr(), s = {
646
- id: We(),
646
+ id: Fe(),
647
647
  label: e,
648
648
  position: t,
649
649
  size: a,
@@ -677,7 +677,7 @@ class bt {
677
677
  return null;
678
678
  this.pushUndo("Add edge");
679
679
  const s = {
680
- id: We(),
680
+ id: Fe(),
681
681
  sourceNodeId: e,
682
682
  sourcePortId: t,
683
683
  targetNodeId: i,
@@ -699,7 +699,7 @@ class bt {
699
699
  createGroup(e, t) {
700
700
  this.pushUndo("Create group");
701
701
  const i = {
702
- id: We(),
702
+ id: Fe(),
703
703
  label: e,
704
704
  nodeIds: [...t]
705
705
  };
@@ -719,7 +719,7 @@ class bt {
719
719
  // ── Animation operations ─────────────────────────────────────
720
720
  addAnimation(e) {
721
721
  this.pushUndo("Add animation");
722
- const t = { id: We(), ...e };
722
+ const t = { id: Fe(), ...e };
723
723
  return this.doc.animations.push(t), this.notify(), t;
724
724
  }
725
725
  removeAnimation(e) {
@@ -756,7 +756,7 @@ class bt {
756
756
  addAnimationMode(e, t) {
757
757
  this.pushUndo("Add animation mode"), this.doc.animationModes || (this.doc.animationModes = []);
758
758
  const i = {
759
- id: We(),
759
+ id: Fe(),
760
760
  name: e,
761
761
  animations: t ?? [],
762
762
  isDefault: this.doc.animationModes.length === 0
@@ -777,7 +777,7 @@ class bt {
777
777
  if (!i)
778
778
  return null;
779
779
  this.pushUndo("Add animation to mode");
780
- const a = { id: We(), ...t };
780
+ const a = { id: Fe(), ...t };
781
781
  return i.animations.push(a), this.notify(), a;
782
782
  }
783
783
  removeAnimationFromMode(e, t) {
@@ -823,7 +823,7 @@ class bt {
823
823
  this.doc = structuredClone(e), this.undoStack = [], this.redoStack = [], this.notify();
824
824
  }
825
825
  }
826
- function We() {
826
+ function Fe() {
827
827
  return `ndd_${Date.now().toString(36)}_${Math.random().toString(36).slice(2, 8)}`;
828
828
  }
829
829
  function gr() {
@@ -885,8 +885,8 @@ function Gt(r, e, t) {
885
885
  let _ = -(C.reduce((x, P) => x + P.size.width, 0) + (C.length - 1) * a) / 2;
886
886
  C.forEach((x) => {
887
887
  const P = S * (o + (h ? x.size.width : x.size.height)), L = _ + x.size.width / 2;
888
- let O, W;
889
- h ? (O = b ? -P : P, W = L) : (O = L, W = b ? -P : P), g.set(x.id, { x: O, y: W }), _ += x.size.width + a;
888
+ let R, W;
889
+ h ? (R = b ? -P : P, W = L) : (R = L, W = b ? -P : P), g.set(x.id, { x: R, y: W }), _ += x.size.width + a;
890
890
  });
891
891
  }), t.centerGraph && vt(g), { positions: g };
892
892
  }
@@ -988,7 +988,7 @@ function kr(r) {
988
988
  const e = Ve(null);
989
989
  e.current || (e.current = new bt(r));
990
990
  const t = e.current, [, i] = K(0), a = G(() => i((n) => n + 1), []);
991
- Be(() => t.subscribe(a), [t, a]);
991
+ Ye(() => t.subscribe(a), [t, a]);
992
992
  const o = t.getDocument(), s = G(
993
993
  (n) => {
994
994
  yr(t.getNodes(), t.getEdges(), n).positions.forEach((u, d) => {
@@ -1244,7 +1244,7 @@ const Ne = "'Inter', system-ui, sans-serif", wt = "'Fira Code', 'Cascadia Code',
1244
1244
  border: "#ff2d9540",
1245
1245
  surface: "#1a0030",
1246
1246
  surfaceAlt: "#2d004a"
1247
- }), Rr = {
1247
+ }), Or = {
1248
1248
  id: "cyberpunk",
1249
1249
  name: "Cyberpunk",
1250
1250
  category: "dark",
@@ -1276,7 +1276,7 @@ const Ne = "'Inter', system-ui, sans-serif", wt = "'Fira Code', 'Cascadia Code',
1276
1276
  liquidColorEnd: "#7928ca"
1277
1277
  }
1278
1278
  )
1279
- }, Or = fe({
1279
+ }, Rr = fe({
1280
1280
  primary: "var(--nice-bg, #fff)",
1281
1281
  primaryLight: "#ffffffaa",
1282
1282
  secondary: "#4da6ff",
@@ -1297,7 +1297,7 @@ const Ne = "'Inter', system-ui, sans-serif", wt = "'Fira Code', 'Cascadia Code',
1297
1297
  gridSize: 16,
1298
1298
  selectionColor: "var(--nice-text-on-primary, #fff)"
1299
1299
  },
1300
- Or,
1300
+ Rr,
1301
1301
  wt,
1302
1302
  {
1303
1303
  backgroundColor: "transparent",
@@ -1423,7 +1423,7 @@ const Ne = "'Inter', system-ui, sans-serif", wt = "'Fira Code', 'Cascadia Code',
1423
1423
  liquidColor: "var(--nice-success, #00ff00)"
1424
1424
  }
1425
1425
  )
1426
- }, Br = fe({
1426
+ }, Yr = fe({
1427
1427
  primary: "#0000ff",
1428
1428
  primaryLight: "#6666ff",
1429
1429
  secondary: "#ff00ff",
@@ -1433,7 +1433,7 @@ const Ne = "'Inter', system-ui, sans-serif", wt = "'Fira Code', 'Cascadia Code',
1433
1433
  border: "var(--nice-border-color, #000000)",
1434
1434
  surface: "var(--nice-bg, #fff)",
1435
1435
  surfaceAlt: "var(--nice-border, #eeeeee)"
1436
- }), Yr = {
1436
+ }), Br = {
1437
1437
  id: "high-contrast",
1438
1438
  name: "High Contrast",
1439
1439
  category: "accessibility",
@@ -1445,7 +1445,7 @@ const Ne = "'Inter', system-ui, sans-serif", wt = "'Fira Code', 'Cascadia Code',
1445
1445
  gridSize: 20,
1446
1446
  selectionColor: "#0000ff"
1447
1447
  },
1448
- Br,
1448
+ Yr,
1449
1449
  "Arial, sans-serif",
1450
1450
  {
1451
1451
  borderColor: "var(--nice-border-color, #000000)",
@@ -1938,7 +1938,7 @@ const Ne = "'Inter', system-ui, sans-serif", wt = "'Fira Code', 'Cascadia Code',
1938
1938
  Ur,
1939
1939
  jr,
1940
1940
  Pr,
1941
- Rr,
1941
+ Or,
1942
1942
  Er,
1943
1943
  Vr,
1944
1944
  Wr,
@@ -1947,7 +1947,7 @@ const Ne = "'Inter', system-ui, sans-serif", wt = "'Fira Code', 'Cascadia Code',
1947
1947
  ti,
1948
1948
  qr,
1949
1949
  ii,
1950
- Yr,
1950
+ Br,
1951
1951
  oi,
1952
1952
  si,
1953
1953
  li,
@@ -1956,7 +1956,7 @@ const Ne = "'Inter', system-ui, sans-serif", wt = "'Fira Code', 'Cascadia Code',
1956
1956
  mi,
1957
1957
  yi,
1958
1958
  vi
1959
- ], Co = [
1959
+ ], zo = [
1960
1960
  // Fills
1961
1961
  { id: "fill-solid", name: "Solid Fill", category: "fill", style: { opacity: 1 } },
1962
1962
  {
@@ -2074,7 +2074,7 @@ const Ne = "'Inter', system-ui, sans-serif", wt = "'Fira Code', 'Cascadia Code',
2074
2074
  category: "effect",
2075
2075
  style: { glowColor: "var(--nice-success, #00ff88)", glowIntensity: 0.8 }
2076
2076
  }
2077
- ], So = [
2077
+ ], No = [
2078
2078
  // Line types
2079
2079
  { id: "line-straight", name: "Straight", category: "type", style: { lineType: "straight" } },
2080
2080
  { id: "line-bezier", name: "Bezier Curve", category: "type", style: { lineType: "bezier" } },
@@ -2403,13 +2403,13 @@ const Ne = "'Inter', system-ui, sans-serif", wt = "'Fira Code', 'Cascadia Code',
2403
2403
  description: "Text appears letter by letter"
2404
2404
  }
2405
2405
  ];
2406
- function zo(r) {
2406
+ function Io(r) {
2407
2407
  return xt.find((e) => e.id === r);
2408
2408
  }
2409
- function No(r) {
2409
+ function Ao(r) {
2410
2410
  return xt.filter((e) => e.category === r);
2411
2411
  }
2412
- function Io(r) {
2412
+ function $o(r) {
2413
2413
  return {
2414
2414
  canvasBackground: r.canvas.background,
2415
2415
  gridColor: r.canvas.gridColor,
@@ -2423,7 +2423,7 @@ function Io(r) {
2423
2423
  effects: r.effects
2424
2424
  };
2425
2425
  }
2426
- function Ao(r, e, t, i, a, o) {
2426
+ function Do(r, e, t, i, a, o) {
2427
2427
  const s = fe({
2428
2428
  primary: t.primary,
2429
2429
  primaryLight: t.primaryHover,
@@ -2538,7 +2538,7 @@ const ki = [
2538
2538
  /* @__PURE__ */ l("h4", { className: "nice-diagram-timeline__title", children: u("animation.timeline") }),
2539
2539
  /* @__PURE__ */ v("div", { className: "nice-diagram-timeline__controls", children: [
2540
2540
  s ? /* @__PURE__ */ v(
2541
- B,
2541
+ Y,
2542
2542
  {
2543
2543
  className: "nice-diagram-timeline__btn",
2544
2544
  variant: "ghost",
@@ -2551,7 +2551,7 @@ const ki = [
2551
2551
  ]
2552
2552
  }
2553
2553
  ) : /* @__PURE__ */ v(
2554
- B,
2554
+ Y,
2555
2555
  {
2556
2556
  className: "nice-diagram-timeline__btn",
2557
2557
  variant: "ghost",
@@ -2565,7 +2565,7 @@ const ki = [
2565
2565
  }
2566
2566
  ),
2567
2567
  /* @__PURE__ */ v(
2568
- B,
2568
+ Y,
2569
2569
  {
2570
2570
  className: "nice-diagram-timeline__btn",
2571
2571
  variant: "ghost",
@@ -2581,7 +2581,7 @@ const ki = [
2581
2581
  ),
2582
2582
  /* @__PURE__ */ v("div", { style: { position: "relative", display: "inline-block" }, children: [
2583
2583
  /* @__PURE__ */ v(
2584
- B,
2584
+ Y,
2585
2585
  {
2586
2586
  className: "nice-diagram-timeline__btn",
2587
2587
  variant: "ghost",
@@ -2612,7 +2612,7 @@ const ki = [
2612
2612
  zIndex: 100
2613
2613
  },
2614
2614
  children: wi.map((y) => /* @__PURE__ */ l(
2615
- B,
2615
+ Y,
2616
2616
  {
2617
2617
  variant: "ghost",
2618
2618
  size: "sm",
@@ -2653,7 +2653,7 @@ const ki = [
2653
2653
  ),
2654
2654
  /* @__PURE__ */ l("span", { className: "nice-diagram-timeline__track-effect", children: y.effect }),
2655
2655
  /* @__PURE__ */ l(
2656
- B,
2656
+ Y,
2657
2657
  {
2658
2658
  className: "nice-diagram-timeline__track-remove",
2659
2659
  variant: "ghost",
@@ -2710,7 +2710,7 @@ const ki = [
2710
2710
  }
2711
2711
  ),
2712
2712
  /* @__PURE__ */ l(
2713
- Re,
2713
+ Oe,
2714
2714
  {
2715
2715
  value: y.startMs,
2716
2716
  min: 0,
@@ -2721,7 +2721,7 @@ const ki = [
2721
2721
  }
2722
2722
  ),
2723
2723
  /* @__PURE__ */ l(
2724
- Re,
2724
+ Oe,
2725
2725
  {
2726
2726
  value: y.durationMs,
2727
2727
  min: 50,
@@ -2798,16 +2798,16 @@ const Mi = /^[a-z][a-z0-9-]*$/, Ci = 0.1, Si = 5, at = 8, gt = [
2798
2798
  interactive: x = !1,
2799
2799
  showGrid: P = !0,
2800
2800
  showRulers: L = !1,
2801
- snapToGrid: O = !0,
2801
+ snapToGrid: R = !0,
2802
2802
  gridSnapSize: W = 10,
2803
2803
  className: F
2804
2804
  }) => {
2805
- const M = Ve(null), [E, T] = K(!1), [V, R] = K({ x: 0, y: 0 }), [$, H] = K(null), [Y, j] = K({ x: 0, y: 0 }), [Z, ue] = K(null), [pe, X] = K(null), [U, me] = K(null), [ge, ce] = K(null), [Ie, qe] = K(""), [lt, we] = K([]), dt = (o == null ? void 0 : o.canvasBackground) ?? "var(--nice-bg-secondary, #f8f9fa)", Je = (o == null ? void 0 : o.gridColor) ?? "var(--nice-border, #e0e0e0)", Ae = (o == null ? void 0 : o.gridSize) ?? 20, $e = (o == null ? void 0 : o.selectionColor) ?? "var(--nice-primary, #2196f3)", Ze = ae(() => {
2805
+ const M = Ve(null), [E, T] = K(!1), [V, O] = K({ x: 0, y: 0 }), [$, H] = K(null), [B, j] = K({ x: 0, y: 0 }), [Z, ue] = K(null), [pe, X] = K(null), [U, me] = K(null), [ge, ce] = K(null), [Ie, qe] = K(""), [lt, we] = K([]), dt = (o == null ? void 0 : o.canvasBackground) ?? "var(--nice-bg-secondary, #f8f9fa)", Je = (o == null ? void 0 : o.gridColor) ?? "var(--nice-border, #e0e0e0)", Ae = (o == null ? void 0 : o.gridSize) ?? 20, $e = (o == null ? void 0 : o.selectionColor) ?? "var(--nice-primary, #2196f3)", Ze = ae(() => {
2806
2806
  const f = new Set(n);
2807
2807
  return s && f.add(s), f;
2808
2808
  }, [s, n]), ke = G(
2809
- (f) => O ? Math.round(f / W) * W : f,
2810
- [O, W]
2809
+ (f) => R ? Math.round(f / W) * W : f,
2810
+ [R, W]
2811
2811
  ), Ke = G(
2812
2812
  (f, k, N) => {
2813
2813
  const A = [], I = k.x, D = k.y, re = I + N.width / 2, Q = D + N.height / 2, ee = I + N.width, oe = D + N.height;
@@ -2843,11 +2843,11 @@ const Mi = /^[a-z][a-z0-9-]*$/, Ci = 0.1, Si = 5, at = 8, gt = [
2843
2843
  c && c(null), u && u([]);
2844
2844
  return;
2845
2845
  }
2846
- T(!0), R({ x: f.clientX - i.x, y: f.clientY - i.y }), c && f.button === 0 && c(null);
2846
+ T(!0), O({ x: f.clientX - i.x, y: f.clientY - i.y }), c && f.button === 0 && c(null);
2847
2847
  }
2848
2848
  },
2849
2849
  [i, c, u, x]
2850
- ), Ee = G(
2850
+ ), Le = G(
2851
2851
  (f) => {
2852
2852
  if (pe) {
2853
2853
  const k = M.current;
@@ -2878,7 +2878,7 @@ const Mi = /^[a-z][a-z0-9-]*$/, Ci = 0.1, Si = 5, at = 8, gt = [
2878
2878
  const k = M.current;
2879
2879
  if (!k)
2880
2880
  return;
2881
- const N = k.getBoundingClientRect(), A = ke((f.clientX - N.left - i.x) / i.zoom - Y.x), q = ke((f.clientY - N.top - i.y) / i.zoom - Y.y);
2881
+ const N = k.getBoundingClientRect(), A = ke((f.clientX - N.left - i.x) / i.zoom - B.x), q = ke((f.clientY - N.top - i.y) / i.zoom - B.y);
2882
2882
  m($, { x: A, y: q });
2883
2883
  const I = r.find((D) => D.id === $);
2884
2884
  I && Ke($, { x: A, y: q }, I.size);
@@ -2894,7 +2894,7 @@ const Mi = /^[a-z][a-z0-9-]*$/, Ci = 0.1, Si = 5, at = 8, gt = [
2894
2894
  g,
2895
2895
  $,
2896
2896
  m,
2897
- Y,
2897
+ B,
2898
2898
  ke,
2899
2899
  r,
2900
2900
  Ke
@@ -2921,7 +2921,7 @@ const Mi = /^[a-z][a-z0-9-]*$/, Ci = 0.1, Si = 5, at = 8, gt = [
2921
2921
  const k = M.current;
2922
2922
  if (!k)
2923
2923
  return;
2924
- const N = k.getBoundingClientRect(), A = ke((f.clientX - N.left - i.x) / i.zoom - Y.x), q = ke((f.clientY - N.top - i.y) / i.zoom - Y.y);
2924
+ const N = k.getBoundingClientRect(), A = ke((f.clientX - N.left - i.x) / i.zoom - B.x), q = ke((f.clientY - N.top - i.y) / i.zoom - B.y);
2925
2925
  p($, { x: A, y: q });
2926
2926
  }
2927
2927
  H(null), we([]);
@@ -2934,7 +2934,7 @@ const Mi = /^[a-z][a-z0-9-]*$/, Ci = 0.1, Si = 5, at = 8, gt = [
2934
2934
  $,
2935
2935
  p,
2936
2936
  i,
2937
- Y,
2937
+ B,
2938
2938
  ke,
2939
2939
  r,
2940
2940
  u,
@@ -2995,7 +2995,7 @@ const Mi = /^[a-z][a-z0-9-]*$/, Ci = 0.1, Si = 5, at = 8, gt = [
2995
2995
  f.stopPropagation(), c == null || c(k);
2996
2996
  },
2997
2997
  [c]
2998
- ), Oe = G(
2998
+ ), Re = G(
2999
2999
  (f) => {
3000
3000
  const k = r.find((N) => N.id === f);
3001
3001
  return k ? {
@@ -3011,7 +3011,7 @@ const Mi = /^[a-z][a-z0-9-]*$/, Ci = 0.1, Si = 5, at = 8, gt = [
3011
3011
  return { x: 0, y: 0 };
3012
3012
  const A = N.ports.find((D) => D.id === k);
3013
3013
  if (!A)
3014
- return Oe(f);
3014
+ return Re(f);
3015
3015
  const { position: q, size: I } = N;
3016
3016
  switch (A.side) {
3017
3017
  case "top":
@@ -3023,10 +3023,10 @@ const Mi = /^[a-z][a-z0-9-]*$/, Ci = 0.1, Si = 5, at = 8, gt = [
3023
3023
  case "right":
3024
3024
  return { x: q.x + I.width, y: q.y + I.height * A.offset };
3025
3025
  default:
3026
- return Oe(f);
3026
+ return Re(f);
3027
3027
  }
3028
3028
  },
3029
- [r, Oe]
3029
+ [r, Re]
3030
3030
  ), rr = G(
3031
3031
  (f) => {
3032
3032
  const k = xe(f.sourceNodeId, f.sourcePortId), N = xe(f.targetNodeId, f.targetPortId);
@@ -3289,7 +3289,7 @@ const Mi = /^[a-z][a-z0-9-]*$/, Ci = 0.1, Si = 5, at = 8, gt = [
3289
3289
  },
3290
3290
  onWheel: Me,
3291
3291
  onMouseDown: ut,
3292
- onMouseMove: Ee,
3292
+ onMouseMove: Le,
3293
3293
  onMouseUp: Qe,
3294
3294
  onMouseLeave: Qe,
3295
3295
  children: [
@@ -4011,7 +4011,7 @@ function zi(r, e) {
4011
4011
  }
4012
4012
  }
4013
4013
  Te.displayName = "DiagramCanvas";
4014
- const Ni = 180, Ii = 120, Bt = ({
4014
+ const Ni = 180, Ii = 120, Yt = ({
4015
4015
  nodes: r,
4016
4016
  edges: e,
4017
4017
  viewport: t,
@@ -4107,7 +4107,7 @@ const Ni = 180, Ii = 120, Bt = ({
4107
4107
  }
4108
4108
  );
4109
4109
  };
4110
- Bt.displayName = "DiagramMinimap";
4110
+ Yt.displayName = "DiagramMinimap";
4111
4111
  const Ai = [
4112
4112
  "rectangle",
4113
4113
  "roundedRect",
@@ -4121,7 +4121,7 @@ const Ai = [
4121
4121
  "cloud",
4122
4122
  "document",
4123
4123
  "actor"
4124
- ], Yt = ({
4124
+ ], Bt = ({
4125
4125
  selectedNode: r,
4126
4126
  selectedEdge: e,
4127
4127
  onNodeChange: t,
@@ -4191,7 +4191,7 @@ const Ai = [
4191
4191
  /* @__PURE__ */ v("label", { className: "nice-diagram-property-panel__label nice-diagram-property-panel__label--half", children: [
4192
4192
  s("node.width"),
4193
4193
  /* @__PURE__ */ l(
4194
- Re,
4194
+ Oe,
4195
4195
  {
4196
4196
  value: r.size.width,
4197
4197
  min: 20,
@@ -4205,7 +4205,7 @@ const Ai = [
4205
4205
  /* @__PURE__ */ v("label", { className: "nice-diagram-property-panel__label nice-diagram-property-panel__label--half", children: [
4206
4206
  s("node.height"),
4207
4207
  /* @__PURE__ */ l(
4208
- Re,
4208
+ Oe,
4209
4209
  {
4210
4210
  value: r.size.height,
4211
4211
  min: 20,
@@ -4221,7 +4221,7 @@ const Ai = [
4221
4221
  /* @__PURE__ */ v("label", { className: "nice-diagram-property-panel__label nice-diagram-property-panel__label--half", children: [
4222
4222
  s("node.bgColor"),
4223
4223
  /* @__PURE__ */ l(
4224
- Le,
4224
+ We,
4225
4225
  {
4226
4226
  value: r.style.backgroundColor ?? "var(--nice-bg, #fff)",
4227
4227
  onChange: (h) => n("backgroundColor", h),
@@ -4232,7 +4232,7 @@ const Ai = [
4232
4232
  /* @__PURE__ */ v("label", { className: "nice-diagram-property-panel__label nice-diagram-property-panel__label--half", children: [
4233
4233
  s("node.borderColor"),
4234
4234
  /* @__PURE__ */ l(
4235
- Le,
4235
+ We,
4236
4236
  {
4237
4237
  value: r.style.borderColor ?? "var(--nice-text, #333333)",
4238
4238
  onChange: (h) => n("borderColor", h),
@@ -4245,7 +4245,7 @@ const Ai = [
4245
4245
  /* @__PURE__ */ v("label", { className: "nice-diagram-property-panel__label nice-diagram-property-panel__label--half", children: [
4246
4246
  s("node.fontSize"),
4247
4247
  /* @__PURE__ */ l(
4248
- Re,
4248
+ Oe,
4249
4249
  {
4250
4250
  value: r.style.fontSize ?? 14,
4251
4251
  min: 8,
@@ -4258,7 +4258,7 @@ const Ai = [
4258
4258
  /* @__PURE__ */ v("label", { className: "nice-diagram-property-panel__label nice-diagram-property-panel__label--half", children: [
4259
4259
  s("node.fontColor"),
4260
4260
  /* @__PURE__ */ l(
4261
- Le,
4261
+ We,
4262
4262
  {
4263
4263
  value: r.style.fontColor ?? "#222222",
4264
4264
  onChange: (h) => n("fontColor", h),
@@ -4293,7 +4293,7 @@ const Ai = [
4293
4293
  /* @__PURE__ */ v("label", { className: "nice-diagram-property-panel__label nice-diagram-property-panel__label--half", children: [
4294
4294
  "Glow Color",
4295
4295
  /* @__PURE__ */ l(
4296
- Le,
4296
+ We,
4297
4297
  {
4298
4298
  value: r.style.glowColor ?? "var(--nice-primary, #3b82f6)",
4299
4299
  onChange: (h) => n("glowColor", h),
@@ -4333,7 +4333,7 @@ const Ai = [
4333
4333
  /* @__PURE__ */ v("label", { className: "nice-diagram-property-panel__label", children: [
4334
4334
  "Border Radius",
4335
4335
  /* @__PURE__ */ l(
4336
- Re,
4336
+ Oe,
4337
4337
  {
4338
4338
  min: 0,
4339
4339
  max: 50,
@@ -4346,7 +4346,7 @@ const Ai = [
4346
4346
  /* @__PURE__ */ v("label", { className: "nice-diagram-property-panel__label", children: [
4347
4347
  "Border Width",
4348
4348
  /* @__PURE__ */ l(
4349
- Re,
4349
+ Oe,
4350
4350
  {
4351
4351
  min: 0,
4352
4352
  max: 10,
@@ -4370,7 +4370,7 @@ const Ai = [
4370
4370
  /* @__PURE__ */ v("label", { className: "nice-diagram-property-panel__label nice-diagram-property-panel__label--half", children: [
4371
4371
  "Gradient End",
4372
4372
  /* @__PURE__ */ l(
4373
- Le,
4373
+ We,
4374
4374
  {
4375
4375
  value: r.style.gradientColor ?? "var(--nice-bg, #fff)",
4376
4376
  onChange: (h) => n("gradientColor", h),
@@ -4406,7 +4406,7 @@ const Ai = [
4406
4406
  }
4407
4407
  ),
4408
4408
  /* @__PURE__ */ l(
4409
- B,
4409
+ Y,
4410
4410
  {
4411
4411
  className: "nice-diagram-property-panel__btn nice-diagram-property-panel__btn--danger",
4412
4412
  variant: "ghost",
@@ -4449,7 +4449,7 @@ const Ai = [
4449
4449
  /* @__PURE__ */ v("label", { className: "nice-diagram-property-panel__label nice-diagram-property-panel__label--half", children: [
4450
4450
  s("edge.color"),
4451
4451
  /* @__PURE__ */ l(
4452
- Le,
4452
+ We,
4453
4453
  {
4454
4454
  value: e.style.strokeColor ?? "var(--nice-text, #333333)",
4455
4455
  onChange: (h) => c("strokeColor", h),
@@ -4460,7 +4460,7 @@ const Ai = [
4460
4460
  /* @__PURE__ */ v("label", { className: "nice-diagram-property-panel__label nice-diagram-property-panel__label--half", children: [
4461
4461
  s("edge.width"),
4462
4462
  /* @__PURE__ */ l(
4463
- Re,
4463
+ Oe,
4464
4464
  {
4465
4465
  value: e.style.strokeWidth ?? 1.5,
4466
4466
  min: 0.5,
@@ -4591,7 +4591,7 @@ const Ai = [
4591
4591
  /* @__PURE__ */ v("label", { className: "nice-diagram-property-panel__label nice-diagram-property-panel__label--half", children: [
4592
4592
  "Color",
4593
4593
  /* @__PURE__ */ l(
4594
- Le,
4594
+ We,
4595
4595
  {
4596
4596
  value: ((m = e.style.liquidFlow) == null ? void 0 : m.color) ?? "var(--nice-primary, #3b82f6)",
4597
4597
  onChange: (h) => {
@@ -4627,7 +4627,7 @@ const Ai = [
4627
4627
  /* @__PURE__ */ v("label", { className: "nice-diagram-property-panel__label", children: [
4628
4628
  "Pipe Width",
4629
4629
  /* @__PURE__ */ l(
4630
- Re,
4630
+ Oe,
4631
4631
  {
4632
4632
  min: 2,
4633
4633
  max: 20,
@@ -4658,7 +4658,7 @@ const Ai = [
4658
4658
  )
4659
4659
  ] }),
4660
4660
  /* @__PURE__ */ l(
4661
- B,
4661
+ Y,
4662
4662
  {
4663
4663
  className: "nice-diagram-property-panel__btn nice-diagram-property-panel__btn--danger",
4664
4664
  variant: "ghost",
@@ -4669,7 +4669,7 @@ const Ai = [
4669
4669
  )
4670
4670
  ] }) : null;
4671
4671
  };
4672
- Yt.displayName = "DiagramPropertyPanel";
4672
+ Bt.displayName = "DiagramPropertyPanel";
4673
4673
  const It = {
4674
4674
  flowchart: [
4675
4675
  "rectangle",
@@ -4741,17 +4741,17 @@ const It = {
4741
4741
  onAlignLeft: x,
4742
4742
  onAlignCenterH: P,
4743
4743
  onAlignRight: L,
4744
- onAlignTop: O,
4744
+ onAlignTop: R,
4745
4745
  onAlignCenterV: W,
4746
4746
  onAlignBottom: F,
4747
4747
  onDistributeH: M,
4748
4748
  onDistributeV: E,
4749
4749
  onBringToFront: T,
4750
4750
  onSendToBack: V,
4751
- onGroupSelected: R,
4751
+ onGroupSelected: O,
4752
4752
  onUngroupSelected: $,
4753
4753
  onCopy: H,
4754
- onPaste: Y,
4754
+ onPaste: B,
4755
4755
  onDuplicate: j,
4756
4756
  onSelectAll: Z,
4757
4757
  selectionCount: ue = 0,
@@ -4765,7 +4765,7 @@ const It = {
4765
4765
  onStylePresetChange: qe,
4766
4766
  className: lt
4767
4767
  }) => {
4768
- const { t: we } = ct(), [dt, Je] = K(!1), [Ae, $e] = K(!1), [Ze, ke] = K(!1), [Ke, Me] = K(!1), [ut, Ee] = K(!1), [Qe, et] = K(!1), ft = It[t] ?? It.custom, ht = G(
4768
+ const { t: we } = ct(), [dt, Je] = K(!1), [Ae, $e] = K(!1), [Ze, ke] = K(!1), [Ke, Me] = K(!1), [ut, Le] = K(!1), [Qe, et] = K(!1), ft = It[t] ?? It.custom, ht = G(
4769
4769
  (J) => {
4770
4770
  i == null || i(J), Je(!1);
4771
4771
  },
@@ -4780,7 +4780,7 @@ const It = {
4780
4780
  /* @__PURE__ */ v("div", { className: "nice-diagram-toolbar__row", children: [
4781
4781
  /* @__PURE__ */ v("div", { className: "nice-diagram-toolbar__group", children: [
4782
4782
  /* @__PURE__ */ l(
4783
- B,
4783
+ Y,
4784
4784
  {
4785
4785
  className: "nice-diagram-toolbar__btn",
4786
4786
  variant: r === "select" ? "primary" : "ghost",
@@ -4791,7 +4791,7 @@ const It = {
4791
4791
  }
4792
4792
  ),
4793
4793
  /* @__PURE__ */ l(
4794
- B,
4794
+ Y,
4795
4795
  {
4796
4796
  className: "nice-diagram-toolbar__btn",
4797
4797
  variant: r === "pan" ? "primary" : "ghost",
@@ -4802,7 +4802,7 @@ const It = {
4802
4802
  }
4803
4803
  ),
4804
4804
  /* @__PURE__ */ l(
4805
- B,
4805
+ Y,
4806
4806
  {
4807
4807
  className: "nice-diagram-toolbar__btn",
4808
4808
  variant: r === "addEdge" ? "primary" : "ghost",
@@ -4813,7 +4813,7 @@ const It = {
4813
4813
  }
4814
4814
  ),
4815
4815
  /* @__PURE__ */ l(
4816
- B,
4816
+ Y,
4817
4817
  {
4818
4818
  className: "nice-diagram-toolbar__btn",
4819
4819
  variant: r === "text" ? "primary" : "ghost",
@@ -4824,7 +4824,7 @@ const It = {
4824
4824
  }
4825
4825
  ),
4826
4826
  /* @__PURE__ */ l(
4827
- B,
4827
+ Y,
4828
4828
  {
4829
4829
  className: "nice-diagram-toolbar__btn",
4830
4830
  variant: r === "freehand" ? "primary" : "ghost",
@@ -4835,7 +4835,7 @@ const It = {
4835
4835
  }
4836
4836
  ),
4837
4837
  /* @__PURE__ */ l(
4838
- B,
4838
+ Y,
4839
4839
  {
4840
4840
  className: "nice-diagram-toolbar__btn",
4841
4841
  variant: r === "delete" ? "primary" : "ghost",
@@ -4848,7 +4848,7 @@ const It = {
4848
4848
  ] }),
4849
4849
  /* @__PURE__ */ v("div", { className: "nice-diagram-toolbar__group nice-diagram-toolbar__group--relative", children: [
4850
4850
  /* @__PURE__ */ v(
4851
- B,
4851
+ Y,
4852
4852
  {
4853
4853
  className: "nice-diagram-toolbar__btn",
4854
4854
  variant: r === "addNode" ? "primary" : "ghost",
@@ -4863,7 +4863,7 @@ const It = {
4863
4863
  }
4864
4864
  ),
4865
4865
  dt && /* @__PURE__ */ l("div", { className: "nice-diagram-toolbar__dropdown nice-diagram-toolbar__dropdown--shapes", children: ft.map((J) => /* @__PURE__ */ v(
4866
- B,
4866
+ Y,
4867
4867
  {
4868
4868
  className: "nice-diagram-toolbar__dropdown-item",
4869
4869
  variant: "ghost",
@@ -4880,7 +4880,7 @@ const It = {
4880
4880
  ] }),
4881
4881
  /* @__PURE__ */ v("div", { className: "nice-diagram-toolbar__group", children: [
4882
4882
  /* @__PURE__ */ l(
4883
- B,
4883
+ Y,
4884
4884
  {
4885
4885
  className: "nice-diagram-toolbar__btn",
4886
4886
  variant: "ghost",
@@ -4891,18 +4891,18 @@ const It = {
4891
4891
  }
4892
4892
  ),
4893
4893
  /* @__PURE__ */ l(
4894
- B,
4894
+ Y,
4895
4895
  {
4896
4896
  className: "nice-diagram-toolbar__btn",
4897
4897
  variant: "ghost",
4898
4898
  size: "sm",
4899
- onClick: Y,
4899
+ onClick: B,
4900
4900
  title: "Paste (Ctrl+V)",
4901
4901
  children: /* @__PURE__ */ l(te, { name: "clipboard", size: 14 })
4902
4902
  }
4903
4903
  ),
4904
4904
  /* @__PURE__ */ l(
4905
- B,
4905
+ Y,
4906
4906
  {
4907
4907
  className: "nice-diagram-toolbar__btn",
4908
4908
  variant: "ghost",
@@ -4913,7 +4913,7 @@ const It = {
4913
4913
  }
4914
4914
  ),
4915
4915
  /* @__PURE__ */ l(
4916
- B,
4916
+ Y,
4917
4917
  {
4918
4918
  className: "nice-diagram-toolbar__btn",
4919
4919
  variant: "ghost",
@@ -4926,7 +4926,7 @@ const It = {
4926
4926
  ] }),
4927
4927
  /* @__PURE__ */ v("div", { className: "nice-diagram-toolbar__group", children: [
4928
4928
  /* @__PURE__ */ l(
4929
- B,
4929
+ Y,
4930
4930
  {
4931
4931
  className: "nice-diagram-toolbar__btn",
4932
4932
  variant: "ghost",
@@ -4938,7 +4938,7 @@ const It = {
4938
4938
  }
4939
4939
  ),
4940
4940
  /* @__PURE__ */ l(
4941
- B,
4941
+ Y,
4942
4942
  {
4943
4943
  className: "nice-diagram-toolbar__btn",
4944
4944
  variant: "ghost",
@@ -4952,7 +4952,7 @@ const It = {
4952
4952
  ] }),
4953
4953
  /* @__PURE__ */ v("div", { className: "nice-diagram-toolbar__group", children: [
4954
4954
  /* @__PURE__ */ l(
4955
- B,
4955
+ Y,
4956
4956
  {
4957
4957
  className: "nice-diagram-toolbar__btn",
4958
4958
  variant: "ghost",
@@ -4967,7 +4967,7 @@ const It = {
4967
4967
  "%"
4968
4968
  ] }),
4969
4969
  /* @__PURE__ */ l(
4970
- B,
4970
+ Y,
4971
4971
  {
4972
4972
  className: "nice-diagram-toolbar__btn",
4973
4973
  variant: "ghost",
@@ -4978,7 +4978,7 @@ const It = {
4978
4978
  }
4979
4979
  ),
4980
4980
  /* @__PURE__ */ l(
4981
- B,
4981
+ Y,
4982
4982
  {
4983
4983
  className: "nice-diagram-toolbar__btn",
4984
4984
  variant: "ghost",
@@ -4991,7 +4991,7 @@ const It = {
4991
4991
  ] }),
4992
4992
  /* @__PURE__ */ v("div", { className: "nice-diagram-toolbar__group", children: [
4993
4993
  /* @__PURE__ */ l(
4994
- B,
4994
+ Y,
4995
4995
  {
4996
4996
  className: "nice-diagram-toolbar__btn",
4997
4997
  variant: "ghost",
@@ -5014,7 +5014,7 @@ const It = {
5014
5014
  ] }),
5015
5015
  /* @__PURE__ */ v("div", { className: "nice-diagram-toolbar__group nice-diagram-toolbar__group--relative", children: [
5016
5016
  /* @__PURE__ */ v(
5017
- B,
5017
+ Y,
5018
5018
  {
5019
5019
  className: "nice-diagram-toolbar__btn",
5020
5020
  variant: "ghost",
@@ -5030,7 +5030,7 @@ const It = {
5030
5030
  ),
5031
5031
  Ze && /* @__PURE__ */ v("div", { className: "nice-diagram-toolbar__dropdown", children: [
5032
5032
  /* @__PURE__ */ l(
5033
- B,
5033
+ Y,
5034
5034
  {
5035
5035
  className: "nice-diagram-toolbar__dropdown-item",
5036
5036
  variant: "ghost",
@@ -5042,7 +5042,7 @@ const It = {
5042
5042
  }
5043
5043
  ),
5044
5044
  /* @__PURE__ */ l(
5045
- B,
5045
+ Y,
5046
5046
  {
5047
5047
  className: "nice-diagram-toolbar__dropdown-item",
5048
5048
  variant: "ghost",
@@ -5054,7 +5054,7 @@ const It = {
5054
5054
  }
5055
5055
  ),
5056
5056
  /* @__PURE__ */ l(
5057
- B,
5057
+ Y,
5058
5058
  {
5059
5059
  className: "nice-diagram-toolbar__dropdown-item",
5060
5060
  variant: "ghost",
@@ -5066,7 +5066,7 @@ const It = {
5066
5066
  }
5067
5067
  ),
5068
5068
  /* @__PURE__ */ l(
5069
- B,
5069
+ Y,
5070
5070
  {
5071
5071
  className: "nice-diagram-toolbar__dropdown-item",
5072
5072
  variant: "ghost",
@@ -5108,7 +5108,7 @@ const It = {
5108
5108
  ] }),
5109
5109
  /* @__PURE__ */ v("div", { className: "nice-diagram-toolbar__group", children: [
5110
5110
  /* @__PURE__ */ l(
5111
- B,
5111
+ Y,
5112
5112
  {
5113
5113
  className: "nice-diagram-toolbar__btn",
5114
5114
  variant: w ? "primary" : "ghost",
@@ -5119,7 +5119,7 @@ const It = {
5119
5119
  }
5120
5120
  ),
5121
5121
  /* @__PURE__ */ l(
5122
- B,
5122
+ Y,
5123
5123
  {
5124
5124
  className: "nice-diagram-toolbar__btn",
5125
5125
  variant: y ? "primary" : "ghost",
@@ -5132,7 +5132,7 @@ const It = {
5132
5132
  ] }),
5133
5133
  /* @__PURE__ */ v("div", { className: "nice-diagram-toolbar__group nice-diagram-toolbar__group--relative", children: [
5134
5134
  /* @__PURE__ */ l(
5135
- B,
5135
+ Y,
5136
5136
  {
5137
5137
  className: "nice-diagram-toolbar__btn",
5138
5138
  variant: "ghost",
@@ -5146,7 +5146,7 @@ const It = {
5146
5146
  /* @__PURE__ */ l("div", { className: "nice-diagram-toolbar__dropdown-section", children: "Align" }),
5147
5147
  /* @__PURE__ */ v("div", { className: "nice-diagram-toolbar__dropdown-row", children: [
5148
5148
  /* @__PURE__ */ v(
5149
- B,
5149
+ Y,
5150
5150
  {
5151
5151
  className: "nice-diagram-toolbar__dropdown-item",
5152
5152
  variant: "ghost",
@@ -5162,7 +5162,7 @@ const It = {
5162
5162
  }
5163
5163
  ),
5164
5164
  /* @__PURE__ */ v(
5165
- B,
5165
+ Y,
5166
5166
  {
5167
5167
  className: "nice-diagram-toolbar__dropdown-item",
5168
5168
  variant: "ghost",
@@ -5178,7 +5178,7 @@ const It = {
5178
5178
  }
5179
5179
  ),
5180
5180
  /* @__PURE__ */ v(
5181
- B,
5181
+ Y,
5182
5182
  {
5183
5183
  className: "nice-diagram-toolbar__dropdown-item",
5184
5184
  variant: "ghost",
@@ -5196,13 +5196,13 @@ const It = {
5196
5196
  ] }),
5197
5197
  /* @__PURE__ */ v("div", { className: "nice-diagram-toolbar__dropdown-row", children: [
5198
5198
  /* @__PURE__ */ v(
5199
- B,
5199
+ Y,
5200
5200
  {
5201
5201
  className: "nice-diagram-toolbar__dropdown-item",
5202
5202
  variant: "ghost",
5203
5203
  size: "sm",
5204
5204
  onClick: () => {
5205
- O == null || O(), Me(!1);
5205
+ R == null || R(), Me(!1);
5206
5206
  },
5207
5207
  title: "Align Top",
5208
5208
  children: [
@@ -5212,7 +5212,7 @@ const It = {
5212
5212
  }
5213
5213
  ),
5214
5214
  /* @__PURE__ */ v(
5215
- B,
5215
+ Y,
5216
5216
  {
5217
5217
  className: "nice-diagram-toolbar__dropdown-item",
5218
5218
  variant: "ghost",
@@ -5228,7 +5228,7 @@ const It = {
5228
5228
  }
5229
5229
  ),
5230
5230
  /* @__PURE__ */ v(
5231
- B,
5231
+ Y,
5232
5232
  {
5233
5233
  className: "nice-diagram-toolbar__dropdown-item",
5234
5234
  variant: "ghost",
@@ -5247,7 +5247,7 @@ const It = {
5247
5247
  /* @__PURE__ */ l("div", { className: "nice-diagram-toolbar__dropdown-section", children: "Distribute" }),
5248
5248
  /* @__PURE__ */ v("div", { className: "nice-diagram-toolbar__dropdown-row", children: [
5249
5249
  /* @__PURE__ */ v(
5250
- B,
5250
+ Y,
5251
5251
  {
5252
5252
  className: "nice-diagram-toolbar__dropdown-item",
5253
5253
  variant: "ghost",
@@ -5263,7 +5263,7 @@ const It = {
5263
5263
  }
5264
5264
  ),
5265
5265
  /* @__PURE__ */ v(
5266
- B,
5266
+ Y,
5267
5267
  {
5268
5268
  className: "nice-diagram-toolbar__dropdown-item",
5269
5269
  variant: "ghost",
@@ -5283,12 +5283,12 @@ const It = {
5283
5283
  ] }),
5284
5284
  /* @__PURE__ */ v("div", { className: "nice-diagram-toolbar__group nice-diagram-toolbar__group--relative", children: [
5285
5285
  /* @__PURE__ */ v(
5286
- B,
5286
+ Y,
5287
5287
  {
5288
5288
  className: "nice-diagram-toolbar__btn",
5289
5289
  variant: "ghost",
5290
5290
  size: "sm",
5291
- onClick: () => Ee((J) => !J),
5291
+ onClick: () => Le((J) => !J),
5292
5292
  title: "Arrange",
5293
5293
  children: [
5294
5294
  /* @__PURE__ */ l(te, { name: "menu", size: 14 }),
@@ -5298,51 +5298,51 @@ const It = {
5298
5298
  ),
5299
5299
  ut && /* @__PURE__ */ v("div", { className: "nice-diagram-toolbar__dropdown", children: [
5300
5300
  /* @__PURE__ */ l(
5301
- B,
5301
+ Y,
5302
5302
  {
5303
5303
  className: "nice-diagram-toolbar__dropdown-item",
5304
5304
  variant: "ghost",
5305
5305
  size: "sm",
5306
5306
  onClick: () => {
5307
- T == null || T(), Ee(!1);
5307
+ T == null || T(), Le(!1);
5308
5308
  },
5309
5309
  children: "↑ Bring to Front"
5310
5310
  }
5311
5311
  ),
5312
5312
  /* @__PURE__ */ l(
5313
- B,
5313
+ Y,
5314
5314
  {
5315
5315
  className: "nice-diagram-toolbar__dropdown-item",
5316
5316
  variant: "ghost",
5317
5317
  size: "sm",
5318
5318
  onClick: () => {
5319
- V == null || V(), Ee(!1);
5319
+ V == null || V(), Le(!1);
5320
5320
  },
5321
5321
  children: "↓ Send to Back"
5322
5322
  }
5323
5323
  ),
5324
5324
  /* @__PURE__ */ l("div", { className: "nice-diagram-toolbar__dropdown-divider" }),
5325
5325
  /* @__PURE__ */ l(
5326
- B,
5326
+ Y,
5327
5327
  {
5328
5328
  className: "nice-diagram-toolbar__dropdown-item",
5329
5329
  variant: "ghost",
5330
5330
  size: "sm",
5331
5331
  onClick: () => {
5332
- R == null || R(), Ee(!1);
5332
+ O == null || O(), Le(!1);
5333
5333
  },
5334
5334
  disabled: ue < 2,
5335
5335
  children: "⊞ Group"
5336
5336
  }
5337
5337
  ),
5338
5338
  /* @__PURE__ */ l(
5339
- B,
5339
+ Y,
5340
5340
  {
5341
5341
  className: "nice-diagram-toolbar__dropdown-item",
5342
5342
  variant: "ghost",
5343
5343
  size: "sm",
5344
5344
  onClick: () => {
5345
- $ == null || $(), Ee(!1);
5345
+ $ == null || $(), Le(!1);
5346
5346
  },
5347
5347
  children: "⊟ Ungroup"
5348
5348
  }
@@ -5351,7 +5351,7 @@ const It = {
5351
5351
  ] }),
5352
5352
  /* @__PURE__ */ v("div", { className: "nice-diagram-toolbar__group nice-diagram-toolbar__group--relative", children: [
5353
5353
  /* @__PURE__ */ v(
5354
- B,
5354
+ Y,
5355
5355
  {
5356
5356
  className: "nice-diagram-toolbar__btn",
5357
5357
  variant: "ghost",
@@ -5365,7 +5365,7 @@ const It = {
5365
5365
  }
5366
5366
  ),
5367
5367
  Ae && /* @__PURE__ */ l("div", { className: "nice-diagram-toolbar__dropdown", children: $i.map((J) => /* @__PURE__ */ l(
5368
- B,
5368
+ Y,
5369
5369
  {
5370
5370
  className: "nice-diagram-toolbar__dropdown-item",
5371
5371
  variant: "ghost",
@@ -5382,7 +5382,7 @@ const It = {
5382
5382
  ] }),
5383
5383
  /* @__PURE__ */ v("div", { className: "nice-diagram-toolbar__group", children: [
5384
5384
  /* @__PURE__ */ v(
5385
- B,
5385
+ Y,
5386
5386
  {
5387
5387
  className: "nice-diagram-toolbar__btn",
5388
5388
  variant: ge === "editor" ? "primary" : "ghost",
@@ -5396,7 +5396,7 @@ const It = {
5396
5396
  }
5397
5397
  ),
5398
5398
  /* @__PURE__ */ v(
5399
- B,
5399
+ Y,
5400
5400
  {
5401
5401
  className: "nice-diagram-toolbar__btn",
5402
5402
  variant: ge === "player" ? "primary" : "ghost",
@@ -5410,7 +5410,7 @@ const It = {
5410
5410
  }
5411
5411
  ),
5412
5412
  /* @__PURE__ */ v(
5413
- B,
5413
+ Y,
5414
5414
  {
5415
5415
  className: "nice-diagram-toolbar__btn",
5416
5416
  variant: ge === "playerAnimated" ? "primary" : "ghost",
@@ -5426,7 +5426,7 @@ const It = {
5426
5426
  ] }),
5427
5427
  /* @__PURE__ */ v("div", { className: "nice-diagram-toolbar__group nice-diagram-toolbar__group--relative", children: [
5428
5428
  /* @__PURE__ */ v(
5429
- B,
5429
+ Y,
5430
5430
  {
5431
5431
  className: "nice-diagram-toolbar__btn",
5432
5432
  variant: "ghost",
@@ -5446,13 +5446,13 @@ const It = {
5446
5446
  style: { maxHeight: 320, overflowY: "auto", width: 220 },
5447
5447
  children: Object.entries(
5448
5448
  xt.reduce(
5449
- (J, Oe) => {
5450
- const xe = Oe.category ?? "Other";
5451
- return J[xe] || (J[xe] = []), J[xe].push(Oe), J;
5449
+ (J, Re) => {
5450
+ const xe = Re.category ?? "Other";
5451
+ return J[xe] || (J[xe] = []), J[xe].push(Re), J;
5452
5452
  },
5453
5453
  {}
5454
5454
  )
5455
- ).map(([J, Oe]) => /* @__PURE__ */ v("div", { children: [
5455
+ ).map(([J, Re]) => /* @__PURE__ */ v("div", { children: [
5456
5456
  /* @__PURE__ */ l(
5457
5457
  "div",
5458
5458
  {
@@ -5466,8 +5466,8 @@ const It = {
5466
5466
  children: J
5467
5467
  }
5468
5468
  ),
5469
- Oe.map((xe) => /* @__PURE__ */ v(
5470
- B,
5469
+ Re.map((xe) => /* @__PURE__ */ v(
5470
+ Y,
5471
5471
  {
5472
5472
  className: `nice-diagram-toolbar__dropdown-item ${Ie === xe.id ? "nice-diagram-toolbar__dropdown-item--active" : ""}`,
5473
5473
  variant: Ie === xe.id ? "primary" : "ghost",
@@ -5534,7 +5534,7 @@ function Ti(r) {
5534
5534
  }
5535
5535
  }
5536
5536
  Xt.displayName = "DiagramToolbar";
5537
- const Ri = [
5537
+ const Oi = [
5538
5538
  {
5539
5539
  target: ".nice-diagram-editor",
5540
5540
  titleKey: "tutorial.diagramEditor.intro.title",
@@ -5543,7 +5543,7 @@ const Ri = [
5543
5543
  content: "Pick a tool to add and connect nodes on the canvas, edit them in the property panel, and export the diagram from the toolbar.",
5544
5544
  placement: "auto"
5545
5545
  }
5546
- ], Oi = ({
5546
+ ], Ri = ({
5547
5547
  initialDocument: r,
5548
5548
  diagramType: e = "flowchart",
5549
5549
  onChange: t,
@@ -5563,20 +5563,20 @@ const Ri = [
5563
5563
  liquidFlows: /* @__PURE__ */ new Map(),
5564
5564
  glowStates: /* @__PURE__ */ new Map()
5565
5565
  });
5566
- Be(() => {
5566
+ Ye(() => {
5567
5567
  const X = new ur((U) => {
5568
5568
  x(U);
5569
5569
  });
5570
5570
  return z.current = X, X.start(), () => {
5571
5571
  X.stop(), z.current = null;
5572
5572
  };
5573
- }, []), Be(() => {
5573
+ }, []), Ye(() => {
5574
5574
  var U;
5575
5575
  const X = z.current;
5576
5576
  if (X)
5577
5577
  for (const me of p.edges)
5578
5578
  (U = me.style.liquidFlow) != null && U.active ? X.startLiquidFlow(me.id, me.style.liquidFlow) : X.stopLiquidFlow(me.id);
5579
- }, [p.edges]), Be(() => {
5579
+ }, [p.edges]), Ye(() => {
5580
5580
  const X = z.current;
5581
5581
  if (X)
5582
5582
  for (const U of p.nodes)
@@ -5628,8 +5628,8 @@ const Ri = [
5628
5628
  }
5629
5629
  },
5630
5630
  [p]
5631
- ), O = Ve(p.document);
5632
- p.document !== O.current && (O.current = p.document, t == null || t(p.document));
5631
+ ), R = Ve(p.document);
5632
+ p.document !== R.current && (R.current = p.document, t == null || t(p.document));
5633
5633
  const W = ae(
5634
5634
  () => b ? p.nodes.find((X) => X.id === b) ?? null : null,
5635
5635
  [b, p.nodes]
@@ -5657,7 +5657,7 @@ const Ri = [
5657
5657
  p.moveNode(X, U);
5658
5658
  },
5659
5659
  [p]
5660
- ), R = G(
5660
+ ), O = G(
5661
5661
  (X) => {
5662
5662
  p.nodes.find((U) => U.id === X) ? p.removeNode(X) : p.edges.find((U) => U.id === X) && p.removeEdge(X), w(null);
5663
5663
  },
@@ -5685,7 +5685,7 @@ const Ri = [
5685
5685
  [p, i]
5686
5686
  ), H = G(() => {
5687
5687
  p.setViewport({ ...p.viewport, zoom: Math.min(5, p.viewport.zoom * 1.2) });
5688
- }, [p]), Y = G(() => {
5688
+ }, [p]), B = G(() => {
5689
5689
  p.setViewport({ ...p.viewport, zoom: Math.max(0.1, p.viewport.zoom / 1.2) });
5690
5690
  }, [p]), j = G(() => {
5691
5691
  p.setViewport({ x: 0, y: 0, zoom: 1 });
@@ -5710,7 +5710,7 @@ const Ri = [
5710
5710
  canRedo: p.canRedo,
5711
5711
  onExport: $,
5712
5712
  onZoomIn: H,
5713
- onZoomOut: Y,
5713
+ onZoomOut: B,
5714
5714
  onZoomReset: j,
5715
5715
  viewMode: S,
5716
5716
  onViewModeChange: C,
@@ -5734,7 +5734,7 @@ const Ri = [
5734
5734
  p.animationModes.map((X) => {
5735
5735
  var U;
5736
5736
  return /* @__PURE__ */ l(
5737
- B,
5737
+ Y,
5738
5738
  {
5739
5739
  variant: ((U = p.activeAnimationMode) == null ? void 0 : U.id) === X.id ? "primary" : "ghost",
5740
5740
  size: "sm",
@@ -5749,7 +5749,7 @@ const Ri = [
5749
5749
  );
5750
5750
  }),
5751
5751
  /* @__PURE__ */ l(
5752
- B,
5752
+ Y,
5753
5753
  {
5754
5754
  variant: "ghost",
5755
5755
  size: "sm",
@@ -5781,13 +5781,13 @@ const Ri = [
5781
5781
  className: "nice-diagram-editor__panel",
5782
5782
  style: { width: 260, overflowY: "auto", height: "100%" },
5783
5783
  children: /* @__PURE__ */ l(
5784
- Yt,
5784
+ Bt,
5785
5785
  {
5786
5786
  selectedNode: W,
5787
5787
  selectedEdge: F,
5788
5788
  onNodeChange: p.updateNode,
5789
5789
  onEdgeChange: p.updateEdge,
5790
- onRemove: R
5790
+ onRemove: O
5791
5791
  }
5792
5792
  )
5793
5793
  }
@@ -5802,7 +5802,7 @@ const Ri = [
5802
5802
  }
5803
5803
  ) }) : void 0,
5804
5804
  children: [
5805
- /* @__PURE__ */ l("span", { style: { position: "absolute", top: 6, right: 6, zIndex: 30 }, children: /* @__PURE__ */ l(Et, { steps: Lt(m, Ri) }) }),
5805
+ /* @__PURE__ */ l("span", { style: { position: "absolute", top: 6, right: 6, zIndex: 30 }, children: /* @__PURE__ */ l(Et, { steps: Lt(m, Oi) }) }),
5806
5806
  /* @__PURE__ */ v(
5807
5807
  "div",
5808
5808
  {
@@ -5832,7 +5832,7 @@ const Ri = [
5832
5832
  }
5833
5833
  ),
5834
5834
  n && /* @__PURE__ */ l("div", { style: { position: "absolute", bottom: 8, left: 8 }, children: /* @__PURE__ */ l(
5835
- Bt,
5835
+ Yt,
5836
5836
  {
5837
5837
  nodes: p.nodes,
5838
5838
  edges: p.edges,
@@ -5847,7 +5847,7 @@ const Ri = [
5847
5847
  }
5848
5848
  ) });
5849
5849
  };
5850
- Oi.displayName = "NiceDiagramEditor";
5850
+ Ri.displayName = "NiceDiagramEditor";
5851
5851
  const At = {
5852
5852
  linear: (r) => r,
5853
5853
  easeIn: (r) => r * r,
@@ -6033,8 +6033,137 @@ function Fi(r) {
6033
6033
  }
6034
6034
  return e;
6035
6035
  }
6036
- const qi = ({
6037
- document: r,
6036
+ function qi(r) {
6037
+ return {
6038
+ rectangle: "rectangle",
6039
+ roundedRect: "roundedRect",
6040
+ ellipse: "ellipse",
6041
+ circle: "circle",
6042
+ diamond: "diamond",
6043
+ hexagon: "hexagon",
6044
+ cylinder: "cylinder",
6045
+ cloud: "cloud",
6046
+ triangle: "triangle"
6047
+ }[r || "rectangle"] || "rectangle";
6048
+ }
6049
+ function Gi(r) {
6050
+ return r ? {
6051
+ backgroundColor: r.fill,
6052
+ borderColor: r.stroke,
6053
+ borderWidth: r.strokeWidth,
6054
+ fontColor: r.fontColor,
6055
+ fontSize: r.fontSize,
6056
+ borderRadius: r.borderRadius,
6057
+ borderStyle: r.strokeDasharray ? "dashed" : "solid"
6058
+ } : {};
6059
+ }
6060
+ function Vi(r) {
6061
+ if (!r)
6062
+ return {};
6063
+ let e = "straight";
6064
+ return r.lineType === "orthogonal" ? e = "orthogonal" : r.lineType === "curved" || r.lineType === "bezier" ? e = "bezier" : r.lineType === "step" && (e = "step"), {
6065
+ strokeColor: r.stroke,
6066
+ strokeWidth: r.strokeWidth,
6067
+ strokeDash: r.strokeDasharray ? r.strokeDasharray.split(",").map(Number) : void 0,
6068
+ lineType: e,
6069
+ sourceArrow: "none",
6070
+ targetArrow: r.arrowHead ? "arrow" : "none",
6071
+ opacity: r.opacity
6072
+ };
6073
+ }
6074
+ function Yi(r) {
6075
+ if (r)
6076
+ return {
6077
+ backgroundColor: r.fill,
6078
+ borderColor: r.stroke,
6079
+ borderWidth: r.strokeWidth
6080
+ };
6081
+ }
6082
+ function Bi(r) {
6083
+ return {
6084
+ id: r.id,
6085
+ label: r.label,
6086
+ position: { x: r.x, y: r.y },
6087
+ size: { width: r.width, height: r.height },
6088
+ shape: qi(r.shape),
6089
+ style: Gi(r.style),
6090
+ ports: (r.ports || []).map((e, t) => ({
6091
+ id: e.id,
6092
+ side: e.position || "right",
6093
+ offset: 0.5
6094
+ })),
6095
+ data: r.data
6096
+ };
6097
+ }
6098
+ function Xi(r, e) {
6099
+ var s, n;
6100
+ const t = e.find((c) => c.id === r.source), i = e.find((c) => c.id === r.target), a = r.sourcePort || ((s = t == null ? void 0 : t.ports[0]) == null ? void 0 : s.id) || `${r.source}-out`, o = r.targetPort || ((n = i == null ? void 0 : i.ports[0]) == null ? void 0 : n.id) || `${r.target}-in`;
6101
+ return {
6102
+ id: r.id,
6103
+ sourceNodeId: r.source,
6104
+ sourcePortId: a,
6105
+ targetNodeId: r.target,
6106
+ targetPortId: o,
6107
+ label: r.label,
6108
+ style: Vi(r.style),
6109
+ data: r.data
6110
+ };
6111
+ }
6112
+ function Ui(r) {
6113
+ return {
6114
+ id: r.id,
6115
+ label: r.label,
6116
+ nodeIds: r.nodeIds,
6117
+ style: Yi(r.style)
6118
+ };
6119
+ }
6120
+ function Hi(r) {
6121
+ var e;
6122
+ return {
6123
+ id: r.id,
6124
+ name: r.id,
6125
+ targetId: r.targetId || ((e = r.targets) == null ? void 0 : e[0]) || "",
6126
+ targetType: "node",
6127
+ effect: r.type === "highlight" ? "highlight" : "fadeIn",
6128
+ startMs: r.delay,
6129
+ durationMs: r.duration,
6130
+ easing: "easeInOut"
6131
+ };
6132
+ }
6133
+ function Ee(r) {
6134
+ const e = r.nodes.map(Bi);
6135
+ return e.forEach((t, i) => {
6136
+ t.ports.length === 0 && (t.ports = [
6137
+ { id: `${t.id}-out`, side: "right", offset: 0.5 },
6138
+ { id: `${t.id}-in`, side: "left", offset: 0.5 },
6139
+ { id: `${t.id}-top`, side: "top", offset: 0.5 },
6140
+ { id: `${t.id}-bottom`, side: "bottom", offset: 0.5 }
6141
+ ]);
6142
+ }), {
6143
+ version: "1.0",
6144
+ id: r.id,
6145
+ title: r.title,
6146
+ diagramType: r.diagramType,
6147
+ nodes: e,
6148
+ edges: r.edges.map((t) => Xi(t, e)),
6149
+ groups: (r.groups || []).map(Ui),
6150
+ animations: (r.animations || []).map(Hi),
6151
+ viewport: { x: 0, y: 0, zoom: 1 },
6152
+ metadata: {
6153
+ createdAt: (/* @__PURE__ */ new Date()).toISOString(),
6154
+ updatedAt: (/* @__PURE__ */ new Date()).toISOString(),
6155
+ ...r.metadata
6156
+ }
6157
+ };
6158
+ }
6159
+ const ji = Ee({
6160
+ id: "empty",
6161
+ title: "",
6162
+ diagramType: "flowchart",
6163
+ nodes: [],
6164
+ edges: []
6165
+ }), Ji = ({
6166
+ document: r = ji,
6038
6167
  lang: e = "en",
6039
6168
  autoPlay: t = !1,
6040
6169
  showControls: i,
@@ -6071,7 +6200,7 @@ const qi = ({
6071
6200
  style: { display: "flex", flexDirection: "column", height: "100%", ...n },
6072
6201
  children: [
6073
6202
  c && /* @__PURE__ */ l(
6074
- Gi,
6203
+ Zi,
6075
6204
  {
6076
6205
  isPlaying: h,
6077
6206
  hasAnimations: r.animations.length > 0,
@@ -6099,7 +6228,7 @@ const qi = ({
6099
6228
  ]
6100
6229
  }
6101
6230
  ) });
6102
- }, Gi = ({
6231
+ }, Zi = ({
6103
6232
  isPlaying: r,
6104
6233
  hasAnimations: e,
6105
6234
  onPlay: t,
@@ -6122,7 +6251,7 @@ const qi = ({
6122
6251
  },
6123
6252
  children: [
6124
6253
  e && (r ? /* @__PURE__ */ v(
6125
- B,
6254
+ Y,
6126
6255
  {
6127
6256
  className: "nice-diagram-viewer__btn",
6128
6257
  variant: "ghost",
@@ -6135,7 +6264,7 @@ const qi = ({
6135
6264
  ]
6136
6265
  }
6137
6266
  ) : /* @__PURE__ */ v(
6138
- B,
6267
+ Y,
6139
6268
  {
6140
6269
  className: "nice-diagram-viewer__btn",
6141
6270
  variant: "ghost",
@@ -6150,7 +6279,7 @@ const qi = ({
6150
6279
  )),
6151
6280
  /* @__PURE__ */ l("span", { style: { flex: 1 } }),
6152
6281
  /* @__PURE__ */ l(
6153
- B,
6282
+ Y,
6154
6283
  {
6155
6284
  className: "nice-diagram-viewer__btn",
6156
6285
  variant: "ghost",
@@ -6161,7 +6290,7 @@ const qi = ({
6161
6290
  }
6162
6291
  ),
6163
6292
  /* @__PURE__ */ l(
6164
- B,
6293
+ Y,
6165
6294
  {
6166
6295
  className: "nice-diagram-viewer__btn",
6167
6296
  variant: "ghost",
@@ -6172,7 +6301,7 @@ const qi = ({
6172
6301
  }
6173
6302
  ),
6174
6303
  /* @__PURE__ */ l(
6175
- B,
6304
+ Y,
6176
6305
  {
6177
6306
  className: "nice-diagram-viewer__btn",
6178
6307
  variant: "ghost",
@@ -6185,24 +6314,24 @@ const qi = ({
6185
6314
  }
6186
6315
  );
6187
6316
  };
6188
- qi.displayName = "NiceDiagramViewer";
6189
- const Vi = "_cell_16e1i_9", Bi = "_expandable_16e1i_29", Yi = "_svg_16e1i_57", Xi = "_emptyText_16e1i_67", Ui = "_badge_16e1i_79", Hi = "_expandIcon_16e1i_117", ji = "_modalOverlay_16e1i_169", Ji = "_modalContent_16e1i_217", Zi = "_modalHeader_16e1i_267", Ki = "_modalTitle_16e1i_285", Qi = "_modalClose_16e1i_299", ea = "_modalBody_16e1i_337", ta = "_modalSvg_16e1i_357", ra = "_modalFooter_16e1i_371", ia = "_modalInfo_16e1i_389", _e = {
6190
- cell: Vi,
6191
- expandable: Bi,
6192
- svg: Yi,
6193
- emptyText: Xi,
6194
- badge: Ui,
6195
- expandIcon: Hi,
6196
- modalOverlay: ji,
6197
- modalContent: Ji,
6198
- modalHeader: Zi,
6199
- modalTitle: Ki,
6200
- modalClose: Qi,
6201
- modalBody: ea,
6202
- modalSvg: ta,
6203
- modalFooter: ra,
6204
- modalInfo: ia
6205
- }, aa = 120, oa = 48, na = 4, $t = {
6317
+ Ji.displayName = "NiceDiagramViewer";
6318
+ const Ki = "_cell_16e1i_9", Qi = "_expandable_16e1i_29", ea = "_svg_16e1i_57", ta = "_emptyText_16e1i_67", ra = "_badge_16e1i_79", ia = "_expandIcon_16e1i_117", aa = "_modalOverlay_16e1i_169", oa = "_modalContent_16e1i_217", na = "_modalHeader_16e1i_267", sa = "_modalTitle_16e1i_285", ca = "_modalClose_16e1i_299", la = "_modalBody_16e1i_337", da = "_modalSvg_16e1i_357", ua = "_modalFooter_16e1i_371", fa = "_modalInfo_16e1i_389", _e = {
6319
+ cell: Ki,
6320
+ expandable: Qi,
6321
+ svg: ea,
6322
+ emptyText: ta,
6323
+ badge: ra,
6324
+ expandIcon: ia,
6325
+ modalOverlay: aa,
6326
+ modalContent: oa,
6327
+ modalHeader: na,
6328
+ modalTitle: sa,
6329
+ modalClose: ca,
6330
+ modalBody: la,
6331
+ modalSvg: da,
6332
+ modalFooter: ua,
6333
+ modalInfo: fa
6334
+ }, ha = 120, pa = 48, ma = 4, $t = {
6206
6335
  default: "var(--nice-primary, #3b82f6)",
6207
6336
  process: "var(--nice-success, #22c55e)",
6208
6337
  decision: "var(--nice-warning, #f59e0b)",
@@ -6242,7 +6371,7 @@ function jt(r, e) {
6242
6371
  const a = t.position.x + t.size.width / 2, o = t.position.y + t.size.height / 2, s = i.position.x + i.size.width / 2, n = i.position.y + i.size.height / 2;
6243
6372
  return `M ${a} ${o} L ${s} ${n}`;
6244
6373
  }
6245
- function sa(r, e) {
6374
+ function ga(r, e) {
6246
6375
  const t = kt(r);
6247
6376
  return {
6248
6377
  version: "1.0",
@@ -6264,7 +6393,7 @@ function sa(r, e) {
6264
6393
  }
6265
6394
  };
6266
6395
  }
6267
- const ca = ({ document: r, onClose: e }) => {
6396
+ const ya = ({ document: r, onClose: e }) => {
6268
6397
  const t = kt(r.nodes), i = 40, a = t.width + i * 2, o = t.height + i * 2, s = ae(() => new Map(r.nodes.map((n) => [n.id, n])), [r.nodes]);
6269
6398
  return /* @__PURE__ */ l("div", { className: _e.modalOverlay, onClick: e, children: /* @__PURE__ */ v("div", { className: _e.modalContent, onClick: (n) => n.stopPropagation(), children: [
6270
6399
  /* @__PURE__ */ v("div", { className: _e.modalHeader, children: [
@@ -6353,23 +6482,23 @@ const ca = ({ document: r, onClose: e }) => {
6353
6482
  " edges"
6354
6483
  ] }) })
6355
6484
  ] }) });
6356
- }, $o = ({
6485
+ }, Po = ({
6357
6486
  document: r,
6358
6487
  nodes: e,
6359
6488
  edges: t,
6360
- width: i = aa,
6361
- height: a = oa,
6489
+ width: i = ha,
6490
+ height: a = pa,
6362
6491
  showCount: o = !0,
6363
6492
  expandable: s = !0,
6364
6493
  onExpand: n,
6365
- padding: c = na,
6494
+ padding: c = ma,
6366
6495
  backgroundColor: u = "transparent",
6367
6496
  borderRadius: d = 4,
6368
6497
  showLabels: m = !1,
6369
6498
  edgeColor: p = "var(--nice-text-muted, #94a3b8)",
6370
6499
  tooltip: g
6371
6500
  }) => {
6372
- const [h, b] = K(!1), w = ae(() => r || (e || t ? sa(e ?? [], t ?? []) : null), [r, e, t]), y = ae(() => w ? new Map(w.nodes.map((P) => [P.id, P])) : /* @__PURE__ */ new Map(), [w]), {
6501
+ const [h, b] = K(!1), w = ae(() => r || (e || t ? ga(e ?? [], t ?? []) : null), [r, e, t]), y = ae(() => w ? new Map(w.nodes.map((P) => [P.id, P])) : /* @__PURE__ */ new Map(), [w]), {
6373
6502
  bounds: S,
6374
6503
  scale: C,
6375
6504
  translateX: z,
@@ -6382,8 +6511,8 @@ const ca = ({ document: r, onClose: e }) => {
6382
6511
  translateX: 0,
6383
6512
  translateY: 0
6384
6513
  };
6385
- const P = kt(w.nodes), L = i - c * 2, O = a - c * 2, W = L / P.width, F = O / P.height, M = Math.min(W, F, 1), E = P.width * M, T = P.height * M, V = (i - E) / 2 - P.minX * M, R = (a - T) / 2 - P.minY * M;
6386
- return { bounds: P, scale: M, translateX: V, translateY: R };
6514
+ const P = kt(w.nodes), L = i - c * 2, R = a - c * 2, W = L / P.width, F = R / P.height, M = Math.min(W, F, 1), E = P.width * M, T = P.height * M, V = (i - E) / 2 - P.minX * M, O = (a - T) / 2 - P.minY * M;
6515
+ return { bounds: P, scale: M, translateX: V, translateY: O };
6387
6516
  }, [w, i, a, c]), x = G(() => {
6388
6517
  !w || !s || (n ? n(w) : b(!0));
6389
6518
  }, [w, s, n]);
@@ -6482,10 +6611,10 @@ const ca = ({ document: r, onClose: e }) => {
6482
6611
  ]
6483
6612
  }
6484
6613
  ),
6485
- h && w && /* @__PURE__ */ l(ca, { document: w, onClose: () => b(!1) })
6614
+ h && w && /* @__PURE__ */ l(ya, { document: w, onClose: () => b(!1) })
6486
6615
  ] });
6487
6616
  };
6488
- function la(r, e, t = "roundedRect") {
6617
+ function ba(r, e, t = "roundedRect") {
6489
6618
  const i = [], a = [], o = /* @__PURE__ */ new Map();
6490
6619
  for (const s of r) {
6491
6620
  const n = String(s[e.nodeMapping.idField] ?? "");
@@ -6546,137 +6675,14 @@ function la(r, e, t = "roundedRect") {
6546
6675
  }
6547
6676
  return { nodes: i, edges: a };
6548
6677
  }
6549
- async function Do(r, e, t) {
6678
+ async function To(r, e, t) {
6550
6679
  const i = await fetch(r.sourceUrl, { signal: t });
6551
6680
  if (!i.ok)
6552
6681
  throw new Error(`Failed to fetch data: ${i.status} ${i.statusText}`);
6553
6682
  const a = await i.json(), o = Array.isArray(a) ? a : a.value ?? [];
6554
- return la(o, r, e);
6555
- }
6556
- function da(r) {
6557
- return {
6558
- rectangle: "rectangle",
6559
- roundedRect: "roundedRect",
6560
- ellipse: "ellipse",
6561
- circle: "circle",
6562
- diamond: "diamond",
6563
- hexagon: "hexagon",
6564
- cylinder: "cylinder",
6565
- cloud: "cloud",
6566
- triangle: "triangle"
6567
- }[r || "rectangle"] || "rectangle";
6568
- }
6569
- function ua(r) {
6570
- return r ? {
6571
- backgroundColor: r.fill,
6572
- borderColor: r.stroke,
6573
- borderWidth: r.strokeWidth,
6574
- fontColor: r.fontColor,
6575
- fontSize: r.fontSize,
6576
- borderRadius: r.borderRadius,
6577
- borderStyle: r.strokeDasharray ? "dashed" : "solid"
6578
- } : {};
6579
- }
6580
- function fa(r) {
6581
- if (!r)
6582
- return {};
6583
- let e = "straight";
6584
- return r.lineType === "orthogonal" ? e = "orthogonal" : r.lineType === "curved" || r.lineType === "bezier" ? e = "bezier" : r.lineType === "step" && (e = "step"), {
6585
- strokeColor: r.stroke,
6586
- strokeWidth: r.strokeWidth,
6587
- strokeDash: r.strokeDasharray ? r.strokeDasharray.split(",").map(Number) : void 0,
6588
- lineType: e,
6589
- sourceArrow: "none",
6590
- targetArrow: r.arrowHead ? "arrow" : "none",
6591
- opacity: r.opacity
6592
- };
6593
- }
6594
- function ha(r) {
6595
- if (r)
6596
- return {
6597
- backgroundColor: r.fill,
6598
- borderColor: r.stroke,
6599
- borderWidth: r.strokeWidth
6600
- };
6601
- }
6602
- function pa(r) {
6603
- return {
6604
- id: r.id,
6605
- label: r.label,
6606
- position: { x: r.x, y: r.y },
6607
- size: { width: r.width, height: r.height },
6608
- shape: da(r.shape),
6609
- style: ua(r.style),
6610
- ports: (r.ports || []).map((e, t) => ({
6611
- id: e.id,
6612
- side: e.position || "right",
6613
- offset: 0.5
6614
- })),
6615
- data: r.data
6616
- };
6617
- }
6618
- function ma(r, e) {
6619
- var s, n;
6620
- const t = e.find((c) => c.id === r.source), i = e.find((c) => c.id === r.target), a = r.sourcePort || ((s = t == null ? void 0 : t.ports[0]) == null ? void 0 : s.id) || `${r.source}-out`, o = r.targetPort || ((n = i == null ? void 0 : i.ports[0]) == null ? void 0 : n.id) || `${r.target}-in`;
6621
- return {
6622
- id: r.id,
6623
- sourceNodeId: r.source,
6624
- sourcePortId: a,
6625
- targetNodeId: r.target,
6626
- targetPortId: o,
6627
- label: r.label,
6628
- style: fa(r.style),
6629
- data: r.data
6630
- };
6631
- }
6632
- function ga(r) {
6633
- return {
6634
- id: r.id,
6635
- label: r.label,
6636
- nodeIds: r.nodeIds,
6637
- style: ha(r.style)
6638
- };
6639
- }
6640
- function ya(r) {
6641
- var e;
6642
- return {
6643
- id: r.id,
6644
- name: r.id,
6645
- targetId: r.targetId || ((e = r.targets) == null ? void 0 : e[0]) || "",
6646
- targetType: "node",
6647
- effect: r.type === "highlight" ? "highlight" : "fadeIn",
6648
- startMs: r.delay,
6649
- durationMs: r.duration,
6650
- easing: "easeInOut"
6651
- };
6652
- }
6653
- function Fe(r) {
6654
- const e = r.nodes.map(pa);
6655
- return e.forEach((t, i) => {
6656
- t.ports.length === 0 && (t.ports = [
6657
- { id: `${t.id}-out`, side: "right", offset: 0.5 },
6658
- { id: `${t.id}-in`, side: "left", offset: 0.5 },
6659
- { id: `${t.id}-top`, side: "top", offset: 0.5 },
6660
- { id: `${t.id}-bottom`, side: "bottom", offset: 0.5 }
6661
- ]);
6662
- }), {
6663
- version: "1.0",
6664
- id: r.id,
6665
- title: r.title,
6666
- diagramType: r.diagramType,
6667
- nodes: e,
6668
- edges: r.edges.map((t) => ma(t, e)),
6669
- groups: (r.groups || []).map(ga),
6670
- animations: (r.animations || []).map(ya),
6671
- viewport: { x: 0, y: 0, zoom: 1 },
6672
- metadata: {
6673
- createdAt: (/* @__PURE__ */ new Date()).toISOString(),
6674
- updatedAt: (/* @__PURE__ */ new Date()).toISOString(),
6675
- ...r.metadata
6676
- }
6677
- };
6683
+ return ba(o, r, e);
6678
6684
  }
6679
- const ba = {
6685
+ const va = {
6680
6686
  pending: "var(--nice-text-muted, #9ca3af)",
6681
6687
  // gray
6682
6688
  active: "var(--nice-primary, #3b82f6)",
@@ -6689,7 +6695,7 @@ const ba = {
6689
6695
  // yellow
6690
6696
  waiting: "var(--nice-accent, #8b5cf6)"
6691
6697
  // purple
6692
- }, va = {
6698
+ }, wa = {
6693
6699
  start: "ellipse",
6694
6700
  end: "ellipse",
6695
6701
  task: "rectangle",
@@ -6700,7 +6706,7 @@ const ba = {
6700
6706
  timer: "ellipse",
6701
6707
  message: "rectangle",
6702
6708
  error: "rectangle"
6703
- }, wa = {
6709
+ }, xa = {
6704
6710
  start: "play",
6705
6711
  end: "stop",
6706
6712
  task: "clipboard",
@@ -6711,7 +6717,7 @@ const ba = {
6711
6717
  timer: "clock",
6712
6718
  message: "mail",
6713
6719
  error: "warning"
6714
- }, Po = ({
6720
+ }, Oo = ({
6715
6721
  data: r,
6716
6722
  onStepClick: e,
6717
6723
  onTransitionClick: t,
@@ -6719,15 +6725,15 @@ const ba = {
6719
6725
  animationDelay: a = 1e3,
6720
6726
  showTooltips: o = !0,
6721
6727
  showMinimap: s = !0,
6722
- statusColors: n = ba,
6723
- typeShapes: c = va,
6728
+ statusColors: n = va,
6729
+ typeShapes: c = wa,
6724
6730
  direction: u = "horizontal",
6725
6731
  className: d,
6726
6732
  style: m
6727
6733
  }) => {
6728
6734
  const [p, g] = K(0), h = ae(() => {
6729
6735
  const S = r.steps.map((_, x) => {
6730
- const P = _.id === r.currentStepId, L = _.status || "pending", O = n[L], W = c[_.type], F = u === "horizontal" ? x * 200 : 100, M = u === "horizontal" ? 100 : x * 150;
6736
+ const P = _.id === r.currentStepId, L = _.status || "pending", R = n[L], W = c[_.type], F = u === "horizontal" ? x * 200 : 100, M = u === "horizontal" ? 100 : x * 150;
6731
6737
  return {
6732
6738
  id: _.id,
6733
6739
  label: _.name,
@@ -6737,8 +6743,8 @@ const ba = {
6737
6743
  height: 60,
6738
6744
  shape: W,
6739
6745
  style: {
6740
- fill: O,
6741
- stroke: P ? "var(--nice-text, #1f2937)" : O,
6746
+ fill: R,
6747
+ stroke: P ? "var(--nice-text, #1f2937)" : R,
6742
6748
  strokeWidth: P ? 3 : 1,
6743
6749
  // The node is filled with its status colour, so its label is on-colour ink.
6744
6750
  fontColor: "var(--nice-text-on-primary, #fff)",
@@ -6749,7 +6755,7 @@ const ba = {
6749
6755
  status: _.status,
6750
6756
  assignee: _.assignee,
6751
6757
  dueDate: _.dueDate,
6752
- icon: wa[_.type],
6758
+ icon: xa[_.type],
6753
6759
  ..._.metadata
6754
6760
  },
6755
6761
  ports: [
@@ -6758,7 +6764,7 @@ const ba = {
6758
6764
  ]
6759
6765
  };
6760
6766
  }), C = r.transitions.map((_) => {
6761
- const x = r.steps.find((O) => O.id === _.from), P = r.steps.find((O) => O.id === _.to);
6767
+ const x = r.steps.find((R) => R.id === _.from), P = r.steps.find((R) => R.id === _.to);
6762
6768
  let L = "var(--nice-text-muted, #9ca3af)";
6763
6769
  return (x == null ? void 0 : x.status) === "completed" && (P == null ? void 0 : P.status) !== "pending" ? L = "var(--nice-success, #10b981)" : (x == null ? void 0 : x.status) === "failed" && (L = "var(--nice-danger, #ef4444)"), {
6764
6770
  id: _.id,
@@ -6777,8 +6783,8 @@ const ba = {
6777
6783
  condition: _.condition
6778
6784
  }
6779
6785
  };
6780
- }), z = i ? xa(r.steps) : [];
6781
- return Fe({
6786
+ }), z = i ? ka(r.steps) : [];
6787
+ return Ee({
6782
6788
  id: r.id,
6783
6789
  title: r.name,
6784
6790
  diagramType: "flowchart",
@@ -6791,7 +6797,7 @@ const ba = {
6791
6797
  }
6792
6798
  });
6793
6799
  }, [r, n, c, u, i]);
6794
- Be(() => {
6800
+ Ye(() => {
6795
6801
  if (!i)
6796
6802
  return;
6797
6803
  const S = r.steps.filter((z) => z.status === "completed").length;
@@ -6843,7 +6849,7 @@ const ba = {
6843
6849
  }
6844
6850
  );
6845
6851
  };
6846
- function xa(r) {
6852
+ function ka(r) {
6847
6853
  return r.filter((t) => t.status === "completed").map((t, i) => ({
6848
6854
  id: `anim-${t.id}`,
6849
6855
  targetId: t.id,
@@ -6853,7 +6859,7 @@ function xa(r) {
6853
6859
  easing: "ease-out"
6854
6860
  }));
6855
6861
  }
6856
- function To(r) {
6862
+ function Ro(r) {
6857
6863
  var o, s;
6858
6864
  const t = new DOMParser().parseFromString(r, "text/xml"), i = [], a = [];
6859
6865
  return t.querySelectorAll("startEvent").forEach((n) => {
@@ -6895,7 +6901,7 @@ function To(r) {
6895
6901
  transitions: a
6896
6902
  };
6897
6903
  }
6898
- function Ro(r, e) {
6904
+ function Eo(r, e) {
6899
6905
  const t = [], i = [];
6900
6906
  t.push({
6901
6907
  id: "start",
@@ -6936,18 +6942,18 @@ function Ro(r, e) {
6936
6942
  transitions: i
6937
6943
  };
6938
6944
  }
6939
- const ka = {
6945
+ const _a = {
6940
6946
  dbo: "var(--nice-primary, #3b82f6)",
6941
6947
  public: "var(--nice-success, #10b981)",
6942
6948
  auth: "var(--nice-accent, #8b5cf6)",
6943
6949
  billing: "var(--nice-warning, #f59e0b)",
6944
6950
  audit: "var(--nice-danger, #ef4444)"
6945
- }, _a = {
6951
+ }, Ma = {
6946
6952
  "one-to-one": { left: "1", right: "1" },
6947
6953
  "one-to-many": { left: "1", right: "*" },
6948
6954
  "many-to-one": { left: "*", right: "1" },
6949
6955
  "many-to-many": { left: "*", right: "*" }
6950
- }, Oo = ({
6956
+ }, Lo = ({
6951
6957
  schema: r,
6952
6958
  onTableClick: e,
6953
6959
  onColumnClick: t,
@@ -6956,17 +6962,17 @@ const ka = {
6956
6962
  showOnlyKeys: o = !1,
6957
6963
  highlightTables: s = [],
6958
6964
  showMinimap: n = !0,
6959
- schemaColors: c = ka,
6965
+ schemaColors: c = _a,
6960
6966
  layout: u = "auto",
6961
6967
  maxColumnsDisplay: d = 15,
6962
6968
  className: m,
6963
6969
  style: p
6964
6970
  }) => {
6965
6971
  const [g, h] = K(null), b = ae(() => {
6966
- const C = Ma(r.tables, u), z = r.tables.map((x, P) => {
6967
- const L = C[x.name] || { x: P % 4 * 300, y: Math.floor(P / 4) * 400 }, O = s.includes(x.name), W = g === x.name, F = c[x.schema || "dbo"] || "var(--nice-text-secondary, #6b7280)";
6972
+ const C = Ca(r.tables, u), z = r.tables.map((x, P) => {
6973
+ const L = C[x.name] || { x: P % 4 * 300, y: Math.floor(P / 4) * 400 }, R = s.includes(x.name), W = g === x.name, F = c[x.schema || "dbo"] || "var(--nice-text-secondary, #6b7280)";
6968
6974
  let M = x.columns;
6969
- o && (M = M.filter((R) => R.primaryKey || R.foreignKey)), M.length > d && (M = M.slice(0, d));
6975
+ o && (M = M.filter((O) => O.primaryKey || O.foreignKey)), M.length > d && (M = M.slice(0, d));
6970
6976
  const E = 40, T = a ? 28 : 20, V = E + M.length * T + 10;
6971
6977
  return {
6972
6978
  id: x.name,
@@ -6977,19 +6983,19 @@ const ka = {
6977
6983
  height: V,
6978
6984
  shape: "rectangle",
6979
6985
  style: {
6980
- fill: O || W ? F : "var(--nice-bg, #fff)",
6986
+ fill: R || W ? F : "var(--nice-bg, #fff)",
6981
6987
  stroke: F,
6982
- strokeWidth: W ? 3 : O ? 2 : 1,
6983
- fontColor: O || W ? "var(--nice-text-primary, #fff)" : "var(--nice-text, #1f2937)",
6988
+ strokeWidth: W ? 3 : R ? 2 : 1,
6989
+ fontColor: R || W ? "var(--nice-text-primary, #fff)" : "var(--nice-text, #1f2937)",
6984
6990
  fontSize: 14,
6985
6991
  borderRadius: 8
6986
6992
  },
6987
6993
  data: {
6988
6994
  type: "table",
6989
6995
  schema: x.schema,
6990
- columns: M.map((R) => ({
6991
- ...R,
6992
- icon: Ca(R)
6996
+ columns: M.map((O) => ({
6997
+ ...O,
6998
+ icon: Sa(O)
6993
6999
  })),
6994
7000
  totalColumns: x.columns.length,
6995
7001
  truncated: x.columns.length > d,
@@ -6997,18 +7003,18 @@ const ka = {
6997
7003
  ...x.metadata
6998
7004
  },
6999
7005
  ports: [
7000
- ...x.columns.filter((R) => R.primaryKey).map((R) => ({
7001
- id: `${x.name}.${R.name}-pk`,
7006
+ ...x.columns.filter((O) => O.primaryKey).map((O) => ({
7007
+ id: `${x.name}.${O.name}-pk`,
7002
7008
  position: "left"
7003
7009
  })),
7004
- ...x.columns.filter((R) => R.foreignKey).map((R) => ({
7005
- id: `${x.name}.${R.name}-fk`,
7010
+ ...x.columns.filter((O) => O.foreignKey).map((O) => ({
7011
+ id: `${x.name}.${O.name}-fk`,
7006
7012
  position: "right"
7007
7013
  }))
7008
7014
  ]
7009
7015
  };
7010
7016
  }), _ = r.relations.map((x) => {
7011
- const P = _a[x.type];
7017
+ const P = Ma[x.type];
7012
7018
  return {
7013
7019
  id: x.id,
7014
7020
  source: x.fromTable,
@@ -7019,8 +7025,8 @@ const ka = {
7019
7025
  style: {
7020
7026
  stroke: "var(--nice-text-secondary, #6b7280)",
7021
7027
  strokeWidth: 1.5,
7022
- arrowHead: Sa(x.type),
7023
- arrowTail: za(x.type),
7028
+ arrowHead: za(x.type),
7029
+ arrowTail: Na(x.type),
7024
7030
  lineType: "orthogonal",
7025
7031
  strokeDasharray: x.type === "many-to-many" ? "5,5" : void 0
7026
7032
  },
@@ -7031,7 +7037,7 @@ const ka = {
7031
7037
  }
7032
7038
  };
7033
7039
  });
7034
- return Fe({
7040
+ return Ee({
7035
7041
  id: `schema-${r.name}`,
7036
7042
  title: r.name,
7037
7043
  diagramType: "er",
@@ -7104,7 +7110,7 @@ const ka = {
7104
7110
  }
7105
7111
  );
7106
7112
  };
7107
- function Ma(r, e) {
7113
+ function Ca(r, e) {
7108
7114
  const t = {};
7109
7115
  if (e === "grid") {
7110
7116
  const i = Math.ceil(Math.sqrt(r.length));
@@ -7139,10 +7145,10 @@ function Ma(r, e) {
7139
7145
  });
7140
7146
  return t;
7141
7147
  }
7142
- function Ca(r) {
7148
+ function Sa(r) {
7143
7149
  return r.primaryKey ? "lock" : r.foreignKey ? "link" : r.unique ? "zap" : "file";
7144
7150
  }
7145
- function Sa(r) {
7151
+ function za(r) {
7146
7152
  switch (r) {
7147
7153
  case "one-to-one":
7148
7154
  case "many-to-one":
@@ -7152,7 +7158,7 @@ function Sa(r) {
7152
7158
  return "crow";
7153
7159
  }
7154
7160
  }
7155
- function za(r) {
7161
+ function Na(r) {
7156
7162
  switch (r) {
7157
7163
  case "one-to-one":
7158
7164
  case "one-to-many":
@@ -7162,7 +7168,7 @@ function za(r) {
7162
7168
  return "crow";
7163
7169
  }
7164
7170
  }
7165
- function Eo(r) {
7171
+ function Wo(r) {
7166
7172
  const e = [], t = [], i = /CREATE\s+TABLE\s+(?:`?(\w+)`?\.)?`?(\w+)`?\s*\(([\s\S]*?)\);/gi;
7167
7173
  let a;
7168
7174
  for (; (a = i.exec(r)) !== null; ) {
@@ -7207,7 +7213,7 @@ function Eo(r) {
7207
7213
  relations: t
7208
7214
  };
7209
7215
  }
7210
- function Lo(r, e = "postgres") {
7216
+ function Fo(r, e = "postgres") {
7211
7217
  const t = [];
7212
7218
  for (const i of r.tables) {
7213
7219
  const a = i.schema ? `${i.schema}.${i.name}` : i.name;
@@ -7225,7 +7231,7 @@ function Lo(r, e = "postgres") {
7225
7231
  return t.join(`
7226
7232
  `);
7227
7233
  }
7228
- const Na = {
7234
+ const Ia = {
7229
7235
  active: "var(--nice-success, #10b981)",
7230
7236
  away: "var(--nice-warning, #f59e0b)",
7231
7237
  busy: "var(--nice-danger, #ef4444)",
@@ -7241,8 +7247,8 @@ const Na = {
7241
7247
  "var(--nice-color-accent-pink, #ec4899)",
7242
7248
  "var(--nice-info, #14b8a6)",
7243
7249
  "var(--nice-info, #6366f1)"
7244
- ], Wo = ({
7245
- data: r,
7250
+ ], Aa = { employees: [] }, qo = ({
7251
+ data: r = Aa,
7246
7252
  rootEmployeeId: e,
7247
7253
  onEmployeeClick: t,
7248
7254
  onDepartmentClick: i,
@@ -7253,7 +7259,7 @@ const Na = {
7253
7259
  maxLevels: c = 0,
7254
7260
  orientation: u = "vertical",
7255
7261
  spacing: d = { horizontal: 200, vertical: 150 },
7256
- statusColors: m = Na,
7262
+ statusColors: m = Ia,
7257
7263
  showMinimap: p = !0,
7258
7264
  className: g,
7259
7265
  style: h
@@ -7262,18 +7268,18 @@ const Na = {
7262
7268
  var W;
7263
7269
  if (e)
7264
7270
  return e;
7265
- const O = r.employees.find((F) => !F.managerId);
7266
- return (O == null ? void 0 : O.id) || ((W = r.employees[0]) == null ? void 0 : W.id);
7267
- }, [r.employees, e]), z = ae(() => Ia(r.employees, C), [r.employees, C]), _ = ae(() => {
7268
- const O = Aa(z, u, d, c), W = [], F = {};
7269
- s && r.departments && r.departments.forEach((V, R) => {
7270
- const $ = V.color || nt[R % nt.length];
7271
+ const R = r.employees.find((F) => !F.managerId);
7272
+ return (R == null ? void 0 : R.id) || ((W = r.employees[0]) == null ? void 0 : W.id);
7273
+ }, [r.employees, e]), z = ae(() => $a(r.employees, C), [r.employees, C]), _ = ae(() => {
7274
+ const R = Da(z, u, d, c), W = [], F = {};
7275
+ s && r.departments && r.departments.forEach((V, O) => {
7276
+ const $ = V.color || nt[O % nt.length];
7271
7277
  F[V.id] = $;
7272
- const H = r.employees.filter((Y) => Y.department === V.id);
7278
+ const H = r.employees.filter((B) => B.department === V.id);
7273
7279
  H.length !== 0 && W.push({
7274
7280
  id: `dept-${V.id}`,
7275
7281
  label: V.name,
7276
- nodeIds: H.map((Y) => Y.id),
7282
+ nodeIds: H.map((B) => B.id),
7277
7283
  style: {
7278
7284
  fill: `${$}15`,
7279
7285
  stroke: $,
@@ -7284,10 +7290,10 @@ const Na = {
7284
7290
  }
7285
7291
  });
7286
7292
  });
7287
- const M = [], E = [], T = (V, R = 0) => {
7288
- if (c > 0 && R >= c || V.employee.department && n.includes(V.employee.department))
7293
+ const M = [], E = [], T = (V, O = 0) => {
7294
+ if (c > 0 && O >= c || V.employee.department && n.includes(V.employee.department))
7289
7295
  return;
7290
- const $ = O[V.employee.id] || { x: 0, y: 0 }, H = y === V.employee.id, Y = V.employee.status || "active", j = V.employee.department ? F[V.employee.department] : "var(--nice-text-secondary, #6b7280)", Z = 180, ue = o ? 120 : a ? 90 : 70;
7296
+ const $ = R[V.employee.id] || { x: 0, y: 0 }, H = y === V.employee.id, B = V.employee.status || "active", j = V.employee.department ? F[V.employee.department] : "var(--nice-text-secondary, #6b7280)", Z = 180, ue = o ? 120 : a ? 90 : 70;
7291
7297
  M.push({
7292
7298
  id: V.employee.id,
7293
7299
  label: V.employee.name,
@@ -7308,7 +7314,7 @@ const Na = {
7308
7314
  data: {
7309
7315
  type: "employee",
7310
7316
  employee: V.employee,
7311
- statusColor: m[Y],
7317
+ statusColor: m[B],
7312
7318
  hasChildren: V.children.length > 0,
7313
7319
  childrenCount: V.children.length
7314
7320
  }
@@ -7322,9 +7328,9 @@ const Na = {
7322
7328
  arrowHead: "none",
7323
7329
  lineType: u === "vertical" ? "orthogonal" : "curved"
7324
7330
  }
7325
- }), V.children.forEach((pe) => T(pe, R + 1));
7331
+ }), V.children.forEach((pe) => T(pe, O + 1));
7326
7332
  };
7327
- return z && T(z), Fe({
7333
+ return z && T(z), Ee({
7328
7334
  id: "org-chart",
7329
7335
  title: "Organization Chart",
7330
7336
  diagramType: "orgchart",
@@ -7350,29 +7356,29 @@ const Na = {
7350
7356
  y
7351
7357
  ]);
7352
7358
  G(
7353
- (O) => {
7354
- if (S((W) => W === O ? null : O), w((W) => {
7359
+ (R) => {
7360
+ if (S((W) => W === R ? null : R), w((W) => {
7355
7361
  const F = new Set(W);
7356
- return F.has(O) ? F.delete(O) : F.add(O), F;
7362
+ return F.has(R) ? F.delete(R) : F.add(R), F;
7357
7363
  }), t) {
7358
- const W = r.employees.find((F) => F.id === O);
7364
+ const W = r.employees.find((F) => F.id === R);
7359
7365
  W && t(W);
7360
7366
  }
7361
7367
  },
7362
7368
  [r.employees, t]
7363
7369
  ), G(
7364
- (O) => {
7370
+ (R) => {
7365
7371
  if (!i || !r.departments)
7366
7372
  return;
7367
- const W = O.replace("dept-", ""), F = r.departments.find((M) => M.id === W);
7373
+ const W = R.replace("dept-", ""), F = r.departments.find((M) => M.id === W);
7368
7374
  F && i(F);
7369
7375
  },
7370
7376
  [r.departments, i]
7371
7377
  );
7372
7378
  const [x, P] = K({ x: 0, y: 0, zoom: 1 }), L = G(
7373
- (O) => {
7374
- if (O && (S((W) => W === O ? null : O), t)) {
7375
- const W = r.employees.find((F) => F.id === O);
7379
+ (R) => {
7380
+ if (R && (S((W) => W === R ? null : R), t)) {
7381
+ const W = r.employees.find((F) => F.id === R);
7376
7382
  W && t(W);
7377
7383
  }
7378
7384
  },
@@ -7398,7 +7404,7 @@ const Na = {
7398
7404
  }
7399
7405
  );
7400
7406
  };
7401
- function Ia(r, e) {
7407
+ function $a(r, e) {
7402
7408
  const i = new Map(r.map((o) => [o.id, o])).get(e);
7403
7409
  if (!i)
7404
7410
  return null;
@@ -7412,7 +7418,7 @@ function Ia(r, e) {
7412
7418
  };
7413
7419
  return a(i, 0);
7414
7420
  }
7415
- function Aa(r, e, t, i) {
7421
+ function Da(r, e, t, i) {
7416
7422
  const a = {};
7417
7423
  if (!r)
7418
7424
  return a;
@@ -7429,7 +7435,7 @@ function Aa(r, e, t, i) {
7429
7435
  }, n = o(r, 0);
7430
7436
  return s(r, 0, 0, n), a;
7431
7437
  }
7432
- function Fo(r) {
7438
+ function Go(r) {
7433
7439
  const t = [...new Set(r.map((i) => i.department).filter(Boolean))].map((i, a) => ({
7434
7440
  id: i,
7435
7441
  name: i,
@@ -7441,7 +7447,7 @@ function Fo(r) {
7441
7447
  departments: t
7442
7448
  };
7443
7449
  }
7444
- function qo(r) {
7450
+ function Vo(r) {
7445
7451
  var n;
7446
7452
  const e = new Set(r.employees.map((c) => c.managerId).filter(Boolean)), t = (c, u = /* @__PURE__ */ new Set()) => {
7447
7453
  if (u.has(c))
@@ -7460,7 +7466,7 @@ function qo(r) {
7460
7466
  managers: e.size
7461
7467
  };
7462
7468
  }
7463
- const Go = ({
7469
+ const Yo = ({
7464
7470
  data: r,
7465
7471
  onActivityClick: e,
7466
7472
  onTransitionClick: t,
@@ -7477,22 +7483,22 @@ const Go = ({
7477
7483
  className: g,
7478
7484
  style: h
7479
7485
  }) => {
7480
- const [b, w] = K(null), y = ae(() => "activities" in r ? r : Oa(r), [r]), S = ae(() => {
7486
+ const [b, w] = K(null), y = ae(() => "activities" in r ? r : La(r), [r]), S = ae(() => {
7481
7487
  if (!s)
7482
7488
  return /* @__PURE__ */ new Set();
7483
7489
  const L = y.activities.filter((W) => W.avgDuration !== void 0).map((W) => W.avgDuration);
7484
7490
  if (L.length === 0)
7485
7491
  return /* @__PURE__ */ new Set();
7486
7492
  L.sort((W, F) => W - F);
7487
- const O = L[Math.floor(L.length * n)] || 0;
7493
+ const R = L[Math.floor(L.length * n)] || 0;
7488
7494
  return new Set(
7489
- y.activities.filter((W) => (W.avgDuration || 0) >= O).map((W) => W.name)
7495
+ y.activities.filter((W) => (W.avgDuration || 0) >= R).map((W) => W.name)
7490
7496
  );
7491
7497
  }, [y.activities, s, n]), C = ae(() => {
7492
- const L = Math.max(...y.activities.map((T) => T.frequency), 1), O = $a(y, d), W = y.transitions.filter(
7498
+ const L = Math.max(...y.activities.map((T) => T.frequency), 1), R = Pa(y, d), W = y.transitions.filter(
7493
7499
  (T) => T.frequency / y.totalCases >= i
7494
7500
  ), F = y.activities.map((T) => {
7495
- const V = O[T.name] || { x: 0, y: 0 }, R = y.startActivities.includes(T.name), $ = y.endActivities.includes(T.name), H = S.has(T.name), Y = b === T.name, j = Pa(
7501
+ const V = R[T.name] || { x: 0, y: 0 }, O = y.startActivities.includes(T.name), $ = y.endActivities.includes(T.name), H = S.has(T.name), B = b === T.name, j = Oa(
7496
7502
  T,
7497
7503
  c,
7498
7504
  L,
@@ -7506,47 +7512,47 @@ const Go = ({
7506
7512
  y: V.y,
7507
7513
  width: 140,
7508
7514
  height: 60,
7509
- shape: R ? "ellipse" : $ ? "roundedRect" : "rectangle",
7515
+ shape: O ? "ellipse" : $ ? "roundedRect" : "rectangle",
7510
7516
  style: {
7511
- fill: Y ? j : "var(--nice-bg, #fff)",
7517
+ fill: B ? j : "var(--nice-bg, #fff)",
7512
7518
  stroke: j,
7513
- strokeWidth: H ? 4 : Y ? 3 : 2,
7519
+ strokeWidth: H ? 4 : B ? 3 : 2,
7514
7520
  // Selected: filled with the activity colour, so on-colour ink.
7515
- fontColor: Y ? "var(--nice-text-on-primary, #fff)" : "var(--nice-text, #1f2937)",
7521
+ fontColor: B ? "var(--nice-text-on-primary, #fff)" : "var(--nice-text, #1f2937)",
7516
7522
  fontSize: 12,
7517
7523
  borderRadius: $ ? 20 : 8
7518
7524
  },
7519
7525
  data: {
7520
7526
  type: "activity",
7521
7527
  activity: T,
7522
- isStart: R,
7528
+ isStart: O,
7523
7529
  isEnd: $,
7524
7530
  isBottleneck: H,
7525
7531
  frequencyPercent: Math.round(T.frequency / y.totalCases * 100)
7526
7532
  }
7527
7533
  };
7528
7534
  }), M = W.map((T) => {
7529
- const V = y.transitions.indexOf(T), R = T.probability || T.frequency / y.totalCases, $ = R > 0.5, H = [];
7530
- return a && H.push(`${T.frequency}x`), o && T.avgDuration && H.push(Ta(T.avgDuration)), {
7535
+ const V = y.transitions.indexOf(T), O = T.probability || T.frequency / y.totalCases, $ = O > 0.5, H = [];
7536
+ return a && H.push(`${T.frequency}x`), o && T.avgDuration && H.push(Ra(T.avgDuration)), {
7531
7537
  id: `trans-${V}`,
7532
7538
  source: T.from,
7533
7539
  target: T.to,
7534
7540
  label: H.join(" | "),
7535
7541
  style: {
7536
7542
  stroke: $ ? "var(--nice-primary, #3b82f6)" : "var(--nice-text-muted, #9ca3af)",
7537
- strokeWidth: Math.max(1, Math.min(6, R * 8)),
7543
+ strokeWidth: Math.max(1, Math.min(6, O * 8)),
7538
7544
  arrowHead: "triangle",
7539
7545
  lineType: "curved",
7540
- opacity: Math.max(0.3, R)
7546
+ opacity: Math.max(0.3, O)
7541
7547
  },
7542
7548
  data: {
7543
7549
  type: "transition",
7544
7550
  transition: T,
7545
- probability: R
7551
+ probability: O
7546
7552
  }
7547
7553
  };
7548
- }), E = m > 0 ? Ra(y, m) : [];
7549
- return Fe({
7554
+ }), E = m > 0 ? Ea(y, m) : [];
7555
+ return Ee({
7550
7556
  id: "process-mining",
7551
7557
  title: "Process Mining Diagram",
7552
7558
  diagramType: "flowchart",
@@ -7574,9 +7580,9 @@ const Go = ({
7574
7580
  ]);
7575
7581
  G(
7576
7582
  (L) => {
7577
- if (w((O) => O === L ? null : L), e) {
7578
- const O = y.activities.find((W) => W.name === L);
7579
- O && e(O);
7583
+ if (w((R) => R === L ? null : L), e) {
7584
+ const R = y.activities.find((W) => W.name === L);
7585
+ R && e(R);
7580
7586
  }
7581
7587
  },
7582
7588
  [y.activities, e]
@@ -7585,7 +7591,7 @@ const Go = ({
7585
7591
  (L) => {
7586
7592
  if (!t)
7587
7593
  return;
7588
- const O = parseInt(L.replace("trans-", ""), 10), W = y.transitions[O];
7594
+ const R = parseInt(L.replace("trans-", ""), 10), W = y.transitions[R];
7589
7595
  W && t(W);
7590
7596
  },
7591
7597
  [y.transitions, t]
@@ -7596,9 +7602,9 @@ const Go = ({
7596
7602
  z(L);
7597
7603
  return;
7598
7604
  }
7599
- if (w((O) => O === L ? null : L), e) {
7600
- const O = y.activities.find((W) => W.name === L);
7601
- O && e(O);
7605
+ if (w((R) => R === L ? null : L), e) {
7606
+ const R = y.activities.find((W) => W.name === L);
7607
+ R && e(R);
7602
7608
  }
7603
7609
  }
7604
7610
  },
@@ -7624,7 +7630,7 @@ const Go = ({
7624
7630
  }
7625
7631
  );
7626
7632
  };
7627
- function $a(r, e) {
7633
+ function Pa(r, e) {
7628
7634
  const t = {};
7629
7635
  if (e === "circular") {
7630
7636
  const i = r.activities;
@@ -7636,7 +7642,7 @@ function $a(r, e) {
7636
7642
  };
7637
7643
  });
7638
7644
  } else {
7639
- const i = Da(r), a = {};
7645
+ const i = Ta(r), a = {};
7640
7646
  r.activities.forEach((s) => {
7641
7647
  const n = i[s.name] || 0;
7642
7648
  a[n] = (a[n] || 0) + 1;
@@ -7654,7 +7660,7 @@ function $a(r, e) {
7654
7660
  }
7655
7661
  return t;
7656
7662
  }
7657
- function Da(r) {
7663
+ function Ta(r) {
7658
7664
  const e = {}, t = /* @__PURE__ */ new Set(), i = r.startActivities.map((a) => ({
7659
7665
  activity: a,
7660
7666
  level: 0
@@ -7671,7 +7677,7 @@ function Da(r) {
7671
7677
  e[a.name] === void 0 && (e[a.name] = 0);
7672
7678
  }), e;
7673
7679
  }
7674
- function Pa(r, e, t, i, a) {
7680
+ function Oa(r, e, t, i, a) {
7675
7681
  if (a)
7676
7682
  return "var(--nice-danger, #ef4444)";
7677
7683
  if (i != null && i[r.name])
@@ -7703,10 +7709,10 @@ function yt(r, e, t) {
7703
7709
  }, a = i(r), o = i(e), s = Math.round(a.r + (o.r - a.r) * t), n = Math.round(a.g + (o.g - a.g) * t), c = Math.round(a.b + (o.b - a.b) * t);
7704
7710
  return `#${[s, n, c].map((u) => u.toString(16).padStart(2, "0")).join("")}`;
7705
7711
  }
7706
- function Ta(r) {
7712
+ function Ra(r) {
7707
7713
  return r < 1e3 ? `${r}ms` : r < 6e4 ? `${(r / 1e3).toFixed(1)}s` : r < 36e5 ? `${(r / 6e4).toFixed(1)}m` : r < 864e5 ? `${(r / 36e5).toFixed(1)}h` : `${(r / 864e5).toFixed(1)}d`;
7708
7714
  }
7709
- function Ra(r, e) {
7715
+ function Ea(r, e) {
7710
7716
  var i;
7711
7717
  const t = (i = r.variants) == null ? void 0 : i[0];
7712
7718
  return t ? t.activities.map((a, o) => ({
@@ -7717,7 +7723,7 @@ function Ra(r, e) {
7717
7723
  delay: o * e
7718
7724
  })) : [];
7719
7725
  }
7720
- function Oa(r) {
7726
+ function La(r) {
7721
7727
  const e = r.events.map((g) => ({
7722
7728
  ...g,
7723
7729
  timestamp: g.timestamp instanceof Date ? g.timestamp : new Date(g.timestamp)
@@ -7822,7 +7828,7 @@ const Jt = {
7822
7828
  database: { color: "var(--nice-info, #14b8a6)" },
7823
7829
  event: { color: "var(--nice-color-accent-pink, #ec4899)", dash: "2,2" },
7824
7830
  circular: { color: "var(--nice-danger, #ef4444)" }
7825
- }, Ea = {
7831
+ }, Wa = {
7826
7832
  module: "box",
7827
7833
  package: "folder",
7828
7834
  microservice: "square",
@@ -7831,7 +7837,7 @@ const Jt = {
7831
7837
  database: "database",
7832
7838
  external: "globe",
7833
7839
  deprecated: "warning"
7834
- }, Vo = ({
7840
+ }, Bo = ({
7835
7841
  data: r,
7836
7842
  onNodeClick: e,
7837
7843
  onEdgeClick: t,
@@ -7863,21 +7869,21 @@ const Jt = {
7863
7869
  let E = r.edges.filter((T) => M.has(T.source) && M.has(T.target));
7864
7870
  return a && a.length > 0 && (E = E.filter((T) => a.includes(T.type))), E;
7865
7871
  }, [r.edges, x, a]), L = ae(() => {
7866
- const M = La(x, P, n), E = Fa(x, u), T = [];
7872
+ const M = Fa(x, P, n), E = Ga(x, u), T = [];
7867
7873
  if (c !== "none") {
7868
7874
  const $ = /* @__PURE__ */ new Map();
7869
- x.forEach((Y) => {
7870
- const j = c === "type" ? Y.type : Y.group || "ungrouped";
7871
- $.has(j) || $.set(j, []), $.get(j).push(Y.id);
7875
+ x.forEach((B) => {
7876
+ const j = c === "type" ? B.type : B.group || "ungrouped";
7877
+ $.has(j) || $.set(j, []), $.get(j).push(B.id);
7872
7878
  });
7873
7879
  let H = 0;
7874
- $.forEach((Y, j) => {
7880
+ $.forEach((B, j) => {
7875
7881
  var ue, pe;
7876
7882
  const Z = c === "type" ? Jt[j] || "var(--nice-text-secondary, #6b7280)" : ((pe = (ue = r.groups) == null ? void 0 : ue.find((X) => X.id === j)) == null ? void 0 : pe.color) || st[H % st.length];
7877
7883
  T.push({
7878
7884
  id: `group-${j}`,
7879
7885
  label: j,
7880
- nodeIds: Y,
7886
+ nodeIds: B,
7881
7887
  style: {
7882
7888
  fill: `${Z}10`,
7883
7889
  stroke: Z,
@@ -7887,7 +7893,7 @@ const Jt = {
7887
7893
  });
7888
7894
  }
7889
7895
  const V = x.map(($) => {
7890
- const H = M[$.id] || { x: 0, y: 0 }, Y = y === $.id, j = C === $.id, Z = _.has($.id), ue = qa($, u, E), pe = Ga($, d, m, Z);
7896
+ const H = M[$.id] || { x: 0, y: 0 }, B = y === $.id, j = C === $.id, Z = _.has($.id), ue = Va($, u, E), pe = Ya($, d, m, Z);
7891
7897
  return {
7892
7898
  id: $.id,
7893
7899
  label: $.name,
@@ -7895,12 +7901,12 @@ const Jt = {
7895
7901
  y: H.y,
7896
7902
  width: ue.width,
7897
7903
  height: ue.height,
7898
- shape: Va($.type),
7904
+ shape: Ba($.type),
7899
7905
  style: {
7900
- fill: Y || j ? pe : "var(--nice-bg, #fff)",
7906
+ fill: B || j ? pe : "var(--nice-bg, #fff)",
7901
7907
  stroke: pe,
7902
- strokeWidth: Z ? 4 : Y ? 3 : 2,
7903
- fontColor: Y || j ? "var(--nice-text-primary, #fff)" : "var(--nice-text, #1f2937)",
7908
+ strokeWidth: Z ? 4 : B ? 3 : 2,
7909
+ fontColor: B || j ? "var(--nice-text-primary, #fff)" : "var(--nice-text, #1f2937)",
7904
7910
  fontSize: 11,
7905
7911
  borderRadius: 8,
7906
7912
  strokeDasharray: $.status === "deprecated" ? "4,4" : void 0
@@ -7908,20 +7914,20 @@ const Jt = {
7908
7914
  data: {
7909
7915
  type: "dependency",
7910
7916
  node: $,
7911
- icon: Ea[$.type],
7917
+ icon: Wa[$.type],
7912
7918
  isCircular: Z,
7913
7919
  statusColor: Zt[$.status || "unknown"]
7914
7920
  }
7915
7921
  };
7916
- }), R = P.map(($, H) => {
7917
- const Y = $.type === "circular" || _.has($.source) && _.has($.target), j = Dt[$.type] || Dt.import;
7922
+ }), O = P.map(($, H) => {
7923
+ const B = $.type === "circular" || _.has($.source) && _.has($.target), j = Dt[$.type] || Dt.import;
7918
7924
  return {
7919
7925
  id: $.id || `edge-${H}`,
7920
7926
  source: $.source,
7921
7927
  target: $.target,
7922
7928
  label: $.optional ? "(optional)" : void 0,
7923
7929
  style: {
7924
- stroke: Y ? "var(--nice-danger, #ef4444)" : j.color,
7930
+ stroke: B ? "var(--nice-danger, #ef4444)" : j.color,
7925
7931
  strokeWidth: Math.max(1, Math.min(4, $.weight || 1)),
7926
7932
  strokeDasharray: j.dash,
7927
7933
  arrowHead: "triangle",
@@ -7931,16 +7937,16 @@ const Jt = {
7931
7937
  data: {
7932
7938
  type: $.type,
7933
7939
  edge: $,
7934
- isCircular: Y
7940
+ isCircular: B
7935
7941
  }
7936
7942
  };
7937
7943
  });
7938
- return Fe({
7944
+ return Ee({
7939
7945
  id: "dependency-graph",
7940
7946
  title: "Dependency Graph",
7941
7947
  diagramType: "custom",
7942
7948
  nodes: V,
7943
- edges: R,
7949
+ edges: O,
7944
7950
  groups: T,
7945
7951
  metadata: {
7946
7952
  type: "dependency-graph",
@@ -7979,7 +7985,7 @@ const Jt = {
7979
7985
  ), G((M) => {
7980
7986
  z(M);
7981
7987
  }, []);
7982
- const [O, W] = K({ x: 0, y: 0, zoom: 1 }), F = G(
7988
+ const [R, W] = K({ x: 0, y: 0, zoom: 1 }), F = G(
7983
7989
  (M) => {
7984
7990
  if (M) {
7985
7991
  if (S((E) => E === M ? null : M), e) {
@@ -8005,7 +8011,7 @@ const Jt = {
8005
8011
  nodes: L.nodes,
8006
8012
  edges: L.edges,
8007
8013
  groups: L.groups,
8008
- viewport: O,
8014
+ viewport: R,
8009
8015
  onViewportChange: W,
8010
8016
  onSelectElement: F,
8011
8017
  interactive: g,
@@ -8047,7 +8053,7 @@ function Kt(r) {
8047
8053
  i.has(s.id) || o(s.id, []);
8048
8054
  }), e;
8049
8055
  }
8050
- function La(r, e, t) {
8056
+ function Fa(r, e, t) {
8051
8057
  const i = {};
8052
8058
  switch (t) {
8053
8059
  case "circular": {
@@ -8071,7 +8077,7 @@ function La(r, e, t) {
8071
8077
  break;
8072
8078
  }
8073
8079
  case "hierarchical": {
8074
- const a = Wa(r, e), o = {}, s = {};
8080
+ const a = qa(r, e), o = {}, s = {};
8075
8081
  r.forEach((n) => {
8076
8082
  const c = a[n.id] || 0;
8077
8083
  o[c] = (o[c] || 0) + 1;
@@ -8114,7 +8120,7 @@ function La(r, e, t) {
8114
8120
  }
8115
8121
  return i;
8116
8122
  }
8117
- function Wa(r, e) {
8123
+ function qa(r, e) {
8118
8124
  const t = {}, i = {};
8119
8125
  r.forEach((o) => {
8120
8126
  t[o.id] = 0, i[o.id] = 0;
@@ -8130,7 +8136,7 @@ function Wa(r, e) {
8130
8136
  }
8131
8137
  return t;
8132
8138
  }
8133
- function Fa(r, e) {
8139
+ function Ga(r, e) {
8134
8140
  const t = r.map((i) => {
8135
8141
  var a, o, s;
8136
8142
  switch (e) {
@@ -8151,7 +8157,7 @@ function Fa(r, e) {
8151
8157
  max: Math.max(...t, 1)
8152
8158
  };
8153
8159
  }
8154
- function qa(r, e, t) {
8160
+ function Va(r, e, t) {
8155
8161
  var c, u, d;
8156
8162
  if (e === "fixed")
8157
8163
  return { width: 140, height: 70 };
@@ -8175,7 +8181,7 @@ function qa(r, e, t) {
8175
8181
  const a = t.max > t.min ? (i - t.min) / (t.max - t.min) : 0.5, o = 100, n = o + a * (180 - o);
8176
8182
  return { width: n, height: n * 0.5 };
8177
8183
  }
8178
- function Ga(r, e, t, i) {
8184
+ function Ya(r, e, t, i) {
8179
8185
  if (i)
8180
8186
  return "var(--nice-danger, #ef4444)";
8181
8187
  if (t != null && t[r.id])
@@ -8184,12 +8190,12 @@ function Ga(r, e, t, i) {
8184
8190
  case "status":
8185
8191
  return Zt[r.status || "unknown"];
8186
8192
  case "group":
8187
- return st[Ba(r.group || "") % st.length];
8193
+ return st[Xa(r.group || "") % st.length];
8188
8194
  default:
8189
8195
  return Jt[r.type] || "var(--nice-text-secondary, #6b7280)";
8190
8196
  }
8191
8197
  }
8192
- function Va(r) {
8198
+ function Ba(r) {
8193
8199
  switch (r) {
8194
8200
  case "database":
8195
8201
  return "cylinder";
@@ -8203,13 +8209,13 @@ function Va(r) {
8203
8209
  return "rectangle";
8204
8210
  }
8205
8211
  }
8206
- function Ba(r) {
8212
+ function Xa(r) {
8207
8213
  let e = 0;
8208
8214
  for (let t = 0; t < r.length; t++)
8209
8215
  e = (e << 5) - e + r.charCodeAt(t), e |= 0;
8210
8216
  return Math.abs(e);
8211
8217
  }
8212
- function Bo(r) {
8218
+ function Xo(r) {
8213
8219
  const e = [
8214
8220
  {
8215
8221
  id: r.name,
@@ -8243,7 +8249,7 @@ function Bo(r) {
8243
8249
  };
8244
8250
  }), { nodes: e, edges: t };
8245
8251
  }
8246
- function Yo(r) {
8252
+ function Uo(r) {
8247
8253
  const e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map();
8248
8254
  r.nodes.forEach((d) => {
8249
8255
  e.set(d.id, 0), t.set(d.id, 0);
@@ -8274,14 +8280,14 @@ function Yo(r) {
8274
8280
  avgDependencies: Math.round(u * 10) / 10
8275
8281
  };
8276
8282
  }
8277
- const Ya = {
8283
+ const Ua = {
8278
8284
  online: "var(--nice-success, #10b981)",
8279
8285
  offline: "var(--nice-text-secondary, #6b7280)",
8280
8286
  warning: "var(--nice-warning, #f59e0b)",
8281
8287
  critical: "var(--nice-danger, #ef4444)",
8282
8288
  maintenance: "var(--nice-primary, #3b82f6)",
8283
8289
  unknown: "var(--nice-text-muted, #9ca3af)"
8284
- }, Xa = {
8290
+ }, Ha = {
8285
8291
  router: "shuffle",
8286
8292
  switch: "plug",
8287
8293
  firewall: "lock",
@@ -8297,14 +8303,14 @@ const Ya = {
8297
8303
  cloud: "cloud",
8298
8304
  internet: "globe",
8299
8305
  unknown: "help"
8300
- }, Ua = {
8306
+ }, ja = {
8301
8307
  ethernet: "var(--nice-primary, #3b82f6)",
8302
8308
  fiber: "var(--nice-success, #10b981)",
8303
8309
  wireless: "var(--nice-accent, #8b5cf6)",
8304
8310
  vpn: "var(--nice-warning, #f59e0b)",
8305
8311
  wan: "var(--nice-color-accent-pink, #ec4899)",
8306
8312
  trunk: "var(--nice-info, #14b8a6)"
8307
- }, Xo = ({
8313
+ }, Ho = ({
8308
8314
  data: r,
8309
8315
  onDeviceClick: e,
8310
8316
  onConnectionClick: t,
@@ -8318,13 +8324,13 @@ const Ya = {
8318
8324
  showBandwidth: d = !0,
8319
8325
  showLatency: m = !1,
8320
8326
  animateTraffic: p = !1,
8321
- statusColors: g = Ya,
8327
+ statusColors: g = Ua,
8322
8328
  showMinimap: h = !0,
8323
8329
  className: b,
8324
8330
  style: w
8325
8331
  }) => {
8326
8332
  const [y, S] = K(null), [C, z] = K(/* @__PURE__ */ new Date());
8327
- Be(() => {
8333
+ Ye(() => {
8328
8334
  if (a <= 0 || !i)
8329
8335
  return;
8330
8336
  const F = setInterval(() => {
@@ -8341,35 +8347,35 @@ const Ya = {
8341
8347
  const F = new Set(_.map((M) => M.id));
8342
8348
  return r.connections.filter((M) => F.has(M.source) && F.has(M.target));
8343
8349
  }, [r.connections, _]), P = ae(() => {
8344
- const F = Ha(
8350
+ const F = Ja(
8345
8351
  _,
8346
8352
  x,
8347
8353
  n,
8348
8354
  r.groups
8349
8355
  ), M = [];
8350
8356
  if (c !== "none") {
8351
- const R = /* @__PURE__ */ new Map();
8357
+ const O = /* @__PURE__ */ new Map();
8352
8358
  _.forEach((H) => {
8353
- let Y;
8359
+ let B;
8354
8360
  switch (c) {
8355
8361
  case "type":
8356
- Y = H.type;
8362
+ B = H.type;
8357
8363
  break;
8358
8364
  case "location":
8359
- Y = H.location || "Unknown Location";
8365
+ B = H.location || "Unknown Location";
8360
8366
  break;
8361
8367
  default:
8362
- Y = H.group || "ungrouped";
8368
+ B = H.group || "ungrouped";
8363
8369
  }
8364
- R.has(Y) || R.set(Y, []), R.get(Y).push(H.id);
8370
+ O.has(B) || O.set(B, []), O.get(B).push(H.id);
8365
8371
  });
8366
8372
  let $ = 0;
8367
- R.forEach((H, Y) => {
8373
+ O.forEach((H, B) => {
8368
8374
  var ue;
8369
- const j = (ue = r.groups) == null ? void 0 : ue.find((pe) => pe.id === Y || pe.name === Y), Z = (j == null ? void 0 : j.color) || Pt[$ % Pt.length];
8375
+ const j = (ue = r.groups) == null ? void 0 : ue.find((pe) => pe.id === B || pe.name === B), Z = (j == null ? void 0 : j.color) || Pt[$ % Pt.length];
8370
8376
  M.push({
8371
- id: `group-${Y}`,
8372
- label: (j == null ? void 0 : j.name) || Y,
8377
+ id: `group-${B}`,
8378
+ label: (j == null ? void 0 : j.name) || B,
8373
8379
  nodeIds: H,
8374
8380
  style: {
8375
8381
  fill: `${Z}15`,
@@ -8379,19 +8385,19 @@ const Ya = {
8379
8385
  }), $++;
8380
8386
  });
8381
8387
  }
8382
- const E = _.map((R) => {
8383
- const $ = F[R.id] || { x: 0, y: 0 }, H = y === R.id, Y = g[R.status], j = Xa[R.type];
8388
+ const E = _.map((O) => {
8389
+ const $ = F[O.id] || { x: 0, y: 0 }, H = y === O.id, B = g[O.status], j = Ha[O.type];
8384
8390
  return {
8385
- id: R.id,
8386
- label: R.name,
8391
+ id: O.id,
8392
+ label: O.name,
8387
8393
  x: $.x,
8388
8394
  y: $.y,
8389
8395
  width: 120,
8390
8396
  height: u ? 90 : 70,
8391
- shape: ja(R.type),
8397
+ shape: Za(O.type),
8392
8398
  style: {
8393
- fill: H ? Y : "var(--nice-bg, #fff)",
8394
- stroke: Y,
8399
+ fill: H ? B : "var(--nice-bg, #fff)",
8400
+ stroke: B,
8395
8401
  strokeWidth: H ? 3 : 2,
8396
8402
  // Selected: filled with the status colour, so on-colour ink.
8397
8403
  fontColor: H ? "var(--nice-text-on-primary, #fff)" : "var(--nice-text, #1f2937)",
@@ -8400,43 +8406,43 @@ const Ya = {
8400
8406
  },
8401
8407
  data: {
8402
8408
  type: "network-device",
8403
- device: R,
8409
+ device: O,
8404
8410
  icon: j,
8405
- statusColor: Y
8411
+ statusColor: B
8406
8412
  }
8407
8413
  };
8408
- }), T = x.map((R, $) => {
8409
- const H = Ua[R.type] || "var(--nice-text-secondary, #6b7280)", Y = R.status === "active", j = R.status === "degraded" || R.status === "error", Z = [];
8410
- if (d && R.bandwidth) {
8414
+ }), T = x.map((O, $) => {
8415
+ const H = ja[O.type] || "var(--nice-text-secondary, #6b7280)", B = O.status === "active", j = O.status === "degraded" || O.status === "error", Z = [];
8416
+ if (d && O.bandwidth) {
8411
8417
  const ue = Math.round(
8412
- R.bandwidth.used / R.bandwidth.total * 100
8418
+ O.bandwidth.used / O.bandwidth.total * 100
8413
8419
  );
8414
8420
  Z.push(`${ue}%`);
8415
8421
  }
8416
- return m && R.latency !== void 0 && Z.push(`${R.latency}ms`), {
8417
- id: R.id || `conn-${$}`,
8418
- source: R.source,
8419
- target: R.target,
8420
- sourcePort: R.sourcePort,
8421
- targetPort: R.targetPort,
8422
+ return m && O.latency !== void 0 && Z.push(`${O.latency}ms`), {
8423
+ id: O.id || `conn-${$}`,
8424
+ source: O.source,
8425
+ target: O.target,
8426
+ sourcePort: O.sourcePort,
8427
+ targetPort: O.targetPort,
8422
8428
  label: Z.join(" | ") || void 0,
8423
8429
  style: {
8424
8430
  stroke: j ? "var(--nice-danger, #ef4444)" : H,
8425
- strokeWidth: Math.max(1, Math.min(6, (R.speed || 1e3) / 1e3)),
8426
- strokeDasharray: Y ? void 0 : "5,5",
8431
+ strokeWidth: Math.max(1, Math.min(6, (O.speed || 1e3) / 1e3)),
8432
+ strokeDasharray: B ? void 0 : "5,5",
8427
8433
  arrowHead: "none",
8428
- lineType: R.type === "wireless" ? "curved" : "orthogonal",
8429
- opacity: R.status === "inactive" ? 0.3 : 1
8434
+ lineType: O.type === "wireless" ? "curved" : "orthogonal",
8435
+ opacity: O.status === "inactive" ? 0.3 : 1
8430
8436
  },
8431
8437
  data: {
8432
- type: R.type,
8433
- connection: R,
8434
- isActive: Y,
8438
+ type: O.type,
8439
+ connection: O,
8440
+ isActive: B,
8435
8441
  isDegraded: j
8436
8442
  }
8437
8443
  };
8438
- }), V = p ? Ja(x) : [];
8439
- return Fe({
8444
+ }), V = p ? Ka(x) : [];
8445
+ return Ee({
8440
8446
  id: "network-topology",
8441
8447
  title: "Network Topology",
8442
8448
  diagramType: "networkTopology",
@@ -8481,7 +8487,7 @@ const Ya = {
8481
8487
  },
8482
8488
  [r.connections, t]
8483
8489
  );
8484
- const [L, O] = K({ x: 0, y: 0, zoom: 1 }), W = G(
8490
+ const [L, R] = K({ x: 0, y: 0, zoom: 1 }), W = G(
8485
8491
  (F) => {
8486
8492
  if (F && (S((M) => M === F ? null : F), e)) {
8487
8493
  const M = r.devices.find((E) => E.id === F);
@@ -8502,7 +8508,7 @@ const Ya = {
8502
8508
  edges: P.edges,
8503
8509
  groups: P.groups,
8504
8510
  viewport: L,
8505
- onViewportChange: O,
8511
+ onViewportChange: R,
8506
8512
  onSelectElement: W,
8507
8513
  showGrid: !0
8508
8514
  }
@@ -8519,7 +8525,7 @@ const Ya = {
8519
8525
  "var(--nice-info, #14b8a6)",
8520
8526
  "var(--nice-info, #6366f1)"
8521
8527
  ];
8522
- function Ha(r, e, t, i) {
8528
+ function Ja(r, e, t, i) {
8523
8529
  var o;
8524
8530
  const a = {};
8525
8531
  switch (t) {
@@ -8618,7 +8624,7 @@ function Ha(r, e, t, i) {
8618
8624
  }
8619
8625
  return a;
8620
8626
  }
8621
- function ja(r) {
8627
+ function Za(r) {
8622
8628
  switch (r) {
8623
8629
  case "router":
8624
8630
  case "switch":
@@ -8635,7 +8641,7 @@ function ja(r) {
8635
8641
  return "rectangle";
8636
8642
  }
8637
8643
  }
8638
- function Ja(r) {
8644
+ function Ka(r) {
8639
8645
  return r.filter((e) => e.status === "active" && e.bandwidth && e.bandwidth.used > 0).map((e, t) => ({
8640
8646
  id: `traffic-${t}`,
8641
8647
  type: "flow",
@@ -8644,7 +8650,7 @@ function Ja(r) {
8644
8650
  delay: t * 200
8645
8651
  }));
8646
8652
  }
8647
- async function Uo(r = {}) {
8653
+ async function jo(r = {}) {
8648
8654
  return console.log("Network discovery with options:", r), {
8649
8655
  devices: [
8650
8656
  {
@@ -8737,7 +8743,7 @@ async function Uo(r = {}) {
8737
8743
  ]
8738
8744
  };
8739
8745
  }
8740
- function Ho(r) {
8746
+ function Jo(r) {
8741
8747
  const e = r.devices.filter((m) => m.status === "online").length, t = r.devices.filter((m) => m.status === "offline").length, i = r.devices.filter((m) => m.status === "warning").length, a = r.devices.filter((m) => m.status === "critical").length, o = r.connections.filter((m) => m.status === "active").length, s = r.connections.filter(
8742
8748
  (m) => m.status === "degraded" || m.status === "error"
8743
8749
  ).length, n = r.devices.length > 0 ? e / r.devices.length * 100 : 0, c = r.connections.length > 0 ? o / r.connections.length * 100 : 0, u = a * 10 + i * 5 + s * 5;
@@ -8754,7 +8760,7 @@ function Ho(r) {
8754
8760
  degradedConnections: s
8755
8761
  };
8756
8762
  }
8757
- const Za = [
8763
+ const Qa = [
8758
8764
  {
8759
8765
  target: ".nice-decision-tree-editor",
8760
8766
  titleKey: "tutorial.decisionTreeEditor.intro.title",
@@ -8763,13 +8769,13 @@ const Za = [
8763
8769
  content: "Explore the decision tree: click nodes to inspect conditions and outcomes, toggle metrics, probabilities and samples, and highlight a path for an input.",
8764
8770
  placement: "auto"
8765
8771
  }
8766
- ], Ka = {
8772
+ ], eo = {
8767
8773
  root: "var(--nice-accent, #8b5cf6)",
8768
8774
  decision: "var(--nice-primary, #3b82f6)",
8769
8775
  leaf: "var(--nice-success, #10b981)",
8770
8776
  chance: "var(--nice-warning, #f59e0b)",
8771
8777
  end: "var(--nice-danger, #ef4444)"
8772
- }, jo = ({
8778
+ }, Zo = ({
8773
8779
  data: r,
8774
8780
  onChange: e,
8775
8781
  onNodeClick: t,
@@ -8787,10 +8793,10 @@ const Za = [
8787
8793
  style: h,
8788
8794
  tutorial: b
8789
8795
  }) => {
8790
- const [w, y] = K(null), [S, C] = K(/* @__PURE__ */ new Set()), z = ae(() => n ? io(r.root, n) : /* @__PURE__ */ new Set(), [r.root, n]), { nodes: _, edges: x } = ae(() => Qa(r.root, r.edges), [r.root, r.edges]), P = ae(() => to(_), [_]), L = ae(() => {
8791
- var V, R;
8792
- const M = eo(r.root, d, m), E = _.map(($) => {
8793
- const H = M[$.id] || { x: 0, y: 0 }, Y = w === $.id, j = z.has($.id), Z = $.type === "leaf" || $.type === "end", ue = ro($, c, u, P), pe = Z ? 120 : 160, X = a ? 80 : Z ? 60 : 70;
8796
+ const [w, y] = K(null), [S, C] = K(/* @__PURE__ */ new Set()), z = ae(() => n ? oo(r.root, n) : /* @__PURE__ */ new Set(), [r.root, n]), { nodes: _, edges: x } = ae(() => to(r.root, r.edges), [r.root, r.edges]), P = ae(() => io(_), [_]), L = ae(() => {
8797
+ var V, O;
8798
+ const M = ro(r.root, d, m), E = _.map(($) => {
8799
+ const H = M[$.id] || { x: 0, y: 0 }, B = w === $.id, j = z.has($.id), Z = $.type === "leaf" || $.type === "end", ue = ao($, c, u, P), pe = Z ? 120 : 160, X = a ? 80 : Z ? 60 : 70;
8794
8800
  return {
8795
8801
  id: $.id,
8796
8802
  label: $.label,
@@ -8800,10 +8806,10 @@ const Za = [
8800
8806
  height: X,
8801
8807
  shape: Z ? "roundedRect" : "diamond",
8802
8808
  style: {
8803
- fill: Y || j ? ue : "var(--nice-bg, #fff)",
8809
+ fill: B || j ? ue : "var(--nice-bg, #fff)",
8804
8810
  stroke: ue,
8805
- strokeWidth: j ? 4 : Y ? 3 : 2,
8806
- fontColor: Y || j ? "var(--nice-text-primary, #fff)" : "var(--nice-text, #1f2937)",
8811
+ strokeWidth: j ? 4 : B ? 3 : 2,
8812
+ fontColor: B || j ? "var(--nice-text-primary, #fff)" : "var(--nice-text, #1f2937)",
8807
8813
  fontSize: 11,
8808
8814
  borderRadius: Z ? 8 : 0
8809
8815
  },
@@ -8815,7 +8821,7 @@ const Za = [
8815
8821
  }
8816
8822
  };
8817
8823
  }), T = x.map(($, H) => {
8818
- const Y = z.has($.source) && z.has($.target);
8824
+ const B = z.has($.source) && z.has($.target);
8819
8825
  let j = $.label || "";
8820
8826
  return o && $.probability !== void 0 && (j += j ? ` (${($.probability * 100).toFixed(0)}%)` : `${($.probability * 100).toFixed(0)}%`), {
8821
8827
  id: $.id || `edge-${H}`,
@@ -8823,29 +8829,29 @@ const Za = [
8823
8829
  target: $.target,
8824
8830
  label: j || void 0,
8825
8831
  style: {
8826
- stroke: Y ? "var(--nice-primary, #3b82f6)" : "var(--nice-text-muted, #9ca3af)",
8827
- strokeWidth: Y ? 3 : 2,
8832
+ stroke: B ? "var(--nice-primary, #3b82f6)" : "var(--nice-text-muted, #9ca3af)",
8833
+ strokeWidth: B ? 3 : 2,
8828
8834
  arrowHead: "triangle",
8829
8835
  lineType: d === "vertical" ? "orthogonal" : "curved"
8830
8836
  },
8831
8837
  data: {
8832
8838
  type: "decision-edge",
8833
8839
  edge: $,
8834
- isHighlighted: Y
8840
+ isHighlighted: B
8835
8841
  }
8836
8842
  };
8837
8843
  });
8838
- return Fe({
8844
+ return Ee({
8839
8845
  id: "decision-tree",
8840
8846
  title: "Decision Tree",
8841
8847
  diagramType: "decisionTree",
8842
8848
  nodes: E,
8843
8849
  edges: T,
8844
- animations: n ? ao(Array.from(z)) : [],
8850
+ animations: n ? no(Array.from(z)) : [],
8845
8851
  metadata: {
8846
8852
  type: "decision-tree",
8847
8853
  algorithm: (V = r.metadata) == null ? void 0 : V.algorithm,
8848
- accuracy: (R = r.metadata) == null ? void 0 : R.accuracy
8854
+ accuracy: (O = r.metadata) == null ? void 0 : O.accuracy
8849
8855
  }
8850
8856
  });
8851
8857
  }, [
@@ -8874,7 +8880,7 @@ const Za = [
8874
8880
  },
8875
8881
  [_, t]
8876
8882
  );
8877
- const [O, W] = K({ x: 0, y: 0, zoom: 1 }), F = G(
8883
+ const [R, W] = K({ x: 0, y: 0, zoom: 1 }), F = G(
8878
8884
  (M) => {
8879
8885
  if (!M)
8880
8886
  return;
@@ -8893,14 +8899,14 @@ const Za = [
8893
8899
  className: `nice-decision-tree-editor ${g || ""}`,
8894
8900
  style: { position: "relative", width: "100%", height: "100%", ...h },
8895
8901
  children: [
8896
- /* @__PURE__ */ l("span", { style: { position: "absolute", top: 6, right: 6, zIndex: 30 }, children: /* @__PURE__ */ l(Et, { steps: Lt(b, Za) }) }),
8902
+ /* @__PURE__ */ l("span", { style: { position: "absolute", top: 6, right: 6, zIndex: 30 }, children: /* @__PURE__ */ l(Et, { steps: Lt(b, Qa) }) }),
8897
8903
  /* @__PURE__ */ l(
8898
8904
  Te,
8899
8905
  {
8900
8906
  nodes: L.nodes,
8901
8907
  edges: L.edges,
8902
8908
  groups: L.groups,
8903
- viewport: O,
8909
+ viewport: R,
8904
8910
  onViewportChange: W,
8905
8911
  onSelectElement: F,
8906
8912
  interactive: !0,
@@ -8911,7 +8917,7 @@ const Za = [
8911
8917
  }
8912
8918
  );
8913
8919
  };
8914
- function Qa(r, e) {
8920
+ function to(r, e) {
8915
8921
  const t = [], i = e ? [...e] : [], a = new Set(i.map((s) => `${s.source}-${s.target}`)), o = (s, n) => {
8916
8922
  t.push(s), n && !a.has(`${n}-${s.id}`) && i.push({
8917
8923
  id: `e-${n}-${s.id}`,
@@ -8932,7 +8938,7 @@ function Qa(r, e) {
8932
8938
  };
8933
8939
  return o(r), { nodes: t, edges: i };
8934
8940
  }
8935
- function eo(r, e, t) {
8941
+ function ro(r, e, t) {
8936
8942
  const i = {}, a = (n) => !n.children || n.children.length === 0 ? 1 : n.children.reduce((c, u) => c + a(u), 0), o = (n, c, u, d) => {
8937
8943
  const m = u + d * t.horizontal / 2, p = c * t.vertical + 50;
8938
8944
  if (i[n.id] = e === "vertical" ? { x: m, y: p } : { x: p, y: m }, n.children) {
@@ -8945,7 +8951,7 @@ function eo(r, e, t) {
8945
8951
  }, s = a(r);
8946
8952
  return o(r, 0, 0, s), i;
8947
8953
  }
8948
- function to(r) {
8954
+ function io(r) {
8949
8955
  const e = r.filter((i) => {
8950
8956
  var a;
8951
8957
  return ((a = i.metrics) == null ? void 0 : a.impurity) !== void 0;
@@ -8964,7 +8970,7 @@ function to(r) {
8964
8970
  }
8965
8971
  };
8966
8972
  }
8967
- function ro(r, e, t, i) {
8973
+ function ao(r, e, t, i) {
8968
8974
  var a, o, s;
8969
8975
  if (t != null && t[r.id])
8970
8976
  return t[r.id];
@@ -9001,7 +9007,7 @@ function ro(r, e, t, i) {
9001
9007
  }[r.outcome.class.toLowerCase()] || "var(--nice-primary, #3b82f6)";
9002
9008
  break;
9003
9009
  }
9004
- return Ka[r.type] || "var(--nice-text-secondary, #6b7280)";
9010
+ return eo[r.type] || "var(--nice-text-secondary, #6b7280)";
9005
9011
  }
9006
9012
  function Tt(r, e, t) {
9007
9013
  const i = (u) => {
@@ -9015,7 +9021,7 @@ function Tt(r, e, t) {
9015
9021
  }, a = i(r), o = i(e), s = Math.round(a.r + (o.r - a.r) * t), n = Math.round(a.g + (o.g - a.g) * t), c = Math.round(a.b + (o.b - a.b) * t);
9016
9022
  return `#${[s, n, c].map((u) => u.toString(16).padStart(2, "0")).join("")}`;
9017
9023
  }
9018
- function io(r, e) {
9024
+ function oo(r, e) {
9019
9025
  const t = /* @__PURE__ */ new Set(), i = (a) => {
9020
9026
  if (t.add(a.id), a.type === "leaf" || a.type === "end" || !a.children)
9021
9027
  return !0;
@@ -9056,7 +9062,7 @@ function Qt(r, e, t) {
9056
9062
  return !1;
9057
9063
  }
9058
9064
  }
9059
- function ao(r) {
9065
+ function no(r) {
9060
9066
  return r.map((e, t) => ({
9061
9067
  id: `path-${t}`,
9062
9068
  type: "highlight",
@@ -9065,7 +9071,7 @@ function ao(r) {
9065
9071
  delay: t * 300
9066
9072
  }));
9067
9073
  }
9068
- function Jo(r) {
9074
+ function Ko(r) {
9069
9075
  const { tree: e, feature_names: t, class_names: i } = r;
9070
9076
  e.children_left.length;
9071
9077
  const a = (s) => {
@@ -9112,7 +9118,7 @@ function Jo(r) {
9112
9118
  function er(r, e = 0) {
9113
9119
  return !r.children || r.children.length === 0 ? e : Math.max(...r.children.map((t) => er(t, e + 1)));
9114
9120
  }
9115
- function Zo(r) {
9121
+ function Qo(r) {
9116
9122
  const e = (i, a) => typeof i == "string" ? {
9117
9123
  id: a,
9118
9124
  type: "leaf",
@@ -9134,7 +9140,7 @@ function Zo(r) {
9134
9140
  ]
9135
9141
  } };
9136
9142
  }
9137
- function Ko(r, e) {
9143
+ function en(r, e) {
9138
9144
  const t = [], i = (o) => {
9139
9145
  var s, n;
9140
9146
  if (t.push(o.id), o.type === "leaf" || o.type === "end" || !o.children)
@@ -9159,25 +9165,25 @@ function Ko(r, e) {
9159
9165
  path: t
9160
9166
  };
9161
9167
  }
9162
- const Qo = {
9168
+ const tn = {
9163
9169
  size: 20,
9164
9170
  enabled: !0,
9165
9171
  guideThreshold: 5,
9166
9172
  showGuides: !0
9167
9173
  };
9168
- function Rt(r, e) {
9174
+ function Ot(r, e) {
9169
9175
  return Math.round(r / e) * e;
9170
9176
  }
9171
- function oo(r, e) {
9177
+ function so(r, e) {
9172
9178
  return {
9173
- x: Rt(r.x, e),
9174
- y: Rt(r.y, e)
9179
+ x: Ot(r.x, e),
9180
+ y: Ot(r.y, e)
9175
9181
  };
9176
9182
  }
9177
- function en(r, e, t) {
9178
- return oo(r, t);
9183
+ function rn(r, e, t) {
9184
+ return so(r, t);
9179
9185
  }
9180
- function Ot(r, e, t) {
9186
+ function Rt(r, e, t) {
9181
9187
  return {
9182
9188
  id: r,
9183
9189
  left: e.x,
@@ -9188,12 +9194,12 @@ function Ot(r, e, t) {
9188
9194
  centerY: e.y + t.height / 2
9189
9195
  };
9190
9196
  }
9191
- function tn(r, e, t, i, a = 5) {
9192
- const o = [], s = Ot(r, e, t);
9197
+ function an(r, e, t, i, a = 5) {
9198
+ const o = [], s = Rt(r, e, t);
9193
9199
  for (const n of i) {
9194
9200
  if (n.id === r)
9195
9201
  continue;
9196
- const c = Ot(n.id, n.position, n.size);
9202
+ const c = Rt(n.id, n.position, n.size);
9197
9203
  Math.abs(s.centerX - c.centerX) <= a && o.push({
9198
9204
  axis: "vertical",
9199
9205
  position: c.centerX,
@@ -9226,9 +9232,9 @@ function tn(r, e, t, i, a = 5) {
9226
9232
  type: "edge"
9227
9233
  });
9228
9234
  }
9229
- return no(o);
9235
+ return co(o);
9230
9236
  }
9231
- function rn(r, e, t) {
9237
+ function on(r, e, t) {
9232
9238
  let i = r.x, a = r.y;
9233
9239
  const o = [], s = t.filter((c) => c.axis === "vertical");
9234
9240
  if (s.length > 0) {
@@ -9252,16 +9258,16 @@ function rn(r, e, t) {
9252
9258
  }
9253
9259
  return { snappedPosition: { x: i, y: a }, activeGuides: o };
9254
9260
  }
9255
- function no(r) {
9261
+ function co(r) {
9256
9262
  const e = /* @__PURE__ */ new Set();
9257
9263
  return r.filter((t) => {
9258
9264
  const i = `${t.axis}-${t.position}-${t.type}`;
9259
9265
  return e.has(i) ? !1 : (e.add(i), !0);
9260
9266
  });
9261
9267
  }
9262
- let so = 0;
9268
+ let lo = 0;
9263
9269
  function _t() {
9264
- return `tmpl-${++so}-${Date.now().toString(36)}`;
9270
+ return `tmpl-${++lo}-${Date.now().toString(36)}`;
9265
9271
  }
9266
9272
  function ie(r, e, t = "roundedRect", i = { width: 160, height: 60 }, a) {
9267
9273
  return {
@@ -9291,7 +9297,7 @@ function ne(r, e, t = "bottom", i = "top", a) {
9291
9297
  style: { lineType: "bezier", targetArrow: "arrow" }
9292
9298
  };
9293
9299
  }
9294
- function Ye(r, e, t, i) {
9300
+ function Be(r, e, t, i) {
9295
9301
  const a = (/* @__PURE__ */ new Date()).toISOString();
9296
9302
  return {
9297
9303
  version: "1.0",
@@ -9306,9 +9312,9 @@ function Ye(r, e, t, i) {
9306
9312
  metadata: { createdAt: a, updatedAt: a }
9307
9313
  };
9308
9314
  }
9309
- function co() {
9315
+ function uo() {
9310
9316
  const r = ie("Commit", { x: 40, y: 200 }, "circle", { width: 80, height: 80 }), e = ie("Build", { x: 200, y: 200 }, "roundedRect"), t = ie("Test", { x: 420, y: 200 }, "roundedRect"), i = ie("Deploy", { x: 640, y: 200 }, "roundedRect"), a = ie("Production", { x: 860, y: 200 }, "hexagon", { width: 140, height: 80 });
9311
- return Ye(
9317
+ return Be(
9312
9318
  "CI/CD Pipeline",
9313
9319
  "flowchart",
9314
9320
  [r, e, t, i, a],
@@ -9320,7 +9326,7 @@ function co() {
9320
9326
  ]
9321
9327
  );
9322
9328
  }
9323
- function lo() {
9329
+ function fo() {
9324
9330
  const r = ie("API Gateway", { x: 350, y: 40 }, "hexagon", { width: 160, height: 80 }), e = ie("Auth Service", { x: 80, y: 200 }, "roundedRect"), t = ie("User Service", { x: 300, y: 200 }, "roundedRect"), i = ie("Order Service", { x: 520, y: 200 }, "roundedRect"), a = ie("Notification", { x: 740, y: 200 }, "roundedRect"), o = ie("Users DB", { x: 180, y: 380 }, "cylinder", { width: 120, height: 70 }), s = ie("Orders DB", { x: 520, y: 380 }, "cylinder", { width: 120, height: 70 }), n = ie("Message Queue", { x: 620, y: 380 }, "parallelogram", {
9325
9331
  width: 160,
9326
9332
  height: 60
@@ -9333,11 +9339,11 @@ function lo() {
9333
9339
  ne(i, s, "bottom", "top"),
9334
9340
  ne(a, n, "bottom", "top")
9335
9341
  ];
9336
- return Ye("Microservices Architecture", "flowchart", c, u);
9342
+ return Be("Microservices Architecture", "flowchart", c, u);
9337
9343
  }
9338
- function uo() {
9344
+ function ho() {
9339
9345
  const r = ie("Start", { x: 350, y: 20 }, "circle", { width: 70, height: 70 }), e = ie("Landing Page", { x: 310, y: 140 }, "roundedRect"), t = ie("Sign Up", { x: 140, y: 280 }, "roundedRect"), i = ie("Log In", { x: 480, y: 280 }, "roundedRect"), a = ie("Dashboard", { x: 310, y: 420 }, "roundedRect"), o = ie("End", { x: 350, y: 560 }, "circle", { width: 70, height: 70 });
9340
- return Ye(
9346
+ return Be(
9341
9347
  "User Flow",
9342
9348
  "flowchart",
9343
9349
  [r, e, t, i, a, o],
@@ -9351,7 +9357,7 @@ function uo() {
9351
9357
  ]
9352
9358
  );
9353
9359
  }
9354
- function fo() {
9360
+ function po() {
9355
9361
  const r = ie("Users", { x: 80, y: 100 }, "rectangle", { width: 180, height: 100 }), e = ie("Orders", { x: 380, y: 100 }, "rectangle", { width: 180, height: 100 }), t = ie("Products", { x: 380, y: 320 }, "rectangle", {
9356
9362
  width: 180,
9357
9363
  height: 100
@@ -9359,7 +9365,7 @@ function fo() {
9359
9365
  width: 180,
9360
9366
  height: 100
9361
9367
  });
9362
- return Ye(
9368
+ return Be(
9363
9369
  "Entity Relationship",
9364
9370
  "er",
9365
9371
  [r, e, t, i],
@@ -9370,9 +9376,9 @@ function fo() {
9370
9376
  ]
9371
9377
  );
9372
9378
  }
9373
- function ho() {
9379
+ function mo() {
9374
9380
  const r = ie("CEO", { x: 350, y: 40 }, "roundedRect"), e = ie("CTO", { x: 150, y: 180 }, "roundedRect"), t = ie("CFO", { x: 550, y: 180 }, "roundedRect"), i = ie("Engineering", { x: 50, y: 320 }, "roundedRect"), a = ie("DevOps", { x: 250, y: 320 }, "roundedRect"), o = ie("Accounting", { x: 550, y: 320 }, "roundedRect");
9375
- return Ye(
9381
+ return Be(
9376
9382
  "Organization Chart",
9377
9383
  "orgchart",
9378
9384
  [r, e, t, i, a, o],
@@ -9385,9 +9391,9 @@ function ho() {
9385
9391
  ]
9386
9392
  );
9387
9393
  }
9388
- function po() {
9394
+ function go() {
9389
9395
  const r = ie("Idle", { x: 80, y: 200 }, "circle", { width: 90, height: 90 }), e = ie("Loading", { x: 300, y: 80 }, "roundedRect"), t = ie("Success", { x: 520, y: 80 }, "roundedRect"), i = ie("Error", { x: 520, y: 320 }, "roundedRect"), a = ie("Retry", { x: 300, y: 320 }, "diamond", { width: 100, height: 100 });
9390
- return Ye(
9396
+ return Be(
9391
9397
  "State Machine",
9392
9398
  "stateMachine",
9393
9399
  [r, e, t, i, a],
@@ -9409,7 +9415,7 @@ const Mt = [
9409
9415
  category: "software",
9410
9416
  diagramType: "flowchart",
9411
9417
  tags: ["devops", "ci", "cd", "pipeline", "deployment"],
9412
- create: co
9418
+ create: uo
9413
9419
  },
9414
9420
  {
9415
9421
  id: "microservices",
@@ -9418,7 +9424,7 @@ const Mt = [
9418
9424
  category: "software",
9419
9425
  diagramType: "flowchart",
9420
9426
  tags: ["architecture", "microservices", "api", "backend"],
9421
- create: lo
9427
+ create: fo
9422
9428
  },
9423
9429
  {
9424
9430
  id: "user-flow",
@@ -9427,7 +9433,7 @@ const Mt = [
9427
9433
  category: "general",
9428
9434
  diagramType: "flowchart",
9429
9435
  tags: ["ux", "user-flow", "journey", "wireframe"],
9430
- create: uo
9436
+ create: ho
9431
9437
  },
9432
9438
  {
9433
9439
  id: "er-diagram",
@@ -9436,7 +9442,7 @@ const Mt = [
9436
9442
  category: "software",
9437
9443
  diagramType: "er",
9438
9444
  tags: ["database", "er", "schema", "sql"],
9439
- create: fo
9445
+ create: po
9440
9446
  },
9441
9447
  {
9442
9448
  id: "org-chart",
@@ -9445,7 +9451,7 @@ const Mt = [
9445
9451
  category: "business",
9446
9452
  diagramType: "orgchart",
9447
9453
  tags: ["org", "hierarchy", "team", "management"],
9448
- create: ho
9454
+ create: mo
9449
9455
  },
9450
9456
  {
9451
9457
  id: "state-machine",
@@ -9454,22 +9460,22 @@ const Mt = [
9454
9460
  category: "software",
9455
9461
  diagramType: "stateMachine",
9456
9462
  tags: ["state", "fsm", "transitions", "machine"],
9457
- create: po
9463
+ create: go
9458
9464
  }
9459
9465
  ];
9460
- function an(r) {
9466
+ function nn(r) {
9461
9467
  return Mt.find((e) => e.id === r);
9462
9468
  }
9463
- function on(r) {
9469
+ function sn(r) {
9464
9470
  return Mt.filter((e) => e.category === r);
9465
9471
  }
9466
- function nn(r) {
9472
+ function cn(r) {
9467
9473
  const e = r.toLowerCase();
9468
9474
  return Mt.filter(
9469
9475
  (t) => t.name.toLowerCase().includes(e) || t.description.toLowerCase().includes(e) || t.tags.some((i) => i.includes(e))
9470
9476
  );
9471
9477
  }
9472
- class mo {
9478
+ class yo {
9473
9479
  constructor(e = {}) {
9474
9480
  this.versions = [], this.currentVersionIndex = -1, this.autoSaveTimer = null, this.lastDocument = null, this.listeners = /* @__PURE__ */ new Set(), this.config = {
9475
9481
  maxVersions: e.maxVersions ?? 100,
@@ -9497,7 +9503,7 @@ class mo {
9497
9503
  /** Save a new version. */
9498
9504
  saveVersion(e, t) {
9499
9505
  const i = this.lastDocument ? this.calculateChanges(this.lastDocument, e) : [{ type: "node-added", description: "Initial version" }], a = {
9500
- id: go(),
9506
+ id: bo(),
9501
9507
  number: this.versions.length + 1,
9502
9508
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
9503
9509
  userId: this.config.userId,
@@ -9705,11 +9711,11 @@ class mo {
9705
9711
  this.versions = [], this.currentVersionIndex = -1, this.lastDocument = null, this.notify();
9706
9712
  }
9707
9713
  }
9708
- function go() {
9714
+ function bo() {
9709
9715
  return `v_${Date.now()}_${Math.random().toString(36).slice(2, 9)}`;
9710
9716
  }
9711
- function sn(r) {
9712
- const e = new mo(r);
9717
+ function ln(r) {
9718
+ const e = new yo(r);
9713
9719
  return {
9714
9720
  manager: e,
9715
9721
  saveVersion: e.saveVersion.bind(e),
@@ -9718,14 +9724,14 @@ function sn(r) {
9718
9724
  diff: e.diff.bind(e)
9719
9725
  };
9720
9726
  }
9721
- class cn {
9727
+ class dn {
9722
9728
  constructor(e) {
9723
9729
  this.comments = /* @__PURE__ */ new Map(), this.listeners = /* @__PURE__ */ new Set(), this.mentionListeners = /* @__PURE__ */ new Set(), this.config = e;
9724
9730
  }
9725
9731
  /** Add a new comment. */
9726
9732
  addComment(e, t, i) {
9727
9733
  const a = this.parseMentions(t), o = {
9728
- id: yo(),
9734
+ id: vo(),
9729
9735
  anchor: e,
9730
9736
  status: "open",
9731
9737
  authorId: this.config.userId,
@@ -9767,7 +9773,7 @@ class cn {
9767
9773
  if (!i)
9768
9774
  return null;
9769
9775
  const a = this.parseMentions(t), o = {
9770
- id: bo(),
9776
+ id: wo(),
9771
9777
  authorId: this.config.userId,
9772
9778
  authorName: this.config.userName,
9773
9779
  authorAvatar: this.config.userAvatar,
@@ -9885,13 +9891,13 @@ class cn {
9885
9891
  Object.assign(this.config, e);
9886
9892
  }
9887
9893
  }
9888
- function yo() {
9894
+ function vo() {
9889
9895
  return `comment_${Date.now()}_${Math.random().toString(36).slice(2, 9)}`;
9890
9896
  }
9891
- function bo() {
9897
+ function wo() {
9892
9898
  return `reply_${Date.now()}_${Math.random().toString(36).slice(2, 9)}`;
9893
9899
  }
9894
- const ln = {
9900
+ const un = {
9895
9901
  low: {
9896
9902
  backgroundColor: "var(--nice-primary-bg, #e3f2fd)",
9897
9903
  borderColor: "var(--nice-primary, #2196f3)",
@@ -9917,11 +9923,11 @@ const ln = {
9917
9923
  icon: "flame"
9918
9924
  }
9919
9925
  };
9920
- function dn(r) {
9926
+ function fn(r) {
9921
9927
  const e = new Date(r), i = (/* @__PURE__ */ new Date()).getTime() - e.getTime(), a = Math.floor(i / (1e3 * 60)), o = Math.floor(a / 60), s = Math.floor(o / 24);
9922
9928
  return a < 1 ? "just now" : a < 60 ? `${a}m ago` : o < 24 ? `${o}h ago` : s < 7 ? `${s}d ago` : e.toLocaleDateString();
9923
9929
  }
9924
- function un(r, e) {
9930
+ function hn(r, e) {
9925
9931
  if (e.length === 0)
9926
9932
  return r;
9927
9933
  const t = [...e].sort((a, o) => o.startIndex - a.startIndex);
@@ -9932,7 +9938,7 @@ function un(r, e) {
9932
9938
  }
9933
9939
  return i;
9934
9940
  }
9935
- class vo {
9941
+ class xo {
9936
9942
  constructor() {
9937
9943
  this.profiles = /* @__PURE__ */ new Map(), this.activeProfileId = null, this.listeners = /* @__PURE__ */ new Set(), this.cache = /* @__PURE__ */ new Map(), this.profiles.set("default", {
9938
9944
  id: "default",
@@ -10279,21 +10285,21 @@ const tr = [
10279
10285
  actions: [{ type: "set_opacity", value: 0.5 }]
10280
10286
  }
10281
10287
  ];
10282
- function fn(r) {
10288
+ function pn(r) {
10283
10289
  const e = tr.find((t) => t.id === r);
10284
10290
  return e ? {
10285
10291
  ...e,
10286
10292
  id: `${e.id}_${Date.now()}`
10287
10293
  } : null;
10288
10294
  }
10289
- function hn(r = !1) {
10290
- const e = new vo();
10295
+ function mn(r = !1) {
10296
+ const e = new xo();
10291
10297
  if (r)
10292
10298
  for (const t of tr)
10293
10299
  e.addRule(t);
10294
10300
  return e;
10295
10301
  }
10296
- class pn {
10302
+ class gn {
10297
10303
  constructor() {
10298
10304
  this.nodes = [], this.edges = [], this.groups = [], this.presets = /* @__PURE__ */ new Map(), this.state = {
10299
10305
  query: "",
@@ -10691,7 +10697,7 @@ class pn {
10691
10697
  JSON.parse(e).forEach((i) => this.presets.set(i.id, i));
10692
10698
  }
10693
10699
  }
10694
- function mn(r, e, t = "search-highlight") {
10700
+ function yn(r, e, t = "search-highlight") {
10695
10701
  if (e.length === 0)
10696
10702
  return r;
10697
10703
  const i = [...e].sort((o, s) => s.start - o.start);
@@ -10702,7 +10708,7 @@ function mn(r, e, t = "search-highlight") {
10702
10708
  }
10703
10709
  return a;
10704
10710
  }
10705
- function gn(r, e) {
10711
+ function bn(r, e) {
10706
10712
  switch (r) {
10707
10713
  case "by-type":
10708
10714
  return {
@@ -10738,89 +10744,89 @@ function gn(r, e) {
10738
10744
  export {
10739
10745
  Li as AnimationPlayer,
10740
10746
  Vt as AnimationTimeline,
10741
- ln as COMMENT_PRIORITY_STYLES,
10742
- vo as ConditionalStylingEngine,
10743
- Qo as DEFAULT_GRID_CONFIG,
10747
+ un as COMMENT_PRIORITY_STYLES,
10748
+ xo as ConditionalStylingEngine,
10749
+ tn as DEFAULT_GRID_CONFIG,
10744
10750
  xt as DIAGRAM_STYLE_PRESETS,
10745
10751
  Mt as DIAGRAM_TEMPLATES,
10746
10752
  Te as DiagramCanvas,
10747
- $o as DiagramCellRenderer,
10748
- cn as DiagramCommentManager,
10749
- Bt as DiagramMinimap,
10753
+ Po as DiagramCellRenderer,
10754
+ dn as DiagramCommentManager,
10755
+ Yt as DiagramMinimap,
10750
10756
  bt as DiagramModel,
10751
10757
  ur as DiagramParticleEngine,
10752
- Yt as DiagramPropertyPanel,
10753
- pn as DiagramSearchFilterEngine,
10758
+ Bt as DiagramPropertyPanel,
10759
+ gn as DiagramSearchFilterEngine,
10754
10760
  Xt as DiagramToolbar,
10755
- mo as DiagramVersioningManager,
10756
- So as EDGE_STYLE_CATALOG,
10757
- Co as NODE_STYLE_CATALOG,
10761
+ yo as DiagramVersioningManager,
10762
+ No as EDGE_STYLE_CATALOG,
10763
+ zo as NODE_STYLE_CATALOG,
10758
10764
  Vt as NiceAnimationTimeline,
10759
- Oo as NiceDatabaseSchemaViewer,
10760
- jo as NiceDecisionTreeEditor,
10761
- Vo as NiceDependencyGraph,
10762
- qi as NiceDiagram,
10765
+ Lo as NiceDatabaseSchemaViewer,
10766
+ Zo as NiceDecisionTreeEditor,
10767
+ Bo as NiceDependencyGraph,
10768
+ Ji as NiceDiagram,
10763
10769
  Te as NiceDiagramCanvas,
10764
- Oi as NiceDiagramEditor,
10765
- Bt as NiceDiagramMinimap,
10766
- Yt as NiceDiagramPropertyPanel,
10770
+ Ri as NiceDiagramEditor,
10771
+ Yt as NiceDiagramMinimap,
10772
+ Bt as NiceDiagramPropertyPanel,
10767
10773
  Xt as NiceDiagramToolbar,
10768
- qi as NiceDiagramViewer,
10774
+ Ji as NiceDiagramViewer,
10769
10775
  qt as NiceI18nProvider,
10770
- Xo as NiceNetworkTopology,
10771
- Wo as NiceOrgChartVisualizer,
10772
- Go as NiceProcessMiningDiagram,
10773
- Po as NiceWorkflowVisualizer,
10776
+ Ho as NiceNetworkTopology,
10777
+ qo as NiceOrgChartVisualizer,
10778
+ Yo as NiceProcessMiningDiagram,
10779
+ Oo as NiceWorkflowVisualizer,
10774
10780
  tr as PRESET_RULES,
10775
10781
  wi as TRANSITION_PRESETS,
10776
- Yo as analyzeDependencyGraph,
10777
- rn as applyAlignmentSnap,
10778
- Ho as calculateNetworkHealth,
10779
- qo as calculateOrgStats,
10780
- tn as computeAlignmentGuides,
10782
+ Uo as analyzeDependencyGraph,
10783
+ on as applyAlignmentSnap,
10784
+ Jo as calculateNetworkHealth,
10785
+ Vo as calculateOrgStats,
10786
+ an as computeAlignmentGuides,
10781
10787
  hr as computeGlowRadius,
10782
10788
  yr as computeLayout,
10783
- ya as convertAnimation,
10784
- ma as convertEdge,
10785
- ga as convertGroup,
10786
- pa as convertNode,
10787
- hn as createConditionalStylingEngine,
10788
- Zo as createDecisionTree,
10789
- Fe as createDiagramDocument,
10789
+ Hi as convertAnimation,
10790
+ Xi as convertEdge,
10791
+ Ui as convertGroup,
10792
+ Bi as convertNode,
10793
+ mn as createConditionalStylingEngine,
10794
+ Qo as createDecisionTree,
10795
+ Ee as createDiagramDocument,
10790
10796
  fr as createGlowFilterId,
10791
- Ro as createLinearWorkflow,
10792
- Fo as createOrgChartFromEmployees,
10793
- Ao as createPresetFromTheme,
10794
- gn as createQuickFilter,
10795
- fn as createRuleFromPreset,
10796
- sn as createVersioningHook,
10797
- Uo as discoverNetworkTopology,
10797
+ Eo as createLinearWorkflow,
10798
+ Go as createOrgChartFromEmployees,
10799
+ Do as createPresetFromTheme,
10800
+ bn as createQuickFilter,
10801
+ pn as createRuleFromPreset,
10802
+ ln as createVersioningHook,
10803
+ jo as discoverNetworkTopology,
10798
10804
  pr as exportToMermaid,
10799
10805
  St as exportToSvg,
10800
- Do as fetchAndGenerateDiagram,
10801
- dn as formatCommentDate,
10802
- la as generateDiagramFromData,
10803
- zo as getDiagramStylePreset,
10804
- No as getDiagramStylePresetsByCategory,
10806
+ To as fetchAndGenerateDiagram,
10807
+ fn as formatCommentDate,
10808
+ ba as generateDiagramFromData,
10809
+ Io as getDiagramStylePreset,
10810
+ Ao as getDiagramStylePresetsByCategory,
10805
10811
  Ei as getEasing,
10806
- _o as getPointOnPath,
10807
- an as getTemplateById,
10808
- on as getTemplatesByCategory,
10809
- mn as highlightMatches,
10810
- Oa as mineProcessFromLog,
10811
- To as parseBPMNToWorkflow,
10812
- Mo as parseNddJson,
10813
- Bo as parsePackageJsonToDependencies,
10814
- Eo as parseSQLToSchema,
10815
- Jo as parseSklearnTree,
10816
- Ko as predictWithTree,
10817
- Io as presetToThemeOverrides,
10818
- un as renderTextWithMentions,
10819
- Lo as schemaToSQL,
10820
- nn as searchTemplates,
10821
- en as snapNodePosition,
10822
- oo as snapPointToGrid,
10823
- Rt as snapToGrid,
10812
+ Co as getPointOnPath,
10813
+ nn as getTemplateById,
10814
+ sn as getTemplatesByCategory,
10815
+ yn as highlightMatches,
10816
+ La as mineProcessFromLog,
10817
+ Ro as parseBPMNToWorkflow,
10818
+ So as parseNddJson,
10819
+ Xo as parsePackageJsonToDependencies,
10820
+ Wo as parseSQLToSchema,
10821
+ Ko as parseSklearnTree,
10822
+ en as predictWithTree,
10823
+ $o as presetToThemeOverrides,
10824
+ hn as renderTextWithMentions,
10825
+ Fo as schemaToSQL,
10826
+ cn as searchTemplates,
10827
+ rn as snapNodePosition,
10828
+ so as snapPointToGrid,
10829
+ Ot as snapToGrid,
10824
10830
  mr as stringifyNddJson,
10825
10831
  kr as useDiagramEditor,
10826
10832
  ct as useNiceTranslation