drizzle-cube 0.1.50 → 0.1.52

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.
@@ -854,13 +854,13 @@ function mw() {
854
854
  function Ny(e, t) {
855
855
  var r = [], n = null, s = null, a = 6, i = 6, o = 3, c = typeof window < "u" && window.devicePixelRatio > 1 ? 0 : 0.5, d = e === $n || e === dr ? -1 : 1, l = e === dr || e === Vn ? "x" : "y", f = e === $n || e === Cc ? cw : dw;
856
856
  function m(h) {
857
- var b = n ?? (t.ticks ? t.ticks.apply(t, r) : t.domain()), p = s ?? (t.tickFormat ? t.tickFormat.apply(t, r) : lw), g = Math.max(a, 0) + o, y = t.range(), v = +y[0] + c, S = +y[y.length - 1] + c, N = (t.bandwidth ? fw : uw)(t.copy(), c), R = h.selection ? h.selection() : h, w = R.selectAll(".domain").data([null]), C = R.selectAll(".tick").data(b, t).order(), T = C.exit(), _ = C.enter().append("g").attr("class", "tick"), A = C.select("line"), k = C.select("text");
858
- w = w.merge(w.enter().insert("path", ".tick").attr("class", "domain").attr("stroke", "currentColor")), C = C.merge(_), A = A.merge(_.append("line").attr("stroke", "currentColor").attr(l + "2", d * a)), k = k.merge(_.append("text").attr("fill", "currentColor").attr(l, d * g).attr("dy", e === $n ? "0em" : e === Cc ? "0.71em" : "0.32em")), h !== R && (w = w.transition(h), C = C.transition(h), A = A.transition(h), k = k.transition(h), T = T.transition(h).attr("opacity", Gd).attr("transform", function(F) {
857
+ var b = n ?? (t.ticks ? t.ticks.apply(t, r) : t.domain()), p = s ?? (t.tickFormat ? t.tickFormat.apply(t, r) : lw), g = Math.max(a, 0) + o, y = t.range(), v = +y[0] + c, _ = +y[y.length - 1] + c, N = (t.bandwidth ? fw : uw)(t.copy(), c), R = h.selection ? h.selection() : h, w = R.selectAll(".domain").data([null]), C = R.selectAll(".tick").data(b, t).order(), T = C.exit(), S = C.enter().append("g").attr("class", "tick"), A = C.select("line"), k = C.select("text");
858
+ w = w.merge(w.enter().insert("path", ".tick").attr("class", "domain").attr("stroke", "currentColor")), C = C.merge(S), A = A.merge(S.append("line").attr("stroke", "currentColor").attr(l + "2", d * a)), k = k.merge(S.append("text").attr("fill", "currentColor").attr(l, d * g).attr("dy", e === $n ? "0em" : e === Cc ? "0.71em" : "0.32em")), h !== R && (w = w.transition(h), C = C.transition(h), A = A.transition(h), k = k.transition(h), T = T.transition(h).attr("opacity", Gd).attr("transform", function(F) {
859
859
  return isFinite(F = N(F)) ? f(F + c) : this.getAttribute("transform");
860
- }), _.attr("opacity", Gd).attr("transform", function(F) {
860
+ }), S.attr("opacity", Gd).attr("transform", function(F) {
861
861
  var D = this.parentNode.__axis;
862
862
  return f((D && isFinite(D = D(F)) ? D : N(F)) + c);
863
- })), T.remove(), w.attr("d", e === dr || e === Vn ? i ? "M" + d * i + "," + v + "H" + c + "V" + S + "H" + d * i : "M" + c + "," + v + "V" + S : i ? "M" + v + "," + d * i + "V" + c + "H" + S + "V" + d * i : "M" + v + "," + c + "H" + S), C.attr("opacity", 1).attr("transform", function(F) {
863
+ })), T.remove(), w.attr("d", e === dr || e === Vn ? i ? "M" + d * i + "," + v + "H" + c + "V" + _ + "H" + d * i : "M" + c + "," + v + "V" + _ : i ? "M" + v + "," + d * i + "V" + c + "H" + _ + "V" + d * i : "M" + v + "," + c + "H" + _), C.attr("opacity", 1).attr("transform", function(F) {
864
864
  return f(N(F) + c);
865
865
  }), A.attr(l + "2", d * a), k.attr(l, d * g).text(p), R.filter(mw).attr("fill", "none").attr("font-size", 10).attr("font-family", "sans-serif").attr("text-anchor", e === Vn ? "start" : e === dr ? "end" : "middle"), R.each(function() {
866
866
  this.__axis = N;
@@ -1114,9 +1114,9 @@ function $w(e, t) {
1114
1114
  for (var a = s.length, i = new Array(a), o = new Array(a), c = new Array(a), d = 0; d < a; ++d) {
1115
1115
  var l = n[d], f = s[d], m = f.length, h = Vw(e.call(l, l && l.__data__, d, n)), b = h.length, p = o[d] = new Array(b), g = i[d] = new Array(b), y = c[d] = new Array(m);
1116
1116
  r(l, f, p, g, y, h, t);
1117
- for (var v = 0, S = 0, N, R; v < b; ++v)
1117
+ for (var v = 0, _ = 0, N, R; v < b; ++v)
1118
1118
  if (N = p[v]) {
1119
- for (v >= S && (S = v + 1); !(R = g[S]) && ++S < b; ) ;
1119
+ for (v >= _ && (_ = v + 1); !(R = g[_]) && ++_ < b; ) ;
1120
1120
  N._next = R || null;
1121
1121
  }
1122
1122
  }
@@ -1615,7 +1615,7 @@ function tN() {
1615
1615
  }
1616
1616
  function h(N, R) {
1617
1617
  if (!(l || !e.call(this, N, R))) {
1618
- var w = S(this, t.call(this, N, R), N, R, "mouse");
1618
+ var w = _(this, t.call(this, N, R), N, R, "mouse");
1619
1619
  w && (Ce(N.view).on("mousemove.drag", b, yr).on("mouseup.drag", p, yr), Oy(N.view), zn(N), d = !1, o = N.clientX, c = N.clientY, w("start", N));
1620
1620
  }
1621
1621
  }
@@ -1631,9 +1631,9 @@ function tN() {
1631
1631
  }
1632
1632
  function g(N, R) {
1633
1633
  if (e.call(this, N, R)) {
1634
- var w = N.changedTouches, C = t.call(this, N, R), T = w.length, _, A;
1635
- for (_ = 0; _ < T; ++_)
1636
- (A = S(this, C, N, R, w[_].identifier, w[_])) && (zn(N), A("start", N, w[_]));
1634
+ var w = N.changedTouches, C = t.call(this, N, R), T = w.length, S, A;
1635
+ for (S = 0; S < T; ++S)
1636
+ (A = _(this, C, N, R, w[S].identifier, w[S])) && (zn(N), A("start", N, w[S]));
1637
1637
  }
1638
1638
  }
1639
1639
  function y(N) {
@@ -1648,8 +1648,8 @@ function tN() {
1648
1648
  }, 500), C = 0; C < w; ++C)
1649
1649
  (T = s[R[C].identifier]) && (zn(N), T("end", N, R[C]));
1650
1650
  }
1651
- function S(N, R, w, C, T, _) {
1652
- var A = a.copy(), k = We(_ || w, R), F, D, x;
1651
+ function _(N, R, w, C, T, S) {
1652
+ var A = a.copy(), k = We(S || w, R), F, D, x;
1653
1653
  if ((x = r.call(N, new Tc("beforestart", {
1654
1654
  sourceEvent: w,
1655
1655
  target: m,
@@ -1787,13 +1787,13 @@ const cN = (function e(t, r, n) {
1787
1787
  ];
1788
1788
  };
1789
1789
  else {
1790
- var v = Math.sqrt(p), S = (m * m - d * d + n * p) / (2 * d * r * v), N = (m * m - d * d - n * p) / (2 * m * r * v), R = Math.log(Math.sqrt(S * S + 1) - S), w = Math.log(Math.sqrt(N * N + 1) - N);
1790
+ var v = Math.sqrt(p), _ = (m * m - d * d + n * p) / (2 * d * r * v), N = (m * m - d * d - n * p) / (2 * m * r * v), R = Math.log(Math.sqrt(_ * _ + 1) - _), w = Math.log(Math.sqrt(N * N + 1) - N);
1791
1791
  y = (w - R) / t, g = function(C) {
1792
- var T = C * y, _ = Xd(R), A = d / (r * v) * (_ * lN(t * T + R) - oN(R));
1792
+ var T = C * y, S = Xd(R), A = d / (r * v) * (S * lN(t * T + R) - oN(R));
1793
1793
  return [
1794
1794
  o + A * h,
1795
1795
  c + A * b,
1796
- d * _ / Xd(t * T + R)
1796
+ d * S / Xd(t * T + R)
1797
1797
  ];
1798
1798
  };
1799
1799
  }
@@ -2500,7 +2500,7 @@ function R_(e, t, r) {
2500
2500
  function Wy() {
2501
2501
  var e = C_, t = k_, r = R_, n = T_, s = A_, a = [0, 1 / 0], i = [[-1 / 0, -1 / 0], [1 / 0, 1 / 0]], o = 250, c = cN, d = dn("start", "zoom", "end"), l, f, m, h = 500, b = 150, p = 0, g = 10;
2502
2502
  function y(x) {
2503
- x.property("__zoom", nu).on("wheel.zoom", T, { passive: !1 }).on("mousedown.zoom", _).on("dblclick.zoom", A).filter(s).on("touchstart.zoom", k).on("touchmove.zoom", F).on("touchend.zoom touchcancel.zoom", D).style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
2503
+ x.property("__zoom", nu).on("wheel.zoom", T, { passive: !1 }).on("mousedown.zoom", S).on("dblclick.zoom", A).filter(s).on("touchstart.zoom", k).on("touchmove.zoom", F).on("touchend.zoom touchcancel.zoom", D).style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
2504
2504
  }
2505
2505
  y.transform = function(x, M, q, I) {
2506
2506
  var $ = x.selection ? x.selection() : x;
@@ -2515,7 +2515,7 @@ function Wy() {
2515
2515
  }, y.scaleTo = function(x, M, q, I) {
2516
2516
  y.transform(x, function() {
2517
2517
  var $ = t.apply(this, arguments), O = this.__zoom, H = q == null ? N($) : typeof q == "function" ? q.apply(this, arguments) : q, W = O.invert(H), Y = typeof M == "function" ? M.apply(this, arguments) : M;
2518
- return r(S(v(O, Y), H, W), $, i);
2518
+ return r(_(v(O, Y), H, W), $, i);
2519
2519
  }, q, I);
2520
2520
  }, y.translateBy = function(x, M, q, I) {
2521
2521
  y.transform(x, function() {
@@ -2536,7 +2536,7 @@ function Wy() {
2536
2536
  function v(x, M) {
2537
2537
  return M = Math.max(a[0], Math.min(a[1], M)), M === x.k ? x : new ht(M, x.x, x.y);
2538
2538
  }
2539
- function S(x, M, q) {
2539
+ function _(x, M, q) {
2540
2540
  var I = M[0] - q[0] * x.k, $ = M[1] - q[1] * x.k;
2541
2541
  return I === x.x && $ === x.y ? x : new ht(x.k, I, $);
2542
2542
  }
@@ -2603,12 +2603,12 @@ function Wy() {
2603
2603
  if (I.k === $) return;
2604
2604
  q.mouse = [O, I.invert(O)], Ur(this), q.start();
2605
2605
  }
2606
- ar(x), q.wheel = setTimeout(H, b), q.zoom("mouse", r(S(v(I, $), q.mouse[0], q.mouse[1]), q.extent, i));
2606
+ ar(x), q.wheel = setTimeout(H, b), q.zoom("mouse", r(_(v(I, $), q.mouse[0], q.mouse[1]), q.extent, i));
2607
2607
  function H() {
2608
2608
  q.wheel = null, q.end();
2609
2609
  }
2610
2610
  }
2611
- function _(x, ...M) {
2611
+ function S(x, ...M) {
2612
2612
  if (m || !e.apply(this, arguments)) return;
2613
2613
  var q = x.currentTarget, I = w(this, M, !0).event(x), $ = Ce(x.view).on("mousemove.zoom", Y, !0).on("mouseup.zoom", Q, !0), O = We(x, q), H = x.clientX, W = x.clientY;
2614
2614
  Oy(x.view), Bn(x), I.mouse = [O, this.__zoom.invert(O)], Ur(this), I.start();
@@ -2617,7 +2617,7 @@ function Wy() {
2617
2617
  var j = L.clientX - H, P = L.clientY - W;
2618
2618
  I.moved = j * j + P * P > p;
2619
2619
  }
2620
- I.event(L).zoom("mouse", r(S(I.that.__zoom, I.mouse[0] = We(L, q), I.mouse[1]), I.extent, i));
2620
+ I.event(L).zoom("mouse", r(_(I.that.__zoom, I.mouse[0] = We(L, q), I.mouse[1]), I.extent, i));
2621
2621
  }
2622
2622
  function Q(L) {
2623
2623
  $.on("mousemove.zoom mouseup.zoom", null), Fy(L.view, I.moved), ar(L), I.event(L).end();
@@ -2625,7 +2625,7 @@ function Wy() {
2625
2625
  }
2626
2626
  function A(x, ...M) {
2627
2627
  if (e.apply(this, arguments)) {
2628
- var q = this.__zoom, I = We(x.changedTouches ? x.changedTouches[0] : x, this), $ = q.invert(I), O = q.k * (x.shiftKey ? 0.5 : 2), H = r(S(v(q, O), I, $), t.apply(this, M), i);
2628
+ var q = this.__zoom, I = We(x.changedTouches ? x.changedTouches[0] : x, this), $ = q.invert(I), O = q.k * (x.shiftKey ? 0.5 : 2), H = r(_(v(q, O), I, $), t.apply(this, M), i);
2629
2629
  ar(x), o > 0 ? Ce(this).transition().duration(o).call(R, H, I, x) : Ce(this).call(y.transform, H, I, x);
2630
2630
  }
2631
2631
  }
@@ -2649,7 +2649,7 @@ function Wy() {
2649
2649
  H = v(H, Math.sqrt(G / B)), W = [(Q[0] + j[0]) / 2, (Q[1] + j[1]) / 2], Y = [(L[0] + P[0]) / 2, (L[1] + P[1]) / 2];
2650
2650
  } else if (q.touch0) W = q.touch0[0], Y = q.touch0[1];
2651
2651
  else return;
2652
- q.zoom("touch", r(S(H, W, Y), q.extent, i));
2652
+ q.zoom("touch", r(_(H, W, Y), q.extent, i));
2653
2653
  }
2654
2654
  }
2655
2655
  function D(x, ...M) {
@@ -2802,8 +2802,8 @@ function D_({
2802
2802
  colorPalette: a
2803
2803
  }) {
2804
2804
  const i = me(null), o = me(null), [, c] = Z(null), [d, l] = Z({ width: 0, height: 0 }), [f, m] = Z(!1), [h, b] = Z("light"), { getFieldLabel: p } = lt();
2805
- fe(() => (b(vr()), Ky((S) => {
2806
- b(S);
2805
+ fe(() => (b(vr()), Ky((_) => {
2806
+ b(_);
2807
2807
  })), []);
2808
2808
  const g = {
2809
2809
  showLegend: r?.showLegend ?? !0,
@@ -2815,19 +2815,19 @@ function D_({
2815
2815
  };
2816
2816
  return fy(() => {
2817
2817
  let v = 0;
2818
- const S = 10;
2818
+ const _ = 10;
2819
2819
  let N, R;
2820
2820
  const w = () => {
2821
2821
  if (o.current) {
2822
- const { width: T, height: _ } = o.current.getBoundingClientRect();
2823
- if (T > 0 && _ > 0)
2824
- return l({ width: T, height: _ }), m(!0), !0;
2822
+ const { width: T, height: S } = o.current.getBoundingClientRect();
2823
+ if (T > 0 && S > 0)
2824
+ return l({ width: T, height: S }), m(!0), !0;
2825
2825
  }
2826
2826
  return !1;
2827
2827
  };
2828
- if (!w() && v < S) {
2828
+ if (!w() && v < _) {
2829
2829
  const T = () => {
2830
- !w() && v < S && (v++, R = setTimeout(() => {
2830
+ !w() && v < _ && (v++, R = setTimeout(() => {
2831
2831
  N = requestAnimationFrame(T);
2832
2832
  }, 50 * v));
2833
2833
  };
@@ -2838,7 +2838,7 @@ function D_({
2838
2838
  };
2839
2839
  }, []), fe(() => {
2840
2840
  let v = null;
2841
- const S = () => {
2841
+ const _ = () => {
2842
2842
  if (o.current) {
2843
2843
  const { width: N, height: R } = o.current.getBoundingClientRect();
2844
2844
  N > 0 && R > 0 && (l({ width: N, height: R }), f || m(!0));
@@ -2849,17 +2849,17 @@ function D_({
2849
2849
  const { width: w, height: C } = R.contentRect;
2850
2850
  w > 0 && C > 0 && (l({ width: w, height: C }), f || m(!0));
2851
2851
  }
2852
- }), v.observe(o.current), S()), window.addEventListener("resize", S), () => {
2853
- v && v.disconnect(), window.removeEventListener("resize", S);
2852
+ }), v.observe(o.current), _()), window.addEventListener("resize", _), () => {
2853
+ v && v.disconnect(), window.removeEventListener("resize", _);
2854
2854
  };
2855
2855
  }, [f]), fe(() => {
2856
2856
  if (!e || e.length === 0 || !i.current || !f || d.width === 0 || (Ce(i.current).selectAll("*").remove(), !t?.xAxis || !t?.yAxis || !t?.series))
2857
2857
  return;
2858
- const v = Array.isArray(t.xAxis) ? t.xAxis[0] : t.xAxis, S = Array.isArray(t.yAxis) ? t.yAxis[0] : t.yAxis, N = Array.isArray(t.series) ? t.series[0] : t.series, R = Array.isArray(t.sizeField) ? t.sizeField[0] : t.sizeField || S, w = Array.isArray(t.colorField) ? t.colorField[0] : t.colorField;
2859
- if (!v || !S || !N || !R)
2858
+ const v = Array.isArray(t.xAxis) ? t.xAxis[0] : t.xAxis, _ = Array.isArray(t.yAxis) ? t.yAxis[0] : t.yAxis, N = Array.isArray(t.series) ? t.series[0] : t.series, R = Array.isArray(t.sizeField) ? t.sizeField[0] : t.sizeField || _, w = Array.isArray(t.colorField) ? t.colorField[0] : t.colorField;
2859
+ if (!v || !_ || !N || !R)
2860
2860
  return;
2861
2861
  const C = A0(n, v), T = e.map((B) => {
2862
- const U = vy(B[v], C) || B[v], V = $d(B[S]), ae = $d(B[R]), ie = typeof U == "string" ? parseFloat(U) : U, pe = B[N];
2862
+ const U = vy(B[v], C) || B[v], V = $d(B[_]), ae = $d(B[R]), ie = typeof U == "string" ? parseFloat(U) : U, pe = B[N];
2863
2863
  return {
2864
2864
  x: ie,
2865
2865
  y: V,
@@ -2873,13 +2873,13 @@ function D_({
2873
2873
  };
2874
2874
  }).filter((B) => B.isValid && B.size > 0);
2875
2875
  if (T.length === 0) return;
2876
- const _ = {
2876
+ const S = {
2877
2877
  ...Vd,
2878
2878
  left: Vd.left + 30,
2879
2879
  // Add extra 30px left margin for Y-axis label
2880
2880
  bottom: g.showLegend && w ? 100 : 40
2881
2881
  // Add extra space for legend
2882
- }, A = d.width - _.left - _.right, k = d.height - _.top - _.bottom, F = Ce(i.current).attr("width", d.width).attr("height", d.height), D = F.append("g").attr("transform", `translate(${_.left},${_.top})`), x = zd().domain(Hd(T, (B) => B.x)).range([0, A]).nice(), M = zd().domain(Hd(T, (B) => B.y)).range([k, 0]).nice(), q = S_().domain([0, Ec(T, (B) => B.size)]).range([g.minBubbleSize, g.maxBubbleSize]);
2882
+ }, A = d.width - S.left - S.right, k = d.height - S.top - S.bottom, F = Ce(i.current).attr("width", d.width).attr("height", d.height), D = F.append("g").attr("transform", `translate(${S.left},${S.top})`), x = zd().domain(Hd(T, (B) => B.x)).range([0, A]).nice(), M = zd().domain(Hd(T, (B) => B.y)).range([k, 0]).nice(), q = S_().domain([0, Ec(T, (B) => B.size)]).range([g.minBubbleSize, g.maxBubbleSize]);
2883
2883
  let I, $ = !1, O = [];
2884
2884
  if (w && T.length > 0) {
2885
2885
  const B = T.map((U) => {
@@ -2907,14 +2907,14 @@ function D_({
2907
2907
  const L = D.append("g").attr("transform", `translate(0,${k})`).call(Ud(x));
2908
2908
  L.selectAll("text").style("fill", Y), L.selectAll("line, path").style("stroke", Q), L.append("text").attr("x", A / 2).attr("y", 35).attr("fill", Y).style("text-anchor", "middle").style("font-size", "12px").text(p(v));
2909
2909
  const j = D.append("g").call(Wd(M));
2910
- j.selectAll("text").style("fill", Y), j.selectAll("line, path").style("stroke", Q), j.append("text").attr("transform", "rotate(-90)").attr("y", -35).attr("x", -k / 2).attr("fill", Y).style("text-anchor", "middle").style("font-size", "12px").text(p(S));
2910
+ j.selectAll("text").style("fill", Y), j.selectAll("line, path").style("stroke", Q), j.append("text").attr("transform", "rotate(-90)").attr("y", -35).attr("x", -k / 2).attr("fill", Y).style("text-anchor", "middle").style("font-size", "12px").text(p(_));
2911
2911
  const P = Ce("body").append("div").attr("class", "bubble-chart-tooltip").style("position", "absolute").style("padding", "8px").style("background", "rgba(0, 0, 0, 0.8)").style("color", "white").style("border-radius", "4px").style("font-size", "12px").style("pointer-events", "none").style("opacity", 0).style("z-index", 1e3), G = D.selectAll(".bubble").data(T).enter().append("circle").attr("class", "bubble").attr("cx", (B) => x(B.x)).attr("cy", (B) => M(B.y)).attr("r", (B) => q(B.size)).style("fill", (B) => w && B.color !== void 0 ? I($ ? B.color : String(B.color)) : Ln[0]).style("opacity", g.bubbleOpacity).style("stroke", "#fff").style("stroke-width", 1).style("cursor", "pointer");
2912
2912
  if (g.showTooltip && G.on("mouseover", function(B, U) {
2913
2913
  Ce(this).transition().duration(200).style("opacity", 1).attr("r", q(U.size) * 1.1);
2914
2914
  const V = [
2915
2915
  `<strong>${U.series || "Unknown"}</strong>`,
2916
2916
  `${p(v)}: ${U.x}`,
2917
- `${p(S)}: ${U.y}`,
2917
+ `${p(_)}: ${U.y}`,
2918
2918
  `${p(R)}: ${U.size}`,
2919
2919
  w && U.color ? `${p(w)}: ${U.color}` : ""
2920
2920
  ].filter(Boolean).join("<br>");
@@ -2964,8 +2964,8 @@ function q_({
2964
2964
  colorPalette: a
2965
2965
  }) {
2966
2966
  const i = me(null), o = me(null), [c, d] = Z({ width: 0, height: 0 }), [l, f] = Z(!1), [m, h] = Z("light"), { getFieldLabel: b } = lt();
2967
- fe(() => (h(vr()), Ky((_) => {
2968
- h(_);
2967
+ fe(() => (h(vr()), Ky((S) => {
2968
+ h(S);
2969
2969
  })), []);
2970
2970
  const p = {
2971
2971
  showTooltip: r?.showTooltip ?? !0,
@@ -2974,7 +2974,7 @@ function q_({
2974
2974
  };
2975
2975
  fy(() => {
2976
2976
  let T = 0;
2977
- const _ = 10;
2977
+ const S = 10;
2978
2978
  let A, k;
2979
2979
  const F = () => {
2980
2980
  if (o.current) {
@@ -2984,9 +2984,9 @@ function q_({
2984
2984
  }
2985
2985
  return !1;
2986
2986
  };
2987
- if (!F() && T < _) {
2987
+ if (!F() && T < S) {
2988
2988
  const x = () => {
2989
- !F() && T < _ && (T++, k = setTimeout(() => {
2989
+ !F() && T < S && (T++, k = setTimeout(() => {
2990
2990
  A = requestAnimationFrame(x);
2991
2991
  }, 50 * T));
2992
2992
  };
@@ -2997,134 +2997,134 @@ function q_({
2997
2997
  };
2998
2998
  }, []), fe(() => {
2999
2999
  let T = null;
3000
- const _ = () => {
3000
+ const S = () => {
3001
3001
  if (o.current) {
3002
3002
  const { width: A, height: k } = o.current.getBoundingClientRect();
3003
3003
  A > 0 && k > 0 && (d({ width: A, height: k }), l || f(!0));
3004
3004
  }
3005
3005
  };
3006
- return o.current && (T = new ResizeObserver(() => _()), T.observe(o.current), _()), window.addEventListener("resize", _), () => {
3007
- T && T.disconnect(), window.removeEventListener("resize", _);
3006
+ return o.current && (T = new ResizeObserver(() => S()), T.observe(o.current), S()), window.addEventListener("resize", S), () => {
3007
+ T && T.disconnect(), window.removeEventListener("resize", S);
3008
3008
  };
3009
3009
  }, [l]);
3010
3010
  const g = (T) => Math.floor(T.getMonth() / 3) + 1, y = (T) => T.getMonth() % 3 + 1, v = (T) => {
3011
- const _ = T.getDate();
3012
- return Math.floor((_ - 1) / 7) + 1;
3013
- }, S = (T) => {
3011
+ const S = T.getDate();
3012
+ return Math.floor((S - 1) / 7) + 1;
3013
+ }, _ = (T) => {
3014
3014
  switch (T?.toLowerCase()) {
3015
3015
  case "year":
3016
3016
  return null;
3017
3017
  case "quarter":
3018
3018
  return {
3019
- extractX: (_) => _.getFullYear(),
3020
- extractY: (_) => g(_) - 1,
3019
+ extractX: (S) => S.getFullYear(),
3020
+ extractY: (S) => g(S) - 1,
3021
3021
  // 0-3 for indexing
3022
3022
  xLabels: [],
3023
3023
  // Will be determined from data
3024
3024
  yLabels: ["Q1", "Q2", "Q3", "Q4"],
3025
- xFormat: (_) => `'${_.toString().slice(-2)}`,
3025
+ xFormat: (S) => `'${S.toString().slice(-2)}`,
3026
3026
  // '24 instead of 2024
3027
- yFormat: (_) => ["Q1", "Q2", "Q3", "Q4"][_] || "",
3027
+ yFormat: (S) => ["Q1", "Q2", "Q3", "Q4"][S] || "",
3028
3028
  cellWidth: 16,
3029
3029
  cellHeight: 16
3030
3030
  };
3031
3031
  case "month":
3032
3032
  return {
3033
- extractX: (_) => {
3034
- const A = _.getFullYear(), k = g(_);
3033
+ extractX: (S) => {
3034
+ const A = S.getFullYear(), k = g(S);
3035
3035
  return A * 10 + k;
3036
3036
  },
3037
- extractY: (_) => y(_) - 1,
3037
+ extractY: (S) => y(S) - 1,
3038
3038
  // 0-2 for indexing
3039
3039
  xLabels: [],
3040
3040
  // Will be determined from data
3041
3041
  yLabels: ["Month 1", "Month 2", "Month 3"],
3042
- xFormat: (_) => `Q${_ % 10}`,
3043
- yFormat: (_) => ["Month 1", "Month 2", "Month 3"][_] || "",
3042
+ xFormat: (S) => `Q${S % 10}`,
3043
+ yFormat: (S) => ["Month 1", "Month 2", "Month 3"][S] || "",
3044
3044
  cellWidth: 16,
3045
3045
  cellHeight: 16,
3046
3046
  hasHierarchicalLabels: !0,
3047
3047
  // Flag to indicate we need special handling
3048
- getYearFromX: (_) => Math.floor(_ / 10)
3048
+ getYearFromX: (S) => Math.floor(S / 10)
3049
3049
  // Helper to get year for grouping
3050
3050
  };
3051
3051
  case "week":
3052
3052
  return {
3053
- extractX: (_) => {
3054
- const A = _.getFullYear(), k = _.getMonth() + 1;
3053
+ extractX: (S) => {
3054
+ const A = S.getFullYear(), k = S.getMonth() + 1;
3055
3055
  return A * 100 + k;
3056
3056
  },
3057
- extractY: (_) => v(_) - 1,
3057
+ extractY: (S) => v(S) - 1,
3058
3058
  // 0-5 for indexing
3059
3059
  xLabels: [],
3060
3060
  // Will be determined from data
3061
3061
  yLabels: ["Week 1", "Week 2", "Week 3", "Week 4", "Week 5"],
3062
- xFormat: (_) => {
3063
- const A = _ % 100;
3062
+ xFormat: (S) => {
3063
+ const A = S % 100;
3064
3064
  return ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"][A - 1] || "";
3065
3065
  },
3066
- yFormat: (_) => ["Week 1", "Week 2", "Week 3", "Week 4", "Week 5"][_] || "",
3066
+ yFormat: (S) => ["Week 1", "Week 2", "Week 3", "Week 4", "Week 5"][S] || "",
3067
3067
  cellWidth: 16,
3068
3068
  cellHeight: 16,
3069
3069
  hasHierarchicalLabels: !0,
3070
3070
  // Add hierarchical labels like month view
3071
- getYearFromX: (_) => Math.floor(_ / 100)
3071
+ getYearFromX: (S) => Math.floor(S / 100)
3072
3072
  // Helper to get year for grouping
3073
3073
  };
3074
3074
  case "day":
3075
3075
  return {
3076
- extractX: (_) => {
3077
- const { year: A, week: k } = N(_);
3076
+ extractX: (S) => {
3077
+ const { year: A, week: k } = N(S);
3078
3078
  return A * 100 + k;
3079
3079
  },
3080
- extractY: (_) => _.getDay(),
3080
+ extractY: (S) => S.getDay(),
3081
3081
  // 0-6 (Sun-Sat)
3082
3082
  xLabels: [],
3083
3083
  // Will be determined from data
3084
3084
  yLabels: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
3085
- xFormat: (_) => `${_ % 100}`,
3086
- yFormat: (_) => ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"][_] || "",
3085
+ xFormat: (S) => `${S % 100}`,
3086
+ yFormat: (S) => ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"][S] || "",
3087
3087
  cellWidth: 16,
3088
3088
  cellHeight: 16,
3089
3089
  hasHierarchicalLabels: !0,
3090
3090
  // Add hierarchical labels
3091
- getYearFromX: (_) => Math.floor(_ / 100)
3091
+ getYearFromX: (S) => Math.floor(S / 100)
3092
3092
  // Helper to get year for grouping
3093
3093
  };
3094
3094
  case "hour":
3095
3095
  return {
3096
- extractX: (_) => {
3097
- const A = _.getFullYear(), k = _.getMonth() + 1, F = _.getDate();
3096
+ extractX: (S) => {
3097
+ const A = S.getFullYear(), k = S.getMonth() + 1, F = S.getDate();
3098
3098
  return A * 1e4 + k * 100 + F;
3099
3099
  },
3100
- extractY: (_) => Math.floor(_.getHours() / 3),
3100
+ extractY: (S) => Math.floor(S.getHours() / 3),
3101
3101
  // 0-7 for 8 three-hour blocks
3102
3102
  xLabels: [],
3103
3103
  // Will be determined from data
3104
3104
  yLabels: ["00-03", "03-06", "06-09", "09-12", "12-15", "15-18", "18-21", "21-00"],
3105
- xFormat: (_) => `${_ % 100}`,
3106
- yFormat: (_) => ["00-03", "03-06", "06-09", "09-12", "12-15", "15-18", "18-21", "21-00"][_] || "",
3105
+ xFormat: (S) => `${S % 100}`,
3106
+ yFormat: (S) => ["00-03", "03-06", "06-09", "09-12", "12-15", "15-18", "18-21", "21-00"][S] || "",
3107
3107
  cellWidth: 16,
3108
3108
  cellHeight: 16,
3109
3109
  hasHierarchicalLabels: !0,
3110
3110
  // Show year/month grouping above
3111
- getYearFromX: (_) => Math.floor(_ / 100)
3111
+ getYearFromX: (S) => Math.floor(S / 100)
3112
3112
  // Extract YYYYMM for month grouping
3113
3113
  };
3114
3114
  default:
3115
3115
  return null;
3116
3116
  }
3117
3117
  }, N = (T) => {
3118
- const _ = new Date(Date.UTC(T.getFullYear(), T.getMonth(), T.getDate())), A = _.getUTCDay() || 7;
3119
- _.setUTCDate(_.getUTCDate() + 4 - A);
3120
- const k = _.getUTCFullYear(), F = new Date(Date.UTC(k, 0, 1)), D = Math.ceil(((_.getTime() - F.getTime()) / 864e5 + 1) / 7);
3118
+ const S = new Date(Date.UTC(T.getFullYear(), T.getMonth(), T.getDate())), A = S.getUTCDay() || 7;
3119
+ S.setUTCDate(S.getUTCDate() + 4 - A);
3120
+ const k = S.getUTCFullYear(), F = new Date(Date.UTC(k, 0, 1)), D = Math.ceil(((S.getTime() - F.getTime()) / 864e5 + 1) / 7);
3121
3121
  return { year: k, week: D };
3122
3122
  };
3123
3123
  if (fe(() => {
3124
3124
  if (!e || e.length === 0 || !i.current || !l || c.width === 0 || (Ce(i.current).selectAll("*").remove(), !t?.dateField || !t?.valueField))
3125
3125
  return;
3126
- const T = Array.isArray(t.dateField) ? t.dateField[0] : t.dateField, _ = Array.isArray(t.valueField) ? t.valueField[0] : t.valueField;
3127
- if (!T || !_)
3126
+ const T = Array.isArray(t.dateField) ? t.dateField[0] : t.dateField, S = Array.isArray(t.valueField) ? t.valueField[0] : t.valueField;
3127
+ if (!T || !S)
3128
3128
  return;
3129
3129
  const k = (() => {
3130
3130
  if (!n?.timeDimensions || n.timeDimensions.length === 0)
@@ -3136,11 +3136,11 @@ function q_({
3136
3136
  return X.granularity;
3137
3137
  const se = n.timeDimensions[0];
3138
3138
  return se && se.granularity ? se.granularity : "day";
3139
- })(), F = S(k);
3139
+ })(), F = _(k);
3140
3140
  if (!F)
3141
3141
  return;
3142
3142
  const D = e.map((X) => {
3143
- const se = X[T], oe = typeof X[_] == "string" ? parseFloat(X[_]) : X[_] || 0;
3143
+ const se = X[T], oe = typeof X[S] == "string" ? parseFloat(X[S]) : X[S] || 0;
3144
3144
  let ue;
3145
3145
  if (typeof se == "string") {
3146
3146
  let Ne = se;
@@ -3195,7 +3195,7 @@ function q_({
3195
3195
  if (Ce(this).style("stroke", "#000").style("stroke-width", 2), ue) {
3196
3196
  const qe = [
3197
3197
  `<strong>${ue.label}</strong>`,
3198
- `${b(_)}: ${ue.value}`
3198
+ `${b(S)}: ${ue.value}`
3199
3199
  ].join("<br>");
3200
3200
  ee.html(qe).style("left", Ne.pageX + 10 + "px").style("top", Ne.pageY - 10 + "px").transition().duration(200).style("opacity", 1);
3201
3201
  }
@@ -3317,7 +3317,7 @@ function Yy({
3317
3317
  },
3318
3318
  children: [
3319
3319
  l.map((g, y) => {
3320
- const v = m > 0 ? g / m : 0, S = 0.1, N = g > 0 ? Math.max(S, v) : S;
3320
+ const v = m > 0 ? g / m : 0, _ = 0.1, N = g > 0 ? Math.max(_, v) : _;
3321
3321
  return /* @__PURE__ */ u(
3322
3322
  "div",
3323
3323
  {
@@ -3524,7 +3524,7 @@ function I_({
3524
3524
  ]
3525
3525
  }
3526
3526
  );
3527
- const y = p.reduce((D, x) => D + x, 0) / p.length, v = Math.min(...p), S = Math.max(...p), N = (D) => {
3527
+ const y = p.reduce((D, x) => D + x, 0) / p.length, v = Math.min(...p), _ = Math.max(...p), N = (D) => {
3528
3528
  if (r.formatValue)
3529
3529
  return r.formatValue(D);
3530
3530
  if (D == null)
@@ -3539,7 +3539,7 @@ function I_({
3539
3539
  return s.colors[D];
3540
3540
  }
3541
3541
  return s?.colors?.[0] || "#1f2937";
3542
- })(), _ = M0(r?.target || ""), A = _.length > 0 ? _[0] : null, k = A !== null ? q0(R, A) : null, F = () => {
3542
+ })(), S = M0(r?.target || ""), A = S.length > 0 ? S[0] : null, k = A !== null ? q0(R, A) : null, F = () => {
3543
3543
  if (k === null) return "#6B7280";
3544
3544
  if (k >= 0) {
3545
3545
  const D = r.positiveColorIndex ?? 1;
@@ -3632,7 +3632,7 @@ function I_({
3632
3632
  {
3633
3633
  values: p,
3634
3634
  min: v,
3635
- max: S,
3635
+ max: _,
3636
3636
  color: T,
3637
3637
  formatValue: N,
3638
3638
  height: 24,
@@ -3686,14 +3686,14 @@ function O_({
3686
3686
  }
3687
3687
  }
3688
3688
  ),
3689
- d.map((v, S) => {
3690
- const N = Math.abs(v) / g, R = Math.max(2, N * (i - 4)), w = v >= 0, C = S === c.length - 1, T = w ? r : n, _ = S * (p + h);
3689
+ d.map((v, _) => {
3690
+ const N = Math.abs(v) / g, R = Math.max(2, N * (i - 4)), w = v >= 0, C = _ === c.length - 1, T = w ? r : n, S = _ * (p + h);
3691
3691
  return /* @__PURE__ */ u(
3692
3692
  "div",
3693
3693
  {
3694
3694
  className: "absolute rounded-xs",
3695
3695
  style: {
3696
- left: `${_}px`,
3696
+ left: `${S}px`,
3697
3697
  width: `${p}px`,
3698
3698
  height: `${R}px`,
3699
3699
  backgroundColor: T,
@@ -3702,9 +3702,9 @@ function O_({
3702
3702
  ...w ? { bottom: `${100 - y}%` } : { top: `${y}%` },
3703
3703
  zIndex: 2
3704
3704
  },
3705
- title: `${s(c[S])}: ${v >= 0 ? "+" : ""}${s(v)} vs current`
3705
+ title: `${s(c[_])}: ${v >= 0 ? "+" : ""}${s(v)} vs current`
3706
3706
  },
3707
- S
3707
+ _
3708
3708
  );
3709
3709
  })
3710
3710
  ]
@@ -3813,7 +3813,7 @@ function F_({
3813
3813
  ] })
3814
3814
  }
3815
3815
  );
3816
- const v = y[y.length - 1], S = y[y.length - 2], N = v - S, R = S !== 0 ? N / Math.abs(S) * 100 : 0, w = N >= 0, C = (D) => {
3816
+ const v = y[y.length - 1], _ = y[y.length - 2], N = v - _, R = _ !== 0 ? N / Math.abs(_) * 100 : 0, w = N >= 0, C = (D) => {
3817
3817
  if (r.formatValue)
3818
3818
  return r.formatValue(D);
3819
3819
  if (D == null)
@@ -3828,14 +3828,14 @@ function F_({
3828
3828
  return s.colors[D];
3829
3829
  }
3830
3830
  return "#10b981";
3831
- }, _ = () => {
3831
+ }, S = () => {
3832
3832
  if (r.negativeColorIndex !== void 0 && s?.colors) {
3833
3833
  const D = r.negativeColorIndex;
3834
3834
  if (D >= 0 && D < s.colors.length)
3835
3835
  return s.colors[D];
3836
3836
  }
3837
3837
  return "#ef4444";
3838
- }, A = T(), k = _(), F = w ? A : k;
3838
+ }, A = T(), k = S(), F = w ? A : k;
3839
3839
  return /* @__PURE__ */ E(
3840
3840
  "div",
3841
3841
  {
@@ -4035,8 +4035,8 @@ function P_({
4035
4035
  }
4036
4036
  );
4037
4037
  const p = b.map((A) => Number(A)).filter((A) => !isNaN(A));
4038
- let g, y = null, v = null, S = !1;
4039
- p.length > 0 ? b.length === 1 ? g = b[0] : (g = p.reduce((F, D) => F + D, 0) / p.length, y = Math.min(...p), v = Math.max(...p), S = !0) : g = b.length === 1 ? b[0] : b.join(", ");
4038
+ let g, y = null, v = null, _ = !1;
4039
+ p.length > 0 ? b.length === 1 ? g = b[0] : (g = p.reduce((F, D) => F + D, 0) / p.length, y = Math.min(...p), v = Math.max(...p), _ = !0) : g = b.length === 1 ? b[0] : b.join(", ");
4040
4040
  const N = (A) => {
4041
4041
  if (r.formatValue)
4042
4042
  return r.formatValue(A);
@@ -4059,7 +4059,7 @@ function P_({
4059
4059
  } catch {
4060
4060
  return String(k);
4061
4061
  }
4062
- }, w = r.template || "${fieldLabel}: ${value}", C = R(w, g), _ = (() => {
4062
+ }, w = r.template || "${fieldLabel}: ${value}", C = R(w, g), S = (() => {
4063
4063
  if (r.valueColorIndex !== void 0 && s?.colors) {
4064
4064
  const A = r.valueColorIndex;
4065
4065
  if (A >= 0 && A < s.colors.length)
@@ -4084,18 +4084,18 @@ function P_({
4084
4084
  className: "font-bold leading-tight text-center",
4085
4085
  style: {
4086
4086
  fontSize: `${a}px`,
4087
- color: _
4087
+ color: S
4088
4088
  },
4089
4089
  children: C
4090
4090
  }
4091
4091
  ),
4092
- S && y !== null && v !== null && /* @__PURE__ */ u("div", { className: "mt-4", children: /* @__PURE__ */ u(
4092
+ _ && y !== null && v !== null && /* @__PURE__ */ u("div", { className: "mt-4", children: /* @__PURE__ */ u(
4093
4093
  Yy,
4094
4094
  {
4095
4095
  values: b,
4096
4096
  min: y,
4097
4097
  max: v,
4098
- color: _,
4098
+ color: S,
4099
4099
  formatValue: N,
4100
4100
  height: 24,
4101
4101
  width: o || 200
@@ -4121,16 +4121,16 @@ function L_({
4121
4121
  }, f = (g) => {
4122
4122
  const y = g.split(`
4123
4123
  `), v = [];
4124
- let S = null;
4124
+ let _ = null;
4125
4125
  for (let N = 0; N < y.length; N++) {
4126
4126
  const R = y[N].trim();
4127
4127
  if (!R) {
4128
- S && (v.push(S), S = null), v.push({ type: "break" });
4128
+ _ && (v.push(_), _ = null), v.push({ type: "break" });
4129
4129
  continue;
4130
4130
  }
4131
4131
  const w = R.match(/^(#{1,3})\s+(.*)$/);
4132
4132
  if (w) {
4133
- S && (v.push(S), S = null), v.push({
4133
+ _ && (v.push(_), _ = null), v.push({
4134
4134
  type: "header",
4135
4135
  level: w[1].length,
4136
4136
  content: w[2]
@@ -4139,7 +4139,7 @@ function L_({
4139
4139
  }
4140
4140
  const C = R.match(/^[-*+]\s+(.*)$/);
4141
4141
  if (C) {
4142
- (!S || S.ordered) && (S && v.push(S), S = { type: "list", ordered: !1, children: [] }), S.children.push({
4142
+ (!_ || _.ordered) && (_ && v.push(_), _ = { type: "list", ordered: !1, children: [] }), _.children.push({
4143
4143
  type: "listItem",
4144
4144
  children: m(C[1]),
4145
4145
  parentOrdered: !1
@@ -4148,26 +4148,26 @@ function L_({
4148
4148
  }
4149
4149
  const T = R.match(/^\d+\.\s+(.*)$/);
4150
4150
  if (T) {
4151
- (!S || !S.ordered) && (S && v.push(S), S = { type: "list", ordered: !0, children: [] }), S.children.push({
4151
+ (!_ || !_.ordered) && (_ && v.push(_), _ = { type: "list", ordered: !0, children: [] }), _.children.push({
4152
4152
  type: "listItem",
4153
4153
  children: m(T[1]),
4154
4154
  parentOrdered: !0
4155
4155
  });
4156
4156
  continue;
4157
4157
  }
4158
- S && (v.push(S), S = null), v.push({
4158
+ _ && (v.push(_), _ = null), v.push({
4159
4159
  type: "paragraph",
4160
4160
  children: m(R)
4161
4161
  });
4162
4162
  }
4163
- return S && v.push(S), v;
4163
+ return _ && v.push(_), v;
4164
4164
  }, m = (g) => {
4165
4165
  const y = [];
4166
4166
  let v = g;
4167
4167
  for (; v; ) {
4168
- const S = v.match(/^(.*?)\[([^\]]+)\]\(([^)]+)\)(.*)$/);
4169
- if (S) {
4170
- const [, N, R, w, C] = S;
4168
+ const _ = v.match(/^(.*?)\[([^\]]+)\]\(([^)]+)\)(.*)$/);
4169
+ if (_) {
4170
+ const [, N, R, w, C] = _;
4171
4171
  N && y.push(...h(N)), y.push({
4172
4172
  type: "link",
4173
4173
  content: R,
@@ -4183,9 +4183,9 @@ function L_({
4183
4183
  const y = [];
4184
4184
  let v = g;
4185
4185
  for (; v; ) {
4186
- const S = v.match(/^(.*?)\*\*([^*]+)\*\*(.*)$/);
4187
- if (S) {
4188
- const [, R, w, C] = S;
4186
+ const _ = v.match(/^(.*?)\*\*([^*]+)\*\*(.*)$/);
4187
+ if (_) {
4188
+ const [, R, w, C] = _;
4189
4189
  R && y.push({ type: "text", content: R }), y.push({ type: "bold", content: w }), v = C;
4190
4190
  continue;
4191
4191
  }
@@ -4221,19 +4221,19 @@ function L_({
4221
4221
  y
4222
4222
  );
4223
4223
  case "header":
4224
- const S = (C, T) => {
4225
- const _ = "font-bold", A = {
4224
+ const _ = (C, T) => {
4225
+ const S = "font-bold", A = {
4226
4226
  1: "mb-4",
4227
4227
  2: "mb-3",
4228
4228
  3: "mb-2"
4229
4229
  };
4230
4230
  let k = "";
4231
- return T === "small" ? k = { 1: "text-lg", 2: "text-base", 3: "text-sm" }[C] || "text-sm" : T === "large" ? k = { 1: "text-5xl", 2: "text-4xl", 3: "text-3xl" }[C] || "text-3xl" : k = { 1: "text-3xl", 2: "text-2xl", 3: "text-xl" }[C] || "text-xl", `${_} ${k} ${A[C]}`;
4231
+ return T === "small" ? k = { 1: "text-lg", 2: "text-base", 3: "text-sm" }[C] || "text-sm" : T === "large" ? k = { 1: "text-5xl", 2: "text-4xl", 3: "text-3xl" }[C] || "text-3xl" : k = { 1: "text-3xl", 2: "text-2xl", 3: "text-xl" }[C] || "text-xl", `${S} ${k} ${A[C]}`;
4232
4232
  }, N = `h${g.level}`;
4233
4233
  return /* @__PURE__ */ u(
4234
4234
  N,
4235
4235
  {
4236
- className: S(g.level, a),
4236
+ className: _(g.level, a),
4237
4237
  style: { color: c },
4238
4238
  children: g.content
4239
4239
  },
@@ -4261,9 +4261,9 @@ function L_({
4261
4261
  ]
4262
4262
  }
4263
4263
  ),
4264
- /* @__PURE__ */ u("span", { className: "text-center", children: g.children.map((T, _) => b(T, _)) })
4264
+ /* @__PURE__ */ u("span", { className: "text-center", children: g.children.map((T, S) => b(T, S)) })
4265
4265
  ] }, y) : i === "right" ? /* @__PURE__ */ E("li", { className: "mb-1 flex items-start justify-end", children: [
4266
- /* @__PURE__ */ u("span", { className: "text-right", children: g.children.map((T, _) => b(T, _)) }),
4266
+ /* @__PURE__ */ u("span", { className: "text-right", children: g.children.map((T, S) => b(T, S)) }),
4267
4267
  /* @__PURE__ */ E(
4268
4268
  "span",
4269
4269
  {
@@ -4287,7 +4287,7 @@ function L_({
4287
4287
  ]
4288
4288
  }
4289
4289
  ),
4290
- /* @__PURE__ */ u("span", { className: "flex-1", children: g.children.map((T, _) => b(T, _)) })
4290
+ /* @__PURE__ */ u("span", { className: "flex-1", children: g.children.map((T, S) => b(T, S)) })
4291
4291
  ] }, y);
4292
4292
  }
4293
4293
  return i === "center" ? /* @__PURE__ */ E("li", { className: "mb-1 flex items-center justify-center", children: [
@@ -4400,8 +4400,8 @@ function Zy(e) {
4400
4400
  function su(e) {
4401
4401
  if (e.dateRange)
4402
4402
  return e.dateRange;
4403
- if (e.values && e.values.length >= 2)
4404
- return e.values;
4403
+ if (e.values && e.values.length > 0)
4404
+ return e.values.length === 1 ? e.values[0] : e.values;
4405
4405
  }
4406
4406
  function B_(e, t, r) {
4407
4407
  if (!r || r.length === 0 || !t || t.length === 0)
@@ -4458,8 +4458,8 @@ const Yc = on(({
4458
4458
  } catch (k) {
4459
4459
  return console.error("AnalyticsPortlet: Invalid query JSON:", k), null;
4460
4460
  }
4461
- }, [e, h, y, s, a]), S = !v || y || !i && !o, { resultSet: N, isLoading: R, error: w } = zx(v, {
4462
- skip: S,
4461
+ }, [e, h, y, s, a]), _ = !v || y || !i && !o, { resultSet: N, isLoading: R, error: w } = zx(v, {
4462
+ skip: _,
4463
4463
  resetResultSetOnChange: !0
4464
4464
  });
4465
4465
  my(m, () => ({
@@ -4531,7 +4531,7 @@ const Yc = on(({
4531
4531
  /* @__PURE__ */ u("div", { className: "text-xs", children: "Invalid query or no results" })
4532
4532
  ] }) });
4533
4533
  }
4534
- const _ = (() => {
4534
+ const S = (() => {
4535
4535
  if (y)
4536
4536
  return [];
4537
4537
  if (!N)
@@ -4563,7 +4563,7 @@ const Yc = on(({
4563
4563
  return /* @__PURE__ */ u(
4564
4564
  z0,
4565
4565
  {
4566
- data: _,
4566
+ data: S,
4567
4567
  chartConfig: r,
4568
4568
  displayConfig: n,
4569
4569
  queryObject: v,
@@ -4575,7 +4575,7 @@ const Yc = on(({
4575
4575
  return /* @__PURE__ */ u(
4576
4576
  V0,
4577
4577
  {
4578
- data: _,
4578
+ data: S,
4579
4579
  chartConfig: r,
4580
4580
  displayConfig: n,
4581
4581
  queryObject: v,
@@ -4587,7 +4587,7 @@ const Yc = on(({
4587
4587
  return /* @__PURE__ */ u(
4588
4588
  $0,
4589
4589
  {
4590
- data: _,
4590
+ data: S,
4591
4591
  chartConfig: r,
4592
4592
  displayConfig: n,
4593
4593
  queryObject: v,
@@ -4599,7 +4599,7 @@ const Yc = on(({
4599
4599
  return /* @__PURE__ */ u(
4600
4600
  L0,
4601
4601
  {
4602
- data: _,
4602
+ data: S,
4603
4603
  chartConfig: r,
4604
4604
  displayConfig: n,
4605
4605
  queryObject: v,
@@ -4611,7 +4611,7 @@ const Yc = on(({
4611
4611
  return /* @__PURE__ */ u(
4612
4612
  P0,
4613
4613
  {
4614
- data: _,
4614
+ data: S,
4615
4615
  chartConfig: r,
4616
4616
  displayConfig: n,
4617
4617
  queryObject: v,
@@ -4623,7 +4623,7 @@ const Yc = on(({
4623
4623
  return /* @__PURE__ */ u(
4624
4624
  F0,
4625
4625
  {
4626
- data: _,
4626
+ data: S,
4627
4627
  chartConfig: r,
4628
4628
  displayConfig: n,
4629
4629
  queryObject: v,
@@ -4635,7 +4635,7 @@ const Yc = on(({
4635
4635
  return /* @__PURE__ */ u(
4636
4636
  O0,
4637
4637
  {
4638
- data: _,
4638
+ data: S,
4639
4639
  chartConfig: r,
4640
4640
  displayConfig: n,
4641
4641
  queryObject: v,
@@ -4647,7 +4647,7 @@ const Yc = on(({
4647
4647
  return /* @__PURE__ */ u(
4648
4648
  I0,
4649
4649
  {
4650
- data: _,
4650
+ data: S,
4651
4651
  chartConfig: r,
4652
4652
  displayConfig: n,
4653
4653
  queryObject: v,
@@ -4659,7 +4659,7 @@ const Yc = on(({
4659
4659
  return /* @__PURE__ */ u(
4660
4660
  D_,
4661
4661
  {
4662
- data: _,
4662
+ data: S,
4663
4663
  chartConfig: r,
4664
4664
  displayConfig: n,
4665
4665
  queryObject: v,
@@ -4671,7 +4671,7 @@ const Yc = on(({
4671
4671
  return /* @__PURE__ */ u(
4672
4672
  wy,
4673
4673
  {
4674
- data: _,
4674
+ data: S,
4675
4675
  chartConfig: r,
4676
4676
  displayConfig: n,
4677
4677
  queryObject: v,
@@ -4683,7 +4683,7 @@ const Yc = on(({
4683
4683
  return /* @__PURE__ */ u(
4684
4684
  q_,
4685
4685
  {
4686
- data: _,
4686
+ data: S,
4687
4687
  chartConfig: r,
4688
4688
  displayConfig: n,
4689
4689
  queryObject: v,
@@ -4696,7 +4696,7 @@ const Yc = on(({
4696
4696
  return /* @__PURE__ */ u(
4697
4697
  I_,
4698
4698
  {
4699
- data: _,
4699
+ data: S,
4700
4700
  chartConfig: r,
4701
4701
  displayConfig: n,
4702
4702
  queryObject: v,
@@ -4708,7 +4708,7 @@ const Yc = on(({
4708
4708
  return /* @__PURE__ */ u(
4709
4709
  F_,
4710
4710
  {
4711
- data: _,
4711
+ data: S,
4712
4712
  chartConfig: r,
4713
4713
  displayConfig: n,
4714
4714
  queryObject: v,
@@ -4720,7 +4720,7 @@ const Yc = on(({
4720
4720
  return /* @__PURE__ */ u(
4721
4721
  P_,
4722
4722
  {
4723
- data: _,
4723
+ data: S,
4724
4724
  chartConfig: r,
4725
4725
  displayConfig: n,
4726
4726
  queryObject: v,
@@ -4967,18 +4967,18 @@ function G_() {
4967
4967
  function() {
4968
4968
  function y(w) {
4969
4969
  if (!v) {
4970
- if (v = !0, S = w, w = m(w), h !== void 0 && p.hasValue) {
4970
+ if (v = !0, _ = w, w = m(w), h !== void 0 && p.hasValue) {
4971
4971
  var C = p.value;
4972
4972
  if (h(C, w))
4973
4973
  return N = C;
4974
4974
  }
4975
4975
  return N = w;
4976
4976
  }
4977
- if (C = N, n(S, w)) return C;
4977
+ if (C = N, n(_, w)) return C;
4978
4978
  var T = m(w);
4979
- return h !== void 0 && h(C, T) ? (S = w, C) : (S = w, N = T);
4979
+ return h !== void 0 && h(C, T) ? (_ = w, C) : (_ = w, N = T);
4980
4980
  }
4981
- var v = !1, S, N, R = f === void 0 ? null : f;
4981
+ var v = !1, _, N, R = f === void 0 ? null : f;
4982
4982
  return [
4983
4983
  function() {
4984
4984
  return y(l());
@@ -5018,19 +5018,19 @@ function U_() {
5018
5018
  function() {
5019
5019
  function y(w) {
5020
5020
  if (!v) {
5021
- if (v = !0, S = w, w = m(w), h !== void 0 && p.hasValue) {
5021
+ if (v = !0, _ = w, w = m(w), h !== void 0 && p.hasValue) {
5022
5022
  var C = p.value;
5023
5023
  if (h(C, w))
5024
5024
  return N = C;
5025
5025
  }
5026
5026
  return N = w;
5027
5027
  }
5028
- if (C = N, n(S, w))
5028
+ if (C = N, n(_, w))
5029
5029
  return C;
5030
5030
  var T = m(w);
5031
- return h !== void 0 && h(C, T) ? (S = w, C) : (S = w, N = T);
5031
+ return h !== void 0 && h(C, T) ? (_ = w, C) : (_ = w, N = T);
5032
5032
  }
5033
- var v = !1, S, N, R = f === void 0 ? null : f;
5033
+ var v = !1, _, N, R = f === void 0 ? null : f;
5034
5034
  return [
5035
5035
  function() {
5036
5036
  return y(l());
@@ -5325,14 +5325,14 @@ function uS({ source: e, sourcePosition: t = de.Bottom, target: r, targetPositio
5325
5325
  target: d
5326
5326
  }), f = l.x !== 0 ? "x" : "y", m = l[f];
5327
5327
  let h = [], b, p;
5328
- const g = { x: 0, y: 0 }, y = { x: 0, y: 0 }, [v, S, N, R] = db({
5328
+ const g = { x: 0, y: 0 }, y = { x: 0, y: 0 }, [v, _, N, R] = db({
5329
5329
  sourceX: e.x,
5330
5330
  sourceY: e.y,
5331
5331
  targetX: r.x,
5332
5332
  targetY: r.y
5333
5333
  });
5334
5334
  if (i[f] * o[f] === -1) {
5335
- b = s.x ?? v, p = s.y ?? S;
5335
+ b = s.x ?? v, p = s.y ?? _;
5336
5336
  const C = [
5337
5337
  { x: b, y: c.y },
5338
5338
  { x: b, y: d.y }
@@ -5354,8 +5354,8 @@ function uS({ source: e, sourcePosition: t = de.Bottom, target: r, targetPositio
5354
5354
  const D = f === "x" ? "y" : "x", x = i[f] === o[D], M = c[D] > d[D], q = c[D] < d[D];
5355
5355
  (i[f] === 1 && (!x && M || x && q) || i[f] !== 1 && (!x && q || x && M)) && (h = f === "x" ? C : T);
5356
5356
  }
5357
- const _ = { x: c.x + g.x, y: c.y + g.y }, A = { x: d.x + y.x, y: d.y + y.y }, k = Math.max(Math.abs(_.x - h[0].x), Math.abs(A.x - h[0].x)), F = Math.max(Math.abs(_.y - h[0].y), Math.abs(A.y - h[0].y));
5358
- k >= F ? (b = (_.x + A.x) / 2, p = h[0].y) : (b = h[0].x, p = (_.y + A.y) / 2);
5357
+ const S = { x: c.x + g.x, y: c.y + g.y }, A = { x: d.x + y.x, y: d.y + y.y }, k = Math.max(Math.abs(S.x - h[0].x), Math.abs(A.x - h[0].x)), F = Math.max(Math.abs(S.y - h[0].y), Math.abs(A.y - h[0].y));
5358
+ k >= F ? (b = (S.x + A.x) / 2, p = h[0].y) : (b = h[0].x, p = (S.y + A.y) / 2);
5359
5359
  }
5360
5360
  return [[
5361
5361
  e,
@@ -5386,12 +5386,12 @@ function Oc({ sourceX: e, sourceY: t, sourcePosition: r = de.Bottom, targetX: n,
5386
5386
  offset: d
5387
5387
  });
5388
5388
  return [l.reduce((g, y, v) => {
5389
- let S = "";
5390
- return v > 0 && v < l.length - 1 ? S = fS(l[v - 1], y, l[v + 1], i) : S = `${v === 0 ? "M" : "L"}${y.x} ${y.y}`, g += S, g;
5389
+ let _ = "";
5390
+ return v > 0 && v < l.length - 1 ? _ = fS(l[v - 1], y, l[v + 1], i) : _ = `${v === 0 ? "M" : "L"}${y.x} ${y.y}`, g += _, g;
5391
5391
  }, ""), f, m, h, b];
5392
5392
  }
5393
5393
  const pn = Se(({ sourceX: e, sourceY: t, targetX: r, targetY: n, label: s, labelStyle: a, labelShowBg: i, labelBgStyle: o, labelBgPadding: c, labelBgBorderRadius: d, style: l, sourcePosition: f = de.Bottom, targetPosition: m = de.Top, markerEnd: h, markerStart: b, pathOptions: p, interactionWidth: g }) => {
5394
- const [y, v, S] = Oc({
5394
+ const [y, v, _] = Oc({
5395
5395
  sourceX: e,
5396
5396
  sourceY: t,
5397
5397
  sourcePosition: f,
@@ -5401,7 +5401,7 @@ const pn = Se(({ sourceX: e, sourceY: t, targetX: r, targetY: n, label: s, label
5401
5401
  borderRadius: p?.borderRadius,
5402
5402
  offset: p?.offset
5403
5403
  });
5404
- return K.createElement(Qt, { path: y, labelX: v, labelY: S, label: s, labelStyle: a, labelShowBg: i, labelBgStyle: o, labelBgPadding: c, labelBgBorderRadius: d, style: l, markerEnd: h, markerStart: b, interactionWidth: g });
5404
+ return K.createElement(Qt, { path: y, labelX: v, labelY: _, label: s, labelStyle: a, labelShowBg: i, labelBgStyle: o, labelBgPadding: c, labelBgBorderRadius: d, style: l, markerEnd: h, markerStart: b, interactionWidth: g });
5405
5405
  });
5406
5406
  pn.displayName = "SmoothStepEdge";
5407
5407
  const td = Se((e) => K.createElement(pn, { ...e, pathOptions: _e(() => ({ borderRadius: 0, offset: e.pathOptions?.offset }), [e.pathOptions?.offset]) }));
@@ -5469,7 +5469,7 @@ function nd({ sourceX: e, sourceY: t, sourcePosition: r = de.Bottom, targetX: n,
5469
5469
  ];
5470
5470
  }
5471
5471
  const sn = Se(({ sourceX: e, sourceY: t, targetX: r, targetY: n, sourcePosition: s = de.Bottom, targetPosition: a = de.Top, label: i, labelStyle: o, labelShowBg: c, labelBgStyle: d, labelBgPadding: l, labelBgBorderRadius: f, style: m, markerEnd: h, markerStart: b, pathOptions: p, interactionWidth: g }) => {
5472
- const [y, v, S] = nd({
5472
+ const [y, v, _] = nd({
5473
5473
  sourceX: e,
5474
5474
  sourceY: t,
5475
5475
  sourcePosition: s,
@@ -5478,7 +5478,7 @@ const sn = Se(({ sourceX: e, sourceY: t, targetX: r, targetY: n, sourcePosition:
5478
5478
  targetPosition: a,
5479
5479
  curvature: p?.curvature
5480
5480
  });
5481
- return K.createElement(Qt, { path: y, labelX: v, labelY: S, label: i, labelStyle: o, labelShowBg: c, labelBgStyle: d, labelBgPadding: l, labelBgBorderRadius: f, style: m, markerEnd: h, markerStart: b, interactionWidth: g });
5481
+ return K.createElement(Qt, { path: y, labelX: v, labelY: _, label: i, labelStyle: o, labelShowBg: c, labelBgStyle: d, labelBgPadding: l, labelBgBorderRadius: f, style: m, markerEnd: h, markerStart: b, interactionWidth: g });
5482
5482
  });
5483
5483
  sn.displayName = "BezierEdge";
5484
5484
  const mb = hy(null), hS = mb.Provider, pS = () => ln(mb), gS = (e) => "id" in e && "source" in e && "target" in e, yS = ({ source: e, sourceHandle: t, target: r, targetHandle: n }) => `reactflow__edge-${e}${t || ""}-${r}${n || ""}`, Fc = (e, t) => typeof e > "u" ? "" : typeof e == "string" ? e : `${t ? `${t}__` : ""}${Object.keys(e).sort().map((n) => `${n}=${e[n]}`).join("&")}`, bS = (e, t) => t.some((r) => r.source === e.source && r.target === e.target && (r.sourceHandle === e.sourceHandle || !r.sourceHandle && !e.sourceHandle) && (r.targetHandle === e.targetHandle || !r.targetHandle && !e.targetHandle)), hb = (e, t) => {
@@ -5551,8 +5551,8 @@ const mb = hy(null), hS = mb.Provider, pS = () => ln(mb), gS = (e) => "id" in e
5551
5551
  y: p.y,
5552
5552
  width: f || 0,
5553
5553
  height: m || 0
5554
- }, y = qc(c, g), v = typeof f > "u" || typeof m > "u" || f === null || m === null, S = a && y > 0, N = (f || 0) * (m || 0);
5555
- (v || S || y >= N || l.dragging) && d.push(l);
5554
+ }, y = qc(c, g), v = typeof f > "u" || typeof m > "u" || f === null || m === null, _ = a && y > 0, N = (f || 0) * (m || 0);
5555
+ (v || _ || y >= N || l.dragging) && d.push(l);
5556
5556
  }), d;
5557
5557
  }, yb = (e, t) => {
5558
5558
  const r = e.map((n) => n.id);
@@ -5577,7 +5577,7 @@ function vS(e, t, r, n, s, a) {
5577
5577
  if (b) {
5578
5578
  const p = sd(void 0, d), g = d.getAttribute("data-handleid"), y = a({ nodeId: b, id: g, type: p });
5579
5579
  if (y) {
5580
- const v = s.find((S) => S.nodeId === b && S.type === p && S.id === g);
5580
+ const v = s.find((_) => _.nodeId === b && _.type === p && _.id === g);
5581
5581
  return {
5582
5582
  handle: {
5583
5583
  id: g,
@@ -5656,11 +5656,11 @@ function NS(e, t) {
5656
5656
  }
5657
5657
  function wb({ event: e, handleId: t, nodeId: r, onConnect: n, isTarget: s, getState: a, setState: i, isValidConnection: o, edgeUpdaterType: c, onReconnectEnd: d }) {
5658
5658
  const l = sb(e.target), { connectionMode: f, domNode: m, autoPanOnConnect: h, connectionRadius: b, onConnectStart: p, panBy: g, getNodes: y, cancelConnection: v } = a();
5659
- let S = 0, N;
5660
- const { x: R, y: w } = bt(e), C = l?.elementFromPoint(R, w), T = sd(c, C), _ = m?.getBoundingClientRect();
5661
- if (!_ || !T)
5659
+ let _ = 0, N;
5660
+ const { x: R, y: w } = bt(e), C = l?.elementFromPoint(R, w), T = sd(c, C), S = m?.getBoundingClientRect();
5661
+ if (!S || !T)
5662
5662
  return;
5663
- let A, k = bt(e, _), F = !1, D = null, x = !1, M = null;
5663
+ let A, k = bt(e, S), F = !1, D = null, x = !1, M = null;
5664
5664
  const q = wS({
5665
5665
  nodes: y(),
5666
5666
  nodeId: r,
@@ -5669,8 +5669,8 @@ function wb({ event: e, handleId: t, nodeId: r, onConnect: n, isTarget: s, getSt
5669
5669
  }), I = () => {
5670
5670
  if (!h)
5671
5671
  return;
5672
- const [H, W] = nb(k, _);
5673
- g({ x: H, y: W }), S = requestAnimationFrame(I);
5672
+ const [H, W] = nb(k, S);
5673
+ g({ x: H, y: W }), _ = requestAnimationFrame(I);
5674
5674
  };
5675
5675
  i({
5676
5676
  connectionPosition: k,
@@ -5688,7 +5688,7 @@ function wb({ event: e, handleId: t, nodeId: r, onConnect: n, isTarget: s, getSt
5688
5688
  }), p?.(e, { nodeId: r, handleId: t, handleType: T });
5689
5689
  function $(H) {
5690
5690
  const { transform: W } = a();
5691
- k = bt(H, _);
5691
+ k = bt(H, S);
5692
5692
  const { handle: Y, validHandleResult: Q } = vS(H, l, Pc(k, W, !1, [1, 1]), b, q, (L) => xb(L, f, r, t, s ? "target" : "source", o, l));
5693
5693
  if (N = Y, F || (I(), F = !0), M = Q.handleDomNode, D = Q.connection, x = Q.isValid, i({
5694
5694
  connectionPosition: N && x ? pb({
@@ -5702,7 +5702,7 @@ function wb({ event: e, handleId: t, nodeId: r, onConnect: n, isTarget: s, getSt
5702
5702
  D.source !== D.target && M && (Wn(A), A = M, M.classList.add("connecting", "react-flow__handle-connecting"), M.classList.toggle("valid", x), M.classList.toggle("react-flow__handle-valid", x));
5703
5703
  }
5704
5704
  function O(H) {
5705
- (N || M) && D && x && n?.(D), a().onConnectEnd?.(H), c && d?.(H), Wn(A), v(), cancelAnimationFrame(S), F = !1, x = !1, D = null, M = null, l.removeEventListener("mousemove", $), l.removeEventListener("mouseup", O), l.removeEventListener("touchmove", $), l.removeEventListener("touchend", O);
5705
+ (N || M) && D && x && n?.(D), a().onConnectEnd?.(H), c && d?.(H), Wn(A), v(), cancelAnimationFrame(_), F = !1, x = !1, D = null, M = null, l.removeEventListener("mousemove", $), l.removeEventListener("mouseup", O), l.removeEventListener("touchmove", $), l.removeEventListener("touchend", O);
5706
5706
  }
5707
5707
  l.addEventListener("mousemove", $), l.addEventListener("mouseup", O), l.addEventListener("touchmove", $), l.addEventListener("touchend", O);
5708
5708
  }
@@ -5717,24 +5717,24 @@ const xu = () => !0, _S = (e) => ({
5717
5717
  clickConnecting: i?.nodeId === e && i?.handleId === t && i?.type === r
5718
5718
  };
5719
5719
  }, Nb = on(({ type: e = "source", position: t = de.Top, isValidConnection: r, isConnectable: n = !0, isConnectableStart: s = !0, isConnectableEnd: a = !0, id: i, onConnect: o, children: c, className: d, onMouseDown: l, onTouchStart: f, ...m }, h) => {
5720
- const b = i || null, p = e === "target", g = Me(), y = pS(), { connectOnClick: v, noPanClassName: S } = we(_S, Re), { connecting: N, clickConnecting: R } = we(SS(y, b, e), Re);
5720
+ const b = i || null, p = e === "target", g = Me(), y = pS(), { connectOnClick: v, noPanClassName: _ } = we(_S, Re), { connecting: N, clickConnecting: R } = we(SS(y, b, e), Re);
5721
5721
  y || g.getState().onError?.("010", Ke.error010());
5722
- const w = (_) => {
5722
+ const w = (S) => {
5723
5723
  const { defaultEdgeOptions: A, onConnect: k, hasDefaultEdges: F } = g.getState(), D = {
5724
5724
  ...A,
5725
- ..._
5725
+ ...S
5726
5726
  };
5727
5727
  if (F) {
5728
5728
  const { edges: x, setEdges: M } = g.getState();
5729
5729
  M(hb(D, x));
5730
5730
  }
5731
5731
  k?.(D), o?.(D);
5732
- }, C = (_) => {
5732
+ }, C = (S) => {
5733
5733
  if (!y)
5734
5734
  return;
5735
- const A = cb(_);
5736
- s && (A && _.button === 0 || !A) && wb({
5737
- event: _,
5735
+ const A = cb(S);
5736
+ s && (A && S.button === 0 || !A) && wb({
5737
+ event: S,
5738
5738
  handleId: b,
5739
5739
  nodeId: y,
5740
5740
  onConnect: w,
@@ -5742,27 +5742,27 @@ const xu = () => !0, _S = (e) => ({
5742
5742
  getState: g.getState,
5743
5743
  setState: g.setState,
5744
5744
  isValidConnection: r || g.getState().isValidConnection || xu
5745
- }), A ? l?.(_) : f?.(_);
5746
- }, T = (_) => {
5745
+ }), A ? l?.(S) : f?.(S);
5746
+ }, T = (S) => {
5747
5747
  const { onClickConnectStart: A, onClickConnectEnd: k, connectionClickStartHandle: F, connectionMode: D, isValidConnection: x } = g.getState();
5748
5748
  if (!y || !F && !s)
5749
5749
  return;
5750
5750
  if (!F) {
5751
- A?.(_, { nodeId: y, handleId: b, handleType: e }), g.setState({ connectionClickStartHandle: { nodeId: y, type: e, handleId: b } });
5751
+ A?.(S, { nodeId: y, handleId: b, handleType: e }), g.setState({ connectionClickStartHandle: { nodeId: y, type: e, handleId: b } });
5752
5752
  return;
5753
5753
  }
5754
- const M = sb(_.target), q = r || x || xu, { connection: I, isValid: $ } = xb({
5754
+ const M = sb(S.target), q = r || x || xu, { connection: I, isValid: $ } = xb({
5755
5755
  nodeId: y,
5756
5756
  id: b,
5757
5757
  type: e
5758
5758
  }, D, F.nodeId, F.handleId || null, F.type, q, M);
5759
- $ && w(I), k?.(_), g.setState({ connectionClickStartHandle: null });
5759
+ $ && w(I), k?.(S), g.setState({ connectionClickStartHandle: null });
5760
5760
  };
5761
5761
  return K.createElement("div", { "data-handleid": b, "data-nodeid": y, "data-handlepos": t, "data-id": `${y}-${b}-${e}`, className: De([
5762
5762
  "react-flow__handle",
5763
5763
  `react-flow__handle-${t}`,
5764
5764
  "nodrag",
5765
- S,
5765
+ _,
5766
5766
  d,
5767
5767
  {
5768
5768
  source: !p,
@@ -5845,14 +5845,14 @@ function be(e, t, r) {
5845
5845
  typeof t < "u" && r({ [e]: t });
5846
5846
  }, [t]);
5847
5847
  }
5848
- const RS = ({ nodes: e, edges: t, defaultNodes: r, defaultEdges: n, onConnect: s, onConnectStart: a, onConnectEnd: i, onClickConnectStart: o, onClickConnectEnd: c, nodesDraggable: d, nodesConnectable: l, nodesFocusable: f, edgesFocusable: m, edgesUpdatable: h, elevateNodesOnSelect: b, minZoom: p, maxZoom: g, nodeExtent: y, onNodesChange: v, onEdgesChange: S, elementsSelectable: N, connectionMode: R, snapGrid: w, snapToGrid: C, translateExtent: T, connectOnClick: _, defaultEdgeOptions: A, fitView: k, fitViewOptions: F, onNodesDelete: D, onEdgesDelete: x, onNodeDrag: M, onNodeDragStart: q, onNodeDragStop: I, onSelectionDrag: $, onSelectionDragStart: O, onSelectionDragStop: H, noPanClassName: W, nodeOrigin: Y, rfId: Q, autoPanOnConnect: L, autoPanOnNodeDrag: j, onError: P, connectionRadius: G, isValidConnection: B, nodeDragThreshold: U }) => {
5848
+ const RS = ({ nodes: e, edges: t, defaultNodes: r, defaultEdges: n, onConnect: s, onConnectStart: a, onConnectEnd: i, onClickConnectStart: o, onClickConnectEnd: c, nodesDraggable: d, nodesConnectable: l, nodesFocusable: f, edgesFocusable: m, edgesUpdatable: h, elevateNodesOnSelect: b, minZoom: p, maxZoom: g, nodeExtent: y, onNodesChange: v, onEdgesChange: _, elementsSelectable: N, connectionMode: R, snapGrid: w, snapToGrid: C, translateExtent: T, connectOnClick: S, defaultEdgeOptions: A, fitView: k, fitViewOptions: F, onNodesDelete: D, onEdgesDelete: x, onNodeDrag: M, onNodeDragStart: q, onNodeDragStop: I, onSelectionDrag: $, onSelectionDragStart: O, onSelectionDragStop: H, noPanClassName: W, nodeOrigin: Y, rfId: Q, autoPanOnConnect: L, autoPanOnNodeDrag: j, onError: P, connectionRadius: G, isValidConnection: B, nodeDragThreshold: U }) => {
5849
5849
  const { setNodes: V, setEdges: ae, setDefaultNodesAndEdges: ie, setMinZoom: pe, setMaxZoom: ge, setTranslateExtent: ce, setNodeExtent: le, reset: ne } = we(AS, Re), z = Me();
5850
5850
  return fe(() => {
5851
5851
  const re = n?.map((J) => ({ ...J, ...A }));
5852
5852
  return ie(r, re), () => {
5853
5853
  ne();
5854
5854
  };
5855
- }, []), be("defaultEdgeOptions", A, z.setState), be("connectionMode", R, z.setState), be("onConnect", s, z.setState), be("onConnectStart", a, z.setState), be("onConnectEnd", i, z.setState), be("onClickConnectStart", o, z.setState), be("onClickConnectEnd", c, z.setState), be("nodesDraggable", d, z.setState), be("nodesConnectable", l, z.setState), be("nodesFocusable", f, z.setState), be("edgesFocusable", m, z.setState), be("edgesUpdatable", h, z.setState), be("elementsSelectable", N, z.setState), be("elevateNodesOnSelect", b, z.setState), be("snapToGrid", C, z.setState), be("snapGrid", w, z.setState), be("onNodesChange", v, z.setState), be("onEdgesChange", S, z.setState), be("connectOnClick", _, z.setState), be("fitViewOnInit", k, z.setState), be("fitViewOnInitOptions", F, z.setState), be("onNodesDelete", D, z.setState), be("onEdgesDelete", x, z.setState), be("onNodeDrag", M, z.setState), be("onNodeDragStart", q, z.setState), be("onNodeDragStop", I, z.setState), be("onSelectionDrag", $, z.setState), be("onSelectionDragStart", O, z.setState), be("onSelectionDragStop", H, z.setState), be("noPanClassName", W, z.setState), be("nodeOrigin", Y, z.setState), be("rfId", Q, z.setState), be("autoPanOnConnect", L, z.setState), be("autoPanOnNodeDrag", j, z.setState), be("onError", P, z.setState), be("connectionRadius", G, z.setState), be("isValidConnection", B, z.setState), be("nodeDragThreshold", U, z.setState), qt(e, V), qt(t, ae), qt(p, pe), qt(g, ge), qt(T, ce), qt(y, le), null;
5855
+ }, []), be("defaultEdgeOptions", A, z.setState), be("connectionMode", R, z.setState), be("onConnect", s, z.setState), be("onConnectStart", a, z.setState), be("onConnectEnd", i, z.setState), be("onClickConnectStart", o, z.setState), be("onClickConnectEnd", c, z.setState), be("nodesDraggable", d, z.setState), be("nodesConnectable", l, z.setState), be("nodesFocusable", f, z.setState), be("edgesFocusable", m, z.setState), be("edgesUpdatable", h, z.setState), be("elementsSelectable", N, z.setState), be("elevateNodesOnSelect", b, z.setState), be("snapToGrid", C, z.setState), be("snapGrid", w, z.setState), be("onNodesChange", v, z.setState), be("onEdgesChange", _, z.setState), be("connectOnClick", S, z.setState), be("fitViewOnInit", k, z.setState), be("fitViewOnInitOptions", F, z.setState), be("onNodesDelete", D, z.setState), be("onEdgesDelete", x, z.setState), be("onNodeDrag", M, z.setState), be("onNodeDragStart", q, z.setState), be("onNodeDragStop", I, z.setState), be("onSelectionDrag", $, z.setState), be("onSelectionDragStart", O, z.setState), be("onSelectionDragStop", H, z.setState), be("noPanClassName", W, z.setState), be("nodeOrigin", Y, z.setState), be("rfId", Q, z.setState), be("autoPanOnConnect", L, z.setState), be("autoPanOnNodeDrag", j, z.setState), be("onError", P, z.setState), be("connectionRadius", G, z.setState), be("isValidConnection", B, z.setState), be("nodeDragThreshold", U, z.setState), qt(e, V), qt(t, ae), qt(p, pe), qt(g, ge), qt(T, ce), qt(y, le), null;
5856
5856
  }, wu = { display: "none" }, MS = {
5857
5857
  position: "absolute",
5858
5858
  width: 1,
@@ -5977,7 +5977,7 @@ function qb(e, t = {}) {
5977
5977
  return t.nodes?.length ? y && t.nodes.some((v) => v.id === g.id) : y;
5978
5978
  }), p = b.every((g) => g.width && g.height);
5979
5979
  if (b.length > 0 && p) {
5980
- const g = gn(b, f), { x: y, y: v, zoom: S } = bb(g, n, s, t.minZoom ?? a, t.maxZoom ?? i, t.padding ?? 0.1), N = it.translate(y, v).scale(S);
5980
+ const g = gn(b, f), { x: y, y: v, zoom: _ } = bb(g, n, s, t.minZoom ?? a, t.maxZoom ?? i, t.padding ?? 0.1), N = it.translate(y, v).scale(_);
5981
5981
  return typeof t.duration == "number" && t.duration > 0 ? o.transform(St(c, t.duration), N) : o.transform(c, N), !0;
5982
5982
  }
5983
5983
  }
@@ -6081,24 +6081,24 @@ function id() {
6081
6081
  const { edges: g = [] } = t.getState();
6082
6082
  return g.find((y) => y.id === p);
6083
6083
  }, []), i = te((p) => {
6084
- const { getNodes: g, setNodes: y, hasDefaultNodes: v, onNodesChange: S } = t.getState(), N = g(), R = typeof p == "function" ? p(N) : p;
6084
+ const { getNodes: g, setNodes: y, hasDefaultNodes: v, onNodesChange: _ } = t.getState(), N = g(), R = typeof p == "function" ? p(N) : p;
6085
6085
  if (v)
6086
6086
  y(R);
6087
- else if (S) {
6087
+ else if (_) {
6088
6088
  const w = R.length === 0 ? N.map((C) => ({ type: "remove", id: C.id })) : R.map((C) => ({ item: C, type: "reset" }));
6089
- S(w);
6089
+ _(w);
6090
6090
  }
6091
6091
  }, []), o = te((p) => {
6092
- const { edges: g = [], setEdges: y, hasDefaultEdges: v, onEdgesChange: S } = t.getState(), N = typeof p == "function" ? p(g) : p;
6092
+ const { edges: g = [], setEdges: y, hasDefaultEdges: v, onEdgesChange: _ } = t.getState(), N = typeof p == "function" ? p(g) : p;
6093
6093
  if (v)
6094
6094
  y(N);
6095
- else if (S) {
6095
+ else if (_) {
6096
6096
  const R = N.length === 0 ? g.map((w) => ({ type: "remove", id: w.id })) : N.map((w) => ({ item: w, type: "reset" }));
6097
- S(R);
6097
+ _(R);
6098
6098
  }
6099
6099
  }, []), c = te((p) => {
6100
- const g = Array.isArray(p) ? p : [p], { getNodes: y, setNodes: v, hasDefaultNodes: S, onNodesChange: N } = t.getState();
6101
- if (S) {
6100
+ const g = Array.isArray(p) ? p : [p], { getNodes: y, setNodes: v, hasDefaultNodes: _, onNodesChange: N } = t.getState();
6101
+ if (_) {
6102
6102
  const w = [...y(), ...g];
6103
6103
  v(w);
6104
6104
  } else if (N) {
@@ -6106,38 +6106,38 @@ function id() {
6106
6106
  N(R);
6107
6107
  }
6108
6108
  }, []), d = te((p) => {
6109
- const g = Array.isArray(p) ? p : [p], { edges: y = [], setEdges: v, hasDefaultEdges: S, onEdgesChange: N } = t.getState();
6110
- if (S)
6109
+ const g = Array.isArray(p) ? p : [p], { edges: y = [], setEdges: v, hasDefaultEdges: _, onEdgesChange: N } = t.getState();
6110
+ if (_)
6111
6111
  v([...y, ...g]);
6112
6112
  else if (N) {
6113
6113
  const R = g.map((w) => ({ item: w, type: "add" }));
6114
6114
  N(R);
6115
6115
  }
6116
6116
  }, []), l = te(() => {
6117
- const { getNodes: p, edges: g = [], transform: y } = t.getState(), [v, S, N] = y;
6117
+ const { getNodes: p, edges: g = [], transform: y } = t.getState(), [v, _, N] = y;
6118
6118
  return {
6119
6119
  nodes: p().map((R) => ({ ...R })),
6120
6120
  edges: g.map((R) => ({ ...R })),
6121
6121
  viewport: {
6122
6122
  x: v,
6123
- y: S,
6123
+ y: _,
6124
6124
  zoom: N
6125
6125
  }
6126
6126
  };
6127
6127
  }, []), f = te(({ nodes: p, edges: g }) => {
6128
- const { nodeInternals: y, getNodes: v, edges: S, hasDefaultNodes: N, hasDefaultEdges: R, onNodesDelete: w, onEdgesDelete: C, onNodesChange: T, onEdgesChange: _ } = t.getState(), A = (p || []).map((M) => M.id), k = (g || []).map((M) => M.id), F = v().reduce((M, q) => {
6128
+ const { nodeInternals: y, getNodes: v, edges: _, hasDefaultNodes: N, hasDefaultEdges: R, onNodesDelete: w, onEdgesDelete: C, onNodesChange: T, onEdgesChange: S } = t.getState(), A = (p || []).map((M) => M.id), k = (g || []).map((M) => M.id), F = v().reduce((M, q) => {
6129
6129
  const I = q.parentNode || q.parentId, $ = !A.includes(q.id) && I && M.find((H) => H.id === I);
6130
6130
  return (typeof q.deletable == "boolean" ? q.deletable : !0) && (A.includes(q.id) || $) && M.push(q), M;
6131
- }, []), D = S.filter((M) => typeof M.deletable == "boolean" ? M.deletable : !0), x = D.filter((M) => k.includes(M.id));
6131
+ }, []), D = _.filter((M) => typeof M.deletable == "boolean" ? M.deletable : !0), x = D.filter((M) => k.includes(M.id));
6132
6132
  if (F || x) {
6133
6133
  const M = yb(F, D), q = [...x, ...M], I = q.reduce(($, O) => ($.includes(O.id) || $.push(O.id), $), []);
6134
6134
  if ((R || N) && (R && t.setState({
6135
- edges: S.filter(($) => !I.includes($.id))
6135
+ edges: _.filter(($) => !I.includes($.id))
6136
6136
  }), N && (F.forEach(($) => {
6137
6137
  y.delete($.id);
6138
6138
  }), t.setState({
6139
6139
  nodeInternals: new Map(y)
6140
- }))), I.length > 0 && (C?.(q), _ && _(I.map(($) => ({
6140
+ }))), I.length > 0 && (C?.(q), S && S(I.map(($) => ({
6141
6141
  id: $,
6142
6142
  type: "remove"
6143
6143
  })))), F.length > 0 && (w?.(F), T)) {
@@ -6149,9 +6149,9 @@ function id() {
6149
6149
  const g = lS(p), y = g ? null : t.getState().nodeInternals.get(p.id);
6150
6150
  return !g && !y ? [null, null, g] : [g ? p : hu(y), y, g];
6151
6151
  }, []), h = te((p, g = !0, y) => {
6152
- const [v, S, N] = m(p);
6152
+ const [v, _, N] = m(p);
6153
6153
  return v ? (y || t.getState().getNodes()).filter((R) => {
6154
- if (!N && (R.id === S.id || !R.positionAbsolute))
6154
+ if (!N && (R.id === _.id || !R.positionAbsolute))
6155
6155
  return !1;
6156
6156
  const w = hu(R), C = qc(w, v);
6157
6157
  return g && C > 0 || C >= v.width * v.height;
@@ -6160,8 +6160,8 @@ function id() {
6160
6160
  const [v] = m(p);
6161
6161
  if (!v)
6162
6162
  return !1;
6163
- const S = qc(v, g);
6164
- return y && S > 0 || S >= v.width * v.height;
6163
+ const _ = qc(v, g);
6164
+ return y && _ > 0 || _ >= v.width * v.height;
6165
6165
  }, []);
6166
6166
  return _e(() => ({
6167
6167
  ...e,
@@ -6238,11 +6238,11 @@ const od = {
6238
6238
  d3Selection: e.d3Selection,
6239
6239
  d3ZoomHandler: e.d3ZoomHandler,
6240
6240
  userSelectionActive: e.userSelectionActive
6241
- }), US = ({ onMove: e, onMoveStart: t, onMoveEnd: r, onPaneContextMenu: n, zoomOnScroll: s = !0, zoomOnPinch: a = !0, panOnScroll: i = !1, panOnScrollSpeed: o = 0.5, panOnScrollMode: c = Et.Free, zoomOnDoubleClick: d = !0, elementsSelectable: l, panOnDrag: f = !0, defaultViewport: m, translateExtent: h, minZoom: b, maxZoom: p, zoomActivationKeyCode: g, preventScrolling: y = !0, children: v, noWheelClassName: S, noPanClassName: N }) => {
6242
- const R = me(), w = Me(), C = me(!1), T = me(!1), _ = me(null), A = me({ x: 0, y: 0, zoom: 0 }), { d3Zoom: k, d3Selection: F, d3ZoomHandler: D, userSelectionActive: x } = we(GS, Re), M = Nr(g), q = me(0), I = me(!1), $ = me();
6243
- return HS(_), fe(() => {
6244
- if (_.current) {
6245
- const O = _.current.getBoundingClientRect(), H = Wy().scaleExtent([b, p]).translateExtent(h), W = Ce(_.current).call(H), Y = it.translate(m.x, m.y).scale(Yt(m.zoom, b, p)), Q = [
6241
+ }), US = ({ onMove: e, onMoveStart: t, onMoveEnd: r, onPaneContextMenu: n, zoomOnScroll: s = !0, zoomOnPinch: a = !0, panOnScroll: i = !1, panOnScrollSpeed: o = 0.5, panOnScrollMode: c = Et.Free, zoomOnDoubleClick: d = !0, elementsSelectable: l, panOnDrag: f = !0, defaultViewport: m, translateExtent: h, minZoom: b, maxZoom: p, zoomActivationKeyCode: g, preventScrolling: y = !0, children: v, noWheelClassName: _, noPanClassName: N }) => {
6242
+ const R = me(), w = Me(), C = me(!1), T = me(!1), S = me(null), A = me({ x: 0, y: 0, zoom: 0 }), { d3Zoom: k, d3Selection: F, d3ZoomHandler: D, userSelectionActive: x } = we(GS, Re), M = Nr(g), q = me(0), I = me(!1), $ = me();
6243
+ return HS(S), fe(() => {
6244
+ if (S.current) {
6245
+ const O = S.current.getBoundingClientRect(), H = Wy().scaleExtent([b, p]).translateExtent(h), W = Ce(S.current).call(H), Y = it.translate(m.x, m.y).scale(Yt(m.zoom, b, p)), Q = [
6246
6246
  [0, 0],
6247
6247
  [O.width, O.height]
6248
6248
  ], L = H.constrain()(Y, Q, h);
@@ -6252,12 +6252,12 @@ const od = {
6252
6252
  d3ZoomHandler: W.on("wheel.zoom"),
6253
6253
  // we need to pass transform because zoom handler is not registered when we set the initial transform
6254
6254
  transform: [L.x, L.y, L.k],
6255
- domNode: _.current.closest(".react-flow")
6255
+ domNode: S.current.closest(".react-flow")
6256
6256
  });
6257
6257
  }
6258
6258
  }, []), fe(() => {
6259
6259
  F && k && (i && !M && !x ? F.on("wheel.zoom", (O) => {
6260
- if (Ot(O, S))
6260
+ if (Ot(O, _))
6261
6261
  return !1;
6262
6262
  O.preventDefault(), O.stopImmediatePropagation();
6263
6263
  const H = F.property("__zoom").k || 1;
@@ -6280,7 +6280,7 @@ const od = {
6280
6280
  r?.(O, L), G?.(L), I.current = !1;
6281
6281
  }, 150));
6282
6282
  }, { passive: !1 }) : typeof D < "u" && F.on("wheel.zoom", function(O, H) {
6283
- if (!y && O.type === "wheel" && !O.ctrlKey || Ot(O, S))
6283
+ if (!y && O.type === "wheel" && !O.ctrlKey || Ot(O, _))
6284
6284
  return null;
6285
6285
  O.preventDefault(), D.call(this, O, H);
6286
6286
  }, { passive: !1 }));
@@ -6294,7 +6294,7 @@ const od = {
6294
6294
  M,
6295
6295
  a,
6296
6296
  y,
6297
- S,
6297
+ _,
6298
6298
  t,
6299
6299
  e,
6300
6300
  r
@@ -6331,7 +6331,7 @@ const od = {
6331
6331
  const H = M || s, W = a && O.ctrlKey;
6332
6332
  if ((f === !0 || Array.isArray(f) && f.includes(1)) && O.button === 1 && O.type === "mousedown" && (Ot(O, "react-flow__node") || Ot(O, "react-flow__edge")))
6333
6333
  return !0;
6334
- if (!f && !H && !i && !d && !a || x || !d && O.type === "dblclick" || Ot(O, S) && O.type === "wheel" || Ot(O, N) && (O.type !== "wheel" || i && O.type === "wheel" && !M) || !a && O.ctrlKey && O.type === "wheel" || !H && !i && !W && O.type === "wheel" || !f && (O.type === "mousedown" || O.type === "touchstart") || Array.isArray(f) && !f.includes(O.button) && O.type === "mousedown")
6334
+ if (!f && !H && !i && !d && !a || x || !d && O.type === "dblclick" || Ot(O, _) && O.type === "wheel" || Ot(O, N) && (O.type !== "wheel" || i && O.type === "wheel" && !M) || !a && O.ctrlKey && O.type === "wheel" || !H && !i && !W && O.type === "wheel" || !f && (O.type === "mousedown" || O.type === "touchstart") || Array.isArray(f) && !f.includes(O.button) && O.type === "mousedown")
6335
6335
  return !1;
6336
6336
  const Y = Array.isArray(f) && f.includes(O.button) || !O.button || O.button <= 1;
6337
6337
  return (!O.ctrlKey || O.type === "wheel") && Y;
@@ -6346,7 +6346,7 @@ const od = {
6346
6346
  f,
6347
6347
  l,
6348
6348
  M
6349
- ]), K.createElement("div", { className: "react-flow__renderer", ref: _, style: od }, v);
6349
+ ]), K.createElement("div", { className: "react-flow__renderer", ref: S, style: od }, v);
6350
6350
  }, WS = (e) => ({
6351
6351
  userSelectionActive: e.userSelectionActive,
6352
6352
  userSelectionRect: e.userSelectionRect
@@ -6430,7 +6430,7 @@ const Yn = (e, t) => (r) => {
6430
6430
  elementsSelectable: e.elementsSelectable,
6431
6431
  dragging: e.paneDragging
6432
6432
  }), Fb = Se(({ isSelecting: e, selectionMode: t = wr.Full, panOnDrag: r, onSelectionStart: n, onSelectionEnd: s, onPaneClick: a, onPaneContextMenu: i, onPaneScroll: o, onPaneMouseEnter: c, onPaneMouseMove: d, onPaneMouseLeave: l, children: f }) => {
6433
- const m = me(null), h = Me(), b = me(0), p = me(0), g = me(), { userSelectionActive: y, elementsSelectable: v, dragging: S } = we(QS, Re), N = () => {
6433
+ const m = me(null), h = Me(), b = me(0), p = me(0), g = me(), { userSelectionActive: y, elementsSelectable: v, dragging: _ } = we(QS, Re), N = () => {
6434
6434
  h.setState({ userSelectionActive: !1, userSelectionRect: null }), b.current = 0, p.current = 0;
6435
6435
  }, R = (D) => {
6436
6436
  a?.(D), h.getState().resetSelectedElements(), h.setState({ nodesSelectionActive: !1 });
@@ -6455,7 +6455,7 @@ const Yn = (e, t) => (r) => {
6455
6455
  y: I
6456
6456
  }
6457
6457
  }), n?.(D);
6458
- }, _ = (D) => {
6458
+ }, S = (D) => {
6459
6459
  const { userSelectionRect: x, nodeInternals: M, edges: q, transform: I, onNodesChange: $, onEdgesChange: O, nodeOrigin: H, getNodes: W } = h.getState();
6460
6460
  if (!e || !g.current || !x)
6461
6461
  return;
@@ -6490,7 +6490,7 @@ const Yn = (e, t) => (r) => {
6490
6490
  }, F = v && (e || y);
6491
6491
  return K.createElement(
6492
6492
  "div",
6493
- { className: De(["react-flow__pane", { dragging: S, selection: e }]), onClick: F ? void 0 : Yn(R, m), onContextMenu: Yn(w, m), onWheel: Yn(C, m), onMouseEnter: F ? void 0 : c, onMouseDown: F ? T : void 0, onMouseMove: F ? _ : d, onMouseUp: F ? A : void 0, onMouseLeave: F ? k : l, ref: m, style: od },
6493
+ { className: De(["react-flow__pane", { dragging: _, selection: e }]), onClick: F ? void 0 : Yn(R, m), onContextMenu: Yn(w, m), onWheel: Yn(C, m), onMouseEnter: F ? void 0 : c, onMouseDown: F ? T : void 0, onMouseMove: F ? S : d, onMouseUp: F ? A : void 0, onMouseLeave: F ? k : l, ref: m, style: od },
6494
6494
  f,
6495
6495
  K.createElement(KS, null)
6496
6496
  );
@@ -6634,19 +6634,19 @@ function Xn(e) {
6634
6634
  return (t, r, n) => e?.(t, n);
6635
6635
  }
6636
6636
  function $b({ nodeRef: e, disabled: t = !1, noDragClassName: r, handleSelector: n, nodeId: s, isSelectable: a, selectNodesOnDrag: i }) {
6637
- const o = Me(), [c, d] = Z(!1), l = me([]), f = me({ x: null, y: null }), m = me(0), h = me(null), b = me({ x: 0, y: 0 }), p = me(null), g = me(!1), y = me(!1), v = me(!1), S = JS();
6637
+ const o = Me(), [c, d] = Z(!1), l = me([]), f = me({ x: null, y: null }), m = me(0), h = me(null), b = me({ x: 0, y: 0 }), p = me(null), g = me(!1), y = me(!1), v = me(!1), _ = JS();
6638
6638
  return fe(() => {
6639
6639
  if (e?.current) {
6640
- const N = Ce(e.current), R = ({ x: T, y: _ }) => {
6640
+ const N = Ce(e.current), R = ({ x: T, y: S }) => {
6641
6641
  const { nodeInternals: A, onNodeDrag: k, onSelectionDrag: F, updateNodePositions: D, nodeExtent: x, snapGrid: M, snapToGrid: q, nodeOrigin: I, onError: $ } = o.getState();
6642
- f.current = { x: T, y: _ };
6642
+ f.current = { x: T, y: S };
6643
6643
  let O = !1, H = { x: 0, y: 0, x2: 0, y2: 0 };
6644
6644
  if (l.current.length > 1 && x) {
6645
6645
  const Y = gn(l.current, I);
6646
6646
  H = xr(Y);
6647
6647
  }
6648
6648
  if (l.current = l.current.map((Y) => {
6649
- const Q = { x: T - Y.distance.x, y: _ - Y.distance.y };
6649
+ const Q = { x: T - Y.distance.x, y: S - Y.distance.y };
6650
6650
  q && (Q.x = M[0] * Math.round(Q.x / M[0]), Q.y = M[1] * Math.round(Q.y / M[1]));
6651
6651
  const L = [
6652
6652
  [x[0][0], x[0][1]],
@@ -6670,27 +6670,27 @@ function $b({ nodeRef: e, disabled: t = !1, noDragClassName: r, handleSelector:
6670
6670
  }, w = () => {
6671
6671
  if (!h.current)
6672
6672
  return;
6673
- const [T, _] = nb(b.current, h.current);
6674
- if (T !== 0 || _ !== 0) {
6673
+ const [T, S] = nb(b.current, h.current);
6674
+ if (T !== 0 || S !== 0) {
6675
6675
  const { transform: A, panBy: k } = o.getState();
6676
- f.current.x = (f.current.x ?? 0) - T / A[2], f.current.y = (f.current.y ?? 0) - _ / A[2], k({ x: T, y: _ }) && R(f.current);
6676
+ f.current.x = (f.current.x ?? 0) - T / A[2], f.current.y = (f.current.y ?? 0) - S / A[2], k({ x: T, y: S }) && R(f.current);
6677
6677
  }
6678
6678
  m.current = requestAnimationFrame(w);
6679
6679
  }, C = (T) => {
6680
- const { nodeInternals: _, multiSelectionActive: A, nodesDraggable: k, unselectNodesAndEdges: F, onNodeDragStart: D, onSelectionDragStart: x } = o.getState();
6680
+ const { nodeInternals: S, multiSelectionActive: A, nodesDraggable: k, unselectNodesAndEdges: F, onNodeDragStart: D, onSelectionDragStart: x } = o.getState();
6681
6681
  y.current = !0;
6682
6682
  const M = s ? D : Xn(x);
6683
- (!i || !a) && !A && s && (_.get(s)?.selected || F()), s && a && i && $c({
6683
+ (!i || !a) && !A && s && (S.get(s)?.selected || F()), s && a && i && $c({
6684
6684
  id: s,
6685
6685
  store: o,
6686
6686
  nodeRef: e
6687
6687
  });
6688
- const q = S(T);
6689
- if (f.current = q, l.current = XS(_, k, q, s), M && l.current) {
6688
+ const q = _(T);
6689
+ if (f.current = q, l.current = XS(S, k, q, s), M && l.current) {
6690
6690
  const [I, $] = Qn({
6691
6691
  nodeId: s,
6692
6692
  dragItems: l.current,
6693
- nodeInternals: _
6693
+ nodeInternals: S
6694
6694
  });
6695
6695
  M(T.sourceEvent, I, $);
6696
6696
  }
@@ -6698,21 +6698,21 @@ function $b({ nodeRef: e, disabled: t = !1, noDragClassName: r, handleSelector:
6698
6698
  if (t)
6699
6699
  N.on(".drag", null);
6700
6700
  else {
6701
- const T = tN().on("start", (_) => {
6701
+ const T = tN().on("start", (S) => {
6702
6702
  const { domNode: A, nodeDragThreshold: k } = o.getState();
6703
- k === 0 && C(_), v.current = !1;
6704
- const F = S(_);
6705
- f.current = F, h.current = A?.getBoundingClientRect() || null, b.current = bt(_.sourceEvent, h.current);
6706
- }).on("drag", (_) => {
6707
- const A = S(_), { autoPanOnNodeDrag: k, nodeDragThreshold: F } = o.getState();
6708
- if (_.sourceEvent.type === "touchmove" && _.sourceEvent.touches.length > 1 && (v.current = !0), !v.current) {
6703
+ k === 0 && C(S), v.current = !1;
6704
+ const F = _(S);
6705
+ f.current = F, h.current = A?.getBoundingClientRect() || null, b.current = bt(S.sourceEvent, h.current);
6706
+ }).on("drag", (S) => {
6707
+ const A = _(S), { autoPanOnNodeDrag: k, nodeDragThreshold: F } = o.getState();
6708
+ if (S.sourceEvent.type === "touchmove" && S.sourceEvent.touches.length > 1 && (v.current = !0), !v.current) {
6709
6709
  if (!g.current && y.current && k && (g.current = !0, w()), !y.current) {
6710
6710
  const D = A.xSnapped - (f?.current?.x ?? 0), x = A.ySnapped - (f?.current?.y ?? 0);
6711
- Math.sqrt(D * D + x * x) > F && C(_);
6711
+ Math.sqrt(D * D + x * x) > F && C(S);
6712
6712
  }
6713
- (f.current.x !== A.xSnapped || f.current.y !== A.ySnapped) && l.current && y.current && (p.current = _.sourceEvent, b.current = bt(_.sourceEvent, h.current), R(A));
6713
+ (f.current.x !== A.xSnapped || f.current.y !== A.ySnapped) && l.current && y.current && (p.current = S.sourceEvent, b.current = bt(S.sourceEvent, h.current), R(A));
6714
6714
  }
6715
- }).on("end", (_) => {
6715
+ }).on("end", (S) => {
6716
6716
  if (!(!y.current || v.current) && (d(!1), g.current = !1, y.current = !1, cancelAnimationFrame(m.current), l.current)) {
6717
6717
  const { updateNodePositions: A, nodeInternals: k, onNodeDragStop: F, onSelectionDragStop: D } = o.getState(), x = s ? F : Xn(D);
6718
6718
  if (A(l.current, !1, !1), x) {
@@ -6721,12 +6721,12 @@ function $b({ nodeRef: e, disabled: t = !1, noDragClassName: r, handleSelector:
6721
6721
  dragItems: l.current,
6722
6722
  nodeInternals: k
6723
6723
  });
6724
- x(_.sourceEvent, M, q);
6724
+ x(S.sourceEvent, M, q);
6725
6725
  }
6726
6726
  }
6727
- }).filter((_) => {
6728
- const A = _.target;
6729
- return !_.button && (!r || !ku(A, `.${r}`, e)) && (!n || ku(A, n, e));
6727
+ }).filter((S) => {
6728
+ const A = S.target;
6729
+ return !S.button && (!r || !ku(A, `.${r}`, e)) && (!n || ku(A, n, e));
6730
6730
  });
6731
6731
  return N.call(T), () => {
6732
6732
  N.on(".drag", null);
@@ -6742,7 +6742,7 @@ function $b({ nodeRef: e, disabled: t = !1, noDragClassName: r, handleSelector:
6742
6742
  o,
6743
6743
  s,
6744
6744
  i,
6745
- S
6745
+ _
6746
6746
  ]), c;
6747
6747
  }
6748
6748
  function Vb() {
@@ -6750,9 +6750,9 @@ function Vb() {
6750
6750
  return te((r) => {
6751
6751
  const { nodeInternals: n, nodeExtent: s, updateNodePositions: a, getNodes: i, snapToGrid: o, snapGrid: c, onError: d, nodesDraggable: l } = e.getState(), f = i().filter((v) => v.selected && (v.draggable || l && typeof v.draggable > "u")), m = o ? c[0] : 5, h = o ? c[1] : 5, b = r.isShiftPressed ? 4 : 1, p = r.x * m * b, g = r.y * h * b, y = f.map((v) => {
6752
6752
  if (v.positionAbsolute) {
6753
- const S = { x: v.positionAbsolute.x + p, y: v.positionAbsolute.y + g };
6754
- o && (S.x = c[0] * Math.round(S.x / c[0]), S.y = c[1] * Math.round(S.y / c[1]));
6755
- const { positionAbsolute: N, position: R } = Lb(v, S, n, s, void 0, d);
6753
+ const _ = { x: v.positionAbsolute.x + p, y: v.positionAbsolute.y + g };
6754
+ o && (_.x = c[0] * Math.round(_.x / c[0]), _.y = c[1] * Math.round(_.y / c[1]));
6755
+ const { positionAbsolute: N, position: R } = Lb(v, _, n, s, void 0, d);
6756
6756
  v.position = R, v.positionAbsolute = N;
6757
6757
  }
6758
6758
  return v;
@@ -6767,10 +6767,10 @@ const Ht = {
6767
6767
  ArrowRight: { x: 1, y: 0 }
6768
6768
  };
6769
6769
  var lr = (e) => {
6770
- const t = ({ id: r, type: n, data: s, xPos: a, yPos: i, xPosOrigin: o, yPosOrigin: c, selected: d, onClick: l, onMouseEnter: f, onMouseMove: m, onMouseLeave: h, onContextMenu: b, onDoubleClick: p, style: g, className: y, isDraggable: v, isSelectable: S, isConnectable: N, isFocusable: R, selectNodesOnDrag: w, sourcePosition: C, targetPosition: T, hidden: _, resizeObserver: A, dragHandle: k, zIndex: F, isParent: D, noDragClassName: x, noPanClassName: M, initialized: q, disableKeyboardA11y: I, ariaLabel: $, rfId: O, hasHandleBounds: H }) => {
6771
- const W = Me(), Y = me(null), Q = me(null), L = me(C), j = me(T), P = me(n), G = S || v || l || f || m || h, B = Vb(), U = or(r, W.getState, f), V = or(r, W.getState, m), ae = or(r, W.getState, h), ie = or(r, W.getState, b), pe = or(r, W.getState, p), ge = (ne) => {
6770
+ const t = ({ id: r, type: n, data: s, xPos: a, yPos: i, xPosOrigin: o, yPosOrigin: c, selected: d, onClick: l, onMouseEnter: f, onMouseMove: m, onMouseLeave: h, onContextMenu: b, onDoubleClick: p, style: g, className: y, isDraggable: v, isSelectable: _, isConnectable: N, isFocusable: R, selectNodesOnDrag: w, sourcePosition: C, targetPosition: T, hidden: S, resizeObserver: A, dragHandle: k, zIndex: F, isParent: D, noDragClassName: x, noPanClassName: M, initialized: q, disableKeyboardA11y: I, ariaLabel: $, rfId: O, hasHandleBounds: H }) => {
6771
+ const W = Me(), Y = me(null), Q = me(null), L = me(C), j = me(T), P = me(n), G = _ || v || l || f || m || h, B = Vb(), U = or(r, W.getState, f), V = or(r, W.getState, m), ae = or(r, W.getState, h), ie = or(r, W.getState, b), pe = or(r, W.getState, p), ge = (ne) => {
6772
6772
  const { nodeDragThreshold: z } = W.getState();
6773
- if (S && (!w || !v || z > 0) && $c({
6773
+ if (_ && (!w || !v || z > 0) && $c({
6774
6774
  id: r,
6775
6775
  store: W,
6776
6776
  nodeRef: Y
@@ -6780,7 +6780,7 @@ var lr = (e) => {
6780
6780
  }
6781
6781
  }, ce = (ne) => {
6782
6782
  if (!Ic(ne) && !I)
6783
- if (ob.includes(ne.key) && S) {
6783
+ if (ob.includes(ne.key) && _) {
6784
6784
  const z = ne.key === "Escape";
6785
6785
  $c({
6786
6786
  id: r,
@@ -6799,24 +6799,24 @@ var lr = (e) => {
6799
6799
  fe(() => () => {
6800
6800
  Q.current && (A?.unobserve(Q.current), Q.current = null);
6801
6801
  }, []), fe(() => {
6802
- if (Y.current && !_) {
6802
+ if (Y.current && !S) {
6803
6803
  const ne = Y.current;
6804
6804
  (!q || !H || Q.current !== ne) && (Q.current && A?.unobserve(Q.current), A?.observe(ne), Q.current = ne);
6805
6805
  }
6806
- }, [_, q, H]), fe(() => {
6806
+ }, [S, q, H]), fe(() => {
6807
6807
  const ne = P.current !== n, z = L.current !== C, re = j.current !== T;
6808
6808
  Y.current && (ne || z || re) && (ne && (P.current = n), z && (L.current = C), re && (j.current = T), W.getState().updateNodeDimensions([{ id: r, nodeElement: Y.current, forceUpdate: !0 }]));
6809
6809
  }, [r, n, C, T]);
6810
6810
  const le = $b({
6811
6811
  nodeRef: Y,
6812
- disabled: _ || !v,
6812
+ disabled: S || !v,
6813
6813
  noDragClassName: x,
6814
6814
  handleSelector: k,
6815
6815
  nodeId: r,
6816
- isSelectable: S,
6816
+ isSelectable: _,
6817
6817
  selectNodesOnDrag: w
6818
6818
  });
6819
- return _ ? null : K.createElement(
6819
+ return S ? null : K.createElement(
6820
6820
  "div",
6821
6821
  { className: De([
6822
6822
  "react-flow__node",
@@ -6828,7 +6828,7 @@ var lr = (e) => {
6828
6828
  y,
6829
6829
  {
6830
6830
  selected: d,
6831
- selectable: S,
6831
+ selectable: _,
6832
6832
  parent: D,
6833
6833
  dragging: le
6834
6834
  }
@@ -6890,11 +6890,11 @@ function t2({ onSelectionContextMenu: e, noPanClassName: t, disableKeyboardA11y:
6890
6890
  );
6891
6891
  }
6892
6892
  var r2 = Se(t2);
6893
- const n2 = (e) => e.nodesSelectionActive, zb = ({ children: e, onPaneClick: t, onPaneMouseEnter: r, onPaneMouseMove: n, onPaneMouseLeave: s, onPaneContextMenu: a, onPaneScroll: i, deleteKeyCode: o, onMove: c, onMoveStart: d, onMoveEnd: l, selectionKeyCode: f, selectionOnDrag: m, selectionMode: h, onSelectionStart: b, onSelectionEnd: p, multiSelectionKeyCode: g, panActivationKeyCode: y, zoomActivationKeyCode: v, elementsSelectable: S, zoomOnScroll: N, zoomOnPinch: R, panOnScroll: w, panOnScrollSpeed: C, panOnScrollMode: T, zoomOnDoubleClick: _, panOnDrag: A, defaultViewport: k, translateExtent: F, minZoom: D, maxZoom: x, preventScrolling: M, onSelectionContextMenu: q, noWheelClassName: I, noPanClassName: $, disableKeyboardA11y: O }) => {
6893
+ const n2 = (e) => e.nodesSelectionActive, zb = ({ children: e, onPaneClick: t, onPaneMouseEnter: r, onPaneMouseMove: n, onPaneMouseLeave: s, onPaneContextMenu: a, onPaneScroll: i, deleteKeyCode: o, onMove: c, onMoveStart: d, onMoveEnd: l, selectionKeyCode: f, selectionOnDrag: m, selectionMode: h, onSelectionStart: b, onSelectionEnd: p, multiSelectionKeyCode: g, panActivationKeyCode: y, zoomActivationKeyCode: v, elementsSelectable: _, zoomOnScroll: N, zoomOnPinch: R, panOnScroll: w, panOnScrollSpeed: C, panOnScrollMode: T, zoomOnDoubleClick: S, panOnDrag: A, defaultViewport: k, translateExtent: F, minZoom: D, maxZoom: x, preventScrolling: M, onSelectionContextMenu: q, noWheelClassName: I, noPanClassName: $, disableKeyboardA11y: O }) => {
6894
6894
  const H = we(n2), W = Nr(f), Y = Nr(y), Q = Y || A, L = Y || w, j = W || m && Q !== !0;
6895
6895
  return BS({ deleteKeyCode: o, multiSelectionKeyCode: g }), K.createElement(
6896
6896
  US,
6897
- { onMove: c, onMoveStart: d, onMoveEnd: l, onPaneContextMenu: a, elementsSelectable: S, zoomOnScroll: N, zoomOnPinch: R, panOnScroll: L, panOnScrollSpeed: C, panOnScrollMode: T, zoomOnDoubleClick: _, panOnDrag: !W && Q, defaultViewport: k, translateExtent: F, minZoom: D, maxZoom: x, zoomActivationKeyCode: v, preventScrolling: M, noWheelClassName: I, noPanClassName: $ },
6897
+ { onMove: c, onMoveStart: d, onMoveEnd: l, onPaneContextMenu: a, elementsSelectable: _, zoomOnScroll: N, zoomOnPinch: R, panOnScroll: L, panOnScrollSpeed: C, panOnScrollMode: T, zoomOnDoubleClick: S, panOnDrag: !W && Q, defaultViewport: k, translateExtent: F, minZoom: D, maxZoom: x, zoomActivationKeyCode: v, preventScrolling: M, noWheelClassName: I, noPanClassName: $ },
6898
6898
  K.createElement(
6899
6899
  Fb,
6900
6900
  { onSelectionStart: b, onSelectionEnd: p, onPaneClick: t, onPaneMouseEnter: r, onPaneMouseMove: n, onPaneMouseLeave: s, onPaneContextMenu: a, onPaneScroll: i, panOnDrag: Q, isSelecting: !!j, selectionMode: h },
@@ -6949,27 +6949,27 @@ const o2 = ({ x: e, y: t, width: r, height: n, origin: s }) => !r || !n ? { x: e
6949
6949
  }, []), K.createElement("div", { className: "react-flow__nodes", style: od }, o.map((l) => {
6950
6950
  let f = l.type || "default";
6951
6951
  e.nodeTypes[f] || (i?.("003", Ke.error003(f)), f = "default");
6952
- const m = e.nodeTypes[f] || e.nodeTypes.default, h = !!(l.draggable || t && typeof l.draggable > "u"), b = !!(l.selectable || s && typeof l.selectable > "u"), p = !!(l.connectable || r && typeof l.connectable > "u"), g = !!(l.focusable || n && typeof l.focusable > "u"), y = e.nodeExtent ? Jc(l.positionAbsolute, e.nodeExtent) : l.positionAbsolute, v = y?.x ?? 0, S = y?.y ?? 0, N = o2({
6952
+ const m = e.nodeTypes[f] || e.nodeTypes.default, h = !!(l.draggable || t && typeof l.draggable > "u"), b = !!(l.selectable || s && typeof l.selectable > "u"), p = !!(l.connectable || r && typeof l.connectable > "u"), g = !!(l.focusable || n && typeof l.focusable > "u"), y = e.nodeExtent ? Jc(l.positionAbsolute, e.nodeExtent) : l.positionAbsolute, v = y?.x ?? 0, _ = y?.y ?? 0, N = o2({
6953
6953
  x: v,
6954
- y: S,
6954
+ y: _,
6955
6955
  width: l.width ?? 0,
6956
6956
  height: l.height ?? 0,
6957
6957
  origin: e.nodeOrigin
6958
6958
  });
6959
- return K.createElement(m, { key: l.id, id: l.id, className: l.className, style: l.style, type: f, data: l.data, sourcePosition: l.sourcePosition || de.Bottom, targetPosition: l.targetPosition || de.Top, hidden: l.hidden, xPos: v, yPos: S, xPosOrigin: N.x, yPosOrigin: N.y, selectNodesOnDrag: e.selectNodesOnDrag, onClick: e.onNodeClick, onMouseEnter: e.onNodeMouseEnter, onMouseMove: e.onNodeMouseMove, onMouseLeave: e.onNodeMouseLeave, onContextMenu: e.onNodeContextMenu, onDoubleClick: e.onNodeDoubleClick, selected: !!l.selected, isDraggable: h, isSelectable: b, isConnectable: p, isFocusable: g, resizeObserver: d, dragHandle: l.dragHandle, zIndex: l[ke]?.z ?? 0, isParent: !!l[ke]?.isParent, noDragClassName: e.noDragClassName, noPanClassName: e.noPanClassName, initialized: !!l.width && !!l.height, rfId: e.rfId, disableKeyboardA11y: e.disableKeyboardA11y, ariaLabel: l.ariaLabel, hasHandleBounds: !!l[ke]?.handleBounds });
6959
+ return K.createElement(m, { key: l.id, id: l.id, className: l.className, style: l.style, type: f, data: l.data, sourcePosition: l.sourcePosition || de.Bottom, targetPosition: l.targetPosition || de.Top, hidden: l.hidden, xPos: v, yPos: _, xPosOrigin: N.x, yPosOrigin: N.y, selectNodesOnDrag: e.selectNodesOnDrag, onClick: e.onNodeClick, onMouseEnter: e.onNodeMouseEnter, onMouseMove: e.onNodeMouseMove, onMouseLeave: e.onNodeMouseLeave, onContextMenu: e.onNodeContextMenu, onDoubleClick: e.onNodeDoubleClick, selected: !!l.selected, isDraggable: h, isSelectable: b, isConnectable: p, isFocusable: g, resizeObserver: d, dragHandle: l.dragHandle, zIndex: l[ke]?.z ?? 0, isParent: !!l[ke]?.isParent, noDragClassName: e.noDragClassName, noPanClassName: e.noPanClassName, initialized: !!l.width && !!l.height, rfId: e.rfId, disableKeyboardA11y: e.disableKeyboardA11y, ariaLabel: l.ariaLabel, hasHandleBounds: !!l[ke]?.handleBounds });
6960
6960
  }));
6961
6961
  };
6962
6962
  Bb.displayName = "NodeRenderer";
6963
6963
  var c2 = Se(Bb);
6964
6964
  const d2 = (e, t, r) => r === de.Left ? e - t : r === de.Right ? e + t : e, u2 = (e, t, r) => r === de.Top ? e - t : r === de.Bottom ? e + t : e, Au = "react-flow__edgeupdater", Ru = ({ position: e, centerX: t, centerY: r, radius: n = 10, onMouseDown: s, onMouseEnter: a, onMouseOut: i, type: o }) => K.createElement("circle", { onMouseDown: s, onMouseEnter: a, onMouseOut: i, className: De([Au, `${Au}-${o}`]), cx: d2(t, n, e), cy: u2(r, n, e), r: n, stroke: "transparent", fill: "transparent" }), f2 = () => !0;
6965
6965
  var Ft = (e) => {
6966
- const t = ({ id: r, className: n, type: s, data: a, onClick: i, onEdgeDoubleClick: o, selected: c, animated: d, label: l, labelStyle: f, labelShowBg: m, labelBgStyle: h, labelBgPadding: b, labelBgBorderRadius: p, style: g, source: y, target: v, sourceX: S, sourceY: N, targetX: R, targetY: w, sourcePosition: C, targetPosition: T, elementsSelectable: _, hidden: A, sourceHandleId: k, targetHandleId: F, onContextMenu: D, onMouseEnter: x, onMouseMove: M, onMouseLeave: q, reconnectRadius: I, onReconnect: $, onReconnectStart: O, onReconnectEnd: H, markerEnd: W, markerStart: Y, rfId: Q, ariaLabel: L, isFocusable: j, isReconnectable: P, pathOptions: G, interactionWidth: B, disableKeyboardA11y: U }) => {
6966
+ const t = ({ id: r, className: n, type: s, data: a, onClick: i, onEdgeDoubleClick: o, selected: c, animated: d, label: l, labelStyle: f, labelShowBg: m, labelBgStyle: h, labelBgPadding: b, labelBgBorderRadius: p, style: g, source: y, target: v, sourceX: _, sourceY: N, targetX: R, targetY: w, sourcePosition: C, targetPosition: T, elementsSelectable: S, hidden: A, sourceHandleId: k, targetHandleId: F, onContextMenu: D, onMouseEnter: x, onMouseMove: M, onMouseLeave: q, reconnectRadius: I, onReconnect: $, onReconnectStart: O, onReconnectEnd: H, markerEnd: W, markerStart: Y, rfId: Q, ariaLabel: L, isFocusable: j, isReconnectable: P, pathOptions: G, interactionWidth: B, disableKeyboardA11y: U }) => {
6967
6967
  const V = me(null), [ae, ie] = Z(!1), [pe, ge] = Z(!1), ce = Me(), le = _e(() => `url('#${Fc(Y, Q)}')`, [Y, Q]), ne = _e(() => `url('#${Fc(W, Q)}')`, [W, Q]);
6968
6968
  if (A)
6969
6969
  return null;
6970
6970
  const z = (Te) => {
6971
6971
  const { edges: Pe, addSelectedEdges: Ie, unselectNodesAndEdges: Oe, multiSelectionActive: Dt } = ce.getState(), Ze = Pe.find((wt) => wt.id === r);
6972
- Ze && (_ && (ce.setState({ nodesSelectionActive: !1 }), Ze.selected && Dt ? (Oe({ nodes: [], edges: [Ze] }), V.current?.blur()) : Ie([r])), i && i(Te, Ze));
6972
+ Ze && (S && (ce.setState({ nodesSelectionActive: !1 }), Ze.selected && Dt ? (Oe({ nodes: [], edges: [Ze] }), V.current?.blur()) : Ie([r])), i && i(Te, Ze));
6973
6973
  }, re = ir(r, ce.getState, o), J = ir(r, ce.getState, D), ee = ir(r, ce.getState, x), he = ir(r, ce.getState, M), X = ir(r, ce.getState, q), se = (Te, Pe) => {
6974
6974
  if (Te.button !== 0)
6975
6975
  return;
@@ -6990,8 +6990,8 @@ var Ft = (e) => {
6990
6990
  edgeUpdaterType: wt,
6991
6991
  onReconnectEnd: Fn
6992
6992
  });
6993
- }, oe = (Te) => se(Te, !0), ue = (Te) => se(Te, !1), ye = () => ie(!0), xe = () => ie(!1), Ne = !_ && !i, qe = (Te) => {
6994
- if (!U && ob.includes(Te.key) && _) {
6993
+ }, oe = (Te) => se(Te, !0), ue = (Te) => se(Te, !1), ye = () => ie(!0), xe = () => ie(!1), Ne = !S && !i, qe = (Te) => {
6994
+ if (!U && ob.includes(Te.key) && S) {
6995
6995
  const { unselectNodesAndEdges: Pe, addSelectedEdges: Ie, edges: Oe } = ce.getState();
6996
6996
  Te.key === "Escape" ? (V.current?.blur(), Pe({ edges: [Oe.find((Ze) => Ze.id === r)] })) : Ie([r]);
6997
6997
  }
@@ -7004,11 +7004,11 @@ var Ft = (e) => {
7004
7004
  n,
7005
7005
  { selected: c, animated: d, inactive: Ne, updating: ae }
7006
7006
  ]), onClick: z, onDoubleClick: re, onContextMenu: J, onMouseEnter: ee, onMouseMove: he, onMouseLeave: X, onKeyDown: j ? qe : void 0, tabIndex: j ? 0 : void 0, role: j ? "button" : "img", "data-testid": `rf__edge-${r}`, "aria-label": L === null ? void 0 : L || `Edge from ${y} to ${v}`, "aria-describedby": j ? `${Rb}-${Q}` : void 0, ref: V },
7007
- !pe && K.createElement(e, { id: r, source: y, target: v, selected: c, animated: d, label: l, labelStyle: f, labelShowBg: m, labelBgStyle: h, labelBgPadding: b, labelBgBorderRadius: p, data: a, style: g, sourceX: S, sourceY: N, targetX: R, targetY: w, sourcePosition: C, targetPosition: T, sourceHandleId: k, targetHandleId: F, markerStart: le, markerEnd: ne, pathOptions: G, interactionWidth: B }),
7007
+ !pe && K.createElement(e, { id: r, source: y, target: v, selected: c, animated: d, label: l, labelStyle: f, labelShowBg: m, labelBgStyle: h, labelBgPadding: b, labelBgBorderRadius: p, data: a, style: g, sourceX: _, sourceY: N, targetX: R, targetY: w, sourcePosition: C, targetPosition: T, sourceHandleId: k, targetHandleId: F, markerStart: le, markerEnd: ne, pathOptions: G, interactionWidth: B }),
7008
7008
  P && K.createElement(
7009
7009
  K.Fragment,
7010
7010
  null,
7011
- (P === "source" || P === !0) && K.createElement(Ru, { position: C, centerX: S, centerY: N, radius: I, onMouseDown: oe, onMouseEnter: ye, onMouseOut: xe, type: "source" }),
7011
+ (P === "source" || P === !0) && K.createElement(Ru, { position: C, centerX: _, centerY: N, radius: I, onMouseDown: oe, onMouseEnter: ye, onMouseOut: xe, type: "source" }),
7012
7012
  (P === "target" || P === !0) && K.createElement(Ru, { position: T, centerX: R, centerY: w, radius: I, onMouseDown: ue, onMouseEnter: ye, onMouseOut: xe, type: "target" })
7013
7013
  )
7014
7014
  );
@@ -7183,7 +7183,7 @@ const E2 = (e) => ({
7183
7183
  nodeInternals: e.nodeInternals,
7184
7184
  onError: e.onError
7185
7185
  }), jb = ({ defaultMarkerColor: e, onlyRenderVisibleElements: t, elevateEdgesOnSelect: r, rfId: n, edgeTypes: s, noPanClassName: a, onEdgeContextMenu: i, onEdgeMouseEnter: o, onEdgeMouseMove: c, onEdgeMouseLeave: d, onEdgeClick: l, onEdgeDoubleClick: f, onReconnect: m, onReconnectStart: h, onReconnectEnd: b, reconnectRadius: p, children: g, disableKeyboardA11y: y }) => {
7186
- const { edgesFocusable: v, edgesUpdatable: S, elementsSelectable: N, width: R, height: w, connectionMode: C, nodeInternals: T, onError: _ } = we(E2, Re), A = b2(t, T, r);
7186
+ const { edgesFocusable: v, edgesUpdatable: _, elementsSelectable: N, width: R, height: w, connectionMode: C, nodeInternals: T, onError: S } = we(E2, Re), A = b2(t, T, r);
7187
7187
  return R ? K.createElement(
7188
7188
  K.Fragment,
7189
7189
  null,
@@ -7196,10 +7196,10 @@ const E2 = (e) => ({
7196
7196
  if (!I || !H)
7197
7197
  return null;
7198
7198
  let W = x.type || "default";
7199
- s[W] || (_?.("011", Ke.error011(W)), W = "default");
7200
- const Y = s[W] || s.default, Q = C === vt.Strict ? O.target : (O.target ?? []).concat(O.source ?? []), L = Du(q.source, x.sourceHandle), j = Du(Q, x.targetHandle), P = L?.position || de.Bottom, G = j?.position || de.Top, B = !!(x.focusable || v && typeof x.focusable > "u"), U = x.reconnectable || x.updatable, V = typeof m < "u" && (U || S && typeof U > "u");
7199
+ s[W] || (S?.("011", Ke.error011(W)), W = "default");
7200
+ const Y = s[W] || s.default, Q = C === vt.Strict ? O.target : (O.target ?? []).concat(O.source ?? []), L = Du(q.source, x.sourceHandle), j = Du(Q, x.targetHandle), P = L?.position || de.Bottom, G = j?.position || de.Top, B = !!(x.focusable || v && typeof x.focusable > "u"), U = x.reconnectable || x.updatable, V = typeof m < "u" && (U || _ && typeof U > "u");
7201
7201
  if (!L || !j)
7202
- return _?.("008", Ke.error008(L, x)), null;
7202
+ return S?.("008", Ke.error008(L, x)), null;
7203
7203
  const { sourceX: ae, sourceY: ie, targetX: pe, targetY: ge } = h2(M, L, P, $, j, G);
7204
7204
  return K.createElement(Y, { key: x.id, id: x.id, className: De([x.className, a]), type: W, data: x.data, selected: !!x.selected, animated: !!x.animated, hidden: !!x.hidden, label: x.label, labelStyle: x.labelStyle, labelShowBg: x.labelShowBg, labelBgStyle: x.labelBgStyle, labelBgPadding: x.labelBgPadding, labelBgBorderRadius: x.labelBgBorderRadius, style: x.style, source: x.source, target: x.target, sourceHandleId: x.sourceHandle, targetHandleId: x.targetHandle, markerEnd: x.markerEnd, markerStart: x.markerStart, sourceX: ae, sourceY: ie, targetX: pe, targetY: ge, sourcePosition: P, targetPosition: G, elementsSelectable: N, onContextMenu: i, onMouseEnter: o, onMouseMove: c, onMouseLeave: d, onClick: l, onEdgeDoubleClick: f, onReconnect: m, onReconnectStart: h, onReconnectEnd: b, reconnectRadius: p, rfId: n, ariaLabel: x.ariaLabel, isFocusable: B, isReconnectable: V, pathOptions: "pathOptions" in x ? x.pathOptions : void 0, interactionWidth: x.interactionWidth, disableKeyboardA11y: y });
7205
7205
  }))
@@ -7236,11 +7236,11 @@ const R2 = {
7236
7236
  let m = f?.[t];
7237
7237
  if (l === vt.Loose && (m = m || f?.[t === "source" ? "target" : "source"]), !i || !m)
7238
7238
  return null;
7239
- const h = o ? m.find((w) => w.id === o) : m[0], b = h ? h.x + h.width / 2 : (i.width ?? 0) / 2, p = h ? h.y + h.height / 2 : i.height ?? 0, g = (i.positionAbsolute?.x ?? 0) + b, y = (i.positionAbsolute?.y ?? 0) + p, v = h?.position, S = v ? R2[v] : null;
7240
- if (!v || !S)
7239
+ const h = o ? m.find((w) => w.id === o) : m[0], b = h ? h.x + h.width / 2 : (i.width ?? 0) / 2, p = h ? h.y + h.height / 2 : i.height ?? 0, g = (i.positionAbsolute?.x ?? 0) + b, y = (i.positionAbsolute?.y ?? 0) + p, v = h?.position, _ = v ? R2[v] : null;
7240
+ if (!v || !_)
7241
7241
  return null;
7242
7242
  if (s)
7243
- return K.createElement(s, { connectionLineType: n, connectionLineStyle: r, fromNode: i, fromHandle: h, fromX: g, fromY: y, toX: c, toY: d, fromPosition: v, toPosition: S, connectionStatus: a });
7243
+ return K.createElement(s, { connectionLineType: n, connectionLineStyle: r, fromNode: i, fromHandle: h, fromX: g, fromY: y, toX: c, toY: d, fromPosition: v, toPosition: _, connectionStatus: a });
7244
7244
  let N = "";
7245
7245
  const R = {
7246
7246
  sourceX: g,
@@ -7248,7 +7248,7 @@ const R2 = {
7248
7248
  sourcePosition: v,
7249
7249
  targetX: c,
7250
7250
  targetY: d,
7251
- targetPosition: S
7251
+ targetPosition: _
7252
7252
  };
7253
7253
  return n === mt.Bezier ? [N] = nd(R) : n === mt.Step ? [N] = Oc({
7254
7254
  ...R,
@@ -7286,18 +7286,18 @@ function Ou(e, t) {
7286
7286
  return t(e);
7287
7287
  }, [e]);
7288
7288
  }
7289
- const Ub = ({ nodeTypes: e, edgeTypes: t, onMove: r, onMoveStart: n, onMoveEnd: s, onInit: a, onNodeClick: i, onEdgeClick: o, onNodeDoubleClick: c, onEdgeDoubleClick: d, onNodeMouseEnter: l, onNodeMouseMove: f, onNodeMouseLeave: m, onNodeContextMenu: h, onSelectionContextMenu: b, onSelectionStart: p, onSelectionEnd: g, connectionLineType: y, connectionLineStyle: v, connectionLineComponent: S, connectionLineContainerStyle: N, selectionKeyCode: R, selectionOnDrag: w, selectionMode: C, multiSelectionKeyCode: T, panActivationKeyCode: _, zoomActivationKeyCode: A, deleteKeyCode: k, onlyRenderVisibleElements: F, elementsSelectable: D, selectNodesOnDrag: x, defaultViewport: M, translateExtent: q, minZoom: I, maxZoom: $, preventScrolling: O, defaultMarkerColor: H, zoomOnScroll: W, zoomOnPinch: Y, panOnScroll: Q, panOnScrollSpeed: L, panOnScrollMode: j, zoomOnDoubleClick: P, panOnDrag: G, onPaneClick: B, onPaneMouseEnter: U, onPaneMouseMove: V, onPaneMouseLeave: ae, onPaneScroll: ie, onPaneContextMenu: pe, onEdgeContextMenu: ge, onEdgeMouseEnter: ce, onEdgeMouseMove: le, onEdgeMouseLeave: ne, onReconnect: z, onReconnectStart: re, onReconnectEnd: J, reconnectRadius: ee, noDragClassName: he, noWheelClassName: X, noPanClassName: se, elevateEdgesOnSelect: oe, disableKeyboardA11y: ue, nodeOrigin: ye, nodeExtent: xe, rfId: Ne }) => {
7289
+ const Ub = ({ nodeTypes: e, edgeTypes: t, onMove: r, onMoveStart: n, onMoveEnd: s, onInit: a, onNodeClick: i, onEdgeClick: o, onNodeDoubleClick: c, onEdgeDoubleClick: d, onNodeMouseEnter: l, onNodeMouseMove: f, onNodeMouseLeave: m, onNodeContextMenu: h, onSelectionContextMenu: b, onSelectionStart: p, onSelectionEnd: g, connectionLineType: y, connectionLineStyle: v, connectionLineComponent: _, connectionLineContainerStyle: N, selectionKeyCode: R, selectionOnDrag: w, selectionMode: C, multiSelectionKeyCode: T, panActivationKeyCode: S, zoomActivationKeyCode: A, deleteKeyCode: k, onlyRenderVisibleElements: F, elementsSelectable: D, selectNodesOnDrag: x, defaultViewport: M, translateExtent: q, minZoom: I, maxZoom: $, preventScrolling: O, defaultMarkerColor: H, zoomOnScroll: W, zoomOnPinch: Y, panOnScroll: Q, panOnScrollSpeed: L, panOnScrollMode: j, zoomOnDoubleClick: P, panOnDrag: G, onPaneClick: B, onPaneMouseEnter: U, onPaneMouseMove: V, onPaneMouseLeave: ae, onPaneScroll: ie, onPaneContextMenu: pe, onEdgeContextMenu: ge, onEdgeMouseEnter: ce, onEdgeMouseMove: le, onEdgeMouseLeave: ne, onReconnect: z, onReconnectStart: re, onReconnectEnd: J, reconnectRadius: ee, noDragClassName: he, noWheelClassName: X, noPanClassName: se, elevateEdgesOnSelect: oe, disableKeyboardA11y: ue, nodeOrigin: ye, nodeExtent: xe, rfId: Ne }) => {
7290
7290
  const qe = Ou(e, i2), Te = Ou(t, m2);
7291
7291
  return A2(a), K.createElement(
7292
7292
  s2,
7293
- { onPaneClick: B, onPaneMouseEnter: U, onPaneMouseMove: V, onPaneMouseLeave: ae, onPaneContextMenu: pe, onPaneScroll: ie, deleteKeyCode: k, selectionKeyCode: R, selectionOnDrag: w, selectionMode: C, onSelectionStart: p, onSelectionEnd: g, multiSelectionKeyCode: T, panActivationKeyCode: _, zoomActivationKeyCode: A, elementsSelectable: D, onMove: r, onMoveStart: n, onMoveEnd: s, zoomOnScroll: W, zoomOnPinch: Y, zoomOnDoubleClick: P, panOnScroll: Q, panOnScrollSpeed: L, panOnScrollMode: j, panOnDrag: G, defaultViewport: M, translateExtent: q, minZoom: I, maxZoom: $, onSelectionContextMenu: b, preventScrolling: O, noDragClassName: he, noWheelClassName: X, noPanClassName: se, disableKeyboardA11y: ue },
7293
+ { onPaneClick: B, onPaneMouseEnter: U, onPaneMouseMove: V, onPaneMouseLeave: ae, onPaneContextMenu: pe, onPaneScroll: ie, deleteKeyCode: k, selectionKeyCode: R, selectionOnDrag: w, selectionMode: C, onSelectionStart: p, onSelectionEnd: g, multiSelectionKeyCode: T, panActivationKeyCode: S, zoomActivationKeyCode: A, elementsSelectable: D, onMove: r, onMoveStart: n, onMoveEnd: s, zoomOnScroll: W, zoomOnPinch: Y, zoomOnDoubleClick: P, panOnScroll: Q, panOnScrollSpeed: L, panOnScrollMode: j, panOnDrag: G, defaultViewport: M, translateExtent: q, minZoom: I, maxZoom: $, onSelectionContextMenu: b, preventScrolling: O, noDragClassName: he, noWheelClassName: X, noPanClassName: se, disableKeyboardA11y: ue },
7294
7294
  K.createElement(
7295
7295
  T2,
7296
7296
  null,
7297
7297
  K.createElement(
7298
7298
  C2,
7299
7299
  { edgeTypes: Te, onEdgeClick: o, onEdgeDoubleClick: d, onlyRenderVisibleElements: F, onEdgeContextMenu: ge, onEdgeMouseEnter: ce, onEdgeMouseMove: le, onEdgeMouseLeave: ne, onReconnect: z, onReconnectStart: re, onReconnectEnd: J, reconnectRadius: ee, defaultMarkerColor: H, noPanClassName: se, elevateEdgesOnSelect: !!oe, disableKeyboardA11y: ue, rfId: Ne },
7300
- K.createElement(D2, { style: v, type: y, component: S, containerStyle: N })
7300
+ K.createElement(D2, { style: v, type: y, component: _, containerStyle: N })
7301
7301
  ),
7302
7302
  K.createElement("div", { className: "react-flow__edgelabel-renderer" }),
7303
7303
  K.createElement(c2, { nodeTypes: qe, onNodeClick: i, onNodeDoubleClick: c, onNodeMouseEnter: l, onNodeMouseMove: f, onNodeMouseLeave: m, onNodeContextMenu: h, selectNodesOnDrag: x, onlyRenderVisibleElements: F, noPanClassName: se, noDragClassName: he, disableKeyboardA11y: ue, nodeOrigin: ye, nodeExtent: xe, rfId: Ne })
@@ -7542,7 +7542,7 @@ const O2 = {
7542
7542
  overflow: "hidden",
7543
7543
  position: "relative",
7544
7544
  zIndex: 0
7545
- }, Yb = on(({ nodes: e, edges: t, defaultNodes: r, defaultEdges: n, className: s, nodeTypes: a = O2, edgeTypes: i = F2, onNodeClick: o, onEdgeClick: c, onInit: d, onMove: l, onMoveStart: f, onMoveEnd: m, onConnect: h, onConnectStart: b, onConnectEnd: p, onClickConnectStart: g, onClickConnectEnd: y, onNodeMouseEnter: v, onNodeMouseMove: S, onNodeMouseLeave: N, onNodeContextMenu: R, onNodeDoubleClick: w, onNodeDragStart: C, onNodeDrag: T, onNodeDragStop: _, onNodesDelete: A, onEdgesDelete: k, onSelectionChange: F, onSelectionDragStart: D, onSelectionDrag: x, onSelectionDragStop: M, onSelectionContextMenu: q, onSelectionStart: I, onSelectionEnd: $, connectionMode: O = vt.Strict, connectionLineType: H = mt.Bezier, connectionLineStyle: W, connectionLineComponent: Y, connectionLineContainerStyle: Q, deleteKeyCode: L = "Backspace", selectionKeyCode: j = "Shift", selectionOnDrag: P = !1, selectionMode: G = wr.Full, panActivationKeyCode: B = "Space", multiSelectionKeyCode: U = rn() ? "Meta" : "Control", zoomActivationKeyCode: V = rn() ? "Meta" : "Control", snapToGrid: ae = !1, snapGrid: ie = L2, onlyRenderVisibleElements: pe = !1, selectNodesOnDrag: ge = !0, nodesDraggable: ce, nodesConnectable: le, nodesFocusable: ne, nodeOrigin: z = P2, edgesFocusable: re, edgesUpdatable: J, elementsSelectable: ee, defaultViewport: he = $2, minZoom: X = 0.5, maxZoom: se = 2, translateExtent: oe = Vc, preventScrolling: ue = !0, nodeExtent: ye, defaultMarkerColor: xe = "#b1b1b7", zoomOnScroll: Ne = !0, zoomOnPinch: qe = !0, panOnScroll: Te = !1, panOnScrollSpeed: Pe = 0.5, panOnScrollMode: Ie = Et.Free, zoomOnDoubleClick: Oe = !0, panOnDrag: Dt = !0, onPaneClick: Ze, onPaneMouseEnter: wt, onPaneMouseMove: In, onPaneMouseLeave: On, onPaneScroll: nr, onPaneContextMenu: Fn, children: Rd, onEdgeContextMenu: Nt, onEdgeDoubleClick: ox, onEdgeMouseEnter: lx, onEdgeMouseMove: cx, onEdgeMouseLeave: dx, onEdgeUpdate: ux, onEdgeUpdateStart: fx, onEdgeUpdateEnd: mx, onReconnect: hx, onReconnectStart: px, onReconnectEnd: gx, reconnectRadius: yx = 10, edgeUpdaterRadius: bx = 10, onNodesChange: vx, onEdgesChange: xx, noDragClassName: wx = "nodrag", noWheelClassName: Nx = "nowheel", noPanClassName: Md = "nopan", fitView: _x = !1, fitViewOptions: Sx, connectOnClick: Ex = !0, attributionPosition: Cx, proOptions: kx, defaultEdgeOptions: Tx, elevateNodesOnSelect: Ax = !0, elevateEdgesOnSelect: Rx = !1, disableKeyboardA11y: Dd = !1, autoPanOnConnect: Mx = !0, autoPanOnNodeDrag: Dx = !0, connectionRadius: qx = 20, isValidConnection: Ix, onError: Ox, style: Fx, id: qd, nodeDragThreshold: Px, ...Lx }, $x) => {
7545
+ }, Yb = on(({ nodes: e, edges: t, defaultNodes: r, defaultEdges: n, className: s, nodeTypes: a = O2, edgeTypes: i = F2, onNodeClick: o, onEdgeClick: c, onInit: d, onMove: l, onMoveStart: f, onMoveEnd: m, onConnect: h, onConnectStart: b, onConnectEnd: p, onClickConnectStart: g, onClickConnectEnd: y, onNodeMouseEnter: v, onNodeMouseMove: _, onNodeMouseLeave: N, onNodeContextMenu: R, onNodeDoubleClick: w, onNodeDragStart: C, onNodeDrag: T, onNodeDragStop: S, onNodesDelete: A, onEdgesDelete: k, onSelectionChange: F, onSelectionDragStart: D, onSelectionDrag: x, onSelectionDragStop: M, onSelectionContextMenu: q, onSelectionStart: I, onSelectionEnd: $, connectionMode: O = vt.Strict, connectionLineType: H = mt.Bezier, connectionLineStyle: W, connectionLineComponent: Y, connectionLineContainerStyle: Q, deleteKeyCode: L = "Backspace", selectionKeyCode: j = "Shift", selectionOnDrag: P = !1, selectionMode: G = wr.Full, panActivationKeyCode: B = "Space", multiSelectionKeyCode: U = rn() ? "Meta" : "Control", zoomActivationKeyCode: V = rn() ? "Meta" : "Control", snapToGrid: ae = !1, snapGrid: ie = L2, onlyRenderVisibleElements: pe = !1, selectNodesOnDrag: ge = !0, nodesDraggable: ce, nodesConnectable: le, nodesFocusable: ne, nodeOrigin: z = P2, edgesFocusable: re, edgesUpdatable: J, elementsSelectable: ee, defaultViewport: he = $2, minZoom: X = 0.5, maxZoom: se = 2, translateExtent: oe = Vc, preventScrolling: ue = !0, nodeExtent: ye, defaultMarkerColor: xe = "#b1b1b7", zoomOnScroll: Ne = !0, zoomOnPinch: qe = !0, panOnScroll: Te = !1, panOnScrollSpeed: Pe = 0.5, panOnScrollMode: Ie = Et.Free, zoomOnDoubleClick: Oe = !0, panOnDrag: Dt = !0, onPaneClick: Ze, onPaneMouseEnter: wt, onPaneMouseMove: In, onPaneMouseLeave: On, onPaneScroll: nr, onPaneContextMenu: Fn, children: Rd, onEdgeContextMenu: Nt, onEdgeDoubleClick: ox, onEdgeMouseEnter: lx, onEdgeMouseMove: cx, onEdgeMouseLeave: dx, onEdgeUpdate: ux, onEdgeUpdateStart: fx, onEdgeUpdateEnd: mx, onReconnect: hx, onReconnectStart: px, onReconnectEnd: gx, reconnectRadius: yx = 10, edgeUpdaterRadius: bx = 10, onNodesChange: vx, onEdgesChange: xx, noDragClassName: wx = "nodrag", noWheelClassName: Nx = "nowheel", noPanClassName: Md = "nopan", fitView: _x = !1, fitViewOptions: Sx, connectOnClick: Ex = !0, attributionPosition: Cx, proOptions: kx, defaultEdgeOptions: Tx, elevateNodesOnSelect: Ax = !0, elevateEdgesOnSelect: Rx = !1, disableKeyboardA11y: Dd = !1, autoPanOnConnect: Mx = !0, autoPanOnNodeDrag: Dx = !0, connectionRadius: qx = 20, isValidConnection: Ix, onError: Ox, style: Fx, id: qd, nodeDragThreshold: Px, ...Lx }, $x) => {
7546
7546
  const Pn = qd || "1";
7547
7547
  return K.createElement(
7548
7548
  "div",
@@ -7550,8 +7550,8 @@ const O2 = {
7550
7550
  K.createElement(
7551
7551
  Kb,
7552
7552
  null,
7553
- K.createElement(q2, { onInit: d, onMove: l, onMoveStart: f, onMoveEnd: m, onNodeClick: o, onEdgeClick: c, onNodeMouseEnter: v, onNodeMouseMove: S, onNodeMouseLeave: N, onNodeContextMenu: R, onNodeDoubleClick: w, nodeTypes: a, edgeTypes: i, connectionLineType: H, connectionLineStyle: W, connectionLineComponent: Y, connectionLineContainerStyle: Q, selectionKeyCode: j, selectionOnDrag: P, selectionMode: G, deleteKeyCode: L, multiSelectionKeyCode: U, panActivationKeyCode: B, zoomActivationKeyCode: V, onlyRenderVisibleElements: pe, selectNodesOnDrag: ge, defaultViewport: he, translateExtent: oe, minZoom: X, maxZoom: se, preventScrolling: ue, zoomOnScroll: Ne, zoomOnPinch: qe, zoomOnDoubleClick: Oe, panOnScroll: Te, panOnScrollSpeed: Pe, panOnScrollMode: Ie, panOnDrag: Dt, onPaneClick: Ze, onPaneMouseEnter: wt, onPaneMouseMove: In, onPaneMouseLeave: On, onPaneScroll: nr, onPaneContextMenu: Fn, onSelectionContextMenu: q, onSelectionStart: I, onSelectionEnd: $, onEdgeContextMenu: Nt, onEdgeDoubleClick: ox, onEdgeMouseEnter: lx, onEdgeMouseMove: cx, onEdgeMouseLeave: dx, onReconnect: hx ?? ux, onReconnectStart: px ?? fx, onReconnectEnd: gx ?? mx, reconnectRadius: yx ?? bx, defaultMarkerColor: xe, noDragClassName: wx, noWheelClassName: Nx, noPanClassName: Md, elevateEdgesOnSelect: Rx, rfId: Pn, disableKeyboardA11y: Dd, nodeOrigin: z, nodeExtent: ye }),
7554
- K.createElement(RS, { nodes: e, edges: t, defaultNodes: r, defaultEdges: n, onConnect: h, onConnectStart: b, onConnectEnd: p, onClickConnectStart: g, onClickConnectEnd: y, nodesDraggable: ce, nodesConnectable: le, nodesFocusable: ne, edgesFocusable: re, edgesUpdatable: J, elementsSelectable: ee, elevateNodesOnSelect: Ax, minZoom: X, maxZoom: se, nodeExtent: ye, onNodesChange: vx, onEdgesChange: xx, snapToGrid: ae, snapGrid: ie, connectionMode: O, translateExtent: oe, connectOnClick: Ex, defaultEdgeOptions: Tx, fitView: _x, fitViewOptions: Sx, onNodesDelete: A, onEdgesDelete: k, onNodeDragStart: C, onNodeDrag: T, onNodeDragStop: _, onSelectionDrag: x, onSelectionDragStart: D, onSelectionDragStop: M, noPanClassName: Md, nodeOrigin: z, rfId: Pn, autoPanOnConnect: Mx, autoPanOnNodeDrag: Dx, onError: Ox, connectionRadius: qx, isValidConnection: Ix, nodeDragThreshold: Px }),
7553
+ K.createElement(q2, { onInit: d, onMove: l, onMoveStart: f, onMoveEnd: m, onNodeClick: o, onEdgeClick: c, onNodeMouseEnter: v, onNodeMouseMove: _, onNodeMouseLeave: N, onNodeContextMenu: R, onNodeDoubleClick: w, nodeTypes: a, edgeTypes: i, connectionLineType: H, connectionLineStyle: W, connectionLineComponent: Y, connectionLineContainerStyle: Q, selectionKeyCode: j, selectionOnDrag: P, selectionMode: G, deleteKeyCode: L, multiSelectionKeyCode: U, panActivationKeyCode: B, zoomActivationKeyCode: V, onlyRenderVisibleElements: pe, selectNodesOnDrag: ge, defaultViewport: he, translateExtent: oe, minZoom: X, maxZoom: se, preventScrolling: ue, zoomOnScroll: Ne, zoomOnPinch: qe, zoomOnDoubleClick: Oe, panOnScroll: Te, panOnScrollSpeed: Pe, panOnScrollMode: Ie, panOnDrag: Dt, onPaneClick: Ze, onPaneMouseEnter: wt, onPaneMouseMove: In, onPaneMouseLeave: On, onPaneScroll: nr, onPaneContextMenu: Fn, onSelectionContextMenu: q, onSelectionStart: I, onSelectionEnd: $, onEdgeContextMenu: Nt, onEdgeDoubleClick: ox, onEdgeMouseEnter: lx, onEdgeMouseMove: cx, onEdgeMouseLeave: dx, onReconnect: hx ?? ux, onReconnectStart: px ?? fx, onReconnectEnd: gx ?? mx, reconnectRadius: yx ?? bx, defaultMarkerColor: xe, noDragClassName: wx, noWheelClassName: Nx, noPanClassName: Md, elevateEdgesOnSelect: Rx, rfId: Pn, disableKeyboardA11y: Dd, nodeOrigin: z, nodeExtent: ye }),
7554
+ K.createElement(RS, { nodes: e, edges: t, defaultNodes: r, defaultEdges: n, onConnect: h, onConnectStart: b, onConnectEnd: p, onClickConnectStart: g, onClickConnectEnd: y, nodesDraggable: ce, nodesConnectable: le, nodesFocusable: ne, edgesFocusable: re, edgesUpdatable: J, elementsSelectable: ee, elevateNodesOnSelect: Ax, minZoom: X, maxZoom: se, nodeExtent: ye, onNodesChange: vx, onEdgesChange: xx, snapToGrid: ae, snapGrid: ie, connectionMode: O, translateExtent: oe, connectOnClick: Ex, defaultEdgeOptions: Tx, fitView: _x, fitViewOptions: Sx, onNodesDelete: A, onEdgesDelete: k, onNodeDragStart: C, onNodeDrag: T, onNodeDragStop: S, onSelectionDrag: x, onSelectionDragStart: D, onSelectionDragStop: M, noPanClassName: Md, nodeOrigin: z, rfId: Pn, autoPanOnConnect: Mx, autoPanOnNodeDrag: Dx, onError: Ox, connectionRadius: qx, isValidConnection: Ix, nodeDragThreshold: Px }),
7555
7555
  K.createElement(TS, { onSelectionChange: F }),
7556
7556
  Rd,
7557
7557
  K.createElement(sS, { proOptions: kx, position: Cx }),
@@ -7631,9 +7631,9 @@ function Zb({
7631
7631
  ariaLabel: g = "React Flow mini map",
7632
7632
  inversePan: y = !1,
7633
7633
  zoomStep: v = 10,
7634
- offsetScale: S = 5
7634
+ offsetScale: _ = 5
7635
7635
  }) {
7636
- const N = Me(), R = me(null), { boundingRect: w, viewBB: C, rfId: T } = we(Z2, Re), _ = e?.width ?? Q2, A = e?.height ?? X2, k = w.width / _, F = w.height / A, D = Math.max(k, F), x = D * _, M = D * A, q = S * D, I = w.x - (x - w.width) / 2 - q, $ = w.y - (M - w.height) / 2 - q, O = x + q * 2, H = M + q * 2, W = `${J2}-${T}`, Y = me(0);
7636
+ const N = Me(), R = me(null), { boundingRect: w, viewBB: C, rfId: T } = we(Z2, Re), S = e?.width ?? Q2, A = e?.height ?? X2, k = w.width / S, F = w.height / A, D = Math.max(k, F), x = D * S, M = D * A, q = _ * D, I = w.x - (x - w.width) / 2 - q, $ = w.y - (M - w.height) / 2 - q, O = x + q * 2, H = M + q * 2, W = `${J2}-${T}`, Y = me(0);
7637
7637
  Y.current = D, fe(() => {
7638
7638
  if (R.current) {
7639
7639
  const j = Ce(R.current), P = (U) => {
@@ -7672,7 +7672,7 @@ function Zb({
7672
7672
  { position: f, style: e, className: De(["react-flow__minimap", t]), "data-testid": "rf__minimap" },
7673
7673
  K.createElement(
7674
7674
  "svg",
7675
- { width: _, height: A, viewBox: `${I} ${$} ${O} ${H}`, role: "img", "aria-labelledby": W, ref: R, onClick: Q },
7675
+ { width: S, height: A, viewBox: `${I} ${$} ${O} ${H}`, role: "img", "aria-labelledby": W, ref: R, onClick: Q },
7676
7676
  g && K.createElement("title", { id: W }, g),
7677
7677
  K.createElement(Y2, { onClick: L, nodeColor: n, nodeStrokeColor: r, nodeBorderRadius: a, nodeClassName: s, nodeStrokeWidth: i, nodeComponent: o }),
7678
7678
  K.createElement("path", { className: "react-flow__minimap-mask", d: `M${I - q},${$ - q}h${O + q * 2}v${H + q * 2}h${-O - q * 2}z
@@ -7724,7 +7724,7 @@ const iE = (e) => ({
7724
7724
  minZoomReached: e.transform[2] <= e.minZoom,
7725
7725
  maxZoomReached: e.transform[2] >= e.maxZoom
7726
7726
  }), Jb = ({ style: e, showZoom: t = !0, showFitView: r = !0, showInteractive: n = !0, fitViewOptions: s, onZoomIn: a, onZoomOut: i, onFitView: o, onInteractiveChange: c, className: d, children: l, position: f = "bottom-left" }) => {
7727
- const m = Me(), [h, b] = Z(!1), { isInteractive: p, minZoomReached: g, maxZoomReached: y } = we(iE, Re), { zoomIn: v, zoomOut: S, fitView: N } = id();
7727
+ const m = Me(), [h, b] = Z(!1), { isInteractive: p, minZoomReached: g, maxZoomReached: y } = we(iE, Re), { zoomIn: v, zoomOut: _, fitView: N } = id();
7728
7728
  if (fe(() => {
7729
7729
  b(!0);
7730
7730
  }, []), !h)
@@ -7732,7 +7732,7 @@ const iE = (e) => ({
7732
7732
  const R = () => {
7733
7733
  v(), a?.();
7734
7734
  }, w = () => {
7735
- S(), i?.();
7735
+ _(), i?.();
7736
7736
  }, C = () => {
7737
7737
  N(s), o?.();
7738
7738
  }, T = () => {
@@ -7801,7 +7801,7 @@ function ev({
7801
7801
  style: o,
7802
7802
  className: c
7803
7803
  }) {
7804
- const d = me(null), { transform: l, patternId: f } = we(fE, Re), m = i || dE[t], h = n || uE[t], b = t === He.Dots, p = t === He.Cross, g = Array.isArray(r) ? r : [r, r], y = [g[0] * l[2] || 1, g[1] * l[2] || 1], v = h * l[2], S = p ? [v, v] : y, N = b ? [v / a, v / a] : [S[0] / a, S[1] / a];
7804
+ const d = me(null), { transform: l, patternId: f } = we(fE, Re), m = i || dE[t], h = n || uE[t], b = t === He.Dots, p = t === He.Cross, g = Array.isArray(r) ? r : [r, r], y = [g[0] * l[2] || 1, g[1] * l[2] || 1], v = h * l[2], _ = p ? [v, v] : y, N = b ? [v / a, v / a] : [_[0] / a, _[1] / a];
7805
7805
  return K.createElement(
7806
7806
  "svg",
7807
7807
  { className: De(["react-flow__background", c]), style: {
@@ -7812,7 +7812,7 @@ function ev({
7812
7812
  top: 0,
7813
7813
  left: 0
7814
7814
  }, ref: d, "data-testid": "rf__background" },
7815
- K.createElement("pattern", { id: f + e, x: l[0] % y[0], y: l[1] % y[1], width: y[0], height: y[1], patternUnits: "userSpaceOnUse", patternTransform: `translate(-${N[0]},-${N[1]})` }, b ? K.createElement(cE, { color: m, radius: v / a }) : K.createElement(lE, { dimensions: S, color: m, lineWidth: s })),
7815
+ K.createElement("pattern", { id: f + e, x: l[0] % y[0], y: l[1] % y[1], width: y[0], height: y[1], patternUnits: "userSpaceOnUse", patternTransform: `translate(-${N[0]},-${N[1]})` }, b ? K.createElement(cE, { color: m, radius: v / a }) : K.createElement(lE, { dimensions: _, color: m, lineWidth: s })),
7816
7816
  K.createElement("rect", { x: "0", y: "0", width: "100%", height: "100%", fill: `url(#${f + e})` })
7817
7817
  );
7818
7818
  }
@@ -8083,11 +8083,11 @@ function pE({
8083
8083
  children: y
8084
8084
  }
8085
8085
  ),
8086
- /* @__PURE__ */ u("div", { className: "text-[9px] text-dc-text-muted leading-tight", children: h.map((v, S) => /* @__PURE__ */ E("div", { className: "font-mono", children: [
8086
+ /* @__PURE__ */ u("div", { className: "text-[9px] text-dc-text-muted leading-tight", children: h.map((v, _) => /* @__PURE__ */ E("div", { className: "font-mono", children: [
8087
8087
  v.sourceField,
8088
8088
  " → ",
8089
8089
  v.targetField
8090
- ] }, S)) })
8090
+ ] }, _)) })
8091
8091
  ] })
8092
8092
  }
8093
8093
  )
@@ -8742,8 +8742,8 @@ var ra, zf;
8742
8742
  function WE() {
8743
8743
  if (zf) return ra;
8744
8744
  zf = 1;
8745
- var e = /* @__PURE__ */ Tt(), t = /* @__PURE__ */ fd(), r = /* @__PURE__ */ rt(), n = "[object Arguments]", s = "[object Array]", a = "[object Boolean]", i = "[object Date]", o = "[object Error]", c = "[object Function]", d = "[object Map]", l = "[object Number]", f = "[object Object]", m = "[object RegExp]", h = "[object Set]", b = "[object String]", p = "[object WeakMap]", g = "[object ArrayBuffer]", y = "[object DataView]", v = "[object Float32Array]", S = "[object Float64Array]", N = "[object Int8Array]", R = "[object Int16Array]", w = "[object Int32Array]", C = "[object Uint8Array]", T = "[object Uint8ClampedArray]", _ = "[object Uint16Array]", A = "[object Uint32Array]", k = {};
8746
- k[v] = k[S] = k[N] = k[R] = k[w] = k[C] = k[T] = k[_] = k[A] = !0, k[n] = k[s] = k[g] = k[a] = k[y] = k[i] = k[o] = k[c] = k[d] = k[l] = k[f] = k[m] = k[h] = k[b] = k[p] = !1;
8745
+ var e = /* @__PURE__ */ Tt(), t = /* @__PURE__ */ fd(), r = /* @__PURE__ */ rt(), n = "[object Arguments]", s = "[object Array]", a = "[object Boolean]", i = "[object Date]", o = "[object Error]", c = "[object Function]", d = "[object Map]", l = "[object Number]", f = "[object Object]", m = "[object RegExp]", h = "[object Set]", b = "[object String]", p = "[object WeakMap]", g = "[object ArrayBuffer]", y = "[object DataView]", v = "[object Float32Array]", _ = "[object Float64Array]", N = "[object Int8Array]", R = "[object Int16Array]", w = "[object Int32Array]", C = "[object Uint8Array]", T = "[object Uint8ClampedArray]", S = "[object Uint16Array]", A = "[object Uint32Array]", k = {};
8746
+ k[v] = k[_] = k[N] = k[R] = k[w] = k[C] = k[T] = k[S] = k[A] = !0, k[n] = k[s] = k[g] = k[a] = k[y] = k[i] = k[o] = k[c] = k[d] = k[l] = k[f] = k[m] = k[h] = k[b] = k[p] = !1;
8747
8747
  function F(D) {
8748
8748
  return r(D) && t(D.length) && !!k[e(D)];
8749
8749
  }
@@ -9090,8 +9090,8 @@ function er() {
9090
9090
  if (xm) return qa;
9091
9091
  xm = 1;
9092
9092
  var e = /* @__PURE__ */ rC(), t = /* @__PURE__ */ cd(), r = /* @__PURE__ */ nC(), n = /* @__PURE__ */ mv(), s = /* @__PURE__ */ sC(), a = /* @__PURE__ */ Tt(), i = /* @__PURE__ */ rv(), o = "[object Map]", c = "[object Object]", d = "[object Promise]", l = "[object Set]", f = "[object WeakMap]", m = "[object DataView]", h = i(e), b = i(t), p = i(r), g = i(n), y = i(s), v = a;
9093
- return (e && v(new e(new ArrayBuffer(1))) != m || t && v(new t()) != o || r && v(r.resolve()) != d || n && v(new n()) != l || s && v(new s()) != f) && (v = function(S) {
9094
- var N = a(S), R = N == c ? S.constructor : void 0, w = R ? i(R) : "";
9093
+ return (e && v(new e(new ArrayBuffer(1))) != m || t && v(new t()) != o || r && v(r.resolve()) != d || n && v(new n()) != l || s && v(new s()) != f) && (v = function(_) {
9094
+ var N = a(_), R = N == c ? _.constructor : void 0, w = R ? i(R) : "";
9095
9095
  if (w)
9096
9096
  switch (w) {
9097
9097
  case h:
@@ -9184,38 +9184,38 @@ var za, Tm;
9184
9184
  function cC() {
9185
9185
  if (Tm) return za;
9186
9186
  Tm = 1;
9187
- var e = /* @__PURE__ */ yd(), t = /* @__PURE__ */ iC(), r = /* @__PURE__ */ oC(), n = /* @__PURE__ */ lC(), s = /* @__PURE__ */ pv(), a = "[object Boolean]", i = "[object Date]", o = "[object Map]", c = "[object Number]", d = "[object RegExp]", l = "[object Set]", f = "[object String]", m = "[object Symbol]", h = "[object ArrayBuffer]", b = "[object DataView]", p = "[object Float32Array]", g = "[object Float64Array]", y = "[object Int8Array]", v = "[object Int16Array]", S = "[object Int32Array]", N = "[object Uint8Array]", R = "[object Uint8ClampedArray]", w = "[object Uint16Array]", C = "[object Uint32Array]";
9188
- function T(_, A, k) {
9189
- var F = _.constructor;
9187
+ var e = /* @__PURE__ */ yd(), t = /* @__PURE__ */ iC(), r = /* @__PURE__ */ oC(), n = /* @__PURE__ */ lC(), s = /* @__PURE__ */ pv(), a = "[object Boolean]", i = "[object Date]", o = "[object Map]", c = "[object Number]", d = "[object RegExp]", l = "[object Set]", f = "[object String]", m = "[object Symbol]", h = "[object ArrayBuffer]", b = "[object DataView]", p = "[object Float32Array]", g = "[object Float64Array]", y = "[object Int8Array]", v = "[object Int16Array]", _ = "[object Int32Array]", N = "[object Uint8Array]", R = "[object Uint8ClampedArray]", w = "[object Uint16Array]", C = "[object Uint32Array]";
9188
+ function T(S, A, k) {
9189
+ var F = S.constructor;
9190
9190
  switch (A) {
9191
9191
  case h:
9192
- return e(_);
9192
+ return e(S);
9193
9193
  case a:
9194
9194
  case i:
9195
- return new F(+_);
9195
+ return new F(+S);
9196
9196
  case b:
9197
- return t(_, k);
9197
+ return t(S, k);
9198
9198
  case p:
9199
9199
  case g:
9200
9200
  case y:
9201
9201
  case v:
9202
- case S:
9202
+ case _:
9203
9203
  case N:
9204
9204
  case R:
9205
9205
  case w:
9206
9206
  case C:
9207
- return s(_, k);
9207
+ return s(S, k);
9208
9208
  case o:
9209
9209
  return new F();
9210
9210
  case c:
9211
9211
  case f:
9212
- return new F(_);
9212
+ return new F(S);
9213
9213
  case d:
9214
- return r(_);
9214
+ return r(S);
9215
9215
  case l:
9216
9216
  return new F();
9217
9217
  case m:
9218
- return n(_);
9218
+ return n(S);
9219
9219
  }
9220
9220
  }
9221
9221
  return za = T, za;
@@ -9287,8 +9287,8 @@ var Ka, Om;
9287
9287
  function bv() {
9288
9288
  if (Om) return Ka;
9289
9289
  Om = 1;
9290
- var e = /* @__PURE__ */ wn(), t = /* @__PURE__ */ ud(), r = /* @__PURE__ */ _n(), n = /* @__PURE__ */ YE(), s = /* @__PURE__ */ ZE(), a = /* @__PURE__ */ iv(), i = /* @__PURE__ */ ov(), o = /* @__PURE__ */ JE(), c = /* @__PURE__ */ eC(), d = /* @__PURE__ */ fv(), l = /* @__PURE__ */ tC(), f = /* @__PURE__ */ er(), m = /* @__PURE__ */ aC(), h = /* @__PURE__ */ cC(), b = /* @__PURE__ */ yv(), p = /* @__PURE__ */ Ae(), g = /* @__PURE__ */ Jt(), y = /* @__PURE__ */ uC(), v = /* @__PURE__ */ je(), S = /* @__PURE__ */ mC(), N = /* @__PURE__ */ xt(), R = /* @__PURE__ */ Rt(), w = 1, C = 2, T = 4, _ = "[object Arguments]", A = "[object Array]", k = "[object Boolean]", F = "[object Date]", D = "[object Error]", x = "[object Function]", M = "[object GeneratorFunction]", q = "[object Map]", I = "[object Number]", $ = "[object Object]", O = "[object RegExp]", H = "[object Set]", W = "[object String]", Y = "[object Symbol]", Q = "[object WeakMap]", L = "[object ArrayBuffer]", j = "[object DataView]", P = "[object Float32Array]", G = "[object Float64Array]", B = "[object Int8Array]", U = "[object Int16Array]", V = "[object Int32Array]", ae = "[object Uint8Array]", ie = "[object Uint8ClampedArray]", pe = "[object Uint16Array]", ge = "[object Uint32Array]", ce = {};
9291
- ce[_] = ce[A] = ce[L] = ce[j] = ce[k] = ce[F] = ce[P] = ce[G] = ce[B] = ce[U] = ce[V] = ce[q] = ce[I] = ce[$] = ce[O] = ce[H] = ce[W] = ce[Y] = ce[ae] = ce[ie] = ce[pe] = ce[ge] = !0, ce[D] = ce[x] = ce[Q] = !1;
9290
+ var e = /* @__PURE__ */ wn(), t = /* @__PURE__ */ ud(), r = /* @__PURE__ */ _n(), n = /* @__PURE__ */ YE(), s = /* @__PURE__ */ ZE(), a = /* @__PURE__ */ iv(), i = /* @__PURE__ */ ov(), o = /* @__PURE__ */ JE(), c = /* @__PURE__ */ eC(), d = /* @__PURE__ */ fv(), l = /* @__PURE__ */ tC(), f = /* @__PURE__ */ er(), m = /* @__PURE__ */ aC(), h = /* @__PURE__ */ cC(), b = /* @__PURE__ */ yv(), p = /* @__PURE__ */ Ae(), g = /* @__PURE__ */ Jt(), y = /* @__PURE__ */ uC(), v = /* @__PURE__ */ je(), _ = /* @__PURE__ */ mC(), N = /* @__PURE__ */ xt(), R = /* @__PURE__ */ Rt(), w = 1, C = 2, T = 4, S = "[object Arguments]", A = "[object Array]", k = "[object Boolean]", F = "[object Date]", D = "[object Error]", x = "[object Function]", M = "[object GeneratorFunction]", q = "[object Map]", I = "[object Number]", $ = "[object Object]", O = "[object RegExp]", H = "[object Set]", W = "[object String]", Y = "[object Symbol]", Q = "[object WeakMap]", L = "[object ArrayBuffer]", j = "[object DataView]", P = "[object Float32Array]", G = "[object Float64Array]", B = "[object Int8Array]", U = "[object Int16Array]", V = "[object Int32Array]", ae = "[object Uint8Array]", ie = "[object Uint8ClampedArray]", pe = "[object Uint16Array]", ge = "[object Uint32Array]", ce = {};
9291
+ ce[S] = ce[A] = ce[L] = ce[j] = ce[k] = ce[F] = ce[P] = ce[G] = ce[B] = ce[U] = ce[V] = ce[q] = ce[I] = ce[$] = ce[O] = ce[H] = ce[W] = ce[Y] = ce[ae] = ce[ie] = ce[pe] = ce[ge] = !0, ce[D] = ce[x] = ce[Q] = !1;
9292
9292
  function le(ne, z, re, J, ee, he) {
9293
9293
  var X, se = z & w, oe = z & C, ue = z & T;
9294
9294
  if (re && (X = ee ? re(ne, J, ee, he) : re(ne)), X !== void 0)
@@ -9303,7 +9303,7 @@ function bv() {
9303
9303
  var xe = f(ne), Ne = xe == x || xe == M;
9304
9304
  if (g(ne))
9305
9305
  return a(ne, se);
9306
- if (xe == $ || xe == _ || Ne && !ee) {
9306
+ if (xe == $ || xe == S || Ne && !ee) {
9307
9307
  if (X = oe || Ne ? {} : b(ne), !se)
9308
9308
  return oe ? c(ne, s(X, ne)) : o(ne, n(X, ne));
9309
9309
  } else {
@@ -9316,7 +9316,7 @@ function bv() {
9316
9316
  var qe = he.get(ne);
9317
9317
  if (qe)
9318
9318
  return qe;
9319
- he.set(ne, X), S(ne) ? ne.forEach(function(Ie) {
9319
+ he.set(ne, X), _(ne) ? ne.forEach(function(Ie) {
9320
9320
  X.add(le(Ie, z, re, Ie, ne, he));
9321
9321
  }) : y(ne) && ne.forEach(function(Ie, Oe) {
9322
9322
  X.set(Oe, le(Ie, z, re, Oe, ne, he));
@@ -9518,7 +9518,7 @@ function Sv() {
9518
9518
  var p = f.get(i), g = f.get(o);
9519
9519
  if (p && g)
9520
9520
  return p == o && g == i;
9521
- var y = -1, v = !0, S = c & s ? new e() : void 0;
9521
+ var y = -1, v = !0, _ = c & s ? new e() : void 0;
9522
9522
  for (f.set(i, o), f.set(o, i); ++y < h; ) {
9523
9523
  var N = i[y], R = o[y];
9524
9524
  if (d)
@@ -9529,10 +9529,10 @@ function Sv() {
9529
9529
  v = !1;
9530
9530
  break;
9531
9531
  }
9532
- if (S) {
9532
+ if (_) {
9533
9533
  if (!t(o, function(C, T) {
9534
- if (!r(S, T) && (N === C || l(N, C, c, d, f)))
9535
- return S.push(T);
9534
+ if (!r(_, T) && (N === C || l(N, C, c, d, f)))
9535
+ return _.push(T);
9536
9536
  })) {
9537
9537
  v = !1;
9538
9538
  break;
@@ -9574,8 +9574,8 @@ var pi, rh;
9574
9574
  function NC() {
9575
9575
  if (rh) return pi;
9576
9576
  rh = 1;
9577
- var e = /* @__PURE__ */ Zt(), t = /* @__PURE__ */ hv(), r = /* @__PURE__ */ Xt(), n = /* @__PURE__ */ Sv(), s = /* @__PURE__ */ wC(), a = /* @__PURE__ */ wd(), i = 1, o = 2, c = "[object Boolean]", d = "[object Date]", l = "[object Error]", f = "[object Map]", m = "[object Number]", h = "[object RegExp]", b = "[object Set]", p = "[object String]", g = "[object Symbol]", y = "[object ArrayBuffer]", v = "[object DataView]", S = e ? e.prototype : void 0, N = S ? S.valueOf : void 0;
9578
- function R(w, C, T, _, A, k, F) {
9577
+ var e = /* @__PURE__ */ Zt(), t = /* @__PURE__ */ hv(), r = /* @__PURE__ */ Xt(), n = /* @__PURE__ */ Sv(), s = /* @__PURE__ */ wC(), a = /* @__PURE__ */ wd(), i = 1, o = 2, c = "[object Boolean]", d = "[object Date]", l = "[object Error]", f = "[object Map]", m = "[object Number]", h = "[object RegExp]", b = "[object Set]", p = "[object String]", g = "[object Symbol]", y = "[object ArrayBuffer]", v = "[object DataView]", _ = e ? e.prototype : void 0, N = _ ? _.valueOf : void 0;
9578
+ function R(w, C, T, S, A, k, F) {
9579
9579
  switch (T) {
9580
9580
  case v:
9581
9581
  if (w.byteLength != C.byteLength || w.byteOffset != C.byteOffset)
@@ -9595,14 +9595,14 @@ function NC() {
9595
9595
  case f:
9596
9596
  var D = s;
9597
9597
  case b:
9598
- var x = _ & i;
9598
+ var x = S & i;
9599
9599
  if (D || (D = a), w.size != C.size && !x)
9600
9600
  return !1;
9601
9601
  var M = F.get(w);
9602
9602
  if (M)
9603
9603
  return M == C;
9604
- _ |= o, F.set(w, C);
9605
- var q = n(D(w), D(C), _, A, k, F);
9604
+ S |= o, F.set(w, C);
9605
+ var q = n(D(w), D(C), S, A, k, F);
9606
9606
  return F.delete(w), q;
9607
9607
  case g:
9608
9608
  if (N)
@@ -9626,9 +9626,9 @@ function _C() {
9626
9626
  if (!(f ? y in i : n.call(i, y)))
9627
9627
  return !1;
9628
9628
  }
9629
- var v = l.get(a), S = l.get(i);
9630
- if (v && S)
9631
- return v == i && S == a;
9629
+ var v = l.get(a), _ = l.get(i);
9630
+ if (v && _)
9631
+ return v == i && _ == a;
9632
9632
  var N = !0;
9633
9633
  l.set(a, i), l.set(i, a);
9634
9634
  for (var R = f; ++g < h; ) {
@@ -9643,8 +9643,8 @@ function _C() {
9643
9643
  R || (R = y == "constructor");
9644
9644
  }
9645
9645
  if (N && !R) {
9646
- var _ = a.constructor, A = i.constructor;
9647
- _ != A && "constructor" in a && "constructor" in i && !(typeof _ == "function" && _ instanceof _ && typeof A == "function" && A instanceof A) && (N = !1);
9646
+ var S = a.constructor, A = i.constructor;
9647
+ S != A && "constructor" in a && "constructor" in i && !(typeof S == "function" && S instanceof S && typeof A == "function" && A instanceof A) && (N = !1);
9648
9648
  }
9649
9649
  return l.delete(a), l.delete(i), N;
9650
9650
  }
@@ -9655,25 +9655,25 @@ function SC() {
9655
9655
  if (sh) return yi;
9656
9656
  sh = 1;
9657
9657
  var e = /* @__PURE__ */ wn(), t = /* @__PURE__ */ Sv(), r = /* @__PURE__ */ NC(), n = /* @__PURE__ */ _C(), s = /* @__PURE__ */ er(), a = /* @__PURE__ */ Ae(), i = /* @__PURE__ */ Jt(), o = /* @__PURE__ */ kr(), c = 1, d = "[object Arguments]", l = "[object Array]", f = "[object Object]", m = Object.prototype, h = m.hasOwnProperty;
9658
- function b(p, g, y, v, S, N) {
9658
+ function b(p, g, y, v, _, N) {
9659
9659
  var R = a(p), w = a(g), C = R ? l : s(p), T = w ? l : s(g);
9660
9660
  C = C == d ? f : C, T = T == d ? f : T;
9661
- var _ = C == f, A = T == f, k = C == T;
9661
+ var S = C == f, A = T == f, k = C == T;
9662
9662
  if (k && i(p)) {
9663
9663
  if (!i(g))
9664
9664
  return !1;
9665
- R = !0, _ = !1;
9665
+ R = !0, S = !1;
9666
9666
  }
9667
- if (k && !_)
9668
- return N || (N = new e()), R || o(p) ? t(p, g, y, v, S, N) : r(p, g, C, y, v, S, N);
9667
+ if (k && !S)
9668
+ return N || (N = new e()), R || o(p) ? t(p, g, y, v, _, N) : r(p, g, C, y, v, _, N);
9669
9669
  if (!(y & c)) {
9670
- var F = _ && h.call(p, "__wrapped__"), D = A && h.call(g, "__wrapped__");
9670
+ var F = S && h.call(p, "__wrapped__"), D = A && h.call(g, "__wrapped__");
9671
9671
  if (F || D) {
9672
9672
  var x = F ? p.value() : p, M = D ? g.value() : g;
9673
- return N || (N = new e()), S(x, M, y, v, N);
9673
+ return N || (N = new e()), _(x, M, y, v, N);
9674
9674
  }
9675
9675
  }
9676
- return k ? (N || (N = new e()), n(p, g, y, v, S, N)) : !1;
9676
+ return k ? (N || (N = new e()), n(p, g, y, v, _, N)) : !1;
9677
9677
  }
9678
9678
  return yi = b, yi;
9679
9679
  }
@@ -10162,9 +10162,9 @@ var no, jh;
10162
10162
  function jC() {
10163
10163
  if (jh) return no;
10164
10164
  jh = 1;
10165
- var e = "\\ud800-\\udfff", t = "\\u0300-\\u036f", r = "\\ufe20-\\ufe2f", n = "\\u20d0-\\u20ff", s = t + r + n, a = "\\ufe0e\\ufe0f", i = "[" + e + "]", o = "[" + s + "]", c = "\\ud83c[\\udffb-\\udfff]", d = "(?:" + o + "|" + c + ")", l = "[^" + e + "]", f = "(?:\\ud83c[\\udde6-\\uddff]){2}", m = "[\\ud800-\\udbff][\\udc00-\\udfff]", h = "\\u200d", b = d + "?", p = "[" + a + "]?", g = "(?:" + h + "(?:" + [l, f, m].join("|") + ")" + p + b + ")*", y = p + b + g, v = "(?:" + [l + o + "?", o, f, m, i].join("|") + ")", S = RegExp(c + "(?=" + c + ")|" + v + y, "g");
10165
+ var e = "\\ud800-\\udfff", t = "\\u0300-\\u036f", r = "\\ufe20-\\ufe2f", n = "\\u20d0-\\u20ff", s = t + r + n, a = "\\ufe0e\\ufe0f", i = "[" + e + "]", o = "[" + s + "]", c = "\\ud83c[\\udffb-\\udfff]", d = "(?:" + o + "|" + c + ")", l = "[^" + e + "]", f = "(?:\\ud83c[\\udde6-\\uddff]){2}", m = "[\\ud800-\\udbff][\\udc00-\\udfff]", h = "\\u200d", b = d + "?", p = "[" + a + "]?", g = "(?:" + h + "(?:" + [l, f, m].join("|") + ")" + p + b + ")*", y = p + b + g, v = "(?:" + [l + o + "?", o, f, m, i].join("|") + ")", _ = RegExp(c + "(?=" + c + ")|" + v + y, "g");
10166
10166
  function N(R) {
10167
- for (var w = S.lastIndex = 0; S.test(R); )
10167
+ for (var w = _.lastIndex = 0; _.test(R); )
10168
10168
  ++w;
10169
10169
  return w;
10170
10170
  }
@@ -10206,8 +10206,8 @@ function WC() {
10206
10206
  var g = f && f.constructor;
10207
10207
  p ? h = b ? new g() : [] : c(f) ? h = o(g) ? t(s(f)) : {} : h = {};
10208
10208
  }
10209
- return (p ? e : r)(f, function(y, v, S) {
10210
- return m(h, y, v, S);
10209
+ return (p ? e : r)(f, function(y, v, _) {
10210
+ return m(h, y, v, _);
10211
10211
  }), h;
10212
10212
  }
10213
10213
  return io = l, io;
@@ -10424,13 +10424,13 @@ function ak() {
10424
10424
  g = d ? [] : p;
10425
10425
  e:
10426
10426
  for (; ++f < h; ) {
10427
- var v = c[f], S = d ? d(v) : v;
10428
- if (v = l || v !== 0 ? v : 0, b && S === S) {
10427
+ var v = c[f], _ = d ? d(v) : v;
10428
+ if (v = l || v !== 0 ? v : 0, b && _ === _) {
10429
10429
  for (var N = g.length; N--; )
10430
- if (g[N] === S)
10430
+ if (g[N] === _)
10431
10431
  continue e;
10432
- d && g.push(S), p.push(v);
10433
- } else m(g, S, l) || (g !== p && g.push(S), p.push(v));
10432
+ d && g.push(_), p.push(v);
10433
+ } else m(g, _, l) || (g !== p && g.push(_), p.push(v));
10434
10434
  }
10435
10435
  return p;
10436
10436
  }
@@ -11399,10 +11399,10 @@ function Pk() {
11399
11399
  if (sg) return bl;
11400
11400
  sg = 1;
11401
11401
  var e = /* @__PURE__ */ Qv(), t = /* @__PURE__ */ iv(), r = /* @__PURE__ */ pv(), n = /* @__PURE__ */ ov(), s = /* @__PURE__ */ yv(), a = /* @__PURE__ */ Cr(), i = /* @__PURE__ */ Ae(), o = /* @__PURE__ */ zv(), c = /* @__PURE__ */ Jt(), d = /* @__PURE__ */ Sr(), l = /* @__PURE__ */ je(), f = /* @__PURE__ */ Ok(), m = /* @__PURE__ */ kr(), h = /* @__PURE__ */ Xv(), b = /* @__PURE__ */ Fk();
11402
- function p(g, y, v, S, N, R, w) {
11403
- var C = h(g, v), T = h(y, v), _ = w.get(T);
11404
- if (_) {
11405
- e(g, v, _);
11402
+ function p(g, y, v, _, N, R, w) {
11403
+ var C = h(g, v), T = h(y, v), S = w.get(T);
11404
+ if (S) {
11405
+ e(g, v, S);
11406
11406
  return;
11407
11407
  }
11408
11408
  var A = R ? R(C, T, v + "", g, y, w) : void 0, k = A === void 0;
@@ -11410,7 +11410,7 @@ function Pk() {
11410
11410
  var F = i(T), D = !F && c(T), x = !F && !D && m(T);
11411
11411
  A = T, F || D || x ? i(C) ? A = C : o(C) ? A = n(C) : D ? (k = !1, A = t(T, !0)) : x ? (k = !1, A = r(T, !0)) : A = [] : f(T) || a(T) ? (A = C, a(C) ? A = b(C) : (!l(C) || d(C)) && (A = s(T))) : k = !1;
11412
11412
  }
11413
- k && (w.set(T, A), N(A, T, S, R, w), w.delete(T)), e(g, v, A);
11413
+ k && (w.set(T, A), N(A, T, _, R, w), w.delete(T)), e(g, v, A);
11414
11414
  }
11415
11415
  return bl = p, bl;
11416
11416
  }
@@ -11656,8 +11656,8 @@ function tT() {
11656
11656
  var h = -1;
11657
11657
  f = e(f, a(r));
11658
11658
  var b = n(l, function(p, g, y) {
11659
- var v = e(f, function(S) {
11660
- return S(p);
11659
+ var v = e(f, function(_) {
11660
+ return _(p);
11661
11661
  });
11662
11662
  return { criteria: v, index: ++h, value: p };
11663
11663
  });
@@ -11827,8 +11827,8 @@ function oT() {
11827
11827
  e.forEach(d.nodes(), function(g) {
11828
11828
  f.setNode(g, { v: g, in: 0, out: 0 });
11829
11829
  }), e.forEach(d.edges(), function(g) {
11830
- var y = f.edge(g.v, g.w) || 0, v = l(g), S = y + v;
11831
- f.setEdge(g.v, g.w, S), h = Math.max(h, f.node(g.v).out += v), m = Math.max(m, f.node(g.w).in += v);
11830
+ var y = f.edge(g.v, g.w) || 0, v = l(g), _ = y + v;
11831
+ f.setEdge(g.v, g.w, _), h = Math.max(h, f.node(g.v).out += v), m = Math.max(m, f.node(g.w).in += v);
11832
11832
  });
11833
11833
  var b = e.range(h + m + 3).map(function() {
11834
11834
  return new r();
@@ -11905,10 +11905,10 @@ function Le() {
11905
11905
  time: b,
11906
11906
  notime: p
11907
11907
  };
11908
- function r(g, y, v, S) {
11908
+ function r(g, y, v, _) {
11909
11909
  var N;
11910
11910
  do
11911
- N = e.uniqueId(S);
11911
+ N = e.uniqueId(_);
11912
11912
  while (g.hasNode(N));
11913
11913
  return v.dummy = y, g.setNode(N, v), N;
11914
11914
  }
@@ -11917,10 +11917,10 @@ function Le() {
11917
11917
  return e.forEach(g.nodes(), function(v) {
11918
11918
  y.setNode(v, g.node(v));
11919
11919
  }), e.forEach(g.edges(), function(v) {
11920
- var S = y.edge(v.v, v.w) || { weight: 0, minlen: 1 }, N = g.edge(v);
11920
+ var _ = y.edge(v.v, v.w) || { weight: 0, minlen: 1 }, N = g.edge(v);
11921
11921
  y.setEdge(v.v, v.w, {
11922
- weight: S.weight + N.weight,
11923
- minlen: Math.max(S.minlen, N.minlen)
11922
+ weight: _.weight + N.weight,
11923
+ minlen: Math.max(_.minlen, N.minlen)
11924
11924
  });
11925
11925
  }), y;
11926
11926
  }
@@ -11934,36 +11934,36 @@ function Le() {
11934
11934
  }
11935
11935
  function a(g) {
11936
11936
  var y = e.map(g.nodes(), function(v) {
11937
- var S = {};
11937
+ var _ = {};
11938
11938
  return e.forEach(g.outEdges(v), function(N) {
11939
- S[N.w] = (S[N.w] || 0) + g.edge(N).weight;
11940
- }), S;
11939
+ _[N.w] = (_[N.w] || 0) + g.edge(N).weight;
11940
+ }), _;
11941
11941
  });
11942
11942
  return e.zipObject(g.nodes(), y);
11943
11943
  }
11944
11944
  function i(g) {
11945
11945
  var y = e.map(g.nodes(), function(v) {
11946
- var S = {};
11946
+ var _ = {};
11947
11947
  return e.forEach(g.inEdges(v), function(N) {
11948
- S[N.v] = (S[N.v] || 0) + g.edge(N).weight;
11949
- }), S;
11948
+ _[N.v] = (_[N.v] || 0) + g.edge(N).weight;
11949
+ }), _;
11950
11950
  });
11951
11951
  return e.zipObject(g.nodes(), y);
11952
11952
  }
11953
11953
  function o(g, y) {
11954
- var v = g.x, S = g.y, N = y.x - v, R = y.y - S, w = g.width / 2, C = g.height / 2;
11954
+ var v = g.x, _ = g.y, N = y.x - v, R = y.y - _, w = g.width / 2, C = g.height / 2;
11955
11955
  if (!N && !R)
11956
11956
  throw new Error("Not possible to find intersection inside of the rectangle");
11957
- var T, _;
11958
- return Math.abs(R) * w > Math.abs(N) * C ? (R < 0 && (C = -C), T = C * N / R, _ = C) : (N < 0 && (w = -w), T = w, _ = w * R / N), { x: v + T, y: S + _ };
11957
+ var T, S;
11958
+ return Math.abs(R) * w > Math.abs(N) * C ? (R < 0 && (C = -C), T = C * N / R, S = C) : (N < 0 && (w = -w), T = w, S = w * R / N), { x: v + T, y: _ + S };
11959
11959
  }
11960
11960
  function c(g) {
11961
11961
  var y = e.map(e.range(m(g) + 1), function() {
11962
11962
  return [];
11963
11963
  });
11964
11964
  return e.forEach(g.nodes(), function(v) {
11965
- var S = g.node(v), N = S.rank;
11966
- e.isUndefined(N) || (y[N][S.order] = v);
11965
+ var _ = g.node(v), N = _.rank;
11966
+ e.isUndefined(N) || (y[N][_.order] = v);
11967
11967
  }), y;
11968
11968
  }
11969
11969
  function d(g) {
@@ -11971,8 +11971,8 @@ function Le() {
11971
11971
  return g.node(v).rank;
11972
11972
  }));
11973
11973
  e.forEach(g.nodes(), function(v) {
11974
- var S = g.node(v);
11975
- e.has(S, "rank") && (S.rank -= y);
11974
+ var _ = g.node(v);
11975
+ e.has(_, "rank") && (_.rank -= y);
11976
11976
  });
11977
11977
  }
11978
11978
  function l(g) {
@@ -11983,19 +11983,19 @@ function Le() {
11983
11983
  var w = g.node(R).rank - y;
11984
11984
  v[w] || (v[w] = []), v[w].push(R);
11985
11985
  });
11986
- var S = 0, N = g.graph().nodeRankFactor;
11986
+ var _ = 0, N = g.graph().nodeRankFactor;
11987
11987
  e.forEach(v, function(R, w) {
11988
- e.isUndefined(R) && w % N !== 0 ? --S : S && e.forEach(R, function(C) {
11989
- g.node(C).rank += S;
11988
+ e.isUndefined(R) && w % N !== 0 ? --_ : _ && e.forEach(R, function(C) {
11989
+ g.node(C).rank += _;
11990
11990
  });
11991
11991
  });
11992
11992
  }
11993
- function f(g, y, v, S) {
11993
+ function f(g, y, v, _) {
11994
11994
  var N = {
11995
11995
  width: 0,
11996
11996
  height: 0
11997
11997
  };
11998
- return arguments.length >= 4 && (N.rank = v, N.order = S), r(g, "border", N, y);
11998
+ return arguments.length >= 4 && (N.rank = v, N.order = _), r(g, "border", N, y);
11999
11999
  }
12000
12000
  function m(g) {
12001
12001
  return e.max(e.map(g.nodes(), function(y) {
@@ -12006,8 +12006,8 @@ function Le() {
12006
12006
  }
12007
12007
  function h(g, y) {
12008
12008
  var v = { lhs: [], rhs: [] };
12009
- return e.forEach(g, function(S) {
12010
- y(S) ? v.lhs.push(S) : v.rhs.push(S);
12009
+ return e.forEach(g, function(_) {
12010
+ y(_) ? v.lhs.push(_) : v.rhs.push(_);
12011
12011
  }), v;
12012
12012
  }
12013
12013
  function b(g, y) {
@@ -12133,79 +12133,79 @@ function dT() {
12133
12133
  Fg = 1;
12134
12134
  var e = /* @__PURE__ */ Ee(), t = /* @__PURE__ */ Jv(), r = an().slack, n = an().longestPath, s = Ye().alg.preorder, a = Ye().alg.postorder, i = Le().simplify;
12135
12135
  Ql = o, o.initLowLimValues = f, o.initCutValues = c, o.calcCutValue = l, o.leaveEdge = h, o.enterEdge = b, o.exchangeEdges = p;
12136
- function o(S) {
12137
- S = i(S), n(S);
12138
- var N = t(S);
12139
- f(N), c(N, S);
12136
+ function o(_) {
12137
+ _ = i(_), n(_);
12138
+ var N = t(_);
12139
+ f(N), c(N, _);
12140
12140
  for (var R, w; R = h(N); )
12141
- w = b(N, S, R), p(N, S, R, w);
12141
+ w = b(N, _, R), p(N, _, R, w);
12142
12142
  }
12143
- function c(S, N) {
12144
- var R = a(S, S.nodes());
12143
+ function c(_, N) {
12144
+ var R = a(_, _.nodes());
12145
12145
  R = R.slice(0, R.length - 1), e.forEach(R, function(w) {
12146
- d(S, N, w);
12146
+ d(_, N, w);
12147
12147
  });
12148
12148
  }
12149
- function d(S, N, R) {
12150
- var w = S.node(R), C = w.parent;
12151
- S.edge(R, C).cutvalue = l(S, N, R);
12149
+ function d(_, N, R) {
12150
+ var w = _.node(R), C = w.parent;
12151
+ _.edge(R, C).cutvalue = l(_, N, R);
12152
12152
  }
12153
- function l(S, N, R) {
12154
- var w = S.node(R), C = w.parent, T = !0, _ = N.edge(R, C), A = 0;
12155
- return _ || (T = !1, _ = N.edge(C, R)), A = _.weight, e.forEach(N.nodeEdges(R), function(k) {
12153
+ function l(_, N, R) {
12154
+ var w = _.node(R), C = w.parent, T = !0, S = N.edge(R, C), A = 0;
12155
+ return S || (T = !1, S = N.edge(C, R)), A = S.weight, e.forEach(N.nodeEdges(R), function(k) {
12156
12156
  var F = k.v === R, D = F ? k.w : k.v;
12157
12157
  if (D !== C) {
12158
12158
  var x = F === T, M = N.edge(k).weight;
12159
- if (A += x ? M : -M, y(S, R, D)) {
12160
- var q = S.edge(R, D).cutvalue;
12159
+ if (A += x ? M : -M, y(_, R, D)) {
12160
+ var q = _.edge(R, D).cutvalue;
12161
12161
  A += x ? -q : q;
12162
12162
  }
12163
12163
  }
12164
12164
  }), A;
12165
12165
  }
12166
- function f(S, N) {
12167
- arguments.length < 2 && (N = S.nodes()[0]), m(S, {}, 1, N);
12166
+ function f(_, N) {
12167
+ arguments.length < 2 && (N = _.nodes()[0]), m(_, {}, 1, N);
12168
12168
  }
12169
- function m(S, N, R, w, C) {
12170
- var T = R, _ = S.node(w);
12171
- return N[w] = !0, e.forEach(S.neighbors(w), function(A) {
12172
- e.has(N, A) || (R = m(S, N, R, A, w));
12173
- }), _.low = T, _.lim = R++, C ? _.parent = C : delete _.parent, R;
12169
+ function m(_, N, R, w, C) {
12170
+ var T = R, S = _.node(w);
12171
+ return N[w] = !0, e.forEach(_.neighbors(w), function(A) {
12172
+ e.has(N, A) || (R = m(_, N, R, A, w));
12173
+ }), S.low = T, S.lim = R++, C ? S.parent = C : delete S.parent, R;
12174
12174
  }
12175
- function h(S) {
12176
- return e.find(S.edges(), function(N) {
12177
- return S.edge(N).cutvalue < 0;
12175
+ function h(_) {
12176
+ return e.find(_.edges(), function(N) {
12177
+ return _.edge(N).cutvalue < 0;
12178
12178
  });
12179
12179
  }
12180
- function b(S, N, R) {
12180
+ function b(_, N, R) {
12181
12181
  var w = R.v, C = R.w;
12182
12182
  N.hasEdge(w, C) || (w = R.w, C = R.v);
12183
- var T = S.node(w), _ = S.node(C), A = T, k = !1;
12184
- T.lim > _.lim && (A = _, k = !0);
12183
+ var T = _.node(w), S = _.node(C), A = T, k = !1;
12184
+ T.lim > S.lim && (A = S, k = !0);
12185
12185
  var F = e.filter(N.edges(), function(D) {
12186
- return k === v(S, S.node(D.v), A) && k !== v(S, S.node(D.w), A);
12186
+ return k === v(_, _.node(D.v), A) && k !== v(_, _.node(D.w), A);
12187
12187
  });
12188
12188
  return e.minBy(F, function(D) {
12189
12189
  return r(N, D);
12190
12190
  });
12191
12191
  }
12192
- function p(S, N, R, w) {
12192
+ function p(_, N, R, w) {
12193
12193
  var C = R.v, T = R.w;
12194
- S.removeEdge(C, T), S.setEdge(w.v, w.w, {}), f(S), c(S, N), g(S, N);
12194
+ _.removeEdge(C, T), _.setEdge(w.v, w.w, {}), f(_), c(_, N), g(_, N);
12195
12195
  }
12196
- function g(S, N) {
12197
- var R = e.find(S.nodes(), function(C) {
12196
+ function g(_, N) {
12197
+ var R = e.find(_.nodes(), function(C) {
12198
12198
  return !N.node(C).parent;
12199
- }), w = s(S, R);
12199
+ }), w = s(_, R);
12200
12200
  w = w.slice(1), e.forEach(w, function(C) {
12201
- var T = S.node(C).parent, _ = N.edge(C, T), A = !1;
12202
- _ || (_ = N.edge(T, C), A = !0), N.node(C).rank = N.node(T).rank + (A ? _.minlen : -_.minlen);
12201
+ var T = _.node(C).parent, S = N.edge(C, T), A = !1;
12202
+ S || (S = N.edge(T, C), A = !0), N.node(C).rank = N.node(T).rank + (A ? S.minlen : -S.minlen);
12203
12203
  });
12204
12204
  }
12205
- function y(S, N, R) {
12206
- return S.hasEdge(N, R);
12205
+ function y(_, N, R) {
12206
+ return _.hasEdge(N, R);
12207
12207
  }
12208
- function v(S, N, R) {
12208
+ function v(_, N, R) {
12209
12209
  return R.low <= N.lim && N.lim <= R.lim;
12210
12210
  }
12211
12211
  return Ql;
@@ -12312,7 +12312,7 @@ function mT() {
12312
12312
  var p = t.addBorderNode(o, "_bt"), g = t.addBorderNode(o, "_bb"), y = o.node(h);
12313
12313
  o.setParent(p, h), y.borderTop = p, o.setParent(g, h), y.borderBottom = g, e.forEach(b, function(v) {
12314
12314
  n(o, c, d, l, f, m, v);
12315
- var S = o.node(v), N = S.borderTop ? S.borderTop : v, R = S.borderBottom ? S.borderBottom : v, w = S.borderTop ? l : 2 * l, C = N !== R ? 1 : f - m[h] + 1;
12315
+ var _ = o.node(v), N = _.borderTop ? _.borderTop : v, R = _.borderBottom ? _.borderBottom : v, w = _.borderTop ? l : 2 * l, C = N !== R ? 1 : f - m[h] + 1;
12316
12316
  o.setEdge(p, N, {
12317
12317
  weight: w,
12318
12318
  minlen: C,
@@ -12628,8 +12628,8 @@ function wT() {
12628
12628
  a(y, p);
12629
12629
  var v = n(y, l);
12630
12630
  if (h && (v.vs = e.flatten([h, v.vs, b], !0), o.predecessors(h).length)) {
12631
- var S = o.node(o.predecessors(h)[0]), N = o.node(o.predecessors(b)[0]);
12632
- e.has(v, "barycenter") || (v.barycenter = 0, v.weight = 0), v.barycenter = (v.barycenter * v.weight + S.order + N.order) / (v.weight + 2), v.weight += 2;
12631
+ var _ = o.node(o.predecessors(h)[0]), N = o.node(o.predecessors(b)[0]);
12632
+ e.has(v, "barycenter") || (v.barycenter = 0, v.weight = 0), v.barycenter = (v.barycenter * v.weight + _.order + N.order) / (v.weight + 2), v.weight += 2;
12633
12633
  }
12634
12634
  return v;
12635
12635
  }
@@ -12701,8 +12701,8 @@ function ST() {
12701
12701
  function c(m) {
12702
12702
  var h = o.maxRank(m), b = d(m, e.range(1, h + 1), "inEdges"), p = d(m, e.range(h - 1, -1, -1), "outEdges"), g = t(m);
12703
12703
  f(m, g);
12704
- for (var y = Number.POSITIVE_INFINITY, v, S = 0, N = 0; N < 4; ++S, ++N) {
12705
- l(S % 2 ? b : p, S % 4 >= 2), g = o.buildLayerMatrix(m);
12704
+ for (var y = Number.POSITIVE_INFINITY, v, _ = 0, N = 0; N < 4; ++_, ++N) {
12705
+ l(_ % 2 ? b : p, _ % 4 >= 2), g = o.buildLayerMatrix(m);
12706
12706
  var R = r(m, g);
12707
12707
  R < y && (N = 0, v = e.cloneDeep(g), y = R);
12708
12708
  }
@@ -12717,8 +12717,8 @@ function ST() {
12717
12717
  var b = new i();
12718
12718
  e.forEach(m, function(p) {
12719
12719
  var g = p.graph().root, y = n(p, g, b, h);
12720
- e.forEach(y.vs, function(v, S) {
12721
- p.node(v).order = S;
12720
+ e.forEach(y.vs, function(v, _) {
12721
+ p.node(v).order = _;
12722
12722
  }), a(p, b, y.vs);
12723
12723
  });
12724
12724
  }
@@ -12749,73 +12749,73 @@ function ET() {
12749
12749
  balance: h
12750
12750
  };
12751
12751
  function n(y, v) {
12752
- var S = {};
12752
+ var _ = {};
12753
12753
  function N(R, w) {
12754
- var C = 0, T = 0, _ = R.length, A = e.last(w);
12754
+ var C = 0, T = 0, S = R.length, A = e.last(w);
12755
12755
  return e.forEach(w, function(k, F) {
12756
- var D = a(y, k), x = D ? y.node(D).order : _;
12756
+ var D = a(y, k), x = D ? y.node(D).order : S;
12757
12757
  (D || k === A) && (e.forEach(w.slice(T, F + 1), function(M) {
12758
12758
  e.forEach(y.predecessors(M), function(q) {
12759
12759
  var I = y.node(q), $ = I.order;
12760
- ($ < C || x < $) && !(I.dummy && y.node(M).dummy) && i(S, q, M);
12760
+ ($ < C || x < $) && !(I.dummy && y.node(M).dummy) && i(_, q, M);
12761
12761
  });
12762
12762
  }), T = F + 1, C = x);
12763
12763
  }), w;
12764
12764
  }
12765
- return e.reduce(v, N), S;
12765
+ return e.reduce(v, N), _;
12766
12766
  }
12767
12767
  function s(y, v) {
12768
- var S = {};
12769
- function N(w, C, T, _, A) {
12768
+ var _ = {};
12769
+ function N(w, C, T, S, A) {
12770
12770
  var k;
12771
12771
  e.forEach(e.range(C, T), function(F) {
12772
12772
  k = w[F], y.node(k).dummy && e.forEach(y.predecessors(k), function(D) {
12773
12773
  var x = y.node(D);
12774
- x.dummy && (x.order < _ || x.order > A) && i(S, D, k);
12774
+ x.dummy && (x.order < S || x.order > A) && i(_, D, k);
12775
12775
  });
12776
12776
  });
12777
12777
  }
12778
12778
  function R(w, C) {
12779
- var T = -1, _, A = 0;
12779
+ var T = -1, S, A = 0;
12780
12780
  return e.forEach(C, function(k, F) {
12781
12781
  if (y.node(k).dummy === "border") {
12782
12782
  var D = y.predecessors(k);
12783
- D.length && (_ = y.node(D[0]).order, N(C, A, F, T, _), A = F, T = _);
12783
+ D.length && (S = y.node(D[0]).order, N(C, A, F, T, S), A = F, T = S);
12784
12784
  }
12785
- N(C, A, C.length, _, w.length);
12785
+ N(C, A, C.length, S, w.length);
12786
12786
  }), C;
12787
12787
  }
12788
- return e.reduce(v, R), S;
12788
+ return e.reduce(v, R), _;
12789
12789
  }
12790
12790
  function a(y, v) {
12791
12791
  if (y.node(v).dummy)
12792
- return e.find(y.predecessors(v), function(S) {
12793
- return y.node(S).dummy;
12792
+ return e.find(y.predecessors(v), function(_) {
12793
+ return y.node(_).dummy;
12794
12794
  });
12795
12795
  }
12796
- function i(y, v, S) {
12797
- if (v > S) {
12796
+ function i(y, v, _) {
12797
+ if (v > _) {
12798
12798
  var N = v;
12799
- v = S, S = N;
12799
+ v = _, _ = N;
12800
12800
  }
12801
12801
  var R = y[v];
12802
- R || (y[v] = R = {}), R[S] = !0;
12802
+ R || (y[v] = R = {}), R[_] = !0;
12803
12803
  }
12804
- function o(y, v, S) {
12805
- if (v > S) {
12804
+ function o(y, v, _) {
12805
+ if (v > _) {
12806
12806
  var N = v;
12807
- v = S, S = N;
12807
+ v = _, _ = N;
12808
12808
  }
12809
- return e.has(y[v], S);
12809
+ return e.has(y[v], _);
12810
12810
  }
12811
- function c(y, v, S, N) {
12811
+ function c(y, v, _, N) {
12812
12812
  var R = {}, w = {}, C = {};
12813
12813
  return e.forEach(v, function(T) {
12814
- e.forEach(T, function(_, A) {
12815
- R[_] = _, w[_] = _, C[_] = A;
12814
+ e.forEach(T, function(S, A) {
12815
+ R[S] = S, w[S] = S, C[S] = A;
12816
12816
  });
12817
12817
  }), e.forEach(v, function(T) {
12818
- var _ = -1;
12818
+ var S = -1;
12819
12819
  e.forEach(T, function(A) {
12820
12820
  var k = N(A);
12821
12821
  if (k.length) {
@@ -12824,15 +12824,15 @@ function ET() {
12824
12824
  });
12825
12825
  for (var F = (k.length - 1) / 2, D = Math.floor(F), x = Math.ceil(F); D <= x; ++D) {
12826
12826
  var M = k[D];
12827
- w[A] === A && _ < C[M] && !o(S, A, M) && (w[M] = A, w[A] = R[A] = R[M], _ = C[M]);
12827
+ w[A] === A && S < C[M] && !o(_, A, M) && (w[M] = A, w[A] = R[A] = R[M], S = C[M]);
12828
12828
  }
12829
12829
  }
12830
12830
  });
12831
12831
  }), { root: R, align: w };
12832
12832
  }
12833
- function d(y, v, S, N, R) {
12834
- var w = {}, C = l(y, v, S, R), T = R ? "borderLeft" : "borderRight";
12835
- function _(F, D) {
12833
+ function d(y, v, _, N, R) {
12834
+ var w = {}, C = l(y, v, _, R), T = R ? "borderLeft" : "borderRight";
12835
+ function S(F, D) {
12836
12836
  for (var x = C.nodes(), M = x.pop(), q = {}; M; )
12837
12837
  q[M] ? F(M) : (q[M] = !0, x.push(M), x = x.concat(D(M))), M = x.pop();
12838
12838
  }
@@ -12847,41 +12847,41 @@ function ET() {
12847
12847
  }, Number.POSITIVE_INFINITY), x = y.node(F);
12848
12848
  D !== Number.POSITIVE_INFINITY && x.borderType !== T && (w[F] = Math.max(w[F], D));
12849
12849
  }
12850
- return _(A, C.predecessors.bind(C)), _(k, C.successors.bind(C)), e.forEach(N, function(F) {
12851
- w[F] = w[S[F]];
12850
+ return S(A, C.predecessors.bind(C)), S(k, C.successors.bind(C)), e.forEach(N, function(F) {
12851
+ w[F] = w[_[F]];
12852
12852
  }), w;
12853
12853
  }
12854
- function l(y, v, S, N) {
12854
+ function l(y, v, _, N) {
12855
12855
  var R = new t(), w = y.graph(), C = p(w.nodesep, w.edgesep, N);
12856
12856
  return e.forEach(v, function(T) {
12857
- var _;
12857
+ var S;
12858
12858
  e.forEach(T, function(A) {
12859
- var k = S[A];
12860
- if (R.setNode(k), _) {
12861
- var F = S[_], D = R.edge(F, k);
12862
- R.setEdge(F, k, Math.max(C(y, A, _), D || 0));
12859
+ var k = _[A];
12860
+ if (R.setNode(k), S) {
12861
+ var F = _[S], D = R.edge(F, k);
12862
+ R.setEdge(F, k, Math.max(C(y, A, S), D || 0));
12863
12863
  }
12864
- _ = A;
12864
+ S = A;
12865
12865
  });
12866
12866
  }), R;
12867
12867
  }
12868
12868
  function f(y, v) {
12869
- return e.minBy(e.values(v), function(S) {
12869
+ return e.minBy(e.values(v), function(_) {
12870
12870
  var N = Number.NEGATIVE_INFINITY, R = Number.POSITIVE_INFINITY;
12871
- return e.forIn(S, function(w, C) {
12871
+ return e.forIn(_, function(w, C) {
12872
12872
  var T = g(y, C) / 2;
12873
12873
  N = Math.max(w + T, N), R = Math.min(w - T, R);
12874
12874
  }), N - R;
12875
12875
  });
12876
12876
  }
12877
12877
  function m(y, v) {
12878
- var S = e.values(v), N = e.min(S), R = e.max(S);
12878
+ var _ = e.values(v), N = e.min(_), R = e.max(_);
12879
12879
  e.forEach(["u", "d"], function(w) {
12880
12880
  e.forEach(["l", "r"], function(C) {
12881
- var T = w + C, _ = y[T], A;
12882
- if (_ !== v) {
12883
- var k = e.values(_);
12884
- A = C === "l" ? N - e.min(k) : R - e.max(k), A && (y[T] = e.mapValues(_, function(F) {
12881
+ var T = w + C, S = y[T], A;
12882
+ if (S !== v) {
12883
+ var k = e.values(S);
12884
+ A = C === "l" ? N - e.min(k) : R - e.max(k), A && (y[T] = e.mapValues(S, function(F) {
12885
12885
  return F + A;
12886
12886
  }));
12887
12887
  }
@@ -12889,7 +12889,7 @@ function ET() {
12889
12889
  });
12890
12890
  }
12891
12891
  function h(y, v) {
12892
- return e.mapValues(y.ul, function(S, N) {
12892
+ return e.mapValues(y.ul, function(_, N) {
12893
12893
  if (v)
12894
12894
  return y[v.toLowerCase()][N];
12895
12895
  var R = e.sortBy(e.map(y, N));
@@ -12897,7 +12897,7 @@ function ET() {
12897
12897
  });
12898
12898
  }
12899
12899
  function b(y) {
12900
- var v = r.buildLayerMatrix(y), S = e.merge(
12900
+ var v = r.buildLayerMatrix(y), _ = e.merge(
12901
12901
  n(y, v),
12902
12902
  s(y, v)
12903
12903
  ), N = {}, R;
@@ -12906,7 +12906,7 @@ function ET() {
12906
12906
  T === "r" && (R = e.map(R, function(F) {
12907
12907
  return e.values(F).reverse();
12908
12908
  }));
12909
- var _ = (C === "u" ? y.predecessors : y.successors).bind(y), A = c(y, R, S, _), k = d(
12909
+ var S = (C === "u" ? y.predecessors : y.successors).bind(y), A = c(y, R, _, S), k = d(
12910
12910
  y,
12911
12911
  R,
12912
12912
  A.root,
@@ -12921,10 +12921,10 @@ function ET() {
12921
12921
  var w = f(y, N);
12922
12922
  return m(N, w), h(N, y.graph().align);
12923
12923
  }
12924
- function p(y, v, S) {
12924
+ function p(y, v, _) {
12925
12925
  return function(N, R, w) {
12926
- var C = N.node(R), T = N.node(w), _ = 0, A;
12927
- if (_ += C.width / 2, e.has(C, "labelpos"))
12926
+ var C = N.node(R), T = N.node(w), S = 0, A;
12927
+ if (S += C.width / 2, e.has(C, "labelpos"))
12928
12928
  switch (C.labelpos.toLowerCase()) {
12929
12929
  case "l":
12930
12930
  A = -C.width / 2;
@@ -12933,7 +12933,7 @@ function ET() {
12933
12933
  A = C.width / 2;
12934
12934
  break;
12935
12935
  }
12936
- if (A && (_ += S ? A : -A), A = 0, _ += (C.dummy ? v : y) / 2, _ += (T.dummy ? v : y) / 2, _ += T.width / 2, e.has(T, "labelpos"))
12936
+ if (A && (S += _ ? A : -A), A = 0, S += (C.dummy ? v : y) / 2, S += (T.dummy ? v : y) / 2, S += T.width / 2, e.has(T, "labelpos"))
12937
12937
  switch (T.labelpos.toLowerCase()) {
12938
12938
  case "l":
12939
12939
  A = T.width / 2;
@@ -12942,7 +12942,7 @@ function ET() {
12942
12942
  A = -T.width / 2;
12943
12943
  break;
12944
12944
  }
12945
- return A && (_ += S ? A : -A), A = 0, _;
12945
+ return A && (S += _ ? A : -A), A = 0, S;
12946
12946
  };
12947
12947
  }
12948
12948
  function g(y, v) {
@@ -12984,7 +12984,7 @@ function kT() {
12984
12984
  var P = j && j.debugTiming ? m.time : m.notime;
12985
12985
  P("layout", function() {
12986
12986
  var G = P(" buildLayoutGraph", function() {
12987
- return _(L);
12987
+ return S(L);
12988
12988
  });
12989
12989
  P(" runLayout", function() {
12990
12990
  p(G, P);
@@ -13059,7 +13059,7 @@ function kT() {
13059
13059
  G.points = B.points, e.has(B, "x") && (G.x = B.x, G.y = B.y);
13060
13060
  }), L.graph().width = j.graph().width, L.graph().height = j.graph().height;
13061
13061
  }
13062
- var y = ["nodesep", "edgesep", "ranksep", "marginx", "marginy"], v = { ranksep: 50, edgesep: 20, nodesep: 50, rankdir: "tb" }, S = ["acyclicer", "ranker", "rankdir", "align"], N = ["width", "height"], R = { width: 0, height: 0 }, w = ["minlen", "weight", "width", "height", "labeloffset"], C = {
13062
+ var y = ["nodesep", "edgesep", "ranksep", "marginx", "marginy"], v = { ranksep: 50, edgesep: 20, nodesep: 50, rankdir: "tb" }, _ = ["acyclicer", "ranker", "rankdir", "align"], N = ["width", "height"], R = { width: 0, height: 0 }, w = ["minlen", "weight", "width", "height", "labeloffset"], C = {
13063
13063
  minlen: 1,
13064
13064
  weight: 1,
13065
13065
  width: 0,
@@ -13067,13 +13067,13 @@ function kT() {
13067
13067
  labeloffset: 10,
13068
13068
  labelpos: "r"
13069
13069
  }, T = ["labelpos"];
13070
- function _(L) {
13070
+ function S(L) {
13071
13071
  var j = new h({ multigraph: !0, compound: !0 }), P = Q(L.graph());
13072
13072
  return j.setGraph(e.merge(
13073
13073
  {},
13074
13074
  v,
13075
13075
  Y(P, y),
13076
- e.pick(P, S)
13076
+ e.pick(P, _)
13077
13077
  )), e.forEach(L.nodes(), function(G) {
13078
13078
  var B = Q(L.node(G));
13079
13079
  j.setNode(G, e.defaults(Y(B, N), R)), j.setParent(G, L.parent(G));
@@ -13399,7 +13399,7 @@ function LT({
13399
13399
  });
13400
13400
  });
13401
13401
  }), { nodes: I, edges: $ };
13402
- }, [i, t, r, d]), y = f || Object.keys(d).length === 0, { nodes: v, edges: S } = qT(p, g, {
13402
+ }, [i, t, r, d]), y = f || Object.keys(d).length === 0, { nodes: v, edges: _ } = qT(p, g, {
13403
13403
  direction: "LR",
13404
13404
  nodeWidth: 320,
13405
13405
  nodeHeight: 220,
@@ -13413,7 +13413,7 @@ function LT({
13413
13413
  highlightedFields: s,
13414
13414
  searchTerm: a
13415
13415
  }
13416
- })), [y, v, p, n, s, a]), R = y ? S : g;
13416
+ })), [y, v, p, n, s, a]), R = y ? _ : g;
13417
13417
  fe(() => {
13418
13418
  if (f && N.length > 0) {
13419
13419
  l({});
@@ -13424,7 +13424,7 @@ function LT({
13424
13424
  m(!1);
13425
13425
  }
13426
13426
  }, [f, N]);
13427
- const [w, C, T] = H2(N), [_, A, k] = j2(R);
13427
+ const [w, C, T] = H2(N), [S, A, k] = j2(R);
13428
13428
  fe(() => {
13429
13429
  C(N);
13430
13430
  }, [N, C]), fe(() => {
@@ -13469,7 +13469,7 @@ function LT({
13469
13469
  Yb,
13470
13470
  {
13471
13471
  nodes: w,
13472
- edges: _,
13472
+ edges: S,
13473
13473
  onNodesChange: F,
13474
13474
  onEdgesChange: k,
13475
13475
  onConnect: D,
@@ -13562,14 +13562,14 @@ const VT = {
13562
13562
  onViewTypeChange: c,
13563
13563
  isExpanded: d = !1
13564
13564
  }) => {
13565
- const [l, f] = Z(/* @__PURE__ */ new Set()), [m, h] = Z(/* @__PURE__ */ new Set()), [b, p] = Z(""), [g, y] = Z("tree"), [v, S] = Z(null), [N, R] = Z(null);
13565
+ const [l, f] = Z(/* @__PURE__ */ new Set()), [m, h] = Z(/* @__PURE__ */ new Set()), [b, p] = Z(""), [g, y] = Z("tree"), [v, _] = Z(null), [N, R] = Z(null);
13566
13566
  if (K.useEffect(() => {
13567
13567
  d && y("diagram");
13568
13568
  }, [d]), K.useEffect(() => {
13569
13569
  if (!e)
13570
13570
  return;
13571
13571
  if (b.trim().length > 0) {
13572
- v === null && (S(new Set(l)), R(new Set(m)));
13572
+ v === null && (_(new Set(l)), R(new Set(m)));
13573
13573
  const M = /* @__PURE__ */ new Set(), q = /* @__PURE__ */ new Set();
13574
13574
  e.cubes.forEach((O) => {
13575
13575
  let H = !1;
@@ -13584,7 +13584,7 @@ const VT = {
13584
13584
  const I = /* @__PURE__ */ new Set([...v || [], ...M]), $ = /* @__PURE__ */ new Set([...N || [], ...q]);
13585
13585
  f(I), h($);
13586
13586
  } else
13587
- v !== null && N !== null && (f(v), h(N), S(null), R(null));
13587
+ v !== null && N !== null && (f(v), h(N), _(null), R(null));
13588
13588
  }, [e, b, v, N]), t === "loading")
13589
13589
  return /* @__PURE__ */ u("div", { className: "h-full flex items-center justify-center text-dc-text-muted", children: /* @__PURE__ */ E("div", { className: "text-center", children: [
13590
13590
  /* @__PURE__ */ u("div", { className: "animate-spin rounded-full h-8 w-8 border-b-2 mx-auto mb-3", style: { borderBottomColor: "var(--dc-primary)" } }),
@@ -13640,7 +13640,7 @@ const VT = {
13640
13640
  const M = new Set(l);
13641
13641
  if (M.has(x) ? M.delete(x) : M.add(x), f(M), v !== null) {
13642
13642
  const q = new Set(v);
13643
- q.has(x) ? q.delete(x) : q.add(x), S(q);
13643
+ q.has(x) ? q.delete(x) : q.add(x), _(q);
13644
13644
  }
13645
13645
  }, C = (x) => {
13646
13646
  const M = new Set(m);
@@ -13661,7 +13661,7 @@ const VT = {
13661
13661
  return !1;
13662
13662
  }
13663
13663
  })() ? a(x.name, M) : s(x.name, M);
13664
- }, _ = (x) => b ? x.filter(
13664
+ }, S = (x) => b ? x.filter(
13665
13665
  (M) => M.name.toLowerCase().includes(b.toLowerCase()) || M.title.toLowerCase().includes(b.toLowerCase())
13666
13666
  ) : x, A = (x) => {
13667
13667
  if (!b.trim()) return !0;
@@ -13894,17 +13894,17 @@ const VT = {
13894
13894
  }
13895
13895
  ),
13896
13896
  q && /* @__PURE__ */ E("div", { className: "border-t border-dc-border p-2 space-y-1", children: [
13897
- $.length > 0 && _($).length > 0 && /* @__PURE__ */ E("div", { children: [
13897
+ $.length > 0 && S($).length > 0 && /* @__PURE__ */ E("div", { children: [
13898
13898
  /* @__PURE__ */ u(
13899
13899
  F,
13900
13900
  {
13901
13901
  title: "Dimensions",
13902
- count: _($).length,
13902
+ count: S($).length,
13903
13903
  sectionKey: `${M.name}-dimensions`,
13904
13904
  icon: /* @__PURE__ */ u(pr, { className: "w-4 h-4 text-green-600" })
13905
13905
  }
13906
13906
  ),
13907
- m.has(`${M.name}-dimensions`) && /* @__PURE__ */ u("div", { className: "ml-5 space-y-1 mt-1", children: _($).map((O) => /* @__PURE__ */ u(
13907
+ m.has(`${M.name}-dimensions`) && /* @__PURE__ */ u("div", { className: "ml-5 space-y-1 mt-1", children: S($).map((O) => /* @__PURE__ */ u(
13908
13908
  k,
13909
13909
  {
13910
13910
  field: O,
@@ -13914,17 +13914,17 @@ const VT = {
13914
13914
  O.name
13915
13915
  )) })
13916
13916
  ] }),
13917
- I.length > 0 && _(I).length > 0 && /* @__PURE__ */ E("div", { children: [
13917
+ I.length > 0 && S(I).length > 0 && /* @__PURE__ */ E("div", { children: [
13918
13918
  /* @__PURE__ */ u(
13919
13919
  F,
13920
13920
  {
13921
13921
  title: "Time Dimensions",
13922
- count: _(I).length,
13922
+ count: S(I).length,
13923
13923
  sectionKey: `${M.name}-timeDimensions`,
13924
13924
  icon: /* @__PURE__ */ u(Ut, { className: "w-4 h-4 text-blue-600" })
13925
13925
  }
13926
13926
  ),
13927
- m.has(`${M.name}-timeDimensions`) && /* @__PURE__ */ u("div", { className: "ml-5 space-y-1 mt-1", children: _(I).map((O) => /* @__PURE__ */ u(
13927
+ m.has(`${M.name}-timeDimensions`) && /* @__PURE__ */ u("div", { className: "ml-5 space-y-1 mt-1", children: S(I).map((O) => /* @__PURE__ */ u(
13928
13928
  k,
13929
13929
  {
13930
13930
  field: O,
@@ -13934,17 +13934,17 @@ const VT = {
13934
13934
  O.name
13935
13935
  )) })
13936
13936
  ] }),
13937
- M.measures.length > 0 && _(M.measures).length > 0 && /* @__PURE__ */ E("div", { children: [
13937
+ M.measures.length > 0 && S(M.measures).length > 0 && /* @__PURE__ */ E("div", { children: [
13938
13938
  /* @__PURE__ */ u(
13939
13939
  F,
13940
13940
  {
13941
13941
  title: "Measures",
13942
- count: _(M.measures).length,
13942
+ count: S(M.measures).length,
13943
13943
  sectionKey: `${M.name}-measures`,
13944
13944
  icon: /* @__PURE__ */ u(vc, { className: "w-4 h-4 text-amber-600" })
13945
13945
  }
13946
13946
  ),
13947
- m.has(`${M.name}-measures`) && /* @__PURE__ */ u("div", { className: "ml-5 space-y-1 mt-1", children: _(M.measures).map((O) => /* @__PURE__ */ u(
13947
+ m.has(`${M.name}-measures`) && /* @__PURE__ */ u("div", { className: "ml-5 space-y-1 mt-1", children: S(M.measures).map((O) => /* @__PURE__ */ u(
13948
13948
  k,
13949
13949
  {
13950
13950
  field: O,
@@ -14233,7 +14233,7 @@ const VT = {
14233
14233
  () => ["equals", "notEquals", "in", "notIn"].includes(t) && p && !g,
14234
14234
  [t, p, g]
14235
14235
  ), v = y, {
14236
- values: S,
14236
+ values: _,
14237
14237
  loading: N,
14238
14238
  error: R,
14239
14239
  searchValues: w
@@ -14254,7 +14254,7 @@ const VT = {
14254
14254
  }, [i]), T = te((x) => {
14255
14255
  const M = x.target.value;
14256
14256
  d(M);
14257
- }, []), _ = te((x) => {
14257
+ }, []), S = te((x) => {
14258
14258
  a.supportsMultipleValues ? r.includes(x) || n([...r, x]) : (n([x]), o(!1)), d("");
14259
14259
  }, [a.supportsMultipleValues, r, n]), A = te((x) => {
14260
14260
  n(r.filter((M) => M !== x));
@@ -14443,12 +14443,12 @@ const VT = {
14443
14443
  /* @__PURE__ */ u("div", { className: "max-h-48 overflow-y-auto", children: N ? /* @__PURE__ */ u("div", { className: "p-2 text-sm text-dc-text-muted", children: c ? "Searching..." : "Loading values..." }) : R ? /* @__PURE__ */ E("div", { className: "p-2 text-sm text-red-600", children: [
14444
14444
  "Error loading values: ",
14445
14445
  R
14446
- ] }) : S.length === 0 ? /* @__PURE__ */ u("div", { className: "p-2 text-sm text-dc-text-muted", children: c ? "No matching values" : "No values available" }) : S.map((x, M) => {
14446
+ ] }) : _.length === 0 ? /* @__PURE__ */ u("div", { className: "p-2 text-sm text-dc-text-muted", children: c ? "No matching values" : "No values available" }) : _.map((x, M) => {
14447
14447
  const q = r.includes(x);
14448
14448
  return /* @__PURE__ */ E(
14449
14449
  "button",
14450
14450
  {
14451
- onClick: () => _(x),
14451
+ onClick: () => S(x),
14452
14452
  className: `w-full text-left px-3 py-2 text-sm hover:bg-dc-surface-hover focus:outline-hidden focus:bg-dc-surface-hover ${q ? "bg-blue-50 text-blue-700" : "text-dc-text-secondary"}`,
14453
14453
  children: [
14454
14454
  String(x),
@@ -14688,7 +14688,7 @@ const Td = ({
14688
14688
  hideOperatorSelector: o = !1,
14689
14689
  hideRemoveButton: c = !1
14690
14690
  }) => {
14691
- const [d, l] = Z(!1), [f, m] = Z(!1), [h, b] = Z(!1), [p, g] = Z(""), y = me(null), v = me(null), [S, N] = Z("this_month"), [R, w] = Z({
14691
+ const [d, l] = Z(!1), [f, m] = Z(!1), [h, b] = Z(!1), [p, g] = Z(""), y = me(null), v = me(null), [_, N] = Z("this_month"), [R, w] = Z({
14692
14692
  startDate: Bc(/* @__PURE__ */ new Date()),
14693
14693
  endDate: Bc(/* @__PURE__ */ new Date())
14694
14694
  }), [C, T] = Z(1);
@@ -14698,7 +14698,7 @@ const Td = ({
14698
14698
  };
14699
14699
  return document.addEventListener("mousedown", V), () => document.removeEventListener("mousedown", V);
14700
14700
  }, []);
14701
- const _ = () => {
14701
+ const S = () => {
14702
14702
  m(!1);
14703
14703
  const V = !d;
14704
14704
  l(V), g(""), V && setTimeout(() => v.current?.focus(), 50);
@@ -14775,16 +14775,16 @@ const Td = ({
14775
14775
  N(V);
14776
14776
  }, G = (V, ae) => {
14777
14777
  const ie = { ...R, [V]: ae };
14778
- if (w(ie), S === "custom" && ie.startDate) {
14778
+ if (w(ie), _ === "custom" && ie.startDate) {
14779
14779
  const pe = !ie.endDate || ie.startDate === ie.endDate ? ie.startDate : [ie.startDate, ie.endDate];
14780
14780
  j(pe);
14781
14781
  }
14782
14782
  }, B = (V) => {
14783
- if (T(V), yt(S)) {
14784
- const ae = gt(S, V);
14783
+ if (T(V), yt(_)) {
14784
+ const ae = gt(_, V);
14785
14785
  j(ae);
14786
14786
  }
14787
- }, U = jt.find((V) => V.value === S)?.label || "Custom";
14787
+ }, U = jt.find((V) => V.value === _)?.label || "Custom";
14788
14788
  return /* @__PURE__ */ u("div", { ref: y, className: "bg-dc-surface border border-dc-border rounded-lg p-3", children: /* @__PURE__ */ E("div", { className: "flex flex-col sm:flex-row sm:items-center gap-3 min-w-0", children: [
14789
14789
  !i && /* @__PURE__ */ E("div", { className: "flex items-center gap-2 flex-1 min-w-0", children: [
14790
14790
  /* @__PURE__ */ u(et, { className: "w-4 h-4 text-dc-text-muted shrink-0" }),
@@ -14792,7 +14792,7 @@ const Td = ({
14792
14792
  /* @__PURE__ */ E(
14793
14793
  "button",
14794
14794
  {
14795
- onClick: _,
14795
+ onClick: S,
14796
14796
  className: "w-full flex items-center justify-between text-left text-sm border border-dc-border rounded-sm px-2 py-1 bg-dc-surface text-dc-text hover:bg-dc-surface-hover focus:ring-2 focus:ring-blue-500 focus:border-blue-500 min-w-0",
14797
14797
  children: [
14798
14798
  /* @__PURE__ */ u("span", { className: "truncate", children: D ? /* @__PURE__ */ u("span", { className: "font-medium", children: D.name }) : /* @__PURE__ */ u("span", { className: "text-dc-text-muted", children: "Select field..." }) }),
@@ -14919,13 +14919,13 @@ const Td = ({
14919
14919
  "button",
14920
14920
  {
14921
14921
  onClick: () => P(V.value),
14922
- className: `w-full text-left px-3 py-2 text-sm hover:bg-dc-surface-hover focus:outline-none focus:bg-dc-surface-hover ${V.value === S ? "bg-blue-50 text-blue-700" : "text-dc-text-secondary"}`,
14922
+ className: `w-full text-left px-3 py-2 text-sm hover:bg-dc-surface-hover focus:outline-none focus:bg-dc-surface-hover ${V.value === _ ? "bg-blue-50 text-blue-700" : "text-dc-text-secondary"}`,
14923
14923
  children: V.label
14924
14924
  },
14925
14925
  V.value
14926
14926
  )) })
14927
14927
  ] }),
14928
- S === "custom" ? /* @__PURE__ */ E(ve, { children: [
14928
+ _ === "custom" ? /* @__PURE__ */ E(ve, { children: [
14929
14929
  /* @__PURE__ */ u(
14930
14930
  "input",
14931
14931
  {
@@ -14946,7 +14946,7 @@ const Td = ({
14946
14946
  className: "flex-1 min-w-0 text-sm border border-dc-border rounded-sm px-2 py-1 bg-dc-surface text-dc-text hover:bg-dc-surface-hover focus:ring-2 focus:ring-blue-500 focus:border-blue-500"
14947
14947
  }
14948
14948
  )
14949
- ] }) : yt(S) ? /* @__PURE__ */ E(ve, { children: [
14949
+ ] }) : yt(_) ? /* @__PURE__ */ E(ve, { children: [
14950
14950
  /* @__PURE__ */ u(
14951
14951
  "input",
14952
14952
  {
@@ -14959,7 +14959,7 @@ const Td = ({
14959
14959
  className: "flex-1 min-w-0 text-sm border border-dc-border rounded-sm px-2 py-1 bg-dc-surface text-dc-text hover:bg-dc-surface-hover focus:ring-2 focus:ring-blue-500 focus:border-blue-500"
14960
14960
  }
14961
14961
  ),
14962
- /* @__PURE__ */ u("div", { className: "shrink-0 text-sm text-dc-text-secondary", children: S.replace("last_n_", "").replace("_", " ") })
14962
+ /* @__PURE__ */ u("div", { className: "shrink-0 text-sm text-dc-text-secondary", children: _.replace("last_n_", "").replace("_", " ") })
14963
14963
  ] }) : null
14964
14964
  ] })
14965
14965
  ) : (
@@ -14998,17 +14998,17 @@ const Td = ({
14998
14998
  }) => {
14999
14999
  const [c, d] = Z(!1), l = e.type === "and", f = l ? "AND" : "OR", m = e.filters, h = o > 0 ? `ml-${Math.min(o * 4, 16)}` : "", b = "border-slate-200", p = "bg-slate-50", g = "text-slate-700", y = () => {
15000
15000
  if (l) {
15001
- const _ = Je(m);
15002
- r(t, _);
15001
+ const S = Je(m);
15002
+ r(t, S);
15003
15003
  } else {
15004
- const _ = Ue(m);
15005
- r(t, _);
15004
+ const S = Ue(m);
15005
+ r(t, S);
15006
15006
  }
15007
15007
  }, v = () => {
15008
15008
  if (!a) return;
15009
15009
  const A = bc(a, i)[0]?.name || "", k = Wr(A, "equals", []), F = [...m, k];
15010
15010
  l ? r(t, Ue(F)) : r(t, Je(F)), d(!1);
15011
- }, S = () => {
15011
+ }, _ = () => {
15012
15012
  if (!a) return;
15013
15013
  const A = bc(a, i)[0]?.name || "", k = Ue([Wr(A, "equals", [])]), F = [...m, k];
15014
15014
  l ? r(t, Ue(F)) : r(t, Je(F)), d(!1);
@@ -15016,11 +15016,11 @@ const Td = ({
15016
15016
  if (!a) return;
15017
15017
  const A = bc(a, i)[0]?.name || "", k = Je([Wr(A, "equals", [])]), F = [...m, k];
15018
15018
  l ? r(t, Ue(F)) : r(t, Je(F)), d(!1);
15019
- }, R = (_, A) => {
15019
+ }, R = (S, A) => {
15020
15020
  const k = [...m];
15021
- k[_] = A, l ? r(t, Ue(k)) : r(t, Je(k));
15022
- }, w = (_) => {
15023
- const A = m.filter((F, D) => D !== _);
15021
+ k[S] = A, l ? r(t, Ue(k)) : r(t, Je(k));
15022
+ }, w = (S) => {
15023
+ const A = m.filter((F, D) => D !== S);
15024
15024
  if (A.length === 0) {
15025
15025
  s(t);
15026
15026
  return;
@@ -15032,11 +15032,11 @@ const Td = ({
15032
15032
  }
15033
15033
  const k = e.type === "and" ? Ue(A) : Je(A);
15034
15034
  r(t, k);
15035
- }, C = (_, A) => {
15035
+ }, C = (S, A) => {
15036
15036
  const k = [...m];
15037
- k[_] = A, l ? r(t, Ue(k)) : r(t, Je(k));
15038
- }, T = (_) => {
15039
- w(_);
15037
+ k[S] = A, l ? r(t, Ue(k)) : r(t, Je(k));
15038
+ }, T = (S) => {
15039
+ w(S);
15040
15040
  };
15041
15041
  return /* @__PURE__ */ E("div", { className: `${h} ${b} border-2 ${p} rounded-lg p-4 space-y-3`, children: [
15042
15042
  /* @__PURE__ */ E("div", { className: "flex items-center justify-between", children: [
@@ -15078,7 +15078,7 @@ const Td = ({
15078
15078
  /* @__PURE__ */ u(
15079
15079
  "button",
15080
15080
  {
15081
- onClick: S,
15081
+ onClick: _,
15082
15082
  className: "w-full text-left px-3 py-2 text-sm hover:bg-dc-surface-hover focus:outline-hidden focus:bg-dc-surface-hover",
15083
15083
  children: "Add AND Group"
15084
15084
  }
@@ -15105,10 +15105,10 @@ const Td = ({
15105
15105
  ] })
15106
15106
  ] }),
15107
15107
  /* @__PURE__ */ E("div", { className: "space-y-3", children: [
15108
- m.map((_, A) => Gt(_) ? /* @__PURE__ */ u(
15108
+ m.map((S, A) => Gt(S) ? /* @__PURE__ */ u(
15109
15109
  Td,
15110
15110
  {
15111
- filter: _,
15111
+ filter: S,
15112
15112
  index: A,
15113
15113
  onFilterChange: R,
15114
15114
  onFilterRemove: w,
@@ -15116,10 +15116,10 @@ const Td = ({
15116
15116
  query: i
15117
15117
  },
15118
15118
  A
15119
- ) : rr(_) ? /* @__PURE__ */ u(
15119
+ ) : rr(S) ? /* @__PURE__ */ u(
15120
15120
  rx,
15121
15121
  {
15122
- group: _,
15122
+ group: S,
15123
15123
  index: A,
15124
15124
  onGroupChange: C,
15125
15125
  onGroupRemove: T,
@@ -15278,7 +15278,7 @@ const Td = ({
15278
15278
  if (!r || Array.isArray(r)) return 1;
15279
15279
  const D = r.match(/^last (\d+) (days|weeks|months|quarters|years)$/);
15280
15280
  return D && parseInt(D[1]) || 1;
15281
- }, [f, m] = Z(c()), [h, b] = Z(d()), [p, g] = Z(l()), [y, v] = Z(!1), [S, N] = Z(!1), R = me(null);
15281
+ }, [f, m] = Z(c()), [h, b] = Z(d()), [p, g] = Z(l()), [y, v] = Z(!1), [_, N] = Z(!1), R = me(null);
15282
15282
  fe(() => {
15283
15283
  const D = (x) => {
15284
15284
  R.current && !R.current.contains(x.target) && (v(!1), N(!1));
@@ -15286,7 +15286,7 @@ const Td = ({
15286
15286
  return document.addEventListener("mousedown", D), () => document.removeEventListener("mousedown", D);
15287
15287
  }, []);
15288
15288
  const w = () => {
15289
- v(!1), N(!S);
15289
+ v(!1), N(!_);
15290
15290
  }, C = () => {
15291
15291
  N(!1), v(!y);
15292
15292
  }, T = (D) => {
@@ -15302,7 +15302,7 @@ const Td = ({
15302
15302
  const x = gt(D);
15303
15303
  n(e, x);
15304
15304
  }
15305
- }, _ = (D, x) => {
15305
+ }, S = (D, x) => {
15306
15306
  const M = { ...h, [D]: x };
15307
15307
  if (b(M), f === "custom" && M.startDate) {
15308
15308
  const q = !M.endDate || M.startDate === M.endDate ? M.startDate : [M.startDate, M.endDate];
@@ -15327,11 +15327,11 @@ const Td = ({
15327
15327
  className: "w-full flex items-center justify-between text-left text-sm border border-dc-border rounded-sm px-2 py-1 bg-dc-surface text-dc-text hover:bg-dc-surface-hover focus:ring-2 focus:ring-blue-500 focus:border-blue-500 min-w-0",
15328
15328
  children: [
15329
15329
  /* @__PURE__ */ u("span", { className: "truncate", children: e }),
15330
- /* @__PURE__ */ u(Be, { className: `w-4 h-4 text-dc-text-muted shrink-0 transition-transform ${S ? "transform rotate-180" : ""}` })
15330
+ /* @__PURE__ */ u(Be, { className: `w-4 h-4 text-dc-text-muted shrink-0 transition-transform ${_ ? "transform rotate-180" : ""}` })
15331
15331
  ]
15332
15332
  }
15333
15333
  ),
15334
- S && /* @__PURE__ */ u("div", { className: "absolute z-20 left-0 right-0 mt-1 bg-dc-surface border border-dc-border rounded-md shadow-lg max-h-60 overflow-y-auto", children: t.map((D) => /* @__PURE__ */ u(
15334
+ _ && /* @__PURE__ */ u("div", { className: "absolute z-20 left-0 right-0 mt-1 bg-dc-surface border border-dc-border rounded-md shadow-lg max-h-60 overflow-y-auto", children: t.map((D) => /* @__PURE__ */ u(
15335
15335
  "button",
15336
15336
  {
15337
15337
  onClick: () => k(D),
@@ -15371,7 +15371,7 @@ const Td = ({
15371
15371
  {
15372
15372
  type: "date",
15373
15373
  value: h.startDate,
15374
- onChange: (D) => _("startDate", D.target.value),
15374
+ onChange: (D) => S("startDate", D.target.value),
15375
15375
  placeholder: "dd/mm/yyyy",
15376
15376
  className: "w-full text-sm border border-dc-border rounded-sm px-2 py-1 bg-dc-surface text-dc-text hover:bg-dc-surface-hover focus:ring-2 focus:ring-blue-500 focus:border-blue-500"
15377
15377
  }
@@ -15381,7 +15381,7 @@ const Td = ({
15381
15381
  {
15382
15382
  type: "date",
15383
15383
  value: h.endDate,
15384
- onChange: (D) => _("endDate", D.target.value),
15384
+ onChange: (D) => S("endDate", D.target.value),
15385
15385
  placeholder: "dd/mm/yyyy",
15386
15386
  className: "w-full text-sm border border-dc-border rounded-sm px-2 py-1 bg-dc-surface text-dc-text hover:bg-dc-surface-hover focus:ring-2 focus:ring-blue-500 focus:border-blue-500"
15387
15387
  }
@@ -15502,7 +15502,7 @@ const Td = ({
15502
15502
  onAIAssistantClick: g,
15503
15503
  onSchemaClick: y
15504
15504
  }) => {
15505
- const [v, S] = Z(!1), [N, R] = Z(!1);
15505
+ const [v, _] = Z(!1), [N, R] = Z(!1);
15506
15506
  fe(() => {
15507
15507
  (v || N) && typeof window < "u" && window.Prism && setTimeout(() => {
15508
15508
  try {
@@ -15519,7 +15519,7 @@ const Td = ({
15519
15519
  const O = document.createElement("textarea");
15520
15520
  O.value = JSON.stringify(I, null, 2), document.body.appendChild(O), O.select(), document.execCommand("copy"), document.body.removeChild(O);
15521
15521
  }
15522
- }, _ = (I, $) => {
15522
+ }, S = (I, $) => {
15523
15523
  if ($ === "timeDimensions")
15524
15524
  return !!e.timeDimensions?.some((O) => O.dimension === I && O.dateRange);
15525
15525
  {
@@ -15605,7 +15605,7 @@ const Td = ({
15605
15605
  /* @__PURE__ */ E("div", { className: "flex items-center gap-2 ml-2", children: [
15606
15606
  /* @__PURE__ */ E("div", { className: "flex flex-col items-center", children: [
15607
15607
  (() => {
15608
- const W = _(I, $);
15608
+ const W = S(I, $);
15609
15609
  return /* @__PURE__ */ u(
15610
15610
  "button",
15611
15611
  {
@@ -15656,7 +15656,7 @@ const Td = ({
15656
15656
  /* @__PURE__ */ E("div", { className: "flex items-center gap-2 ml-2", children: [
15657
15657
  /* @__PURE__ */ E("div", { className: "flex flex-col items-center", children: [
15658
15658
  (() => {
15659
- const $ = _(I.dimension, "timeDimensions");
15659
+ const $ = S(I.dimension, "timeDimensions");
15660
15660
  return /* @__PURE__ */ u(
15661
15661
  "button",
15662
15662
  {
@@ -15872,7 +15872,7 @@ const Td = ({
15872
15872
  {
15873
15873
  onClick: () => {
15874
15874
  const I = !v;
15875
- S(I), I && R(!1);
15875
+ _(I), I && R(!1);
15876
15876
  },
15877
15877
  className: "text-sm text-dc-text-secondary hover:text-dc-text focus:outline-hidden focus:underline",
15878
15878
  children: [
@@ -15886,7 +15886,7 @@ const Td = ({
15886
15886
  {
15887
15887
  onClick: () => {
15888
15888
  const I = !N;
15889
- R(I), I && S(!1);
15889
+ R(I), I && _(!1);
15890
15890
  },
15891
15891
  className: "text-sm text-dc-text-secondary hover:text-dc-text focus:outline-hidden focus:underline",
15892
15892
  children: [
@@ -16568,7 +16568,7 @@ const lA = ({
16568
16568
  totalRowCount: null,
16569
16569
  totalRowCountStatus: "idle"
16570
16570
  };
16571
- }, [l, f] = Z(d()), [m, h] = Z(10), [b, p] = Z(c()), [g, y] = Z(!1), [v, S] = Z(!1), [N, R] = Z("tree"), [w, C] = Z(!1);
16571
+ }, [l, f] = Z(d()), [m, h] = Z(10), [b, p] = Z(c()), [g, y] = Z(!1), [v, _] = Z(!1), [N, R] = Z("tree"), [w, C] = Z(!1);
16572
16572
  fe(() => {
16573
16573
  t && JSON.stringify(t) !== JSON.stringify(l.query) && f((P) => ({
16574
16574
  ...P,
@@ -16585,7 +16585,7 @@ const lA = ({
16585
16585
  totalRowCountStatus: "idle"
16586
16586
  }));
16587
16587
  }, [t]);
16588
- const T = me(""), [_, A] = Z(null);
16588
+ const T = me(""), [S, A] = Z(null);
16589
16589
  my(s, () => ({
16590
16590
  getCurrentQuery: () => $t(l.query),
16591
16591
  getValidationState: () => ({
@@ -16598,8 +16598,8 @@ const lA = ({
16598
16598
  error: l.validationError || void 0
16599
16599
  } : void 0
16600
16600
  }),
16601
- getValidationResult: () => _
16602
- }), [l.query, l.validationStatus, l.validationError, l.validationSql, _]), fe(() => {
16601
+ getValidationResult: () => S
16602
+ }), [l.query, l.validationStatus, l.validationError, l.validationSql, S]), fe(() => {
16603
16603
  (async () => {
16604
16604
  f((G) => ({
16605
16605
  ...G,
@@ -16898,7 +16898,7 @@ const lA = ({
16898
16898
  /* @__PURE__ */ u("div", { className: "md:hidden shrink-0 px-4 pb-2", children: /* @__PURE__ */ u(
16899
16899
  "button",
16900
16900
  {
16901
- onClick: () => S(!v),
16901
+ onClick: () => _(!v),
16902
16902
  className: "flex items-center gap-2 px-3 py-2 text-sm font-medium text-dc-text-secondary bg-dc-surface-secondary hover:bg-dc-surface-hover rounded-md transition-colors",
16903
16903
  children: v ? /* @__PURE__ */ E(ve, { children: [
16904
16904
  /* @__PURE__ */ u($e, { className: "w-4 h-4" }),
@@ -16914,7 +16914,7 @@ const lA = ({
16914
16914
  /* @__PURE__ */ u("div", { className: "p-4 border-b border-dc-border", children: /* @__PURE__ */ E(
16915
16915
  "button",
16916
16916
  {
16917
- onClick: () => S(!1),
16917
+ onClick: () => _(!1),
16918
16918
  className: "flex items-center gap-2 px-3 py-2 text-sm font-medium text-dc-text-secondary bg-dc-surface-secondary hover:bg-dc-surface-hover rounded-md transition-colors",
16919
16919
  children: [
16920
16920
  /* @__PURE__ */ u($e, { className: "w-4 h-4" }),
@@ -16930,18 +16930,18 @@ const lA = ({
16930
16930
  schemaError: l.schemaError,
16931
16931
  selectedFields: j,
16932
16932
  onFieldSelect: (P, G) => {
16933
- F(P, G), S(!1);
16933
+ F(P, G), _(!1);
16934
16934
  },
16935
16935
  onFieldDeselect: D,
16936
16936
  onRetrySchema: L,
16937
16937
  onOpenSettings: n ? void 0 : () => y(!0),
16938
16938
  onExpandSchema: (P) => {
16939
- P && S(!1);
16939
+ P && _(!1);
16940
16940
  }
16941
16941
  }
16942
16942
  ) })
16943
16943
  ] }),
16944
- /* @__PURE__ */ u("div", { className: "flex-1", onClick: () => S(!1) })
16944
+ /* @__PURE__ */ u("div", { className: "flex-1", onClick: () => _(!1) })
16945
16945
  ] }),
16946
16946
  /* @__PURE__ */ E("div", { className: "flex-1 flex flex-col md:flex-row gap-4 p-4 min-h-0", style: { paddingTop: n ? "1rem" : "0rem" }, children: [
16947
16947
  /* @__PURE__ */ u("div", { className: `hidden md:flex shrink-0 flex-col min-w-0 ${N === "diagram" ? "w-full" : "md:w-1/3 max-w-[500px]"}`, children: /* @__PURE__ */ u(
@@ -17054,13 +17054,13 @@ function cA({
17054
17054
  onReorder: c,
17055
17055
  draggedItem: d
17056
17056
  }) {
17057
- const { key: l, label: f, description: m, mandatory: h, maxItems: b, emptyText: p, icon: g } = e, [y, v] = Z(null), [S, N] = Z(!1), [R, w] = Z(!1), C = () => {
17057
+ const { key: l, label: f, description: m, mandatory: h, maxItems: b, emptyText: p, icon: g } = e, [y, v] = Z(null), [_, N] = Z(!1), [R, w] = Z(!1), C = () => {
17058
17058
  let x = t.length;
17059
17059
  return d && d.fromAxis === l && (x = Math.max(0, t.length - 1)), !b || x < b;
17060
17060
  }, T = () => {
17061
17061
  let x = t.length;
17062
17062
  return d && d.fromAxis === l && (x = Math.max(0, t.length - 1)), b && x >= b;
17063
- }, _ = C(), A = T();
17063
+ }, S = C(), A = T();
17064
17064
  K.useEffect(() => {
17065
17065
  const x = () => {
17066
17066
  v(null), N(!1), w(!1);
@@ -17106,15 +17106,15 @@ function cA({
17106
17106
  "div",
17107
17107
  {
17108
17108
  "data-axis-container": l,
17109
- className: `min-h-[40px] sm:min-h-[32px] border-2 border-dashed rounded-lg p-3 sm:p-1.5 transition-all duration-300 flex items-center ${S && (_ || b === 1) || R ? "shadow-lg scale-110 border-solid animate-pulse" : A ? "bg-dc-surface-secondary" : "bg-dc-surface-secondary hover:bg-dc-surface-hover"}`,
17109
+ className: `min-h-[40px] sm:min-h-[32px] border-2 border-dashed rounded-lg p-3 sm:p-1.5 transition-all duration-300 flex items-center ${_ && (S || b === 1) || R ? "shadow-lg scale-110 border-solid animate-pulse" : A ? "bg-dc-surface-secondary" : "bg-dc-surface-secondary hover:bg-dc-surface-hover"}`,
17110
17110
  style: {
17111
- borderColor: S && (_ || b === 1) || R ? "var(--dc-primary)" : "var(--dc-border)",
17112
- backgroundColor: S && (_ || b === 1) || R ? "rgba(var(--dc-primary-rgb), 0.1)" : void 0
17111
+ borderColor: _ && (S || b === 1) || R ? "var(--dc-primary)" : "var(--dc-border)",
17112
+ backgroundColor: _ && (S || b === 1) || R ? "rgba(var(--dc-primary-rgb), 0.1)" : void 0
17113
17113
  },
17114
17114
  onDragOver: (x) => {
17115
17115
  if (d && d.fromAxis === l && d.fromIndex !== void 0)
17116
17116
  return;
17117
- _ || b === 1 ? (N(!0), i(x)) : (x.preventDefault(), x.dataTransfer.dropEffect = "none");
17117
+ S || b === 1 ? (N(!0), i(x)) : (x.preventDefault(), x.dataTransfer.dropEffect = "none");
17118
17118
  },
17119
17119
  onDragLeave: (x) => {
17120
17120
  const M = x.currentTarget.getBoundingClientRect(), q = x.clientX < M.left || x.clientX > M.right || x.clientY < M.top || x.clientY > M.bottom, I = x.relatedTarget, $ = I && !x.currentTarget.contains(I);
@@ -17123,7 +17123,7 @@ function cA({
17123
17123
  onDrop: (x) => {
17124
17124
  if (d && d.fromAxis === l && d.fromIndex !== void 0)
17125
17125
  return;
17126
- _ || b === 1 ? r(x, l) : x.preventDefault(), N(!1), w(!1);
17126
+ S || b === 1 ? r(x, l) : x.preventDefault(), N(!1), w(!1);
17127
17127
  },
17128
17128
  children: t.length === 0 ? /* @__PURE__ */ u("div", { className: "text-xs text-dc-text-muted text-center w-full", children: A ? "Maximum items reached" : p || "Drop fields here" }) : /* @__PURE__ */ u("div", { className: "flex flex-wrap gap-1", children: t.map((x, M) => {
17129
17129
  const { IconComponent: q, baseClasses: I, hoverClasses: $ } = o(x), O = y === M, H = d && d.field === x && d.fromAxis === l;
@@ -17196,9 +17196,9 @@ function dy({
17196
17196
  ];
17197
17197
  let C = !1;
17198
17198
  const T = { ...t };
17199
- d.dropZones.forEach((_) => {
17200
- const A = f(_.key), k = A.filter((F) => w.includes(F));
17201
- k.length !== A.length && (C = !0, k.length === 0 ? delete T[_.key] : _.maxItems === 1 ? T[_.key] = k[0] : T[_.key] = k);
17199
+ d.dropZones.forEach((S) => {
17200
+ const A = f(S.key), k = A.filter((F) => w.includes(F));
17201
+ k.length !== A.length && (C = !0, k.length === 0 ? delete T[S.key] : S.maxItems === 1 ? T[S.key] = k[0] : T[S.key] = k);
17202
17202
  }), C && a(T);
17203
17203
  }, [n, t, d.dropZones, a]);
17204
17204
  const m = (w) => n ? n.measures.includes(w) ? "measure" : n.timeDimensions.includes(w) ? "timeDimension" : "dimension" : "dimension", h = (w) => {
@@ -17222,36 +17222,36 @@ function dy({
17222
17222
  hoverClasses: "hover:opacity-80"
17223
17223
  };
17224
17224
  }
17225
- }, b = (w, C, T, _) => {
17226
- w.dataTransfer.setData("text/plain", JSON.stringify({ field: C, fromAxis: T, fromIndex: _ })), c({ field: C, fromAxis: T, fromIndex: _ });
17225
+ }, b = (w, C, T, S) => {
17226
+ w.dataTransfer.setData("text/plain", JSON.stringify({ field: C, fromAxis: T, fromIndex: S })), c({ field: C, fromAxis: T, fromIndex: S });
17227
17227
  }, p = (w) => {
17228
17228
  w.preventDefault();
17229
17229
  }, g = () => {
17230
17230
  c(null);
17231
17231
  }, y = (w, C) => {
17232
17232
  w.preventDefault();
17233
- const T = JSON.parse(w.dataTransfer.getData("text/plain")), { field: _, fromAxis: A } = T, k = { ...t };
17233
+ const T = JSON.parse(w.dataTransfer.getData("text/plain")), { field: S, fromAxis: A } = T, k = { ...t };
17234
17234
  if (A !== "available" && A !== C) {
17235
17235
  const x = k[A];
17236
17236
  if (Array.isArray(x)) {
17237
- const M = x.filter((q) => q !== _);
17237
+ const M = x.filter((q) => q !== S);
17238
17238
  M.length === 0 ? delete k[A] : k[A] = M;
17239
- } else x === _ && delete k[A];
17239
+ } else x === S && delete k[A];
17240
17240
  }
17241
17241
  const F = k[C];
17242
- d.dropZones.find((x) => x.key === C)?.maxItems === 1 ? k[C] = _ : Array.isArray(F) ? F.includes(_) || (k[C] = [...F, _]) : k[C] = [_], c(null), a(k);
17242
+ d.dropZones.find((x) => x.key === C)?.maxItems === 1 ? k[C] = S : Array.isArray(F) ? F.includes(S) || (k[C] = [...F, S]) : k[C] = [S], c(null), a(k);
17243
17243
  }, v = (w, C) => {
17244
- const T = { ...t }, _ = T[C];
17245
- if (Array.isArray(_)) {
17246
- const A = _.filter((k) => k !== w);
17244
+ const T = { ...t }, S = T[C];
17245
+ if (Array.isArray(S)) {
17246
+ const A = S.filter((k) => k !== w);
17247
17247
  A.length === 0 ? delete T[C] : T[C] = A;
17248
- } else _ === w && delete T[C];
17248
+ } else S === w && delete T[C];
17249
17249
  a(T);
17250
- }, S = (w, C, T) => {
17251
- const _ = { ...t }, A = _[T];
17250
+ }, _ = (w, C, T) => {
17251
+ const S = { ...t }, A = S[T];
17252
17252
  if (Array.isArray(A) && A.length > 1 && w !== C) {
17253
17253
  const k = [...A], [F] = k.splice(w, 1);
17254
- k.splice(C, 0, F), _[T] = k, c(null), a(_);
17254
+ k.splice(C, 0, F), S[T] = k, c(null), a(S);
17255
17255
  }
17256
17256
  }, R = (() => {
17257
17257
  if (!n) return { dimensions: [], timeDimensions: [], measures: [] };
@@ -17355,7 +17355,7 @@ function dy({
17355
17355
  onDragEnd: g,
17356
17356
  onDragOver: p,
17357
17357
  getFieldStyling: h,
17358
- onReorder: S,
17358
+ onReorder: _,
17359
17359
  draggedItem: o
17360
17360
  },
17361
17361
  w.key
@@ -17496,7 +17496,7 @@ function dy({
17496
17496
  w.type === "paletteColor" && /* @__PURE__ */ E("div", { className: "space-y-1", children: [
17497
17497
  /* @__PURE__ */ u("label", { className: "text-sm text-dc-text-secondary", children: w.label }),
17498
17498
  /* @__PURE__ */ u("div", { className: "flex flex-wrap gap-2", children: s?.colors.map((C, T) => {
17499
- const _ = (r[w.key] ?? w.defaultValue ?? 0) === T;
17499
+ const S = (r[w.key] ?? w.defaultValue ?? 0) === T;
17500
17500
  return /* @__PURE__ */ u(
17501
17501
  "button",
17502
17502
  {
@@ -17505,10 +17505,10 @@ function dy({
17505
17505
  ...r,
17506
17506
  [w.key]: T
17507
17507
  }),
17508
- className: `w-8 h-8 rounded border-2 transition-all duration-200 hover:scale-110 focus:outline-hidden focus:ring-2 focus:ring-blue-500 focus:ring-offset-1 ${_ ? "ring-2 ring-offset-1 scale-110" : "hover:border-dc-text-muted"}`,
17508
+ className: `w-8 h-8 rounded border-2 transition-all duration-200 hover:scale-110 focus:outline-hidden focus:ring-2 focus:ring-blue-500 focus:ring-offset-1 ${S ? "ring-2 ring-offset-1 scale-110" : "hover:border-dc-text-muted"}`,
17509
17509
  style: {
17510
17510
  backgroundColor: C,
17511
- borderColor: _ ? "var(--dc-primary)" : "var(--dc-border)"
17511
+ borderColor: S ? "var(--dc-primary)" : "var(--dc-border)"
17512
17512
  },
17513
17513
  title: `Color ${T + 1}: ${C}`
17514
17514
  },
@@ -17764,7 +17764,7 @@ function uy({
17764
17764
  submitText: a,
17765
17765
  colorPalette: i
17766
17766
  }) {
17767
- const { cubeApi: o } = lt(), [c, d] = Z(""), [l, f] = Z(""), [m, h] = Z("bar"), [b, p] = Z([]), [g, y] = Z(!1), [v, S] = Z(null), [N, R] = Z(""), [w, C] = Z(null), [T, _] = Z({ xAxis: [], yAxis: [], series: [] }), [A, k] = Z({ showLegend: !0, showGrid: !0, showTooltip: !0, stacked: !1 }), [F, D] = Z(!1), [x, M] = Z(null), q = me(null), $ = Hc(m, gr).skipQuery === !0, O = (le) => {
17767
+ const { cubeApi: o } = lt(), [c, d] = Z(""), [l, f] = Z(""), [m, h] = Z("bar"), [b, p] = Z([]), [g, y] = Z(!1), [v, _] = Z(null), [N, R] = Z(""), [w, C] = Z(null), [T, S] = Z({ xAxis: [], yAxis: [], series: [] }), [A, k] = Z({ showLegend: !0, showGrid: !0, showTooltip: !0, stacked: !1 }), [F, D] = Z(!1), [x, M] = Z(null), q = me(null), $ = Hc(m, gr).skipQuery === !0, O = (le) => {
17768
17768
  }, H = 5, W = 4;
17769
17769
  fe(() => {
17770
17770
  if (e) {
@@ -17777,11 +17777,11 @@ function uy({
17777
17777
  return n.query;
17778
17778
  }
17779
17779
  })();
17780
- f(le), h(n.chartType), _(n.chartConfig || { xAxis: [], yAxis: [], series: [] }), k(n.displayConfig || {}), p(n.dashboardFilterMapping || []), R(le), S({ isValid: !0, message: "Loaded query (assumed valid)" }), C(null), $ || setTimeout(() => {
17780
+ f(le), h(n.chartType), S(n.chartConfig || { xAxis: [], yAxis: [], series: [] }), k(n.displayConfig || {}), p(n.dashboardFilterMapping || []), R(le), _({ isValid: !0, message: "Loaded query (assumed valid)" }), C(null), $ || setTimeout(() => {
17781
17781
  j(le, !0, !0);
17782
17782
  }, 100);
17783
17783
  } else
17784
- d(""), f(""), h("bar"), _({ xAxis: [], yAxis: [], series: [] }), k({ showLegend: !0, showGrid: !0, showTooltip: !0, stacked: !1 }), p([]), R(""), S(null), C(null);
17784
+ d(""), f(""), h("bar"), S({ xAxis: [], yAxis: [], series: [] }), k({ showLegend: !0, showGrid: !0, showTooltip: !0, stacked: !1 }), p([]), R(""), _(null), C(null);
17785
17785
  y(!1);
17786
17786
  }
17787
17787
  }, [e, n]);
@@ -17825,22 +17825,22 @@ function uy({
17825
17825
  h: W
17826
17826
  });
17827
17827
  }, Q = (le) => {
17828
- f(le), S(null), R(""), C(null), _({ xAxis: [], yAxis: [], series: [] });
17828
+ f(le), _(null), R(""), C(null), S({ xAxis: [], yAxis: [], series: [] });
17829
17829
  }, L = (le) => {
17830
- f(le), S(null), C(null), n || _({ xAxis: [], yAxis: [], series: [] });
17830
+ f(le), _(null), C(null), n || S({ xAxis: [], yAxis: [], series: [] });
17831
17831
  }, j = async (le, ne = !1, z = !1) => {
17832
17832
  if (!le.trim()) {
17833
- ne || S({ isValid: !1, message: "Query cannot be empty" });
17833
+ ne || _({ isValid: !1, message: "Query cannot be empty" });
17834
17834
  return;
17835
17835
  }
17836
17836
  let re;
17837
17837
  try {
17838
17838
  re = JSON.parse(le);
17839
17839
  } catch {
17840
- ne || S({ isValid: !1, message: "Invalid JSON syntax" });
17840
+ ne || _({ isValid: !1, message: "Invalid JSON syntax" });
17841
17841
  return;
17842
17842
  }
17843
- ne || (y(!0), S(null));
17843
+ ne || (y(!0), _(null));
17844
17844
  try {
17845
17845
  const J = await o.dryRun(re);
17846
17846
  if (!J.error && J.queryType) {
@@ -17848,18 +17848,18 @@ function uy({
17848
17848
  const he = [];
17849
17849
  J.pivotQuery?.query && (J.pivotQuery.query.measures?.length > 0 && he.push(`${J.pivotQuery.query.measures.length} measure${J.pivotQuery.query.measures.length > 1 ? "s" : ""}`), J.pivotQuery.query.dimensions?.length > 0 && he.push(`${J.pivotQuery.query.dimensions.length} dimension${J.pivotQuery.query.dimensions.length > 1 ? "s" : ""}`), J.pivotQuery.query.filters?.length > 0 && he.push(`${J.pivotQuery.query.filters.length} filter${J.pivotQuery.query.filters.length > 1 ? "s" : ""}`), J.pivotQuery.query.timeDimensions?.length > 0 && he.push(`${J.pivotQuery.query.timeDimensions.length} time dimension${J.pivotQuery.query.timeDimensions.length > 1 ? "s" : ""}`)), J.complexity && he.push(`${J.complexity} complexity`), J.sql?.sql && he.push("SQL generated"), J.cubesUsed?.length > 0 && he.push(`Cubes: ${J.cubesUsed.join(", ")}`);
17850
17850
  const X = he.length > 0 ? `Query validated successfully (${he.join(", ")})` : "Query validated successfully";
17851
- S({ isValid: !0, message: X }), R(le);
17851
+ _({ isValid: !0, message: X }), R(le);
17852
17852
  }
17853
17853
  z || O(J);
17854
17854
  } else if (!ne) {
17855
17855
  const he = J.error || "Query validation failed", X = J.details ? ` - ${Array.isArray(J.details) ? J.details.join(", ") : J.details}` : "";
17856
- S({
17856
+ _({
17857
17857
  isValid: !1,
17858
17858
  message: he + X
17859
17859
  }), R(le);
17860
17860
  }
17861
17861
  } catch (J) {
17862
- ne || (S({
17862
+ ne || (_({
17863
17863
  isValid: !1,
17864
17864
  message: J instanceof Error ? J.message : "Network error during validation"
17865
17865
  }), R(le));
@@ -17880,14 +17880,14 @@ function uy({
17880
17880
  }, B = (le) => {
17881
17881
  if (le?.preventDefault(), le?.stopPropagation(), !q.current) return;
17882
17882
  const ne = q.current.getCurrentQuery(), z = q.current.getValidationState(), re = q.current.getValidationResult(), J = JSON.stringify(ne, null, 2);
17883
- f(J), z?.status === "valid" && re ? (S({
17883
+ f(J), z?.status === "valid" && re ? (_({
17884
17884
  isValid: !0,
17885
17885
  message: "Query validated in Query Builder"
17886
- }), R(J), C(re)) : (S(null), R(""), C(null)), D(!1);
17886
+ }), R(J), C(re)) : (_(null), R(""), C(null)), D(!1);
17887
17887
  }, U = () => {
17888
17888
  D(!1), M(null);
17889
17889
  }, V = () => {
17890
- d(""), f(""), h("bar"), _({ xAxis: [], yAxis: [], series: [] }), k({ showLegend: !0, showGrid: !0, showTooltip: !0, stacked: !1 }), S(null), y(!1), R(""), C(null), D(!1), M(null), t();
17890
+ d(""), f(""), h("bar"), S({ xAxis: [], yAxis: [], series: [] }), k({ showLegend: !0, showGrid: !0, showTooltip: !0, stacked: !1 }), _(null), y(!1), R(""), C(null), D(!1), M(null), t();
17891
17891
  }, ae = !!n, ie = l.trim() !== N.trim() && N !== "", pe = v?.isValid && l.trim() === N.trim(), ge = w?.pivotQuery?.query ? {
17892
17892
  dimensions: w.pivotQuery.query.dimensions || [],
17893
17893
  timeDimensions: w.pivotQuery.query.timeDimensions?.map((le) => le.dimension) || [],
@@ -18023,7 +18023,7 @@ function uy({
18023
18023
  displayConfig: A,
18024
18024
  availableFields: null,
18025
18025
  colorPalette: i,
18026
- onChartConfigChange: _,
18026
+ onChartConfigChange: S,
18027
18027
  onDisplayConfigChange: k
18028
18028
  }
18029
18029
  ) }) : !w || !pe ? /* @__PURE__ */ u("div", { className: "flex-1 flex items-center justify-center border-2 border-dashed border-dc-border rounded-lg bg-dc-surface-secondary", children: /* @__PURE__ */ E("div", { className: "text-center text-dc-text-muted", children: [
@@ -18037,7 +18037,7 @@ function uy({
18037
18037
  displayConfig: A,
18038
18038
  availableFields: ge,
18039
18039
  colorPalette: i,
18040
- onChartConfigChange: _,
18040
+ onChartConfigChange: S,
18041
18041
  onDisplayConfigChange: k
18042
18042
  }
18043
18043
  ) })
@@ -19622,26 +19622,26 @@ const hA = ({
19622
19622
  measures: F,
19623
19623
  dimensions: D
19624
19624
  } : null;
19625
- }).filter((A) => A !== null), _ = {
19625
+ }).filter((A) => A !== null), S = {
19626
19626
  ...t,
19627
19627
  cubes: T
19628
19628
  };
19629
- return o(_);
19629
+ return o(S);
19630
19630
  }, [t, b, m, o]), g = _e(() => "member" in l && l.member ? l.member : null, [l]), y = te((T) => {
19631
19631
  d(T);
19632
19632
  }, []), v = te((T) => {
19633
19633
  f(T[0] || l);
19634
- }, [l]), S = te((T) => {
19634
+ }, [l]), _ = te((T) => {
19635
19635
  "member" in l && f({
19636
19636
  ...l,
19637
19637
  member: T,
19638
19638
  values: []
19639
19639
  // Reset values when changing field
19640
19640
  });
19641
- }, [l]), N = te((T, _) => {
19641
+ }, [l]), N = te((T, S) => {
19642
19642
  "member" in l && f({
19643
19643
  ...l,
19644
- values: Array.isArray(_) ? _ : [_]
19644
+ values: Array.isArray(S) ? S : [S]
19645
19645
  });
19646
19646
  }, [l]), R = te(() => c.trim() ? !e.isUniversalTime && "member" in l && !l.member ? { isValid: !1, message: "Please select a field for the filter" } : { isValid: !0 } : { isValid: !1, message: "Filter label is required" }, [c, l, e.isUniversalTime]), w = te(async () => {
19647
19647
  const T = R();
@@ -19649,7 +19649,7 @@ const hA = ({
19649
19649
  alert(T.message);
19650
19650
  return;
19651
19651
  }
19652
- const _ = {
19652
+ const S = {
19653
19653
  id: e.id,
19654
19654
  label: c,
19655
19655
  filter: l,
@@ -19657,7 +19657,7 @@ const hA = ({
19657
19657
  ...e.isUniversalTime && { isUniversalTime: !0 }
19658
19658
  };
19659
19659
  try {
19660
- await s(_), a();
19660
+ await s(S), a();
19661
19661
  } catch (A) {
19662
19662
  console.error("Failed to save filter:", A), alert("Failed to save filter. Please try again.");
19663
19663
  }
@@ -19720,7 +19720,7 @@ const hA = ({
19720
19720
  dimensions: g ? [g] : [],
19721
19721
  timeDimensions: g ? [g] : []
19722
19722
  },
19723
- onFieldSelect: (T) => S(T),
19723
+ onFieldSelect: (T) => _(T),
19724
19724
  onFieldDeselect: () => {
19725
19725
  }
19726
19726
  }
@@ -20102,25 +20102,25 @@ const hA = ({
20102
20102
  isEditMode: c = !1
20103
20103
  }) => {
20104
20104
  const [d, l] = Z(null), [f, m] = Z(!1), h = te((T) => T ? {
20105
- cubes: T.cubes.map((_) => ({
20106
- name: _.name,
20107
- title: _.title || _.name,
20108
- description: _.description || "",
20109
- measures: _.measures.map((A) => ({
20105
+ cubes: T.cubes.map((S) => ({
20106
+ name: S.name,
20107
+ title: S.title || S.name,
20108
+ description: S.description || "",
20109
+ measures: S.measures.map((A) => ({
20110
20110
  name: A.name,
20111
20111
  title: A.title,
20112
20112
  type: A.type,
20113
20113
  description: "",
20114
20114
  shortTitle: A.shortTitle
20115
20115
  })),
20116
- dimensions: _.dimensions.map((A) => ({
20116
+ dimensions: S.dimensions.map((A) => ({
20117
20117
  name: A.name,
20118
20118
  title: A.title,
20119
20119
  type: A.type,
20120
20120
  description: "",
20121
20121
  shortTitle: A.shortTitle
20122
20122
  })),
20123
- segments: _.segments?.map((A) => ({
20123
+ segments: S.segments?.map((A) => ({
20124
20124
  name: A.name,
20125
20125
  title: A.title,
20126
20126
  type: A.type,
@@ -20150,18 +20150,18 @@ const hA = ({
20150
20150
  operator: "inDateRange",
20151
20151
  values: ["last 30 days"]
20152
20152
  }
20153
- }, _ = [...e, T];
20154
- s(_);
20153
+ }, S = [...e, T];
20154
+ s(S);
20155
20155
  }, [b, e, s]), y = te((T) => {
20156
- const _ = e.find((A) => A.id === T);
20157
- _ && (l(_), m(!0));
20156
+ const S = e.find((A) => A.id === T);
20157
+ S && (l(S), m(!0));
20158
20158
  }, [e]), v = te((T) => {
20159
- const _ = e.filter((A) => A.id !== T);
20160
- s(_), d?.id === T && (l(null), m(!1));
20161
- }, [e, d, s]), S = te(async (T) => {
20162
- const _ = e.findIndex((k) => k.id === T.id);
20159
+ const S = e.filter((A) => A.id !== T);
20160
+ s(S), d?.id === T && (l(null), m(!1));
20161
+ }, [e, d, s]), _ = te(async (T) => {
20162
+ const S = e.findIndex((k) => k.id === T.id);
20163
20163
  let A;
20164
- if (_ >= 0 ? A = e.map(
20164
+ if (S >= 0 ? A = e.map(
20165
20165
  (k) => k.id === T.id ? T : k
20166
20166
  ) : A = [...e, T], s(A), a)
20167
20167
  try {
@@ -20171,7 +20171,7 @@ const hA = ({
20171
20171
  }
20172
20172
  }, [e, s, a]), N = te(() => {
20173
20173
  l(null), m(!1);
20174
- }, []), R = te((T, _) => {
20174
+ }, []), R = te((T, S) => {
20175
20175
  const A = e.map((k) => {
20176
20176
  if (k.id === T) {
20177
20177
  const F = k.filter;
@@ -20180,21 +20180,21 @@ const hA = ({
20180
20180
  ...k,
20181
20181
  filter: {
20182
20182
  ...F,
20183
- dateRange: _,
20184
- values: Array.isArray(_) ? _ : [_]
20183
+ dateRange: S,
20184
+ values: Array.isArray(S) ? S : [S]
20185
20185
  }
20186
20186
  };
20187
20187
  }
20188
20188
  return k;
20189
20189
  });
20190
20190
  s(A);
20191
- }, [e, s]), w = te((T, _) => {
20191
+ }, [e, s]), w = te((T, S) => {
20192
20192
  const A = e.map(
20193
- (k) => k.id === T ? _ : k
20193
+ (k) => k.id === T ? S : k
20194
20194
  );
20195
20195
  s(A);
20196
20196
  }, [e, s]), C = te((T) => r ? r.cubes.some(
20197
- (_) => _.dimensions.some((A) => A.name === T && A.type === "time")
20197
+ (S) => S.dimensions.some((A) => A.name === T && A.type === "time")
20198
20198
  ) : !1, [r]);
20199
20199
  return !t || !c && e.length === 0 ? null : /* @__PURE__ */ E(
20200
20200
  "div",
@@ -20238,7 +20238,7 @@ const hA = ({
20238
20238
  schema: r,
20239
20239
  dashboardConfig: n,
20240
20240
  isOpen: f,
20241
- onSave: S,
20241
+ onSave: _,
20242
20242
  onClose: N,
20243
20243
  onDelete: () => v(d.id),
20244
20244
  convertToMetaResponse: h
@@ -20259,11 +20259,11 @@ function vA({
20259
20259
  schema: o,
20260
20260
  onDashboardFiltersChange: c
20261
20261
  }) {
20262
- const d = me({}), l = me({}), [f, m] = Z(!1), [h, b] = Z([]), [p, g] = Z(!1), [y, v] = Z(null), [S, N] = Z(/* @__PURE__ */ new Set());
20262
+ const d = me({}), l = me({}), [f, m] = Z(!1), [h, b] = Z([]), [p, g] = Z(!1), [y, v] = Z(null), [_, N] = Z(/* @__PURE__ */ new Set());
20263
20263
  fe(() => {
20264
20264
  !p && y && v(null);
20265
20265
  }, [p, y]);
20266
- const [R, w] = Z("lg"), [C, T] = Z(!1), [_, A] = Z(!1), [k, F] = Z(null), [D, x] = Z(!1), [M, q] = Z(null), [I, $] = Z({});
20266
+ const [R, w] = Z("lg"), [C, T] = Z(!1), [S, A] = Z(!1), [k, F] = Z(null), [D, x] = Z(!1), [M, q] = Z(null), [I, $] = Z({});
20267
20267
  fe(() => {
20268
20268
  const z = setTimeout(() => {
20269
20269
  m(!0);
@@ -20607,7 +20607,7 @@ function vA({
20607
20607
  /* @__PURE__ */ u(
20608
20608
  uy,
20609
20609
  {
20610
- isOpen: _,
20610
+ isOpen: S,
20611
20611
  onClose: () => {
20612
20612
  A(!1), F(null);
20613
20613
  },
@@ -20926,7 +20926,7 @@ function vA({
20926
20926
  dashboardFilters: r,
20927
20927
  dashboardFilterMapping: z.dashboardFilterMapping,
20928
20928
  eagerLoad: z.eagerLoad ?? e.eagerLoad ?? !1,
20929
- isVisible: S.has(z.id),
20929
+ isVisible: _.has(z.id),
20930
20930
  title: z.title,
20931
20931
  height: "100%",
20932
20932
  colorPalette: i,
@@ -20948,7 +20948,7 @@ function vA({
20948
20948
  /* @__PURE__ */ u(
20949
20949
  uy,
20950
20950
  {
20951
- isOpen: _,
20951
+ isOpen: S,
20952
20952
  onClose: () => {
20953
20953
  A(!1), F(null);
20954
20954
  },
@@ -20984,7 +20984,20 @@ function IA({
20984
20984
  }) {
20985
20985
  const { meta: i } = lt(), o = me(e), c = me(!1), d = _e(() => {
20986
20986
  const b = e.filters || [], p = r || [];
20987
- return p.length > 0 ? p : b;
20987
+ if (p.length === 0)
20988
+ return b;
20989
+ if (b.length === 0)
20990
+ return p;
20991
+ const g = b.map((_) => {
20992
+ const N = p.find((R) => R.id === _.id);
20993
+ return N ? {
20994
+ ..._,
20995
+ // Preserve id, label, isUniversalTime from config
20996
+ filter: N.filter
20997
+ // Use filter values from prop override
20998
+ } : _;
20999
+ }), y = new Set(b.map((_) => _.id)), v = p.filter((_) => !y.has(_.id));
21000
+ return [...g, ...v];
20988
21001
  }, [e.filters, r]), l = te(async (b) => {
20989
21002
  if (c.current) {
20990
21003
  a && a(!0);
@@ -21209,4 +21222,4 @@ export {
21209
21222
  M_ as s,
21210
21223
  Ky as w
21211
21224
  };
21212
- //# sourceMappingURL=components-BmTjE0P9.js.map
21225
+ //# sourceMappingURL=components-DoiFHeIC.js.map