react-semaphor 0.1.159 → 0.1.161

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.
Files changed (27) hide show
  1. package/dist/chunks/{dashboard-controls-DnlJRUpY.js → dashboard-controls-Bj4t5-el.js} +191 -190
  2. package/dist/chunks/{dashboard-controls-DIo_VMBS.js → dashboard-controls-BlxwV3BR.js} +6 -6
  3. package/dist/chunks/{dashboard-export-dialog-D6bmvl-v.js → dashboard-export-dialog-CIzU-4eS.js} +22 -22
  4. package/dist/chunks/{dashboard-export-dialog-CZhtshog.js → dashboard-export-dialog-CT050NhP.js} +1 -1
  5. package/dist/chunks/{dashboard-json-D1jy0qDk.js → dashboard-json-BozpGO6V.js} +1 -1
  6. package/dist/chunks/{dashboard-json-Bagczd1F.js → dashboard-json-rd13AclB.js} +1 -1
  7. package/dist/chunks/{edit-dashboard-visual-ANoND-SH.js → edit-dashboard-visual-CfKKFELr.js} +1 -1
  8. package/dist/chunks/{edit-dashboard-visual-B6Q0AUbn.js → edit-dashboard-visual-CxCLmkDv.js} +656 -656
  9. package/dist/chunks/{editor-action-buttons-B1yfEUpI.js → editor-action-buttons-Bu2ZxWgU.js} +1 -1
  10. package/dist/chunks/{editor-action-buttons-CMNOhq91.js → editor-action-buttons-Ca2pHbvu.js} +2 -2
  11. package/dist/chunks/{index-Dy-VUjSy.js → index-BXm1zeXQ.js} +205 -205
  12. package/dist/chunks/{index-CMymongy.js → index-CO0YJSQz.js} +14042 -14052
  13. package/dist/chunks/resource-management-panel-C7J2WWQy.js +6 -0
  14. package/dist/chunks/{resource-management-panel-BPl4Mk9m.js → resource-management-panel-DTJwukgb.js} +343 -335
  15. package/dist/chunks/use-role-aware-display-preferences-CBkOVEcY.js +1 -0
  16. package/dist/chunks/use-role-aware-display-preferences-CJv8NgDG.js +29 -0
  17. package/dist/chunks/{use-visual-utils-BH4FZWUV.js → use-visual-utils-8weKmT25.js} +1 -1
  18. package/dist/chunks/{use-visual-utils-H7arppWh.js → use-visual-utils-B39LEQMe.js} +24 -24
  19. package/dist/dashboard/index.cjs +1 -1
  20. package/dist/dashboard/index.js +1 -1
  21. package/dist/index.cjs +2 -2
  22. package/dist/index.js +67 -65
  23. package/dist/surfboard/index.cjs +1 -1
  24. package/dist/surfboard/index.js +1 -1
  25. package/dist/types/main.d.ts +68 -1
  26. package/package.json +1 -1
  27. package/dist/chunks/resource-management-panel--vwXhI58.js +0 -6
@@ -1,8 +1,8 @@
1
1
  import { jsxs as a, jsx as e, Fragment as de } from "react/jsx-runtime";
2
- import { b as me, l as ut, e as ne, f as I, c9 as oa, ay as L, ca as _, cb as J, cc as H, cd as Y, ce as B, cf as ge, B as K, b8 as Qe, cg as wa, ch as bs, ci as vs, cj as Ns, ck as ys, cl as Sa, r as lt, X as Ae, cm as cn, bd as dn, at as St, au as kt, av as Tt, aw as At, ax as jt, k as Le, bs as $e, bo as qe, bp as Me, bq as Re, cn as $n, co as un, u as Ce, aC as xa, a$ as $t, bj as ea, c as W, aB as Je, cp as Cs, b6 as ws, cq as wl, cr as Sl, cs as kl, ct as na, cu as Tl, cv as Ss, bN as ks, cw as tt, cx as nt, cy as mt, cz as Al, cA as ht, cB as mn, cC as ka, cD as Ta, cE as pt, cF as Aa, cG as El, bD as Dl, cH as Ol, cI as Ts, cJ as Il, cK as hn, cL as Ml, h as Rl, cM as Ll, cN as an, cO as Et, cP as Pe, cQ as Dt, L as qt, cR as Fl, cS as As, c6 as Kt, aF as Ea, aZ as ca, cT as pn, cU as da, bk as fn, a_ as ft, A as Pl, cV as Vl, bh as Bl, aL as gn, g as Es, cW as xn, cX as zl, cY as Ds, cZ as Os, c_ as ba, c4 as qa, c$ as jl, d0 as $l, d1 as Is, d2 as ql, d3 as Kl, d4 as Gl, d5 as Da, d6 as Ul, d7 as _l, d8 as qn, d9 as Jl, E as Oa, o as bn, da as Hl, db as vn, bF as Yl, I as Ie, dc as Wl, dd as Ql, bT as Ia, bU as Ma, bV as st, bW as fa, de as Xl, br as Zl, df as Ms, dg as er, dh as tr, bz as Ra, az as je, P as He, q as Ye, di as ar, s as We, aG as Nn, aH as yn, aJ as Cn, bG as Rs, bc as Bt, dj as ot, dk as Ot, dl as It, dm as gt, dn as Gt, dp as nr, a4 as sr, dq as lr, aE as zt, dr as rr, ds as Ls, dt as ir, du as or, dv as cr, dw as dr, dx as ur, b3 as mr, dy as hr, dz as Fs, dA as wn, b1 as xe, dB as Ut, dC as la, dD as pr, dE as fr, dF as _t, dG as be, dH as ve, dI as Ne, dJ as gr, dK as xr, dL as ct, dM as ha, dN as Kn, dO as br, c7 as Ps, ai as Vs, dP as vr, dQ as Nr, dR as yr, t as Jt, v as Ht, w as Yt, x as Wt, y as Qt, z as Xt, dS as Cr, dT as wr, dU as Gn, dV as Sr, C as ta, dW as Te, dX as kr, dY as Ka, dZ as Un, d_ as Be, d$ as Tr, e0 as Ar, e1 as Er, e2 as Dr, e3 as ua, e4 as Or, e5 as Ga, e6 as Bs, e7 as Ir, e8 as Mr, e9 as Rr, ea as va, eb as Lr, ec as Fr, ed as wt, b7 as Sn, ee as kn, ef as zs, eg as Pr, bx as js, eh as Vr, ei as _n, ao as La, G as Br, ej as zr, ek as jr, el as $r, em as qr, en as Kr, ae as Jn, eo as Hn, ep as Gr, eq as Ur, er as $s, es as _r, et as qs, eu as Jr, ev as Hr, ew as Yr, ex as Wr, ey as Qr, ez as Xr, eA as Zr, eB as ei, eC as ti, eD as ai, eE as Ks, eF as ni, eG as si, eH as li, eI as ri, eJ as ii, eK as oi, eL as ci, eM as Gs, aI as di, eN as ui, eO as Yn, eP as Wn, _ as mi, eQ as hi, eR as pi, eS as fi, eT as gi, eU as Us, eV as xi, bM as _s, eW as Ee, aA as bi, a0 as Na, eX as vi, eY as Ni, eZ as Fa, e_ as Js, e$ as Pa, f0 as yi, bA as Ci, f1 as Qn, f2 as wi, f3 as Si, f4 as ki, f5 as ga, f6 as Ti, f7 as Tn, f8 as Ai, f9 as Ei, fa as ya, fb as Di, fc as Oi, fd as Ii, fe as ra, ff as dt, fg as nn, fh as sn, fi as ia, fj as Hs, fk as Zt, fl as Mi, fm as Ua, fn as _a, fo as Ri, fp as Ja, fq as Li, fr as Xn, fs as Fi, ft as Pi, fu as Vi, fv as Bi, aK as Ve, fw as zi, fx as ji, fy as $i, b2 as qi, fz as Va, bf as Ba, fA as Zn, fB as Ys, fC as Ha, fD as Ki, fE as Gi, fF as Ui, F as _i } from "./index-CMymongy.js";
2
+ import { l as me, t as ut, m as ne, n as I, cg as oa, aI as L, ch as _, ci as J, cj as H, ck as Y, cl as B, cm as ge, B as K, bi as We, cn as wa, co as bs, cp as Ns, cq as vs, cr as ys, cs as Sa, A as lt, X as Ae, ct as cn, bn as dn, aD as St, aE as kt, aF as Tt, aG as At, aH as jt, s as Le, bB as $e, bx as qe, by as Me, bz as Re, cu as $n, cv as un, u as Ce, aM as xa, b9 as $t, bs as ea, c as Q, aL as Je, cw as Cs, bg as ws, cx as wl, cy as Sl, cz as kl, cA as na, cB as Tl, cC as Ss, bV as ks, cD as tt, cE as nt, cF as mt, cG as Al, cH as ht, cI as mn, cJ as ka, cK as Ta, cL as pt, cM as Aa, cN as El, bL as Dl, cO as Ol, cP as Ts, cQ as Il, cR as hn, cS as Ml, p as Rl, cT as Ll, cU as an, cV as Et, cW as Pe, cX as Dt, L as qt, cY as Fl, cZ as As, cd as Kt, aP as Ea, b7 as ca, c_ as pn, c$ as da, bt as fn, b8 as ft, Q as Pl, d0 as Vl, e as Bl, aV as gn, o as Es, d1 as xn, d2 as zl, d3 as Ds, d4 as Os, d5 as ba, cb as qa, d6 as jl, d7 as $l, d8 as Is, d9 as ql, da as Kl, db as Gl, dc as Da, dd as Ul, de as _l, df as qn, dg as Jl, E as Oa, x as bn, dh as Hl, di as Nn, bN as Yl, J as Ie, dj as Ql, dk as Wl, b$ as Ia, c0 as Ma, c1 as st, c2 as fa, dl as Xl, bA as Zl, dm as Ms, dn as er, dp as tr, bH as Ra, aJ as je, P as He, z as Ye, dq as ar, G as Qe, aQ as vn, aR as yn, aT as Cn, bO as Rs, bm as Bt, dr as ot, ds as Ot, dt as It, du as gt, dv as Gt, dw as nr, ae as sr, dx as lr, aO as zt, dy as rr, dz as Ls, dA as ir, dB as or, dC as cr, dD as dr, dE as ur, bd as mr, dF as hr, dG as Fs, dH as wn, bb as xe, dI as Ut, dJ as la, dK as pr, dL as fr, dM as _t, dN as be, dO as Ne, dP as ve, dQ as gr, dR as xr, dS as ct, dT as ha, dU as Kn, dV as br, ce as Ps, as as Vs, dW as Nr, dX as vr, dY as yr, H as Jt, I as Ht, K as Yt, M as Qt, N as Wt, O as Xt, dZ as Cr, d_ as wr, d$ as Gn, e0 as Sr, C as ta, e1 as Te, e2 as kr, e3 as Ka, e4 as Un, e5 as Be, e6 as Tr, e7 as Ar, e8 as Er, e9 as Dr, ea as ua, eb as Or, ec as Ga, ed as Bs, ee as Ir, ef as Mr, eg as Rr, eh as Na, ei as Lr, ej as Fr, ek as wt, bh as Sn, el as kn, em as zs, en as Pr, bF as js, eo as Vr, ep as _n, ay as La, R as Br, eq as zr, er as jr, es as $r, et as qr, eu as Kr, ao as Jn, ev as Hn, ew as Gr, ex as Ur, ey as $s, ez as _r, eA as qs, eB as Jr, eC as Hr, eD as Yr, eE as Qr, eF as Wr, eG as Xr, eH as Zr, eI as ei, eJ as ti, eK as ai, eL as Ks, eM as ni, eN as si, eO as li, eP as ri, eQ as ii, eR as oi, eS as ci, eT as Gs, aS as di, eU as ui, eV as Yn, eW as Qn, a8 as mi, eX as hi, eY as pi, eZ as fi, e_ as gi, e$ as Us, f0 as xi, bU as _s, f1 as Ee, aK as bi, aa as va, f2 as Ni, f3 as vi, f4 as Fa, f5 as Js, f6 as Pa, f7 as yi, bI as Ci, f8 as Wn, f9 as wi, fa as Si, fb as ki, fc as ga, fd as Ti, fe as Tn, ff as Ai, fg as Ei, fh as ya, fi as Di, fj as Oi, fk as Ii, fl as ra, fm as dt, fn as nn, fo as sn, fp as ia, fq as Hs, fr as Zt, fs as Mi, ft as Ua, fu as _a, fv as Ri, fw as Ja, fx as Li, fy as Xn, fz as Fi, fA as Pi, fB as Vi, fC as Bi, aU as Ve, fD as zi, fE as ji, fF as $i, bc as qi, fG as Va, bp as Ba, fH as Zn, fI as Ys, fJ as Ha, fK as Ki, fL as Gi, fM as Ui, F as _i } from "./index-CO0YJSQz.js";
3
3
  import * as ln from "react";
4
4
  import rn, { useState as q, useEffect as ue, useRef as Ke, useCallback as _e, useContext as An, useMemo as we } from "react";
5
- import { d as En } from "./editor-action-buttons-CMNOhq91.js";
5
+ import { d as En } from "./editor-action-buttons-Ca2pHbvu.js";
6
6
  import { createPortal as Ji } from "react-dom";
7
7
  /**
8
8
  * @license lucide-react v0.453.0 - ISC
@@ -36,7 +36,7 @@ const Yi = me("ArrowUpAZ", [
36
36
  * This source code is licensed under the ISC license.
37
37
  * See the LICENSE file in the root directory of this source tree.
38
38
  */
39
- const Ws = me("Blocks", [
39
+ const Qs = me("Blocks", [
40
40
  ["rect", { width: "7", height: "7", x: "14", y: "3", rx: "1", key: "6d4xhi" }],
41
41
  [
42
42
  "path",
@@ -52,7 +52,7 @@ const Ws = me("Blocks", [
52
52
  * This source code is licensed under the ISC license.
53
53
  * See the LICENSE file in the root directory of this source tree.
54
54
  */
55
- const Wi = me("BookOpenText", [
55
+ const Qi = me("BookOpenText", [
56
56
  ["path", { d: "M12 7v14", key: "1akyts" }],
57
57
  ["path", { d: "M16 12h2", key: "7q9ll5" }],
58
58
  ["path", { d: "M16 8h2", key: "msurwy" }],
@@ -72,7 +72,7 @@ const Wi = me("BookOpenText", [
72
72
  * This source code is licensed under the ISC license.
73
73
  * See the LICENSE file in the root directory of this source tree.
74
74
  */
75
- const Qs = me("CircleX", [
75
+ const Ws = me("CircleX", [
76
76
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
77
77
  ["path", { d: "m15 9-6 6", key: "1uzhvr" }],
78
78
  ["path", { d: "m9 9 6 6", key: "z0biqf" }]
@@ -94,7 +94,7 @@ const Xs = me("Columns3", [
94
94
  * This source code is licensed under the ISC license.
95
95
  * See the LICENSE file in the root directory of this source tree.
96
96
  */
97
- const Qi = me("Component", [
97
+ const Wi = me("Component", [
98
98
  [
99
99
  "path",
100
100
  {
@@ -315,7 +315,7 @@ const Ya = me("MoveHorizontal", [
315
315
  * This source code is licensed under the ISC license.
316
316
  * See the LICENSE file in the root directory of this source tree.
317
317
  */
318
- const Wa = me("MoveVertical", [
318
+ const Qa = me("MoveVertical", [
319
319
  ["path", { d: "M12 2v20", key: "t6zp3m" }],
320
320
  ["path", { d: "m8 18 4 4 4-4", key: "bh5tu3" }],
321
321
  ["path", { d: "m8 6 4-4 4 4", key: "ybng9g" }]
@@ -463,7 +463,7 @@ const bo = me("Tags", [
463
463
  * This source code is licensed under the ISC license.
464
464
  * See the LICENSE file in the root directory of this source tree.
465
465
  */
466
- const vo = me("Wand", [
466
+ const No = me("Wand", [
467
467
  ["path", { d: "M15 4V2", key: "z1p9b7" }],
468
468
  ["path", { d: "M15 16v-2", key: "px0unx" }],
469
469
  ["path", { d: "M8 9h2", key: "1g203m" }],
@@ -474,7 +474,7 @@ const vo = me("Wand", [
474
474
  ["path", { d: "m3 21 9-9", key: "1jfql5" }],
475
475
  ["path", { d: "M12.2 6.2 11 5", key: "i3da3b" }]
476
476
  ]);
477
- function No({
477
+ function vo({
478
478
  initialJoinPlan: t,
479
479
  availableDataSources: s
480
480
  }) {
@@ -513,11 +513,11 @@ function No({
513
513
  joins: n.joins.filter((C) => C.id !== A)
514
514
  }), d(new Set([...o].filter((C) => C !== A)));
515
515
  }, i = (A, C) => {
516
- var N, O, P, E, F;
516
+ var v, O, P, E, F;
517
517
  const S = n.joins.find((T) => T.id === A);
518
518
  if (!S) return;
519
519
  const D = { ...S, ...C };
520
- if ((N = D.source) != null && N.name && ((O = D.target) != null && O.name) && D.source.name === D.target.name) {
520
+ if ((v = D.source) != null && v.name && ((O = D.target) != null && O.name) && D.source.name === D.target.name) {
521
521
  ut.error("Self-joins are not yet supported", {
522
522
  description: `Joining ${D.source.name} to itself is not currently supported. Please select a different target table.`
523
523
  });
@@ -535,19 +535,19 @@ function No({
535
535
  });
536
536
  return;
537
537
  }
538
- const v = n.joins.map(
538
+ const N = n.joins.map(
539
539
  (T) => T.id === A ? D : T
540
540
  );
541
541
  if ((E = D.source) != null && E.name && ((F = D.target) != null && F.name) && D.joinKeyGroups[0].keys.length === 0) {
542
542
  const T = s.find(
543
- (Q) => {
543
+ (W) => {
544
544
  var X;
545
- return Q.name === ((X = D.source) == null ? void 0 : X.name);
545
+ return W.name === ((X = D.source) == null ? void 0 : X.name);
546
546
  }
547
547
  ), j = s.find(
548
- (Q) => {
548
+ (W) => {
549
549
  var X;
550
- return Q.name === ((X = D.target) == null ? void 0 : X.name);
550
+ return W.name === ((X = D.target) == null ? void 0 : X.name);
551
551
  }
552
552
  ), U = {
553
553
  id: `key-${Date.now()}`,
@@ -576,11 +576,11 @@ function No({
576
576
  ae[0] = {
577
577
  ...ae[0],
578
578
  keys: [U]
579
- }, D.joinKeyGroups = ae, v[v.findIndex((Q) => Q.id === A)] = D;
579
+ }, D.joinKeyGroups = ae, N[N.findIndex((W) => W.id === A)] = D;
580
580
  }
581
581
  r({
582
582
  ...n,
583
- joins: v
583
+ joins: N
584
584
  });
585
585
  };
586
586
  return {
@@ -594,28 +594,28 @@ function No({
594
594
  const C = n.joins.findIndex((S) => S.id === A);
595
595
  if (C > 0) {
596
596
  const S = [...n.joins], D = { ...S[C] }, R = { ...S[C - 1] };
597
- S[C] = R, S[C - 1] = D, S.forEach((N, O) => {
598
- N.sequence = O + 1;
597
+ S[C] = R, S[C - 1] = D, S.forEach((v, O) => {
598
+ v.sequence = O + 1;
599
599
  });
600
- const v = {
600
+ const N = {
601
601
  ...n,
602
602
  joins: S
603
603
  };
604
- r(v);
604
+ r(N);
605
605
  }
606
606
  },
607
607
  moveJoinDown: (A) => {
608
608
  const C = n.joins.findIndex((S) => S.id === A);
609
609
  if (C < n.joins.length - 1) {
610
610
  const S = [...n.joins], D = { ...S[C] }, R = { ...S[C + 1] };
611
- S[C] = R, S[C + 1] = D, S.forEach((N, O) => {
612
- N.sequence = O + 1;
611
+ S[C] = R, S[C + 1] = D, S.forEach((v, O) => {
612
+ v.sequence = O + 1;
613
613
  });
614
- const v = {
614
+ const N = {
615
615
  ...n,
616
616
  joins: S
617
617
  };
618
- r(v);
618
+ r(N);
619
619
  }
620
620
  },
621
621
  toggleJoinExpansion: (A) => {
@@ -651,7 +651,7 @@ function No({
651
651
  i(A, { joinKeyGroups: S });
652
652
  },
653
653
  updateGroupOperator: (A, C, S) => {
654
- const D = n.joins.find((v) => v.id === A);
654
+ const D = n.joins.find((N) => N.id === A);
655
655
  if (!D) return;
656
656
  const R = [...D.joinKeyGroups];
657
657
  R[C] = { ...R[C], operator: S }, i(A, { joinKeyGroups: R });
@@ -669,7 +669,7 @@ function No({
669
669
  (O) => O.name === S.source.name
670
670
  ), R = s.find(
671
671
  (O) => O.name === S.target.name
672
- ), v = [...S.joinKeyGroups], N = {
672
+ ), N = [...S.joinKeyGroups], v = {
673
673
  id: `key-${Date.now()}`,
674
674
  source: {
675
675
  id: `source-${Date.now()}`,
@@ -693,20 +693,20 @@ function No({
693
693
  },
694
694
  operator: "="
695
695
  };
696
- v[C] = {
697
- ...v[C],
698
- keys: [...v[C].keys, N]
699
- }, i(A, { joinKeyGroups: v });
696
+ N[C] = {
697
+ ...N[C],
698
+ keys: [...N[C].keys, v]
699
+ }, i(A, { joinKeyGroups: N });
700
700
  },
701
701
  updateJoinKey: (A, C, S, D, R) => {
702
- const v = n.joins.find((F) => F.id === A);
703
- if (!v) return;
704
- const N = s.find(
705
- (F) => F.name === v.source.name
702
+ const N = n.joins.find((F) => F.id === A);
703
+ if (!N) return;
704
+ const v = s.find(
705
+ (F) => F.name === N.source.name
706
706
  ), O = s.find(
707
- (F) => F.name === v.target.name
708
- ), P = [...v.joinKeyGroups], E = P[C].keys[S];
709
- D === "sourceColumnName" && N ? P[C].keys[S] = {
707
+ (F) => F.name === N.target.name
708
+ ), P = [...N.joinKeyGroups], E = P[C].keys[S];
709
+ D === "sourceColumnName" && v ? P[C].keys[S] = {
710
710
  ...E,
711
711
  source: {
712
712
  ...E.source,
@@ -724,7 +724,7 @@ function No({
724
724
  }), i(A, { joinKeyGroups: P });
725
725
  },
726
726
  removeJoinKey: (A, C, S) => {
727
- const D = n.joins.find((v) => v.id === A);
727
+ const D = n.joins.find((N) => N.id === A);
728
728
  if (!D) return;
729
729
  const R = [...D.joinKeyGroups];
730
730
  R[C].keys.splice(S, 1), i(A, { joinKeyGroups: R });
@@ -742,7 +742,7 @@ FROM ${C.name}`;
742
742
  (O) => O.name === D.target.name
743
743
  );
744
744
  if (!R) return;
745
- const v = D.joinKeyGroups.filter((O) => O.keys && O.keys.length > 0).map((O) => {
745
+ const N = D.joinKeyGroups.filter((O) => O.keys && O.keys.length > 0).map((O) => {
746
746
  const P = O.keys.filter(
747
747
  (E) => {
748
748
  var F, T, j, U;
@@ -752,10 +752,10 @@ FROM ${C.name}`;
752
752
  (E) => `${E.source.entityName}.${E.source.name} ${E.operator} ${E.target.entityName}.${E.target.name}`
753
753
  );
754
754
  return P.length > 1 ? `(${P.join(` ${O.operator} `)})` : P[0];
755
- }).filter(Boolean), N = v.length > 1 ? v.join(" OR ") : v[0] || "condition_here";
755
+ }).filter(Boolean), v = N.length > 1 ? N.join(" OR ") : N[0] || "condition_here";
756
756
  S += `
757
757
  ${D.joinType} JOIN ${R.name}
758
- ON ${N}`;
758
+ ON ${v}`;
759
759
  }), S;
760
760
  },
761
761
  isValidConfiguration: () => !(!n.baseEntity.name || n.joins.some(
@@ -765,7 +765,7 @@ ${D.joinType} JOIN ${R.name}
765
765
  ) || n.joins.some(
766
766
  (D) => D.joinKeyGroups.some(
767
767
  (R) => R.keys.some(
768
- (v) => !v.source.name || !v.target.name || !v.operator
768
+ (N) => !N.source.name || !N.target.name || !N.operator
769
769
  )
770
770
  )
771
771
  ))
@@ -779,7 +779,7 @@ function yo({
779
779
  onCancel: o
780
780
  }) {
781
781
  const { setCardConfig: d } = ne();
782
- I((v) => v.card.config);
782
+ I((N) => N.card.config);
783
783
  const { columnGroups: l } = oa(), {
784
784
  joinPlan: c,
785
785
  expandedJoins: i,
@@ -800,12 +800,12 @@ function yo({
800
800
  removeJoinKey: C,
801
801
  generateSQLPreview: S,
802
802
  isValidConfiguration: D
803
- } = No({
803
+ } = vo({
804
804
  initialJoinPlan: t,
805
805
  availableDataSources: s
806
- }), R = (v) => {
807
- const N = l.find((O) => O.entityName === v);
808
- return (N == null ? void 0 : N.columns) || [];
806
+ }), R = (N) => {
807
+ const v = l.find((O) => O.entityName === N);
808
+ return (v == null ? void 0 : v.columns) || [];
809
809
  };
810
810
  return /* @__PURE__ */ a("div", { className: "space-y-6", children: [
811
811
  /* @__PURE__ */ a("div", { className: "space-y-2", children: [
@@ -814,36 +814,36 @@ function yo({
814
814
  _,
815
815
  {
816
816
  value: c.baseEntity.name,
817
- onValueChange: (v) => {
818
- const N = s.find(
819
- (O) => O.name === v
817
+ onValueChange: (N) => {
818
+ const v = s.find(
819
+ (O) => O.name === N
820
820
  );
821
821
  u({
822
822
  ...c,
823
823
  baseEntity: {
824
- connectionId: (N == null ? void 0 : N.connectionId) || "",
825
- connectionType: (N == null ? void 0 : N.connectionType) || "none",
826
- type: (N == null ? void 0 : N.type) || "table",
827
- name: v,
828
- database: N == null ? void 0 : N.database,
829
- schema: N == null ? void 0 : N.schema
824
+ connectionId: (v == null ? void 0 : v.connectionId) || "",
825
+ connectionType: (v == null ? void 0 : v.connectionType) || "none",
826
+ type: (v == null ? void 0 : v.type) || "table",
827
+ name: N,
828
+ database: v == null ? void 0 : v.database,
829
+ schema: v == null ? void 0 : v.schema
830
830
  }
831
831
  });
832
832
  },
833
833
  children: [
834
834
  /* @__PURE__ */ e(J, { children: /* @__PURE__ */ e(H, { placeholder: "Select base entity..." }) }),
835
- /* @__PURE__ */ e(Y, { children: s.map((v) => /* @__PURE__ */ e(
835
+ /* @__PURE__ */ e(Y, { children: s.map((N) => /* @__PURE__ */ e(
836
836
  B,
837
837
  {
838
838
  className: "hover:bg-muted",
839
- value: v.name,
839
+ value: N.name,
840
840
  children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
841
- /* @__PURE__ */ e(ge, { variant: "outline", className: "text-xs", children: v.type }),
842
- v.name,
841
+ /* @__PURE__ */ e(ge, { variant: "outline", className: "text-xs", children: N.type }),
842
+ N.name,
843
843
  /* @__PURE__ */ e(ge, { variant: "outline", className: "text-xs text-green-600", children: "BASE" })
844
844
  ] })
845
845
  },
846
- v.name
846
+ N.name
847
847
  )) })
848
848
  ]
849
849
  }
@@ -862,26 +862,26 @@ function yo({
862
862
  ")"
863
863
  ] }),
864
864
  /* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ a(K, { variant: "outline", size: "sm", onClick: g, children: [
865
- /* @__PURE__ */ e(Qe, { className: "mr-1 h-4 w-4" }),
865
+ /* @__PURE__ */ e(We, { className: "mr-1 h-4 w-4" }),
866
866
  "Add Join"
867
867
  ] }) })
868
868
  ] }),
869
- c.joins.length === 0 ? /* @__PURE__ */ e("div", { className: "rounded-lg border border-dashed py-8 text-center text-muted-foreground", children: /* @__PURE__ */ e("p", { children: "No joins configured. Add a join to connect multiple data sources." }) }) : /* @__PURE__ */ e("div", { className: "max-h-[300px] space-y-4 overflow-y-auto", children: c.joins.map((v) => {
870
- const N = s.find(
871
- (E) => E.name === v.source.name
869
+ c.joins.length === 0 ? /* @__PURE__ */ e("div", { className: "rounded-lg border border-dashed py-8 text-center text-muted-foreground", children: /* @__PURE__ */ e("p", { children: "No joins configured. Add a join to connect multiple data sources." }) }) : /* @__PURE__ */ e("div", { className: "max-h-[300px] space-y-4 overflow-y-auto", children: c.joins.map((N) => {
870
+ const v = s.find(
871
+ (E) => E.name === N.source.name
872
872
  ), O = s.find(
873
- (E) => E.name === v.target.name
874
- ), P = i.has(v.id);
873
+ (E) => E.name === N.target.name
874
+ ), P = i.has(N.id);
875
875
  return /* @__PURE__ */ a(wa, { className: "border", children: [
876
876
  /* @__PURE__ */ e(bs, { className: "pb-3", children: /* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: [
877
877
  /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
878
- /* @__PURE__ */ e(ge, { children: v.sequence }),
879
- /* @__PURE__ */ a(vs, { className: "text-sm", children: [
878
+ /* @__PURE__ */ e(ge, { children: N.sequence }),
879
+ /* @__PURE__ */ a(Ns, { className: "text-sm", children: [
880
880
  "Join ",
881
- v.sequence,
882
- N && O && /* @__PURE__ */ a("span", { className: "ml-2 font-normal text-gray-600", children: [
881
+ N.sequence,
882
+ v && O && /* @__PURE__ */ a("span", { className: "ml-2 font-normal text-gray-600", children: [
883
883
  "(",
884
- N.name,
884
+ v.name,
885
885
  " → ",
886
886
  O.name,
887
887
  ")"
@@ -894,9 +894,9 @@ function yo({
894
894
  {
895
895
  variant: "ghost",
896
896
  size: "sm",
897
- onClick: () => k(v.id),
898
- disabled: v.sequence === 1,
899
- children: /* @__PURE__ */ e(Ns, { className: "h-4 w-4" })
897
+ onClick: () => k(N.id),
898
+ disabled: N.sequence === 1,
899
+ children: /* @__PURE__ */ e(vs, { className: "h-4 w-4" })
900
900
  }
901
901
  ),
902
902
  /* @__PURE__ */ e(
@@ -904,8 +904,8 @@ function yo({
904
904
  {
905
905
  variant: "ghost",
906
906
  size: "sm",
907
- onClick: () => m(v.id),
908
- disabled: v.sequence === c.joins.length,
907
+ onClick: () => m(N.id),
908
+ disabled: N.sequence === c.joins.length,
909
909
  children: /* @__PURE__ */ e(ys, { className: "h-4 w-4" })
910
910
  }
911
911
  ),
@@ -914,7 +914,7 @@ function yo({
914
914
  {
915
915
  variant: "ghost",
916
916
  size: "sm",
917
- onClick: () => h(v.id),
917
+ onClick: () => h(N.id),
918
918
  children: P ? /* @__PURE__ */ e(Sa, { className: "h-4 w-4" }) : /* @__PURE__ */ e(lt, { className: "h-4 w-4" })
919
919
  }
920
920
  ),
@@ -923,7 +923,7 @@ function yo({
923
923
  {
924
924
  variant: "ghost",
925
925
  size: "sm",
926
- onClick: () => f(v.id),
926
+ onClick: () => f(N.id),
927
927
  children: /* @__PURE__ */ e(Ae, { className: "h-4 w-4" })
928
928
  }
929
929
  )
@@ -936,12 +936,12 @@ function yo({
936
936
  /* @__PURE__ */ a(
937
937
  _,
938
938
  {
939
- value: v.source.name,
939
+ value: N.source.name,
940
940
  onValueChange: (E) => {
941
941
  const F = s.find(
942
942
  (T) => T.name === E
943
943
  );
944
- p(v.id, {
944
+ p(N.id, {
945
945
  source: {
946
946
  connectionId: (F == null ? void 0 : F.connectionId) || "",
947
947
  connectionType: (F == null ? void 0 : F.connectionType) || "none",
@@ -954,7 +954,7 @@ function yo({
954
954
  },
955
955
  children: [
956
956
  /* @__PURE__ */ e(J, { children: /* @__PURE__ */ e(H, { placeholder: "Select source..." }) }),
957
- /* @__PURE__ */ e(Y, { children: x(v.id).map(
957
+ /* @__PURE__ */ e(Y, { children: x(N.id).map(
958
958
  (E) => /* @__PURE__ */ e(
959
959
  B,
960
960
  {
@@ -984,8 +984,8 @@ function yo({
984
984
  /* @__PURE__ */ a(
985
985
  _,
986
986
  {
987
- value: v.joinType,
988
- onValueChange: (E) => p(v.id, {
987
+ value: N.joinType,
988
+ onValueChange: (E) => p(N.id, {
989
989
  joinType: E
990
990
  }),
991
991
  children: [
@@ -1033,12 +1033,12 @@ function yo({
1033
1033
  /* @__PURE__ */ a(
1034
1034
  _,
1035
1035
  {
1036
- value: v.target.name,
1036
+ value: N.target.name,
1037
1037
  onValueChange: (E) => {
1038
1038
  const F = s.find(
1039
1039
  (T) => T.name === E
1040
1040
  );
1041
- p(v.id, {
1041
+ p(N.id, {
1042
1042
  target: {
1043
1043
  connectionId: (F == null ? void 0 : F.connectionId) || "",
1044
1044
  connectionType: (F == null ? void 0 : F.connectionType) || "none",
@@ -1049,11 +1049,11 @@ function yo({
1049
1049
  }
1050
1050
  });
1051
1051
  },
1052
- disabled: !v.source.name,
1052
+ disabled: !N.source.name,
1053
1053
  children: [
1054
1054
  /* @__PURE__ */ e(J, { children: /* @__PURE__ */ e(H, { placeholder: "Select target..." }) }),
1055
- /* @__PURE__ */ e(Y, { children: v.source.name ? b(
1056
- v.source.name
1055
+ /* @__PURE__ */ e(Y, { children: N.source.name ? b(
1056
+ N.source.name
1057
1057
  ).map((E) => /* @__PURE__ */ e(
1058
1058
  B,
1059
1059
  {
@@ -1069,7 +1069,7 @@ function yo({
1069
1069
  }
1070
1070
  ),
1071
1071
  E.name,
1072
- E.name === v.source.name && /* @__PURE__ */ e(
1072
+ E.name === N.source.name && /* @__PURE__ */ e(
1073
1073
  ge,
1074
1074
  {
1075
1075
  variant: "outline",
@@ -1086,7 +1086,7 @@ function yo({
1086
1086
  )
1087
1087
  ] })
1088
1088
  ] }),
1089
- v.source.name && v.target.name && N && O && /* @__PURE__ */ a("div", { className: "space-y-4", children: [
1089
+ N.source.name && N.target.name && v && O && /* @__PURE__ */ a("div", { className: "space-y-4", children: [
1090
1090
  /* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: [
1091
1091
  /* @__PURE__ */ e(L, { children: "Join Conditions" }),
1092
1092
  /* @__PURE__ */ a(
@@ -1095,15 +1095,15 @@ function yo({
1095
1095
  type: "button",
1096
1096
  variant: "outline",
1097
1097
  size: "sm",
1098
- onClick: () => y(v.id),
1098
+ onClick: () => y(N.id),
1099
1099
  children: [
1100
- /* @__PURE__ */ e(Qe, { className: "mr-1 h-3 w-3" }),
1100
+ /* @__PURE__ */ e(We, { className: "mr-1 h-3 w-3" }),
1101
1101
  " Add Condition Group"
1102
1102
  ]
1103
1103
  }
1104
1104
  )
1105
1105
  ] }),
1106
- v.joinKeyGroups.length === 0 ? /* @__PURE__ */ e("div", { className: "rounded-md border p-3 text-center text-sm text-gray-500", children: "No join conditions defined. Add condition groups to specify how data sources should be joined." }) : /* @__PURE__ */ e("div", { className: "space-y-4", children: v.joinKeyGroups.map((E, F) => /* @__PURE__ */ a(
1106
+ N.joinKeyGroups.length === 0 ? /* @__PURE__ */ e("div", { className: "rounded-md border p-3 text-center text-sm text-gray-500", children: "No join conditions defined. Add condition groups to specify how data sources should be joined." }) : /* @__PURE__ */ e("div", { className: "space-y-4", children: N.joinKeyGroups.map((E, F) => /* @__PURE__ */ a(
1107
1107
  "div",
1108
1108
  {
1109
1109
  className: "space-y-3 rounded-md border p-3",
@@ -1125,7 +1125,7 @@ function yo({
1125
1125
  {
1126
1126
  value: E.operator,
1127
1127
  onValueChange: (T) => V(
1128
- v.id,
1128
+ N.id,
1129
1129
  F,
1130
1130
  T
1131
1131
  ),
@@ -1152,7 +1152,7 @@ function yo({
1152
1152
  variant: "ghost",
1153
1153
  size: "sm",
1154
1154
  onClick: () => M(
1155
- v.id,
1155
+ N.id,
1156
1156
  F
1157
1157
  ),
1158
1158
  children: /* @__PURE__ */ e(dn, { className: "h-4 w-4" })
@@ -1172,7 +1172,7 @@ function yo({
1172
1172
  {
1173
1173
  value: T.source.name,
1174
1174
  onValueChange: (U) => A(
1175
- v.id,
1175
+ N.id,
1176
1176
  F,
1177
1177
  j,
1178
1178
  "sourceColumnName",
@@ -1181,7 +1181,7 @@ function yo({
1181
1181
  children: [
1182
1182
  /* @__PURE__ */ e(J, { children: /* @__PURE__ */ e(H, { placeholder: "Source column" }) }),
1183
1183
  /* @__PURE__ */ e(Y, { children: R(
1184
- v.source.name
1184
+ N.source.name
1185
1185
  ).map((U) => /* @__PURE__ */ e(
1186
1186
  B,
1187
1187
  {
@@ -1209,7 +1209,7 @@ function yo({
1209
1209
  {
1210
1210
  value: T.operator,
1211
1211
  onValueChange: (U) => A(
1212
- v.id,
1212
+ N.id,
1213
1213
  F,
1214
1214
  j,
1215
1215
  "operator",
@@ -1267,7 +1267,7 @@ function yo({
1267
1267
  {
1268
1268
  value: T.target.name,
1269
1269
  onValueChange: (U) => A(
1270
- v.id,
1270
+ N.id,
1271
1271
  F,
1272
1272
  j,
1273
1273
  "targetColumnName",
@@ -1276,7 +1276,7 @@ function yo({
1276
1276
  children: [
1277
1277
  /* @__PURE__ */ e(J, { children: /* @__PURE__ */ e(H, { placeholder: "Target column" }) }),
1278
1278
  /* @__PURE__ */ e(Y, { children: R(
1279
- v.target.name
1279
+ N.target.name
1280
1280
  ).map((U) => /* @__PURE__ */ e(
1281
1281
  B,
1282
1282
  {
@@ -1307,7 +1307,7 @@ function yo({
1307
1307
  size: "sm",
1308
1308
  className: "self-center",
1309
1309
  onClick: () => C(
1310
- v.id,
1310
+ N.id,
1311
1311
  F,
1312
1312
  j
1313
1313
  ),
@@ -1325,9 +1325,9 @@ function yo({
1325
1325
  variant: "outline",
1326
1326
  size: "sm",
1327
1327
  className: "mt-2",
1328
- onClick: () => w(v.id, F),
1328
+ onClick: () => w(N.id, F),
1329
1329
  children: [
1330
- /* @__PURE__ */ e(Qe, { className: "mr-1 h-3 w-3" }),
1330
+ /* @__PURE__ */ e(We, { className: "mr-1 h-3 w-3" }),
1331
1331
  " Add Condition"
1332
1332
  ]
1333
1333
  }
@@ -1339,7 +1339,7 @@ function yo({
1339
1339
  )) })
1340
1340
  ] })
1341
1341
  ] })
1342
- ] }, v.id);
1342
+ ] }, N.id);
1343
1343
  }) })
1344
1344
  ] }),
1345
1345
  /* @__PURE__ */ a("div", { className: "flex justify-end gap-2 border-t pt-4", children: [
@@ -1521,11 +1521,11 @@ function ts({
1521
1521
  FROM ${w.name}`;
1522
1522
  return M.forEach((C) => {
1523
1523
  const S = p.find(
1524
- (v) => v.name === C.target.name
1524
+ (N) => N.name === C.target.name
1525
1525
  );
1526
1526
  if (!S) return;
1527
- const D = C.joinKeyGroups.filter((v) => v.keys && v.keys.length > 0).map((v) => {
1528
- const N = v.keys.filter(
1527
+ const D = C.joinKeyGroups.filter((N) => N.keys && N.keys.length > 0).map((N) => {
1528
+ const v = N.keys.filter(
1529
1529
  (O) => {
1530
1530
  var P, E, F, T;
1531
1531
  return ((P = O.source) == null ? void 0 : P.name) && ((E = O.target) == null ? void 0 : E.name) && ((F = O.source) == null ? void 0 : F.entityName) && ((T = O.target) == null ? void 0 : T.entityName);
@@ -1533,7 +1533,7 @@ FROM ${w.name}`;
1533
1533
  ).map(
1534
1534
  (O) => `${O.source.entityName}.${O.source.name} ${O.operator} ${O.target.entityName}.${O.target.name}`
1535
1535
  );
1536
- return N.length > 1 ? `(${N.join(` ${v.operator} `)})` : N[0];
1536
+ return v.length > 1 ? `(${v.join(` ${N.operator} `)})` : v[0];
1537
1537
  }).filter(Boolean), R = D.length > 1 ? D.join(" OR ") : D[0] || "condition_here";
1538
1538
  A += `
1539
1539
  ${C.joinType} JOIN ${S.name}
@@ -1697,7 +1697,7 @@ function wo({
1697
1697
  /* @__PURE__ */ e(ea, { className: "h-64", children: /* @__PURE__ */ e("div", { className: "space-y-2", children: l.map((m, h) => /* @__PURE__ */ a(
1698
1698
  "div",
1699
1699
  {
1700
- className: W(
1700
+ className: Q(
1701
1701
  "flex items-center gap-3 rounded-lg border p-3 transition-colors hover:bg-muted/50",
1702
1702
  k(m) && "border-primary bg-primary/5"
1703
1703
  ),
@@ -1811,7 +1811,7 @@ function nl({
1811
1811
  return /* @__PURE__ */ a(
1812
1812
  "div",
1813
1813
  {
1814
- className: W(
1814
+ className: Q(
1815
1815
  "flex flex-col overflow-hidden bg-background transition-all duration-300 ease-in-out",
1816
1816
  {
1817
1817
  "w-[325px]": t,
@@ -1834,7 +1834,7 @@ function nl({
1834
1834
  /* @__PURE__ */ a(
1835
1835
  "div",
1836
1836
  {
1837
- className: W(
1837
+ className: Q(
1838
1838
  "flex cursor-pointer items-center justify-between px-6 pt-3",
1839
1839
  !l && "pb-3"
1840
1840
  ),
@@ -1892,7 +1892,7 @@ function nl({
1892
1892
  /* @__PURE__ */ a(
1893
1893
  "div",
1894
1894
  {
1895
- className: W(
1895
+ className: Q(
1896
1896
  "overflow-hidden transition-all duration-200 ease-in-out",
1897
1897
  l ? "max-h-0 opacity-0" : "max-h-96 opacity-100"
1898
1898
  ),
@@ -1959,7 +1959,7 @@ function On({
1959
1959
  return /* @__PURE__ */ e(
1960
1960
  "div",
1961
1961
  {
1962
- className: W(
1962
+ className: Q(
1963
1963
  "rounded-lg border border-destructive/30 bg-destructive/5 p-4",
1964
1964
  o
1965
1965
  ),
@@ -2093,7 +2093,7 @@ function sl({
2093
2093
  size: "sm",
2094
2094
  className: "h-6 w-6 p-0",
2095
2095
  onClick: () => u(!1),
2096
- children: /* @__PURE__ */ e(Qs, { className: "h-4 w-4" })
2096
+ children: /* @__PURE__ */ e(Ws, { className: "h-4 w-4" })
2097
2097
  }
2098
2098
  )
2099
2099
  ] }),
@@ -2164,7 +2164,7 @@ function So({
2164
2164
  onDebugWithAssistant: r
2165
2165
  }) {
2166
2166
  return /* @__PURE__ */ a(ka, { openDelay: s ? 0 : 500, children: [
2167
- /* @__PURE__ */ e(Ta, { asChild: !0, children: /* @__PURE__ */ e(K, { variant: "link", className: "h-5 p-0", children: s ? /* @__PURE__ */ e(Qs, { className: "h-4 w-4 text-red-500" }) : /* @__PURE__ */ e(pt, { className: "h-4 w-4 text-muted-foreground" }) }) }),
2167
+ /* @__PURE__ */ e(Ta, { asChild: !0, children: /* @__PURE__ */ e(K, { variant: "link", className: "h-5 p-0", children: s ? /* @__PURE__ */ e(Ws, { className: "h-4 w-4 text-red-500" }) : /* @__PURE__ */ e(pt, { className: "h-4 w-4 text-muted-foreground" }) }) }),
2168
2168
  /* @__PURE__ */ e(Aa, { align: "start", className: "flex w-[700px]", children: /* @__PURE__ */ e(
2169
2169
  sl,
2170
2170
  {
@@ -2346,8 +2346,8 @@ function Eo() {
2346
2346
  (z) => z.actions.setIsSqlRunning
2347
2347
  ), {
2348
2348
  data: R,
2349
- isLoading: v,
2350
- isFetching: N,
2349
+ isLoading: N,
2350
+ isFetching: v,
2351
2351
  isSuccess: O,
2352
2352
  isError: P,
2353
2353
  error: E,
@@ -2365,10 +2365,10 @@ function Eo() {
2365
2365
  p(z);
2366
2366
  }
2367
2367
  }, [R, p, h]), ue(() => {
2368
- (v || N) && D(!0), (P || O) && D(!1), P && (p([]), h(""));
2368
+ (N || v) && D(!0), (P || O) && D(!1), P && (p([]), h(""));
2369
2369
  }, [
2370
- v,
2371
2370
  N,
2371
+ v,
2372
2372
  R,
2373
2373
  h,
2374
2374
  P,
@@ -2388,7 +2388,7 @@ function Eo() {
2388
2388
  }
2389
2389
  ae.current();
2390
2390
  }, [u]);
2391
- async function Q() {
2391
+ async function W() {
2392
2392
  const z = `Can you help me debug this query?
2393
2393
 
2394
2394
  Error:
@@ -2475,14 +2475,14 @@ ${c}` : ""}
2475
2475
  K,
2476
2476
  {
2477
2477
  title: "Shift + Enter",
2478
- disabled: v || N,
2478
+ disabled: N || v,
2479
2479
  onClick: () => {
2480
2480
  j();
2481
2481
  },
2482
2482
  className: "h-8 shrink-0",
2483
2483
  size: "sm",
2484
2484
  children: [
2485
- v || N ? /* @__PURE__ */ e(qt, { className: "mr-2 h-4 w-4 animate-spin" }) : /* @__PURE__ */ e(Fl, { className: "mr-2 h-4 w-4" }),
2485
+ N || v ? /* @__PURE__ */ e(qt, { className: "mr-2 h-4 w-4 animate-spin" }) : /* @__PURE__ */ e(Fl, { className: "mr-2 h-4 w-4" }),
2486
2486
  "Run"
2487
2487
  ]
2488
2488
  }
@@ -2493,7 +2493,7 @@ ${c}` : ""}
2493
2493
  errorSql: F,
2494
2494
  sql: R == null ? void 0 : R.sql,
2495
2495
  error: U,
2496
- onDebugWithAssistant: Q
2496
+ onDebugWithAssistant: W
2497
2497
  }
2498
2498
  ),
2499
2499
  /* @__PURE__ */ e(En, {}),
@@ -2648,7 +2648,7 @@ function Oo({ className: t }) {
2648
2648
  o(f);
2649
2649
  }
2650
2650
  };
2651
- return /* @__PURE__ */ e("div", { className: W("flex items-center", t), children: /* @__PURE__ */ e(
2651
+ return /* @__PURE__ */ e("div", { className: Q("flex items-center", t), children: /* @__PURE__ */ e(
2652
2652
  ca,
2653
2653
  {
2654
2654
  value: s.type,
@@ -2669,7 +2669,7 @@ function Oo({ className: t }) {
2669
2669
  L,
2670
2670
  {
2671
2671
  htmlFor: `table-type-${i.value}`,
2672
- className: W(
2672
+ className: Q(
2673
2673
  "flex cursor-pointer items-center gap-1.5 rounded-md px-3 py-1 text-sm font-medium transition-all",
2674
2674
  g ? "bg-muted text-foreground shadow-sm" : "text-muted-foreground hover:bg-muted/50"
2675
2675
  ),
@@ -2724,7 +2724,7 @@ function Io({ type: t, isLinked: s, className: n }) {
2724
2724
  ge,
2725
2725
  {
2726
2726
  variant: "outline",
2727
- className: W(
2727
+ className: Q(
2728
2728
  "cursor-help select-none transition-all",
2729
2729
  c[l],
2730
2730
  n
@@ -2736,7 +2736,7 @@ function Io({ type: t, isLinked: s, className: n }) {
2736
2736
  $e,
2737
2737
  {
2738
2738
  side: "bottom",
2739
- className: W("max-w-xs", u[l]),
2739
+ className: Q("max-w-xs", u[l]),
2740
2740
  children: [
2741
2741
  /* @__PURE__ */ e(Vl, { className: g[l] }),
2742
2742
  /* @__PURE__ */ e("p", { children: i[l] })
@@ -2751,8 +2751,8 @@ function rl({
2751
2751
  className: t,
2752
2752
  ...s
2753
2753
  }) {
2754
- var Q, X, te;
2755
- const n = I((z) => z.card), r = ((Q = n.customCardPreferences) == null ? void 0 : Q.showCardHeader) ?? !0, o = ((te = (X = n.preferences) == null ? void 0 : X.displayOptions) == null ? void 0 : te.showInlineFilterBar) ?? !0, d = I((z) => z.frame), l = Ce((z) => z.dashboard.filters), c = Ce((z) => z.selectedSheetId), [i, u] = q(!1), { currentUser: g } = Bl(), { tokenProps: f } = An(gn), p = I((z) => z.actions.setRunSql), { updateFilter: k } = Es(), m = l == null ? void 0 : l.find((z) => z.id === d.filterId), { data: h, isLoading: x, isFetching: b, errorMessage: y, errorSql: V, pagination: M } = Le(n), w = we(() => (h == null ? void 0 : h.records) || [], [h == null ? void 0 : h.records]), { setCard: A, updateCardInFrame: C, setIsDevMode: S, setCardSql: D } = ne(), { data: R } = xn(n), v = we(() => {
2754
+ var W, X, te;
2755
+ const n = I((z) => z.card), r = ((W = n.customCardPreferences) == null ? void 0 : W.showCardHeader) ?? !0, o = ((te = (X = n.preferences) == null ? void 0 : X.displayOptions) == null ? void 0 : te.showInlineFilterBar) ?? !0, d = I((z) => z.frame), l = Ce((z) => z.dashboard.filters), c = Ce((z) => z.selectedSheetId), [i, u] = q(!1), { currentUser: g } = Bl(), { tokenProps: f } = An(gn), p = I((z) => z.actions.setRunSql), { updateFilter: k } = Es(), m = l == null ? void 0 : l.find((z) => z.id === d.filterId), { data: h, isLoading: x, isFetching: b, errorMessage: y, errorSql: V, pagination: M } = Le(n), w = we(() => (h == null ? void 0 : h.records) || [], [h == null ? void 0 : h.records]), { setCard: A, updateCardInFrame: C, setIsDevMode: S, setCardSql: D } = ne(), { data: R } = xn(n), N = we(() => {
2756
2756
  var z;
2757
2757
  return n.type !== "pivotTable" || !((z = h == null ? void 0 : h.records) != null && z.length) ? null : {
2758
2758
  records: h.records,
@@ -2768,7 +2768,7 @@ function rl({
2768
2768
  h == null ? void 0 : h.subtotalColumns,
2769
2769
  h == null ? void 0 : h.pivotSchema,
2770
2770
  h == null ? void 0 : h.groupByColumns
2771
- ]), N = zl(n, v), O = (z) => {
2771
+ ]), v = zl(n, N), O = (z) => {
2772
2772
  S(!0), D(z || V || n.sql || n.python || ""), setTimeout(() => {
2773
2773
  p(!0);
2774
2774
  }, 100);
@@ -2808,7 +2808,7 @@ function rl({
2808
2808
  A($), C($), n.sql && ((oe = (ie = n.preferences) == null ? void 0 : ie.tablePrefs) != null && oe.enableDevModePagination) && p(!0);
2809
2809
  }, T = (z) => {
2810
2810
  var ie, oe, pe, se;
2811
- const ee = vn(
2811
+ const ee = Nn(
2812
2812
  z,
2813
2813
  (ie = n.config) == null ? void 0 : ie.metricColumns,
2814
2814
  (oe = n.config) == null ? void 0 : oe.groupByColumns
@@ -2882,13 +2882,13 @@ function rl({
2882
2882
  isLoading: x || b
2883
2883
  }
2884
2884
  ) });
2885
- if (n.type === "pivotTable" && N)
2885
+ if (n.type === "pivotTable" && v)
2886
2886
  return /* @__PURE__ */ e("div", { className: "relative mb-2 flex h-full min-h-0 w-full flex-1 grow basis-0", children: /* @__PURE__ */ e(
2887
2887
  Ul,
2888
2888
  {
2889
2889
  card: n,
2890
- data: N.data,
2891
- options: N.options,
2890
+ data: v.data,
2891
+ options: v.options,
2892
2892
  onAggregationChange: (z) => {
2893
2893
  const ee = qn(
2894
2894
  z,
@@ -2930,14 +2930,14 @@ function rl({
2930
2930
  wa,
2931
2931
  {
2932
2932
  role: "editor-visual-card",
2933
- className: W("relative flex h-full flex-col rounded-none", t),
2933
+ className: Q("relative flex h-full flex-col rounded-none", t),
2934
2934
  ...s,
2935
2935
  children: [
2936
2936
  (x || b) && (h == null ? void 0 : h.records) && h.records.length > 0 && /* @__PURE__ */ e("div", { className: "absolute inset-0 z-50 flex items-center justify-center bg-background/50", children: /* @__PURE__ */ e(ba, { size: "md", color: "muted", "aria-label": "Loading data" }) }),
2937
2937
  r && /* @__PURE__ */ a(bs, { className: "flex flex-row items-start justify-between py-4", children: [
2938
2938
  /* @__PURE__ */ a("div", { className: "flex-1", children: [
2939
2939
  /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
2940
- /* @__PURE__ */ e(vs, { className: "text-base", children: /* @__PURE__ */ e(
2940
+ /* @__PURE__ */ e(Ns, { className: "text-base", children: /* @__PURE__ */ e(
2941
2941
  qa,
2942
2942
  {
2943
2943
  value: n.title,
@@ -2993,7 +2993,7 @@ function rl({
2993
2993
  }
2994
2994
  );
2995
2995
  }
2996
- const Qa = ({
2996
+ const Wa = ({
2997
2997
  language: t,
2998
2998
  value: s,
2999
2999
  onChange: n,
@@ -3052,7 +3052,7 @@ const Qa = ({
3052
3052
  value: "final-config",
3053
3053
  className: "mt-0 grow rounded-b border border-t-0",
3054
3054
  children: /* @__PURE__ */ e(
3055
- Qa,
3055
+ Wa,
3056
3056
  {
3057
3057
  language: "json",
3058
3058
  value: n,
@@ -3067,7 +3067,7 @@ const Qa = ({
3067
3067
  value: "custom-config",
3068
3068
  className: "mt-0 grow rounded-b border border-t-0",
3069
3069
  children: /* @__PURE__ */ e(
3070
- Qa,
3070
+ Wa,
3071
3071
  {
3072
3072
  readonly: !0,
3073
3073
  language: "json",
@@ -3084,7 +3084,7 @@ const Qa = ({
3084
3084
  value: "custom-code",
3085
3085
  className: "mt-0 grow rounded-b border border-t-0",
3086
3086
  children: /* @__PURE__ */ e(
3087
- Qa,
3087
+ Wa,
3088
3088
  {
3089
3089
  language: "javascript",
3090
3090
  value: t,
@@ -3136,7 +3136,7 @@ function Fo() {
3136
3136
  });
3137
3137
  if (w) {
3138
3138
  r(b(w)), c(((C = g.preferences) == null ? void 0 : C.customVisualCode) || "");
3139
- const S = Ql(w, f);
3139
+ const S = Wl(w, f);
3140
3140
  d(b(S));
3141
3141
  }
3142
3142
  }, V = () => {
@@ -3161,7 +3161,7 @@ function Fo() {
3161
3161
  tooltip: "Customize Visual",
3162
3162
  onClick: y,
3163
3163
  className: M ? "" : "text-green-600 hover:text-green-700",
3164
- children: /* @__PURE__ */ e(Wl, { className: "h-4 w-4" })
3164
+ children: /* @__PURE__ */ e(Ql, { className: "h-4 w-4" })
3165
3165
  }
3166
3166
  ) }),
3167
3167
  /* @__PURE__ */ a(kt, { className: "flex h-[600px] grow flex-col overflow-auto sm:min-w-[900px] lg:min-w-[1200px]", children: [
@@ -3202,7 +3202,7 @@ function Po({ isStarred: t, onClick: s, className: n }) {
3202
3202
  onClick: (o) => {
3203
3203
  o.stopPropagation(), o.preventDefault(), s(o);
3204
3204
  },
3205
- className: W(
3205
+ className: Q(
3206
3206
  "flex items-center justify-center rounded-sm p-0.5 transition-all",
3207
3207
  "hover:bg-muted/80",
3208
3208
  n
@@ -3211,7 +3211,7 @@ function Po({ isStarred: t, onClick: s, className: n }) {
3211
3211
  children: /* @__PURE__ */ e(
3212
3212
  Zl,
3213
3213
  {
3214
- className: W(
3214
+ className: Q(
3215
3215
  "h-3.5 w-3.5 transition-colors",
3216
3216
  t ? "fill-yellow-400 text-yellow-400" : "text-muted-foreground hover:text-foreground"
3217
3217
  )
@@ -3234,7 +3234,7 @@ function ns({
3234
3234
  "button",
3235
3235
  {
3236
3236
  onClick: l,
3237
- className: W(
3237
+ className: Q(
3238
3238
  "group relative flex flex-col items-center gap-2 rounded-lg border border-border",
3239
3239
  "bg-background p-3 transition-all",
3240
3240
  "hover:border-primary/50 hover:bg-muted/50 hover:shadow-sm"
@@ -3243,7 +3243,7 @@ function ns({
3243
3243
  d && /* @__PURE__ */ e(
3244
3244
  "div",
3245
3245
  {
3246
- className: W(
3246
+ className: Q(
3247
3247
  "absolute left-1 top-1 transition-opacity",
3248
3248
  o ? "opacity-100" : "opacity-0 group-hover:opacity-100"
3249
3249
  ),
@@ -3426,7 +3426,7 @@ function ol({
3426
3426
  }
3427
3427
  ) }),
3428
3428
  /* @__PURE__ */ e(
3429
- We,
3429
+ Qe,
3430
3430
  {
3431
3431
  onOpenAutoFocus: (c) => c.preventDefault(),
3432
3432
  className: "z-[70] w-[360px] p-3",
@@ -3520,18 +3520,18 @@ function Bo() {
3520
3520
  const i = t ?? "x";
3521
3521
  return /* @__PURE__ */ e(Ie, { onClick: () => {
3522
3522
  o(i === "x" ? "y" : "x");
3523
- }, tooltip: "Chart Orientation", children: i === "x" ? /* @__PURE__ */ e(Wa, { className: "size-4" }) : /* @__PURE__ */ e(Ya, { className: "size-4" }) });
3523
+ }, tooltip: "Chart Orientation", children: i === "x" ? /* @__PURE__ */ e(Qa, { className: "size-4" }) : /* @__PURE__ */ e(Ya, { className: "size-4" }) });
3524
3524
  }
3525
3525
  function l() {
3526
3526
  return /* @__PURE__ */ e(Ie, { onClick: () => {
3527
3527
  o(t === "y" || t === void 0 ? "x" : "y");
3528
- }, tooltip: "Chart Orientation", children: t === "y" || t === void 0 ? /* @__PURE__ */ e(Wa, { className: "size-4" }) : /* @__PURE__ */ e(Ya, { className: "size-4" }) });
3528
+ }, tooltip: "Chart Orientation", children: t === "y" || t === void 0 ? /* @__PURE__ */ e(Qa, { className: "size-4" }) : /* @__PURE__ */ e(Ya, { className: "size-4" }) });
3529
3529
  }
3530
3530
  function c() {
3531
3531
  const i = t ?? "y";
3532
3532
  return /* @__PURE__ */ e(Ie, { onClick: () => {
3533
3533
  o(i === "y" ? "x" : "y");
3534
- }, tooltip: "Chart Orientation", children: i === "y" ? /* @__PURE__ */ e(Ya, { className: "size-4" }) : /* @__PURE__ */ e(Wa, { className: "size-4" }) });
3534
+ }, tooltip: "Chart Orientation", children: i === "y" ? /* @__PURE__ */ e(Ya, { className: "size-4" }) : /* @__PURE__ */ e(Qa, { className: "size-4" }) });
3535
3535
  }
3536
3536
  return /* @__PURE__ */ e(de, { children: s === "funnel" ? l() : s === "bullet" ? c() : d() });
3537
3537
  }
@@ -3540,11 +3540,11 @@ function zo({
3540
3540
  }) {
3541
3541
  var k, m, h, x, b, y, V, M, w, A;
3542
3542
  const s = I((C) => C.card), { setCardPreferences: n, updateCardInFrame: r, setCard: o } = ne(), [d, l] = q(!1), c = ((m = (k = s.preferences) == null ? void 0 : k.displayOptions) == null ? void 0 : m.showFilterInfo) ?? !0, i = ((x = (h = s.preferences) == null ? void 0 : h.displayOptions) == null ? void 0 : x.showCardToolbar) ?? !0, u = ((y = (b = s.preferences) == null ? void 0 : b.displayOptions) == null ? void 0 : y.showChrome) ?? !0, g = ((M = (V = s.preferences) == null ? void 0 : V.displayOptions) == null ? void 0 : M.allowScroll) ?? !0, f = ((A = (w = s.preferences) == null ? void 0 : w.displayOptions) == null ? void 0 : A.showInlineFilterBar) ?? !0, p = (C, S) => {
3543
- var v;
3543
+ var N;
3544
3544
  const D = {
3545
3545
  ...s.preferences,
3546
3546
  displayOptions: {
3547
- ...(v = s.preferences) == null ? void 0 : v.displayOptions,
3547
+ ...(N = s.preferences) == null ? void 0 : N.displayOptions,
3548
3548
  [C]: S
3549
3549
  }
3550
3550
  };
@@ -3552,7 +3552,7 @@ function zo({
3552
3552
  const R = { ...s, preferences: D };
3553
3553
  o(R), r(R);
3554
3554
  };
3555
- return /* @__PURE__ */ e("div", { className: W("flex items-center", t), children: /* @__PURE__ */ a(Nn, { modal: !1, open: d, onOpenChange: l, children: [
3555
+ return /* @__PURE__ */ e("div", { className: Q("flex items-center", t), children: /* @__PURE__ */ a(vn, { modal: !1, open: d, onOpenChange: l, children: [
3556
3556
  /* @__PURE__ */ e(yn, { asChild: !0, children: /* @__PURE__ */ e(
3557
3557
  Ie,
3558
3558
  {
@@ -3713,7 +3713,7 @@ function jo() {
3713
3713
  Ie,
3714
3714
  {
3715
3715
  tooltip: "Add Inline Filter",
3716
- className: W("relative", {
3716
+ className: Q("relative", {
3717
3717
  "text-primary": l.length > 0
3718
3718
  }),
3719
3719
  children: [
@@ -3722,7 +3722,7 @@ function jo() {
3722
3722
  ]
3723
3723
  }
3724
3724
  ) }),
3725
- /* @__PURE__ */ e(We, { align: "end", className: "w-80 p-0", children: /* @__PURE__ */ a("div", { className: "flex flex-col", children: [
3725
+ /* @__PURE__ */ e(Qe, { align: "end", className: "w-80 p-0", children: /* @__PURE__ */ a("div", { className: "flex flex-col", children: [
3726
3726
  /* @__PURE__ */ a("div", { className: "border-b px-4 py-3", children: [
3727
3727
  /* @__PURE__ */ e("h4", { className: "text-sm font-medium", children: "Inline Filters" }),
3728
3728
  /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: "On-card filters for fast, focused exploration." })
@@ -3970,7 +3970,7 @@ function qo() {
3970
3970
  tooltip: "Add Card",
3971
3971
  className: "ml-1 h-8 px-2 hover:bg-muted-foreground/50",
3972
3972
  onClick: () => p(s),
3973
- children: /* @__PURE__ */ e(Qe, { className: "h-4 w-4" })
3973
+ children: /* @__PURE__ */ e(We, { className: "h-4 w-4" })
3974
3974
  }
3975
3975
  )
3976
3976
  ] }) });
@@ -4033,7 +4033,7 @@ function on() {
4033
4033
  function ls({
4034
4034
  children: t
4035
4035
  }) {
4036
- const s = I((N) => N.frame), n = I((N) => N.card), r = I((N) => N.isDevMode), o = I((N) => N.isShowingVisual), d = Ce((N) => N.isVisualEditing), l = I((N) => N.pythonStdOut), c = I((N) => N.actions.setRunSql), {
4036
+ const s = I((v) => v.frame), n = I((v) => v.card), r = I((v) => v.isDevMode), o = I((v) => v.isShowingVisual), d = Ce((v) => v.isVisualEditing), l = I((v) => v.pythonStdOut), c = I((v) => v.actions.setRunSql), {
4037
4037
  setFrame: i,
4038
4038
  setCard: u,
4039
4039
  setActiveTabCardId: g,
@@ -4044,12 +4044,12 @@ function ls({
4044
4044
  ue(() => {
4045
4045
  x || A(!1);
4046
4046
  }, [x]);
4047
- function C(N, O) {
4047
+ function C(v, O) {
4048
4048
  var F, T;
4049
4049
  const P = {
4050
4050
  ...n,
4051
4051
  paginationConfig: {
4052
- page: N + 1,
4052
+ page: v + 1,
4053
4053
  // Convert to 1-based
4054
4054
  pageSize: O
4055
4055
  }
@@ -4061,10 +4061,10 @@ function ls({
4061
4061
  };
4062
4062
  i(E), n.sql && ((T = (F = n.preferences) == null ? void 0 : F.tablePrefs) != null && T.enableDevModePagination) && c(!0);
4063
4063
  }
4064
- function S(N) {
4064
+ function S(v) {
4065
4065
  var F, T, j, U;
4066
- const O = vn(
4067
- N,
4066
+ const O = Nn(
4067
+ v,
4068
4068
  (F = n.config) == null ? void 0 : F.metricColumns,
4069
4069
  (T = n.config) == null ? void 0 : T.groupByColumns
4070
4070
  ), P = {
@@ -4082,7 +4082,7 @@ function ls({
4082
4082
  i(E), n.sql && ((U = (j = n.preferences) == null ? void 0 : j.tablePrefs) != null && U.enableDevModePagination) && c(!0);
4083
4083
  }
4084
4084
  function D() {
4085
- const N = JSON.stringify(m == null ? void 0 : m.records, null, 2), O = new Blob([N], { type: "application/json" }), P = URL.createObjectURL(O), E = document.createElement("a");
4085
+ const v = JSON.stringify(m == null ? void 0 : m.records, null, 2), O = new Blob([v], { type: "application/json" }), P = URL.createObjectURL(O), E = document.createElement("a");
4086
4086
  E.href = P, E.download = `${n.title}.json`, E.click();
4087
4087
  }
4088
4088
  function R() {
@@ -4095,9 +4095,9 @@ function ls({
4095
4095
  `), P = new Blob([O], { type: "text/csv" }), E = URL.createObjectURL(P), F = document.createElement("a");
4096
4096
  F.href = E, F.download = `${n.title}.csv`, F.click();
4097
4097
  }
4098
- function v() {
4099
- const N = `Can you get the documentation for ${n.type} chart?`;
4100
- f(N);
4098
+ function N() {
4099
+ const v = `Can you get the documentation for ${n.type} chart?`;
4100
+ f(v);
4101
4101
  }
4102
4102
  return n ? /* @__PURE__ */ a(
4103
4103
  "div",
@@ -4111,7 +4111,7 @@ function ls({
4111
4111
  children: [
4112
4112
  o && /* @__PURE__ */ a("div", { className: "flex grow items-center", children: [
4113
4113
  /* @__PURE__ */ e(ol, {}),
4114
- d && /* @__PURE__ */ e(Ie, { tooltip: "Visual Docs", onClick: v, children: /* @__PURE__ */ e(Wi, { className: "size-4" }) }),
4114
+ d && /* @__PURE__ */ e(Ie, { tooltip: "Visual Docs", onClick: N, children: /* @__PURE__ */ e(Qi, { className: "size-4" }) }),
4115
4115
  !["table", "custom"].includes(n.type) && d && /* @__PURE__ */ e(Fo, {})
4116
4116
  ] }),
4117
4117
  !o && /* @__PURE__ */ a("div", { className: "flex grow items-center gap-1", children: [
@@ -4156,7 +4156,7 @@ function ls({
4156
4156
  children: /* @__PURE__ */ e(
4157
4157
  Fs,
4158
4158
  {
4159
- className: W("h-4 w-4", {
4159
+ className: Q("h-4 w-4", {
4160
4160
  "animate-spin": w
4161
4161
  })
4162
4162
  }
@@ -4195,7 +4195,7 @@ function ls({
4195
4195
  id: "2",
4196
4196
  order: 2,
4197
4197
  minSize: 10,
4198
- className: W(
4198
+ className: Q(
4199
4199
  "relative flex h-full min-h-0 w-full flex-1 basis-0",
4200
4200
  {
4201
4201
  "px-6": l
@@ -4311,7 +4311,7 @@ function at({
4311
4311
  /* @__PURE__ */ e(
4312
4312
  J,
4313
4313
  {
4314
- className: W("w-full focus:ring-0 focus:ring-offset-0", d),
4314
+ className: Q("w-full focus:ring-0 focus:ring-offset-0", d),
4315
4315
  children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
4316
4316
  l && /* @__PURE__ */ e("span", { children: l }),
4317
4317
  c && /* @__PURE__ */ e(H, { placeholder: s })
@@ -4462,13 +4462,13 @@ function dl() {
4462
4462
  className: "",
4463
4463
  children: [
4464
4464
  /* @__PURE__ */ a(be, { value: "plugin-settings", children: [
4465
- /* @__PURE__ */ e(ve, { children: "Plugin" }),
4466
- /* @__PURE__ */ e(Ne, { children: /* @__PURE__ */ a("div", { className: "space-y-4 text-sm", children: [
4465
+ /* @__PURE__ */ e(Ne, { children: "Plugin" }),
4466
+ /* @__PURE__ */ e(ve, { children: /* @__PURE__ */ a("div", { className: "space-y-4 text-sm", children: [
4467
4467
  /* @__PURE__ */ e("div", { className: "space-y-2", children: /* @__PURE__ */ a("div", { className: "space-y-4", children: [
4468
4468
  /* @__PURE__ */ e(
4469
4469
  at,
4470
4470
  {
4471
- icon: /* @__PURE__ */ e(Ws, { className: "h-3.5 w-3.5" }),
4471
+ icon: /* @__PURE__ */ e(Qs, { className: "h-3.5 w-3.5" }),
4472
4472
  className: "h-9 w-full",
4473
4473
  label: "Select Plugin",
4474
4474
  options: n,
@@ -4497,7 +4497,7 @@ function dl() {
4497
4497
  ((t == null ? void 0 : t.type) === "component" || (t == null ? void 0 : t.type) === void 0) && t && /* @__PURE__ */ e(de, { children: c && /* @__PURE__ */ e(
4498
4498
  at,
4499
4499
  {
4500
- icon: /* @__PURE__ */ e(Qi, { className: "h-3.5 w-3.5" }),
4500
+ icon: /* @__PURE__ */ e(Wi, { className: "h-3.5 w-3.5" }),
4501
4501
  className: "h-9 w-full",
4502
4502
  label: "Select Component",
4503
4503
  options: (c == null ? void 0 : c.filter((b) => b.type === d).map((b) => ({
@@ -4516,7 +4516,7 @@ function dl() {
4516
4516
  ] }) })
4517
4517
  ] }),
4518
4518
  ((x = r == null ? void 0 : r.customCardPreferences) == null ? void 0 : x.componentName) && /* @__PURE__ */ a(be, { className: "border-none", value: "component-settings", children: [
4519
- /* @__PURE__ */ e(ve, { children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
4519
+ /* @__PURE__ */ e(Ne, { children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
4520
4520
  /* @__PURE__ */ e("span", { children: (u == null ? void 0 : u.name) || "Settings" }),
4521
4521
  (u == null ? void 0 : u.docs) && /* @__PURE__ */ a(ka, { openDelay: 0, closeDelay: 100, children: [
4522
4522
  /* @__PURE__ */ e(
@@ -4567,7 +4567,7 @@ function dl() {
4567
4567
  )
4568
4568
  ] })
4569
4569
  ] }) }),
4570
- /* @__PURE__ */ a(Ne, { children: [
4570
+ /* @__PURE__ */ a(ve, { children: [
4571
4571
  u && u.dataInputs && /* @__PURE__ */ a("div", { className: "space-y-3", children: [
4572
4572
  /* @__PURE__ */ e(L, { children: "Input Mapping" }),
4573
4573
  /* @__PURE__ */ e("div", { className: "px-2", children: f(u) })
@@ -4611,7 +4611,7 @@ function _o({
4611
4611
  onClick: d,
4612
4612
  variant: "secondary",
4613
4613
  className: "h-5 p-1 text-muted-foreground",
4614
- children: /* @__PURE__ */ e(Qe, { className: "size-3" })
4614
+ children: /* @__PURE__ */ e(We, { className: "size-3" })
4615
4615
  }
4616
4616
  )
4617
4617
  ] }),
@@ -4621,7 +4621,7 @@ function _o({
4621
4621
  {
4622
4622
  onChange: (i) => r(c, "start", i.target.value),
4623
4623
  value: l.start,
4624
- className: W(`h-7 ${ct}`)
4624
+ className: Q(`h-7 ${ct}`)
4625
4625
  }
4626
4626
  ),
4627
4627
  /* @__PURE__ */ e("span", { children: "-" }),
@@ -4630,7 +4630,7 @@ function _o({
4630
4630
  {
4631
4631
  value: l.end,
4632
4632
  onChange: (i) => r(c, "end", i.target.value),
4633
- className: W(`h-7 ${ct}`)
4633
+ className: Q(`h-7 ${ct}`)
4634
4634
  }
4635
4635
  ),
4636
4636
  /* @__PURE__ */ e(
@@ -4638,7 +4638,7 @@ function _o({
4638
4638
  {
4639
4639
  onChange: (i) => r(c, "color", i.target.value),
4640
4640
  value: l.color,
4641
- className: W(`h-7 min-w-14 p-0 ${ct}`),
4641
+ className: Q(`h-7 min-w-14 p-0 ${ct}`),
4642
4642
  type: "color",
4643
4643
  list: "presetColors"
4644
4644
  }
@@ -5134,7 +5134,7 @@ function Yo({
5134
5134
  )
5135
5135
  ] }) : null;
5136
5136
  }
5137
- function Wo({
5137
+ function Qo({
5138
5138
  chartType: t
5139
5139
  }) {
5140
5140
  return In(t) ? /* @__PURE__ */ a(ka, { openDelay: 200, children: [
@@ -5169,10 +5169,10 @@ function za({
5169
5169
  " ",
5170
5170
  s
5171
5171
  ] }),
5172
- /* @__PURE__ */ e(Wo, { chartType: t })
5172
+ /* @__PURE__ */ e(Qo, { chartType: t })
5173
5173
  ] });
5174
5174
  }
5175
- function Qo() {
5175
+ function Wo() {
5176
5176
  return /* @__PURE__ */ a("div", { className: "space-y-6 px-6 py-4", children: [
5177
5177
  /* @__PURE__ */ e(za, { chartType: "kpi" }),
5178
5178
  /* @__PURE__ */ e("section", { children: /* @__PURE__ */ e(Jo, {}) })
@@ -5188,7 +5188,7 @@ function rs({
5188
5188
  "details",
5189
5189
  {
5190
5190
  open: n,
5191
- className: W("space-y-4 [&_summary>svg]:open:-rotate-180", r),
5191
+ className: Q("space-y-4 [&_summary>svg]:open:-rotate-180", r),
5192
5192
  children: [
5193
5193
  /* @__PURE__ */ a("summary", { className: "flex cursor-pointer list-none items-center justify-between gap-4", children: [
5194
5194
  /* @__PURE__ */ e(L, { children: s }),
@@ -5487,11 +5487,11 @@ function tc() {
5487
5487
  value: ((k = (p = t.preferences) == null ? void 0 : p.mapVisualOptions) == null ? void 0 : k.objectKey) || "",
5488
5488
  label: "Map Object",
5489
5489
  onValueChange: (R) => {
5490
- var v;
5490
+ var N;
5491
5491
  o({
5492
5492
  ...t.preferences,
5493
5493
  mapVisualOptions: {
5494
- ...(v = t.preferences) == null ? void 0 : v.mapVisualOptions,
5494
+ ...(N = t.preferences) == null ? void 0 : N.mapVisualOptions,
5495
5495
  objectKey: R
5496
5496
  }
5497
5497
  });
@@ -5509,11 +5509,11 @@ function tc() {
5509
5509
  value: ((h = (m = t.preferences) == null ? void 0 : m.mapVisualOptions) == null ? void 0 : h.projection) || "",
5510
5510
  label: "Projection",
5511
5511
  onValueChange: (R) => {
5512
- var v;
5512
+ var N;
5513
5513
  o({
5514
5514
  ...t.preferences,
5515
5515
  mapVisualOptions: {
5516
- ...(v = t.preferences) == null ? void 0 : v.mapVisualOptions,
5516
+ ...(N = t.preferences) == null ? void 0 : N.mapVisualOptions,
5517
5517
  projection: R
5518
5518
  }
5519
5519
  });
@@ -5531,11 +5531,11 @@ function tc() {
5531
5531
  value: ((b = (x = t.preferences) == null ? void 0 : x.mapVisualOptions) == null ? void 0 : b.colorScale) || "",
5532
5532
  label: "Select Color Scale",
5533
5533
  onValueChange: (R) => {
5534
- var v;
5534
+ var N;
5535
5535
  o({
5536
5536
  ...t.preferences,
5537
5537
  mapVisualOptions: {
5538
- ...(v = t.preferences) == null ? void 0 : v.mapVisualOptions,
5538
+ ...(N = t.preferences) == null ? void 0 : N.mapVisualOptions,
5539
5539
  colorScale: R
5540
5540
  }
5541
5541
  });
@@ -5555,11 +5555,11 @@ function tc() {
5555
5555
  step: 0.1,
5556
5556
  value: ((V = (y = t.preferences) == null ? void 0 : y.mapVisualOptions) == null ? void 0 : V.projectionScale) || 1,
5557
5557
  onChange: (R) => {
5558
- var v;
5558
+ var N;
5559
5559
  o({
5560
5560
  ...t.preferences,
5561
5561
  mapVisualOptions: {
5562
- ...(v = t.preferences) == null ? void 0 : v.mapVisualOptions,
5562
+ ...(N = t.preferences) == null ? void 0 : N.mapVisualOptions,
5563
5563
  projectionScale: Number(R.target.value)
5564
5564
  }
5565
5565
  });
@@ -5575,14 +5575,14 @@ function tc() {
5575
5575
  step: 10,
5576
5576
  value: ((A = (w = (M = t.preferences) == null ? void 0 : M.mapVisualOptions) == null ? void 0 : w.projectionOffset) == null ? void 0 : A[0]) || 0,
5577
5577
  onChange: (R) => {
5578
- var v, N, O, P;
5578
+ var N, v, O, P;
5579
5579
  o({
5580
5580
  ...t.preferences,
5581
5581
  mapVisualOptions: {
5582
- ...(v = t.preferences) == null ? void 0 : v.mapVisualOptions,
5582
+ ...(N = t.preferences) == null ? void 0 : N.mapVisualOptions,
5583
5583
  projectionOffset: [
5584
5584
  Number(R.target.value),
5585
- ((P = (O = (N = t.preferences) == null ? void 0 : N.mapVisualOptions) == null ? void 0 : O.projectionOffset) == null ? void 0 : P[1]) || 0
5585
+ ((P = (O = (v = t.preferences) == null ? void 0 : v.mapVisualOptions) == null ? void 0 : O.projectionOffset) == null ? void 0 : P[1]) || 0
5586
5586
  ]
5587
5587
  }
5588
5588
  });
@@ -5598,13 +5598,13 @@ function tc() {
5598
5598
  step: 10,
5599
5599
  value: ((D = (S = (C = t.preferences) == null ? void 0 : C.mapVisualOptions) == null ? void 0 : S.projectionOffset) == null ? void 0 : D[1]) || 0,
5600
5600
  onChange: (R) => {
5601
- var v, N, O, P;
5601
+ var N, v, O, P;
5602
5602
  o({
5603
5603
  ...t.preferences,
5604
5604
  mapVisualOptions: {
5605
- ...(v = t.preferences) == null ? void 0 : v.mapVisualOptions,
5605
+ ...(N = t.preferences) == null ? void 0 : N.mapVisualOptions,
5606
5606
  projectionOffset: [
5607
- ((P = (O = (N = t.preferences) == null ? void 0 : N.mapVisualOptions) == null ? void 0 : O.projectionOffset) == null ? void 0 : P[0]) || 0,
5607
+ ((P = (O = (v = t.preferences) == null ? void 0 : v.mapVisualOptions) == null ? void 0 : O.projectionOffset) == null ? void 0 : P[0]) || 0,
5608
5608
  Number(R.target.value)
5609
5609
  ]
5610
5610
  }
@@ -5620,7 +5620,7 @@ function tc() {
5620
5620
  function ac() {
5621
5621
  const t = Ce(
5622
5622
  (c) => c.dashboard.filters
5623
- ), s = I((c) => c.frame), { setFrame: n } = ne(), { columns: r } = Vs(), { assignFilter: o } = vr();
5623
+ ), s = I((c) => c.frame), { setFrame: n } = ne(), { columns: r } = Vs(), { assignFilter: o } = Nr();
5624
5624
  function d(c) {
5625
5625
  const i = o(c, "frame");
5626
5626
  n({ ...s, filterId: i });
@@ -5629,7 +5629,7 @@ function ac() {
5629
5629
  return /* @__PURE__ */ a("div", { className: "space-y-3", children: [
5630
5630
  /* @__PURE__ */ e(L, { children: "Card Filter" }),
5631
5631
  /* @__PURE__ */ e(nc, { onSelect: d, columns: r }),
5632
- l && /* @__PURE__ */ e(Nr, { filter: l })
5632
+ l && /* @__PURE__ */ e(vr, { filter: l })
5633
5633
  ] });
5634
5634
  }
5635
5635
  function nc({
@@ -5653,11 +5653,11 @@ function nc({
5653
5653
  ]
5654
5654
  }
5655
5655
  ) }),
5656
- /* @__PURE__ */ e(We, { className: "w-[200px] p-0", children: /* @__PURE__ */ a(Jt, { children: [
5656
+ /* @__PURE__ */ e(Qe, { className: "w-[200px] p-0", children: /* @__PURE__ */ a(Jt, { children: [
5657
5657
  /* @__PURE__ */ e(Ht, { placeholder: "Search column", className: "h-9" }),
5658
5658
  /* @__PURE__ */ a(Yt, { children: [
5659
- /* @__PURE__ */ e(Wt, { children: "No framework found." }),
5660
- /* @__PURE__ */ e(Qt, { children: t == null ? void 0 : t.map((c) => /* @__PURE__ */ a(
5659
+ /* @__PURE__ */ e(Qt, { children: "No framework found." }),
5660
+ /* @__PURE__ */ e(Wt, { children: t == null ? void 0 : t.map((c) => /* @__PURE__ */ a(
5661
5661
  Xt,
5662
5662
  {
5663
5663
  value: c.column_name,
@@ -5670,7 +5670,7 @@ function nc({
5670
5670
  /* @__PURE__ */ e(
5671
5671
  Cr,
5672
5672
  {
5673
- className: W(
5673
+ className: Q(
5674
5674
  "ml-auto h-4 w-4",
5675
5675
  o === c.column_name ? "opacity-100" : "opacity-0"
5676
5676
  )
@@ -5696,8 +5696,8 @@ function sc({
5696
5696
  );
5697
5697
  return /* @__PURE__ */ a("div", { className: "space-y-6 px-6 py-2", children: [
5698
5698
  /* @__PURE__ */ e(_t, { defaultValue: ["item-3"], type: "multiple", children: /* @__PURE__ */ a(be, { value: "item-3", children: [
5699
- /* @__PURE__ */ e(ve, { children: "Click Filters" }),
5700
- /* @__PURE__ */ a(Ne, { className: "space-y-4 px-2", children: [
5699
+ /* @__PURE__ */ e(Ne, { children: "Click Filters" }),
5700
+ /* @__PURE__ */ a(ve, { className: "space-y-4 px-2", children: [
5701
5701
  /* @__PURE__ */ e(ul, {}),
5702
5702
  /* @__PURE__ */ e(ac, {})
5703
5703
  ] })
@@ -5972,14 +5972,14 @@ const cc = [
5972
5972
  // yellow-400
5973
5973
  ];
5974
5974
  function dc() {
5975
- var V, M, w, A, C, S, D, R, v, N;
5975
+ var V, M, w, A, C, S, D, R, N, v;
5976
5976
  const t = I((O) => O.card), s = I((O) => {
5977
5977
  var P;
5978
5978
  return (P = O.card) == null ? void 0 : P.preferences;
5979
5979
  }), { setCardPreferences: n, updateCardInFrame: r } = ne(), { data: o } = Le(t), [d, l] = q({}), [c, i] = q(
5980
5980
  null
5981
5981
  ), [u, g] = q(null), f = we(() => {
5982
- var F, T, j, U, ae, Q, X;
5982
+ var F, T, j, U, ae, W, X;
5983
5983
  if (!(o != null && o.records) || o.records.length === 0) return [];
5984
5984
  const O = (t == null ? void 0 : t.type) === "stackedBar" || (t == null ? void 0 : t.type) === "stackedLine", P = (t == null ? void 0 : t.type) === "bar" || (t == null ? void 0 : t.type) === "line" || (t == null ? void 0 : t.type) === "horizontalBar" || (t == null ? void 0 : t.type) === "bullet" || (t == null ? void 0 : t.type) === "combo" || (t == null ? void 0 : t.type) === "area" || (t == null ? void 0 : t.type) === "stackedArea", E = ((F = t == null ? void 0 : t.config) == null ? void 0 : F.pivotByColumns) && t.config.pivotByColumns.length > 0;
5985
5985
  if ((O || P) && E) {
@@ -6009,7 +6009,7 @@ function dc() {
6009
6009
  return t.config.metricColumns.map(
6010
6010
  (te) => te.alias || te.label || te.name
6011
6011
  );
6012
- if ((X = (Q = t == null ? void 0 : t.config) == null ? void 0 : Q.groupByColumns) != null && X.length) {
6012
+ if ((X = (W = t == null ? void 0 : t.config) == null ? void 0 : W.groupByColumns) != null && X.length) {
6013
6013
  const te = t.config.groupByColumns[0], z = te.label || te.name, ee = /* @__PURE__ */ new Set();
6014
6014
  return o.records.forEach(($) => {
6015
6015
  const ie = $[z];
@@ -6065,12 +6065,12 @@ function dc() {
6065
6065
  ...t,
6066
6066
  preferences: j
6067
6067
  };
6068
- r(U), l((Q) => ({
6069
- ...Q,
6068
+ r(U), l((W) => ({
6069
+ ...W,
6070
6070
  [O]: E
6071
6071
  }));
6072
6072
  };
6073
- if (!f.length || !((t == null ? void 0 : t.type) === "stackedBar" || (t == null ? void 0 : t.type) === "stackedLine" ? ((C = (A = t == null ? void 0 : t.config) == null ? void 0 : A.groupByColumns) == null ? void 0 : C.length) || ((D = (S = t == null ? void 0 : t.config) == null ? void 0 : S.pivotByColumns) == null ? void 0 : D.length) : (v = (R = t == null ? void 0 : t.config) == null ? void 0 : R.groupByColumns) == null ? void 0 : v.length) || ["table", "kpi", "text", "custom", "heatmap"].includes(t.type))
6073
+ if (!f.length || !((t == null ? void 0 : t.type) === "stackedBar" || (t == null ? void 0 : t.type) === "stackedLine" ? ((C = (A = t == null ? void 0 : t.config) == null ? void 0 : A.groupByColumns) == null ? void 0 : C.length) || ((D = (S = t == null ? void 0 : t.config) == null ? void 0 : S.pivotByColumns) == null ? void 0 : D.length) : (N = (R = t == null ? void 0 : t.config) == null ? void 0 : R.groupByColumns) == null ? void 0 : N.length) || ["table", "kpi", "text", "custom", "heatmap"].includes(t.type))
6074
6074
  return null;
6075
6075
  const b = () => {
6076
6076
  const O = {
@@ -6089,13 +6089,13 @@ function dc() {
6089
6089
  f.forEach((F, T) => {
6090
6090
  E[F] = Gn(F, T, void 0);
6091
6091
  }), l(E);
6092
- }, y = Object.keys(((N = s == null ? void 0 : s.colorConfig) == null ? void 0 : N.segments) || {}).length > 0;
6092
+ }, y = Object.keys(((v = s == null ? void 0 : s.colorConfig) == null ? void 0 : v.segments) || {}).length > 0;
6093
6093
  return /* @__PURE__ */ a(be, { value: "colors", className: "border-b-0", children: [
6094
- /* @__PURE__ */ e(ve, { className: "flex w-full items-center gap-2 py-2 text-sm font-medium hover:no-underline", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
6094
+ /* @__PURE__ */ e(Ne, { className: "flex w-full items-center gap-2 py-2 text-sm font-medium hover:no-underline", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
6095
6095
  /* @__PURE__ */ e(uo, { className: "h-4 w-4 text-muted-foreground" }),
6096
6096
  /* @__PURE__ */ e("span", { children: "Colors" })
6097
6097
  ] }) }),
6098
- /* @__PURE__ */ e(Ne, { className: "", children: /* @__PURE__ */ a("div", { className: "space-y-3", children: [
6098
+ /* @__PURE__ */ e(ve, { className: "", children: /* @__PURE__ */ a("div", { className: "space-y-3", children: [
6099
6099
  /* @__PURE__ */ e("div", { className: "space-y-2", children: /* @__PURE__ */ e("div", { className: "flex items-center justify-between", children: y && /* @__PURE__ */ a(
6100
6100
  "button",
6101
6101
  {
@@ -6123,13 +6123,13 @@ function dc() {
6123
6123
  style: { backgroundColor: d[O] }
6124
6124
  }
6125
6125
  ) }),
6126
- /* @__PURE__ */ e(We, { align: "start", className: "w-auto p-3", children: /* @__PURE__ */ a("div", { className: "space-y-2.5", children: [
6126
+ /* @__PURE__ */ e(Qe, { align: "start", className: "w-auto p-3", children: /* @__PURE__ */ a("div", { className: "space-y-2.5", children: [
6127
6127
  /* @__PURE__ */ a("div", { className: "space-y-1", children: [
6128
6128
  /* @__PURE__ */ e("p", { className: "text-xs font-medium text-muted-foreground", children: "Theme Colors" }),
6129
6129
  /* @__PURE__ */ e("div", { className: "grid grid-cols-5 gap-1.5", children: p.slice(0, 10).map((T, j) => /* @__PURE__ */ a(
6130
6130
  "button",
6131
6131
  {
6132
- className: W(
6132
+ className: Q(
6133
6133
  "relative h-5 w-5 rounded border-2 transition-all hover:scale-110",
6134
6134
  d[O] === T ? "border-gray-900" : "border-transparent"
6135
6135
  ),
@@ -6150,7 +6150,7 @@ function dc() {
6150
6150
  /* @__PURE__ */ e("div", { className: "grid grid-cols-5 gap-1.5", children: cc.map((T, j) => /* @__PURE__ */ e(
6151
6151
  "button",
6152
6152
  {
6153
- className: W(
6153
+ className: Q(
6154
6154
  "h-5 w-5 rounded border transition-all hover:scale-110",
6155
6155
  d[O] === T ? "border-2 border-gray-900" : T === "#ffffff" ? "border border-gray-300" : "border border-transparent"
6156
6156
  ),
@@ -6529,55 +6529,55 @@ function Mn({
6529
6529
  }
6530
6530
  function Xa({ axis: t, label: s, type: n, config: r, onChange: o, defaultTitle: d, hidePosition: l }) {
6531
6531
  var k, m, h, x, b, y, V, M, w, A, C, S, D, R;
6532
- const c = (v, N) => {
6532
+ const c = (N, v) => {
6533
6533
  o({
6534
6534
  ...r ?? {},
6535
- [v]: N
6535
+ [N]: v
6536
6536
  });
6537
- }, i = (v, N) => {
6537
+ }, i = (N, v) => {
6538
6538
  var F, T, j, U;
6539
- const O = v === "enabled" && N === !0, P = (F = r == null ? void 0 : r.name) == null ? void 0 : F.text, E = O && !P && d;
6539
+ const O = N === "enabled" && v === !0, P = (F = r == null ? void 0 : r.name) == null ? void 0 : F.text, E = O && !P && d;
6540
6540
  o({
6541
6541
  ...r ?? {},
6542
6542
  name: {
6543
6543
  ...r == null ? void 0 : r.name,
6544
- enabled: v === "enabled" ? N : ((T = r == null ? void 0 : r.name) == null ? void 0 : T.enabled) ?? !1,
6545
- text: v === "text" ? N : E ? d : P,
6546
- fontSize: v === "fontSize" ? N : (j = r == null ? void 0 : r.name) == null ? void 0 : j.fontSize,
6547
- fontWeight: v === "fontWeight" ? N : (U = r == null ? void 0 : r.name) == null ? void 0 : U.fontWeight
6544
+ enabled: N === "enabled" ? v : ((T = r == null ? void 0 : r.name) == null ? void 0 : T.enabled) ?? !1,
6545
+ text: N === "text" ? v : E ? d : P,
6546
+ fontSize: N === "fontSize" ? v : (j = r == null ? void 0 : r.name) == null ? void 0 : j.fontSize,
6547
+ fontWeight: N === "fontWeight" ? v : (U = r == null ? void 0 : r.name) == null ? void 0 : U.fontWeight
6548
6548
  }
6549
6549
  });
6550
- }, u = (v, N) => {
6550
+ }, u = (N, v) => {
6551
6551
  var O, P;
6552
6552
  o({
6553
6553
  ...r ?? {},
6554
6554
  labels: {
6555
- enabled: v === "enabled" ? N : ((O = r == null ? void 0 : r.labels) == null ? void 0 : O.enabled) ?? !0,
6556
- rotation: v === "rotation" ? N : (P = r == null ? void 0 : r.labels) == null ? void 0 : P.rotation
6555
+ enabled: N === "enabled" ? v : ((O = r == null ? void 0 : r.labels) == null ? void 0 : O.enabled) ?? !0,
6556
+ rotation: N === "rotation" ? v : (P = r == null ? void 0 : r.labels) == null ? void 0 : P.rotation
6557
6557
  }
6558
6558
  });
6559
- }, g = (v, N) => {
6559
+ }, g = (N, v) => {
6560
6560
  o({
6561
6561
  ...r ?? {},
6562
6562
  scale: {
6563
6563
  ...r == null ? void 0 : r.scale,
6564
- [v]: N === "" ? "auto" : Number(N)
6564
+ [N]: v === "" ? "auto" : Number(v)
6565
6565
  }
6566
6566
  });
6567
6567
  }, f = t === "x" ? ["auto", "top", "bottom"] : ["auto", "left", "right"], p = ["auto", "0", "45", "90", "-45", "-90"];
6568
6568
  return /* @__PURE__ */ a(be, { value: `${t}-axis`, className: "border-b-0", children: [
6569
6569
  /* @__PURE__ */ a("div", { className: "flex w-full items-center justify-between gap-2", children: [
6570
- /* @__PURE__ */ e(ve, { className: "flex grow items-center justify-between gap-3 py-2 text-sm font-medium hover:no-underline", children: /* @__PURE__ */ e("div", { className: "flex grow items-center justify-between gap-2", children: /* @__PURE__ */ e("span", { children: s }) }) }),
6570
+ /* @__PURE__ */ e(Ne, { className: "flex grow items-center justify-between gap-3 py-2 text-sm font-medium hover:no-underline", children: /* @__PURE__ */ e("div", { className: "flex grow items-center justify-between gap-2", children: /* @__PURE__ */ e("span", { children: s }) }) }),
6571
6571
  /* @__PURE__ */ e(
6572
6572
  Te,
6573
6573
  {
6574
6574
  checked: (r == null ? void 0 : r.enabled) !== !1,
6575
- onCheckedChange: (v) => c("enabled", v),
6576
- onClick: (v) => v.stopPropagation()
6575
+ onCheckedChange: (N) => c("enabled", N),
6576
+ onClick: (N) => N.stopPropagation()
6577
6577
  }
6578
6578
  )
6579
6579
  ] }),
6580
- /* @__PURE__ */ a(Ne, { className: "space-y-4 pt-2", children: [
6580
+ /* @__PURE__ */ a(ve, { className: "space-y-4 pt-2", children: [
6581
6581
  /* @__PURE__ */ a("div", { className: "space-y-2", children: [
6582
6582
  /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
6583
6583
  /* @__PURE__ */ e(
@@ -6585,7 +6585,7 @@ function Xa({ axis: t, label: s, type: n, config: r, onChange: o, defaultTitle:
6585
6585
  {
6586
6586
  id: `${t}-title-enabled`,
6587
6587
  checked: ((k = r == null ? void 0 : r.name) == null ? void 0 : k.enabled) ?? !1,
6588
- onCheckedChange: (v) => i("enabled", v === !0)
6588
+ onCheckedChange: (N) => i("enabled", N === !0)
6589
6589
  }
6590
6590
  ),
6591
6591
  /* @__PURE__ */ e(
@@ -6603,7 +6603,7 @@ function Xa({ axis: t, label: s, type: n, config: r, onChange: o, defaultTitle:
6603
6603
  {
6604
6604
  placeholder: `${s} title`,
6605
6605
  value: ((h = r == null ? void 0 : r.name) == null ? void 0 : h.text) || "",
6606
- onSave: (v) => i("text", v),
6606
+ onSave: (N) => i("text", N),
6607
6607
  className: ""
6608
6608
  }
6609
6609
  ),
@@ -6616,7 +6616,7 @@ function Xa({ axis: t, label: s, type: n, config: r, onChange: o, defaultTitle:
6616
6616
  type: "number",
6617
6617
  placeholder: "12",
6618
6618
  value: String(((x = r == null ? void 0 : r.name) == null ? void 0 : x.fontSize) || 12),
6619
- onSave: (v) => i("fontSize", Number(v) || 12),
6619
+ onSave: (N) => i("fontSize", Number(N) || 12),
6620
6620
  className: ""
6621
6621
  }
6622
6622
  ) })
@@ -6627,7 +6627,7 @@ function Xa({ axis: t, label: s, type: n, config: r, onChange: o, defaultTitle:
6627
6627
  _,
6628
6628
  {
6629
6629
  value: ((b = r == null ? void 0 : r.name) == null ? void 0 : b.fontWeight) || "normal",
6630
- onValueChange: (v) => i("fontWeight", v),
6630
+ onValueChange: (N) => i("fontWeight", N),
6631
6631
  children: [
6632
6632
  /* @__PURE__ */ e(J, { className: "h-7 w-20 text-xs", children: /* @__PURE__ */ e(H, {}) }),
6633
6633
  /* @__PURE__ */ a(Y, { children: [
@@ -6647,10 +6647,10 @@ function Xa({ axis: t, label: s, type: n, config: r, onChange: o, defaultTitle:
6647
6647
  _,
6648
6648
  {
6649
6649
  value: (r == null ? void 0 : r.position) || "auto",
6650
- onValueChange: (v) => c("position", v),
6650
+ onValueChange: (N) => c("position", N),
6651
6651
  children: [
6652
6652
  /* @__PURE__ */ e(J, { className: "h-8 text-xs", children: /* @__PURE__ */ e(H, {}) }),
6653
- /* @__PURE__ */ e(Y, { children: f.map((v) => /* @__PURE__ */ e(B, { value: v, className: "text-xs", children: v === "auto" ? "Auto (Default)" : Be(v) }, v)) })
6653
+ /* @__PURE__ */ e(Y, { children: f.map((N) => /* @__PURE__ */ e(B, { value: N, className: "text-xs", children: N === "auto" ? "Auto (Default)" : Be(N) }, N)) })
6654
6654
  ]
6655
6655
  }
6656
6656
  )
@@ -6662,7 +6662,7 @@ function Xa({ axis: t, label: s, type: n, config: r, onChange: o, defaultTitle:
6662
6662
  Te,
6663
6663
  {
6664
6664
  checked: ((y = r == null ? void 0 : r.labels) == null ? void 0 : y.enabled) !== !1,
6665
- onCheckedChange: (v) => u("enabled", v)
6665
+ onCheckedChange: (N) => u("enabled", N)
6666
6666
  }
6667
6667
  )
6668
6668
  ] }),
@@ -6672,13 +6672,13 @@ function Xa({ axis: t, label: s, type: n, config: r, onChange: o, defaultTitle:
6672
6672
  _,
6673
6673
  {
6674
6674
  value: String(((M = r == null ? void 0 : r.labels) == null ? void 0 : M.rotation) || "auto"),
6675
- onValueChange: (v) => u(
6675
+ onValueChange: (N) => u(
6676
6676
  "rotation",
6677
- v === "auto" ? "auto" : Number(v)
6677
+ N === "auto" ? "auto" : Number(N)
6678
6678
  ),
6679
6679
  children: [
6680
6680
  /* @__PURE__ */ e(J, { className: "h-8 text-xs", children: /* @__PURE__ */ e(H, {}) }),
6681
- /* @__PURE__ */ e(Y, { children: p.map((v) => /* @__PURE__ */ e(B, { value: v, className: "text-xs", children: v === "auto" ? "Auto (Default)" : `${v}°` }, v)) })
6681
+ /* @__PURE__ */ e(Y, { children: p.map((N) => /* @__PURE__ */ e(B, { value: N, className: "text-xs", children: N === "auto" ? "Auto (Default)" : `${N}°` }, N)) })
6682
6682
  ]
6683
6683
  }
6684
6684
  )
@@ -6688,9 +6688,9 @@ function Xa({ axis: t, label: s, type: n, config: r, onChange: o, defaultTitle:
6688
6688
  Mn,
6689
6689
  {
6690
6690
  formatOptions: (r == null ? void 0 : r.formatOptions) || {},
6691
- onFormatOptionsChange: (v) => o({
6691
+ onFormatOptionsChange: (N) => o({
6692
6692
  ...r,
6693
- formatOptions: v
6693
+ formatOptions: N
6694
6694
  }),
6695
6695
  showTitle: !0,
6696
6696
  title: "FORMAT"
@@ -6707,7 +6707,7 @@ function Xa({ axis: t, label: s, type: n, config: r, onChange: o, defaultTitle:
6707
6707
  type: "number",
6708
6708
  placeholder: "auto",
6709
6709
  value: ((w = r == null ? void 0 : r.scale) == null ? void 0 : w.min) === "auto" || ((A = r == null ? void 0 : r.scale) == null ? void 0 : A.min) === void 0 ? "" : String(r.scale.min),
6710
- onSave: (v) => g("min", v),
6710
+ onSave: (N) => g("min", N),
6711
6711
  className: ""
6712
6712
  }
6713
6713
  ) })
@@ -6720,7 +6720,7 @@ function Xa({ axis: t, label: s, type: n, config: r, onChange: o, defaultTitle:
6720
6720
  type: "number",
6721
6721
  placeholder: "auto",
6722
6722
  value: ((C = r == null ? void 0 : r.scale) == null ? void 0 : C.max) === "auto" || ((S = r == null ? void 0 : r.scale) == null ? void 0 : S.max) === void 0 ? "" : String(r.scale.max),
6723
- onSave: (v) => g("max", v),
6723
+ onSave: (N) => g("max", N),
6724
6724
  className: ""
6725
6725
  }
6726
6726
  ) })
@@ -6733,7 +6733,7 @@ function Xa({ axis: t, label: s, type: n, config: r, onChange: o, defaultTitle:
6733
6733
  type: "number",
6734
6734
  placeholder: "auto",
6735
6735
  value: ((D = r == null ? void 0 : r.scale) == null ? void 0 : D.stepSize) === "auto" || ((R = r == null ? void 0 : r.scale) == null ? void 0 : R.stepSize) === void 0 ? "" : String(r.scale.stepSize),
6736
- onSave: (v) => g("stepSize", v),
6736
+ onSave: (N) => g("stepSize", N),
6737
6737
  className: ""
6738
6738
  }
6739
6739
  ) })
@@ -6791,11 +6791,11 @@ function fc() {
6791
6791
  r(f);
6792
6792
  }, l = o.hasY2Axis && t.type === "combo";
6793
6793
  return /* @__PURE__ */ a(be, { value: "axes", className: "border-b-0", children: [
6794
- /* @__PURE__ */ e(ve, { className: "flex w-full items-center gap-2 py-2 text-sm font-medium hover:no-underline", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
6794
+ /* @__PURE__ */ e(Ne, { className: "flex w-full items-center gap-2 py-2 text-sm font-medium hover:no-underline", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
6795
6795
  /* @__PURE__ */ e(el, { className: "h-4 w-4 text-muted-foreground" }),
6796
6796
  /* @__PURE__ */ e("span", { children: "Axes" })
6797
6797
  ] }) }),
6798
- /* @__PURE__ */ e(Ne, { className: "pt-2", children: /* @__PURE__ */ a(_t, { type: "single", collapsible: !0, className: "w-full", children: [
6798
+ /* @__PURE__ */ e(ve, { className: "pt-2", children: /* @__PURE__ */ a(_t, { type: "single", collapsible: !0, className: "w-full", children: [
6799
6799
  o.hasXAxis && /* @__PURE__ */ e(
6800
6800
  Xa,
6801
6801
  {
@@ -6859,11 +6859,11 @@ function gc() {
6859
6859
  n(p);
6860
6860
  }, i = ["top", "bottom", "left", "right"], u = ["start", "center", "end"];
6861
6861
  return /* @__PURE__ */ a(be, { value: "legend", className: "border-b-0", children: [
6862
- /* @__PURE__ */ e(ve, { className: "flex w-full items-center gap-2 py-2 text-sm font-medium hover:no-underline", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
6862
+ /* @__PURE__ */ e(Ne, { className: "flex w-full items-center gap-2 py-2 text-sm font-medium hover:no-underline", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
6863
6863
  /* @__PURE__ */ e(no, { className: "h-4 w-4 text-muted-foreground" }),
6864
6864
  /* @__PURE__ */ e("span", { children: "Legend" })
6865
6865
  ] }) }),
6866
- /* @__PURE__ */ e(Ne, { className: "pt-2", children: /* @__PURE__ */ a("div", { className: "space-y-3", children: [
6866
+ /* @__PURE__ */ e(ve, { className: "pt-2", children: /* @__PURE__ */ a("div", { className: "space-y-3", children: [
6867
6867
  /* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: [
6868
6868
  /* @__PURE__ */ e(L, { className: "text-xs font-medium", children: "Display" }),
6869
6869
  /* @__PURE__ */ e(
@@ -6908,7 +6908,7 @@ function gc() {
6908
6908
  ] });
6909
6909
  }
6910
6910
  function xc() {
6911
- var E, F, T, j, U, ae, Q, X, te, z, ee;
6911
+ var E, F, T, j, U, ae, W, X, te, z, ee;
6912
6912
  const t = I(($) => $.card), s = I(
6913
6913
  ($) => {
6914
6914
  var ie, oe;
@@ -6990,7 +6990,7 @@ function xc() {
6990
6990
  const $ = l ? ["center", "left", "right"] : ["center", "top", "bottom"];
6991
6991
  S = ["auto", ...t.type === "bullet" ? $ : $.filter((oe) => oe !== C), "custom"];
6992
6992
  }
6993
- const D = () => Be(C), R = ["center", "start", "end"], v = ["center", "start", "end", "top", "bottom"], N = u ? ["auto", "number", "currency", "percent", "none"] : ["number", "currency", "percent", "none"], O = [
6993
+ const D = () => Be(C), R = ["center", "start", "end"], N = ["center", "start", "end", "top", "bottom"], v = u ? ["auto", "number", "currency", "percent", "none"] : ["number", "currency", "percent", "none"], O = [
6994
6994
  { value: "USD", label: "USD - US Dollar" },
6995
6995
  { value: "EUR", label: "EUR - Euro" },
6996
6996
  { value: "GBP", label: "GBP - British Pound" },
@@ -7010,11 +7010,11 @@ function xc() {
7010
7010
  { value: "zh-CN", label: "Chinese (Simplified)" }
7011
7011
  ];
7012
7012
  return /* @__PURE__ */ a(be, { value: "data-labels", className: "border-b-0", children: [
7013
- /* @__PURE__ */ e(ve, { className: "flex w-full items-center gap-2 py-2 text-sm font-medium hover:no-underline", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
7013
+ /* @__PURE__ */ e(Ne, { className: "flex w-full items-center gap-2 py-2 text-sm font-medium hover:no-underline", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
7014
7014
  /* @__PURE__ */ e(bo, { className: "h-4 w-4 text-muted-foreground" }),
7015
7015
  /* @__PURE__ */ e("span", { children: "Data Labels" })
7016
7016
  ] }) }),
7017
- /* @__PURE__ */ e(Ne, { className: "pt-2", children: /* @__PURE__ */ a("div", { className: "space-y-3", children: [
7017
+ /* @__PURE__ */ e(ve, { className: "pt-2", children: /* @__PURE__ */ a("div", { className: "space-y-3", children: [
7018
7018
  /* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: [
7019
7019
  /* @__PURE__ */ e(L, { className: "text-xs font-medium", children: "Display" }),
7020
7020
  /* @__PURE__ */ e(
@@ -7074,7 +7074,7 @@ function xc() {
7074
7074
  onValueChange: ($) => b("align", $),
7075
7075
  children: [
7076
7076
  /* @__PURE__ */ e(J, { className: "h-8 text-xs flex-1", children: /* @__PURE__ */ e(H, {}) }),
7077
- /* @__PURE__ */ e(Y, { children: v.map(($) => /* @__PURE__ */ e(B, { value: $, className: "text-xs", children: Be($) }, $)) })
7077
+ /* @__PURE__ */ e(Y, { children: N.map(($) => /* @__PURE__ */ e(B, { value: $, className: "text-xs", children: Be($) }, $)) })
7078
7078
  ]
7079
7079
  }
7080
7080
  )
@@ -7089,7 +7089,7 @@ function xc() {
7089
7089
  onValueChange: ($) => b("format", $),
7090
7090
  children: [
7091
7091
  /* @__PURE__ */ e(J, { className: "h-8 text-xs", children: /* @__PURE__ */ e(H, {}) }),
7092
- /* @__PURE__ */ e(Y, { children: N.map(($) => /* @__PURE__ */ e(B, { value: $, className: "text-xs", children: $ === "auto" && u ? "Auto (Use Axis)" : $ === "none" ? "None (Raw Value)" : Be($) }, $)) })
7092
+ /* @__PURE__ */ e(Y, { children: v.map(($) => /* @__PURE__ */ e(B, { value: $, className: "text-xs", children: $ === "auto" && u ? "Auto (Use Axis)" : $ === "none" ? "None (Raw Value)" : Be($) }, $)) })
7093
7093
  ]
7094
7094
  }
7095
7095
  )
@@ -7117,7 +7117,7 @@ function xc() {
7117
7117
  /* @__PURE__ */ a(
7118
7118
  _,
7119
7119
  {
7120
- value: ((Q = m == null ? void 0 : m.formatOptions) == null ? void 0 : Q.currency) || "USD",
7120
+ value: ((W = m == null ? void 0 : m.formatOptions) == null ? void 0 : W.currency) || "USD",
7121
7121
  onValueChange: ($) => V("currency", $),
7122
7122
  children: [
7123
7123
  /* @__PURE__ */ e(J, { className: "h-8 text-xs flex-1", children: /* @__PURE__ */ e(H, {}) }),
@@ -7267,11 +7267,11 @@ function sa({
7267
7267
  "aria-label": `Change color for ${n}`
7268
7268
  }
7269
7269
  ) }),
7270
- /* @__PURE__ */ e(We, { align: "start", className: "w-auto p-2", children: /* @__PURE__ */ a("div", { className: "space-y-2", children: [
7270
+ /* @__PURE__ */ e(Qe, { align: "start", className: "w-auto p-2", children: /* @__PURE__ */ a("div", { className: "space-y-2", children: [
7271
7271
  /* @__PURE__ */ e("div", { className: "grid grid-cols-3 items-center justify-items-center gap-1", children: bc.map((i) => /* @__PURE__ */ e(
7272
7272
  "button",
7273
7273
  {
7274
- className: W(
7274
+ className: Q(
7275
7275
  "h-5 w-5 rounded border-2 transition-all",
7276
7276
  c() === i ? "border-gray-900" : "border-transparent"
7277
7277
  ),
@@ -7345,7 +7345,7 @@ Difference: Primary - Secondary`,
7345
7345
  example: "You've achieved 80% of your sales quota."
7346
7346
  }
7347
7347
  };
7348
- function vc() {
7348
+ function Nc() {
7349
7349
  var p, k, m, h, x, b, y, V, M, w, A;
7350
7350
  const t = I((C) => C.card), { setCardPreferences: s } = ne(), n = ((p = t.config) == null ? void 0 : p.metricColumns) || [], r = ((k = t.config) == null ? void 0 : k.groupByColumns) || [], o = n.length === 2 && r.length === 0, d = n.length >= 1 && r.length > 0;
7351
7351
  if (!(t.type === "kpi" && (o || d)))
@@ -7365,11 +7365,11 @@ function vc() {
7365
7365
  s(S);
7366
7366
  }, u = d || c.enabled, g = ((x = t.config) == null ? void 0 : x.comparisonType) || "none", f = g === "previous_period" || g === "same_period_last_year" || g === "start_vs_end";
7367
7367
  return /* @__PURE__ */ a(be, { value: "comparison", className: "border-none", children: [
7368
- /* @__PURE__ */ e(ve, { className: "flex items-center gap-2 py-2 text-sm hover:no-underline", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
7368
+ /* @__PURE__ */ e(Ne, { className: "flex items-center gap-2 py-2 text-sm hover:no-underline", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
7369
7369
  /* @__PURE__ */ e(to, { className: "h-4 w-4" }),
7370
7370
  /* @__PURE__ */ e("span", { children: "Comparison" })
7371
7371
  ] }) }),
7372
- /* @__PURE__ */ a(Ne, { className: "space-y-4 pb-4 pt-2", children: [
7372
+ /* @__PURE__ */ a(ve, { className: "space-y-4 pb-4 pt-2", children: [
7373
7373
  o && n.length === 2 && /* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: [
7374
7374
  /* @__PURE__ */ e(L, { htmlFor: "enable-comparison", className: "text-xs", children: "Enable Metric Comparison" }),
7375
7375
  /* @__PURE__ */ e(
@@ -7681,18 +7681,18 @@ function vc() {
7681
7681
  ] })
7682
7682
  ] });
7683
7683
  }
7684
- function Nc() {
7684
+ function vc() {
7685
7685
  var o, d;
7686
7686
  const t = I((l) => l.card), { setCardPreferences: s } = ne();
7687
7687
  if (t.type !== "kpi")
7688
7688
  return null;
7689
7689
  const n = ((d = (o = t.preferences) == null ? void 0 : o.kpiVisualOptions) == null ? void 0 : d.formatOptions) || {};
7690
7690
  return /* @__PURE__ */ a(be, { value: "kpi-format", className: "border-none", children: [
7691
- /* @__PURE__ */ e(ve, { className: "flex items-center gap-2 py-2 text-sm hover:no-underline", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
7691
+ /* @__PURE__ */ e(Ne, { className: "flex items-center gap-2 py-2 text-sm hover:no-underline", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
7692
7692
  /* @__PURE__ */ e(ua, { className: "h-4 w-4" }),
7693
7693
  /* @__PURE__ */ e("span", { children: "Number Format" })
7694
7694
  ] }) }),
7695
- /* @__PURE__ */ e(Ne, { className: "space-y-4 pb-4 pt-2", children: /* @__PURE__ */ e(
7695
+ /* @__PURE__ */ e(ve, { className: "space-y-4 pb-4 pt-2", children: /* @__PURE__ */ e(
7696
7696
  Mn,
7697
7697
  {
7698
7698
  formatOptions: n,
@@ -7734,11 +7734,11 @@ function yc() {
7734
7734
  n(c);
7735
7735
  };
7736
7736
  return /* @__PURE__ */ a(be, { value: "treemap-color-mode", className: "border-none", children: [
7737
- /* @__PURE__ */ e(ve, { className: "flex w-full items-center gap-2 py-3 text-sm font-medium hover:no-underline", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
7737
+ /* @__PURE__ */ e(Ne, { className: "flex w-full items-center gap-2 py-3 text-sm font-medium hover:no-underline", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
7738
7738
  /* @__PURE__ */ e(Or, { className: "h-4 w-4 text-muted-foreground" }),
7739
7739
  /* @__PURE__ */ e("span", { children: "Treemap Colors" })
7740
7740
  ] }) }),
7741
- /* @__PURE__ */ e(Ne, { className: "space-y-4 border-t border-border bg-background/50 px-3 py-4 text-sm", children: /* @__PURE__ */ a(
7741
+ /* @__PURE__ */ e(ve, { className: "space-y-4 border-t border-border bg-background/50 px-3 py-4 text-sm", children: /* @__PURE__ */ a(
7742
7742
  ca,
7743
7743
  {
7744
7744
  value: r,
@@ -7807,11 +7807,11 @@ function wc() {
7807
7807
  i({ legendPosition: p });
7808
7808
  };
7809
7809
  return r ? /* @__PURE__ */ a(be, { value: "heatmap-color-config", className: "border-none", children: [
7810
- /* @__PURE__ */ e(ve, { className: "flex w-full items-center gap-2 py-3 text-sm font-medium hover:no-underline", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
7810
+ /* @__PURE__ */ e(Ne, { className: "flex w-full items-center gap-2 py-3 text-sm font-medium hover:no-underline", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
7811
7811
  /* @__PURE__ */ e(fn, { className: "h-4 w-4 text-muted-foreground" }),
7812
7812
  /* @__PURE__ */ e("span", { children: "Heatmap Settings" })
7813
7813
  ] }) }),
7814
- /* @__PURE__ */ a(Ne, { className: "space-y-4 border-t border-border bg-background/50 px-3 py-4 text-sm", children: [
7814
+ /* @__PURE__ */ a(ve, { className: "space-y-4 border-t border-border bg-background/50 px-3 py-4 text-sm", children: [
7815
7815
  /* @__PURE__ */ a(
7816
7816
  ca,
7817
7817
  {
@@ -7952,10 +7952,10 @@ function Sc() {
7952
7952
  const U = x.slice(3), ae = {
7953
7953
  ...d.rangeKeys || {}
7954
7954
  };
7955
- let Q = !1;
7955
+ let W = !1;
7956
7956
  if (us.forEach((z, ee) => {
7957
- !ae[z] && U[ee] && (ae[z] = U[ee].value, Q = !0);
7958
- }), Q && (E.rangeKeys = ae, F = !0, d.showRanges === void 0 && (E.showRanges = !0)), F) {
7957
+ !ae[z] && U[ee] && (ae[z] = U[ee].value, W = !0);
7958
+ }), W && (E.rangeKeys = ae, F = !0, d.showRanges === void 0 && (E.showRanges = !0)), F) {
7959
7959
  const z = ms({
7960
7960
  ...d,
7961
7961
  ...E
@@ -8018,7 +8018,7 @@ function Sc() {
8018
8018
  value: E.value,
8019
8019
  label: E.label
8020
8020
  }))
8021
- ], v = R, N = (E) => {
8021
+ ], N = R, v = (E) => {
8022
8022
  if (m(E), !E) {
8023
8023
  b({
8024
8024
  comparativeMetricKey: void 0,
@@ -8043,11 +8043,11 @@ function Sc() {
8043
8043
  }
8044
8044
  };
8045
8045
  return /* @__PURE__ */ a(be, { value: "bullet-config", className: "border-b-0", children: [
8046
- /* @__PURE__ */ e(ve, { className: "flex w-full items-center gap-2 py-2 text-sm font-medium hover:no-underline", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
8046
+ /* @__PURE__ */ e(Ne, { className: "flex w-full items-center gap-2 py-2 text-sm font-medium hover:no-underline", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
8047
8047
  /* @__PURE__ */ e(Ir, { className: "h-4 w-4 text-muted-foreground" }),
8048
8048
  /* @__PURE__ */ e("span", { children: "Bullet Chart" })
8049
8049
  ] }) }),
8050
- /* @__PURE__ */ a(Ne, { className: "space-y-6 border-t border-border/50 py-4", children: [
8050
+ /* @__PURE__ */ a(ve, { className: "space-y-6 border-t border-border/50 py-4", children: [
8051
8051
  /* @__PURE__ */ a("section", { className: "space-y-4", children: [
8052
8052
  /* @__PURE__ */ a("div", { className: "space-y-1.5", children: [
8053
8053
  /* @__PURE__ */ e(L, { className: "text-xs font-medium", children: "ORIENTATION" }),
@@ -8123,7 +8123,7 @@ function Sc() {
8123
8123
  Te,
8124
8124
  {
8125
8125
  checked: k,
8126
- onCheckedChange: (E) => N(E)
8126
+ onCheckedChange: (E) => v(E)
8127
8127
  }
8128
8128
  )
8129
8129
  ] }),
@@ -8200,7 +8200,7 @@ function Sc() {
8200
8200
  {
8201
8201
  placeholder: `Display label (${E})`,
8202
8202
  value: ((F = d.rangeLabels) == null ? void 0 : F[E]) || "",
8203
- onCommit: (Q) => w(E, Q),
8203
+ onCommit: (W) => w(E, W),
8204
8204
  className: "h-8 text-xs"
8205
8205
  }
8206
8206
  )
@@ -8214,19 +8214,19 @@ function Sc() {
8214
8214
  _,
8215
8215
  {
8216
8216
  value: ((T = d.rangeKeys) == null ? void 0 : T[E]) || "__none",
8217
- onValueChange: (Q) => {
8218
- Q === "__none" ? y(E, "") : y(E, Q);
8217
+ onValueChange: (W) => {
8218
+ W === "__none" ? y(E, "") : y(E, W);
8219
8219
  },
8220
8220
  children: [
8221
8221
  /* @__PURE__ */ e(J, { className: "h-8 text-xs", children: /* @__PURE__ */ e(H, { placeholder: "Select column" }) }),
8222
- /* @__PURE__ */ e(Y, { children: v.map((Q) => /* @__PURE__ */ e(
8222
+ /* @__PURE__ */ e(Y, { children: N.map((W) => /* @__PURE__ */ e(
8223
8223
  B,
8224
8224
  {
8225
- value: Q.value,
8225
+ value: W.value,
8226
8226
  className: "text-xs",
8227
- children: Q.label
8227
+ children: W.label
8228
8228
  },
8229
- Q.value
8229
+ W.value
8230
8230
  )) })
8231
8231
  ]
8232
8232
  }
@@ -8241,7 +8241,7 @@ function Sc() {
8241
8241
  {
8242
8242
  placeholder: "Column key",
8243
8243
  value: ((j = d.rangeKeys) == null ? void 0 : j[E]) || "",
8244
- onCommit: (Q) => y(E, Q),
8244
+ onCommit: (W) => y(E, W),
8245
8245
  className: "h-8 text-xs"
8246
8246
  }
8247
8247
  )
@@ -8257,7 +8257,7 @@ function Sc() {
8257
8257
  type: "number",
8258
8258
  placeholder: g ? "0.80" : "Static value",
8259
8259
  value: ((U = d.ranges) == null ? void 0 : U[E]) === void 0 ? "" : String((ae = d.ranges) == null ? void 0 : ae[E]),
8260
- onCommit: (Q) => V(E, Q),
8260
+ onCommit: (W) => V(E, W),
8261
8261
  className: "h-8 text-xs"
8262
8262
  }
8263
8263
  )
@@ -8278,7 +8278,7 @@ function hs(t) {
8278
8278
  return s;
8279
8279
  }
8280
8280
  function kc() {
8281
- var w, A, C, S, D, R, v, N, O, P, E, F;
8281
+ var w, A, C, S, D, R, N, v, O, P, E, F;
8282
8282
  const t = I((T) => T.card.preferences), s = I((T) => T.card), n = I((T) => T.card.type), r = I((T) => T.isDevMode), { setCardPreferences: o, updateCardInFrame: d } = ne(), l = n === "bubble", c = n === "scatter", i = we(
8283
8283
  () => (t == null ? void 0 : t.bubbleScatterConfig) || {},
8284
8284
  [t == null ? void 0 : t.bubbleScatterConfig]
@@ -8346,14 +8346,14 @@ function kc() {
8346
8346
  });
8347
8347
  };
8348
8348
  return !l && !c ? null : /* @__PURE__ */ a(be, { value: "bubble-scatter-config", children: [
8349
- /* @__PURE__ */ e(ve, { className: "py-2 text-sm", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
8349
+ /* @__PURE__ */ e(Ne, { className: "py-2 text-sm", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
8350
8350
  /* @__PURE__ */ e(l ? Mr : Rr, { className: "h-4 w-4" }),
8351
8351
  /* @__PURE__ */ a("span", { children: [
8352
8352
  l ? "Bubble" : "Scatter",
8353
8353
  " Configuration"
8354
8354
  ] })
8355
8355
  ] }) }),
8356
- /* @__PURE__ */ a(Ne, { className: "space-y-4 px-1 pb-4", children: [
8356
+ /* @__PURE__ */ a(ve, { className: "space-y-4 px-1 pb-4", children: [
8357
8357
  /* @__PURE__ */ a("div", { className: "space-y-3", children: [
8358
8358
  /* @__PURE__ */ a("div", { className: "flex items-center gap-1 text-xs font-medium text-muted-foreground", children: [
8359
8359
  "Dimensions",
@@ -8540,7 +8540,7 @@ function kc() {
8540
8540
  i.fixedRadius || 10
8541
8541
  ] }),
8542
8542
  /* @__PURE__ */ e(
8543
- va,
8543
+ Na,
8544
8544
  {
8545
8545
  value: [i.fixedRadius || 10],
8546
8546
  onValueChange: ([T]) => y({ fixedRadius: T }),
@@ -8560,7 +8560,7 @@ function kc() {
8560
8560
  i.fixedRadius || 5
8561
8561
  ] }),
8562
8562
  /* @__PURE__ */ e(
8563
- va,
8563
+ Na,
8564
8564
  {
8565
8565
  value: [i.fixedRadius || 5],
8566
8566
  onValueChange: ([T]) => y({ fixedRadius: T }),
@@ -8580,7 +8580,7 @@ function kc() {
8580
8580
  {
8581
8581
  checked: ((R = (D = t == null ? void 0 : t.xAxisConfig) == null ? void 0 : D.name) == null ? void 0 : R.enabled) ?? !1,
8582
8582
  onCheckedChange: (T) => {
8583
- var ae, Q, X, te;
8583
+ var ae, W, X, te;
8584
8584
  const j = i.xMetricKey || "X Axis", U = i.yMetricKey || "Y Axis";
8585
8585
  b({
8586
8586
  ...t ?? {},
@@ -8588,7 +8588,7 @@ function kc() {
8588
8588
  ...t == null ? void 0 : t.xAxisConfig,
8589
8589
  name: {
8590
8590
  enabled: T,
8591
- text: ((Q = (ae = t == null ? void 0 : t.xAxisConfig) == null ? void 0 : ae.name) == null ? void 0 : Q.text) || j
8591
+ text: ((W = (ae = t == null ? void 0 : t.xAxisConfig) == null ? void 0 : ae.name) == null ? void 0 : W.text) || j
8592
8592
  }
8593
8593
  },
8594
8594
  yAxisConfig: {
@@ -8603,7 +8603,7 @@ function kc() {
8603
8603
  }
8604
8604
  )
8605
8605
  ] }),
8606
- ((N = (v = t == null ? void 0 : t.xAxisConfig) == null ? void 0 : v.name) == null ? void 0 : N.enabled) && /* @__PURE__ */ a("div", { className: "grid grid-cols-2 gap-2", children: [
8606
+ ((v = (N = t == null ? void 0 : t.xAxisConfig) == null ? void 0 : N.name) == null ? void 0 : v.enabled) && /* @__PURE__ */ a("div", { className: "grid grid-cols-2 gap-2", children: [
8607
8607
  /* @__PURE__ */ a("div", { className: "space-y-1", children: [
8608
8608
  /* @__PURE__ */ e(L, { className: "text-xs", children: "X Title" }),
8609
8609
  /* @__PURE__ */ e(
@@ -8692,11 +8692,11 @@ function Ac() {
8692
8692
  i({ labelThreshold: p[0] });
8693
8693
  };
8694
8694
  return r ? /* @__PURE__ */ a(be, { value: "funnel-config", className: "border-none", children: [
8695
- /* @__PURE__ */ e(ve, { className: "flex w-full items-center gap-2 py-3 text-sm font-medium hover:no-underline", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
8695
+ /* @__PURE__ */ e(Ne, { className: "flex w-full items-center gap-2 py-3 text-sm font-medium hover:no-underline", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
8696
8696
  /* @__PURE__ */ e(Kt, { className: "h-4 w-4 text-muted-foreground" }),
8697
8697
  /* @__PURE__ */ e("span", { children: "Funnel Settings" })
8698
8698
  ] }) }),
8699
- /* @__PURE__ */ a(Ne, { className: "space-y-4 border-t border-border bg-background/50 px-3 py-4 text-sm", children: [
8699
+ /* @__PURE__ */ a(ve, { className: "space-y-4 border-t border-border bg-background/50 px-3 py-4 text-sm", children: [
8700
8700
  /* @__PURE__ */ a("div", { className: "space-y-2", children: [
8701
8701
  /* @__PURE__ */ e(L, { className: "text-xs font-medium", children: "PERCENTAGE MODE" }),
8702
8702
  /* @__PURE__ */ e(
@@ -8741,7 +8741,7 @@ function Ac() {
8741
8741
  /* @__PURE__ */ a("div", { className: "flex items-center gap-3 pt-1", children: [
8742
8742
  /* @__PURE__ */ e("span", { className: "whitespace-nowrap text-xs text-muted-foreground", children: "Same Width" }),
8743
8743
  /* @__PURE__ */ e(
8744
- va,
8744
+ Na,
8745
8745
  {
8746
8746
  value: [l],
8747
8747
  onValueChange: g,
@@ -8764,7 +8764,7 @@ function Ac() {
8764
8764
  /* @__PURE__ */ a("div", { className: "flex items-center gap-3 pt-1", children: [
8765
8765
  /* @__PURE__ */ e("span", { className: "whitespace-nowrap text-xs text-muted-foreground", children: "Show All" }),
8766
8766
  /* @__PURE__ */ e(
8767
- va,
8767
+ Na,
8768
8768
  {
8769
8769
  value: [c],
8770
8770
  onValueChange: f,
@@ -9080,11 +9080,11 @@ function Pc() {
9080
9080
  var n;
9081
9081
  return (n = s.card) == null ? void 0 : n.type;
9082
9082
  }) !== "combo" ? null : /* @__PURE__ */ a(be, { value: "combo-series", className: "border-b-0", children: [
9083
- /* @__PURE__ */ e(ve, { className: "flex w-full items-center gap-2 py-2 text-sm font-medium hover:no-underline", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
9083
+ /* @__PURE__ */ e(Ne, { className: "flex w-full items-center gap-2 py-2 text-sm font-medium hover:no-underline", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
9084
9084
  /* @__PURE__ */ e(da, { className: "h-4 w-4 text-muted-foreground" }),
9085
9085
  /* @__PURE__ */ e("span", { children: "Series" })
9086
9086
  ] }) }),
9087
- /* @__PURE__ */ e(Ne, { className: "pt-2", children: /* @__PURE__ */ e(Vc, {}) })
9087
+ /* @__PURE__ */ e(ve, { className: "pt-2", children: /* @__PURE__ */ e(Vc, {}) })
9088
9088
  ] });
9089
9089
  }
9090
9090
  function Vc() {
@@ -9150,7 +9150,7 @@ function Bc({ metricKey: t, idx: s }) {
9150
9150
  /* @__PURE__ */ e(
9151
9151
  wt,
9152
9152
  {
9153
- className: W(
9153
+ className: Q(
9154
9154
  "h-4 w-4 shrink-0 text-muted-foreground transition-transform",
9155
9155
  n && "rotate-90"
9156
9156
  )
@@ -9162,7 +9162,7 @@ function Bc({ metricKey: t, idx: s }) {
9162
9162
  /* @__PURE__ */ a(
9163
9163
  "span",
9164
9164
  {
9165
- className: W(
9165
+ className: Q(
9166
9166
  "flex items-center gap-1 rounded px-1.5 py-0.5 text-xs",
9167
9167
  "border border-border bg-background text-muted-foreground"
9168
9168
  ),
@@ -9175,7 +9175,7 @@ function Bc({ metricKey: t, idx: s }) {
9175
9175
  /* @__PURE__ */ e(
9176
9176
  "span",
9177
9177
  {
9178
- className: W(
9178
+ className: Q(
9179
9179
  "rounded px-1.5 py-0.5 text-xs",
9180
9180
  "border border-border bg-background text-muted-foreground"
9181
9181
  ),
@@ -9192,7 +9192,7 @@ function Bc({ metricKey: t, idx: s }) {
9192
9192
  "button",
9193
9193
  {
9194
9194
  onClick: () => k(y),
9195
- className: W(
9195
+ className: Q(
9196
9196
  "flex items-center gap-2 rounded-md border px-3 py-1.5 text-xs transition-colors",
9197
9197
  i === y ? "border-primary bg-primary/10 text-primary" : "border-border bg-background text-muted-foreground hover:bg-muted"
9198
9198
  ),
@@ -9351,11 +9351,11 @@ function Kc() {
9351
9351
  return (n = s.card) == null ? void 0 : n.type;
9352
9352
  });
9353
9353
  return t !== "area" && t !== "stackedArea" ? null : /* @__PURE__ */ a(be, { value: "area-series", className: "border-b-0", children: [
9354
- /* @__PURE__ */ e(ve, { className: "flex w-full items-center gap-2 py-2 text-sm font-medium hover:no-underline", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
9354
+ /* @__PURE__ */ e(Ne, { className: "flex w-full items-center gap-2 py-2 text-sm font-medium hover:no-underline", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
9355
9355
  /* @__PURE__ */ e(da, { className: "h-4 w-4 text-muted-foreground" }),
9356
9356
  /* @__PURE__ */ e("span", { children: "Series" })
9357
9357
  ] }) }),
9358
- /* @__PURE__ */ e(Ne, { className: "pt-2", children: /* @__PURE__ */ e(Gc, {}) })
9358
+ /* @__PURE__ */ e(ve, { className: "pt-2", children: /* @__PURE__ */ e(Gc, {}) })
9359
9359
  ] });
9360
9360
  }
9361
9361
  function Gc() {
@@ -9417,7 +9417,7 @@ function Uc({ metricKey: t, idx: s }) {
9417
9417
  /* @__PURE__ */ e(
9418
9418
  wt,
9419
9419
  {
9420
- className: W(
9420
+ className: Q(
9421
9421
  "h-4 w-4 shrink-0 text-muted-foreground transition-transform",
9422
9422
  n && "rotate-90"
9423
9423
  )
@@ -9428,7 +9428,7 @@ function Uc({ metricKey: t, idx: s }) {
9428
9428
  /* @__PURE__ */ e("div", { className: "flex shrink-0 items-center gap-1.5", children: /* @__PURE__ */ a(
9429
9429
  "span",
9430
9430
  {
9431
- className: W(
9431
+ className: Q(
9432
9432
  "flex items-center gap-1 rounded px-1.5 py-0.5 text-xs",
9433
9433
  "border border-border bg-background text-muted-foreground"
9434
9434
  ),
@@ -9580,18 +9580,18 @@ function Hc() {
9580
9580
  var n;
9581
9581
  return (n = s.card) == null ? void 0 : n.type;
9582
9582
  }) !== "line" ? null : /* @__PURE__ */ a(be, { value: "line-series", className: "border-b-0", children: [
9583
- /* @__PURE__ */ e(ve, { className: "flex w-full items-center gap-2 py-2 text-sm font-medium hover:no-underline", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
9583
+ /* @__PURE__ */ e(Ne, { className: "flex w-full items-center gap-2 py-2 text-sm font-medium hover:no-underline", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
9584
9584
  /* @__PURE__ */ e(da, { className: "h-4 w-4 text-muted-foreground" }),
9585
9585
  /* @__PURE__ */ e("span", { children: "Series" })
9586
9586
  ] }) }),
9587
- /* @__PURE__ */ e(Ne, { className: "pt-2", children: /* @__PURE__ */ e(Yc, {}) })
9587
+ /* @__PURE__ */ e(ve, { className: "pt-2", children: /* @__PURE__ */ e(Yc, {}) })
9588
9588
  ] });
9589
9589
  }
9590
9590
  function Yc() {
9591
9591
  const { transformedMetricKeys: t } = ja();
9592
- return t.length === 0 ? /* @__PURE__ */ e("div", { className: "rounded-lg border border-dashed border-border p-4 text-center text-xs text-muted-foreground", children: "Add metrics to configure series" }) : /* @__PURE__ */ e("div", { className: "space-y-3", children: t.map((s, n) => /* @__PURE__ */ e(Wc, { metricKey: s, idx: n }, s)) });
9592
+ return t.length === 0 ? /* @__PURE__ */ e("div", { className: "rounded-lg border border-dashed border-border p-4 text-center text-xs text-muted-foreground", children: "Add metrics to configure series" }) : /* @__PURE__ */ e("div", { className: "space-y-3", children: t.map((s, n) => /* @__PURE__ */ e(Qc, { metricKey: s, idx: n }, s)) });
9593
9593
  }
9594
- function Wc({ metricKey: t, idx: s }) {
9594
+ function Qc({ metricKey: t, idx: s }) {
9595
9595
  var x;
9596
9596
  const [n, r] = q(!1), o = I((b) => {
9597
9597
  var y;
@@ -9645,7 +9645,7 @@ function Wc({ metricKey: t, idx: s }) {
9645
9645
  /* @__PURE__ */ e(
9646
9646
  wt,
9647
9647
  {
9648
- className: W(
9648
+ className: Q(
9649
9649
  "h-4 w-4 shrink-0 text-muted-foreground transition-transform",
9650
9650
  n && "rotate-90"
9651
9651
  )
@@ -9656,7 +9656,7 @@ function Wc({ metricKey: t, idx: s }) {
9656
9656
  /* @__PURE__ */ e("div", { className: "flex shrink-0 items-center gap-1.5", children: /* @__PURE__ */ a(
9657
9657
  "span",
9658
9658
  {
9659
- className: W(
9659
+ className: Q(
9660
9660
  "flex items-center gap-1 rounded px-1.5 py-0.5 text-xs",
9661
9661
  "border border-border bg-background text-muted-foreground"
9662
9662
  ),
@@ -9764,18 +9764,18 @@ function Wc({ metricKey: t, idx: s }) {
9764
9764
  ] }) }) })
9765
9765
  ] }) });
9766
9766
  }
9767
- const Qc = [0, 2, 4, 6, 8, 10, 12, 16, 20];
9767
+ const Wc = [0, 2, 4, 6, 8, 10, 12, 16, 20];
9768
9768
  function Xc() {
9769
9769
  const t = I((s) => {
9770
9770
  var n;
9771
9771
  return (n = s.card) == null ? void 0 : n.type;
9772
9772
  });
9773
9773
  return !t || !["bar", "horizontalBar", "stackedBar"].includes(t) ? null : /* @__PURE__ */ a(be, { value: "bar-series", className: "border-b-0", children: [
9774
- /* @__PURE__ */ e(ve, { className: "flex w-full items-center gap-2 py-2 text-sm font-medium hover:no-underline", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
9774
+ /* @__PURE__ */ e(Ne, { className: "flex w-full items-center gap-2 py-2 text-sm font-medium hover:no-underline", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
9775
9775
  /* @__PURE__ */ e(da, { className: "h-4 w-4 text-muted-foreground" }),
9776
9776
  /* @__PURE__ */ e("span", { children: "Series" })
9777
9777
  ] }) }),
9778
- /* @__PURE__ */ e(Ne, { className: "pt-2", children: /* @__PURE__ */ e(Zc, {}) })
9778
+ /* @__PURE__ */ e(ve, { className: "pt-2", children: /* @__PURE__ */ e(Zc, {}) })
9779
9779
  ] });
9780
9780
  }
9781
9781
  function Zc() {
@@ -9838,7 +9838,7 @@ function ed({ metricKey: t, idx: s }) {
9838
9838
  /* @__PURE__ */ e(
9839
9839
  wt,
9840
9840
  {
9841
- className: W(
9841
+ className: Q(
9842
9842
  "h-4 w-4 shrink-0 text-muted-foreground transition-transform",
9843
9843
  n && "rotate-90"
9844
9844
  )
@@ -9849,7 +9849,7 @@ function ed({ metricKey: t, idx: s }) {
9849
9849
  /* @__PURE__ */ e("div", { className: "flex shrink-0 items-center gap-1.5", children: u > 0 && /* @__PURE__ */ a(
9850
9850
  "span",
9851
9851
  {
9852
- className: W(
9852
+ className: Q(
9853
9853
  "flex items-center gap-1 rounded px-1.5 py-0.5 text-xs",
9854
9854
  "border border-border bg-background text-muted-foreground"
9855
9855
  ),
@@ -9873,7 +9873,7 @@ function ed({ metricKey: t, idx: s }) {
9873
9873
  onValueChange: (h) => f({ borderRadius: Number(h) }),
9874
9874
  children: [
9875
9875
  /* @__PURE__ */ e(J, { className: "h-8 w-full text-xs", children: /* @__PURE__ */ e(H, {}) }),
9876
- /* @__PURE__ */ e(Y, { children: Qc.map((h) => /* @__PURE__ */ e(
9876
+ /* @__PURE__ */ e(Y, { children: Wc.map((h) => /* @__PURE__ */ e(
9877
9877
  B,
9878
9878
  {
9879
9879
  value: String(h),
@@ -9947,11 +9947,11 @@ function sd() {
9947
9947
  r(i), o({ ...t, preferences: i });
9948
9948
  };
9949
9949
  return /* @__PURE__ */ a(be, { value: "line-style", className: "border-b-0", children: [
9950
- /* @__PURE__ */ e(ve, { className: "flex w-full items-center gap-2 py-2 text-sm font-medium hover:no-underline", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
9950
+ /* @__PURE__ */ e(Ne, { className: "flex w-full items-center gap-2 py-2 text-sm font-medium hover:no-underline", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
9951
9951
  /* @__PURE__ */ e(po, { className: "h-4 w-4 text-muted-foreground" }),
9952
9952
  /* @__PURE__ */ e("span", { children: "Line Style" })
9953
9953
  ] }) }),
9954
- /* @__PURE__ */ e(Ne, { className: "pt-2", children: /* @__PURE__ */ a("div", { className: "space-y-3", children: [
9954
+ /* @__PURE__ */ e(ve, { className: "pt-2", children: /* @__PURE__ */ a("div", { className: "space-y-3", children: [
9955
9955
  /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: "Default styles for all series. Override per-series in the Series section." }),
9956
9956
  /* @__PURE__ */ a("div", { className: "space-y-1.5", children: [
9957
9957
  /* @__PURE__ */ e(L, { className: "text-xs font-medium", children: "Line Pattern" }),
@@ -10039,11 +10039,11 @@ function od() {
10039
10039
  r(i), o({ ...t, preferences: i });
10040
10040
  };
10041
10041
  return /* @__PURE__ */ a(be, { value: "bar-style", className: "border-b-0", children: [
10042
- /* @__PURE__ */ e(ve, { className: "flex w-full items-center gap-2 py-2 text-sm font-medium hover:no-underline", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
10042
+ /* @__PURE__ */ e(Ne, { className: "flex w-full items-center gap-2 py-2 text-sm font-medium hover:no-underline", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
10043
10043
  /* @__PURE__ */ e(js, { className: "h-4 w-4 text-muted-foreground" }),
10044
10044
  /* @__PURE__ */ e("span", { children: "Bar Style" })
10045
10045
  ] }) }),
10046
- /* @__PURE__ */ e(Ne, { className: "pt-2", children: /* @__PURE__ */ a("div", { className: "space-y-3", children: [
10046
+ /* @__PURE__ */ e(ve, { className: "pt-2", children: /* @__PURE__ */ a("div", { className: "space-y-3", children: [
10047
10047
  /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: "Default styles for all bars. Override per-series in the Series section." }),
10048
10048
  /* @__PURE__ */ a("div", { className: "space-y-1.5", children: [
10049
10049
  /* @__PURE__ */ e(L, { className: "text-xs font-medium", children: "Corner Radius" }),
@@ -10106,11 +10106,11 @@ function cd() {
10106
10106
  }
10107
10107
  ), { setSortChart: s } = ne();
10108
10108
  return /* @__PURE__ */ a(be, { value: "stacked-sort", children: [
10109
- /* @__PURE__ */ e(ve, { children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
10109
+ /* @__PURE__ */ e(Ne, { children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
10110
10110
  /* @__PURE__ */ e(Vr, { className: "h-4 w-4" }),
10111
10111
  "Sort"
10112
10112
  ] }) }),
10113
- /* @__PURE__ */ e(Ne, { className: "space-y-4 px-1", children: /* @__PURE__ */ a("div", { className: "space-y-2", children: [
10113
+ /* @__PURE__ */ e(ve, { className: "space-y-4 px-1", children: /* @__PURE__ */ a("div", { className: "space-y-2", children: [
10114
10114
  /* @__PURE__ */ e(L, { children: "Sort Order" }),
10115
10115
  /* @__PURE__ */ e(
10116
10116
  at,
@@ -10144,8 +10144,8 @@ function hl({ mode: t }) {
10144
10144
  /* @__PURE__ */ e(sd, {}),
10145
10145
  /* @__PURE__ */ e(od, {}),
10146
10146
  /* @__PURE__ */ e(yc, {}),
10147
- t === "config" && /* @__PURE__ */ e(Nc, {}),
10148
10147
  t === "config" && /* @__PURE__ */ e(vc, {}),
10148
+ t === "config" && /* @__PURE__ */ e(Nc, {}),
10149
10149
  /* @__PURE__ */ e(wc, {}),
10150
10150
  s === "bullet" && /* @__PURE__ */ e(Sc, {}),
10151
10151
  s === "funnel" && /* @__PURE__ */ e(Ac, {}),
@@ -10169,7 +10169,7 @@ function ud() {
10169
10169
  function s() {
10170
10170
  switch (t) {
10171
10171
  case "kpi":
10172
- return /* @__PURE__ */ e(Qo, {});
10172
+ return /* @__PURE__ */ e(Wo, {});
10173
10173
  case "table":
10174
10174
  return /* @__PURE__ */ e(sc, {});
10175
10175
  case "map":
@@ -10265,11 +10265,11 @@ function hd(t) {
10265
10265
  errorMessage: S,
10266
10266
  refetch: D,
10267
10267
  data: R
10268
- } = Le(y), { setTriggerAIRun: v, setCurrentAssitantScope: N, setCardConfig: O } = ne(), { selectedDatamodelName: P, connectionType: E, selectedDatamodelId: F } = Vs(), T = (Ge = Br().data) == null ? void 0 : Ge.assistantProfileId, {
10268
+ } = Le(y), { setTriggerAIRun: N, setCurrentAssitantScope: v, setCardConfig: O } = ne(), { selectedDatamodelName: P, connectionType: E, selectedDatamodelId: F } = Vs(), T = (Ge = Br().data) == null ? void 0 : Ge.assistantProfileId, {
10269
10269
  messages: j,
10270
10270
  setMessages: U,
10271
10271
  regenerate: ae,
10272
- error: Q,
10272
+ error: W,
10273
10273
  sendMessage: X,
10274
10274
  status: te,
10275
10275
  addToolResult: z,
@@ -10320,10 +10320,10 @@ function hd(t) {
10320
10320
  b && x && (X({
10321
10321
  role: "user",
10322
10322
  parts: [{ type: "text", text: x }]
10323
- }), v(!1));
10324
- }, [b, x, X, v]);
10323
+ }), N(!1));
10324
+ }, [b, x, X, N]);
10325
10325
  async function ie({ toolCall: G }) {
10326
- var he, Ue, Xe, Mt, Ze, xt, et, bt, Rt, rt, Lt, Ft, Pt, Vt, vt, Nt;
10326
+ var he, Ue, Xe, Mt, Ze, xt, et, bt, Rt, rt, Lt, Ft, Pt, Vt, Nt, vt;
10327
10327
  if (["createChartFromSql", "createForecast"].includes(G.toolName)) {
10328
10328
  const le = ((he = G.input) == null ? void 0 : he.sql) ?? ((Ue = G.args) == null ? void 0 : Ue.sql), Se = ((Xe = G.input) == null ? void 0 : Xe.python) ?? ((Mt = G.args) == null ? void 0 : Mt.python), ke = ((Ze = G.input) == null ? void 0 : Ze.chartType) ?? ((xt = G.args) == null ? void 0 : xt.chartType);
10329
10329
  k(ke), f(le), g(Se), p(!0), z({
@@ -10372,7 +10372,7 @@ function hd(t) {
10372
10372
  });
10373
10373
  return;
10374
10374
  }
10375
- if ((vt = ke == null ? void 0 : ke.data) != null && vt.records) {
10375
+ if ((Nt = ke == null ? void 0 : ke.data) != null && Nt.records) {
10376
10376
  z({
10377
10377
  tool: G.toolName,
10378
10378
  toolCallId: G.toolCallId,
@@ -10391,7 +10391,7 @@ function hd(t) {
10391
10391
  status: "success",
10392
10392
  queryConfig: Se,
10393
10393
  message: "The data has been visualized",
10394
- records: (Nt = ke == null ? void 0 : ke.data) == null ? void 0 : Nt.records
10394
+ records: (vt = ke == null ? void 0 : ke.data) == null ? void 0 : vt.records
10395
10395
  }
10396
10396
  });
10397
10397
  } else
@@ -10403,7 +10403,7 @@ function hd(t) {
10403
10403
  }
10404
10404
  function pe(G) {
10405
10405
  const he = Ur(G);
10406
- N(he), U((Ue) => [
10406
+ v(he), U((Ue) => [
10407
10407
  ...Ue,
10408
10408
  {
10409
10409
  id: crypto.randomUUID(),
@@ -10455,7 +10455,7 @@ function hd(t) {
10455
10455
  pe(Ue);
10456
10456
  }
10457
10457
  }
10458
- const re = !["ready", "error"].includes(te), De = qr(Q);
10458
+ const re = !["ready", "error"].includes(te), De = qr(W);
10459
10459
  return {
10460
10460
  messages: j,
10461
10461
  setMessages: U,
@@ -10466,7 +10466,7 @@ function hd(t) {
10466
10466
  handleAddCurrentTableToScope: se,
10467
10467
  removeFromCurrentSelections: oe,
10468
10468
  currentAssitantScope: h,
10469
- setCurrentAssitantScope: N,
10469
+ setCurrentAssitantScope: v,
10470
10470
  stop: ee,
10471
10471
  status: te,
10472
10472
  toolStatus: s,
@@ -10493,7 +10493,7 @@ function ps({
10493
10493
  }) {
10494
10494
  const r = Ke(null), [o, d] = q(!1), [l, c] = q($s), [i, u] = q(!1), [g, f] = q(!1), [p, k] = q(!1), m = t ?? p, h = _r(), { setCurrentAIContext: x } = qs(), { clearQueue: b } = Jr(), { clearFileAttachments: y } = Hr(), V = Yr("editor"), M = Ce((le) => le.dashboard.aiContext), w = I((le) => le.card.dataSource), A = I((le) => le.actions.setCardSql), C = I((le) => le.actions.setRunSql), S = I((le) => le.showAIDialog), D = Ce(
10495
10495
  (le) => le.handleOpenAssistantProfile
10496
- ), { setShowAIDialog: R, setCardPython: v } = ne(), { setDataSource: N } = ne(), { assistantProfile: O } = Wr(), {
10496
+ ), { setShowAIDialog: R, setCardPython: N } = ne(), { setDataSource: v } = ne(), { assistantProfile: O } = Qr(), {
10497
10497
  messages: P,
10498
10498
  setMessages: E,
10499
10499
  sendMessage: F,
@@ -10501,7 +10501,7 @@ function ps({
10501
10501
  stop: j,
10502
10502
  status: U,
10503
10503
  llmUsage: ae,
10504
- errorMessage: Q,
10504
+ errorMessage: W,
10505
10505
  clearError: X
10506
10506
  } = hd(), [te, z] = q(""), ee = (le) => {
10507
10507
  z(le.target.value);
@@ -10525,7 +10525,7 @@ function ps({
10525
10525
  totalMessageCount: pe,
10526
10526
  loadMoreMessages: se,
10527
10527
  resetMessageWindow: fe
10528
- } = Qr(P, {
10528
+ } = Wr(P, {
10529
10529
  maxVisibleMessages: 15,
10530
10530
  // Reduced from 50 to 15 for better performance
10531
10531
  initialLoadCount: 10,
@@ -10594,7 +10594,7 @@ function ps({
10594
10594
  Ze(!m);
10595
10595
  }, [m, Ze]);
10596
10596
  function Rt(le, Se) {
10597
- Se === "sql" ? (A(le), C(!0)) : Se === "python" && (v(le), C(!0));
10597
+ Se === "sql" ? (A(le), C(!0)) : Se === "python" && (N(le), C(!0));
10598
10598
  }
10599
10599
  function rt() {
10600
10600
  h.selectedEntities.length === 0 && x({
@@ -10618,7 +10618,7 @@ function ps({
10618
10618
  });
10619
10619
  }
10620
10620
  function Pt() {
10621
- return /* @__PURE__ */ a(Nn, { children: [
10621
+ return /* @__PURE__ */ a(vn, { children: [
10622
10622
  /* @__PURE__ */ e(yn, { asChild: !0, children: /* @__PURE__ */ e(
10623
10623
  K,
10624
10624
  {
@@ -10661,11 +10661,11 @@ function ps({
10661
10661
  function Vt() {
10662
10662
  return /* @__PURE__ */ e("div", { "data-role": "header", children: /* @__PURE__ */ e("div", { className: "text-lg font-semibold", children: "Assistant" }) });
10663
10663
  }
10664
- const vt = (te == null ? void 0 : te.length) === 0 && (P == null ? void 0 : P.filter((le) => le.role === "user").length) === 0, Nt = /* @__PURE__ */ a(
10664
+ const Nt = (te == null ? void 0 : te.length) === 0 && (P == null ? void 0 : P.filter((le) => le.role === "user").length) === 0, vt = /* @__PURE__ */ a(
10665
10665
  "div",
10666
10666
  {
10667
10667
  "data-role": "editor-assistant",
10668
- className: W(
10668
+ className: Q(
10669
10669
  "flex h-full w-full flex-col justify-between px-6 py-4",
10670
10670
  m && "rounded-2xl border border-border/60 bg-background px-8 pb-6 pt-6 shadow-xl"
10671
10671
  ),
@@ -10771,7 +10771,7 @@ function ps({
10771
10771
  disableQuickReplies: T
10772
10772
  }
10773
10773
  ),
10774
- !Mt && /* @__PURE__ */ e(li, { status: U, errorMessage: Q })
10774
+ !Mt && /* @__PURE__ */ e(li, { status: U, errorMessage: W })
10775
10775
  ] })
10776
10776
  }
10777
10777
  ),
@@ -10793,14 +10793,14 @@ function ps({
10793
10793
  ) }),
10794
10794
  /* @__PURE__ */ a("div", { className: "space-y-3", children: [
10795
10795
  /* @__PURE__ */ a("div", { children: [
10796
- vt && !O && /* @__PURE__ */ e(
10796
+ Nt && !O && /* @__PURE__ */ e(
10797
10797
  ri,
10798
10798
  {
10799
10799
  onClick: Lt,
10800
10800
  placeholders: pd
10801
10801
  }
10802
10802
  ),
10803
- /* @__PURE__ */ e("div", { children: vt && O && /* @__PURE__ */ e(
10803
+ /* @__PURE__ */ e("div", { children: Nt && O && /* @__PURE__ */ e(
10804
10804
  ii,
10805
10805
  {
10806
10806
  seedQuestions: O.seedQuestions || [],
@@ -10852,9 +10852,9 @@ function ps({
10852
10852
  }
10853
10853
  );
10854
10854
  return m && n ? Ji(
10855
- /* @__PURE__ */ e("div", { className: "pointer-events-auto absolute inset-0 z-50 flex bg-background px-6 pb-6 pt-[calc(var(--app-header-height,15px)+1rem)]", children: /* @__PURE__ */ e("div", { className: "flex h-full w-full", children: Nt }) }),
10855
+ /* @__PURE__ */ e("div", { className: "pointer-events-auto absolute inset-0 z-50 flex bg-background px-6 pb-6 pt-[calc(var(--app-header-height,15px)+1rem)]", children: /* @__PURE__ */ e("div", { className: "flex h-full w-full", children: vt }) }),
10856
10856
  n
10857
- ) : Nt;
10857
+ ) : vt;
10858
10858
  }
10859
10859
  function fd({
10860
10860
  selectedChart: t,
@@ -10864,7 +10864,7 @@ function fd({
10864
10864
  var i;
10865
10865
  if (t === "custom")
10866
10866
  return ((i = o == null ? void 0 : o.customCardPreferences) == null ? void 0 : i.componentName) || "Custom Visual";
10867
- const c = Wn.find((u) => u.id === t);
10867
+ const c = Qn.find((u) => u.id === t);
10868
10868
  return (c == null ? void 0 : c.label) || "Select chart type";
10869
10869
  };
10870
10870
  return /* @__PURE__ */ e("div", { children: /* @__PURE__ */ a(He, { open: n, onOpenChange: r, children: [
@@ -10894,7 +10894,7 @@ function fd({
10894
10894
  }
10895
10895
  return /* @__PURE__ */ e(Yn, { className: "h-4 w-4" });
10896
10896
  }
10897
- const c = Wn.find((u) => u.id === t);
10897
+ const c = Qn.find((u) => u.id === t);
10898
10898
  if (c) {
10899
10899
  const u = c.icon;
10900
10900
  return /* @__PURE__ */ e(u, { className: "h-4 w-4" });
@@ -10908,7 +10908,7 @@ function fd({
10908
10908
  }
10909
10909
  ) }),
10910
10910
  /* @__PURE__ */ e(
10911
- We,
10911
+ Qe,
10912
10912
  {
10913
10913
  className: "w-[360px] p-3",
10914
10914
  align: "start",
@@ -11118,7 +11118,7 @@ function bd({
11118
11118
  ] })
11119
11119
  ] });
11120
11120
  }
11121
- function vd({
11121
+ function Nd({
11122
11122
  valueAliases: t,
11123
11123
  onValueAliasesChange: s
11124
11124
  }) {
@@ -11232,7 +11232,7 @@ function vd({
11232
11232
  className: "mt-1 h-8 text-xs",
11233
11233
  onClick: i,
11234
11234
  children: [
11235
- /* @__PURE__ */ e(Qe, { className: "mr-1 h-3 w-3" }),
11235
+ /* @__PURE__ */ e(We, { className: "mr-1 h-3 w-3" }),
11236
11236
  " Add Value Alias"
11237
11237
  ]
11238
11238
  }
@@ -11240,7 +11240,7 @@ function vd({
11240
11240
  ] })
11241
11241
  ] });
11242
11242
  }
11243
- function Nd({ idx: t }) {
11243
+ function vd({ idx: t }) {
11244
11244
  var c;
11245
11245
  const s = I((i) => {
11246
11246
  var u;
@@ -11286,7 +11286,7 @@ function Nd({ idx: t }) {
11286
11286
  }
11287
11287
  return /* @__PURE__ */ a(He, { children: [
11288
11288
  /* @__PURE__ */ e(Ye, { children: /* @__PURE__ */ e(pi, { className: "size-4 rotate-[135deg] cursor-pointer text-muted-foreground hover:text-foreground" }) }),
11289
- /* @__PURE__ */ e(We, { className: "w-fit px-2 py-1", children: /* @__PURE__ */ a("div", { className: "flex gap-1", children: [
11289
+ /* @__PURE__ */ e(Qe, { className: "w-fit px-2 py-1", children: /* @__PURE__ */ a("div", { className: "flex gap-1", children: [
11290
11290
  /* @__PURE__ */ e(
11291
11291
  "button",
11292
11292
  {
@@ -11303,7 +11303,7 @@ function Nd({ idx: t }) {
11303
11303
  children: /* @__PURE__ */ e(
11304
11304
  ro,
11305
11305
  {
11306
- className: W("h-4 w-4", {
11306
+ className: Q("h-4 w-4", {
11307
11307
  "rotate-90": o === "y"
11308
11308
  })
11309
11309
  }
@@ -11318,7 +11318,7 @@ function Nd({ idx: t }) {
11318
11318
  children: /* @__PURE__ */ e(
11319
11319
  co,
11320
11320
  {
11321
- className: W("h-4 w-4", {
11321
+ className: Q("h-4 w-4", {
11322
11322
  "rotate-90": o === "y"
11323
11323
  })
11324
11324
  }
@@ -11333,7 +11333,7 @@ function Nd({ idx: t }) {
11333
11333
  children: /* @__PURE__ */ e(
11334
11334
  oo,
11335
11335
  {
11336
- className: W("h-4 w-4", {
11336
+ className: Q("h-4 w-4", {
11337
11337
  "rotate-90": o === "y"
11338
11338
  })
11339
11339
  }
@@ -11352,7 +11352,7 @@ function Ln({
11352
11352
  /* @__PURE__ */ e(Re, { asChild: !0, children: /* @__PURE__ */ e(
11353
11353
  "span",
11354
11354
  {
11355
- className: W(
11355
+ className: Q(
11356
11356
  "overflow-hidden text-ellipsis whitespace-nowrap",
11357
11357
  s
11358
11358
  ),
@@ -11409,7 +11409,7 @@ function Cd({
11409
11409
  return /* @__PURE__ */ a(
11410
11410
  "div",
11411
11411
  {
11412
- className: W(
11412
+ className: Q(
11413
11413
  "group flex items-center justify-between gap-2 rounded-md",
11414
11414
  n
11415
11415
  ),
@@ -11420,7 +11420,7 @@ function Cd({
11420
11420
  kn,
11421
11421
  {
11422
11422
  onClick: () => u("bar"),
11423
- className: W(
11423
+ className: Q(
11424
11424
  "size-4 cursor-pointer text-muted-foreground hover:text-foreground",
11425
11425
  r
11426
11426
  )
@@ -11430,7 +11430,7 @@ function Cd({
11430
11430
  Sn,
11431
11431
  {
11432
11432
  onClick: () => u("line"),
11433
- className: W(
11433
+ className: Q(
11434
11434
  "size-4 cursor-pointer text-muted-foreground hover:text-foreground",
11435
11435
  r
11436
11436
  )
@@ -11440,13 +11440,13 @@ function Cd({
11440
11440
  zs,
11441
11441
  {
11442
11442
  onClick: () => u("area"),
11443
- className: W(
11443
+ className: Q(
11444
11444
  "size-4 cursor-pointer text-muted-foreground hover:text-foreground",
11445
11445
  r
11446
11446
  )
11447
11447
  }
11448
11448
  ),
11449
- /* @__PURE__ */ e(Nd, { idx: s })
11449
+ /* @__PURE__ */ e(vd, { idx: s })
11450
11450
  ] })
11451
11451
  ]
11452
11452
  }
@@ -11889,28 +11889,28 @@ function fl({
11889
11889
  const [l, c] = q(""), [i, u] = q("ratio"), [g, f] = q(null), [p, k] = q(null), [m, h] = q(1), [x, b] = q(""), [y, V] = q({
11890
11890
  format: "number",
11891
11891
  decimalPlaces: 2
11892
- }), [M, w] = q({}), A = Ca.find((N) => N.id === i), C = n.find((N) => N.id === g), S = n.find((N) => N.id === p);
11892
+ }), [M, w] = q({}), A = Ca.find((v) => v.id === i), C = n.find((v) => v.id === g), S = n.find((v) => v.id === p);
11893
11893
  ue(() => {
11894
11894
  if (r && t)
11895
11895
  if (c(r.label), r.calculatedFormula)
11896
11896
  if (u(r.calculatedFormula.operation), r.calculatedFormula.operation === "custom")
11897
11897
  b(r.expression || "");
11898
11898
  else if (r.calculatedFormula.operation === "scale") {
11899
- const N = r.calculatedFormula.inputFields;
11900
- if (N.length >= 1) {
11899
+ const v = r.calculatedFormula.inputFields;
11900
+ if (v.length >= 1) {
11901
11901
  const O = n.find(
11902
- (P) => P.qualifiedFieldName === N[0].qualifiedFieldName
11902
+ (P) => P.qualifiedFieldName === v[0].qualifiedFieldName
11903
11903
  );
11904
11904
  f((O == null ? void 0 : O.id) || null);
11905
11905
  }
11906
11906
  r.calculatedFormula.constant !== void 0 && h(r.calculatedFormula.constant);
11907
11907
  } else {
11908
- const N = r.calculatedFormula.inputFields;
11909
- if (N.length >= 2) {
11908
+ const v = r.calculatedFormula.inputFields;
11909
+ if (v.length >= 2) {
11910
11910
  const O = n.find(
11911
- (E) => E.qualifiedFieldName === N[0].qualifiedFieldName
11911
+ (E) => E.qualifiedFieldName === v[0].qualifiedFieldName
11912
11912
  ), P = n.find(
11913
- (E) => E.qualifiedFieldName === N[1].qualifiedFieldName
11913
+ (E) => E.qualifiedFieldName === v[1].qualifiedFieldName
11914
11914
  );
11915
11915
  f((O == null ? void 0 : O.id) || null), k((P == null ? void 0 : P.id) || null);
11916
11916
  }
@@ -11919,11 +11919,11 @@ function fl({
11919
11919
  u("custom"), b(r.expression || "");
11920
11920
  }, [r, t, n]);
11921
11921
  const D = () => {
11922
- const N = {};
11923
- return l.trim() || (N.name = "Name is required"), i === "custom" ? x.trim() || (N.customExpression = "Custom expression is required") : i === "scale" ? (g || (N.inputA = "Please select a metric for input A"), (isNaN(m) || m === 0) && (N.constantFactor = "Please enter a valid non-zero number"), r && g === r.id && (N.circular = "Cannot reference the field being edited")) : (g || (N.inputA = "Please select a metric for input A"), p || (N.inputB = "Please select a metric for input B"), g === p && (N.inputs = "Inputs A and B must be different metrics"), r && (g === r.id || p === r.id) && (N.circular = "Cannot reference the field being edited")), w(N), Object.keys(N).length === 0;
11922
+ const v = {};
11923
+ return l.trim() || (v.name = "Name is required"), i === "custom" ? x.trim() || (v.customExpression = "Custom expression is required") : i === "scale" ? (g || (v.inputA = "Please select a metric for input A"), (isNaN(m) || m === 0) && (v.constantFactor = "Please enter a valid non-zero number"), r && g === r.id && (v.circular = "Cannot reference the field being edited")) : (g || (v.inputA = "Please select a metric for input A"), p || (v.inputB = "Please select a metric for input B"), g === p && (v.inputs = "Inputs A and B must be different metrics"), r && (g === r.id || p === r.id) && (v.circular = "Cannot reference the field being edited")), w(v), Object.keys(v).length === 0;
11924
11924
  }, R = () => {
11925
11925
  if (!D()) return;
11926
- const N = xd(
11926
+ const v = xd(
11927
11927
  l,
11928
11928
  i,
11929
11929
  C || null,
@@ -11934,8 +11934,8 @@ function fl({
11934
11934
  i === "custom" ? x : void 0,
11935
11935
  i === "scale" ? m : void 0
11936
11936
  );
11937
- o(N), v();
11938
- }, v = () => {
11937
+ o(v), N();
11938
+ }, N = () => {
11939
11939
  c(""), u("ratio"), f(null), k(null), h(1), b(""), w({}), s(!1);
11940
11940
  };
11941
11941
  return /* @__PURE__ */ a(St, { modal: !1, open: t, onOpenChange: s, children: [
@@ -11944,8 +11944,8 @@ function fl({
11944
11944
  kt,
11945
11945
  {
11946
11946
  className: "max-w-md max-h-[90vh] overflow-y-auto",
11947
- onInteractOutside: (N) => {
11948
- N.preventDefault();
11947
+ onInteractOutside: (v) => {
11948
+ v.preventDefault();
11949
11949
  },
11950
11950
  children: [
11951
11951
  /* @__PURE__ */ a(Tt, { children: [
@@ -11963,7 +11963,7 @@ function fl({
11963
11963
  {
11964
11964
  id: "name",
11965
11965
  value: l,
11966
- onChange: (N) => c(N.target.value),
11966
+ onChange: (v) => c(v.target.value),
11967
11967
  placeholder: "e.g., Profit Margin",
11968
11968
  className: M.name ? "border-red-500" : ""
11969
11969
  }
@@ -11976,17 +11976,17 @@ function fl({
11976
11976
  _,
11977
11977
  {
11978
11978
  value: i,
11979
- onValueChange: (N) => {
11980
- u(N), N === "custom" ? (f(null), k(null)) : i === "custom" && b("");
11979
+ onValueChange: (v) => {
11980
+ u(v), v === "custom" ? (f(null), k(null)) : i === "custom" && b("");
11981
11981
  },
11982
11982
  children: [
11983
11983
  /* @__PURE__ */ e(J, { id: "operation", children: /* @__PURE__ */ e(H, {}) }),
11984
11984
  /* @__PURE__ */ e(Y, { children: /* @__PURE__ */ a(Ut, { children: [
11985
11985
  /* @__PURE__ */ e(la, { children: "CALCULATED" }),
11986
- Ca.map((N) => /* @__PURE__ */ e(B, { value: N.id, children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
11987
- /* @__PURE__ */ e("span", { className: "font-mono text-sm", children: N.symbol }),
11988
- /* @__PURE__ */ e("span", { children: N.label })
11989
- ] }) }, N.id))
11986
+ Ca.map((v) => /* @__PURE__ */ e(B, { value: v.id, children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
11987
+ /* @__PURE__ */ e("span", { className: "font-mono text-sm", children: v.symbol }),
11988
+ /* @__PURE__ */ e("span", { children: v.label })
11989
+ ] }) }, v.id))
11990
11990
  ] }) })
11991
11991
  ]
11992
11992
  }
@@ -12000,9 +12000,9 @@ function fl({
12000
12000
  {
12001
12001
  id: "customExpression",
12002
12002
  value: x,
12003
- onChange: (N) => b(N.target.value),
12003
+ onChange: (v) => b(v.target.value),
12004
12004
  placeholder: "e.g., CASE WHEN revenue > 1000 THEN revenue - cost ELSE 0 END",
12005
- className: W(
12005
+ className: Q(
12006
12006
  "font-mono text-sm",
12007
12007
  M.customExpression && "border-red-500"
12008
12008
  ),
@@ -12033,11 +12033,11 @@ function fl({
12033
12033
  }
12034
12034
  ),
12035
12035
  /* @__PURE__ */ e(Y, { children: n.filter(
12036
- (N) => !Na(N) || N.id !== (r == null ? void 0 : r.id)
12037
- ).map((N) => /* @__PURE__ */ a(B, { value: N.id, children: [
12038
- N.label || N.name,
12039
- N.aggregate && ` (${N.aggregate})`
12040
- ] }, N.id)) })
12036
+ (v) => !va(v) || v.id !== (r == null ? void 0 : r.id)
12037
+ ).map((v) => /* @__PURE__ */ a(B, { value: v.id, children: [
12038
+ v.label || v.name,
12039
+ v.aggregate && ` (${v.aggregate})`
12040
+ ] }, v.id)) })
12041
12041
  ] })
12042
12042
  ] }),
12043
12043
  M.inputA && /* @__PURE__ */ e("p", { className: "text-xs text-red-500", children: M.inputA })
@@ -12055,11 +12055,11 @@ function fl({
12055
12055
  }
12056
12056
  ),
12057
12057
  /* @__PURE__ */ e(Y, { children: n.filter(
12058
- (N) => !Na(N) || N.id !== (r == null ? void 0 : r.id)
12059
- ).map((N) => /* @__PURE__ */ a(B, { value: N.id, children: [
12060
- N.label || N.name,
12061
- N.aggregate && ` (${N.aggregate})`
12062
- ] }, N.id)) })
12058
+ (v) => !va(v) || v.id !== (r == null ? void 0 : r.id)
12059
+ ).map((v) => /* @__PURE__ */ a(B, { value: v.id, children: [
12060
+ v.label || v.name,
12061
+ v.aggregate && ` (${v.aggregate})`
12062
+ ] }, v.id)) })
12063
12063
  ] })
12064
12064
  ] }),
12065
12065
  M.inputB && /* @__PURE__ */ e("p", { className: "text-xs text-red-500", children: M.inputB })
@@ -12073,7 +12073,7 @@ function fl({
12073
12073
  type: "number",
12074
12074
  step: "any",
12075
12075
  value: m,
12076
- onChange: (N) => h(parseFloat(N.target.value) || 0),
12076
+ onChange: (v) => h(parseFloat(v.target.value) || 0),
12077
12077
  placeholder: "e.g., 0.15",
12078
12078
  className: M.constantFactor ? "border-red-500" : ""
12079
12079
  }
@@ -12087,7 +12087,7 @@ function fl({
12087
12087
  _,
12088
12088
  {
12089
12089
  value: y.format,
12090
- onValueChange: (N) => V({ ...y, format: N }),
12090
+ onValueChange: (v) => V({ ...y, format: v }),
12091
12091
  children: [
12092
12092
  /* @__PURE__ */ e(J, { id: "format", children: /* @__PURE__ */ e(H, {}) }),
12093
12093
  /* @__PURE__ */ a(Y, { children: [
@@ -12103,13 +12103,13 @@ function fl({
12103
12103
  }
12104
12104
  )
12105
12105
  ] }),
12106
- (M.inputs || M.circular) && /* @__PURE__ */ a(vi, { variant: "destructive", children: [
12106
+ (M.inputs || M.circular) && /* @__PURE__ */ a(Ni, { variant: "destructive", children: [
12107
12107
  /* @__PURE__ */ e(ks, { className: "h-4 w-4" }),
12108
- /* @__PURE__ */ e(Ni, { children: M.inputs || M.circular })
12108
+ /* @__PURE__ */ e(vi, { children: M.inputs || M.circular })
12109
12109
  ] })
12110
12110
  ] }),
12111
12111
  /* @__PURE__ */ a(xa, { children: [
12112
- /* @__PURE__ */ e(K, { variant: "outline", onClick: v, children: "Cancel" }),
12112
+ /* @__PURE__ */ e(K, { variant: "outline", onClick: N, children: "Cancel" }),
12113
12113
  /* @__PURE__ */ a(K, { onClick: R, children: [
12114
12114
  r ? "Update" : "Create",
12115
12115
  " Metric"
@@ -12150,9 +12150,9 @@ function Ad({
12150
12150
  handleKpiTrendlineWindowChange: C,
12151
12151
  handleKpiTrendlineGranularityChange: S,
12152
12152
  handleKpiTargetValueChange: D
12153
- } = Js(k), [R, v] = q(!1), [N, O] = q(!1), [P, E] = q(!1), [F, T] = q(null), [j, U] = q(
12153
+ } = Js(k), [R, N] = q(!1), [v, O] = q(!1), [P, E] = q(!1), [F, T] = q(null), [j, U] = q(
12154
12154
  t.dateFormat || "YYYY-MM-DD"
12155
- ), [ae, Q] = q(t.customFormat || ""), [X, te] = q(!!t.customFormat), [z, ee] = q(
12155
+ ), [ae, W] = q(t.customFormat || ""), [X, te] = q(!!t.customFormat), [z, ee] = q(
12156
12156
  t.granularity || "day"
12157
12157
  ), [$, ie] = q(
12158
12158
  t.aliasTemplate || ""
@@ -12161,11 +12161,11 @@ function Ad({
12161
12161
  ), [se, fe] = q((Pn = t.parameters) == null ? void 0 : Pn.filters), re = (Z) => {
12162
12162
  Z === "custom" ? te(!0) : (te(!1), U(Z), s === "groupBy" && x(n, Z, ""));
12163
12163
  }, De = (Z) => {
12164
- Q(Z), s === "groupBy" && x(n, "custom", Z);
12164
+ W(Z), s === "groupBy" && x(n, "custom", Z);
12165
12165
  }, Ge = (Z) => {
12166
12166
  var Oe;
12167
12167
  ee(Z);
12168
- const ce = (Oe = Qn(Z)[0]) == null ? void 0 : Oe.value;
12168
+ const ce = (Oe = Wn(Z)[0]) == null ? void 0 : Oe.value;
12169
12169
  ce && !X && (U(ce), s === "groupBy" && x(n, ce, "")), s === "groupBy" && b(n, Z);
12170
12170
  }, G = (Z) => {
12171
12171
  ie(Z), s === "metrics" && y(n, Z);
@@ -12193,8 +12193,8 @@ function Ad({
12193
12193
  }, Ze = {
12194
12194
  transform: Pa.Transform.toString(g),
12195
12195
  transition: f
12196
- }, xt = Ee(t.dataType), et = xt === "date", bt = l === "kpi", Rt = Qn(z), rt = s !== "pivotBy", Lt = et && s === "groupBy" && (!bt || ((Vn = k.config) == null ? void 0 : Vn.comparisonType) === "start_vs_end"), Ft = !bt && et && s === "groupBy", Pt = l && wi.includes(l) && et && s === "groupBy", Vt = l === "kpi" && et && s === "groupBy", vt = l && l !== "pivotTable" && s === "metrics" && ((Bn = k.config) == null ? void 0 : Bn.comparisonType) === "target", Nt = s === "metrics", le = () => {
12197
- const Z = t, ye = s === "metrics" && Na(Z);
12196
+ }, xt = Ee(t.dataType), et = xt === "date", bt = l === "kpi", Rt = Wn(z), rt = s !== "pivotBy", Lt = et && s === "groupBy" && (!bt || ((Vn = k.config) == null ? void 0 : Vn.comparisonType) === "start_vs_end"), Ft = !bt && et && s === "groupBy", Pt = l && wi.includes(l) && et && s === "groupBy", Vt = l === "kpi" && et && s === "groupBy", Nt = l && l !== "pivotTable" && s === "metrics" && ((Bn = k.config) == null ? void 0 : Bn.comparisonType) === "target", vt = s === "metrics", le = () => {
12197
+ const Z = t, ye = s === "metrics" && va(Z);
12198
12198
  return /* @__PURE__ */ a("div", { className: "space-y-1", children: [
12199
12199
  !ye && /* @__PURE__ */ e(
12200
12200
  "div",
@@ -12361,7 +12361,7 @@ function Ad({
12361
12361
  ] });
12362
12362
  }, bl = () => {
12363
12363
  var Z, ye;
12364
- return vt ? /* @__PURE__ */ a("div", { className: "space-y-1", children: [
12364
+ return Nt ? /* @__PURE__ */ a("div", { className: "space-y-1", children: [
12365
12365
  /* @__PURE__ */ e(L, { className: "text-xs font-medium text-muted-foreground", children: "Target Value" }),
12366
12366
  /* @__PURE__ */ e(
12367
12367
  ze,
@@ -12375,9 +12375,9 @@ function Ad({
12375
12375
  }
12376
12376
  )
12377
12377
  ] }) : null;
12378
- }, vl = () => {
12379
- if (!Nt) return null;
12380
- const ye = Na(t);
12378
+ }, Nl = () => {
12379
+ if (!vt) return null;
12380
+ const ye = va(t);
12381
12381
  return /* @__PURE__ */ a(de, { children: [
12382
12382
  ye && /* @__PURE__ */ a("div", { className: "space-y-1", children: [
12383
12383
  /* @__PURE__ */ e(L, { className: "text-xs font-medium text-muted-foreground", children: "Formula" }),
@@ -12520,7 +12520,7 @@ function Ad({
12520
12520
  }
12521
12521
  ),
12522
12522
  /* @__PURE__ */ e(
12523
- vd,
12523
+ Nd,
12524
12524
  {
12525
12525
  valueAliases: oe,
12526
12526
  onValueAliasesChange: he
@@ -12528,7 +12528,7 @@ function Ad({
12528
12528
  )
12529
12529
  ] })
12530
12530
  ] });
12531
- }, { columns: Nl = [] } = oa(), yl = (se == null ? void 0 : se.conditions) && se.conditions.length > 0;
12531
+ }, { columns: vl = [] } = oa(), yl = (se == null ? void 0 : se.conditions) && se.conditions.length > 0;
12532
12532
  return /* @__PURE__ */ a(de, { children: [
12533
12533
  /* @__PURE__ */ a(
12534
12534
  "div",
@@ -12544,7 +12544,7 @@ function Ad({
12544
12544
  /* @__PURE__ */ e(
12545
12545
  Ln,
12546
12546
  {
12547
- className: W(
12547
+ className: Q(
12548
12548
  "w-[140px] flex-1 text-sm",
12549
12549
  yl && "w-[120px]"
12550
12550
  ),
@@ -12570,7 +12570,7 @@ function Ad({
12570
12570
  size: "sm",
12571
12571
  className: "h-6 w-6 p-0",
12572
12572
  onClick: (Z) => {
12573
- Z.stopPropagation(), v(!R);
12573
+ Z.stopPropagation(), N(!R);
12574
12574
  },
12575
12575
  children: /* @__PURE__ */ e(
12576
12576
  lt,
@@ -12597,7 +12597,7 @@ function Ad({
12597
12597
  ye
12598
12598
  ), o(ye);
12599
12599
  },
12600
- children: r === "asc" ? /* @__PURE__ */ e(Ns, { className: "h-3 w-3" }) : /* @__PURE__ */ e(ys, { className: "h-3 w-3" })
12600
+ children: r === "asc" ? /* @__PURE__ */ e(vs, { className: "h-3 w-3" }) : /* @__PURE__ */ e(ys, { className: "h-3 w-3" })
12601
12601
  }
12602
12602
  ),
12603
12603
  /* @__PURE__ */ e(
@@ -12620,19 +12620,19 @@ function Ad({
12620
12620
  yt(),
12621
12621
  xl(),
12622
12622
  bl(),
12623
- vl()
12623
+ Nl()
12624
12624
  ] })
12625
12625
  ]
12626
12626
  }
12627
12627
  ),
12628
- N && /* @__PURE__ */ e(
12628
+ v && /* @__PURE__ */ e(
12629
12629
  pl,
12630
12630
  {
12631
- open: N,
12631
+ open: v,
12632
12632
  onOpenChange: (Z) => {
12633
12633
  O(Z), Z || T(null);
12634
12634
  },
12635
- availableFields: Nl,
12635
+ availableFields: vl,
12636
12636
  existingFilters: se,
12637
12637
  editingCondition: F,
12638
12638
  onSave: (Z) => {
@@ -12791,7 +12791,7 @@ function pa({
12791
12791
  /* @__PURE__ */ e(
12792
12792
  L,
12793
12793
  {
12794
- className: W("block text-sm font-medium", {
12794
+ className: Q("block text-sm font-medium", {
12795
12795
  // 'text-green-600': zone === 'metrics',
12796
12796
  // 'text-blue-600': zone === 'groupBy',
12797
12797
  // 'text-purple-600': zone === 'pivotBy',
@@ -12805,7 +12805,7 @@ function pa({
12805
12805
  "div",
12806
12806
  {
12807
12807
  ref: i,
12808
- className: W(
12808
+ className: Q(
12809
12809
  "rounded-lg border-2 border-dotted p-0.5 transition-all",
12810
12810
  {
12811
12811
  // Valid drop - green feedback
@@ -12896,11 +12896,11 @@ function Dd({
12896
12896
  className: "w-full",
12897
12897
  children: [
12898
12898
  /* @__PURE__ */ a(be, { value: "fields", className: "border-b-0", children: [
12899
- /* @__PURE__ */ e(ve, { className: "flex w-full items-center gap-2 py-2 text-sm font-medium hover:no-underline", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
12899
+ /* @__PURE__ */ e(Ne, { className: "flex w-full items-center gap-2 py-2 text-sm font-medium hover:no-underline", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
12900
12900
  /* @__PURE__ */ e(Ti, { className: "h-4 w-4 text-muted-foreground" }),
12901
12901
  /* @__PURE__ */ e("span", { children: "FIELDS" })
12902
12902
  ] }) }),
12903
- /* @__PURE__ */ a(Ne, { className: "space-y-4 pt-2", children: [
12903
+ /* @__PURE__ */ a(ve, { className: "space-y-4 pt-2", children: [
12904
12904
  p && /* @__PURE__ */ e(
12905
12905
  pa,
12906
12906
  {
@@ -12958,18 +12958,18 @@ function Dd({
12958
12958
  ] })
12959
12959
  ] }),
12960
12960
  !c && /* @__PURE__ */ a(be, { value: "configuration", className: "border-b-0", children: [
12961
- /* @__PURE__ */ e(ve, { className: "flex w-full items-center gap-2 py-2 text-sm font-medium hover:no-underline", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
12961
+ /* @__PURE__ */ e(Ne, { className: "flex w-full items-center gap-2 py-2 text-sm font-medium hover:no-underline", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
12962
12962
  /* @__PURE__ */ e(Ls, { className: "h-4 w-4 text-muted-foreground" }),
12963
12963
  /* @__PURE__ */ e("span", { children: "CONFIGURATION" })
12964
12964
  ] }) }),
12965
- /* @__PURE__ */ e(Ne, { className: "rounded-md border border-border bg-muted/50 px-3 py-0", children: /* @__PURE__ */ e(_t, { type: "single", collapsible: !0, className: "w-full", children: /* @__PURE__ */ e(hl, { mode: "config" }) }) })
12965
+ /* @__PURE__ */ e(ve, { className: "rounded-md border border-border bg-muted/50 px-3 py-0", children: /* @__PURE__ */ e(_t, { type: "single", collapsible: !0, className: "w-full", children: /* @__PURE__ */ e(hl, { mode: "config" }) }) })
12966
12966
  ] }),
12967
12967
  c && /* @__PURE__ */ a(be, { value: "plugin", className: "border-b-0", children: [
12968
- /* @__PURE__ */ e(ve, { className: "flex w-full items-center gap-2 py-2 text-sm font-medium hover:no-underline", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
12969
- /* @__PURE__ */ e(Ws, { className: "h-4 w-4 text-muted-foreground" }),
12968
+ /* @__PURE__ */ e(Ne, { className: "flex w-full items-center gap-2 py-2 text-sm font-medium hover:no-underline", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
12969
+ /* @__PURE__ */ e(Qs, { className: "h-4 w-4 text-muted-foreground" }),
12970
12970
  /* @__PURE__ */ e("span", { children: "CONFIGURATION" })
12971
12971
  ] }) }),
12972
- /* @__PURE__ */ e(Ne, { className: "rounded-md border border-border bg-muted/50 px-3 py-0", children: /* @__PURE__ */ e(dl, {}) })
12972
+ /* @__PURE__ */ e(ve, { className: "rounded-md border border-border bg-muted/50 px-3 py-0", children: /* @__PURE__ */ e(dl, {}) })
12973
12973
  ] })
12974
12974
  ]
12975
12975
  }
@@ -13008,7 +13008,7 @@ function Od({ onEditJoins: t }) {
13008
13008
  }));
13009
13009
  return /* @__PURE__ */ e(wa, { className: "border-blue-500/30 bg-blue-50/30 dark:bg-blue-950/20", children: /* @__PURE__ */ a("div", { className: "flex items-center justify-between p-3", children: [
13010
13010
  /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
13011
- /* @__PURE__ */ e(vo, { className: "size-4 text-blue-600 dark:text-blue-400" }),
13011
+ /* @__PURE__ */ e(No, { className: "size-4 text-blue-600 dark:text-blue-400" }),
13012
13012
  /* @__PURE__ */ e("h3", { className: "text-sm font-medium text-blue-900 dark:text-blue-100", children: "Auto-Resolved Joins" }),
13013
13013
  /* @__PURE__ */ e(qe, { children: /* @__PURE__ */ a(Me, { children: [
13014
13014
  /* @__PURE__ */ e(Re, { asChild: !0, children: /* @__PURE__ */ e(
@@ -13163,14 +13163,14 @@ function Id({
13163
13163
  /* @__PURE__ */ a(
13164
13164
  "div",
13165
13165
  {
13166
- className: W("px-6 pt-4", {
13166
+ className: Q("px-6 pt-4", {
13167
13167
  "space-y-4": c
13168
13168
  }),
13169
13169
  children: [
13170
13170
  /* @__PURE__ */ e(
13171
13171
  "div",
13172
13172
  {
13173
- className: W(
13173
+ className: Q(
13174
13174
  "overflow-hidden transition-all duration-300 ease-in-out",
13175
13175
  c ? "max-h-[200px] opacity-100" : "max-h-0 opacity-0"
13176
13176
  ),
@@ -13202,10 +13202,10 @@ function Id({
13202
13202
  ]
13203
13203
  }
13204
13204
  ),
13205
- /* @__PURE__ */ e("div", { className: W("flex justify-end gap-2 px-6 py-6"), children: /* @__PURE__ */ e(
13205
+ /* @__PURE__ */ e("div", { className: Q("flex justify-end gap-2 px-6 py-6"), children: /* @__PURE__ */ e(
13206
13206
  "div",
13207
13207
  {
13208
- className: W("invisible flex gap-2", { visible: k || m }),
13208
+ className: Q("invisible flex gap-2", { visible: k || m }),
13209
13209
  children: /* @__PURE__ */ e(En, {})
13210
13210
  }
13211
13211
  ) }),
@@ -13344,10 +13344,10 @@ function Md({
13344
13344
  );
13345
13345
  const D = (R) => R.id === w ? {
13346
13346
  ...R,
13347
- conditions: R.conditions.map((v) => v.id === A ? {
13348
- ...v,
13347
+ conditions: R.conditions.map((N) => N.id === A ? {
13348
+ ...N,
13349
13349
  [C]: S
13350
- } : v)
13350
+ } : N)
13351
13351
  } : {
13352
13352
  ...R,
13353
13353
  groups: R.groups.map(D)
@@ -13405,46 +13405,46 @@ function Md({
13405
13405
  let D = "";
13406
13406
  typeof S.field == "object" ? D = S.field.entityName ? `${S.field.entityName}.${S.field.name}` : S.field.name : D = String(S.field);
13407
13407
  const R = S.operator;
13408
- let v = S.value;
13408
+ let N = S.value;
13409
13409
  if (S.field.dataType === "string" && !["in", "not in"].includes(S.operator))
13410
- typeof v == "string" ? v = `'${v}'` : Array.isArray(v) && (v = `'${v.join(", ")}'`);
13410
+ typeof N == "string" ? N = `'${N}'` : Array.isArray(N) && (N = `'${N.join(", ")}'`);
13411
13411
  else if (S.field.dataType === "date" || S.field.dataType === "datetime" || S.field.dataType === "timestamp")
13412
- if (S.operator === "between" && Array.isArray(v) && v.length === 2) {
13413
- const N = v[0] ? `'${v[0]}'` : "NULL", O = v[1] ? `'${v[1]}'` : "NULL";
13414
- return `${D} BETWEEN ${N} AND ${O}`;
13415
- } else if ((S.operator === "in" || S.operator === "not in") && Array.isArray(v)) {
13416
- const N = v.map((O) => O ? `'${O}'` : "NULL").join(", ");
13417
- return `${D} ${R} (${N})`;
13418
- } else typeof v == "string" || v instanceof Date ? v = `'${v}'` : Array.isArray(v) && v.length > 0 && (v = `'${v[0]}'`);
13412
+ if (S.operator === "between" && Array.isArray(N) && N.length === 2) {
13413
+ const v = N[0] ? `'${N[0]}'` : "NULL", O = N[1] ? `'${N[1]}'` : "NULL";
13414
+ return `${D} BETWEEN ${v} AND ${O}`;
13415
+ } else if ((S.operator === "in" || S.operator === "not in") && Array.isArray(N)) {
13416
+ const v = N.map((O) => O ? `'${O}'` : "NULL").join(", ");
13417
+ return `${D} ${R} (${v})`;
13418
+ } else typeof N == "string" || N instanceof Date ? N = `'${N}'` : Array.isArray(N) && N.length > 0 && (N = `'${N[0]}'`);
13419
13419
  else if (["in", "not in"].includes(S.operator)) {
13420
- let N = [];
13421
- Array.isArray(v) ? N = v.map(
13420
+ let v = [];
13421
+ Array.isArray(N) ? v = N.map(
13422
13422
  (O) => typeof O == "string" ? `'${O}'` : String(O)
13423
- ) : typeof v == "string" ? N = v.split(",").map((O) => {
13423
+ ) : typeof N == "string" ? v = N.split(",").map((O) => {
13424
13424
  const P = O.trim();
13425
13425
  return S.field.dataType === "string" ? `'${P}'` : P;
13426
- }) : typeof v == "number" && (N = [String(v)]), v = `(${N.join(", ")})`;
13426
+ }) : typeof N == "number" && (v = [String(N)]), N = `(${v.join(", ")})`;
13427
13427
  }
13428
13428
  switch (R) {
13429
13429
  case "contains":
13430
- return typeof v == "string" ? `${D} LIKE '%${v.replace(/'/g, "")}'` : `${D} LIKE '%${String(v)}'`;
13430
+ return typeof N == "string" ? `${D} LIKE '%${N.replace(/'/g, "")}'` : `${D} LIKE '%${String(N)}'`;
13431
13431
  case "startsWith":
13432
- return typeof v == "string" ? `${D} LIKE '${v.replace(/'/g, "")}%'` : `${D} LIKE '${String(v)}%'`;
13432
+ return typeof N == "string" ? `${D} LIKE '${N.replace(/'/g, "")}%'` : `${D} LIKE '${String(N)}%'`;
13433
13433
  case "endsWith":
13434
- return typeof v == "string" ? `${D} LIKE '%${v.replace(/'/g, "")}'` : `${D} LIKE '%${String(v)}'`;
13434
+ return typeof N == "string" ? `${D} LIKE '%${N.replace(/'/g, "")}'` : `${D} LIKE '%${String(N)}'`;
13435
13435
  case "isNull":
13436
13436
  return `${D} IS NULL`;
13437
13437
  case "isNotNull":
13438
13438
  return `${D} IS NOT NULL`;
13439
13439
  default:
13440
- return `${D} ${R} ${v}`;
13440
+ return `${D} ${R} ${N}`;
13441
13441
  }
13442
13442
  }, C = (S) => {
13443
13443
  const D = S.conditions.map(A), R = S.groups.map(
13444
13444
  (P) => C(P)
13445
- ), v = [...D, ...R].filter(Boolean);
13446
- if (v.length === 0) return "";
13447
- const N = v.join(` ${S.logicalOperator} `), O = v.length > 1 ? `(${N})` : N;
13445
+ ), N = [...D, ...R].filter(Boolean);
13446
+ if (N.length === 0) return "";
13447
+ const v = N.join(` ${S.logicalOperator} `), O = N.length > 1 ? `(${v})` : v;
13448
13448
  return S.negate ? `NOT ${O}` : O;
13449
13449
  };
13450
13450
  return C(w);
@@ -13477,7 +13477,7 @@ function Rd({
13477
13477
  /* @__PURE__ */ e(Re, { asChild: !0, children: /* @__PURE__ */ e(
13478
13478
  "div",
13479
13479
  {
13480
- className: W(
13480
+ className: Q(
13481
13481
  "w-[200px] overflow-hidden text-ellipsis whitespace-nowrap text-sm",
13482
13482
  s
13483
13483
  ),
@@ -13515,7 +13515,7 @@ function Fd({
13515
13515
  variant: "outline",
13516
13516
  role: "combobox",
13517
13517
  "aria-expanded": d,
13518
- className: W(
13518
+ className: Q(
13519
13519
  "justify-between",
13520
13520
  !t && "text-muted-foreground",
13521
13521
  o
@@ -13530,11 +13530,11 @@ function Fd({
13530
13530
  ]
13531
13531
  }
13532
13532
  ) }),
13533
- /* @__PURE__ */ e(We, { className: "z-50 w-80 p-0", align: "start", children: /* @__PURE__ */ a(Jt, { children: [
13533
+ /* @__PURE__ */ e(Qe, { className: "z-50 w-80 p-0", align: "start", children: /* @__PURE__ */ a(Jt, { children: [
13534
13534
  /* @__PURE__ */ e(Ht, { placeholder: "Search fields...", className: "h-9" }),
13535
- /* @__PURE__ */ e(Wt, { children: "No fields found." }),
13535
+ /* @__PURE__ */ e(Qt, { children: "No fields found." }),
13536
13536
  /* @__PURE__ */ e(Yt, { className: "max-h-80", children: Object.entries(c).map(([i, u]) => /* @__PURE__ */ e(
13537
- Qt,
13537
+ Wt,
13538
13538
  {
13539
13539
  heading: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
13540
13540
  /* @__PURE__ */ e(na, { className: "h-3 w-3" }),
@@ -13557,7 +13557,7 @@ function Fd({
13557
13557
  /* @__PURE__ */ e(
13558
13558
  ta,
13559
13559
  {
13560
- className: W(
13560
+ className: Q(
13561
13561
  "mr-2 h-4 w-4",
13562
13562
  (t == null ? void 0 : t.id) === p.id ? "opacity-100" : "opacity-0"
13563
13563
  )
@@ -13649,7 +13649,7 @@ function Pd({
13649
13649
  }, u = (g) => {
13650
13650
  s.includes(g) ? n(s.filter((f) => f !== g)) : n([...s, g]);
13651
13651
  };
13652
- return /* @__PURE__ */ e("div", { className: W("w-full", o), children: /* @__PURE__ */ a(He, { open: d, onOpenChange: l, modal: !0, children: [
13652
+ return /* @__PURE__ */ e("div", { className: Q("w-full", o), children: /* @__PURE__ */ a(He, { open: d, onOpenChange: l, modal: !0, children: [
13653
13653
  /* @__PURE__ */ e(Ye, { asChild: !0, children: /* @__PURE__ */ a(
13654
13654
  K,
13655
13655
  {
@@ -13684,11 +13684,11 @@ function Pd({
13684
13684
  ]
13685
13685
  }
13686
13686
  ) }),
13687
- /* @__PURE__ */ e(We, { className: "z-50 w-fit overflow-auto p-0", align: "start", children: /* @__PURE__ */ a(Jt, { children: [
13687
+ /* @__PURE__ */ e(Qe, { className: "z-50 w-fit overflow-auto p-0", align: "start", children: /* @__PURE__ */ a(Jt, { children: [
13688
13688
  /* @__PURE__ */ e(Ht, { placeholder: "Search..." }),
13689
13689
  /* @__PURE__ */ a(Yt, { children: [
13690
- /* @__PURE__ */ e(Wt, { children: "No results found." }),
13691
- /* @__PURE__ */ e(Qt, { children: c.map((g, f) => /* @__PURE__ */ a(
13690
+ /* @__PURE__ */ e(Qt, { children: "No results found." }),
13691
+ /* @__PURE__ */ e(Wt, { children: c.map((g, f) => /* @__PURE__ */ a(
13692
13692
  Xt,
13693
13693
  {
13694
13694
  onSelect: () => u(g.value),
@@ -13696,7 +13696,7 @@ function Pd({
13696
13696
  /* @__PURE__ */ e(
13697
13697
  ta,
13698
13698
  {
13699
- className: W(
13699
+ className: Q(
13700
13700
  "mr-2 h-4 w-4",
13701
13701
  s.includes(g.value) ? "opacity-100" : "opacity-0"
13702
13702
  )
@@ -14091,20 +14091,20 @@ function _d({
14091
14091
  transform: Pa.Transform.toString(V),
14092
14092
  transition: M
14093
14093
  }, C = (D) => {
14094
- const { active: R, over: v } = D;
14095
- if (v && R.id !== v.id) {
14096
- const N = t.conditions.findIndex(
14094
+ const { active: R, over: N } = D;
14095
+ if (N && R.id !== N.id) {
14096
+ const v = t.conditions.findIndex(
14097
14097
  (P) => P.id === R.id
14098
14098
  ), O = t.conditions.findIndex(
14099
- (P) => P.id === v.id
14099
+ (P) => P.id === N.id
14100
14100
  );
14101
- N !== -1 && O !== -1 && u(t.id, N, O);
14101
+ v !== -1 && O !== -1 && u(t.id, v, O);
14102
14102
  }
14103
14103
  }, S = (D) => {
14104
- const { active: R, over: v } = D;
14105
- if (v && R.id !== v.id && n) {
14106
- const N = t.groups.findIndex((P) => P.id === R.id), O = t.groups.findIndex((P) => P.id === v.id);
14107
- N !== -1 && O !== -1 && g(n, N, O);
14104
+ const { active: R, over: N } = D;
14105
+ if (N && R.id !== N.id && n) {
14106
+ const v = t.groups.findIndex((P) => P.id === R.id), O = t.groups.findIndex((P) => P.id === N.id);
14107
+ v !== -1 && O !== -1 && g(n, v, O);
14108
14108
  }
14109
14109
  };
14110
14110
  return /* @__PURE__ */ a(
@@ -14231,7 +14231,7 @@ function _d({
14231
14231
  className: "h-7 text-xs",
14232
14232
  onClick: () => f(t.id),
14233
14233
  children: [
14234
- /* @__PURE__ */ e(Qe, { className: "mr-1 h-3 w-3" }),
14234
+ /* @__PURE__ */ e(We, { className: "mr-1 h-3 w-3" }),
14235
14235
  "Add Condition"
14236
14236
  ]
14237
14237
  }
@@ -14244,7 +14244,7 @@ function _d({
14244
14244
  className: "h-7 text-xs",
14245
14245
  onClick: () => p(t.id),
14246
14246
  children: [
14247
- /* @__PURE__ */ e(Qe, { className: "mr-1 h-3 w-3" }),
14247
+ /* @__PURE__ */ e(We, { className: "mr-1 h-3 w-3" }),
14248
14248
  "Add Group"
14249
14249
  ]
14250
14250
  }
@@ -14287,10 +14287,10 @@ function Jd({
14287
14287
  dt(sn, {
14288
14288
  coordinateGetter: nn
14289
14289
  })
14290
- ), [A, C] = q(!1), S = (v, N, O) => {
14291
- const P = (E) => E.id === v ? {
14290
+ ), [A, C] = q(!1), S = (N, v, O) => {
14291
+ const P = (E) => E.id === N ? {
14292
14292
  ...E,
14293
- conditions: E.conditions.map((F) => F.id === N ? {
14293
+ conditions: E.conditions.map((F) => F.id === v ? {
14294
14294
  ...F,
14295
14295
  field: O,
14296
14296
  dataType: O.dataType
@@ -14300,7 +14300,7 @@ function Jd({
14300
14300
  groups: E.groups.map(P)
14301
14301
  };
14302
14302
  M(P(d));
14303
- }, D = (v, N = 0, O) => N === 0 ? /* @__PURE__ */ e("div", { className: "rounded-lg", children: /* @__PURE__ */ a("div", { className: "p-3 px-0", children: [
14303
+ }, D = (N, v = 0, O) => v === 0 ? /* @__PURE__ */ e("div", { className: "rounded-lg", children: /* @__PURE__ */ a("div", { className: "p-3 px-0", children: [
14304
14304
  /* @__PURE__ */ e(
14305
14305
  Ot,
14306
14306
  {
@@ -14309,26 +14309,26 @@ function Jd({
14309
14309
  onDragEnd: (P) => {
14310
14310
  const { active: E, over: F } = P;
14311
14311
  if (F && E.id !== F.id) {
14312
- const T = v.conditions.findIndex(
14312
+ const T = N.conditions.findIndex(
14313
14313
  (U) => U.id === E.id
14314
- ), j = v.conditions.findIndex(
14314
+ ), j = N.conditions.findIndex(
14315
14315
  (U) => U.id === F.id
14316
14316
  );
14317
- T !== -1 && j !== -1 && x(v.id, T, j);
14317
+ T !== -1 && j !== -1 && x(N.id, T, j);
14318
14318
  }
14319
14319
  },
14320
14320
  children: /* @__PURE__ */ e(
14321
14321
  gt,
14322
14322
  {
14323
- items: v.conditions.map((P) => P.id),
14323
+ items: N.conditions.map((P) => P.id),
14324
14324
  strategy: Gt,
14325
- children: v.conditions.map((P, E) => /* @__PURE__ */ e(
14325
+ children: N.conditions.map((P, E) => /* @__PURE__ */ e(
14326
14326
  gl,
14327
14327
  {
14328
14328
  condition: P,
14329
14329
  index: E,
14330
- groupId: v.id,
14331
- groupLogicalOperator: v.logicalOperator,
14330
+ groupId: N.id,
14331
+ groupLogicalOperator: N.logicalOperator,
14332
14332
  onUpdateCondition: p,
14333
14333
  onUpdateField: S,
14334
14334
  onRemoveCondition: g,
@@ -14350,21 +14350,21 @@ function Jd({
14350
14350
  onDragEnd: (P) => {
14351
14351
  const { active: E, over: F } = P;
14352
14352
  if (F && E.id !== F.id) {
14353
- const T = v.groups.findIndex(
14353
+ const T = N.groups.findIndex(
14354
14354
  (U) => U.id === E.id
14355
- ), j = v.groups.findIndex(
14355
+ ), j = N.groups.findIndex(
14356
14356
  (U) => U.id === F.id
14357
14357
  );
14358
- T !== -1 && j !== -1 && b(v.id, T, j);
14358
+ T !== -1 && j !== -1 && b(N.id, T, j);
14359
14359
  }
14360
14360
  },
14361
14361
  children: /* @__PURE__ */ e(
14362
14362
  gt,
14363
14363
  {
14364
- items: v.groups.map((P) => P.id),
14364
+ items: N.groups.map((P) => P.id),
14365
14365
  strategy: Gt,
14366
- children: v.groups.map(
14367
- (P) => D(P, N + 1, v.id)
14366
+ children: N.groups.map(
14367
+ (P) => D(P, v + 1, N.id)
14368
14368
  )
14369
14369
  }
14370
14370
  )
@@ -14377,9 +14377,9 @@ function Jd({
14377
14377
  size: "sm",
14378
14378
  className: "h-7 text-xs",
14379
14379
  variant: "outline",
14380
- onClick: () => i(v.id),
14380
+ onClick: () => i(N.id),
14381
14381
  children: [
14382
- /* @__PURE__ */ e(Qe, { className: "mr-1 h-3 w-3" }),
14382
+ /* @__PURE__ */ e(We, { className: "mr-1 h-3 w-3" }),
14383
14383
  "Add Condition"
14384
14384
  ]
14385
14385
  }
@@ -14390,19 +14390,19 @@ function Jd({
14390
14390
  variant: "outline",
14391
14391
  size: "sm",
14392
14392
  className: "h-7 text-xs",
14393
- onClick: () => u(v.id),
14393
+ onClick: () => u(N.id),
14394
14394
  children: [
14395
- /* @__PURE__ */ e(Qe, { className: "mr-1 h-3 w-3" }),
14395
+ /* @__PURE__ */ e(We, { className: "mr-1 h-3 w-3" }),
14396
14396
  "Add Group"
14397
14397
  ]
14398
14398
  }
14399
14399
  )
14400
14400
  ] })
14401
- ] }) }, v.id) : /* @__PURE__ */ e(
14401
+ ] }) }, N.id) : /* @__PURE__ */ e(
14402
14402
  _d,
14403
14403
  {
14404
- group: v,
14405
- depth: N,
14404
+ group: N,
14405
+ depth: v,
14406
14406
  parentGroupId: O,
14407
14407
  onUpdateGroupOperator: m,
14408
14408
  onUpdateGroupNegate: h,
@@ -14418,7 +14418,7 @@ function Jd({
14418
14418
  renderFilterGroup: D,
14419
14419
  updateConditionFields: k
14420
14420
  },
14421
- v.id
14421
+ N.id
14422
14422
  ), R = Hs(t);
14423
14423
  return /* @__PURE__ */ a("div", { className: "space-y-4", children: [
14424
14424
  /* @__PURE__ */ e(wa, { children: /* @__PURE__ */ e(cn, { className: "p-4", children: /* @__PURE__ */ a("div", { className: "space-y-4", children: [
@@ -14432,7 +14432,7 @@ function Jd({
14432
14432
  {
14433
14433
  id: "advanced-mode",
14434
14434
  checked: A,
14435
- onCheckedChange: (v) => C(v)
14435
+ onCheckedChange: (N) => C(N)
14436
14436
  }
14437
14437
  ),
14438
14438
  /* @__PURE__ */ e(
@@ -14536,15 +14536,15 @@ function Yd({
14536
14536
  const w = V.id, A = M.id, C = p(w), S = p(A) || A;
14537
14537
  if (S === "sortBy") {
14538
14538
  if (C === "source") {
14539
- const R = s.find((N) => N.id === w);
14539
+ const R = s.find((v) => v.id === w);
14540
14540
  if (!R) {
14541
14541
  d(null);
14542
14542
  return;
14543
14543
  }
14544
14544
  if (!(n("groupBy").some(
14545
- (N) => N.name === R.name && N.qualifiedEntityName === R.qualifiedEntityName
14545
+ (v) => v.name === R.name && v.qualifiedEntityName === R.qualifiedEntityName
14546
14546
  ) || n("metrics").some(
14547
- (N) => N.name === R.name && N.qualifiedEntityName === R.qualifiedEntityName
14547
+ (v) => v.name === R.name && v.qualifiedEntityName === R.qualifiedEntityName
14548
14548
  ))) {
14549
14549
  d(null);
14550
14550
  return;
@@ -14563,19 +14563,19 @@ function Yd({
14563
14563
  d(null);
14564
14564
  return;
14565
14565
  }
14566
- const v = n("sortBy");
14567
- if (Ua(R, v)) {
14566
+ const N = n("sortBy");
14567
+ if (Ua(R, N)) {
14568
14568
  d(null);
14569
14569
  return;
14570
14570
  }
14571
- const N = ga(
14571
+ const v = ga(
14572
14572
  R,
14573
14573
  "sortBy",
14574
14574
  l.type
14575
14575
  );
14576
- if (!N.isValid) {
14576
+ if (!v.isValid) {
14577
14577
  ut.error("Invalid Field Type", {
14578
- description: N.reason,
14578
+ description: v.reason,
14579
14579
  position: "top-center",
14580
14580
  duration: 3e3
14581
14581
  }), d(null);
@@ -14584,9 +14584,9 @@ function Yd({
14584
14584
  const O = _a(
14585
14585
  R,
14586
14586
  "sortBy",
14587
- v
14587
+ N
14588
14588
  );
14589
- d(null), r("sortBy", [...v, O]);
14589
+ d(null), r("sortBy", [...N, O]);
14590
14590
  return;
14591
14591
  }
14592
14592
  if (C === "source" && S !== "source" && S !== "sortBy") {
@@ -14595,14 +14595,14 @@ function Yd({
14595
14595
  d(null);
14596
14596
  return;
14597
14597
  }
14598
- const v = [
14598
+ const N = [
14599
14599
  ...n("groupBy"),
14600
14600
  ...n("pivotBy"),
14601
14601
  ...n("metrics"),
14602
14602
  ...n("sortBy")
14603
14603
  ];
14604
- if (v.length > 0) {
14605
- const F = v[0].qualifiedEntityName;
14604
+ if (N.length > 0) {
14605
+ const F = N[0].qualifiedEntityName;
14606
14606
  if (!F) {
14607
14607
  d(null);
14608
14608
  return;
@@ -14611,7 +14611,7 @@ function Yd({
14611
14611
  if (u && (g != null && g.joinabilityMap)) {
14612
14612
  if (Ri(R, {
14613
14613
  joinabilityMap: g.joinabilityMap,
14614
- selectedFields: v,
14614
+ selectedFields: N,
14615
14615
  baseEntityName: (D = i == null ? void 0 : i.baseEntity) == null ? void 0 : D.name
14616
14616
  // Pass authoritative base entity
14617
14617
  }).state === "unreachable") {
@@ -14633,8 +14633,8 @@ function Yd({
14633
14633
  }
14634
14634
  }
14635
14635
  }
14636
- const N = n(S);
14637
- if (Ua(R, N)) {
14636
+ const v = n(S);
14637
+ if (Ua(R, v)) {
14638
14638
  d(null);
14639
14639
  return;
14640
14640
  }
@@ -14654,8 +14654,8 @@ function Yd({
14654
14654
  const P = _a(
14655
14655
  R,
14656
14656
  S,
14657
- N
14658
- ), E = [...N, P];
14657
+ v
14658
+ ), E = [...v, P];
14659
14659
  d(null), r(S, E), S === "metrics" && t && Xn(
14660
14660
  l.type,
14661
14661
  l.config,
@@ -14667,13 +14667,13 @@ function Yd({
14667
14667
  return;
14668
14668
  }
14669
14669
  if (C && S && C !== "source" && S !== "source" && C !== S) {
14670
- const R = n(C), v = n(S), N = R.find((T) => T.id === w);
14671
- if (!N) {
14670
+ const R = n(C), N = n(S), v = R.find((T) => T.id === w);
14671
+ if (!v) {
14672
14672
  d(null);
14673
14673
  return;
14674
14674
  }
14675
14675
  const O = ga(
14676
- N,
14676
+ v,
14677
14677
  S,
14678
14678
  l.type
14679
14679
  );
@@ -14686,17 +14686,17 @@ function Yd({
14686
14686
  return;
14687
14687
  }
14688
14688
  const P = _a(
14689
- N,
14689
+ v,
14690
14690
  S,
14691
- v
14691
+ N
14692
14692
  );
14693
14693
  if (d(null), S === "sortBy") {
14694
- Ua(N, v) || r(S, [...v, P]);
14694
+ Ua(v, N) || r(S, [...N, P]);
14695
14695
  return;
14696
14696
  }
14697
14697
  const E = R.filter(
14698
14698
  (T) => T.id !== w
14699
- ), F = [...v, P];
14699
+ ), F = [...N, P];
14700
14700
  r(C, E), r(S, F), S === "metrics" && t && Xn(
14701
14701
  l.type,
14702
14702
  l.config,
@@ -14708,9 +14708,9 @@ function Yd({
14708
14708
  return;
14709
14709
  }
14710
14710
  if (C && S && C === S && C !== "source") {
14711
- const R = n(C), v = R.findIndex((O) => O.id === w), N = R.findIndex((O) => O.id === A);
14712
- if (v !== N) {
14713
- const O = ya(R, v, N);
14711
+ const R = n(C), N = R.findIndex((O) => O.id === w), v = R.findIndex((O) => O.id === A);
14712
+ if (N !== v) {
14713
+ const O = ya(R, N, v);
14714
14714
  r(C, O);
14715
14715
  }
14716
14716
  }
@@ -14737,7 +14737,7 @@ function Yd({
14737
14737
  handleDragEnd: m
14738
14738
  };
14739
14739
  }
14740
- function Wd({
14740
+ function Qd({
14741
14741
  activeView: t,
14742
14742
  onViewChange: s,
14743
14743
  splitViewEnabled: n
@@ -14769,7 +14769,7 @@ function Wd({
14769
14769
  st,
14770
14770
  {
14771
14771
  value: "info",
14772
- className: W(
14772
+ className: Q(
14773
14773
  "rounded-md transition data-[state=active]:bg-muted",
14774
14774
  l && "text-destructive data-[state=active]:bg-destructive/10 data-[state=active]:text-destructive"
14775
14775
  ),
@@ -14780,7 +14780,7 @@ function Wd({
14780
14780
  }
14781
14781
  );
14782
14782
  }
14783
- const Qd = [
14783
+ const Wd = [
14784
14784
  { value: "10", label: "Top 10" },
14785
14785
  { value: "20", label: "Top 20" },
14786
14786
  { value: "50", label: "Top 50" },
@@ -14819,7 +14819,7 @@ function Xd() {
14819
14819
  onValueChange: l,
14820
14820
  children: [
14821
14821
  /* @__PURE__ */ e(J, { className: "h-8 w-24 border-none px-1 [&>svg]:hidden", children: /* @__PURE__ */ e(H, { placeholder: "Select limit" }) }),
14822
- /* @__PURE__ */ e(Y, { children: Qd.map((g) => /* @__PURE__ */ e(B, { value: g.value, children: g.label }, g.value)) })
14822
+ /* @__PURE__ */ e(Y, { children: Wd.map((g) => /* @__PURE__ */ e(B, { value: g.value, children: g.label }, g.value)) })
14823
14823
  ]
14824
14824
  }
14825
14825
  ) });
@@ -14897,7 +14897,7 @@ function au({
14897
14897
  (re) => re.inlineFilterValuesMap[(d == null ? void 0 : d.id) || ""]
14898
14898
  ), { updateCardConfig: k, setCard: m, updateCardInFrame: h, setShowAIDialog: x } = ne(), b = I((re) => re.showAIDialog), y = Ce((re) => re.isVisualEditing), [V, M] = q(!1), [w, A] = q(!1), [C, S] = q(
14899
14899
  null
14900
- ), { config: D } = An(gn).tokenProps, R = (D == null ? void 0 : D.showInfoTab) !== !1, [v, N] = tu();
14900
+ ), { config: D } = An(gn).tokenProps, R = (D == null ? void 0 : D.showInfoTab) !== !1, [N, v] = tu();
14901
14901
  I(
14902
14902
  (re) => {
14903
14903
  var De;
@@ -14913,7 +14913,7 @@ function au({
14913
14913
  pagination: j,
14914
14914
  refetch: U,
14915
14915
  comparisonMetadata: ae
14916
- } = Le(d), Q = we(
14916
+ } = Le(d), W = we(
14917
14917
  () => (O == null ? void 0 : O.records) || [],
14918
14918
  [O == null ? void 0 : O.records]
14919
14919
  ), [X, te] = q(!1);
@@ -14921,8 +14921,8 @@ function au({
14921
14921
  F || te(!1);
14922
14922
  }, [F]);
14923
14923
  const z = () => {
14924
- const re = !v;
14925
- re && t === "table" && s("chart"), N(re);
14924
+ const re = !N;
14925
+ re && t === "table" && s("chart"), v(re);
14926
14926
  }, ee = (re, De) => {
14927
14927
  const Ge = {
14928
14928
  ...d,
@@ -14971,7 +14971,7 @@ function au({
14971
14971
  }
14972
14972
  const ie = (re) => {
14973
14973
  if (!u.config) return;
14974
- const De = vn(
14974
+ const De = Nn(
14975
14975
  re,
14976
14976
  u.config.metricColumns,
14977
14977
  u.config.groupByColumns
@@ -14987,7 +14987,7 @@ function au({
14987
14987
  return /* @__PURE__ */ a(
14988
14988
  "div",
14989
14989
  {
14990
- className: W("relative flex w-0 grow flex-col", {
14990
+ className: Q("relative flex w-0 grow flex-col", {
14991
14991
  "border-l": b && y
14992
14992
  }),
14993
14993
  children: [
@@ -14997,11 +14997,11 @@ function au({
14997
14997
  /* @__PURE__ */ a("div", { className: "flex items-center justify-between gap-2", children: [
14998
14998
  t === "chart" && b && /* @__PURE__ */ e(ol, { variant: "outline" }),
14999
14999
  /* @__PURE__ */ e(
15000
- Wd,
15000
+ Qd,
15001
15001
  {
15002
15002
  activeView: t,
15003
15003
  onViewChange: s,
15004
- splitViewEnabled: v
15004
+ splitViewEnabled: N
15005
15005
  }
15006
15006
  ),
15007
15007
  /* @__PURE__ */ e(
@@ -15028,7 +15028,7 @@ function au({
15028
15028
  /* @__PURE__ */ e("div", { className: "ml-2", children: /* @__PURE__ */ e(Xd, {}) }),
15029
15029
  b && /* @__PURE__ */ e(En, {})
15030
15030
  ] }),
15031
- /* @__PURE__ */ a("div", { className: W("flex grow items-center justify-end gap-2"), children: [
15031
+ /* @__PURE__ */ a("div", { className: Q("flex grow items-center justify-end gap-2"), children: [
15032
15032
  /* @__PURE__ */ e(
15033
15033
  Ie,
15034
15034
  {
@@ -15040,7 +15040,7 @@ function au({
15040
15040
  children: /* @__PURE__ */ e(
15041
15041
  Fs,
15042
15042
  {
15043
- className: W("h-4 w-4", {
15043
+ className: Q("h-4 w-4", {
15044
15044
  "animate-spin": X
15045
15045
  })
15046
15046
  }
@@ -15050,9 +15050,9 @@ function au({
15050
15050
  t === "chart" && /* @__PURE__ */ e(
15051
15051
  Ie,
15052
15052
  {
15053
- tooltip: v ? "Hide Results Table" : "Show Results Table",
15053
+ tooltip: N ? "Hide Results Table" : "Show Results Table",
15054
15054
  onClick: z,
15055
- children: v ? /* @__PURE__ */ e(eo, { className: "size-4" }) : /* @__PURE__ */ e(go, { className: "size-4" })
15055
+ children: N ? /* @__PURE__ */ e(eo, { className: "size-4" }) : /* @__PURE__ */ e(go, { className: "size-4" })
15056
15056
  }
15057
15057
  ),
15058
15058
  t === "chart" && /* @__PURE__ */ e(de, { children: /* @__PURE__ */ e(cl, {}) }),
@@ -15073,8 +15073,8 @@ function au({
15073
15073
  t === "chart" && /* @__PURE__ */ e(
15074
15074
  "div",
15075
15075
  {
15076
- className: W("flex grow flex-col pb-6", {
15077
- "pb-0": v && !["table", "pivotTable", "aggregateTable"].includes(
15076
+ className: Q("flex grow flex-col pb-6", {
15077
+ "pb-0": N && !["table", "pivotTable", "aggregateTable"].includes(
15078
15078
  d.type
15079
15079
  )
15080
15080
  }),
@@ -15089,7 +15089,7 @@ function au({
15089
15089
  onPaginationChange: ee,
15090
15090
  onSortChange: ie,
15091
15091
  sortState: oe,
15092
- splitViewEnabled: v
15092
+ splitViewEnabled: N
15093
15093
  }
15094
15094
  )
15095
15095
  }
@@ -15098,7 +15098,7 @@ function au({
15098
15098
  Da,
15099
15099
  {
15100
15100
  card: d,
15101
- data: Q,
15101
+ data: W,
15102
15102
  paginationMetadata: j,
15103
15103
  onPaginationChange: ee,
15104
15104
  isLoading: E || F,
@@ -15203,7 +15203,7 @@ const su = () => {
15203
15203
  };
15204
15204
  };
15205
15205
  function lu({ column: t, isSelected: s, onSelect: n, availableFields: r, width: o, onWidthChange: d }) {
15206
- var U, ae, Q;
15206
+ var U, ae, W;
15207
15207
  const l = I((X) => X.card), { updateCardConfig: c, removeGroupByColumn: i, removeMetricColumn: u, updateFilters: g } = ne(), [f, p] = q(!1), [k, m] = q(!1), h = Ke(null), x = _e((X) => {
15208
15208
  X.preventDefault(), X.stopPropagation(), m(!0), h.current = {
15209
15209
  startX: X.clientX,
@@ -15231,7 +15231,7 @@ function lu({ column: t, isSelected: s, onSelect: n, availableFields: r, width:
15231
15231
  } = Fa({ id: t.id }), R = {
15232
15232
  transform: Pa.Transform.toString(C),
15233
15233
  transition: S
15234
- }, v = Ee(t.dataType), N = ru(v), O = () => {
15234
+ }, N = Ee(t.dataType), v = ru(N), O = () => {
15235
15235
  var z;
15236
15236
  const X = ((z = l == null ? void 0 : l.config) == null ? void 0 : z.sortByColumns) || [], te = X.findIndex((ee) => ee.name === t.name);
15237
15237
  if (te !== -1) {
@@ -15309,7 +15309,7 @@ function lu({ column: t, isSelected: s, onSelect: n, availableFields: r, width:
15309
15309
  {
15310
15310
  ref: A,
15311
15311
  style: j,
15312
- className: W(
15312
+ className: Q(
15313
15313
  "group relative border-r border-border bg-background px-1 py-0",
15314
15314
  D && "opacity-50",
15315
15315
  s && "bg-primary/10",
@@ -15326,18 +15326,18 @@ function lu({ column: t, isSelected: s, onSelect: n, availableFields: r, width:
15326
15326
  children: /* @__PURE__ */ e(Zt, { className: "h-3 w-3" })
15327
15327
  }
15328
15328
  ),
15329
- /* @__PURE__ */ a(Nn, { children: [
15329
+ /* @__PURE__ */ a(vn, { children: [
15330
15330
  /* @__PURE__ */ e(yn, { asChild: !0, children: /* @__PURE__ */ a(
15331
15331
  "button",
15332
15332
  {
15333
15333
  onClick: n,
15334
- className: W(
15334
+ className: Q(
15335
15335
  "flex flex-1 items-center justify-between gap-1 rounded px-2 py-2 text-left text-sm font-medium transition-colors hover:bg-muted/50",
15336
15336
  s && "bg-primary/10"
15337
15337
  ),
15338
15338
  children: [
15339
15339
  /* @__PURE__ */ a("div", { className: "flex items-center gap-1.5", children: [
15340
- /* @__PURE__ */ e(N, { className: "h-3.5 w-3.5 text-muted-foreground" }),
15340
+ /* @__PURE__ */ e(v, { className: "h-3.5 w-3.5 text-muted-foreground" }),
15341
15341
  /* @__PURE__ */ e("span", { className: "truncate", children: t.label || t.name }),
15342
15342
  t.role === "metric" && t.aggregate && /* @__PURE__ */ a("span", { className: "text-xs text-muted-foreground", children: [
15343
15343
  "(",
@@ -15352,7 +15352,7 @@ function lu({ column: t, isSelected: s, onSelect: n, availableFields: r, width:
15352
15352
  ) }),
15353
15353
  /* @__PURE__ */ a(Cn, { align: "start", className: "w-48", children: [
15354
15354
  /* @__PURE__ */ a(Ve, { onClick: () => p(!0), children: [
15355
- /* @__PURE__ */ e(Kt, { className: W("mr-2 h-4 w-4", y && "text-primary") }),
15355
+ /* @__PURE__ */ e(Kt, { className: Q("mr-2 h-4 w-4", y && "text-primary") }),
15356
15356
  y ? "Edit Filter" : "Filter"
15357
15357
  ] }),
15358
15358
  /* @__PURE__ */ e(Bt, {}),
@@ -15411,7 +15411,7 @@ function lu({ column: t, isSelected: s, onSelect: n, availableFields: r, width:
15411
15411
  "div",
15412
15412
  {
15413
15413
  onMouseDown: x,
15414
- className: W(
15414
+ className: Q(
15415
15415
  "absolute right-0 top-0 h-full w-1 cursor-col-resize bg-transparent hover:bg-primary/50",
15416
15416
  k && "bg-primary"
15417
15417
  )
@@ -15424,7 +15424,7 @@ function lu({ column: t, isSelected: s, onSelect: n, availableFields: r, width:
15424
15424
  onOpenChange: p,
15425
15425
  availableFields: r.length > 0 ? r : [t],
15426
15426
  existingFilters: b,
15427
- editingCondition: y ? (Q = b == null ? void 0 : b.conditions) == null ? void 0 : Q.find(
15427
+ editingCondition: y ? (W = b == null ? void 0 : b.conditions) == null ? void 0 : W.find(
15428
15428
  (X) => X.field.name === t.name && X.field.qualifiedEntityName === t.qualifiedEntityName
15429
15429
  ) : void 0,
15430
15430
  onSave: V
@@ -15451,23 +15451,23 @@ function iu({
15451
15451
  isLoading: n = !1,
15452
15452
  sourceFields: r = []
15453
15453
  }) {
15454
- var S, D, R, v;
15455
- const o = I((N) => N.card), { updateCardConfig: d } = ne(), [l, c] = q(null), [i, u] = q({}), [g, f] = q(!1), p = we(() => {
15454
+ var S, D, R, N;
15455
+ const o = I((v) => v.card), { updateCardConfig: d } = ne(), [l, c] = q(null), [i, u] = q({}), [g, f] = q(!1), p = we(() => {
15456
15456
  var P, E;
15457
- const N = ((P = o == null ? void 0 : o.config) == null ? void 0 : P.groupByColumns) || [], O = ((E = o == null ? void 0 : o.config) == null ? void 0 : E.metricColumns) || [];
15458
- return [...N, ...O];
15457
+ const v = ((P = o == null ? void 0 : o.config) == null ? void 0 : P.groupByColumns) || [], O = ((E = o == null ? void 0 : o.config) == null ? void 0 : E.metricColumns) || [];
15458
+ return [...v, ...O];
15459
15459
  }, [(S = o == null ? void 0 : o.config) == null ? void 0 : S.groupByColumns, (D = o == null ? void 0 : o.config) == null ? void 0 : D.metricColumns]), k = we(() => {
15460
- const N = new Set(p.map((O) => `${O.qualifiedEntityName}.${O.name}`));
15461
- return r.filter((O) => !N.has(`${O.qualifiedEntityName}.${O.name}`));
15462
- }, [r, p]), { data: m, isLoading: h } = Le(o), x = (m == null ? void 0 : m.records) || [], b = _e((N, O) => {
15463
- u((P) => ({ ...P, [N]: O }));
15464
- }, []), y = _e((N) => {
15460
+ const v = new Set(p.map((O) => `${O.qualifiedEntityName}.${O.name}`));
15461
+ return r.filter((O) => !v.has(`${O.qualifiedEntityName}.${O.name}`));
15462
+ }, [r, p]), { data: m, isLoading: h } = Le(o), x = (m == null ? void 0 : m.records) || [], b = _e((v, O) => {
15463
+ u((P) => ({ ...P, [v]: O }));
15464
+ }, []), y = _e((v) => {
15465
15465
  var F, T;
15466
- const O = Ee(N.dataType), P = ((F = o == null ? void 0 : o.config) == null ? void 0 : F.groupByColumns) || [], E = ((T = o == null ? void 0 : o.config) == null ? void 0 : T.metricColumns) || [];
15466
+ const O = Ee(v.dataType), P = ((F = o == null ? void 0 : o.config) == null ? void 0 : F.groupByColumns) || [], E = ((T = o == null ? void 0 : o.config) == null ? void 0 : T.metricColumns) || [];
15467
15467
  if (O === "number") {
15468
15468
  const j = {
15469
- ...N,
15470
- id: `metric-${N.id}-${Date.now()}`,
15469
+ ...v,
15470
+ id: `metric-${v.id}-${Date.now()}`,
15471
15471
  role: "metric",
15472
15472
  aggregate: "SUM"
15473
15473
  };
@@ -15476,8 +15476,8 @@ function iu({
15476
15476
  });
15477
15477
  } else {
15478
15478
  const j = {
15479
- ...N,
15480
- id: `groupby-${N.id}-${Date.now()}`,
15479
+ ...v,
15480
+ id: `groupby-${v.id}-${Date.now()}`,
15481
15481
  role: "groupby"
15482
15482
  };
15483
15483
  d(o.id, {
@@ -15485,16 +15485,16 @@ function iu({
15485
15485
  });
15486
15486
  }
15487
15487
  f(!1);
15488
- }, [(R = o == null ? void 0 : o.config) == null ? void 0 : R.groupByColumns, (v = o == null ? void 0 : o.config) == null ? void 0 : v.metricColumns, o.id, d]), V = ra(
15488
+ }, [(R = o == null ? void 0 : o.config) == null ? void 0 : R.groupByColumns, (N = o == null ? void 0 : o.config) == null ? void 0 : N.metricColumns, o.id, d]), V = ra(
15489
15489
  dt(ia, {
15490
15490
  activationConstraint: {
15491
15491
  distance: 8
15492
15492
  }
15493
15493
  })
15494
- ), M = (N) => {
15495
- c(N.active.id);
15496
- }, w = (N) => {
15497
- const { active: O, over: P } = N;
15494
+ ), M = (v) => {
15495
+ c(v.active.id);
15496
+ }, w = (v) => {
15497
+ const { active: O, over: P } = v;
15498
15498
  if (c(null), !P || O.id === P.id) return;
15499
15499
  const E = p.findIndex((T) => T.id === O.id), F = p.findIndex((T) => T.id === P.id);
15500
15500
  if (E !== -1 && F !== -1) {
@@ -15504,10 +15504,10 @@ function iu({
15504
15504
  metricColumns: U
15505
15505
  });
15506
15506
  }
15507
- }, A = l ? p.find((N) => N.id === l) : null, C = (N) => {
15507
+ }, A = l ? p.find((v) => v.id === l) : null, C = (v) => {
15508
15508
  let O = "";
15509
- for (; N >= 0; )
15510
- O = String.fromCharCode(N % 26 + 65) + O, N = Math.floor(N / 26) - 1;
15509
+ for (; v >= 0; )
15510
+ O = String.fromCharCode(v % 26 + 65) + O, v = Math.floor(v / 26) - 1;
15511
15511
  return O;
15512
15512
  };
15513
15513
  return n ? /* @__PURE__ */ e("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e(qt, { className: "h-8 w-8 animate-spin text-muted-foreground" }) }) : p.length === 0 ? /* @__PURE__ */ e("div", { className: "flex h-full flex-col items-center justify-center gap-4 p-8 text-center", children: /* @__PURE__ */ a("div", { className: "rounded-lg border-2 border-dashed border-muted-foreground/25 p-12", children: [
@@ -15529,19 +15529,19 @@ function iu({
15529
15529
  /* @__PURE__ */ e(
15530
15530
  gt,
15531
15531
  {
15532
- items: p.map((N) => N.id),
15532
+ items: p.map((v) => v.id),
15533
15533
  strategy: Zn,
15534
- children: p.map((N, O) => /* @__PURE__ */ e(
15534
+ children: p.map((v, O) => /* @__PURE__ */ e(
15535
15535
  "th",
15536
15536
  {
15537
15537
  style: {
15538
- width: i[N.id] ? `${i[N.id]}px` : void 0,
15539
- minWidth: i[N.id] ? `${i[N.id]}px` : "120px"
15538
+ width: i[v.id] ? `${i[v.id]}px` : void 0,
15539
+ minWidth: i[v.id] ? `${i[v.id]}px` : "120px"
15540
15540
  },
15541
15541
  className: "border-r border-border bg-muted/30 px-2 py-1 text-center text-xs font-medium text-muted-foreground",
15542
15542
  children: C(O)
15543
15543
  },
15544
- `letter-${N.id}`
15544
+ `letter-${v.id}`
15545
15545
  ))
15546
15546
  }
15547
15547
  ),
@@ -15552,19 +15552,19 @@ function iu({
15552
15552
  /* @__PURE__ */ e(
15553
15553
  gt,
15554
15554
  {
15555
- items: p.map((N) => N.id),
15555
+ items: p.map((v) => v.id),
15556
15556
  strategy: Zn,
15557
- children: p.map((N) => /* @__PURE__ */ e(
15557
+ children: p.map((v) => /* @__PURE__ */ e(
15558
15558
  lu,
15559
15559
  {
15560
- column: N,
15561
- isSelected: (t == null ? void 0 : t.id) === N.id,
15562
- onSelect: () => s(N),
15560
+ column: v,
15561
+ isSelected: (t == null ? void 0 : t.id) === v.id,
15562
+ onSelect: () => s(v),
15563
15563
  availableFields: r,
15564
- width: i[N.id],
15564
+ width: i[v.id],
15565
15565
  onWidthChange: b
15566
15566
  },
15567
- N.id
15567
+ v.id
15568
15568
  ))
15569
15569
  }
15570
15570
  ),
@@ -15576,29 +15576,29 @@ function iu({
15576
15576
  size: "sm",
15577
15577
  className: "h-7 w-7 p-0 text-muted-foreground hover:text-foreground",
15578
15578
  title: "Add column",
15579
- children: /* @__PURE__ */ e(Qe, { className: "h-4 w-4" })
15579
+ children: /* @__PURE__ */ e(We, { className: "h-4 w-4" })
15580
15580
  }
15581
15581
  ) }),
15582
- /* @__PURE__ */ e(We, { className: "w-[280px] p-0", align: "start", children: /* @__PURE__ */ a(Jt, { children: [
15582
+ /* @__PURE__ */ e(Qe, { className: "w-[280px] p-0", align: "start", children: /* @__PURE__ */ a(Jt, { children: [
15583
15583
  /* @__PURE__ */ e(Ht, { placeholder: "Search columns..." }),
15584
15584
  /* @__PURE__ */ a(Yt, { children: [
15585
- /* @__PURE__ */ e(Wt, { children: "No columns available." }),
15586
- /* @__PURE__ */ e(Qt, { heading: "Available Columns", children: k.map((N) => {
15587
- const O = Ee(N.dataType), P = O === "number" ? ua : O === "date" ? Ba : Va;
15585
+ /* @__PURE__ */ e(Qt, { children: "No columns available." }),
15586
+ /* @__PURE__ */ e(Wt, { heading: "Available Columns", children: k.map((v) => {
15587
+ const O = Ee(v.dataType), P = O === "number" ? ua : O === "date" ? Ba : Va;
15588
15588
  return /* @__PURE__ */ a(
15589
15589
  Xt,
15590
15590
  {
15591
- value: N.label || N.name,
15592
- onSelect: () => y(N),
15591
+ value: v.label || v.name,
15592
+ onSelect: () => y(v),
15593
15593
  children: [
15594
15594
  /* @__PURE__ */ e(P, { className: "mr-2 h-3.5 w-3.5 text-muted-foreground" }),
15595
15595
  /* @__PURE__ */ a("div", { className: "flex flex-col", children: [
15596
- /* @__PURE__ */ e("span", { className: "text-sm", children: N.label || N.name }),
15597
- /* @__PURE__ */ e("span", { className: "text-xs text-muted-foreground", children: N.entityName })
15596
+ /* @__PURE__ */ e("span", { className: "text-sm", children: v.label || v.name }),
15597
+ /* @__PURE__ */ e("span", { className: "text-xs text-muted-foreground", children: v.entityName })
15598
15598
  ] })
15599
15599
  ]
15600
15600
  },
15601
- N.id
15601
+ v.id
15602
15602
  );
15603
15603
  }) })
15604
15604
  ] })
@@ -15620,17 +15620,17 @@ function iu({
15620
15620
  className: "h-32 text-center text-muted-foreground",
15621
15621
  children: "No data available"
15622
15622
  }
15623
- ) }) : x.slice(0, 100).map((N, O) => /* @__PURE__ */ a(
15623
+ ) }) : x.slice(0, 100).map((v, O) => /* @__PURE__ */ a(
15624
15624
  "tr",
15625
15625
  {
15626
- className: W(
15626
+ className: Q(
15627
15627
  "border-b border-border transition-colors hover:bg-muted/50",
15628
15628
  O % 2 === 0 ? "bg-background" : "bg-muted/20"
15629
15629
  ),
15630
15630
  children: [
15631
15631
  /* @__PURE__ */ e("td", { className: "sticky left-0 z-10 w-12 border-r border-border bg-muted/50 px-2 py-2 text-center text-xs font-medium text-muted-foreground", children: O + 1 }),
15632
15632
  p.map((P) => {
15633
- const E = N[P.name] ?? N[P.label ?? ""];
15633
+ const E = v[P.name] ?? v[P.label ?? ""];
15634
15634
  return /* @__PURE__ */ e(
15635
15635
  "td",
15636
15636
  {
@@ -15638,7 +15638,7 @@ function iu({
15638
15638
  width: i[P.id] ? `${i[P.id]}px` : void 0,
15639
15639
  minWidth: i[P.id] ? `${i[P.id]}px` : "120px"
15640
15640
  },
15641
- className: W(
15641
+ className: Q(
15642
15642
  "border-r border-border px-3 py-2 text-sm",
15643
15643
  (t == null ? void 0 : t.id) === P.id && "bg-primary/5"
15644
15644
  ),
@@ -15855,7 +15855,7 @@ function cu({
15855
15855
  /* @__PURE__ */ e(
15856
15856
  wt,
15857
15857
  {
15858
- className: W(
15858
+ className: Q(
15859
15859
  "h-3.5 w-3.5 transition-transform duration-200",
15860
15860
  C && "rotate-90"
15861
15861
  )
@@ -15870,7 +15870,7 @@ function cu({
15870
15870
  return /* @__PURE__ */ a(
15871
15871
  "label",
15872
15872
  {
15873
- className: W(
15873
+ className: Q(
15874
15874
  "flex cursor-pointer items-center gap-2 rounded px-2 py-1.5 text-sm transition-colors hover:bg-muted/50",
15875
15875
  R && "bg-primary/5"
15876
15876
  ),
@@ -15879,7 +15879,7 @@ function cu({
15879
15879
  Je,
15880
15880
  {
15881
15881
  checked: R,
15882
- onCheckedChange: (v) => x(S, v),
15882
+ onCheckedChange: (N) => x(S, N),
15883
15883
  className: "h-3.5 w-3.5"
15884
15884
  }
15885
15885
  ),
@@ -15984,11 +15984,11 @@ function uu({
15984
15984
  children: /* @__PURE__ */ e(fo, { className: "h-4 w-4" })
15985
15985
  }
15986
15986
  ) }),
15987
- /* @__PURE__ */ e(We, { className: "w-[300px] p-0", align: "start", children: /* @__PURE__ */ a(Jt, { children: [
15987
+ /* @__PURE__ */ e(Qe, { className: "w-[300px] p-0", align: "start", children: /* @__PURE__ */ a(Jt, { children: [
15988
15988
  /* @__PURE__ */ e(Ht, { placeholder: "Search functions..." }),
15989
15989
  /* @__PURE__ */ a(Yt, { children: [
15990
- /* @__PURE__ */ e(Wt, { children: "No functions found." }),
15991
- /* @__PURE__ */ e(Qt, { heading: "Functions", children: du.map((m) => /* @__PURE__ */ e(
15990
+ /* @__PURE__ */ e(Qt, { children: "No functions found." }),
15991
+ /* @__PURE__ */ e(Wt, { heading: "Functions", children: du.map((m) => /* @__PURE__ */ e(
15992
15992
  Xt,
15993
15993
  {
15994
15994
  value: m.name,
@@ -16022,11 +16022,11 @@ function uu({
16022
16022
  ]
16023
16023
  }
16024
16024
  ) }),
16025
- /* @__PURE__ */ e(We, { className: "w-[250px] p-0", align: "start", children: /* @__PURE__ */ a(Jt, { children: [
16025
+ /* @__PURE__ */ e(Qe, { className: "w-[250px] p-0", align: "start", children: /* @__PURE__ */ a(Jt, { children: [
16026
16026
  /* @__PURE__ */ e(Ht, { placeholder: "Search columns..." }),
16027
16027
  /* @__PURE__ */ a(Yt, { children: [
16028
- /* @__PURE__ */ e(Wt, { children: "No columns found." }),
16029
- /* @__PURE__ */ e(Qt, { heading: "Available Columns", children: d.map((m) => {
16028
+ /* @__PURE__ */ e(Qt, { children: "No columns found." }),
16029
+ /* @__PURE__ */ e(Wt, { heading: "Available Columns", children: d.map((m) => {
16030
16030
  const h = k(m.dataType);
16031
16031
  return /* @__PURE__ */ a(
16032
16032
  Xt,
@@ -16095,7 +16095,7 @@ function mu({ className: t }) {
16095
16095
  }, f = () => {
16096
16096
  d(""), r(null);
16097
16097
  };
16098
- return /* @__PURE__ */ a("div", { className: W("flex h-full w-full flex-col", t), children: [
16098
+ return /* @__PURE__ */ a("div", { className: Q("flex h-full w-full flex-col", t), children: [
16099
16099
  /* @__PURE__ */ e(
16100
16100
  uu,
16101
16101
  {
@@ -16131,13 +16131,13 @@ function hu() {
16131
16131
  var U, ae;
16132
16132
  const [t, s] = q(
16133
16133
  "chart"
16134
- ), [n, r] = q(!1), [o, d] = q(!1), [l, c] = q(!0), i = I((Q) => Q.showAIDialog), u = Ce((Q) => Q.isVisualEditing), { setCardType: g } = ne(), f = I((Q) => Q.card.type);
16134
+ ), [n, r] = q(!1), [o, d] = q(!1), [l, c] = q(!0), i = I((W) => W.showAIDialog), u = Ce((W) => W.isVisualEditing), { setCardType: g } = ne(), f = I((W) => W.card.type);
16135
16135
  ue(() => su(), []);
16136
- const p = (Q) => {
16137
- g(Q);
16138
- }, k = I((Q) => Q.frame), m = I((Q) => Q.card);
16139
- I((Q) => Q.activeTabCardId), I(
16140
- (Q) => Q.actions.getAvailableFields
16136
+ const p = (W) => {
16137
+ g(W);
16138
+ }, k = I((W) => W.frame), m = I((W) => W.card);
16139
+ I((W) => W.activeTabCardId), I(
16140
+ (W) => W.actions.getAvailableFields
16141
16141
  );
16142
16142
  const { addCard: h, removeCard: x, updateCard: b, setActiveCard: y, updateFilters: V } = ne(), {
16143
16143
  columns: M = [],
@@ -16152,25 +16152,25 @@ function hu() {
16152
16152
  ), S = m, {
16153
16153
  getFieldsForContainer: D,
16154
16154
  setFieldsForContainer: R
16155
- } = Js(S), { activeField: v, handleDragStart: N, handleDragEnd: O } = Yd({
16155
+ } = Js(S), { activeField: N, handleDragStart: v, handleDragEnd: O } = Yd({
16156
16156
  activeCardId: k.activeCardId,
16157
16157
  sourceFields: M,
16158
16158
  getFieldsForContainer: D,
16159
16159
  setFieldsForContainer: R
16160
- }), P = (Q, X) => {
16161
- X && V(Q, X);
16162
- }, E = (Q) => {
16160
+ }), P = (W, X) => {
16161
+ X && V(W, X);
16162
+ }, E = (W) => {
16163
16163
  var X;
16164
- b(Q, {
16164
+ b(W, {
16165
16165
  config: {
16166
- ...(X = k.cards.find((te) => te.id === Q)) == null ? void 0 : X.config,
16166
+ ...(X = k.cards.find((te) => te.id === W)) == null ? void 0 : X.config,
16167
16167
  filters: void 0
16168
16168
  }
16169
16169
  });
16170
- }, F = M, T = (Q) => {
16171
- if (!Q) return 0;
16172
- let X = Q.conditions.length;
16173
- return Q.groups.forEach((te) => {
16170
+ }, F = M, T = (W) => {
16171
+ if (!W) return 0;
16172
+ let X = W.conditions.length;
16173
+ return W.groups.forEach((te) => {
16174
16174
  X += T(te);
16175
16175
  }), X;
16176
16176
  }, j = T(((U = S == null ? void 0 : S.config) == null ? void 0 : U.filters) || null);
@@ -16179,7 +16179,7 @@ function hu() {
16179
16179
  {
16180
16180
  sensors: C,
16181
16181
  collisionDetection: It,
16182
- onDragStart: N,
16182
+ onDragStart: v,
16183
16183
  onDragEnd: O,
16184
16184
  children: [
16185
16185
  /* @__PURE__ */ a("div", { className: "flex h-full grow", children: [
@@ -16200,7 +16200,7 @@ function hu() {
16200
16200
  pivotByFields: D("pivotBy"),
16201
16201
  metricsFields: D("metrics"),
16202
16202
  sortByFields: D("sortBy"),
16203
- activeField: v
16203
+ activeField: N
16204
16204
  }
16205
16205
  ),
16206
16206
  /* @__PURE__ */ e(
@@ -16250,7 +16250,7 @@ function hu() {
16250
16250
  onOpenChange: d
16251
16251
  }
16252
16252
  ),
16253
- /* @__PURE__ */ e(Ys, { dropAnimation: null, children: /* @__PURE__ */ e(nu, { activeField: v || null }) })
16253
+ /* @__PURE__ */ e(Ys, { dropAnimation: null, children: /* @__PURE__ */ e(nu, { activeField: N || null }) })
16254
16254
  ]
16255
16255
  }
16256
16256
  );
@@ -16288,7 +16288,7 @@ function pu({ authToken: t, onSave: s, onClose: n }) {
16288
16288
  Et,
16289
16289
  {
16290
16290
  "data-content": "editor-main",
16291
- className: W(
16291
+ className: Q(
16292
16292
  "grow transition-opacity",
16293
16293
  p && "pointer-events-none opacity-0"
16294
16294
  ),
@@ -16321,7 +16321,7 @@ function pu({ authToken: t, onSave: s, onClose: n }) {
16321
16321
  "div",
16322
16322
  {
16323
16323
  ref: k,
16324
- className: W(
16324
+ className: Q(
16325
16325
  "absolute inset-0",
16326
16326
  !p && "pointer-events-none"
16327
16327
  )
@@ -16336,7 +16336,7 @@ function pu({ authToken: t, onSave: s, onClose: n }) {
16336
16336
  Et,
16337
16337
  {
16338
16338
  "data-content": "explorer",
16339
- className: W(
16339
+ className: Q(
16340
16340
  "flex grow transition-opacity",
16341
16341
  p && "pointer-events-none opacity-0"
16342
16342
  ),
@@ -16369,7 +16369,7 @@ function pu({ authToken: t, onSave: s, onClose: n }) {
16369
16369
  "div",
16370
16370
  {
16371
16371
  ref: k,
16372
- className: W(
16372
+ className: Q(
16373
16373
  "absolute inset-0",
16374
16374
  !p && "pointer-events-none"
16375
16375
  )
@@ -16386,7 +16386,7 @@ function pu({ authToken: t, onSave: s, onClose: n }) {
16386
16386
  }
16387
16387
  ) : w() });
16388
16388
  }
16389
- function Nu() {
16389
+ function vu() {
16390
16390
  Ce((l) => l.selectedCardId);
16391
16391
  const t = Ce((l) => l.selectedSheetId), { setIsVisualEditing: s } = Ce((l) => l.actions), n = Ce((l) => l.isVisualEditing), r = Ce((l) => l.actions.updateFrame);
16392
16392
  function o(l) {
@@ -16399,7 +16399,7 @@ function Nu() {
16399
16399
  "div",
16400
16400
  {
16401
16401
  role: "editor-container",
16402
- className: W("flex-1 grow basis-0 overflow-auto", {
16402
+ className: Q("flex-1 grow basis-0 overflow-auto", {
16403
16403
  "max-h-0 overflow-hidden": !n
16404
16404
  }),
16405
16405
  children: /* @__PURE__ */ e(pu, { onSave: o, onClose: d })
@@ -16407,5 +16407,5 @@ function Nu() {
16407
16407
  );
16408
16408
  }
16409
16409
  export {
16410
- Nu as default
16410
+ vu as default
16411
16411
  };