react-semaphor 0.1.376 → 0.1.378

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 (64) hide show
  1. package/dist/analytics-protocol/index.cjs +1 -1
  2. package/dist/analytics-protocol/index.js +47 -43
  3. package/dist/brand-studio/index.cjs +4 -4
  4. package/dist/brand-studio/index.js +10 -8
  5. package/dist/chunks/braces-BT-ZyB-g.js +6 -0
  6. package/dist/chunks/braces-DOxxfERN.js +23 -0
  7. package/dist/chunks/calendar-preferences-dialog-CRvQz4TE.js +1 -0
  8. package/dist/chunks/{calendar-preferences-dialog-B6fsethx.js → calendar-preferences-dialog-DZe8Nd-4.js} +14 -14
  9. package/dist/chunks/catalog-field-grounding-8L9I0zdg.js +1 -0
  10. package/dist/chunks/catalog-field-grounding-BK4BX8sZ.js +200 -0
  11. package/dist/chunks/dashboard-briefing-launcher-BWyHpn2M.js +111 -0
  12. package/dist/chunks/{dashboard-briefing-launcher-BKCRO7Qw.js → dashboard-briefing-launcher-DURdx5Ox.js} +3147 -2386
  13. package/dist/chunks/dashboard-controls-D5mjF67R.js +2279 -0
  14. package/dist/chunks/dashboard-controls-J71GLAxt.js +52 -0
  15. package/dist/chunks/{dashboard-json-QT0T2ad_.js → dashboard-json-BumvCRuk.js} +14 -13
  16. package/dist/chunks/dashboard-json-Cv8jXh0X.js +1 -0
  17. package/dist/chunks/{edit-dashboard-visual-DNzPgXMh.js → edit-dashboard-visual-dvhQzG_h.js} +33 -33
  18. package/dist/chunks/{edit-dashboard-visual-kNoMQRmH.js → edit-dashboard-visual-eYJMy7aw.js} +677 -677
  19. package/dist/chunks/{index-CPpqPJba.js → index-c_0nwsOM.js} +199 -194
  20. package/dist/chunks/{index-DX_0OcRv.js → index-hhH5F_tQ.js} +20665 -20527
  21. package/dist/chunks/layout-grid-DTbOIOsE.js +16 -0
  22. package/dist/chunks/layout-grid-DccceHv4.js +6 -0
  23. package/dist/chunks/{palette-2HWSR5wb.js → palette-DCzLwqIw.js} +1 -1
  24. package/dist/chunks/{palette-BcHHAmOU.js → palette-SimHJELn.js} +1 -1
  25. package/dist/chunks/{save-MoF1T13_.js → save-D2O96E5A.js} +1 -1
  26. package/dist/chunks/{save-B-YfAPhu.js → save-zNVYH02T.js} +1 -1
  27. package/dist/chunks/{switch-DmE_MY3L.js → switch-DMPsMpHW.js} +1 -1
  28. package/dist/chunks/{switch-CmHP5dT7.js → switch-Jhyl63RF.js} +1 -1
  29. package/dist/chunks/{use-create-flow-overlay-state-BLPQgGuz.js → use-create-flow-overlay-state-D9UKBuCA.js} +2 -2
  30. package/dist/chunks/{use-create-flow-overlay-state-D_Ntx-_C.js → use-create-flow-overlay-state-hlsTNh2b.js} +113 -112
  31. package/dist/chunks/{validation-DlrTIf1N.js → validation-BM3-ShHV.js} +1 -1
  32. package/dist/chunks/{validation-1V7bWmYw.js → validation-BVpqRFar.js} +1 -1
  33. package/dist/dashboard/index.cjs +1 -1
  34. package/dist/dashboard/index.js +1 -1
  35. package/dist/dashboard-authoring/index.cjs +1 -1
  36. package/dist/dashboard-authoring/index.js +1 -1
  37. package/dist/data-app-builder/index.cjs +1 -1
  38. package/dist/data-app-builder/index.js +3 -3
  39. package/dist/data-app-sdk/index.cjs +1 -1
  40. package/dist/data-app-sdk/index.js +22 -21
  41. package/dist/data-app-sdk-validation/index.cjs +1 -1
  42. package/dist/data-app-sdk-validation/index.js +2 -2
  43. package/dist/index.cjs +1 -1
  44. package/dist/index.js +128 -126
  45. package/dist/style.css +1 -1
  46. package/dist/surfboard/index.cjs +1 -1
  47. package/dist/surfboard/index.js +2 -2
  48. package/dist/types/analytics-protocol.d.ts +128 -0
  49. package/dist/types/dashboard-assistant.d.ts +42 -0
  50. package/dist/types/data-app-sdk-validation.d.ts +42 -0
  51. package/dist/types/data-app-sdk.d.ts +42 -0
  52. package/dist/types/main.d.ts +7 -0
  53. package/package.json +1 -1
  54. package/dist/chunks/calendar-preferences-dialog-Dh1b0ytN.js +0 -1
  55. package/dist/chunks/catalog-field-grounding-DoEBOXQd.js +0 -100
  56. package/dist/chunks/catalog-field-grounding-Du6mKDcF.js +0 -1
  57. package/dist/chunks/chevrons-up-down-D2fZD4N_.js +0 -6
  58. package/dist/chunks/chevrons-up-down-lahj6tQy.js +0 -14
  59. package/dist/chunks/dashboard-briefing-launcher-Gv1cwT0I.js +0 -111
  60. package/dist/chunks/dashboard-controls-BDJZarV7.js +0 -52
  61. package/dist/chunks/dashboard-controls-CchLBVDv.js +0 -3037
  62. package/dist/chunks/dashboard-json-ZhIEMXN0.js +0 -1
  63. package/dist/chunks/layout-grid-BOTLt36V.js +0 -36
  64. package/dist/chunks/layout-grid-CS6BSCJF.js +0 -11
@@ -1,14 +1,14 @@
1
- import { jsx as e, jsxs as a, Fragment as De } from "react/jsx-runtime";
1
+ import { jsx as e, jsxs as a, Fragment as Ie } from "react/jsx-runtime";
2
2
  import * as Sc from "react";
3
3
  import ea, { useState as K, useEffect as Se, useRef as Me, useCallback as Ee, useMemo as de, useContext as wr, Suspense as Tc } from "react";
4
- import { cS as Ei, b as Aa, c as Oa, d as Ma, e as Fa, f as Ja, n as hs, aR as kt, aW as wt, cT as Ai, cU as is, o as Ze, cV as Oi, cD as os, ay as In, aq as vt, ax as $t, bQ as Sr, av as nn, aX as qn, aS as Nt, cW as ps, cJ as Tr, cX as kc, cY as Mi, cZ as Dc, aK as Ns, c_ as Ic, c$ as Ec, d0 as mr, d1 as cs, u as xa, y as Fi, d2 as Ac, d3 as Oc, d4 as Ri, d5 as Li, d6 as Mc, d7 as Fc, d8 as Rc, aD as Va, aE as ba, aF as ya, aG as jn, aH as ta, aI as Qa, d9 as hr, bN as Sn, da as Pi, ae as na, af as ft, db as Lc, dc as Vi, c6 as ma, cK as Bi, dd as kr, de as _i, df as Pc, dg as Vc, dh as Bc, di as _c, dj as zc, dk as $c, dl as qc, dm as jc, dn as Kc, dp as zs, dq as Uc, dr as zl, ds as Gc, dt as $l, du as Hc, dv as Wc, bB as sn, bC as rn, dw as pr, bE as ln, bF as ct, dx as En, aA as zi, dy as Qc, a$ as Qt, b1 as Yt, dz as Dr, bf as Ir, ad as Er, dA as Yc, dB as Jc, dC as Ar, dD as Xc, dE as $i, dF as qi, dG as ji, dH as Ht, dI as Zc, dJ as ed, dK as td, dL as ad, dM as Ki, dN as Ui, W as Gi, dO as Hi, dP as nd, dQ as sd, dR as rd, dS as An, M as ld, dT as id, dU as od, dV as ql, dW as cd, E as Cs, s as Or, dX as dd, dY as Mr, b7 as ud, dZ as jl, I as gt, d_ as md, d$ as hd, e0 as Wi, e1 as Qi, e2 as pd, e3 as Fr, e4 as Rr, az as ws, e5 as Yi, e6 as Ji, e7 as Kl, e8 as Kn, e9 as fd, ea as gd, eb as xd, ec as bd, ed as yd, ee as fs, ef as vd, eg as Nd, eh as Xi, ei as Zi, ej as Cd, ek as wd, by as Sd, el as Td, em as eo, en as kd, eo as Dd, bz as Ss, ep as Ts, b8 as On, b9 as Wt, eq as oa, er as Ra, es as La, et as ha, eu as Xa, ev as Id, ew as Ed, ex as Ad, ey as Od, ez as Md, eA as Fd, eB as Rd, eC as Ld, eD as Ul, b0 as aa, eE as Pd, eF as Vd, eG as Bd, eH as _d, eI as to, eJ as zd, eK as $d, eL as qd, eM as jd, eN as Kd, eO as fr, eP as Ud, eQ as Gd, eR as gr, eS as Hd, eT as Wd, eU as Qd, eV as Yd, eW as Gl, aw as xr, as as pa, ag as Jd, ah as Xd, aj as Zd, ak as eu, al as tu, am as au, an as nu, ao as su, ap as ru, bt as lu, eX as iu, eY as Za, eZ as en, e_ as tn, bR as Lr, bS as ou, au as cu, e$ as du, f0 as uu, f1 as mu, f2 as ks, f3 as st, f4 as rt, f5 as lt, cH as hu, cI as pu, f6 as ao, f7 as no, cF as fu, f8 as gu, f9 as xu, fa as bu, fb as yu, fc as vu, fd as Nu, fe as Cu, ff as wu, fg as Su, fh as Tu, fi as ku, fj as Du, fk as Ta, fl as vn, fm as Ya, fn as Iu, fo as Hl, fp as Eu, fq as Au, fr as $s, fs as Wl, ft as Ou, fu as Mu, fv as Fu, fw as Ru, fx as Lu, R as Pr, g as Mn, fy as qs, fz as so, aB as Pu, fA as gs, fB as Vu, fC as ro, fD as Bu, fE as lo, cp as _u, fF as zu, a3 as $u, fG as ns, fH as qu, fI as Ql, fJ as ju, fK as Ku, fL as Yl, fM as Uu, fN as Gu, fO as Hu, fP as Wu, fQ as Qu, cE as Yu, cG as Ju, ai as io, fR as Xu, fS as Zu, fT as em, fU as tm, fV as am, fW as nm, fX as sm, fY as rm, fZ as lm, f_ as oo, f$ as im, g0 as Ds, c7 as Is, g1 as co, g2 as om, g3 as cm, g4 as uo, g5 as dm, g6 as um, g7 as Es, g8 as js, g9 as mm, ga as hm, gb as pm, gc as fm, gd as gm, ge as Jl, gf as an, gg as mo, gh as xm, bD as bm, gi as ho, gj as po, gk as ds, gl as fo, gm as go, gn as Xl, go as ym, gp as vm, gq as us, gr as Nm, gs as Vr, gt as Cm, gu as xs, C as Fn, h as Rn, j as Ln, i as Pn, k as Vn, l as Bn, gv as wm, gw as _n, gx as ca, gy as br, gz as yr, gA as zn, gB as xo, gC as Sm, gD as Ks, gE as Us, gF as Tm, gG as Gs, gH as km, gI as Zl, gJ as ei, cM as Dm, gK as Im, cN as Em, cP as Am, cQ as Om, x as Mm, gL as Fm, gM as Rm, gN as Lm, bT as Pm, bU as Vm, bV as Bm, bs as As, cB as Os, gO as ti, gP as bo, cd as Hs, gQ as _m, gR as zm, gS as $m, F as qm, aU as jm, gT as Km, gU as Um, aV as Gm } from "./index-DX_0OcRv.js";
4
+ import { cT as Ei, b as Aa, c as Oa, d as Ma, e as Fa, f as Ja, o as hs, aS as kt, aX as wt, cU as Ai, cV as is, p as Ze, cW as Oi, cE as os, az as Dn, ar as vt, ay as $t, bJ as Sr, aw as nn, aY as qn, aT as Nt, cX as ps, cK as Tr, cY as kc, cZ as Mi, c_ as Ic, aE as Ns, c$ as Dc, d0 as Ec, d1 as mr, d2 as cs, u as xa, z as Fi, d3 as Ac, d4 as Oc, d5 as Ri, d6 as Li, d7 as Mc, d8 as Fc, d9 as Rc, aM as Va, aN as ba, aO as ya, aP as jn, aQ as ta, aR as Qa, da as hr, bB as Sn, db as Pi, af as na, ag as ft, dc as Lc, dd as Vi, c7 as ma, cL as Bi, de as kr, df as _i, dg as Pc, dh as Vc, di as Bc, C as zi, dj as _c, dk as zc, dl as $c, dm as qc, dn as jc, dp as Kc, dq as zs, dr as Uc, ds as zl, dt as Gc, du as $l, dv as Hc, dw as Wc, bF as sn, bG as rn, dx as pr, bH as ln, bI as ct, dy as En, aB as $i, dz as Qc, b0 as Qt, b2 as Yt, dA as Ir, bg as Dr, ae as Er, dB as Yc, dC as Jc, dD as Ar, dE as Xc, dF as qi, dG as ji, dH as Ki, dI as Ht, dJ as Zc, dK as ed, dL as td, dM as ad, dN as Ui, dO as Gi, X as Hi, dP as Wi, dQ as nd, dR as sd, dS as rd, dT as An, M as ld, dU as id, dV as od, dW as ql, dX as cd, E as Cs, t as Or, dY as dd, dZ as Mr, b8 as ud, d_ as jl, I as gt, d$ as md, e0 as hd, e1 as Qi, e2 as Yi, e3 as pd, e4 as Fr, e5 as Rr, aA as ws, e6 as Ji, e7 as Xi, e8 as Kl, e9 as Kn, ea as fd, eb as gd, ec as xd, ed as bd, ee as yd, ef as fs, eg as vd, eh as Nd, ei as Zi, ej as eo, ek as Cd, el as wd, bT as Sd, em as Td, en as to, eo as kd, ep as Id, bU as Ss, eq as Ts, b9 as On, ba as Wt, er as oa, es as Ra, et as La, eu as ha, ev as Xa, ew as Dd, ex as Ed, ey as Ad, ez as Od, eA as Md, eB as Fd, eC as Rd, eD as Ld, eE as Ul, b1 as aa, eF as Pd, eG as Vd, eH as Bd, eI as _d, eJ as ao, eK as zd, eL as $d, eM as qd, eN as jd, eO as Kd, eP as fr, eQ as Ud, eR as Gd, eS as gr, eT as Hd, eU as Wd, eV as Qd, eW as Yd, eX as Gl, ax as xr, at as pa, ah as Jd, ai as Xd, ak as Zd, al as eu, am as tu, an as au, ao as nu, ap as su, aq as ru, bu as lu, eY as iu, eZ as Za, e_ as en, e$ as tn, bK as Lr, bL as ou, av as cu, f0 as du, f1 as uu, f2 as mu, f3 as ks, f4 as st, f5 as rt, f6 as lt, cI as hu, cJ as pu, f7 as no, f8 as so, cG as fu, f9 as gu, fa as xu, fb as bu, fc as yu, fd as vu, fe as Nu, ff as Cu, fg as wu, fh as Su, fi as Tu, fj as ku, fk as Iu, fl as Ta, fm as vn, fn as Ya, fo as Du, fp as Hl, fq as Eu, fr as Au, fs as $s, ft as Wl, fu as Ou, fv as Mu, fw as Fu, fx as Ru, fy as Lu, R as Pr, g as Mn, fz as qs, fA as ro, aC as Pu, fB as gs, fC as Vu, fD as lo, fE as Bu, fF as io, cq as _u, fG as zu, a4 as $u, fH as ns, fI as qu, fJ as Ql, fK as ju, fL as Ku, fM as Yl, fN as Uu, fO as Gu, fP as Hu, fQ as Wu, fR as Qu, cF as Yu, cH as Ju, aj as oo, fS as Xu, fT as Zu, fU as em, fV as tm, fW as am, fX as nm, fY as sm, fZ as rm, f_ as lm, f$ as co, g0 as im, g1 as Is, c8 as Ds, g2 as uo, g3 as om, g4 as cm, g5 as mo, g6 as dm, g7 as um, g8 as Es, g9 as js, ga as mm, gb as hm, gc as pm, gd as fm, ge as gm, gf as Jl, gg as an, gh as ho, gi as xm, bW as bm, gj as po, gk as fo, gl as ds, gm as go, gn as xo, go as Xl, gp as ym, gq as vm, gr as us, gs as Nm, gt as Vr, gu as Cm, gv as xs, h as Fn, i as Rn, k as Ln, j as Pn, l as Vn, m as Bn, gw as wm, gx as _n, gy as ca, gz as br, gA as yr, gB as zn, gC as bo, gD as Sm, gE as Ks, gF as Us, gG as Tm, gH as Gs, gI as km, gJ as Zl, gK as ei, cN as Im, gL as Dm, cO as Em, cQ as Am, cR as Om, y as Mm, gM as Fm, gN as Rm, gO as Lm, bM as Pm, bN as Vm, bO as Bm, bt as As, cC as Os, gP as ti, gQ as yo, ce as Hs, gR as _m, gS as zm, gT as $m, F as qm, aV as jm, gU as Km, gV as Um, aW as Gm } from "./index-hhH5F_tQ.js";
5
5
  import "./index-CuHybtft.js";
6
- import { c as $e, H as Ne, B as Z, V as bs, K as Un, a as Y, aP as Hm, L as $, a1 as ae, a2 as ne, a3 as se, a4 as re, a5 as j, g as At, X as et, G as O, $ as Dt, W as Vt, Y as It, Z as Et, P as Ot, b as Rt, d as Mt, C as fa, aQ as Wm, aH as Tn, aR as Br, aS as yo, aE as _r, aC as Qm, a0 as Fe, aT as Ym, f as ga, u as Ie, e as va, aU as zr, aV as Gn, _ as Xt, E as vo, T as Hn, I as Wn, J as Jt, M as Ia, Q as Ms, S as Pa, k as Jm, aI as Ea, aW as Xm, aX as Zm, aY as No, ah as eh, aK as th, aZ as ah, a_ as nh, a$ as ai, b0 as sh, b1 as rh, b2 as lh, b3 as ih, aO as oh, b4 as ch, b5 as ni, b6 as dh, b7 as si, R as vr, b8 as on, b9 as uh, a6 as Ye, ba as mh, bb as $r, bc as $n, bd as ys, be as da, bf as ss, bg as ri, bh as hh, bi as Pt, bj as ph, O as Co, bk as nt, bl as wo, v as li, bm as fh, bn as gh, bo as xh, bp as bh, bq as yh, br as vh, bs as Nh, bt as Ch, bu as wh, bv as Sh, bw as Th, bx as kh, by as ii, bz as Dh, bA as Ih, bB as Eh, N as Fs } from "./switch-DmE_MY3L.js";
7
- import { f as Ah, g as xt, r as So, h as Qn, S as Oh, i as To, V as ko, e as Mh, C as Fh, R as Rs } from "./use-create-flow-overlay-state-D_Ntx-_C.js";
8
- import { C as Do } from "./chevrons-up-down-lahj6tQy.js";
6
+ import { c as $e, H as Ne, B as Z, V as bs, K as Un, a as Y, aP as Hm, L as $, a1 as ae, a2 as ne, a3 as se, a4 as re, a5 as j, g as At, X as et, G as O, $ as It, W as Vt, Y as Dt, Z as Et, P as Ot, b as Rt, d as Mt, C as fa, aQ as Wm, aH as Tn, aR as Br, aS as vo, aE as _r, aC as Qm, a0 as Fe, aT as Ym, f as ga, u as De, e as va, aU as zr, aV as Gn, _ as Xt, E as No, T as Hn, I as Wn, J as Jt, M as Da, Q as Ms, S as Pa, k as Jm, aI as Ea, aW as Xm, aX as Zm, aY as Co, ah as eh, aK as th, aZ as ah, a_ as nh, a$ as ai, b0 as sh, b1 as rh, b2 as lh, b3 as ih, aO as oh, b4 as ch, b5 as ni, b6 as dh, b7 as si, R as vr, b8 as on, b9 as uh, a6 as Ye, ba as mh, bb as $r, bc as $n, bd as ys, be as da, bf as ss, bg as ri, bh as hh, bi as Pt, bj as ph, O as wo, bk as nt, bl as So, v as li, bm as fh, bn as gh, bo as xh, bp as bh, bq as yh, br as vh, bs as Nh, bt as Ch, bu as wh, bv as Sh, bw as Th, bx as kh, by as ii, bz as Ih, bA as Dh, bB as Eh, N as Fs } from "./switch-DMPsMpHW.js";
7
+ import "./catalog-field-grounding-BK4BX8sZ.js";
8
+ import { f as Ah, g as xt, r as To, h as Qn, S as Oh, i as ko, V as Io, e as Mh, C as Fh, R as Rs } from "./use-create-flow-overlay-state-hlsTNh2b.js";
9
9
  import { createPortal as Rh } from "react-dom";
10
10
  import "./index-CJdxSyQq.js";
11
- import { P as Lh } from "./palette-2HWSR5wb.js";
11
+ import { P as Lh } from "./palette-DCzLwqIw.js";
12
12
  import { a as Ph } from "./common-types-4bjoIgvm.js";
13
13
  /**
14
14
  * @license lucide-react v0.453.0 - ISC
@@ -42,7 +42,7 @@ const Bh = $e("ArrowUpAZ", [
42
42
  * This source code is licensed under the ISC license.
43
43
  * See the LICENSE file in the root directory of this source tree.
44
44
  */
45
- const Io = $e("ArrowUpDown", [
45
+ const Do = $e("ArrowUpDown", [
46
46
  ["path", { d: "m21 16-4 4-4-4", key: "f6ql7i" }],
47
47
  ["path", { d: "M17 20V4", key: "1ejh1v" }],
48
48
  ["path", { d: "m3 8 4-4 4 4", key: "11wl7u" }],
@@ -681,7 +681,7 @@ function cp({
681
681
  joins: s.joins.filter((T) => T.id !== w)
682
682
  }), i(new Set([...d].filter((T) => T !== w)));
683
683
  }, c = (w, T) => {
684
- var M, V, F, b, D;
684
+ var M, V, F, b, I;
685
685
  const k = s.joins.find((L) => L.id === w);
686
686
  if (!k) return;
687
687
  const S = { ...k, ...T };
@@ -691,13 +691,13 @@ function cp({
691
691
  });
692
692
  return;
693
693
  }
694
- const I = s.joins.filter(
694
+ const D = s.joins.filter(
695
695
  (L) => {
696
696
  var R;
697
697
  return L.id !== w && L.target.name === ((R = S.target) == null ? void 0 : R.name);
698
698
  }
699
699
  );
700
- if ((F = S.target) != null && F.name && I.length > 0) {
700
+ if ((F = S.target) != null && F.name && D.length > 0) {
701
701
  Ze.error("Duplicate join targets are not supported", {
702
702
  description: `The table ${S.target.name} is already used as a target in another join. Each table can only be joined once.`
703
703
  });
@@ -706,7 +706,7 @@ function cp({
706
706
  const A = s.joins.map(
707
707
  (L) => L.id === w ? S : L
708
708
  );
709
- if ((b = S.source) != null && b.name && ((D = S.target) != null && D.name) && S.joinKeyGroups[0].keys.length === 0) {
709
+ if ((b = S.source) != null && b.name && ((I = S.target) != null && I.name) && S.joinKeyGroups[0].keys.length === 0) {
710
710
  const L = n.find(
711
711
  (_) => {
712
712
  var q;
@@ -761,8 +761,8 @@ function cp({
761
761
  moveJoinUp: (w) => {
762
762
  const T = s.joins.findIndex((k) => k.id === w);
763
763
  if (T > 0) {
764
- const k = [...s.joins], S = { ...k[T] }, I = { ...k[T - 1] };
765
- k[T] = I, k[T - 1] = S, k.forEach((M, V) => {
764
+ const k = [...s.joins], S = { ...k[T] }, D = { ...k[T - 1] };
765
+ k[T] = D, k[T - 1] = S, k.forEach((M, V) => {
766
766
  M.sequence = V + 1;
767
767
  });
768
768
  const A = {
@@ -775,8 +775,8 @@ function cp({
775
775
  moveJoinDown: (w) => {
776
776
  const T = s.joins.findIndex((k) => k.id === w);
777
777
  if (T < s.joins.length - 1) {
778
- const k = [...s.joins], S = { ...k[T] }, I = { ...k[T + 1] };
779
- k[T] = I, k[T + 1] = S, k.forEach((M, V) => {
778
+ const k = [...s.joins], S = { ...k[T] }, D = { ...k[T + 1] };
779
+ k[T] = D, k[T + 1] = S, k.forEach((M, V) => {
780
780
  M.sequence = V + 1;
781
781
  });
782
782
  const A = {
@@ -814,11 +814,11 @@ function cp({
814
814
  updateGroupOperator: (w, T, k) => {
815
815
  const S = s.joins.find((A) => A.id === w);
816
816
  if (!S) return;
817
- const I = [...S.joinKeyGroups];
818
- I[T] = { ...I[T], operator: k }, c(w, { joinKeyGroups: I });
817
+ const D = [...S.joinKeyGroups];
818
+ D[T] = { ...D[T], operator: k }, c(w, { joinKeyGroups: D });
819
819
  },
820
820
  removeJoinKeyGroup: (w, T) => {
821
- const k = s.joins.find((I) => I.id === w);
821
+ const k = s.joins.find((D) => D.id === w);
822
822
  if (!k) return;
823
823
  const S = [...k.joinKeyGroups];
824
824
  S.splice(T, 1), c(w, { joinKeyGroups: S });
@@ -828,7 +828,7 @@ function cp({
828
828
  if (!k) return;
829
829
  const S = n.find(
830
830
  (V) => V.name === k.source.name
831
- ), I = n.find(
831
+ ), D = n.find(
832
832
  (V) => V.name === k.target.name
833
833
  ), A = [...k.joinKeyGroups];
834
834
  A[T] || (A[T] = ci());
@@ -850,9 +850,9 @@ function cp({
850
850
  dataType: "",
851
851
  label: "",
852
852
  qualifiedFieldName: "",
853
- entityId: (I == null ? void 0 : I.name) || "",
854
- entityName: (I == null ? void 0 : I.name) || "",
855
- entityType: (I == null ? void 0 : I.type) || "table"
853
+ entityId: (D == null ? void 0 : D.name) || "",
854
+ entityName: (D == null ? void 0 : D.name) || "",
855
+ entityType: (D == null ? void 0 : D.type) || "table"
856
856
  },
857
857
  operator: "="
858
858
  };
@@ -861,55 +861,55 @@ function cp({
861
861
  keys: [...A[T].keys, M]
862
862
  }, c(w, { joinKeyGroups: A });
863
863
  },
864
- updateJoinKey: (w, T, k, S, I) => {
865
- const A = s.joins.find((D) => D.id === w);
864
+ updateJoinKey: (w, T, k, S, D) => {
865
+ const A = s.joins.find((I) => I.id === w);
866
866
  if (!A) return;
867
867
  const M = n.find(
868
- (D) => D.name === A.source.name
868
+ (I) => I.name === A.source.name
869
869
  ), V = n.find(
870
- (D) => D.name === A.target.name
870
+ (I) => I.name === A.target.name
871
871
  ), F = [...A.joinKeyGroups], b = F[T].keys[k];
872
872
  S === "sourceColumnName" && M ? F[T].keys[k] = {
873
873
  ...b,
874
874
  source: {
875
875
  ...b.source,
876
- name: I
876
+ name: D
877
877
  }
878
878
  } : S === "targetColumnName" && V ? F[T].keys[k] = {
879
879
  ...b,
880
880
  target: {
881
881
  ...b.target,
882
- name: I
882
+ name: D
883
883
  }
884
884
  } : S === "operator" && (F[T].keys[k] = {
885
885
  ...b,
886
- operator: I
886
+ operator: D
887
887
  }), c(w, { joinKeyGroups: F });
888
888
  },
889
889
  removeJoinKey: (w, T, k) => {
890
890
  const S = s.joins.find((A) => A.id === w);
891
891
  if (!S) return;
892
- const I = [...S.joinKeyGroups];
893
- I[T].keys.splice(k, 1), c(w, { joinKeyGroups: I });
892
+ const D = [...S.joinKeyGroups];
893
+ D[T].keys.splice(k, 1), c(w, { joinKeyGroups: D });
894
894
  },
895
895
  generateSQLPreview: () => {
896
896
  const w = [...s.joins].sort(
897
- (S, I) => S.sequence - I.sequence
897
+ (S, D) => S.sequence - D.sequence
898
898
  ), T = s.baseEntity;
899
899
  if (!T.name)
900
900
  return "SELECT * FROM table -- Please select a base entity";
901
901
  let k = `SELECT *
902
902
  FROM ${T.name}`;
903
903
  return w.forEach((S) => {
904
- const I = n.find(
904
+ const D = n.find(
905
905
  (V) => V.name === S.target.name
906
906
  );
907
- if (!I) return;
907
+ if (!D) return;
908
908
  const A = S.joinKeyGroups.filter((V) => V.keys && V.keys.length > 0).map((V) => {
909
909
  const F = V.keys.filter(
910
910
  (b) => {
911
- var D, L, R, B;
912
- return ((D = b.source) == null ? void 0 : D.name) && ((L = b.target) == null ? void 0 : L.name) && ((R = b.source) == null ? void 0 : R.entityName) && ((B = b.target) == null ? void 0 : B.entityName);
911
+ var I, L, R, B;
912
+ return ((I = b.source) == null ? void 0 : I.name) && ((L = b.target) == null ? void 0 : L.name) && ((R = b.source) == null ? void 0 : R.entityName) && ((B = b.target) == null ? void 0 : B.entityName);
913
913
  }
914
914
  ).map(
915
915
  (b) => `${b.source.entityName}.${b.source.name} ${b.operator} ${b.target.entityName}.${b.target.name}`
@@ -917,17 +917,17 @@ FROM ${T.name}`;
917
917
  return F.length > 1 ? `(${F.join(` ${V.operator} `)})` : F[0];
918
918
  }).filter(Boolean), M = A.length > 1 ? A.join(" OR ") : A[0] || "condition_here";
919
919
  k += `
920
- ${S.joinType} JOIN ${I.name}
920
+ ${S.joinType} JOIN ${D.name}
921
921
  ON ${M}`;
922
922
  }), k;
923
923
  },
924
924
  isValidConfiguration: () => !(!s.baseEntity.name || s.joins.some(
925
925
  (S) => !S.source.name || !S.target.name
926
926
  ) || s.joins.some(
927
- (S) => S.joinKeyGroups.some((I) => I.keys.length === 0)
927
+ (S) => S.joinKeyGroups.some((D) => D.keys.length === 0)
928
928
  ) || s.joins.some(
929
929
  (S) => S.joinKeyGroups.some(
930
- (I) => I.keys.some(
930
+ (D) => D.keys.some(
931
931
  (A) => !A.source.name || !A.target.name || !A.operator
932
932
  )
933
933
  )
@@ -982,18 +982,18 @@ function pp({
982
982
  } = cp({
983
983
  initialJoinPlan: t,
984
984
  availableDataSources: n
985
- }), [I, A] = K(/* @__PURE__ */ new Set()), [M, V] = K(!1), F = (R) => {
985
+ }), [D, A] = K(/* @__PURE__ */ new Set()), [M, V] = K(!1), F = (R) => {
986
986
  const B = l.find((z) => z.entityName === R);
987
987
  return (B == null ? void 0 : B.columns) || [];
988
988
  }, b = (R) => A((B) => {
989
989
  const z = new Set(B);
990
990
  return z.has(R) ? z.delete(R) : z.add(R), z;
991
- }), D = [];
992
- o.baseEntity.name && D.push(o.baseEntity.name);
991
+ }), I = [];
992
+ o.baseEntity.name && I.push(o.baseEntity.name);
993
993
  for (const R of [...o.joins].sort(
994
994
  (B, z) => B.sequence - z.sequence
995
995
  ))
996
- R.target.name && !D.includes(R.target.name) && D.push(R.target.name);
996
+ R.target.name && !I.includes(R.target.name) && I.push(R.target.name);
997
997
  const L = (R) => {
998
998
  const B = R.joinKeyGroups.flatMap((q) => q.keys), z = B.find(
999
999
  (q) => {
@@ -1044,16 +1044,16 @@ function pp({
1044
1044
  ),
1045
1045
  /* @__PURE__ */ e("p", { className: "text-[11px] leading-relaxed text-muted-foreground", children: "Every other dataset connects back to this one." })
1046
1046
  ] }),
1047
- D.length > 0 && /* @__PURE__ */ a("div", { className: "min-w-0 space-y-1.5", children: [
1047
+ I.length > 0 && /* @__PURE__ */ a("div", { className: "min-w-0 space-y-1.5", children: [
1048
1048
  /* @__PURE__ */ e($, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Join path" }),
1049
- /* @__PURE__ */ e("div", { className: "flex flex-wrap items-center gap-1.5", children: D.map((R, B) => /* @__PURE__ */ a("span", { className: "flex items-center gap-1.5", children: [
1049
+ /* @__PURE__ */ e("div", { className: "flex flex-wrap items-center gap-1.5", children: I.map((R, B) => /* @__PURE__ */ a("span", { className: "flex items-center gap-1.5", children: [
1050
1050
  B > 0 && /* @__PURE__ */ e(os, { className: "h-3 w-3 text-muted-foreground" }),
1051
1051
  /* @__PURE__ */ a(
1052
1052
  "span",
1053
1053
  {
1054
1054
  className: `inline-flex max-w-[220px] items-center gap-1.5 rounded-[4px] border px-2 py-1 leading-none ${B === 0 ? "border-border bg-muted font-medium text-foreground" : "border-border/60 text-muted-foreground"}`,
1055
1055
  children: [
1056
- /* @__PURE__ */ e(In, { className: "h-3 w-3 shrink-0 text-muted-foreground" }),
1056
+ /* @__PURE__ */ e(Dn, { className: "h-3 w-3 shrink-0 text-muted-foreground" }),
1057
1057
  /* @__PURE__ */ e("span", { className: "min-w-0 truncate text-[11.5px] leading-none", children: R }),
1058
1058
  B === 0 && /* @__PURE__ */ e("span", { className: "shrink-0 text-[9.5px] uppercase leading-none tracking-[0.06em] text-muted-foreground", children: "BASE" })
1059
1059
  ]
@@ -1096,7 +1096,7 @@ function pp({
1096
1096
  (ee) => ee.name === R.source.name
1097
1097
  ), z = n.find(
1098
1098
  (ee) => ee.name === R.target.name
1099
- ), _ = c.has(R.id), q = I.has(R.id) || R.joinKeyGroups.length > 1 || R.joinKeyGroups.some((ee) => ee.operator !== "AND"), H = L(R), Q = R.relationshipCardinality;
1099
+ ), _ = c.has(R.id), q = D.has(R.id) || R.joinKeyGroups.length > 1 || R.joinKeyGroups.some((ee) => ee.operator !== "AND"), H = L(R), Q = R.relationshipCardinality;
1100
1100
  return /* @__PURE__ */ a(
1101
1101
  "div",
1102
1102
  {
@@ -1304,7 +1304,7 @@ function pp({
1304
1304
  ),
1305
1305
  onCollapse: () => b(R.id)
1306
1306
  }
1307
- ) : /* @__PURE__ */ a(De, { children: [
1307
+ ) : /* @__PURE__ */ a(Ie, { children: [
1308
1308
  /* @__PURE__ */ e($, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Match on" }),
1309
1309
  (J = R.joinKeyGroups[0]) != null && J.keys.length ? /* @__PURE__ */ e("div", { className: "min-w-0 space-y-1.5", children: R.joinKeyGroups[0].keys.map(
1310
1310
  (ee, W) => /* @__PURE__ */ e(
@@ -1696,7 +1696,7 @@ function bp({
1696
1696
  ), i = s.find(
1697
1697
  (l) => l.name === n
1698
1698
  );
1699
- return /* @__PURE__ */ a(De, { children: [
1699
+ return /* @__PURE__ */ a(Ie, { children: [
1700
1700
  /* @__PURE__ */ a("div", { className: "flex items-center gap-1 rounded-md border bg-muted px-2 py-1", children: [
1701
1701
  /* @__PURE__ */ e(kt, { variant: "secondary", className: "text-xs", children: i == null ? void 0 : i.type }),
1702
1702
  /* @__PURE__ */ e("span", { className: "text-xs font-medium", children: i == null ? void 0 : i.name }),
@@ -1820,22 +1820,22 @@ FROM ${N.name}`;
1820
1820
  const S = T.joinKeyGroups.filter((A) => A.keys && A.keys.length > 0).map((A) => {
1821
1821
  const M = A.keys.filter(
1822
1822
  (V) => {
1823
- var F, b, D, L;
1824
- return ((F = V.source) == null ? void 0 : F.name) && ((b = V.target) == null ? void 0 : b.name) && ((D = V.source) == null ? void 0 : D.entityName) && ((L = V.target) == null ? void 0 : L.entityName);
1823
+ var F, b, I, L;
1824
+ return ((F = V.source) == null ? void 0 : F.name) && ((b = V.target) == null ? void 0 : b.name) && ((I = V.source) == null ? void 0 : I.entityName) && ((L = V.target) == null ? void 0 : L.entityName);
1825
1825
  }
1826
1826
  ).map(
1827
1827
  (V) => `${V.source.entityName}.${V.source.name} ${V.operator} ${V.target.entityName}.${V.target.name}`
1828
1828
  );
1829
1829
  return M.length > 1 ? `(${M.join(` ${A.operator} `)})` : M[0];
1830
- }).filter(Boolean), I = S.length > 1 ? S.join(" OR ") : S[0] || "condition_here";
1830
+ }).filter(Boolean), D = S.length > 1 ? S.join(" OR ") : S[0] || "condition_here";
1831
1831
  w += `
1832
1832
  ${T.joinType} JOIN ${k.name}
1833
- ON ${I}`;
1833
+ ON ${D}`;
1834
1834
  }), w;
1835
1835
  };
1836
1836
  if (p.length < 2)
1837
1837
  return null;
1838
- const y = l.joins.length > 0 && /* @__PURE__ */ e(Dt, { side: "bottom", className: "ml-4 max-w-md overflow-hidden p-0", children: /* @__PURE__ */ e(
1838
+ const y = l.joins.length > 0 && /* @__PURE__ */ e(It, { side: "bottom", className: "ml-4 max-w-md overflow-hidden p-0", children: /* @__PURE__ */ e(
1839
1839
  bp,
1840
1840
  {
1841
1841
  joins: l.joins,
@@ -1844,8 +1844,8 @@ ${T.joinType} JOIN ${k.name}
1844
1844
  generateSQLPreview: x
1845
1845
  }
1846
1846
  ) });
1847
- return /* @__PURE__ */ a(De, { children: [
1848
- /* @__PURE__ */ e(Vt, { children: /* @__PURE__ */ a(It, { children: [
1847
+ return /* @__PURE__ */ a(Ie, { children: [
1848
+ /* @__PURE__ */ e(Vt, { children: /* @__PURE__ */ a(Dt, { children: [
1849
1849
  /* @__PURE__ */ e(Et, { asChild: !0, children: s === "badge" ? /* @__PURE__ */ a(
1850
1850
  kt,
1851
1851
  {
@@ -1900,7 +1900,7 @@ ${T.joinType} JOIN ${k.name}
1900
1900
  }
1901
1901
  function vp() {
1902
1902
  var v, N, w, T, k, S;
1903
- const [t, n] = K(!1), [s, r] = K(!1), [d, i] = K(!1), l = O((I) => I.card.dataSource), o = O((I) => I.card), c = O((I) => I.isDevMode), { updateDataSource: h } = Ne(), { autoJoinMetadata: m } = Nt(o), p = {
1903
+ const [t, n] = K(!1), [s, r] = K(!1), [d, i] = K(!1), l = O((D) => D.card.dataSource), o = O((D) => D.card), c = O((D) => D.isDevMode), { updateDataSource: h } = Ne(), { autoJoinMetadata: m } = Nt(o), p = {
1904
1904
  ...{
1905
1905
  connectionId: "",
1906
1906
  connectionType: "",
@@ -1911,16 +1911,16 @@ function vp() {
1911
1911
  selectedEntities: (l == null ? void 0 : l.selectedEntities) || []
1912
1912
  }, u = kc(p.selectedEntities), g = u.length, C = g === 0 ? "Choose dataset" : g === 1 ? Js(u[0]) : `${g} datasets`, x = ((w = (N = (v = o == null ? void 0 : o.config) == null ? void 0 : v.joinPlan) == null ? void 0 : N.joins) == null ? void 0 : w.length) ?? 0, y = !!(m != null && m.autoResolved);
1913
1913
  ((k = (T = m == null ? void 0 : m.resolvedJoinPlan) == null ? void 0 : T.joins) == null ? void 0 : k.length) ?? ((S = m == null ? void 0 : m.relationshipsUsed) == null || S.length);
1914
- const E = g < 2 ? null : x > 0 ? `${x} join${x === 1 ? "" : "s"}` : y ? "auto" : null, P = (I) => {
1914
+ const E = g < 2 ? null : x > 0 ? `${x} join${x === 1 ? "" : "s"}` : y ? "auto" : null, P = (D) => {
1915
1915
  const A = u.filter(
1916
- (M) => !is(M, I)
1916
+ (M) => !is(M, D)
1917
1917
  );
1918
1918
  h({
1919
1919
  ...p,
1920
1920
  selectedEntities: A
1921
1921
  });
1922
1922
  };
1923
- return /* @__PURE__ */ a(De, { children: [
1923
+ return /* @__PURE__ */ a(Ie, { children: [
1924
1924
  /* @__PURE__ */ a(Ot, { open: t, onOpenChange: n, children: [
1925
1925
  /* @__PURE__ */ e(Rt, { asChild: !0, children: /* @__PURE__ */ a(
1926
1926
  "button",
@@ -1929,7 +1929,7 @@ function vp() {
1929
1929
  className: "flex h-7 w-full items-center gap-2 rounded-control border border-input bg-background px-2 text-left transition-colors hover:bg-muted focus:outline-none focus-visible:border-ring",
1930
1930
  children: [
1931
1931
  /* @__PURE__ */ e(
1932
- In,
1932
+ Dn,
1933
1933
  {
1934
1934
  className: "h-3 w-3 shrink-0 text-muted-foreground",
1935
1935
  strokeWidth: 1.75
@@ -1964,35 +1964,35 @@ function vp() {
1964
1964
  /* @__PURE__ */ e("p", { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Datasets" }),
1965
1965
  /* @__PURE__ */ e("span", { className: "font-mono text-[10px] tabular-nums text-muted-foreground/70", children: g })
1966
1966
  ] }),
1967
- g === 0 ? /* @__PURE__ */ e("div", { className: "px-3 pb-2 text-[12px] text-muted-foreground", children: "No datasets selected." }) : /* @__PURE__ */ e("ul", { className: "mb-1", children: u.map((I, A) => /* @__PURE__ */ a(
1967
+ g === 0 ? /* @__PURE__ */ e("div", { className: "px-3 pb-2 text-[12px] text-muted-foreground", children: "No datasets selected." }) : /* @__PURE__ */ e("ul", { className: "mb-1", children: u.map((D, A) => /* @__PURE__ */ a(
1968
1968
  "li",
1969
1969
  {
1970
1970
  className: "flex items-start gap-2 px-3 py-1.5 hover:bg-muted/50",
1971
1971
  children: [
1972
1972
  /* @__PURE__ */ e(
1973
- In,
1973
+ Dn,
1974
1974
  {
1975
1975
  className: "mt-[3px] h-3 w-3 shrink-0 text-muted-foreground",
1976
1976
  strokeWidth: 1.75
1977
1977
  }
1978
1978
  ),
1979
1979
  /* @__PURE__ */ a("div", { className: "min-w-0 flex-1", children: [
1980
- /* @__PURE__ */ e("p", { className: "truncate text-[13px] text-foreground", children: Js(I) }),
1981
- /* @__PURE__ */ e("p", { className: "truncate text-[11px] text-muted-foreground", children: Np(I) })
1980
+ /* @__PURE__ */ e("p", { className: "truncate text-[13px] text-foreground", children: Js(D) }),
1981
+ /* @__PURE__ */ e("p", { className: "truncate text-[11px] text-muted-foreground", children: Np(D) })
1982
1982
  ] }),
1983
1983
  /* @__PURE__ */ e(
1984
1984
  "button",
1985
1985
  {
1986
1986
  type: "button",
1987
- onClick: () => P(I),
1988
- "aria-label": `Remove ${Js(I)}`,
1987
+ onClick: () => P(D),
1988
+ "aria-label": `Remove ${Js(D)}`,
1989
1989
  className: "inline-flex h-5 w-5 shrink-0 items-center justify-center rounded-control text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",
1990
1990
  children: /* @__PURE__ */ e(et, { className: "h-3 w-3" })
1991
1991
  }
1992
1992
  )
1993
1993
  ]
1994
1994
  },
1995
- `${I.connectionId}-${I.name}-${A}`
1995
+ `${D.connectionId}-${D.name}-${A}`
1996
1996
  )) }),
1997
1997
  /* @__PURE__ */ a(
1998
1998
  "button",
@@ -2086,7 +2086,7 @@ function Lo({ isVisible: t }) {
2086
2086
  ),
2087
2087
  children: [
2088
2088
  /* @__PURE__ */ e("div", { className: "px-4 pt-4", children: /* @__PURE__ */ e(vp, {}) }),
2089
- /* @__PURE__ */ e("div", { className: "min-h-0 flex-1", children: /* @__PURE__ */ e(Dc, {}) }),
2089
+ /* @__PURE__ */ e("div", { className: "min-h-0 flex-1", children: /* @__PURE__ */ e(Ic, {}) }),
2090
2090
  /* @__PURE__ */ e(
2091
2091
  sp,
2092
2092
  {
@@ -2153,7 +2153,7 @@ function wp() {
2153
2153
  onStoreUpdate: p,
2154
2154
  delay: Cp
2155
2155
  });
2156
- Se(() => So(C), [C]);
2156
+ Se(() => To(C), [C]);
2157
2157
  function x(y) {
2158
2158
  g(y), Wm(f.current) || i({});
2159
2159
  }
@@ -2183,11 +2183,11 @@ function Tp() {
2183
2183
  c.current = l;
2184
2184
  const { value: h, onChange: m, flush: f } = Po({
2185
2185
  storeValue: t,
2186
- defaultValue: Ic,
2186
+ defaultValue: Dc,
2187
2187
  onStoreUpdate: r,
2188
2188
  delay: Sp
2189
2189
  });
2190
- return Se(() => So(f), [f]), /* @__PURE__ */ e(
2190
+ return Se(() => To(f), [f]), /* @__PURE__ */ e(
2191
2191
  fa,
2192
2192
  {
2193
2193
  value: h ?? "",
@@ -2204,12 +2204,12 @@ function Tp() {
2204
2204
  }
2205
2205
  );
2206
2206
  }
2207
- const kp = /\{\{-?\s*filters\s*\|\s*where\s*-?\}\}/i, Dp = /\{\{-?\s*filters\s*\|\s*and\s*-?\}\}/i, Ip = /\bwhere\b/i;
2207
+ const kp = /\{\{-?\s*filters\s*\|\s*where\s*-?\}\}/i, Ip = /\{\{-?\s*filters\s*\|\s*and\s*-?\}\}/i, Dp = /\bwhere\b/i;
2208
2208
  function Ep(t) {
2209
- return t != null && t.trim() ? kp.test(t) || Dp.test(t) : !1;
2209
+ return t != null && t.trim() ? kp.test(t) || Ip.test(t) : !1;
2210
2210
  }
2211
2211
  function Ap(t) {
2212
- return !(t != null && t.trim()) || Ep(t) ? null : Ip.test(t) ? {
2212
+ return !(t != null && t.trim()) || Ep(t) ? null : Dp.test(t) ? {
2213
2213
  helper: "{{ filters | and }}",
2214
2214
  description: "Use this inside your existing WHERE clause to append dashboard filters."
2215
2215
  } : {
@@ -2375,7 +2375,7 @@ function Vp({
2375
2375
  }
2376
2376
  ), u = Tn(
2377
2377
  (X) => X.currentAIContext.selectedEntities
2378
- ), g = u.length, { setCurrentAIContext: C } = Br(), [x, y] = K(""), [E, P] = K(""), [v, N] = K(""), [w, T] = K("draft"), [k, S] = K("draft"), [I, A] = K(""), [M, V] = K(!1), [F, b] = K({ status: "idle" }), [D, L] = K(
2378
+ ), g = u.length, { setCurrentAIContext: C } = Br(), [x, y] = K(""), [E, P] = K(""), [v, N] = K(""), [w, T] = K("draft"), [k, S] = K("draft"), [D, A] = K(""), [M, V] = K(!1), [F, b] = K({ status: "idle" }), [I, L] = K(
2379
2379
  Xs
2380
2380
  ), [R, B] = K(!1), [z, _] = K(
2381
2381
  () => rs("inline-query-session")
@@ -2448,12 +2448,12 @@ function Vp({
2448
2448
  runId: ie,
2449
2449
  attemptCount: typeof (oe == null ? void 0 : oe.attemptCount) == "number" ? oe.attemptCount : Ce.current,
2450
2450
  errorCode: oe == null ? void 0 : oe.errorCode,
2451
- hasTools: typeof (oe == null ? void 0 : oe.hasTools) == "boolean" ? oe.hasTools : D.hasTools,
2451
+ hasTools: typeof (oe == null ? void 0 : oe.hasTools) == "boolean" ? oe.hasTools : I.hasTools,
2452
2452
  entityCount: g,
2453
- finalOutcome: (oe == null ? void 0 : oe.finalOutcome) || D.finalOutcome
2453
+ finalOutcome: (oe == null ? void 0 : oe.finalOutcome) || I.finalOutcome
2454
2454
  });
2455
2455
  },
2456
- [g, D.finalOutcome, D.hasTools]
2456
+ [g, I.finalOutcome, I.hasTools]
2457
2457
  ), qe = Ee(
2458
2458
  (X, ie) => {
2459
2459
  const oe = Q.current;
@@ -2525,7 +2525,7 @@ function Vp({
2525
2525
  }
2526
2526
  const ke = ui(ie);
2527
2527
  U(oe, ke, {
2528
- phase: D.phase === "self-healing" ? "self-healing" : "drafting",
2528
+ phase: I.phase === "self-healing" ? "self-healing" : "drafting",
2529
2529
  hasTools: !0
2530
2530
  }), be("inline_tool_step", oe, { hasTools: !0 });
2531
2531
  const it = ((Xe = X.input) == null ? void 0 : Xe.sql) ?? ((ht = X.args) == null ? void 0 : ht.sql);
@@ -2542,7 +2542,7 @@ function Vp({
2542
2542
  n,
2543
2543
  t,
2544
2544
  be,
2545
- D.phase,
2545
+ I.phase,
2546
2546
  xe,
2547
2547
  Ge,
2548
2548
  U
@@ -2612,7 +2612,7 @@ function Vp({
2612
2612
  body: {
2613
2613
  ...ie,
2614
2614
  inlineRunToken: Re || Le,
2615
- messages: yo(X)
2615
+ messages: vo(X)
2616
2616
  }
2617
2617
  };
2618
2618
  }
@@ -2909,7 +2909,7 @@ function Vp({
2909
2909
  [i, v]
2910
2910
  ), ra = v.trim().length > 0, Lt = ["valid", "invalid", "error"].includes(
2911
2911
  F.status
2912
- ), za = ra && Lt, Jn = F.status === "invalid", $a = F.status === "validating", Xn = ra && E.length > 0 && E === x.trim(), jt = sa.length > 0, Na = x.length > 0, qa = Xn && w === "draft", mn = Xn && w === "refine" && I === sa, Ca = k === "refine" && !jt ? "draft" : k, ja = (Ca === "refine" ? mn : qa) ? "Open composer preview" : "Generate composer SQL", Zn = x.trim().length > 0 || E.trim().length > 0 || ra || F.status !== "idle" || D.timelineSteps.length > 0, Ka = Ee((X = "draft") => {
2912
+ ), za = ra && Lt, Jn = F.status === "invalid", $a = F.status === "validating", Xn = ra && E.length > 0 && E === x.trim(), jt = sa.length > 0, Na = x.length > 0, qa = Xn && w === "draft", mn = Xn && w === "refine" && D === sa, Ca = k === "refine" && !jt ? "draft" : k, ja = (Ca === "refine" ? mn : qa) ? "Open composer preview" : "Generate composer SQL", Zn = x.trim().length > 0 || E.trim().length > 0 || ra || F.status !== "idle" || I.timelineSteps.length > 0, Ka = Ee((X = "draft") => {
2913
2913
  if (He)
2914
2914
  return;
2915
2915
  if ((X === "refine" ? mn : qa) && !R) {
@@ -2947,9 +2947,9 @@ function Vp({
2947
2947
  X || We("cancelled"), B(X);
2948
2948
  },
2949
2949
  [We]
2950
- ), pn = D.timelineSteps.findIndex(
2951
- (X) => X === D.activeStep
2952
- ), as = D.phase === "self-healing" ? "Fixing validation issue" : D.phase === "validating" ? "Validating SQL" : D.activeStep || "Drafting SQL", wa = F.status === "valid" ? {
2950
+ ), pn = I.timelineSteps.findIndex(
2951
+ (X) => X === I.activeStep
2952
+ ), as = I.phase === "self-healing" ? "Fixing validation issue" : I.phase === "validating" ? "Validating SQL" : I.activeStep || "Drafting SQL", wa = F.status === "valid" ? {
2953
2953
  label: "Validation passed",
2954
2954
  className: "border-emerald-500/30 bg-emerald-500/10 text-emerald-700",
2955
2955
  detail: F.message
@@ -3116,10 +3116,10 @@ function Vp({
3116
3116
  )
3117
3117
  ] })
3118
3118
  ] }),
3119
- D.timelineSteps.length > 0 && /* @__PURE__ */ a("div", { className: "flex flex-wrap items-center gap-1", children: [
3120
- D.timelineSteps.map((X, ie) => {
3121
- const oe = X === D.activeStep && ["drafting", "validating", "self-healing"].includes(
3122
- D.phase
3119
+ I.timelineSteps.length > 0 && /* @__PURE__ */ a("div", { className: "flex flex-wrap items-center gap-1", children: [
3120
+ I.timelineSteps.map((X, ie) => {
3121
+ const oe = X === I.activeStep && ["drafting", "validating", "self-healing"].includes(
3122
+ I.phase
3123
3123
  ), Re = !oe && pn >= 0 && ie < pn;
3124
3124
  return /* @__PURE__ */ e(
3125
3125
  "span",
@@ -3128,12 +3128,12 @@ function Vp({
3128
3128
  "rounded-full border px-2 py-0.5 text-[11px]",
3129
3129
  oe ? "border-foreground/30 bg-foreground/10 text-foreground" : Re ? "border-border/60 bg-muted/20 text-muted-foreground" : "border-border/50 bg-background text-muted-foreground/80"
3130
3130
  ].join(" "),
3131
- children: Lp(X, D.attempt)
3131
+ children: Lp(X, I.attempt)
3132
3132
  },
3133
3133
  `${X}-${ie}`
3134
3134
  );
3135
3135
  }),
3136
- wa && /* @__PURE__ */ e(Vt, { delayDuration: 150, children: /* @__PURE__ */ a(It, { children: [
3136
+ wa && /* @__PURE__ */ e(Vt, { delayDuration: 150, children: /* @__PURE__ */ a(Dt, { children: [
3137
3137
  /* @__PURE__ */ e(Et, { asChild: !0, children: /* @__PURE__ */ e(
3138
3138
  "span",
3139
3139
  {
@@ -3145,7 +3145,7 @@ function Vp({
3145
3145
  }
3146
3146
  ) }),
3147
3147
  /* @__PURE__ */ e(
3148
- Dt,
3148
+ It,
3149
3149
  {
3150
3150
  side: "top",
3151
3151
  align: "start",
@@ -3155,12 +3155,12 @@ function Vp({
3155
3155
  )
3156
3156
  ] }) })
3157
3157
  ] }),
3158
- (He || D.phase === "self-healing" || F.status === "validating") && /* @__PURE__ */ a("div", { className: "flex items-center gap-2 rounded-md border border-border/60 bg-muted/20 px-3 py-2 text-xs text-muted-foreground", children: [
3158
+ (He || I.phase === "self-healing" || F.status === "validating") && /* @__PURE__ */ a("div", { className: "flex items-center gap-2 rounded-md border border-border/60 bg-muted/20 px-3 py-2 text-xs text-muted-foreground", children: [
3159
3159
  /* @__PURE__ */ e(ga, { className: "size-3.5 animate-spin" }),
3160
3160
  as
3161
3161
  ] }),
3162
3162
  St && /* @__PURE__ */ e("div", { className: "rounded-md border border-destructive/40 bg-destructive/5 px-3 py-2 text-xs text-destructive", children: qt }),
3163
- w === "refine" && I && /* @__PURE__ */ a("div", { className: "space-y-1", children: [
3163
+ w === "refine" && D && /* @__PURE__ */ a("div", { className: "space-y-1", children: [
3164
3164
  /* @__PURE__ */ a("div", { className: "flex items-center justify-between rounded-[5px] border border-border/60 bg-muted/20 px-2.5 py-1.5 text-[11px]", children: [
3165
3165
  /* @__PURE__ */ e("span", { className: "text-muted-foreground", children: "Refining editor SQL" }),
3166
3166
  /* @__PURE__ */ e(
@@ -3177,7 +3177,7 @@ function Vp({
3177
3177
  M && /* @__PURE__ */ e("div", { className: "max-h-[120px] overflow-auto rounded-[5px] border border-border/60", children: /* @__PURE__ */ e(
3178
3178
  fa,
3179
3179
  {
3180
- value: I,
3180
+ value: D,
3181
3181
  onValueChange: () => {
3182
3182
  },
3183
3183
  language: "sql",
@@ -3262,7 +3262,7 @@ function Bp() {
3262
3262
  (le) => le.selectedSchemaName
3263
3263
  );
3264
3264
  O((le) => le.showAIDialog);
3265
- const o = O((le) => le.selectedTableName), c = Ie(
3265
+ const o = O((le) => le.selectedTableName), c = De(
3266
3266
  (le) => {
3267
3267
  var Oe, Be;
3268
3268
  return ((Be = (Oe = le.dashboard) == null ? void 0 : Oe.filters) == null ? void 0 : Be.length) ?? 0;
@@ -3309,14 +3309,14 @@ function Bp() {
3309
3309
  // setQueryError,
3310
3310
  setPythonStdOut: k,
3311
3311
  setCardPreferences: S,
3312
- setCardType: I,
3312
+ setCardType: D,
3313
3313
  setCardPython: A,
3314
3314
  setShowAIDialog: M,
3315
3315
  setCard: V,
3316
3316
  updateCardInFrame: F
3317
3317
  } = Ne();
3318
3318
  O((le) => le.onSave), O((le) => le.onClose), O((le) => le.actions.setSqlGen);
3319
- const b = O((le) => le.runSql), D = O((le) => le.actions.setRunSql), L = O(
3319
+ const b = O((le) => le.runSql), I = O((le) => le.actions.setRunSql), L = O(
3320
3320
  (le) => le.actions.setIsSqlRunning
3321
3321
  ), {
3322
3322
  data: R,
@@ -3354,8 +3354,8 @@ function Bp() {
3354
3354
  // setQueryError,
3355
3355
  H
3356
3356
  ]), Se(() => {
3357
- b && (t.getQueryData(J) || ee(), D(!1));
3358
- }, [b, ee, D, J, t]);
3357
+ b && (t.getQueryData(J) || ee(), I(!1));
3358
+ }, [b, ee, I, J, t]);
3359
3359
  const ve = Me(ee);
3360
3360
  ve.current = ee, Se(() => {
3361
3361
  if (P.current) {
@@ -3365,7 +3365,7 @@ function Bp() {
3365
3365
  ve.current();
3366
3366
  }, [h]);
3367
3367
  function he(le, Oe) {
3368
- w(le), Oe && D(!0);
3368
+ w(le), Oe && I(!0);
3369
3369
  }
3370
3370
  function Ce() {
3371
3371
  return /* @__PURE__ */ a(
@@ -3395,7 +3395,7 @@ function Bp() {
3395
3395
  ]
3396
3396
  }
3397
3397
  ),
3398
- n && /* @__PURE__ */ a(De, { children: [
3398
+ n && /* @__PURE__ */ a(Ie, { children: [
3399
3399
  /* @__PURE__ */ a(Lc, { className: "group/divider relative my-1 flex h-6 w-full shrink-0 cursor-row-resize items-center gap-3 px-1 outline-none", children: [
3400
3400
  /* @__PURE__ */ e("span", { className: "h-px flex-1 bg-border transition-colors group-hover/divider:bg-foreground/30" }),
3401
3401
  /* @__PURE__ */ a("span", { className: "inline-flex items-center gap-1.5 text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: [
@@ -3500,7 +3500,7 @@ function Bp() {
3500
3500
  t.removeQueries({
3501
3501
  queryKey: ue.current,
3502
3502
  exact: !0
3503
- }), D(!0);
3503
+ }), I(!0);
3504
3504
  }, 0);
3505
3505
  },
3506
3506
  className: "shrink-0",
@@ -3511,7 +3511,7 @@ function Bp() {
3511
3511
  ]
3512
3512
  }
3513
3513
  ),
3514
- /* @__PURE__ */ e(To, {}),
3514
+ /* @__PURE__ */ e(ko, {}),
3515
3515
  /* @__PURE__ */ a(
3516
3516
  kr,
3517
3517
  {
@@ -3628,8 +3628,8 @@ function $p({
3628
3628
  onSortChange: i,
3629
3629
  isLoading: l
3630
3630
  }) {
3631
- var S, I, A, M, V, F;
3632
- const o = ea.useMemo(() => Object.keys(t[0] ?? {}), [t]), c = n.sql && !((I = (S = n.preferences) == null ? void 0 : S.tablePrefs) != null && I.enableDevModePagination) ? (M = (A = n.preferences) == null ? void 0 : A.tablePrefs) == null ? void 0 : M.pageSize : void 0, h = ea.useMemo(
3631
+ var S, D, A, M, V, F;
3632
+ const o = ea.useMemo(() => Object.keys(t[0] ?? {}), [t]), c = n.sql && !((D = (S = n.preferences) == null ? void 0 : S.tablePrefs) != null && D.enableDevModePagination) ? (M = (A = n.preferences) == null ? void 0 : A.tablePrefs) == null ? void 0 : M.pageSize : void 0, h = ea.useMemo(
3633
3633
  () => {
3634
3634
  var b;
3635
3635
  return _i((b = n.config) == null ? void 0 : b.sortByColumns);
@@ -3656,8 +3656,8 @@ function $p({
3656
3656
  [x, o]
3657
3657
  ), E = ea.useMemo(() => {
3658
3658
  const b = {};
3659
- for (const D of o)
3660
- b[D] = _p(t, D);
3659
+ for (const I of o)
3660
+ b[I] = _p(t, I);
3661
3661
  return b;
3662
3662
  }, [o, t]), P = ea.useMemo(
3663
3663
  () => o.map((b) => {
@@ -3678,7 +3678,7 @@ function $p({
3678
3678
  onClick: () => R.getCanSort() && R.toggleSorting(R.getIsSorted() === "asc"),
3679
3679
  children: [
3680
3680
  /* @__PURE__ */ e("span", { className: "min-w-0 truncate", title: b, children: b }),
3681
- B === "asc" ? /* @__PURE__ */ e(Vc, { className: "h-3.5 w-3.5 shrink-0 text-foreground" }) : B === "desc" ? /* @__PURE__ */ e(Bc, { className: "h-3.5 w-3.5 shrink-0 text-foreground" }) : R.getCanSort() ? /* @__PURE__ */ e(Do, { className: "h-3 w-3 shrink-0 opacity-0 transition-opacity group-hover/header:opacity-50" }) : null
3681
+ B === "asc" ? /* @__PURE__ */ e(Vc, { className: "h-3.5 w-3.5 shrink-0 text-foreground" }) : B === "desc" ? /* @__PURE__ */ e(Bc, { className: "h-3.5 w-3.5 shrink-0 text-foreground" }) : R.getCanSort() ? /* @__PURE__ */ e(zi, { className: "h-3 w-3 shrink-0 opacity-0 transition-opacity group-hover/header:opacity-50" }) : null
3682
3682
  ]
3683
3683
  }
3684
3684
  );
@@ -3729,8 +3729,8 @@ function $p({
3729
3729
  zs,
3730
3730
  {
3731
3731
  className: "border-b-0 hover:bg-transparent",
3732
- children: b.headers.map((D) => {
3733
- const R = E[D.id] === "number";
3732
+ children: b.headers.map((I) => {
3733
+ const R = E[I.id] === "number";
3734
3734
  return /* @__PURE__ */ e(
3735
3735
  Uc,
3736
3736
  {
@@ -3738,12 +3738,12 @@ function $p({
3738
3738
  "group/header relative h-auto border-b border-transparent bg-muted/95 px-4 py-2 align-middle text-[10px] font-medium tracking-[0.08em] text-muted-foreground after:absolute after:bottom-0 after:left-0 after:right-0 after:h-px after:bg-border/60",
3739
3739
  R && "text-right"
3740
3740
  ),
3741
- children: D.isPlaceholder ? null : zl(
3742
- D.column.columnDef.header,
3743
- D.getContext()
3741
+ children: I.isPlaceholder ? null : zl(
3742
+ I.column.columnDef.header,
3743
+ I.getContext()
3744
3744
  )
3745
3745
  },
3746
- D.id
3746
+ I.id
3747
3747
  );
3748
3748
  })
3749
3749
  },
@@ -3754,8 +3754,8 @@ function $p({
3754
3754
  {
3755
3755
  className: "border-b border-border/40 transition-colors",
3756
3756
  "data-state": b.getIsSelected() && "selected",
3757
- children: b.getVisibleCells().map((D) => {
3758
- const R = E[D.column.id] === "number";
3757
+ children: b.getVisibleCells().map((I) => {
3758
+ const R = E[I.column.id] === "number";
3759
3759
  return /* @__PURE__ */ e(
3760
3760
  $l,
3761
3761
  {
@@ -3764,11 +3764,11 @@ function $p({
3764
3764
  R && "text-right"
3765
3765
  ),
3766
3766
  children: zl(
3767
- D.column.columnDef.cell,
3768
- D.getContext()
3767
+ I.column.columnDef.cell,
3768
+ I.getContext()
3769
3769
  )
3770
3770
  },
3771
- D.id
3771
+ I.id
3772
3772
  );
3773
3773
  })
3774
3774
  },
@@ -3880,7 +3880,7 @@ function qp({ className: t }) {
3880
3880
  E(T.name)
3881
3881
  ].filter(Boolean);
3882
3882
  return k.some(
3883
- (I) => S.includes(I)
3883
+ (D) => S.includes(D)
3884
3884
  );
3885
3885
  }, v = (C.groupByColumns || []).map(
3886
3886
  (w) => ({
@@ -4100,7 +4100,7 @@ function Bo({
4100
4100
  debugPayloads: t,
4101
4101
  className: n
4102
4102
  }) {
4103
- const [s, r] = K(null), d = O((P) => P.card), i = O((P) => P.frame), l = Ie((P) => P.selectedSheetId), o = Ie((P) => {
4103
+ const [s, r] = K(null), d = O((P) => P.card), i = O((P) => P.frame), l = De((P) => P.selectedSheetId), o = De((P) => {
4104
4104
  var v;
4105
4105
  return (v = P.dashboard) == null ? void 0 : v.id;
4106
4106
  }), c = de(
@@ -4257,7 +4257,7 @@ function Bo({
4257
4257
  ] })
4258
4258
  ] }),
4259
4259
  u.truncationMessage && /* @__PURE__ */ e("p", { className: "text-[12px] leading-5 text-muted-foreground", children: u.truncationMessage }),
4260
- /* @__PURE__ */ e("div", { className: "max-h-80 overflow-auto rounded-[5px] border border-border/60 bg-background p-2", children: /* @__PURE__ */ e(zi, { code: u.json, language: "json" }) })
4260
+ /* @__PURE__ */ e("div", { className: "max-h-80 overflow-auto rounded-[5px] border border-border/60 bg-background p-2", children: /* @__PURE__ */ e($i, { code: u.json, language: "json" }) })
4261
4261
  ] })
4262
4262
  ] })
4263
4263
  ]
@@ -4355,7 +4355,7 @@ function Ls({
4355
4355
  /* @__PURE__ */ e("span", { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Query" }),
4356
4356
  /* @__PURE__ */ e(En, { text: n, className: "h-6 w-6" })
4357
4357
  ] }),
4358
- /* @__PURE__ */ e("div", { className: "max-h-80 overflow-auto rounded-[5px] border border-border/60 bg-background p-2", children: /* @__PURE__ */ e(zi, { code: n, language: "sql" }) })
4358
+ /* @__PURE__ */ e("div", { className: "max-h-80 overflow-auto rounded-[5px] border border-border/60 bg-background p-2", children: /* @__PURE__ */ e($i, { code: n, language: "sql" }) })
4359
4359
  ] }) })
4360
4360
  ]
4361
4361
  }
@@ -4396,13 +4396,13 @@ function _o({
4396
4396
  ...s
4397
4397
  }) {
4398
4398
  var be, qe, Ge, ut, pe;
4399
- const r = O((ce) => ce.card), d = Dr(), l = O((ce) => ce.isDevMode) ? !1 : ((be = r.customCardPreferences) == null ? void 0 : be.showCardHeader) ?? !0, o = ((Ge = (qe = r.preferences) == null ? void 0 : qe.displayOptions) == null ? void 0 : Ge.showInlineFilterBar) ?? !0, c = O((ce) => ce.frame), h = O(
4399
+ const r = O((ce) => ce.card), d = Ir(), l = O((ce) => ce.isDevMode) ? !1 : ((be = r.customCardPreferences) == null ? void 0 : be.showCardHeader) ?? !0, o = ((Ge = (qe = r.preferences) == null ? void 0 : qe.displayOptions) == null ? void 0 : Ge.showInlineFilterBar) ?? !0, c = O((ce) => ce.frame), h = O(
4400
4400
  (ce) => ce.inlineFilterValuesMap[r.id]
4401
- ), m = Ie((ce) => ce.dashboard.filters), f = Ie((ce) => ce.selectedSheetId), [p, u] = K(!1), { currentUser: g } = Ir(), { tokenProps: C } = wr(Er), x = O((ce) => ce.actions.setRunSql), y = O(
4401
+ ), m = De((ce) => ce.dashboard.filters), f = De((ce) => ce.selectedSheetId), [p, u] = K(!1), { currentUser: g } = Dr(), { tokenProps: C } = wr(Er), x = O((ce) => ce.actions.setRunSql), y = O(
4402
4402
  (ce) => ce.actions.setCardInlineFilterValue
4403
4403
  ), E = O(
4404
4404
  (ce) => ce.actions.removeCardInlineFilterValue
4405
- ), { updateFilter: P } = vo(), v = m == null ? void 0 : m.find((ce) => ce.id === c.filterId), N = de(
4405
+ ), { updateFilter: P } = No(), v = m == null ? void 0 : m.find((ce) => ce.id === c.filterId), N = de(
4406
4406
  () => Va(c, r),
4407
4407
  [c, r]
4408
4408
  ), { manifest: w } = ba(
@@ -4425,23 +4425,23 @@ function _o({
4425
4425
  isMultiInputVisual: k === "multiple"
4426
4426
  }),
4427
4427
  [c, N, k]
4428
- ), I = de(() => {
4428
+ ), D = de(() => {
4429
4429
  const ce = S.findIndex(
4430
4430
  (we) => (we == null ? void 0 : we.id) === (r == null ? void 0 : r.id)
4431
4431
  );
4432
4432
  return ce < 0 ? -1 : ta(r, ce);
4433
- }, [S, r]), A = de(() => !N || k !== "multiple" || I < 0 ? r.type : Qa(
4433
+ }, [S, r]), A = de(() => !N || k !== "multiple" || D < 0 ? r.type : Qa(
4434
4434
  r,
4435
- I,
4435
+ D,
4436
4436
  T == null ? void 0 : T.slots
4437
- ) ?? r.type, [N, k, I, r, T == null ? void 0 : T.slots]), M = A ?? r.type, V = de(
4437
+ ) ?? r.type, [N, k, D, r, T == null ? void 0 : T.slots]), M = A ?? r.type, V = de(
4438
4438
  () => M === r.type ? r : { ...r, type: M },
4439
4439
  [r, M]
4440
- ), F = V.type === "table" || V.type === "matrixTable" || V.type === "pivotTable" || V.type === "aggregateTable" || V.type === "detailTable", b = de(() => A !== r.type ? { ...r, type: A } : r, [r, A]), { data: D, isLoading: L, isFetching: R, errorMessage: B, errorSql: z, pagination: _ } = Nt(b), q = M === "matrixTable" && Yc(D), H = Jc({
4441
- data: D,
4440
+ ), F = V.type === "table" || V.type === "matrixTable" || V.type === "pivotTable" || V.type === "aggregateTable" || V.type === "detailTable", b = de(() => A !== r.type ? { ...r, type: A } : r, [r, A]), { data: I, isLoading: L, isFetching: R, errorMessage: B, errorSql: z, pagination: _ } = Nt(b), q = M === "matrixTable" && Yc(I), H = Jc({
4441
+ data: I,
4442
4442
  isLoading: L,
4443
4443
  isFetching: R
4444
- }), { handleOpenInEditor: Q, handleDebugWithAssistant: J } = jr(B, z || r.sql || r.python), ee = de(() => (D == null ? void 0 : D.records) || [], [D == null ? void 0 : D.records]), { setCard: W, updateCardInFrame: ue } = Ne(), { data: ve } = Ar(V), he = V.id, Ce = V.config, Pe = V.interactionConfig, tt = V.customCfg, Je = V.preferences, le = V.queryConfig, Oe = !!V.sql, Be = D == null ? void 0 : D.records, at = de(
4444
+ }), { handleOpenInEditor: Q, handleDebugWithAssistant: J } = jr(B, z || r.sql || r.python), ee = de(() => (I == null ? void 0 : I.records) || [], [I == null ? void 0 : I.records]), { setCard: W, updateCardInFrame: ue } = Ne(), { data: ve } = Ar(V), he = V.id, Ce = V.config, Pe = V.interactionConfig, tt = V.customCfg, Je = V.preferences, le = V.queryConfig, Oe = !!V.sql, Be = I == null ? void 0 : I.records, at = de(
4445
4445
  () => ({
4446
4446
  id: he,
4447
4447
  type: M,
@@ -4459,20 +4459,20 @@ function _o({
4459
4459
  ]
4460
4460
  ), dt = de(() => {
4461
4461
  var ce;
4462
- return M !== "pivotTable" || !((ce = D == null ? void 0 : D.records) != null && ce.length) ? null : {
4463
- records: D.records,
4464
- columnSubtotalMeta: D.columnSubtotalMeta,
4465
- subtotalColumns: D.subtotalColumns || [],
4466
- pivotSchema: D.pivotSchema || [],
4467
- groupByColumns: D.groupByColumns
4462
+ return M !== "pivotTable" || !((ce = I == null ? void 0 : I.records) != null && ce.length) ? null : {
4463
+ records: I.records,
4464
+ columnSubtotalMeta: I.columnSubtotalMeta,
4465
+ subtotalColumns: I.subtotalColumns || [],
4466
+ pivotSchema: I.pivotSchema || [],
4467
+ groupByColumns: I.groupByColumns
4468
4468
  };
4469
4469
  }, [
4470
4470
  M,
4471
- D == null ? void 0 : D.records,
4472
- D == null ? void 0 : D.columnSubtotalMeta,
4473
- D == null ? void 0 : D.subtotalColumns,
4474
- D == null ? void 0 : D.pivotSchema,
4475
- D == null ? void 0 : D.groupByColumns
4471
+ I == null ? void 0 : I.records,
4472
+ I == null ? void 0 : I.columnSubtotalMeta,
4473
+ I == null ? void 0 : I.subtotalColumns,
4474
+ I == null ? void 0 : I.pivotSchema,
4475
+ I == null ? void 0 : I.groupByColumns
4476
4476
  ]), ge = Xc(
4477
4477
  V,
4478
4478
  dt
@@ -4481,7 +4481,7 @@ function _o({
4481
4481
  }, _e = de(() => {
4482
4482
  const ce = typeof window < "u" ? window.location.href : "", we = typeof navigator < "u" ? navigator.userAgent : "", Ve = typeof window < "u" ? `${window.innerWidth}x${window.innerHeight}` : "";
4483
4483
  return {
4484
- category: $i.QUERY_GENERATION,
4484
+ category: qi.QUERY_GENERATION,
4485
4485
  user: g,
4486
4486
  tokenContext: C,
4487
4487
  systemState: {
@@ -4525,7 +4525,7 @@ function _o({
4525
4525
  }
4526
4526
  };
4527
4527
  W(Ve), ue(Ve), r.sql && ((bt = (St = r.preferences) == null ? void 0 : St.tablePrefs) != null && bt.enableDevModePagination) && x(!0);
4528
- }, fe = de(() => !he || !Be ? null : qi({
4528
+ }, fe = de(() => !he || !Be ? null : ji({
4529
4529
  card: at,
4530
4530
  data: Be,
4531
4531
  cardType: M,
@@ -4551,7 +4551,7 @@ function _o({
4551
4551
  }
4552
4552
  function me() {
4553
4553
  var ce;
4554
- if (D != null && D.records && (D == null ? void 0 : D.records.length) === 0 && !L && !R && !q)
4554
+ if (I != null && I.records && (I == null ? void 0 : I.records.length) === 0 && !L && !R && !q)
4555
4555
  return B ? /* @__PURE__ */ e("div", { className: "flex h-full flex-col items-start justify-start overflow-auto p-4", children: /* @__PURE__ */ e(
4556
4556
  Ls,
4557
4557
  {
@@ -4566,7 +4566,7 @@ function _o({
4566
4566
  /* @__PURE__ */ e(nd, { className: "size-8 text-muted-foreground" }),
4567
4567
  /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: "No results to display" })
4568
4568
  ] });
4569
- if ((L || R) && (!(D != null && D.records) || D.records.length === 0) && !q)
4569
+ if ((L || R) && (!(I != null && I.records) || I.records.length === 0) && !q)
4570
4570
  return M === "table" || M === "detailTable" ? /* @__PURE__ */ e("div", { className: "relative mb-2 flex h-full min-h-0 w-full flex-1 grow basis-0", children: /* @__PURE__ */ e(sd, {}) }) : /* @__PURE__ */ e("div", { className: "z-50 flex h-full items-center justify-center", children: /* @__PURE__ */ e(Ht, { size: "md", color: "muted", "aria-label": "Loading data" }) });
4571
4571
  if (!V.id) return null;
4572
4572
  if (M === "custom")
@@ -4579,7 +4579,7 @@ function _o({
4579
4579
  "detailTable",
4580
4580
  "custom"
4581
4581
  ].includes(M) && fe)
4582
- return /* @__PURE__ */ e("div", { className: "relative h-full min-h-0 w-full flex-1 grow basis-0", children: L || R ? /* @__PURE__ */ e(De, {}) : /* @__PURE__ */ e(
4582
+ return /* @__PURE__ */ e("div", { className: "relative h-full min-h-0 w-full flex-1 grow basis-0", children: L || R ? /* @__PURE__ */ e(Ie, {}) : /* @__PURE__ */ e(
4583
4583
  rd,
4584
4584
  {
4585
4585
  cfg: fe
@@ -4591,8 +4591,8 @@ function _o({
4591
4591
  {
4592
4592
  card: V,
4593
4593
  data: ee,
4594
- totalsByColumnId: D == null ? void 0 : D.tableTotalsByColumnId,
4595
- comparisonMetadata: (ce = D == null ? void 0 : D.metadata) == null ? void 0 : ce.comparisonMetadata,
4594
+ totalsByColumnId: I == null ? void 0 : I.tableTotalsByColumnId,
4595
+ comparisonMetadata: (ce = I == null ? void 0 : I.metadata) == null ? void 0 : ce.comparisonMetadata,
4596
4596
  paginationMetadata: _,
4597
4597
  onPaginationChange: xe,
4598
4598
  onSortChange: U,
@@ -4603,7 +4603,7 @@ function _o({
4603
4603
  return /* @__PURE__ */ e("div", { className: "relative mb-2 flex h-full min-h-0 w-full flex-1 grow basis-0", children: /* @__PURE__ */ e(
4604
4604
  ld,
4605
4605
  {
4606
- result: D == null ? void 0 : D.matrixResult,
4606
+ result: I == null ? void 0 : I.matrixResult,
4607
4607
  isLoading: H
4608
4608
  }
4609
4609
  ) });
@@ -4635,9 +4635,9 @@ function _o({
4635
4635
  cd,
4636
4636
  {
4637
4637
  card: V,
4638
- data: (D == null ? void 0 : D.records) || [],
4639
- groupByColumns: D == null ? void 0 : D.groupByColumns,
4640
- pivotSchema: D == null ? void 0 : D.pivotSchema,
4638
+ data: (I == null ? void 0 : I.records) || [],
4639
+ groupByColumns: I == null ? void 0 : I.groupByColumns,
4640
+ pivotSchema: I == null ? void 0 : I.pivotSchema,
4641
4641
  paginationMetadata: _,
4642
4642
  onPaginationChange: xe,
4643
4643
  onAggregationChange: (we) => {
@@ -4652,7 +4652,7 @@ function _o({
4652
4652
  ) });
4653
4653
  }
4654
4654
  return /* @__PURE__ */ a(
4655
- ji,
4655
+ Ki,
4656
4656
  {
4657
4657
  role: "editor-visual-card",
4658
4658
  className: Y(
@@ -4665,7 +4665,7 @@ function _o({
4665
4665
  },
4666
4666
  ...s,
4667
4667
  children: [
4668
- (L || R) && (D == null ? void 0 : D.records) && D.records.length > 0 && /* @__PURE__ */ e("div", { className: "absolute inset-0 z-50 flex items-center justify-center bg-background/50", children: /* @__PURE__ */ e(Ht, { size: "md", color: "muted", "aria-label": "Loading data" }) }),
4668
+ (L || R) && (I == null ? void 0 : I.records) && I.records.length > 0 && /* @__PURE__ */ e("div", { className: "absolute inset-0 z-50 flex items-center justify-center bg-background/50", children: /* @__PURE__ */ e(Ht, { size: "md", color: "muted", "aria-label": "Loading data" }) }),
4669
4669
  l && /* @__PURE__ */ a(
4670
4670
  Zc,
4671
4671
  {
@@ -4688,7 +4688,7 @@ function _o({
4688
4688
  }
4689
4689
  ) }),
4690
4690
  /* @__PURE__ */ e(Pi, { card: r }),
4691
- /* @__PURE__ */ e(ko, {}),
4691
+ /* @__PURE__ */ e(Io, {}),
4692
4692
  /* @__PURE__ */ e("div", { className: "ml-auto", children: /* @__PURE__ */ e(qp, {}) })
4693
4693
  ] }),
4694
4694
  /* @__PURE__ */ e("div", { className: "min-w-0", children: /* @__PURE__ */ e(
@@ -4738,7 +4738,7 @@ function _o({
4738
4738
  }
4739
4739
  ),
4740
4740
  /* @__PURE__ */ a(
4741
- Ki,
4741
+ Ui,
4742
4742
  {
4743
4743
  className: Y(
4744
4744
  "flex min-h-0 grow flex-col",
@@ -4747,12 +4747,12 @@ function _o({
4747
4747
  style: F ? void 0 : d.cardGutterStyle,
4748
4748
  children: [
4749
4749
  /* @__PURE__ */ e("div", { className: "min-h-0 flex-1 grow basis-0", children: me() }),
4750
- Ui(V) && /* @__PURE__ */ e("div", { className: Y("pt-3", F && "px-4"), children: /* @__PURE__ */ e(Gi, { card: V, mode: "editor" }) })
4750
+ Gi(V) && /* @__PURE__ */ e("div", { className: Y("pt-3", F && "px-4"), children: /* @__PURE__ */ e(Hi, { card: V, mode: "editor" }) })
4751
4751
  ]
4752
4752
  }
4753
4753
  ),
4754
4754
  /* @__PURE__ */ e(
4755
- Hi,
4755
+ Wi,
4756
4756
  {
4757
4757
  open: p,
4758
4758
  onOpenChange: u,
@@ -4807,7 +4807,7 @@ const Zs = ({
4807
4807
  /* @__PURE__ */ e(Jt, { value: "custom-code", children: "Custom Code" })
4808
4808
  ] }),
4809
4809
  /* @__PURE__ */ e(
4810
- Ia,
4810
+ Da,
4811
4811
  {
4812
4812
  value: "final-config",
4813
4813
  className: "mt-0 grow rounded-b border border-t-0",
@@ -4822,7 +4822,7 @@ const Zs = ({
4822
4822
  }
4823
4823
  ),
4824
4824
  /* @__PURE__ */ e(
4825
- Ia,
4825
+ Da,
4826
4826
  {
4827
4827
  value: "custom-config",
4828
4828
  className: "mt-0 grow rounded-b border border-t-0",
@@ -4839,7 +4839,7 @@ const Zs = ({
4839
4839
  }
4840
4840
  ),
4841
4841
  /* @__PURE__ */ e(
4842
- Ia,
4842
+ Da,
4843
4843
  {
4844
4844
  value: "custom-code",
4845
4845
  className: "mt-0 grow rounded-b border border-t-0",
@@ -4870,14 +4870,14 @@ function Yp({
4870
4870
  className: n,
4871
4871
  label: s = "Customize Visual"
4872
4872
  } = {}) {
4873
- const [r, d] = K(!1), [i, l] = K(""), [o, c] = K(""), [h, m] = K(""), [f, p] = K(""), u = O((I) => I.card), g = xt(), C = O((I) => I.card.customCfg), x = C ? JSON.stringify(C, null, 2) : "", y = de(() => g !== u.type ? { ...u, type: g } : u, [u, g]), { data: E } = Nt(y), { data: P } = Ar(u), { setCardCustomCfg: v, setCustomVisualCode: N } = Ne(), w = (I) => {
4873
+ const [r, d] = K(!1), [i, l] = K(""), [o, c] = K(""), [h, m] = K(""), [f, p] = K(""), u = O((D) => D.card), g = xt(), C = O((D) => D.card.customCfg), x = C ? JSON.stringify(C, null, 2) : "", y = de(() => g !== u.type ? { ...u, type: g } : u, [u, g]), { data: E } = Nt(y), { data: P } = Ar(u), { setCardCustomCfg: v, setCustomVisualCode: N } = Ne(), w = (D) => {
4874
4874
  var A, M;
4875
4875
  return JSON.stringify(
4876
4876
  {
4877
- ...I,
4877
+ ...D,
4878
4878
  data: {
4879
- ...I.data,
4880
- datasets: (M = (A = I.data) == null ? void 0 : A.datasets) == null ? void 0 : M.map((V) => ({
4879
+ ...D.data,
4880
+ datasets: (M = (A = D.data) == null ? void 0 : A.datasets) == null ? void 0 : M.map((V) => ({
4881
4881
  ...V,
4882
4882
  data: []
4883
4883
  }))
@@ -4889,7 +4889,7 @@ function Yp({
4889
4889
  }, T = () => {
4890
4890
  var A, M;
4891
4891
  if (!((A = E == null ? void 0 : E.records) != null && A.length)) return;
4892
- const I = qi({
4892
+ const D = ji({
4893
4893
  card: u,
4894
4894
  data: E.records,
4895
4895
  cardType: u.type,
@@ -4898,19 +4898,19 @@ function Yp({
4898
4898
  preferences: u.preferences,
4899
4899
  topoJson: P
4900
4900
  });
4901
- if (I) {
4902
- l(w(I)), m(((M = u.preferences) == null ? void 0 : M.customVisualCode) || "");
4903
- const V = md(I, C);
4901
+ if (D) {
4902
+ l(w(D)), m(((M = u.preferences) == null ? void 0 : M.customVisualCode) || "");
4903
+ const V = md(D, C);
4904
4904
  c(w(V));
4905
4905
  }
4906
4906
  }, k = () => {
4907
4907
  try {
4908
4908
  if (h && N(h), o) {
4909
- const I = JSON.parse(
4909
+ const D = JSON.parse(
4910
4910
  o
4911
4911
  ), A = hd(
4912
4912
  JSON.parse(i),
4913
- I
4913
+ D
4914
4914
  );
4915
4915
  v(A), p("");
4916
4916
  }
@@ -4956,8 +4956,8 @@ function Yp({
4956
4956
  customCode: h,
4957
4957
  cardCustomCfgString: x,
4958
4958
  mergedConfig: o,
4959
- onConfigChange: (I) => c(I ?? ""),
4960
- onCodeChange: (I) => m(I ?? "")
4959
+ onConfigChange: (D) => c(D ?? ""),
4960
+ onCodeChange: (D) => m(D ?? "")
4961
4961
  }
4962
4962
  )
4963
4963
  ] }),
@@ -4993,8 +4993,8 @@ function Kr({
4993
4993
  className: r = "h-6 w-6"
4994
4994
  }) {
4995
4995
  if (!s && t)
4996
- return Wi(t, r);
4997
- const d = Qi(n);
4996
+ return Qi(t, r);
4997
+ const d = Yi(n);
4998
4998
  if (d)
4999
4999
  return ea.cloneElement(d, { className: r });
5000
5000
  const i = Xp(n), l = Jp(n);
@@ -5058,9 +5058,9 @@ function bi({
5058
5058
  children: /* @__PURE__ */ e(Zp, { isStarred: d, onClick: () => c() })
5059
5059
  }
5060
5060
  ),
5061
- s && r && /* @__PURE__ */ e("div", { className: "absolute right-1 top-1 z-10", children: /* @__PURE__ */ a(It, { children: [
5061
+ s && r && /* @__PURE__ */ e("div", { className: "absolute right-1 top-1 z-10", children: /* @__PURE__ */ a(Dt, { children: [
5062
5062
  /* @__PURE__ */ e(Et, { asChild: !0, children: /* @__PURE__ */ e("span", { className: "flex items-center justify-center", children: /* @__PURE__ */ e(Xt, { className: "h-3 w-3 text-muted-foreground" }) }) }),
5063
- /* @__PURE__ */ e(Dt, { side: "top", children: r })
5063
+ /* @__PURE__ */ e(It, { side: "top", children: r })
5064
5064
  ] }) }),
5065
5065
  /* @__PURE__ */ a(
5066
5066
  "button",
@@ -5165,10 +5165,10 @@ function $o({ onChartSelect: t, onClose: n }) {
5165
5165
  g(null), m({}), x("builtin"), h(A), ["custom", "text", "map"].includes(A) && (f(!0), y(void 0)), t == null || t(A), n == null || n();
5166
5166
  }, k = (A) => {
5167
5167
  g(null), m({}), x("builtin"), y(void 0);
5168
- const M = Yi(A);
5168
+ const M = Ji(A);
5169
5169
  if (M === "multiple" && A.slots && A.slots.length > 0) {
5170
5170
  P();
5171
- const F = Ji(A.slots, A, p);
5171
+ const F = Xi(A.slots, A, p);
5172
5172
  E(F), F[0] && v(F[0]), n == null || n();
5173
5173
  return;
5174
5174
  } else
@@ -5190,7 +5190,7 @@ function $o({ onChartSelect: t, onClose: n }) {
5190
5190
  name: A.name
5191
5191
  };
5192
5192
  l(M);
5193
- }, I = (A) => {
5193
+ }, D = (A) => {
5194
5194
  const M = {
5195
5195
  type: "custom",
5196
5196
  id: A.name,
@@ -5227,7 +5227,7 @@ function $o({ onChartSelect: t, onClose: n }) {
5227
5227
  },
5228
5228
  A.id
5229
5229
  )) }),
5230
- w.length > 0 && /* @__PURE__ */ a(De, { children: [
5230
+ w.length > 0 && /* @__PURE__ */ a(Ie, { children: [
5231
5231
  N.length > 0 && /* @__PURE__ */ a("div", { className: "my-3 flex items-center gap-1.5", children: [
5232
5232
  /* @__PURE__ */ e("span", { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Custom charts" }),
5233
5233
  /* @__PURE__ */ e("span", { className: "font-mono text-[10px] tabular-nums text-muted-foreground/70", children: w.length })
@@ -5240,7 +5240,7 @@ function $o({ onChartSelect: t, onClose: n }) {
5240
5240
  pluginName: A.pluginName,
5241
5241
  isStarred: i("custom", A.name),
5242
5242
  onSelect: () => k(A),
5243
- onToggleStar: () => I(A)
5243
+ onToggleStar: () => D(A)
5244
5244
  },
5245
5245
  `${A.url}-${A.name}-${M}`
5246
5246
  )) })
@@ -5255,7 +5255,7 @@ function af({
5255
5255
  onChartChange: n
5256
5256
  }) {
5257
5257
  var w, T, k, S;
5258
- const s = O((I) => I.card), r = O((I) => I.frame), d = O((I) => I.isDevMode), {
5258
+ const s = O((D) => D.card), r = O((D) => D.frame), d = O((D) => D.isDevMode), {
5259
5259
  replaceFrameCards: i,
5260
5260
  clearModeDrafts: l,
5261
5261
  initializeModeDrafts: o,
@@ -5267,8 +5267,8 @@ function af({
5267
5267
  ((w = h == null ? void 0 : h.customCardPreferences) == null ? void 0 : w.url) || ""
5268
5268
  ), f = de(
5269
5269
  () => {
5270
- var I;
5271
- return (I = m == null ? void 0 : m.visuals) == null ? void 0 : I.find(
5270
+ var D;
5271
+ return (D = m == null ? void 0 : m.visuals) == null ? void 0 : D.find(
5272
5272
  (A) => {
5273
5273
  var M;
5274
5274
  return A.name === ((M = h == null ? void 0 : h.customCardPreferences) == null ? void 0 : M.componentName);
@@ -5277,16 +5277,16 @@ function af({
5277
5277
  },
5278
5278
  [m, (T = h == null ? void 0 : h.customCardPreferences) == null ? void 0 : T.componentName]
5279
5279
  ), p = ya(h, f) === "multiple", u = xt(), g = p ? u : t ?? s.type, C = (k = s == null ? void 0 : s.customCardPreferences) == null ? void 0 : k.componentName, x = (S = h == null ? void 0 : h.customCardPreferences) == null ? void 0 : S.componentName, y = p && !!x, E = de(() => {
5280
- const I = Kl.find((A) => A.id === g);
5281
- return I ? I.label : g === "custom" ? C || "Custom Visual" : "Select chart type";
5280
+ const D = Kl.find((A) => A.id === g);
5281
+ return D ? D.label : g === "custom" ? C || "Custom Visual" : "Select chart type";
5282
5282
  }, [g, C]), P = de(() => {
5283
- const I = Kl.find((A) => A.id === g);
5284
- if (I) {
5285
- const A = I.icon;
5283
+ const D = Kl.find((A) => A.id === g);
5284
+ if (D) {
5285
+ const A = D.icon;
5286
5286
  return /* @__PURE__ */ e(A, { className: "h-4 w-4" });
5287
5287
  }
5288
5288
  if (g === "custom" && C) {
5289
- const A = Qi(C);
5289
+ const A = Yi(C);
5290
5290
  return A || /* @__PURE__ */ e(
5291
5291
  Kr,
5292
5292
  {
@@ -5305,11 +5305,11 @@ function af({
5305
5305
  showBadge: y,
5306
5306
  badgeLabel: x,
5307
5307
  isMultiInputContext: p,
5308
- handleChartSelect: (I) => {
5309
- n == null || n(I);
5308
+ handleChartSelect: (D) => {
5309
+ n == null || n(D);
5310
5310
  },
5311
- handleClearCustomVisual: (I) => {
5312
- I.stopPropagation();
5311
+ handleClearCustomVisual: (D) => {
5312
+ D.stopPropagation();
5313
5313
  const A = {
5314
5314
  ...s,
5315
5315
  type: "bar",
@@ -5433,15 +5433,15 @@ const Wa = {
5433
5433
  matrixTable: fs,
5434
5434
  bar: Ts,
5435
5435
  line: Ss,
5436
- stackedBar: Dd,
5436
+ stackedBar: Id,
5437
5437
  stackedLine: kd,
5438
- scatter: eo,
5438
+ scatter: to,
5439
5439
  bubble: Td,
5440
5440
  pie: Sd,
5441
5441
  doughnut: wd,
5442
5442
  kpi: Cd,
5443
- treemap: Zi,
5444
- bullet: Xi,
5443
+ treemap: eo,
5444
+ bullet: Zi,
5445
5445
  funnel: Nd,
5446
5446
  tornado: vd,
5447
5447
  heatmap: fs,
@@ -5450,7 +5450,7 @@ const Wa = {
5450
5450
  polarArea: xd,
5451
5451
  text: gd,
5452
5452
  map: fd
5453
- }, Dn = {
5453
+ }, In = {
5454
5454
  table: "Table",
5455
5455
  matrixTable: "Matrix Table",
5456
5456
  bar: "Bar Chart",
@@ -5496,7 +5496,7 @@ function sf({
5496
5496
  initializeModeDrafts: p
5497
5497
  } = Ne(), { starredCharts: u } = Fr(), { data: g = [] } = Rr(), C = O((N) => N.isDevMode), x = de(() => {
5498
5498
  const N = u.filter(
5499
- (S) => S.type === "default" ? kn(S.id, { isDevMode: C }) : g.some((I) => I.name === S.id)
5499
+ (S) => S.type === "default" ? kn(S.id, { isDevMode: C }) : g.some((D) => D.name === S.id)
5500
5500
  ), w = new Set(N.map((S) => S.id)), T = qo.filter(
5501
5501
  (S) => !w.has(S.id) && kn(S.id, { isDevMode: C })
5502
5502
  );
@@ -5510,7 +5510,7 @@ function sf({
5510
5510
  })),
5511
5511
  ...T.map((S) => ({
5512
5512
  id: S.id,
5513
- label: Dn[S.id] ?? S.id,
5513
+ label: In[S.id] ?? S.id,
5514
5514
  icon: Wa[S.id],
5515
5515
  isCustom: !1
5516
5516
  }))
@@ -5521,7 +5521,7 @@ function sf({
5521
5521
  var w;
5522
5522
  return N.isCustom ? y && ((w = d == null ? void 0 : d.customCardPreferences) == null ? void 0 : w.componentName) === N.id : t === N.id;
5523
5523
  }
5524
- ) || (t === "custom" ? (v = d == null ? void 0 : d.customCardPreferences) != null && v.componentName : Dn[t]), /* @__PURE__ */ a("div", { className: "px-4 pb-3 pt-4", children: [
5524
+ ) || (t === "custom" ? (v = d == null ? void 0 : d.customCardPreferences) != null && v.componentName : In[t]), /* @__PURE__ */ a("div", { className: "px-4 pb-3 pt-4", children: [
5525
5525
  /* @__PURE__ */ e("p", { className: "pb-1.5 text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Chart type" }),
5526
5526
  /* @__PURE__ */ e(
5527
5527
  Ko,
@@ -5551,8 +5551,8 @@ function Ko({
5551
5551
  } = Ne(), { starredCharts: g } = Fr(), { data: C = [] } = Rr(), x = O((S) => S.isDevMode), y = ((T = i == null ? void 0 : i.customCardPreferences) == null ? void 0 : T.componentName) ?? null, E = de(() => {
5552
5552
  const S = g.filter(
5553
5553
  (F) => F.type === "default" ? kn(F.id, { isDevMode: x }) : C.some((b) => b.name === F.id)
5554
- ), I = new Set(S.map((F) => F.id)), A = qo.filter(
5555
- (F) => !I.has(F.id) && kn(F.id, { isDevMode: x })
5554
+ ), D = new Set(S.map((F) => F.id)), A = qo.filter(
5555
+ (F) => !D.has(F.id) && kn(F.id, { isDevMode: x })
5556
5556
  ), M = [
5557
5557
  ...S.map((F) => ({
5558
5558
  id: F.id,
@@ -5563,7 +5563,7 @@ function Ko({
5563
5563
  })),
5564
5564
  ...A.map((F) => ({
5565
5565
  id: F.id,
5566
- label: Dn[F.id] ?? F.id,
5566
+ label: In[F.id] ?? F.id,
5567
5567
  icon: Wa[F.id],
5568
5568
  isCustom: !1
5569
5569
  }))
@@ -5584,7 +5584,7 @@ function Ko({
5584
5584
  });
5585
5585
  } else t && Wa[t] && kn(t, { isDevMode: x }) && M.unshift({
5586
5586
  id: t,
5587
- label: Dn[t] ?? t,
5587
+ label: In[t] ?? t,
5588
5588
  icon: Wa[t],
5589
5589
  isCustom: !1
5590
5590
  });
@@ -5597,15 +5597,15 @@ function Ko({
5597
5597
  x
5598
5598
  ]), P = t === "custom" && y, v = (S) => {
5599
5599
  if (S.isCustom) {
5600
- const I = C.find((V) => V.name === S.id);
5601
- if (!I) return;
5600
+ const D = C.find((V) => V.name === S.id);
5601
+ if (!D) return;
5602
5602
  c(null), o({}), m(void 0);
5603
- const A = Yi(I);
5604
- if (A === "multiple" && I.slots && I.slots.length > 0) {
5603
+ const A = Ji(D);
5604
+ if (A === "multiple" && D.slots && D.slots.length > 0) {
5605
5605
  p();
5606
- const V = Ji(
5607
- I.slots,
5608
- I,
5606
+ const V = Xi(
5607
+ D.slots,
5608
+ D,
5609
5609
  i
5610
5610
  );
5611
5611
  f(V), V[0] && u(V[0]);
@@ -5614,28 +5614,28 @@ function Ko({
5614
5614
  l("custom"), h({
5615
5615
  type: "component",
5616
5616
  visualType: A,
5617
- url: I.url,
5618
- componentName: I.name,
5619
- icon: I.icon,
5620
- pluginChartType: I.chartType,
5621
- minInputs: I.minInputs,
5622
- maxInputs: I.maxInputs
5617
+ url: D.url,
5618
+ componentName: D.name,
5619
+ icon: D.icon,
5620
+ pluginChartType: D.chartType,
5621
+ minInputs: D.minInputs,
5622
+ maxInputs: D.maxInputs
5623
5623
  }), n("custom");
5624
5624
  return;
5625
5625
  }
5626
5626
  n(S.id);
5627
5627
  }, N = E.some(
5628
5628
  (S) => {
5629
- var I;
5630
- return S.isCustom ? P && ((I = i == null ? void 0 : i.customCardPreferences) == null ? void 0 : I.componentName) === S.id : t === S.id;
5629
+ var D;
5630
+ return S.isCustom ? P && ((D = i == null ? void 0 : i.customCardPreferences) == null ? void 0 : D.componentName) === S.id : t === S.id;
5631
5631
  }
5632
- ), w = N ? "More" : t === "custom" ? ((k = i == null ? void 0 : i.customCardPreferences) == null ? void 0 : k.componentName) || "Custom" : Dn[t] || "More";
5632
+ ), w = N ? "More" : t === "custom" ? ((k = i == null ? void 0 : i.customCardPreferences) == null ? void 0 : k.componentName) || "Custom" : In[t] || "More";
5633
5633
  return /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
5634
5634
  /* @__PURE__ */ e("div", { className: "inline-flex h-7 items-center overflow-hidden rounded-control border border-input bg-background", children: E.map((S) => {
5635
5635
  var M;
5636
- const I = S.icon, A = S.isCustom ? P && ((M = i == null ? void 0 : i.customCardPreferences) == null ? void 0 : M.componentName) === S.id : t === S.id;
5636
+ const D = S.icon, A = S.isCustom ? P && ((M = i == null ? void 0 : i.customCardPreferences) == null ? void 0 : M.componentName) === S.id : t === S.id;
5637
5637
  return /* @__PURE__ */ a(
5638
- It,
5638
+ Dt,
5639
5639
  {
5640
5640
  children: [
5641
5641
  /* @__PURE__ */ e(Et, { asChild: !0, children: /* @__PURE__ */ a(
@@ -5650,7 +5650,7 @@ function Ko({
5650
5650
  A && "bg-foreground/[0.08] font-medium text-foreground"
5651
5651
  ),
5652
5652
  children: [
5653
- I ? /* @__PURE__ */ e(I, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ e(
5653
+ D ? /* @__PURE__ */ e(D, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ e(
5654
5654
  Kr,
5655
5655
  {
5656
5656
  chartName: S.label,
@@ -5662,7 +5662,7 @@ function Ko({
5662
5662
  ]
5663
5663
  }
5664
5664
  ) }),
5665
- /* @__PURE__ */ e(Dt, { side: "bottom", children: S.label })
5665
+ /* @__PURE__ */ e(It, { side: "bottom", children: S.label })
5666
5666
  ]
5667
5667
  },
5668
5668
  `${S.isCustom ? "custom" : "default"}-${S.id}`
@@ -5775,7 +5775,7 @@ function rf() {
5775
5775
  }
5776
5776
  );
5777
5777
  }
5778
- return /* @__PURE__ */ e(De, { children: n === "funnel" ? l() : n === "bullet" ? o() : i() });
5778
+ return /* @__PURE__ */ e(Ie, { children: n === "funnel" ? l() : n === "bullet" ? o() : i() });
5779
5779
  }
5780
5780
  function Ur({
5781
5781
  className: t,
@@ -5783,13 +5783,13 @@ function Ur({
5783
5783
  label: s = "Display Options"
5784
5784
  }) {
5785
5785
  var C, x, y, E, P, v, N, w, T, k;
5786
- const r = O((S) => S.card), { setCardPreferences: d, updateCardInFrame: i, setCard: l } = Ne(), [o, c] = K(!1), h = ((x = (C = r.preferences) == null ? void 0 : C.displayOptions) == null ? void 0 : x.showFilterInfo) ?? !0, m = ((E = (y = r.preferences) == null ? void 0 : y.displayOptions) == null ? void 0 : E.showCardToolbar) ?? !0, f = ((v = (P = r.preferences) == null ? void 0 : P.displayOptions) == null ? void 0 : v.showChrome) ?? !0, p = ((w = (N = r.preferences) == null ? void 0 : N.displayOptions) == null ? void 0 : w.allowScroll) ?? !0, u = ((k = (T = r.preferences) == null ? void 0 : T.displayOptions) == null ? void 0 : k.showInlineFilterBar) ?? !0, g = (S, I) => {
5786
+ const r = O((S) => S.card), { setCardPreferences: d, updateCardInFrame: i, setCard: l } = Ne(), [o, c] = K(!1), h = ((x = (C = r.preferences) == null ? void 0 : C.displayOptions) == null ? void 0 : x.showFilterInfo) ?? !0, m = ((E = (y = r.preferences) == null ? void 0 : y.displayOptions) == null ? void 0 : E.showCardToolbar) ?? !0, f = ((v = (P = r.preferences) == null ? void 0 : P.displayOptions) == null ? void 0 : v.showChrome) ?? !0, p = ((w = (N = r.preferences) == null ? void 0 : N.displayOptions) == null ? void 0 : w.allowScroll) ?? !0, u = ((k = (T = r.preferences) == null ? void 0 : T.displayOptions) == null ? void 0 : k.showInlineFilterBar) ?? !0, g = (S, D) => {
5787
5787
  var V;
5788
5788
  const A = {
5789
5789
  ...r.preferences,
5790
5790
  displayOptions: {
5791
5791
  ...(V = r.preferences) == null ? void 0 : V.displayOptions,
5792
- [S]: I
5792
+ [S]: D
5793
5793
  }
5794
5794
  };
5795
5795
  d(A);
@@ -5903,28 +5903,28 @@ function Gr({
5903
5903
  label: s = "Inline Filters"
5904
5904
  }) {
5905
5905
  var N, w, T;
5906
- const [r, d] = K(!1), i = O((k) => k.card), l = O((k) => k.selectedConnectionId), { tokenProps: o } = xa(), { setCard: c } = Ne(), h = Ie(
5906
+ const [r, d] = K(!1), i = O((k) => k.card), l = O((k) => k.selectedConnectionId), { tokenProps: o } = xa(), { setCard: c } = Ne(), h = De(
5907
5907
  (k) => k.actions.removeCardInlineFilterValue
5908
- ), m = Ie(
5908
+ ), m = De(
5909
5909
  (k) => k.actions.setCardInlineFilterValue
5910
5910
  ), f = O(
5911
5911
  (k) => k.actions.removeCardInlineFilterValue
5912
5912
  ), p = O(
5913
5913
  (k) => k.actions.setCardInlineFilterValue
5914
- ), u = Ie((k) => k.isVisualEditing), g = (i == null ? void 0 : i.inlineFilters) || [], C = ((w = (N = o == null ? void 0 : o.params) == null ? void 0 : N.calendarContext) == null ? void 0 : w.tz) || ((T = o == null ? void 0 : o.params) == null ? void 0 : T.timezone) || Intl.DateTimeFormat().resolvedOptions().timeZone;
5914
+ ), u = De((k) => k.isVisualEditing), g = (i == null ? void 0 : i.inlineFilters) || [], C = ((w = (N = o == null ? void 0 : o.params) == null ? void 0 : N.calendarContext) == null ? void 0 : w.tz) || ((T = o == null ? void 0 : o.params) == null ? void 0 : T.timezone) || Intl.DateTimeFormat().resolvedOptions().timeZone;
5915
5915
  function x(k) {
5916
5916
  var z, _, q, H, Q, J, ee;
5917
- const S = ((q = (_ = (z = i == null ? void 0 : i.dataSource) == null ? void 0 : z.selectedEntities) == null ? void 0 : _[0]) == null ? void 0 : q.database) || "", I = k.qualifiedFieldName || k.name;
5917
+ const S = ((q = (_ = (z = i == null ? void 0 : i.dataSource) == null ? void 0 : z.selectedEntities) == null ? void 0 : _[0]) == null ? void 0 : q.database) || "", D = k.qualifiedFieldName || k.name;
5918
5918
  if (g.find(
5919
5919
  (W) => Ed(W, k)
5920
5920
  ))
5921
5921
  return;
5922
- const M = k.qualifiedFieldName ? k.qualifiedFieldName.split(".").slice(0, -1).join(".") : k.qualifiedEntityName || k.entityName, F = Jm(k.name), b = Ad(k), D = Od(i == null ? void 0 : i.dataSource, {
5922
+ const M = k.qualifiedFieldName ? k.qualifiedFieldName.split(".").slice(0, -1).join(".") : k.qualifiedEntityName || k.entityName, F = Jm(k.name), b = Ad(k), I = Od(i == null ? void 0 : i.dataSource, {
5923
5923
  connectionId: l || ((H = i == null ? void 0 : i.dataSource) == null ? void 0 : H.connectionId),
5924
5924
  connectionType: (Q = i == null ? void 0 : i.dataSource) == null ? void 0 : Q.connectionType
5925
- }), L = Md(b), R = !!(((J = i == null ? void 0 : i.dataSource) == null ? void 0 : J.mode) === "semanticDomain" && ((ee = D == null ? void 0 : D.selectedEntities) != null && ee.length || D != null && D.semanticDomainId)), B = {
5925
+ }), L = Md(b), R = !!(((J = i == null ? void 0 : i.dataSource) == null ? void 0 : J.mode) === "semanticDomain" && ((ee = I == null ? void 0 : I.selectedEntities) != null && ee.length || I != null && I.semanticDomainId)), B = {
5926
5926
  id: Ea(),
5927
- column: I,
5927
+ column: D,
5928
5928
  title: k.label || k.name,
5929
5929
  dataType: k.dataType,
5930
5930
  table: k.entityName || "",
@@ -5938,7 +5938,7 @@ function Gr({
5938
5938
  F
5939
5939
  ),
5940
5940
  fieldMeta: b,
5941
- semanticContext: D,
5941
+ semanticContext: I,
5942
5942
  width: 250
5943
5943
  // Default width for inline filters
5944
5944
  };
@@ -5948,22 +5948,22 @@ function Gr({
5948
5948
  });
5949
5949
  }
5950
5950
  function y(k) {
5951
- const S = g.filter((I) => I.id !== k);
5951
+ const S = g.filter((D) => D.id !== k);
5952
5952
  c({
5953
5953
  ...i,
5954
5954
  inlineFilters: S
5955
5955
  }), u ? f(i.id, k) : h(i.id, k);
5956
5956
  }
5957
5957
  function E(k, S) {
5958
- const I = g.map(
5958
+ const D = g.map(
5959
5959
  (F) => F.id === k ? { ...F, ...S } : F
5960
5960
  );
5961
5961
  if (c({
5962
5962
  ...i,
5963
- inlineFilters: I
5963
+ inlineFilters: D
5964
5964
  }), !(Object.prototype.hasOwnProperty.call(S, "defaultValues") || Object.prototype.hasOwnProperty.call(S, "defaultDateFilter")))
5965
5965
  return;
5966
- const M = I.find((F) => F.id === k);
5966
+ const M = D.find((F) => F.id === k);
5967
5967
  if (!M)
5968
5968
  return;
5969
5969
  const V = Xm(
@@ -6044,7 +6044,7 @@ function Gr({
6044
6044
  items: [],
6045
6045
  strategy: Xa,
6046
6046
  children: /* @__PURE__ */ e(
6047
- Id,
6047
+ Dd,
6048
6048
  {
6049
6049
  context: "inline-filter",
6050
6050
  onFieldSelect: x,
@@ -6133,7 +6133,7 @@ function uf(t, n, s) {
6133
6133
  const r = new Set(
6134
6134
  s.filter((i) => i.target !== "sql_param").map((i) => vs(i.controlId, i.target))
6135
6135
  ), d = n.map((i) => {
6136
- const l = No({
6136
+ const l = Co({
6137
6137
  card: t,
6138
6138
  control: i
6139
6139
  }).map((m) => m.value), o = df[i.type], h = [
@@ -6173,7 +6173,7 @@ function mf({
6173
6173
  }), f = Zm(t), p = new Set(
6174
6174
  s.map((P) => vs(P.controlId, P.target))
6175
6175
  ), u = o.some(
6176
- (P) => No({
6176
+ (P) => Co({
6177
6177
  card: t,
6178
6178
  control: P
6179
6179
  }).some(
@@ -6289,24 +6289,24 @@ function mf({
6289
6289
  s.length === 0 ? /* @__PURE__ */ e("div", { className: "rounded-md border border-dashed p-3 text-sm text-muted-foreground", children: "This card is not using any controls yet." }) : s.map((P, v) => {
6290
6290
  const N = f[P.target] || [], w = o.find(
6291
6291
  (b) => b.id === P.controlId
6292
- ), T = w ? eh(w) : null, k = (T == null ? void 0 : T.source.kind) === "manual" ? T.source.options : [], S = C(P.target), I = Array.from(
6292
+ ), T = w ? eh(w) : null, k = (T == null ? void 0 : T.source.kind) === "manual" ? T.source.options : [], S = C(P.target), D = Array.from(
6293
6293
  /* @__PURE__ */ new Set([
6294
6294
  ...k.map((b) => b.value),
6295
6295
  ...Object.keys(P.mapping)
6296
6296
  ])
6297
6297
  ).map((b) => {
6298
- const D = k.find((L) => L.value === b);
6298
+ const I = k.find((L) => L.value === b);
6299
6299
  return {
6300
6300
  value: b,
6301
- label: (D == null ? void 0 : D.label) || b
6301
+ label: (I == null ? void 0 : I.label) || b
6302
6302
  };
6303
6303
  }), A = `${P.controlId}-${P.target}-${v}`, M = c[A] ?? v === 0, V = Object.keys(P.mapping).length, F = w != null && w.type ? of[w.type] || w.type : null;
6304
6304
  return /* @__PURE__ */ a(
6305
6305
  Qt,
6306
6306
  {
6307
6307
  open: M,
6308
- onOpenChange: (b) => h((D) => ({
6309
- ...D,
6308
+ onOpenChange: (b) => h((I) => ({
6309
+ ...I,
6310
6310
  [A]: b
6311
6311
  })),
6312
6312
  className: "rounded-md border",
@@ -6348,18 +6348,18 @@ function mf({
6348
6348
  }
6349
6349
  )
6350
6350
  ] }),
6351
- /* @__PURE__ */ e(Yt, { className: "space-y-3 border-t px-3 pb-3 pt-2", children: I.length === 0 ? /* @__PURE__ */ e("div", { className: "rounded-md border border-dashed p-3 text-sm text-muted-foreground", children: "Add choices to this control first so you can decide what each choice changes in the card." }) : S.length === 0 ? /* @__PURE__ */ e("div", { className: "rounded-md border border-dashed p-3 text-sm text-muted-foreground", children: "No matching targets are available for this binding yet." }) : /* @__PURE__ */ a("div", { className: "space-y-2", children: [
6351
+ /* @__PURE__ */ e(Yt, { className: "space-y-3 border-t px-3 pb-3 pt-2", children: D.length === 0 ? /* @__PURE__ */ e("div", { className: "rounded-md border border-dashed p-3 text-sm text-muted-foreground", children: "Add choices to this control first so you can decide what each choice changes in the card." }) : S.length === 0 ? /* @__PURE__ */ e("div", { className: "rounded-md border border-dashed p-3 text-sm text-muted-foreground", children: "No matching targets are available for this binding yet." }) : /* @__PURE__ */ a("div", { className: "space-y-2", children: [
6352
6352
  /* @__PURE__ */ e($, { className: "text-xs", children: "Map each choice" }),
6353
- /* @__PURE__ */ e("div", { className: "space-y-2", children: I.map((b) => {
6354
- const D = P.mapping[b.value], L = P.target === "config_metric_selector" || P.target === "config_field_selector" ? typeof D == "string" ? D : D == null ? void 0 : D.id : typeof D == "string" ? D : void 0, R = !l && typeof L == "string" && !S.some((_) => _.value === L), B = cf(
6355
- D,
6353
+ /* @__PURE__ */ e("div", { className: "space-y-2", children: D.map((b) => {
6354
+ const I = P.mapping[b.value], L = P.target === "config_metric_selector" || P.target === "config_field_selector" ? typeof I == "string" ? I : I == null ? void 0 : I.id : typeof I == "string" ? I : void 0, R = !l && typeof L == "string" && !S.some((_) => _.value === L), B = cf(
6355
+ I,
6356
6356
  L
6357
6357
  ), z = L && R ? [
6358
6358
  ...S,
6359
6359
  {
6360
6360
  value: L,
6361
6361
  label: "Needs remap",
6362
- target: D
6362
+ target: I
6363
6363
  }
6364
6364
  ] : S;
6365
6365
  return /* @__PURE__ */ a(
@@ -6464,7 +6464,7 @@ function Hr({
6464
6464
  preventPassiveDismissDuringCreate: d,
6465
6465
  resolvedOpen: i,
6466
6466
  setIsCreateFlowActive: l
6467
- } = Mh({}), o = O((F) => F.card), c = O((F) => F.frame), h = Ie((F) => F.dashboard), f = Ie(
6467
+ } = Mh({}), o = O((F) => F.card), c = O((F) => F.frame), h = De((F) => F.dashboard), f = De(
6468
6468
  (F) => F.dashboard.controls
6469
6469
  ) || hf, { setCard: p, updateCardInFrame: u } = Ne(), [g, C] = K(null);
6470
6470
  Se(() => {
@@ -6502,7 +6502,7 @@ function Hr({
6502
6502
  })), S = (F, b) => {
6503
6503
  if (!x)
6504
6504
  return;
6505
- const D = (b == null ? void 0 : b.type) === "rename" ? ai(x, {
6505
+ const I = (b == null ? void 0 : b.type) === "rename" ? ai(x, {
6506
6506
  type: "rename",
6507
6507
  oldId: b.oldId,
6508
6508
  newId: b.newId
@@ -6510,15 +6510,15 @@ function Hr({
6510
6510
  type: "remove",
6511
6511
  controlId: b.controlId
6512
6512
  }) : x, L = {
6513
- ...D,
6513
+ ...I,
6514
6514
  controls: F,
6515
6515
  controlBindings: sh(
6516
- D.controlBindings,
6516
+ I.controlBindings,
6517
6517
  F
6518
6518
  )
6519
6519
  };
6520
6520
  u(L), (o == null ? void 0 : o.id) === L.id && p(L);
6521
- }, I = (F) => {
6521
+ }, D = (F) => {
6522
6522
  if (!x)
6523
6523
  return;
6524
6524
  const b = {
@@ -6594,7 +6594,7 @@ function Hr({
6594
6594
  availableFieldChoices: T,
6595
6595
  availableMetricChoices: k,
6596
6596
  onCreateFlowActiveChange: l,
6597
- onChange: (F, b, D) => S(F, D),
6597
+ onChange: (F, b, I) => S(F, I),
6598
6598
  emptyMessage: "No card-scoped controls yet."
6599
6599
  }
6600
6600
  ),
@@ -6608,7 +6608,7 @@ function Hr({
6608
6608
  card: x,
6609
6609
  dashboardControls: f,
6610
6610
  bindings: P,
6611
- onChange: I,
6611
+ onChange: D,
6612
6612
  availableFieldChoices: T,
6613
6613
  availableMetricChoices: k
6614
6614
  }
@@ -6660,7 +6660,7 @@ function Uo({
6660
6660
  "map"
6661
6661
  ].includes(i.type);
6662
6662
  return m || f || s || r || d ? /* @__PURE__ */ a("div", { "data-info": "visual-settings", className: "flex items-center gap-2", children: [
6663
- m && /* @__PURE__ */ e(De, { children: /* @__PURE__ */ e(rf, {}) }),
6663
+ m && /* @__PURE__ */ e(Ie, { children: /* @__PURE__ */ e(rf, {}) }),
6664
6664
  f && /* @__PURE__ */ a(
6665
6665
  gt,
6666
6666
  {
@@ -6685,7 +6685,7 @@ function pf({
6685
6685
  onPreviewToggle: n,
6686
6686
  configCard: s
6687
6687
  }) {
6688
- var D, L, R, B, z;
6688
+ var I, L, R, B, z;
6689
6689
  const r = O((_) => _.frame), d = O((_) => _.card), i = O((_) => _.editorContext), l = (i == null ? void 0 : i.type) === "documentSection", {
6690
6690
  setFrame: o,
6691
6691
  setActiveTabCardId: c,
@@ -6694,7 +6694,7 @@ function pf({
6694
6694
  clearModeDrafts: f,
6695
6695
  initializeModeDrafts: p
6696
6696
  } = Ne(), { manifest: u } = ba(
6697
- ((D = s == null ? void 0 : s.customCardPreferences) == null ? void 0 : D.url) || ""
6697
+ ((I = s == null ? void 0 : s.customCardPreferences) == null ? void 0 : I.url) || ""
6698
6698
  ), g = (L = u == null ? void 0 : u.visuals) == null ? void 0 : L.find(
6699
6699
  (_) => {
6700
6700
  var q;
@@ -6711,7 +6711,7 @@ function pf({
6711
6711
  _.dataTransfer.setData("tabIndex", q.toString());
6712
6712
  }, S = (_) => {
6713
6713
  _.preventDefault();
6714
- }, I = (_, q) => {
6714
+ }, D = (_, q) => {
6715
6715
  const H = _.dataTransfer.getData("tabIndex");
6716
6716
  if (H === q.toString()) return;
6717
6717
  const Q = Array.from(r.cards), [J] = Q.splice(parseInt(H), 1);
@@ -6849,7 +6849,7 @@ function pf({
6849
6849
  draggable: !x && !l,
6850
6850
  onDragStart: x || l ? void 0 : (ve) => k(ve, q),
6851
6851
  onDragOver: x || l ? void 0 : S,
6852
- onDrop: x || l ? void 0 : (ve) => I(ve, q),
6852
+ onDrop: x || l ? void 0 : (ve) => D(ve, q),
6853
6853
  className: Y(
6854
6854
  "inline-flex h-6 shrink-0 items-center gap-1.5 rounded-[5px] border px-2 text-[12px] font-normal text-muted-foreground transition-colors",
6855
6855
  "mb-0 border-transparent pb-0",
@@ -6860,13 +6860,13 @@ function pf({
6860
6860
  children: [
6861
6861
  x && Q ? (
6862
6862
  // Multi-input visual: Icon + Slot Label (non-editable, no eye icon)
6863
- /* @__PURE__ */ e(Vt, { delayDuration: 0, children: /* @__PURE__ */ a(It, { children: [
6863
+ /* @__PURE__ */ e(Vt, { delayDuration: 0, children: /* @__PURE__ */ a(Dt, { children: [
6864
6864
  /* @__PURE__ */ e(Et, { asChild: !0, children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
6865
- /* @__PURE__ */ e("span", { className: "text-muted-foreground", children: Wi(J, "size-3.5") }),
6865
+ /* @__PURE__ */ e("span", { className: "text-muted-foreground", children: Qi(J, "size-3.5") }),
6866
6866
  /* @__PURE__ */ e("span", { children: Q.label || `Tab ${H + 1}` })
6867
6867
  ] }) }),
6868
6868
  /* @__PURE__ */ e(
6869
- Dt,
6869
+ It,
6870
6870
  {
6871
6871
  side: "bottom",
6872
6872
  className: "w-64 p-3 text-left",
@@ -6883,7 +6883,7 @@ function pf({
6883
6883
  ] }) })
6884
6884
  ) : (
6885
6885
  // Regular tabs: Eye icon + Editable title
6886
- /* @__PURE__ */ a(De, { children: [
6886
+ /* @__PURE__ */ a(Ie, { children: [
6887
6887
  b(r, _),
6888
6888
  /* @__PURE__ */ e(
6889
6889
  Ud,
@@ -6948,7 +6948,7 @@ function pf({
6948
6948
  }
6949
6949
  );
6950
6950
  }
6951
- function Da({
6951
+ function Ia({
6952
6952
  renderCardOverride: t,
6953
6953
  alwaysRenderOverride: n = !1
6954
6954
  } = {}) {
@@ -6975,16 +6975,16 @@ function Da({
6975
6975
  getCard: T,
6976
6976
  manifest: k,
6977
6977
  isLoading: S
6978
- } = ba(((me = l == null ? void 0 : l.customCardPreferences) == null ? void 0 : me.url) || ""), I = (be = l == null ? void 0 : l.customCardPreferences) == null ? void 0 : be.componentName, A = I ? T(I) : null, M = (qe = k == null ? void 0 : k.visuals) == null ? void 0 : qe.find(
6979
- (pe) => pe.name === I
6978
+ } = ba(((me = l == null ? void 0 : l.customCardPreferences) == null ? void 0 : me.url) || ""), D = (be = l == null ? void 0 : l.customCardPreferences) == null ? void 0 : be.componentName, A = D ? T(D) : null, M = (qe = k == null ? void 0 : k.visuals) == null ? void 0 : qe.find(
6979
+ (pe) => pe.name === D
6980
6980
  ), V = ya(l, M), F = d && V === "multiple" && !!l, b = de(() => jn({
6981
6981
  frame: s,
6982
6982
  configCard: l,
6983
6983
  isMultiInputVisual: !0
6984
6984
  }).map(
6985
6985
  (ce) => (ce == null ? void 0 : ce.id) === r.id ? r : ce
6986
- ), [s, l, r]), D = de(
6987
- () => to(b),
6986
+ ), [s, l, r]), I = de(
6987
+ () => ao(b),
6988
6988
  [b]
6989
6989
  ), L = de(() => {
6990
6990
  const pe = b.findIndex(
@@ -7022,10 +7022,10 @@ function Da({
7022
7022
  []
7023
7023
  ), Ce = y.size > 0, Pe = oh(
7024
7024
  (pe) => pe.interactionStates
7025
- ), tt = Ie((pe) => {
7025
+ ), tt = De((pe) => {
7026
7026
  var ce;
7027
7027
  return (ce = pe.dashboard) == null ? void 0 : ce.id;
7028
- }), Je = Ie((pe) => pe.dashboard.filters), le = Ie((pe) => pe.filterValues), Oe = Ie((pe) => pe.selectedSheetId), Be = O(
7028
+ }), Je = De((pe) => pe.dashboard.filters), le = De((pe) => pe.filterValues), Oe = De((pe) => pe.selectedSheetId), Be = O(
7029
7029
  (pe) => pe.inlineFilterValuesMap[(l == null ? void 0 : l.id) || ""]
7030
7030
  ), at = O(
7031
7031
  (pe) => pe.actions.setCardInlineFilterValue
@@ -7083,7 +7083,7 @@ function Da({
7083
7083
  return /* @__PURE__ */ e("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e(Ht, { size: "md", color: "muted", "aria-label": "Loading manifest" }) });
7084
7084
  if (!A)
7085
7085
  return /* @__PURE__ */ e("div", { className: "flex h-full items-center justify-center text-sm text-muted-foreground", children: "Select a component to preview the multi-input visual." });
7086
- const ce = D.map(
7086
+ const ce = I.map(
7087
7087
  (we, Ve) => Qa(
7088
7088
  we,
7089
7089
  Ve,
@@ -7127,7 +7127,7 @@ function Da({
7127
7127
  editing: !0,
7128
7128
  ...Wd({
7129
7129
  configCard: l,
7130
- slotOrderedCards: D,
7130
+ slotOrderedCards: I,
7131
7131
  slotTypes: ce,
7132
7132
  multiInputData: C,
7133
7133
  params: v,
@@ -7166,7 +7166,7 @@ function Da({
7166
7166
  comparisonMetadata: (pe = z == null ? void 0 : z.metadata) == null ? void 0 : pe.comparisonMetadata
7167
7167
  }
7168
7168
  ) }),
7169
- Ui(r) && /* @__PURE__ */ e(Gi, { card: r, mode: "editor" })
7169
+ Gi(r) && /* @__PURE__ */ e(Hi, { card: r, mode: "editor" })
7170
7170
  ] }) }) : r.type === "text" ? _ || q ? /* @__PURE__ */ e("div", { className: "z-50 flex h-full items-center justify-center", children: /* @__PURE__ */ e(Ht, { size: "md", color: "muted", "aria-label": "Loading data" }) }) : ue ? /* @__PURE__ */ e("div", { className: "flex h-full min-h-0 flex-col overflow-auto p-4", children: /* @__PURE__ */ e(
7171
7171
  Ls,
7172
7172
  {
@@ -7193,7 +7193,7 @@ function Da({
7193
7193
  className: "flex grow flex-col",
7194
7194
  children: [
7195
7195
  F ? /* @__PURE__ */ e("div", { className: "mt-0 grow", children: Ae() }) : s.cards.map((pe) => /* @__PURE__ */ e(
7196
- Ia,
7196
+ Da,
7197
7197
  {
7198
7198
  className: "mt-0 grow focus-visible:ring-0 focus-visible:ring-offset-0",
7199
7199
  value: pe.id,
@@ -7279,7 +7279,7 @@ function Go({
7279
7279
  function S() {
7280
7280
  m(f);
7281
7281
  }
7282
- function I() {
7282
+ function D() {
7283
7283
  var b;
7284
7284
  const F = si(
7285
7285
  i,
@@ -7479,7 +7479,7 @@ function Go({
7479
7479
  type: "button",
7480
7480
  size: "sm",
7481
7481
  className: "h-8 px-3 text-xs",
7482
- onClick: I,
7482
+ onClick: D,
7483
7483
  disabled: !P,
7484
7484
  children: "Accept changes"
7485
7485
  }
@@ -7508,7 +7508,7 @@ function Ho({
7508
7508
  )
7509
7509
  ), d(h), r(!0);
7510
7510
  };
7511
- return /* @__PURE__ */ a(De, { children: [
7511
+ return /* @__PURE__ */ a(Ie, { children: [
7512
7512
  /* @__PURE__ */ e(Wt, {}),
7513
7513
  /* @__PURE__ */ a(
7514
7514
  ct,
@@ -7626,14 +7626,14 @@ function er({
7626
7626
  var _e;
7627
7627
  const i = Ns(), l = O((xe) => xe.frame), o = O((xe) => xe.card), c = O((xe) => xe.isDevMode), h = O((xe) => xe.editorContext), m = (h == null ? void 0 : h.type) === "documentSection", f = O((xe) => xe.isShowingVisual), p = O(
7628
7628
  (xe) => xe.actions.setIsShowingVisual
7629
- ), u = Ie((xe) => xe.isVisualEditing), { isConsoleMode: g } = lu(), C = O((xe) => xe.pythonStdOut), x = O((xe) => xe.actions.setRunSql), y = xt(), E = y === "table" || y === "detailTable" || y === "matrixTable", v = $r(y) && !!(n != null && n.onOpen), w = on(o) === "dynamic", [T, k] = K(!1), S = r ?? T, I = d ?? k, {
7629
+ ), u = De((xe) => xe.isVisualEditing), { isConsoleMode: g } = lu(), C = O((xe) => xe.pythonStdOut), x = O((xe) => xe.actions.setRunSql), y = xt(), E = y === "table" || y === "detailTable" || y === "matrixTable", v = $r(y) && !!(n != null && n.onOpen), w = on(o) === "dynamic", [T, k] = K(!1), S = r ?? T, D = d ?? k, {
7630
7630
  setFrame: A,
7631
7631
  setCard: M,
7632
7632
  setActiveTabCardId: V,
7633
7633
  // runAssistant,
7634
7634
  setCardPreferences: F,
7635
7635
  mergeDraftsIntoCard: b,
7636
- clearModeDrafts: D,
7636
+ clearModeDrafts: I,
7637
7637
  initializeModeDrafts: L,
7638
7638
  updatePageSize: R,
7639
7639
  setCardType: B
@@ -7724,7 +7724,7 @@ function er({
7724
7724
  `), fe = new Blob([U], { type: "text/csv" }), Ae = URL.createObjectURL(fe), me = document.createElement("a");
7725
7725
  me.href = Ae, me.download = `${o.title}.csv`, me.click();
7726
7726
  }
7727
- if (!o) return /* @__PURE__ */ e(De, { children: "No Active Card" });
7727
+ if (!o) return /* @__PURE__ */ e(Ie, { children: "No Active Card" });
7728
7728
  const ge = s === "both" || s === "toolbar", Ue = s === "both" || s === "canvas";
7729
7729
  return /* @__PURE__ */ a(
7730
7730
  "div",
@@ -7925,7 +7925,7 @@ function er({
7925
7925
  /* @__PURE__ */ e(
7926
7926
  Ho,
7927
7927
  {
7928
- onCustomize: () => I(!0)
7928
+ onCustomize: () => D(!0)
7929
7929
  }
7930
7930
  ),
7931
7931
  /* @__PURE__ */ e(Wt, {}),
@@ -7970,27 +7970,27 @@ function er({
7970
7970
  }
7971
7971
  ),
7972
7972
  Ue && (f ? w ? /* @__PURE__ */ e(
7973
- Da,
7973
+ Ia,
7974
7974
  {
7975
7975
  alwaysRenderOverride: !0,
7976
7976
  renderCardOverride: () => /* @__PURE__ */ e(
7977
7977
  Go,
7978
7978
  {
7979
- fallbackPreview: /* @__PURE__ */ e(Da, {}),
7979
+ fallbackPreview: /* @__PURE__ */ e(Ia, {}),
7980
7980
  records: Ce,
7981
7981
  title: o.title,
7982
7982
  isInspectorOpen: S,
7983
- onInspectorOpenChange: I
7983
+ onInspectorOpenChange: D
7984
7984
  }
7985
7985
  )
7986
7986
  }
7987
- ) : /* @__PURE__ */ e(Da, {}) : /* @__PURE__ */ a(
7987
+ ) : /* @__PURE__ */ e(Ia, {}) : /* @__PURE__ */ a(
7988
7988
  na,
7989
7989
  {
7990
7990
  className: Y(C && "py-2 pl-2 pr-6"),
7991
7991
  direction: "horizontal",
7992
7992
  children: [
7993
- C && /* @__PURE__ */ a(De, { children: [
7993
+ C && /* @__PURE__ */ a(Ie, { children: [
7994
7994
  /* @__PURE__ */ e(
7995
7995
  ft,
7996
7996
  {
@@ -8325,7 +8325,7 @@ const Cf = {
8325
8325
  th: ({ children: t }) => /* @__PURE__ */ e("th", { className: "border border-border px-3 py-2 text-left font-medium", children: t }),
8326
8326
  td: ({ children: t }) => /* @__PURE__ */ e("td", { className: "border border-border px-3 py-2", children: t }),
8327
8327
  code: ({ children: t, className: n }) => (n == null ? void 0 : n.includes("language-")) ? /* @__PURE__ */ e("pre", { className: "my-3 overflow-x-auto rounded-md bg-muted p-3 text-xs", children: /* @__PURE__ */ e("code", { children: t }) }) : /* @__PURE__ */ e("code", { className: "rounded bg-muted px-1 py-0.5 text-xs", children: t }),
8328
- pre: ({ children: t }) => /* @__PURE__ */ e(De, { children: t })
8328
+ pre: ({ children: t }) => /* @__PURE__ */ e(Ie, { children: t })
8329
8329
  };
8330
8330
  function Qo() {
8331
8331
  var M, V, F;
@@ -8349,12 +8349,12 @@ function Qo() {
8349
8349
  }),
8350
8350
  [d, l, r, p]
8351
8351
  ), y = de(
8352
- () => to(x),
8352
+ () => ao(x),
8353
8353
  [x]
8354
8354
  ), E = de(
8355
- () => y.map((b, D) => {
8355
+ () => y.map((b, I) => {
8356
8356
  if (!b) return null;
8357
- const L = ta(b, D), R = Qa(
8357
+ const L = ta(b, I), R = Qa(
8358
8358
  b,
8359
8359
  L,
8360
8360
  m == null ? void 0 : m.slots
@@ -8374,16 +8374,16 @@ function Qo() {
8374
8374
  [m == null ? void 0 : m.slots, E, g]
8375
8375
  ), v = de(() => {
8376
8376
  const b = x.findIndex(
8377
- (D) => (D == null ? void 0 : D.id) === r.id
8377
+ (I) => (I == null ? void 0 : I.id) === r.id
8378
8378
  );
8379
8379
  return b < 0 ? -1 : ta(r, b);
8380
8380
  }, [x, r]);
8381
8381
  function N(b) {
8382
8382
  if (typeof b == "number")
8383
8383
  return `Tab ${b + 1}`;
8384
- const D = b.match(/^(\d+)-(\d+)$/);
8385
- if (D) {
8386
- const [, R, B] = D;
8384
+ const I = b.match(/^(\d+)-(\d+)$/);
8385
+ if (I) {
8386
+ const [, R, B] = I;
8387
8387
  return `Tabs ${Number(R) + 1}-${Number(B) + 1}`;
8388
8388
  }
8389
8389
  const L = b.match(/^(\d+)\+$/);
@@ -8392,9 +8392,9 @@ function Qo() {
8392
8392
  function w(b) {
8393
8393
  return b ? (Array.isArray(b) ? b : [b]).join(", ") : null;
8394
8394
  }
8395
- function T(b, D, L = [], R = "", B, z, _) {
8395
+ function T(b, I, L = [], R = "", B, z, _) {
8396
8396
  const q = k({
8397
- key: D,
8397
+ key: I,
8398
8398
  defaultValue: R,
8399
8399
  settingsValue: z,
8400
8400
  sourceCard: _
@@ -8408,7 +8408,7 @@ function Qo() {
8408
8408
  ),
8409
8409
  onCommit: (H) => {
8410
8410
  S({
8411
- key: D,
8411
+ key: I,
8412
8412
  value: H,
8413
8413
  settingsField: B,
8414
8414
  settingsValue: z,
@@ -8416,7 +8416,7 @@ function Qo() {
8416
8416
  });
8417
8417
  }
8418
8418
  },
8419
- D
8419
+ I
8420
8420
  ) : b === "select" ? /* @__PURE__ */ e(
8421
8421
  ua,
8422
8422
  {
@@ -8428,7 +8428,7 @@ function Qo() {
8428
8428
  ),
8429
8429
  onValueChange: (H) => {
8430
8430
  S({
8431
- key: D,
8431
+ key: I,
8432
8432
  value: H,
8433
8433
  settingsField: B,
8434
8434
  settingsValue: z,
@@ -8440,29 +8440,29 @@ function Qo() {
8440
8440
  }
8441
8441
  function k({
8442
8442
  key: b,
8443
- defaultValue: D,
8443
+ defaultValue: I,
8444
8444
  settingsValue: L,
8445
8445
  sourceCard: R
8446
8446
  }) {
8447
8447
  const B = L == null ? void 0 : L[b];
8448
- return B !== void 0 ? B : b === "title" && (R == null ? void 0 : R.title) !== void 0 ? R.title : b === "description" && (R == null ? void 0 : R.description) !== void 0 ? R.description : D;
8448
+ return B !== void 0 ? B : b === "title" && (R == null ? void 0 : R.title) !== void 0 ? R.title : b === "description" && (R == null ? void 0 : R.description) !== void 0 ? R.description : I;
8449
8449
  }
8450
8450
  function S({
8451
8451
  key: b,
8452
- value: D,
8452
+ value: I,
8453
8453
  settingsField: L,
8454
8454
  settingsValue: R,
8455
8455
  sourceCard: B
8456
8456
  }) {
8457
8457
  const z = { ...R || {} }, _ = b === "title" && (B == null ? void 0 : B.title) !== void 0, q = b === "description" && (B == null ? void 0 : B.description) !== void 0;
8458
- _ && D === String((B == null ? void 0 : B.title) ?? "") || q && D === String((B == null ? void 0 : B.description) ?? "") ? delete z[b] : z[b] = D, i({
8458
+ _ && I === String((B == null ? void 0 : B.title) ?? "") || q && I === String((B == null ? void 0 : B.description) ?? "") ? delete z[b] : z[b] = I, i({
8459
8459
  ...t || {},
8460
8460
  [L]: z
8461
8461
  });
8462
8462
  }
8463
- function I({
8463
+ function D({
8464
8464
  settingsSchema: b,
8465
- settingsField: D,
8465
+ settingsField: I,
8466
8466
  settingsValue: L,
8467
8467
  sourceCard: R,
8468
8468
  headerLabel: B
@@ -8475,9 +8475,9 @@ function Qo() {
8475
8475
  return /* @__PURE__ */ a("div", { className: "space-y-2", children: [
8476
8476
  /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
8477
8477
  /* @__PURE__ */ e($, { children: q.title }),
8478
- ((H = q.docs) == null ? void 0 : H.description) && /* @__PURE__ */ e(Vt, { delayDuration: 0, children: /* @__PURE__ */ a(It, { children: [
8478
+ ((H = q.docs) == null ? void 0 : H.description) && /* @__PURE__ */ e(Vt, { delayDuration: 0, children: /* @__PURE__ */ a(Dt, { children: [
8479
8479
  /* @__PURE__ */ e(Et, { asChild: !0, children: /* @__PURE__ */ e(Xt, { className: "h-3.5 w-3.5 cursor-help text-muted-foreground" }) }),
8480
- /* @__PURE__ */ e(Dt, { side: "right", className: "max-w-xs", children: /* @__PURE__ */ e("p", { className: "text-xs", children: q.docs.description }) })
8480
+ /* @__PURE__ */ e(It, { side: "right", className: "max-w-xs", children: /* @__PURE__ */ e("p", { className: "text-xs", children: q.docs.description }) })
8481
8481
  ] }) })
8482
8482
  ] }),
8483
8483
  T(
@@ -8485,7 +8485,7 @@ function Qo() {
8485
8485
  _,
8486
8486
  q.options,
8487
8487
  q.defaultValue,
8488
- D,
8488
+ I,
8489
8489
  L,
8490
8490
  R
8491
8491
  )
@@ -8494,10 +8494,10 @@ function Qo() {
8494
8494
  ] });
8495
8495
  }
8496
8496
  function A() {
8497
- return /* @__PURE__ */ a(De, { children: [
8497
+ return /* @__PURE__ */ a(Ie, { children: [
8498
8498
  p && /* @__PURE__ */ a("div", { className: "space-y-3", children: [
8499
8499
  /* @__PURE__ */ e($, { children: "Slot Guide" }),
8500
- /* @__PURE__ */ e("div", { className: "space-y-3 rounded-md border border-border bg-muted/40 px-3 py-2 text-xs", children: m != null && m.slots && m.slots.length > 0 ? /* @__PURE__ */ e("div", { className: "space-y-3", children: m.slots.map((b, D) => /* @__PURE__ */ a("div", { className: "space-y-1", children: [
8500
+ /* @__PURE__ */ e("div", { className: "space-y-3 rounded-md border border-border bg-muted/40 px-3 py-2 text-xs", children: m != null && m.slots && m.slots.length > 0 ? /* @__PURE__ */ e("div", { className: "space-y-3", children: m.slots.map((b, I) => /* @__PURE__ */ a("div", { className: "space-y-1", children: [
8501
8501
  /* @__PURE__ */ a("div", { className: "flex items-center gap-2 text-foreground", children: [
8502
8502
  /* @__PURE__ */ e("span", { className: "font-medium", children: N(b.position) }),
8503
8503
  /* @__PURE__ */ e("span", { className: "text-muted-foreground", children: "•" }),
@@ -8511,7 +8511,7 @@ function Qo() {
8511
8511
  ] }),
8512
8512
  b.required && /* @__PURE__ */ e("span", { children: "Required" })
8513
8513
  ] })
8514
- ] }, `${b.label}-${D}`)) }) : /* @__PURE__ */ a("div", { className: "space-y-1 text-muted-foreground", children: [
8514
+ ] }, `${b.label}-${I}`)) }) : /* @__PURE__ */ a("div", { className: "space-y-1 text-muted-foreground", children: [
8515
8515
  /* @__PURE__ */ e("p", { children: "This visual renders all tabs in a flexible layout. Add as many tabs as needed." }),
8516
8516
  (g || C) && /* @__PURE__ */ a("p", { children: [
8517
8517
  g ? `Min ${g} tabs` : "",
@@ -8520,28 +8520,28 @@ function Qo() {
8520
8520
  ] })
8521
8521
  ] }) })
8522
8522
  ] }),
8523
- p && P.length > 0 && /* @__PURE__ */ e(ao, { className: "mt-3 border-yellow-500/40 bg-yellow-500/10 text-yellow-900 dark:text-yellow-100", children: /* @__PURE__ */ e(no, { children: /* @__PURE__ */ e("ul", { className: "list-disc space-y-1 pl-4 text-xs", children: P.map((b, D) => /* @__PURE__ */ e("li", { children: b.message }, `${b.type}-${D}`)) }) }) }),
8524
- m && !p && m.settings && /* @__PURE__ */ e("div", { className: "space-y-3", children: /* @__PURE__ */ e("div", { className: "px-2", children: I({
8523
+ p && P.length > 0 && /* @__PURE__ */ e(no, { className: "mt-3 border-yellow-500/40 bg-yellow-500/10 text-yellow-900 dark:text-yellow-100", children: /* @__PURE__ */ e(so, { children: /* @__PURE__ */ e("ul", { className: "list-disc space-y-1 pl-4 text-xs", children: P.map((b, I) => /* @__PURE__ */ e("li", { children: b.message }, `${b.type}-${I}`)) }) }) }),
8524
+ m && !p && m.settings && /* @__PURE__ */ e("div", { className: "space-y-3", children: /* @__PURE__ */ e("div", { className: "px-2", children: D({
8525
8525
  settingsSchema: m.settings,
8526
8526
  settingsField: "settings",
8527
8527
  settingsValue: t == null ? void 0 : t.settings,
8528
8528
  sourceCard: r
8529
8529
  }) }) }),
8530
8530
  m && p && (m.settings || m.slotSettings) && /* @__PURE__ */ a("div", { className: "mt-4 space-y-4", children: [
8531
- u && m.settings && /* @__PURE__ */ e("div", { className: "px-2", children: I({
8531
+ u && m.settings && /* @__PURE__ */ e("div", { className: "px-2", children: D({
8532
8532
  settingsSchema: m.settings,
8533
8533
  settingsField: "settings",
8534
8534
  settingsValue: t == null ? void 0 : t.settings,
8535
8535
  sourceCard: l || r,
8536
8536
  headerLabel: "Global Settings"
8537
8537
  }) }),
8538
- m.slotSettings && /* @__PURE__ */ e("div", { className: "px-2", children: I({
8538
+ m.slotSettings && /* @__PURE__ */ e("div", { className: "px-2", children: D({
8539
8539
  settingsSchema: m.slotSettings,
8540
8540
  settingsField: "slotSettings",
8541
8541
  settingsValue: t == null ? void 0 : t.slotSettings,
8542
8542
  sourceCard: r,
8543
8543
  headerLabel: (() => {
8544
- const b = r.tabTitle || r.title, D = v >= 0 ? v : 0, L = u ? "Slot 0" : `Slot ${D}`;
8544
+ const b = r.tabTitle || r.title, I = v >= 0 ? v : 0, L = u ? "Slot 0" : `Slot ${I}`;
8545
8545
  return b ? `${L}: ${b} Settings` : `${L} Settings`;
8546
8546
  })()
8547
8547
  }) })
@@ -8578,7 +8578,7 @@ function Qo() {
8578
8578
  ),
8579
8579
  p && !u && /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: "Switch to the config tab to change the plugin or component." })
8580
8580
  ] }) }),
8581
- ((t == null ? void 0 : t.type) === "component" || (t == null ? void 0 : t.type) === void 0) && t && (!p || u) && /* @__PURE__ */ e(De, { children: c && /* @__PURE__ */ e(
8581
+ ((t == null ? void 0 : t.type) === "component" || (t == null ? void 0 : t.type) === void 0) && t && (!p || u) && /* @__PURE__ */ e(Ie, { children: c && /* @__PURE__ */ e(
8582
8582
  ua,
8583
8583
  {
8584
8584
  icon: /* @__PURE__ */ e(_h, { className: "h-3.5 w-3.5" }),
@@ -8591,7 +8591,7 @@ function Qo() {
8591
8591
  value: t.componentName || "",
8592
8592
  onValueChange: (b) => {
8593
8593
  var R;
8594
- const D = (R = h == null ? void 0 : h.visuals) == null ? void 0 : R.find(
8594
+ const I = (R = h == null ? void 0 : h.visuals) == null ? void 0 : R.find(
8595
8595
  (B) => B.name === b
8596
8596
  ), L = c == null ? void 0 : c.find(
8597
8597
  (B) => B.name === b
@@ -8599,10 +8599,10 @@ function Qo() {
8599
8599
  i({
8600
8600
  ...t,
8601
8601
  componentName: b,
8602
- visualType: (D == null ? void 0 : D.visualType) || (L == null ? void 0 : L.type) || "single",
8603
- minInputs: D == null ? void 0 : D.minInputs,
8604
- maxInputs: D == null ? void 0 : D.maxInputs,
8605
- pluginChartType: D == null ? void 0 : D.chartType
8602
+ visualType: (I == null ? void 0 : I.visualType) || (L == null ? void 0 : L.type) || "single",
8603
+ minInputs: I == null ? void 0 : I.minInputs,
8604
+ maxInputs: I == null ? void 0 : I.maxInputs,
8605
+ pluginChartType: I == null ? void 0 : I.chartType
8606
8606
  });
8607
8607
  }
8608
8608
  }
@@ -8641,8 +8641,8 @@ function Qo() {
8641
8641
  ) })
8642
8642
  ] }),
8643
8643
  (() => {
8644
- var D;
8645
- const b = (D = m.docs) == null ? void 0 : D.useCases;
8644
+ var I;
8645
+ const b = (I = m.docs) == null ? void 0 : I.useCases;
8646
8646
  return !b || b.length === 0 ? null : /* @__PURE__ */ a("div", { className: "space-y-2", children: [
8647
8647
  /* @__PURE__ */ e("h4", { className: "text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: "Use Cases" }),
8648
8648
  /* @__PURE__ */ e("ul", { className: "space-y-1 text-sm", children: b.map((L, R) => /* @__PURE__ */ a(
@@ -9237,7 +9237,7 @@ function kf({
9237
9237
  )
9238
9238
  ] }) : null;
9239
9239
  }
9240
- function Df({
9240
+ function If({
9241
9241
  chartType: t
9242
9242
  }) {
9243
9243
  return Yo(t) ? /* @__PURE__ */ a(Za, { openDelay: 200, children: [
@@ -9267,10 +9267,10 @@ function Wr({
9267
9267
  }) {
9268
9268
  return /* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: [
9269
9269
  /* @__PURE__ */ e("h3", { className: "text-sm font-medium", children: n }),
9270
- /* @__PURE__ */ e(Df, { chartType: t })
9270
+ /* @__PURE__ */ e(If, { chartType: t })
9271
9271
  ] });
9272
9272
  }
9273
- function If() {
9273
+ function Df() {
9274
9274
  return /* @__PURE__ */ a("div", { className: "space-y-6 px-6 py-4", children: [
9275
9275
  /* @__PURE__ */ e(Wr, { chartType: "kpi" }),
9276
9276
  /* @__PURE__ */ e("section", { children: /* @__PURE__ */ e(Sf, {}) })
@@ -9513,11 +9513,11 @@ const Af = [
9513
9513
  }));
9514
9514
  function Ff() {
9515
9515
  var c, h, m, f, p, u, g, C, x, y, E, P, v, N, w, T, k, S;
9516
- const t = O((I) => I.card), n = (h = (c = t == null ? void 0 : t.preferences) == null ? void 0 : c.mapVisualOptions) == null ? void 0 : h.topoJsonUrl, [s, r] = K(
9516
+ const t = O((D) => D.card), n = (h = (c = t == null ? void 0 : t.preferences) == null ? void 0 : c.mapVisualOptions) == null ? void 0 : h.topoJsonUrl, [s, r] = K(
9517
9517
  ((f = (m = t == null ? void 0 : t.preferences) == null ? void 0 : m.mapVisualOptions) == null ? void 0 : f.customTopoJsonUrl) || ""
9518
- ), { setCardPreferences: d } = Ne(), { data: i } = Ar(t), l = Object.keys((i == null ? void 0 : i.objects) || {}).map((I) => ({
9519
- label: I,
9520
- value: I
9518
+ ), { setCardPreferences: d } = Ne(), { data: i } = Ar(t), l = Object.keys((i == null ? void 0 : i.objects) || {}).map((D) => ({
9519
+ label: D,
9520
+ value: D
9521
9521
  })) || [];
9522
9522
  return /* @__PURE__ */ a("div", { className: "space-y-4 px-6 py-4", children: [
9523
9523
  /* @__PURE__ */ e(Wr, { chartType: "map" }),
@@ -9540,11 +9540,11 @@ function Ff() {
9540
9540
  value: "custom"
9541
9541
  }
9542
9542
  ],
9543
- onValueChange: (I) => {
9544
- console.log("value", I), d({
9543
+ onValueChange: (D) => {
9544
+ console.log("value", D), d({
9545
9545
  ...t.preferences,
9546
9546
  mapVisualOptions: {
9547
- topoJsonUrl: I
9547
+ topoJsonUrl: D
9548
9548
  // customTopoJson: undefined,
9549
9549
  }
9550
9550
  });
@@ -9556,15 +9556,15 @@ function Ff() {
9556
9556
  n === "custom" && /* @__PURE__ */ e(
9557
9557
  Fe,
9558
9558
  {
9559
- onChange: (I) => {
9560
- r(I.target.value);
9559
+ onChange: (D) => {
9560
+ r(D.target.value);
9561
9561
  },
9562
9562
  onBlur: () => {
9563
- var I;
9563
+ var D;
9564
9564
  console.log("onBlur", s), d({
9565
9565
  ...t.preferences,
9566
9566
  mapVisualOptions: {
9567
- ...(I = t.preferences) == null ? void 0 : I.mapVisualOptions,
9567
+ ...(D = t.preferences) == null ? void 0 : D.mapVisualOptions,
9568
9568
  customTopoJsonUrl: s
9569
9569
  }
9570
9570
  });
@@ -9574,7 +9574,7 @@ function Ff() {
9574
9574
  placeholder: "Custom URL"
9575
9575
  }
9576
9576
  ),
9577
- i && /* @__PURE__ */ a(De, { children: [
9577
+ i && /* @__PURE__ */ a(Ie, { children: [
9578
9578
  /* @__PURE__ */ a("div", { className: "space-y-1", children: [
9579
9579
  /* @__PURE__ */ e($, { children: "Map Object" }),
9580
9580
  /* @__PURE__ */ e(
@@ -9584,13 +9584,13 @@ function Ff() {
9584
9584
  options: l,
9585
9585
  value: ((u = (p = t.preferences) == null ? void 0 : p.mapVisualOptions) == null ? void 0 : u.objectKey) || "",
9586
9586
  label: "Map Object",
9587
- onValueChange: (I) => {
9587
+ onValueChange: (D) => {
9588
9588
  var A;
9589
9589
  d({
9590
9590
  ...t.preferences,
9591
9591
  mapVisualOptions: {
9592
9592
  ...(A = t.preferences) == null ? void 0 : A.mapVisualOptions,
9593
- objectKey: I
9593
+ objectKey: D
9594
9594
  }
9595
9595
  });
9596
9596
  }
@@ -9606,13 +9606,13 @@ function Ff() {
9606
9606
  options: Af,
9607
9607
  value: ((C = (g = t.preferences) == null ? void 0 : g.mapVisualOptions) == null ? void 0 : C.projection) || "",
9608
9608
  label: "Projection",
9609
- onValueChange: (I) => {
9609
+ onValueChange: (D) => {
9610
9610
  var A;
9611
9611
  d({
9612
9612
  ...t.preferences,
9613
9613
  mapVisualOptions: {
9614
9614
  ...(A = t.preferences) == null ? void 0 : A.mapVisualOptions,
9615
- projection: I
9615
+ projection: D
9616
9616
  }
9617
9617
  });
9618
9618
  }
@@ -9628,13 +9628,13 @@ function Ff() {
9628
9628
  options: Mf,
9629
9629
  value: ((y = (x = t.preferences) == null ? void 0 : x.mapVisualOptions) == null ? void 0 : y.colorScale) || "",
9630
9630
  label: "Select Color Scale",
9631
- onValueChange: (I) => {
9631
+ onValueChange: (D) => {
9632
9632
  var A;
9633
9633
  d({
9634
9634
  ...t.preferences,
9635
9635
  mapVisualOptions: {
9636
9636
  ...(A = t.preferences) == null ? void 0 : A.mapVisualOptions,
9637
- colorScale: I
9637
+ colorScale: D
9638
9638
  }
9639
9639
  });
9640
9640
  }
@@ -9652,13 +9652,13 @@ function Ff() {
9652
9652
  type: "number",
9653
9653
  step: 0.1,
9654
9654
  value: ((P = (E = t.preferences) == null ? void 0 : E.mapVisualOptions) == null ? void 0 : P.projectionScale) || 1,
9655
- onChange: (I) => {
9655
+ onChange: (D) => {
9656
9656
  var A;
9657
9657
  d({
9658
9658
  ...t.preferences,
9659
9659
  mapVisualOptions: {
9660
9660
  ...(A = t.preferences) == null ? void 0 : A.mapVisualOptions,
9661
- projectionScale: Number(I.target.value)
9661
+ projectionScale: Number(D.target.value)
9662
9662
  }
9663
9663
  });
9664
9664
  }
@@ -9672,14 +9672,14 @@ function Ff() {
9672
9672
  type: "number",
9673
9673
  step: 10,
9674
9674
  value: ((w = (N = (v = t.preferences) == null ? void 0 : v.mapVisualOptions) == null ? void 0 : N.projectionOffset) == null ? void 0 : w[0]) || 0,
9675
- onChange: (I) => {
9675
+ onChange: (D) => {
9676
9676
  var A, M, V, F;
9677
9677
  d({
9678
9678
  ...t.preferences,
9679
9679
  mapVisualOptions: {
9680
9680
  ...(A = t.preferences) == null ? void 0 : A.mapVisualOptions,
9681
9681
  projectionOffset: [
9682
- Number(I.target.value),
9682
+ Number(D.target.value),
9683
9683
  ((F = (V = (M = t.preferences) == null ? void 0 : M.mapVisualOptions) == null ? void 0 : V.projectionOffset) == null ? void 0 : F[1]) || 0
9684
9684
  ]
9685
9685
  }
@@ -9695,7 +9695,7 @@ function Ff() {
9695
9695
  type: "number",
9696
9696
  step: 10,
9697
9697
  value: ((S = (k = (T = t.preferences) == null ? void 0 : T.mapVisualOptions) == null ? void 0 : k.projectionOffset) == null ? void 0 : S[1]) || 0,
9698
- onChange: (I) => {
9698
+ onChange: (D) => {
9699
9699
  var A, M, V, F;
9700
9700
  d({
9701
9701
  ...t.preferences,
@@ -9703,7 +9703,7 @@ function Ff() {
9703
9703
  ...(A = t.preferences) == null ? void 0 : A.mapVisualOptions,
9704
9704
  projectionOffset: [
9705
9705
  ((F = (V = (M = t.preferences) == null ? void 0 : M.mapVisualOptions) == null ? void 0 : V.projectionOffset) == null ? void 0 : F[0]) || 0,
9706
- Number(I.target.value)
9706
+ Number(D.target.value)
9707
9707
  ]
9708
9708
  }
9709
9709
  });
@@ -9893,7 +9893,7 @@ function cn({
9893
9893
  f(
9894
9894
  i.multiplyBy !== void 0 ? String(i.multiplyBy) : ""
9895
9895
  );
9896
- }, [i.multiplyBy]), /* @__PURE__ */ a(De, { children: [
9896
+ }, [i.multiplyBy]), /* @__PURE__ */ a(Ie, { children: [
9897
9897
  /* @__PURE__ */ a("div", { className: "space-y-2", children: [
9898
9898
  s && /* @__PURE__ */ e($, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: r }),
9899
9899
  /* @__PURE__ */ a(
@@ -10111,7 +10111,7 @@ function cn({
10111
10111
  }
10112
10112
  ) })
10113
10113
  ] }),
10114
- d === "duration" && /* @__PURE__ */ a(De, { children: [
10114
+ d === "duration" && /* @__PURE__ */ a(Ie, { children: [
10115
10115
  /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
10116
10116
  /* @__PURE__ */ e($, { className: "w-20 text-xs text-muted-foreground", children: "Value Is" }),
10117
10117
  /* @__PURE__ */ a(
@@ -10304,7 +10304,7 @@ function Xo({
10304
10304
  r,
10305
10305
  s
10306
10306
  ]);
10307
- const I = m.some(
10307
+ const D = m.some(
10308
10308
  (he) => he.comparisonType && he.comparisonType !== "none"
10309
10309
  ), A = ((ee = l == null ? void 0 : l.tableVisualOptions) == null ? void 0 : ee.metricComparison) || {}, M = (he) => {
10310
10310
  c({
@@ -10334,7 +10334,7 @@ function Xo({
10334
10334
  density: he
10335
10335
  }
10336
10336
  });
10337
- }, D = (he) => {
10337
+ }, I = (he) => {
10338
10338
  c({
10339
10339
  ...l,
10340
10340
  tablePrefs: {
@@ -10347,7 +10347,7 @@ function Xo({
10347
10347
  });
10348
10348
  }, L = (he) => {
10349
10349
  var Ce;
10350
- D({
10350
+ I({
10351
10351
  totals: {
10352
10352
  ...(Ce = o == null ? void 0 : o.tableStyle) == null ? void 0 : Ce.totals,
10353
10353
  ...he
@@ -10385,7 +10385,7 @@ function Xo({
10385
10385
  ...l,
10386
10386
  tablePrefs: {
10387
10387
  ...o,
10388
- columnVisibility: Du()
10388
+ columnVisibility: Iu()
10389
10389
  }
10390
10390
  });
10391
10391
  }, _ = () => {
@@ -10411,7 +10411,7 @@ function Xo({
10411
10411
  }
10412
10412
  }
10413
10413
  });
10414
- }, q = I ? /* @__PURE__ */ e(
10414
+ }, q = D ? /* @__PURE__ */ e(
10415
10415
  qf,
10416
10416
  {
10417
10417
  calculatedAs: A.calculatedAs ?? "change_difference",
@@ -10441,12 +10441,12 @@ function Xo({
10441
10441
  }
10442
10442
  )
10443
10443
  ] }),
10444
- /* @__PURE__ */ e(Ia, { value: "style", className: "mt-0", children: /* @__PURE__ */ e(
10444
+ /* @__PURE__ */ e(Da, { value: "style", className: "mt-0", children: /* @__PURE__ */ e(
10445
10445
  wu,
10446
10446
  {
10447
10447
  style: N,
10448
10448
  onDensityChange: b,
10449
- onStyleChange: D,
10449
+ onStyleChange: I,
10450
10450
  showFullStyle: y,
10451
10451
  showBorderStyle: !1,
10452
10452
  totals: y && w ? {
@@ -10458,7 +10458,7 @@ function Xo({
10458
10458
  onReset: y ? _ : void 0
10459
10459
  }
10460
10460
  ) }),
10461
- /* @__PURE__ */ e(Ia, { value: "columns", className: "mt-0", children: E ? /* @__PURE__ */ e(
10461
+ /* @__PURE__ */ e(Da, { value: "columns", className: "mt-0", children: E ? /* @__PURE__ */ e(
10462
10462
  Su,
10463
10463
  {
10464
10464
  columns: C,
@@ -10467,7 +10467,7 @@ function Xo({
10467
10467
  onShowAllColumns: z
10468
10468
  }
10469
10469
  ) : /* @__PURE__ */ e("p", { className: "py-6 text-center text-[12px] text-muted-foreground", children: "Column visibility is available for table cards." }) }),
10470
- /* @__PURE__ */ e(Ia, { value: "conditional-formatting", className: "mt-0", children: x ? P ? /* @__PURE__ */ e(
10470
+ /* @__PURE__ */ e(Da, { value: "conditional-formatting", className: "mt-0", children: x ? P ? /* @__PURE__ */ e(
10471
10471
  Tu,
10472
10472
  {
10473
10473
  columnId: P,
@@ -10856,17 +10856,17 @@ const Qf = [
10856
10856
  // yellow-400
10857
10857
  ];
10858
10858
  function Yf() {
10859
- var N, w, T, k, S, I, A, M, V, F;
10859
+ var N, w, T, k, S, D, A, M, V, F;
10860
10860
  const t = O((b) => b.card), n = O((b) => {
10861
- var D;
10862
- return (D = b.card) == null ? void 0 : D.preferences;
10861
+ var I;
10862
+ return (I = b.card) == null ? void 0 : I.preferences;
10863
10863
  }), s = xt(), { setCardPreferences: r, updateCardInFrame: d } = Ne(), i = de(() => s !== t.type ? { ...t, type: s } : t, [t, s]), { data: l } = Nt(i), [o, c] = K({}), [h, m] = K(
10864
10864
  null
10865
10865
  ), [f, p] = K(null), u = de(() => {
10866
10866
  var R, B, z, _, q, H, Q;
10867
10867
  if (!(l != null && l.records) || l.records.length === 0) return [];
10868
- const b = s === "stackedBar" || s === "stackedLine", D = s === "bar" || s === "line" || s === "horizontalBar" || s === "bullet" || s === "combo" || s === "area" || s === "stackedArea", L = ((R = t == null ? void 0 : t.config) == null ? void 0 : R.pivotByColumns) && t.config.pivotByColumns.length > 0;
10869
- if ((b || D) && L) {
10868
+ const b = s === "stackedBar" || s === "stackedLine", I = s === "bar" || s === "line" || s === "horizontalBar" || s === "bullet" || s === "combo" || s === "area" || s === "stackedArea", L = ((R = t == null ? void 0 : t.config) == null ? void 0 : R.pivotByColumns) && t.config.pivotByColumns.length > 0;
10869
+ if ((b || I) && L) {
10870
10870
  if (l.pivotSchema && Array.isArray(l.pivotSchema)) {
10871
10871
  const J = /* @__PURE__ */ new Set();
10872
10872
  return l.pivotSchema.forEach((ee) => {
@@ -10889,7 +10889,7 @@ function Yf() {
10889
10889
  );
10890
10890
  }
10891
10891
  }
10892
- if ((D || b) && !L && ((q = (_ = t == null ? void 0 : t.config) == null ? void 0 : _.metricColumns) != null && q.length))
10892
+ if ((I || b) && !L && ((q = (_ = t == null ? void 0 : t.config) == null ? void 0 : _.metricColumns) != null && q.length))
10893
10893
  return t.config.metricColumns.map(
10894
10894
  (J) => J.alias || J.label || J.name
10895
10895
  );
@@ -10907,21 +10907,21 @@ function Yf() {
10907
10907
  (w = t == null ? void 0 : t.config) == null ? void 0 : w.pivotByColumns,
10908
10908
  (T = t == null ? void 0 : t.config) == null ? void 0 : T.metricColumns,
10909
10909
  s
10910
- ]), g = de(() => Iu(), []);
10910
+ ]), g = de(() => Du(), []);
10911
10911
  Se(() => {
10912
10912
  const b = {};
10913
- u.forEach((D, L) => {
10914
- b[D] = Hl(
10915
- D,
10913
+ u.forEach((I, L) => {
10914
+ b[I] = Hl(
10915
+ I,
10916
10916
  L,
10917
10917
  n == null ? void 0 : n.colorConfig
10918
10918
  );
10919
10919
  }), c(b);
10920
10920
  }, [u, n == null ? void 0 : n.colorConfig, g]);
10921
- const C = (b, D) => {
10921
+ const C = (b, I) => {
10922
10922
  const L = {
10923
10923
  ...o,
10924
- [b]: D
10924
+ [b]: I
10925
10925
  };
10926
10926
  c(L);
10927
10927
  const R = {
@@ -10936,9 +10936,9 @@ function Yf() {
10936
10936
  preferences: R
10937
10937
  };
10938
10938
  d(B);
10939
- }, x = (b, D) => {
10939
+ }, x = (b, I) => {
10940
10940
  var q;
10941
- const L = g[D % g.length], { [b]: R, ...B } = ((q = n == null ? void 0 : n.colorConfig) == null ? void 0 : q.segments) || {}, z = {
10941
+ const L = g[I % g.length], { [b]: R, ...B } = ((q = n == null ? void 0 : n.colorConfig) == null ? void 0 : q.segments) || {}, z = {
10942
10942
  ...n || {},
10943
10943
  colorConfig: {
10944
10944
  segments: B
@@ -10954,7 +10954,7 @@ function Yf() {
10954
10954
  [b]: L
10955
10955
  }));
10956
10956
  };
10957
- if (!u.length || !((t == null ? void 0 : t.type) === "stackedBar" || (t == null ? void 0 : t.type) === "stackedLine" ? ((S = (k = t == null ? void 0 : t.config) == null ? void 0 : k.groupByColumns) == null ? void 0 : S.length) || ((A = (I = t == null ? void 0 : t.config) == null ? void 0 : I.pivotByColumns) == null ? void 0 : A.length) : (V = (M = t == null ? void 0 : t.config) == null ? void 0 : M.groupByColumns) == null ? void 0 : V.length) || ["table", "kpi", "text", "custom", "heatmap"].includes(s))
10957
+ if (!u.length || !((t == null ? void 0 : t.type) === "stackedBar" || (t == null ? void 0 : t.type) === "stackedLine" ? ((S = (k = t == null ? void 0 : t.config) == null ? void 0 : k.groupByColumns) == null ? void 0 : S.length) || ((A = (D = t == null ? void 0 : t.config) == null ? void 0 : D.pivotByColumns) == null ? void 0 : A.length) : (V = (M = t == null ? void 0 : t.config) == null ? void 0 : M.groupByColumns) == null ? void 0 : V.length) || ["table", "kpi", "text", "custom", "heatmap"].includes(s))
10958
10958
  return null;
10959
10959
  const P = () => {
10960
10960
  const b = {
@@ -10964,11 +10964,11 @@ function Yf() {
10964
10964
  }
10965
10965
  };
10966
10966
  r(b);
10967
- const D = {
10967
+ const I = {
10968
10968
  ...t,
10969
10969
  preferences: b
10970
10970
  };
10971
- d(D);
10971
+ d(I);
10972
10972
  const L = {};
10973
10973
  u.forEach((R, B) => {
10974
10974
  L[R] = Hl(R, B, void 0);
@@ -10991,8 +10991,8 @@ function Yf() {
10991
10991
  ]
10992
10992
  }
10993
10993
  ) }) }),
10994
- /* @__PURE__ */ e("div", { className: "max-h-[200px] space-y-2 overflow-y-auto pr-1", children: u.map((b, D) => {
10995
- const L = Eu(o[b], D), R = !L;
10994
+ /* @__PURE__ */ e("div", { className: "max-h-[200px] space-y-2 overflow-y-auto pr-1", children: u.map((b, I) => {
10995
+ const L = Eu(o[b], I), R = !L;
10996
10996
  return /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
10997
10997
  /* @__PURE__ */ a(
10998
10998
  Ot,
@@ -11022,7 +11022,7 @@ function Yf() {
11022
11022
  C(b, B), m(null);
11023
11023
  },
11024
11024
  children: [
11025
- z === D % g.length && /* @__PURE__ */ e("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ e("div", { className: "rounded-full bg-white/90 px-0.5 text-[8px] font-bold text-gray-900 shadow-sm", children: "D" }) }),
11025
+ z === I % g.length && /* @__PURE__ */ e("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ e("div", { className: "rounded-full bg-white/90 px-0.5 text-[8px] font-bold text-gray-900 shadow-sm", children: "D" }) }),
11026
11026
  /* @__PURE__ */ e("span", { className: "sr-only", children: B })
11027
11027
  ]
11028
11028
  },
@@ -11066,7 +11066,7 @@ function Yf() {
11066
11066
  {
11067
11067
  className: "flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground",
11068
11068
  onClick: () => {
11069
- x(b, D), m(null);
11069
+ x(b, I), m(null);
11070
11070
  },
11071
11071
  children: [
11072
11072
  /* @__PURE__ */ e(vr, { className: "h-3 w-3" }),
@@ -11141,7 +11141,7 @@ function zt({
11141
11141
  "aria-label": s || "Edit field"
11142
11142
  }
11143
11143
  ),
11144
- o && i !== t && /* @__PURE__ */ a(De, { children: [
11144
+ o && i !== t && /* @__PURE__ */ a(Ie, { children: [
11145
11145
  /* @__PURE__ */ e(
11146
11146
  Z,
11147
11147
  {
@@ -11168,7 +11168,7 @@ function zt({
11168
11168
  ] });
11169
11169
  }
11170
11170
  function rr({ axis: t, label: n, type: s, config: r, onChange: d, defaultTitle: i, hidePosition: l }) {
11171
- var g, C, x, y, E, P, v, N, w, T, k, S, I, A;
11171
+ var g, C, x, y, E, P, v, N, w, T, k, S, D, A;
11172
11172
  const o = Ou({
11173
11173
  formatMode: r == null ? void 0 : r.formatMode,
11174
11174
  formatOptions: r == null ? void 0 : r.formatOptions
@@ -11179,13 +11179,13 @@ function rr({ axis: t, label: n, type: s, config: r, onChange: d, defaultTitle:
11179
11179
  });
11180
11180
  }, h = (M, V) => {
11181
11181
  var L, R, B, z;
11182
- const F = M === "enabled" && V === !0, b = (L = r == null ? void 0 : r.name) == null ? void 0 : L.text, D = F && !b && i;
11182
+ const F = M === "enabled" && V === !0, b = (L = r == null ? void 0 : r.name) == null ? void 0 : L.text, I = F && !b && i;
11183
11183
  d({
11184
11184
  ...r ?? {},
11185
11185
  name: {
11186
11186
  ...r == null ? void 0 : r.name,
11187
11187
  enabled: M === "enabled" ? V : ((R = r == null ? void 0 : r.name) == null ? void 0 : R.enabled) ?? !1,
11188
- text: M === "text" ? V : D ? i : b,
11188
+ text: M === "text" ? V : I ? i : b,
11189
11189
  fontSize: M === "fontSize" ? V : (B = r == null ? void 0 : r.name) == null ? void 0 : B.fontSize,
11190
11190
  fontWeight: M === "fontWeight" ? V : (z = r == null ? void 0 : r.name) == null ? void 0 : z.fontWeight
11191
11191
  }
@@ -11396,7 +11396,7 @@ function rr({ axis: t, label: n, type: s, config: r, onChange: d, defaultTitle:
11396
11396
  {
11397
11397
  type: "number",
11398
11398
  placeholder: "auto",
11399
- value: ((I = r == null ? void 0 : r.scale) == null ? void 0 : I.stepSize) === "auto" || ((A = r == null ? void 0 : r.scale) == null ? void 0 : A.stepSize) === void 0 ? "" : String(r.scale.stepSize),
11399
+ value: ((D = r == null ? void 0 : r.scale) == null ? void 0 : D.stepSize) === "auto" || ((A = r == null ? void 0 : r.scale) == null ? void 0 : A.stepSize) === void 0 ? "" : String(r.scale.stepSize),
11400
11400
  onSave: (M) => f("stepSize", M),
11401
11401
  className: ""
11402
11402
  }
@@ -11542,7 +11542,7 @@ function Xf() {
11542
11542
  }
11543
11543
  )
11544
11544
  ] }),
11545
- ((s == null ? void 0 : s.display) ?? i) && /* @__PURE__ */ a(De, { children: [
11545
+ ((s == null ? void 0 : s.display) ?? i) && /* @__PURE__ */ a(Ie, { children: [
11546
11546
  /* @__PURE__ */ a("div", { className: "space-y-2", children: [
11547
11547
  /* @__PURE__ */ e($, { className: "text-xs font-medium", children: "Position" }),
11548
11548
  /* @__PURE__ */ a(
@@ -11576,7 +11576,7 @@ function Xf() {
11576
11576
  ] });
11577
11577
  }
11578
11578
  function Zf() {
11579
- var V, F, b, D, L, R, B;
11579
+ var V, F, b, I, L, R, B;
11580
11580
  const t = O((z) => z.card), n = xt(), s = O(
11581
11581
  (z) => {
11582
11582
  var _, q;
@@ -11588,7 +11588,7 @@ function Zf() {
11588
11588
  }), { setCardPreferences: d, updateCardInFrame: i } = Ne();
11589
11589
  if (!t || !Ru(n))
11590
11590
  return null;
11591
- const l = n === "bullet" ? ((V = r == null ? void 0 : r.bulletConfig) == null ? void 0 : V.orientation) ?? (((F = r == null ? void 0 : r.chartOptions) == null ? void 0 : F.indexAxis) === "x" ? "vertical" : "horizontal") : void 0, o = l != null ? l === "horizontal" : ((b = r == null ? void 0 : r.chartOptions) == null ? void 0 : b.indexAxis) === "y", c = n === "stackedBar" || n === "stackedLine", h = n === "pie" || n === "doughnut" || n === "polarArea" || n === "funnel", m = n === "bubble" || n === "scatter", f = (L = (D = r == null ? void 0 : r.chartOptions) == null ? void 0 : D.plugins) == null ? void 0 : L.datalabels, p = (f == null ? void 0 : f.display) !== !1 && ((f == null ? void 0 : f.anchor) || (f == null ? void 0 : f.align)), u = Lu(
11591
+ const l = n === "bullet" ? ((V = r == null ? void 0 : r.bulletConfig) == null ? void 0 : V.orientation) ?? (((F = r == null ? void 0 : r.chartOptions) == null ? void 0 : F.indexAxis) === "x" ? "vertical" : "horizontal") : void 0, o = l != null ? l === "horizontal" : ((b = r == null ? void 0 : r.chartOptions) == null ? void 0 : b.indexAxis) === "y", c = n === "stackedBar" || n === "stackedLine", h = n === "pie" || n === "doughnut" || n === "polarArea" || n === "funnel", m = n === "bubble" || n === "scatter", f = (L = (I = r == null ? void 0 : r.chartOptions) == null ? void 0 : I.plugins) == null ? void 0 : L.datalabels, p = (f == null ? void 0 : f.display) !== !1 && ((f == null ? void 0 : f.anchor) || (f == null ? void 0 : f.align)), u = Lu(
11592
11592
  n,
11593
11593
  t.preferences
11594
11594
  ), g = s ?? u, C = (u == null ? void 0 : u.enabled) ?? p ?? !1, x = (s == null ? void 0 : s.enabled) !== void 0 ? s.enabled : C, y = (z, _) => {
@@ -11640,7 +11640,7 @@ function Zf() {
11640
11640
  const z = o ? ["center", "left", "right"] : ["center", "top", "bottom"];
11641
11641
  T = ["auto", ...n === "bullet" ? z : z.filter((q) => q !== w), "custom"];
11642
11642
  }
11643
- const k = () => Pt(w), S = ["center", "start", "end"], I = ["center", "start", "end", "top", "bottom"], A = (g == null ? void 0 : g.formatMode) || (g != null && g.format && !["auto"].includes(g.format) ? "override" : "inherit"), M = (g == null ? void 0 : g.format) === "none";
11643
+ const k = () => Pt(w), S = ["center", "start", "end"], D = ["center", "start", "end", "top", "bottom"], A = (g == null ? void 0 : g.formatMode) || (g != null && g.format && !["auto"].includes(g.format) ? "override" : "inherit"), M = (g == null ? void 0 : g.format) === "none";
11644
11644
  return /* @__PURE__ */ a(st, { value: "data-labels", className: "border-b-0", children: [
11645
11645
  /* @__PURE__ */ e(rt, { className: "flex w-full items-center gap-2 py-2 text-[12px] font-medium hover:no-underline", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
11646
11646
  /* @__PURE__ */ e(np, { className: "h-4 w-4 text-muted-foreground" }),
@@ -11658,7 +11658,7 @@ function Zf() {
11658
11658
  }
11659
11659
  )
11660
11660
  ] }),
11661
- x && /* @__PURE__ */ a(De, { children: [
11661
+ x && /* @__PURE__ */ a(Ie, { children: [
11662
11662
  v && !c && !h && /* @__PURE__ */ a("div", { className: "space-y-2", children: [
11663
11663
  /* @__PURE__ */ e($, { className: "text-xs font-medium", children: "Position" }),
11664
11664
  /* @__PURE__ */ a(
@@ -11708,7 +11708,7 @@ function Zf() {
11708
11708
  onValueChange: (z) => y("align", z),
11709
11709
  children: [
11710
11710
  /* @__PURE__ */ e(ne, { className: "h-8 text-xs flex-1", children: /* @__PURE__ */ e(se, {}) }),
11711
- /* @__PURE__ */ e(re, { children: I.map((z) => /* @__PURE__ */ e(j, { value: z, className: "text-xs", children: Pt(z) }, z)) })
11711
+ /* @__PURE__ */ e(re, { children: D.map((z) => /* @__PURE__ */ e(j, { value: z, className: "text-xs", children: Pt(z) }, z)) })
11712
11712
  ]
11713
11713
  }
11714
11714
  )
@@ -11729,7 +11729,7 @@ function Zf() {
11729
11729
  }
11730
11730
  )
11731
11731
  ] }),
11732
- A === "override" && /* @__PURE__ */ a(De, { children: [
11732
+ A === "override" && /* @__PURE__ */ a(Ie, { children: [
11733
11733
  /* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: [
11734
11734
  /* @__PURE__ */ a("div", { className: "space-y-1", children: [
11735
11735
  /* @__PURE__ */ e($, { className: "text-xs font-medium", children: "Raw Value" }),
@@ -11934,7 +11934,7 @@ function tg() {
11934
11934
  }
11935
11935
  )
11936
11936
  ] }),
11937
- m && /* @__PURE__ */ a(De, { children: [
11937
+ m && /* @__PURE__ */ a(Ie, { children: [
11938
11938
  /* @__PURE__ */ a("div", { className: "space-y-1.5", children: [
11939
11939
  /* @__PURE__ */ a("div", { className: "flex items-center gap-1", children: [
11940
11940
  /* @__PURE__ */ e(
@@ -12270,7 +12270,7 @@ function ag() {
12270
12270
  };
12271
12271
  return /* @__PURE__ */ a(st, { value: "treemap-color-mode", className: "border-none", children: [
12272
12272
  /* @__PURE__ */ e(rt, { className: "flex w-full items-center gap-2 py-3 text-[12px] font-medium hover:no-underline", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
12273
- /* @__PURE__ */ e(Zi, { className: "h-4 w-4 text-muted-foreground" }),
12273
+ /* @__PURE__ */ e(eo, { className: "h-4 w-4 text-muted-foreground" }),
12274
12274
  /* @__PURE__ */ e("span", { children: "Treemap Colors" })
12275
12275
  ] }) }),
12276
12276
  /* @__PURE__ */ e(lt, { className: "space-y-4 border-t border-border bg-background/50 px-3 py-4 text-sm", children: /* @__PURE__ */ a(
@@ -12313,7 +12313,7 @@ function ag() {
12313
12313
  ) })
12314
12314
  ] });
12315
12315
  }
12316
- const ng = Object.keys(so);
12316
+ const ng = Object.keys(ro);
12317
12317
  function sg() {
12318
12318
  const t = O((p) => p.card), n = O((p) => {
12319
12319
  var u;
@@ -12355,7 +12355,7 @@ function sg() {
12355
12355
  className: "space-y-3",
12356
12356
  children: [
12357
12357
  ng.map((p) => {
12358
- const u = so[p];
12358
+ const u = ro[p];
12359
12359
  return /* @__PURE__ */ a(
12360
12360
  "div",
12361
12361
  {
@@ -12473,8 +12473,8 @@ function rg() {
12473
12473
  o
12474
12474
  ]);
12475
12475
  const x = de(() => {
12476
- var b, D;
12477
- return ((D = (b = n == null ? void 0 : n.config) == null ? void 0 : b.metricColumns) == null ? void 0 : D.map((L) => {
12476
+ var b, I;
12477
+ return ((I = (b = n == null ? void 0 : n.config) == null ? void 0 : b.metricColumns) == null ? void 0 : I.map((L) => {
12478
12478
  const R = L.label || L.name || L.alias || "";
12479
12479
  return {
12480
12480
  value: R,
@@ -12487,18 +12487,18 @@ function rg() {
12487
12487
  if (!t || x.length === 0)
12488
12488
  return;
12489
12489
  const b = {};
12490
- let D = !1;
12490
+ let I = !1;
12491
12491
  const L = (q = x[1]) == null ? void 0 : q.value;
12492
- !i.targetMetricKey && L && (b.targetMetricKey = L, D = !0);
12492
+ !i.targetMetricKey && L && (b.targetMetricKey = L, I = !0);
12493
12493
  const R = (H = x[2]) == null ? void 0 : H.value;
12494
- !i.comparativeMetricKey && !i.disableAutoComparative && R && (b.comparativeMetricKey = R, D = !0);
12494
+ !i.comparativeMetricKey && !i.disableAutoComparative && R && (b.comparativeMetricKey = R, I = !0);
12495
12495
  const B = x.slice(3), z = {
12496
12496
  ...i.rangeKeys || {}
12497
12497
  };
12498
12498
  let _ = !1;
12499
12499
  if (wi.forEach((Q, J) => {
12500
12500
  !z[Q] && B[J] && (z[Q] = B[J].value, _ = !0);
12501
- }), _ && (b.rangeKeys = z, D = !0, i.showRanges === void 0 && (b.showRanges = !0)), D) {
12501
+ }), _ && (b.rangeKeys = z, I = !0, i.showRanges === void 0 && (b.showRanges = !0)), I) {
12502
12502
  const Q = Si({
12503
12503
  ...i,
12504
12504
  ...b
@@ -12510,24 +12510,24 @@ function rg() {
12510
12510
  }
12511
12511
  }, [x, i, t, r]);
12512
12512
  const y = (b) => {
12513
- const D = Si({
12513
+ const I = Si({
12514
12514
  ...i,
12515
12515
  ...b
12516
12516
  });
12517
12517
  r({
12518
12518
  ...t,
12519
- bulletConfig: D
12519
+ bulletConfig: I
12520
12520
  });
12521
- }, E = (b, D) => {
12521
+ }, E = (b, I) => {
12522
12522
  const L = {
12523
12523
  ...i.rangeKeys || {},
12524
- [b]: D.trim()
12524
+ [b]: I.trim()
12525
12525
  };
12526
- D.trim() || delete L[b], y({
12526
+ I.trim() || delete L[b], y({
12527
12527
  rangeKeys: Object.keys(L).length > 0 ? L : void 0
12528
12528
  });
12529
- }, P = (b, D) => {
12530
- const L = D === "" ? void 0 : Number(D), R = {
12529
+ }, P = (b, I) => {
12530
+ const L = I === "" ? void 0 : Number(I), R = {
12531
12531
  ...i.ranges || {}
12532
12532
  };
12533
12533
  L === void 0 || Number.isNaN(L) ? delete R[b] : R[b] = L, y({
@@ -12538,12 +12538,12 @@ function rg() {
12538
12538
  y({ targetValue: void 0 });
12539
12539
  return;
12540
12540
  }
12541
- const D = Number(b);
12541
+ const I = Number(b);
12542
12542
  y({
12543
- targetValue: Number.isNaN(D) ? void 0 : D
12543
+ targetValue: Number.isNaN(I) ? void 0 : I
12544
12544
  });
12545
- }, N = (b, D) => {
12546
- const L = D.trim(), R = {
12545
+ }, N = (b, I) => {
12546
+ const L = I.trim(), R = {
12547
12547
  ...i.rangeLabels || {}
12548
12548
  };
12549
12549
  L ? R[b] = L : delete R[b], y({
@@ -12555,13 +12555,13 @@ function rg() {
12555
12555
  f(b), y({ rangesArePercentages: b });
12556
12556
  }, k = i.orientation || (((F = t == null ? void 0 : t.chartOptions) == null ? void 0 : F.indexAxis) === "y" ? "horizontal" : "vertical"), S = (b) => {
12557
12557
  y({ orientation: b }), d(b === "horizontal" ? "y" : "x");
12558
- }, I = [
12558
+ }, D = [
12559
12559
  { value: "__none", label: "None" },
12560
12560
  ...x.map((b) => ({
12561
12561
  value: b.value,
12562
12562
  label: b.label
12563
12563
  }))
12564
- ], A = I, M = (b) => {
12564
+ ], A = D, M = (b) => {
12565
12565
  if (g(b), !b) {
12566
12566
  y({
12567
12567
  comparativeMetricKey: void 0,
@@ -12576,18 +12576,18 @@ function rg() {
12576
12576
  if (i.comparativeMetricKey)
12577
12577
  y({ disableAutoComparative: !1 });
12578
12578
  else {
12579
- const D = x.find(
12579
+ const I = x.find(
12580
12580
  (L) => L.value !== i.targetMetricKey
12581
12581
  );
12582
12582
  y({
12583
- comparativeMetricKey: D == null ? void 0 : D.value,
12583
+ comparativeMetricKey: I == null ? void 0 : I.value,
12584
12584
  disableAutoComparative: !1
12585
12585
  });
12586
12586
  }
12587
12587
  };
12588
12588
  return /* @__PURE__ */ a(st, { value: "bullet-config", className: "border-b-0", children: [
12589
12589
  /* @__PURE__ */ e(rt, { className: "flex w-full items-center gap-2 py-2 text-[12px] font-medium hover:no-underline", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
12590
- /* @__PURE__ */ e(Xi, { className: "h-4 w-4 text-muted-foreground" }),
12590
+ /* @__PURE__ */ e(Zi, { className: "h-4 w-4 text-muted-foreground" }),
12591
12591
  /* @__PURE__ */ e("span", { children: "Bullet Chart" })
12592
12592
  ] }) }),
12593
12593
  /* @__PURE__ */ a(lt, { className: "space-y-6 border-t border-border/50 py-4", children: [
@@ -12648,7 +12648,7 @@ function rg() {
12648
12648
  }),
12649
12649
  children: [
12650
12650
  /* @__PURE__ */ e(ne, { className: "h-8 text-xs", children: /* @__PURE__ */ e(se, { placeholder: "Select metric" }) }),
12651
- /* @__PURE__ */ e(re, { children: I.map((b) => /* @__PURE__ */ e(
12651
+ /* @__PURE__ */ e(re, { children: D.map((b) => /* @__PURE__ */ e(
12652
12652
  j,
12653
12653
  {
12654
12654
  value: b.value,
@@ -12693,7 +12693,7 @@ function rg() {
12693
12693
  /* @__PURE__ */ a("div", { className: "flex items-center justify-between gap-2", children: [
12694
12694
  /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
12695
12695
  /* @__PURE__ */ e($, { className: "text-xs font-medium", children: "QUALITATIVE RANGES" }),
12696
- /* @__PURE__ */ e(Vt, { children: /* @__PURE__ */ a(It, { delayDuration: 200, children: [
12696
+ /* @__PURE__ */ e(Vt, { children: /* @__PURE__ */ a(Dt, { delayDuration: 200, children: [
12697
12697
  /* @__PURE__ */ e(Et, { asChild: !0, children: /* @__PURE__ */ e(
12698
12698
  "button",
12699
12699
  {
@@ -12702,7 +12702,7 @@ function rg() {
12702
12702
  children: /* @__PURE__ */ e(Xt, { className: "h-3.5 w-3.5" })
12703
12703
  }
12704
12704
  ) }),
12705
- /* @__PURE__ */ e(Dt, { side: "top", children: "Use columns or static values for Poor / Average / Good." })
12705
+ /* @__PURE__ */ e(It, { side: "top", children: "Use columns or static values for Poor / Average / Good." })
12706
12706
  ] }) })
12707
12707
  ] }),
12708
12708
  /* @__PURE__ */ e("div", { className: "flex items-center gap-2 text-xs font-medium", children: /* @__PURE__ */ e(
@@ -12729,7 +12729,7 @@ function rg() {
12729
12729
  ] })
12730
12730
  ] }),
12731
12731
  c && /* @__PURE__ */ e("div", { className: "space-y-3", children: wi.map((b) => {
12732
- var D, L, R, B, z;
12732
+ var I, L, R, B, z;
12733
12733
  return /* @__PURE__ */ a(
12734
12734
  "div",
12735
12735
  {
@@ -12744,7 +12744,7 @@ function rg() {
12744
12744
  Tt,
12745
12745
  {
12746
12746
  placeholder: `Display label (${b})`,
12747
- value: ((D = i.rangeLabels) == null ? void 0 : D[b]) || "",
12747
+ value: ((I = i.rangeLabels) == null ? void 0 : I[b]) || "",
12748
12748
  onCommit: (_) => N(b, _),
12749
12749
  className: "h-8 text-xs"
12750
12750
  }
@@ -12823,7 +12823,7 @@ function Ti(t) {
12823
12823
  return n;
12824
12824
  }
12825
12825
  function lg() {
12826
- var N, w, T, k, S, I, A, M, V, F, b, D;
12826
+ var N, w, T, k, S, D, A, M, V, F, b, I;
12827
12827
  const t = O((L) => L.card.preferences), n = O((L) => L.card), s = xt(), r = O((L) => L.isDevMode), { setCardPreferences: d, updateCardInFrame: i } = Ne(), l = s === "bubble", o = s === "scatter", c = de(
12828
12828
  () => (t == null ? void 0 : t.bubbleScatterConfig) || {},
12829
12829
  [t == null ? void 0 : t.bubbleScatterConfig]
@@ -12892,7 +12892,7 @@ function lg() {
12892
12892
  };
12893
12893
  return !l && !o ? null : /* @__PURE__ */ a(st, { value: "bubble-scatter-config", children: [
12894
12894
  /* @__PURE__ */ e(rt, { className: "flex w-full items-center gap-2 py-2 text-[12px] font-medium hover:no-underline", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
12895
- /* @__PURE__ */ e(l ? Pu : eo, { className: "h-3.5 w-3.5 text-foreground/60" }),
12895
+ /* @__PURE__ */ e(l ? Pu : to, { className: "h-3.5 w-3.5 text-foreground/60" }),
12896
12896
  /* @__PURE__ */ a("span", { children: [
12897
12897
  l ? "Bubble" : "Scatter",
12898
12898
  " Configuration"
@@ -12902,9 +12902,9 @@ function lg() {
12902
12902
  /* @__PURE__ */ a("div", { className: "space-y-3", children: [
12903
12903
  /* @__PURE__ */ a("div", { className: "flex items-center gap-1 text-xs font-medium text-muted-foreground", children: [
12904
12904
  "Dimensions",
12905
- /* @__PURE__ */ e(Vt, { children: /* @__PURE__ */ a(It, { children: [
12905
+ /* @__PURE__ */ e(Vt, { children: /* @__PURE__ */ a(Dt, { children: [
12906
12906
  /* @__PURE__ */ e(Et, { children: /* @__PURE__ */ e(Xt, { className: "h-3 w-3" }) }),
12907
- /* @__PURE__ */ e(Dt, { side: "right", className: "max-w-xs", children: /* @__PURE__ */ e("p", { children: "Label identifies each point. Group creates separate series in the legend." }) })
12907
+ /* @__PURE__ */ e(It, { side: "right", className: "max-w-xs", children: /* @__PURE__ */ e("p", { children: "Label identifies each point. Group creates separate series in the legend." }) })
12908
12908
  ] }) })
12909
12909
  ] }),
12910
12910
  /* @__PURE__ */ a("div", { className: "space-y-1", children: [
@@ -13125,7 +13125,7 @@ function lg() {
13125
13125
  Ye,
13126
13126
  {
13127
13127
  size: "sm",
13128
- checked: ((I = (S = t == null ? void 0 : t.xAxisConfig) == null ? void 0 : S.name) == null ? void 0 : I.enabled) ?? !1,
13128
+ checked: ((D = (S = t == null ? void 0 : t.xAxisConfig) == null ? void 0 : S.name) == null ? void 0 : D.enabled) ?? !1,
13129
13129
  onCheckedChange: (L) => {
13130
13130
  var z, _, q, H;
13131
13131
  const R = c.xMetricKey || "X Axis", B = c.yMetricKey || "Y Axis";
@@ -13183,7 +13183,7 @@ function lg() {
13183
13183
  {
13184
13184
  className: "h-8 text-xs",
13185
13185
  placeholder: c.yMetricKey || "Y Axis",
13186
- value: ((D = (b = t == null ? void 0 : t.yAxisConfig) == null ? void 0 : b.name) == null ? void 0 : D.text) || "",
13186
+ value: ((I = (b = t == null ? void 0 : t.yAxisConfig) == null ? void 0 : b.name) == null ? void 0 : I.text) || "",
13187
13187
  onCommit: (L) => {
13188
13188
  var R;
13189
13189
  y({
@@ -13982,7 +13982,7 @@ function kg({ metricKey: t, idx: n }) {
13982
13982
  "border border-border bg-background text-muted-foreground"
13983
13983
  ),
13984
13984
  children: [
13985
- /* @__PURE__ */ e(ro, { className: "h-3 w-3" }),
13985
+ /* @__PURE__ */ e(lo, { className: "h-3 w-3" }),
13986
13986
  m.label.split(" ")[0]
13987
13987
  ]
13988
13988
  }
@@ -14108,7 +14108,7 @@ function kg({ metricKey: t, idx: n }) {
14108
14108
  ] }) }) })
14109
14109
  ] }) });
14110
14110
  }
14111
- const Dg = [0, 1, 2, 3, 4, 5, 6, 8, 10], Ig = [
14111
+ const Ig = [0, 1, 2, 3, 4, 5, 6, 8, 10], Dg = [
14112
14112
  { value: "circle", label: "Circle ●" },
14113
14113
  { value: "rect", label: "Square ■" },
14114
14114
  { value: "rectRounded", label: "Rounded ▢" },
@@ -14252,7 +14252,7 @@ function Og({ metricKey: t, idx: n }) {
14252
14252
  onValueChange: (y) => u({ pointRadius: Number(y) }),
14253
14253
  children: [
14254
14254
  /* @__PURE__ */ e(ne, { className: "h-8 w-full text-xs", children: /* @__PURE__ */ e(se, {}) }),
14255
- /* @__PURE__ */ e(re, { children: Dg.map((y) => /* @__PURE__ */ e(
14255
+ /* @__PURE__ */ e(re, { children: Ig.map((y) => /* @__PURE__ */ e(
14256
14256
  j,
14257
14257
  {
14258
14258
  value: String(y),
@@ -14274,7 +14274,7 @@ function Og({ metricKey: t, idx: n }) {
14274
14274
  onValueChange: (y) => u({ pointStyle: y }),
14275
14275
  children: [
14276
14276
  /* @__PURE__ */ e(ne, { className: "h-8 w-full text-xs", children: /* @__PURE__ */ e(se, {}) }),
14277
- /* @__PURE__ */ e(re, { children: Ig.map(({ value: y, label: E }) => /* @__PURE__ */ e(
14277
+ /* @__PURE__ */ e(re, { children: Dg.map(({ value: y, label: E }) => /* @__PURE__ */ e(
14278
14278
  j,
14279
14279
  {
14280
14280
  value: y,
@@ -14405,7 +14405,7 @@ function Lg({ metricKey: t, idx: n }) {
14405
14405
  "border border-border bg-background text-muted-foreground"
14406
14406
  ),
14407
14407
  children: [
14408
- /* @__PURE__ */ e(Co, { className: "h-3 w-3" }),
14408
+ /* @__PURE__ */ e(wo, { className: "h-3 w-3" }),
14409
14409
  "r:",
14410
14410
  h
14411
14411
  ]
@@ -14592,7 +14592,7 @@ function jg() {
14592
14592
  };
14593
14593
  return /* @__PURE__ */ a(st, { value: "bar-style", className: "border-b-0", children: [
14594
14594
  /* @__PURE__ */ e(rt, { className: "flex w-full items-center gap-2 py-2 text-[12px] font-medium hover:no-underline", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
14595
- /* @__PURE__ */ e(Co, { className: "h-4 w-4 text-muted-foreground" }),
14595
+ /* @__PURE__ */ e(wo, { className: "h-4 w-4 text-muted-foreground" }),
14596
14596
  /* @__PURE__ */ e("span", { children: "Bar Style" })
14597
14597
  ] }) }),
14598
14598
  /* @__PURE__ */ e(lt, { className: "pt-2", children: /* @__PURE__ */ a("div", { className: "space-y-3", children: [
@@ -14659,7 +14659,7 @@ function Kg() {
14659
14659
  ), { setSortChart: n } = Ne();
14660
14660
  return /* @__PURE__ */ a(st, { value: "stacked-sort", children: [
14661
14661
  /* @__PURE__ */ e(rt, { children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
14662
- /* @__PURE__ */ e(Io, { className: "h-3.5 w-3.5 text-foreground/60" }),
14662
+ /* @__PURE__ */ e(Do, { className: "h-3.5 w-3.5 text-foreground/60" }),
14663
14663
  "Sort"
14664
14664
  ] }) }),
14665
14665
  /* @__PURE__ */ e(lt, { className: "space-y-4 px-1", children: /* @__PURE__ */ a("div", { className: "space-y-2", children: [
@@ -14703,7 +14703,7 @@ function Wg() {
14703
14703
  var E, P;
14704
14704
  const t = O((v) => v.card), n = O(
14705
14705
  (v) => v.actions.updateCardConfig
14706
- ), s = xt(), { scopedFields: r } = lo(), d = ((E = t.config) == null ? void 0 : E.metricColumns) || [], i = ((P = t.config) == null ? void 0 : P.summary) || {}, l = i.breakdownDimensions || [], o = l.length > 0, c = Ug.includes(s), h = d.length > 0, m = i.enabled === !0, f = c && h, p = Array.from(
14706
+ ), s = xt(), { scopedFields: r } = io(), d = ((E = t.config) == null ? void 0 : E.metricColumns) || [], i = ((P = t.config) == null ? void 0 : P.summary) || {}, l = i.breakdownDimensions || [], o = l.length > 0, c = Ug.includes(s), h = d.length > 0, m = i.enabled === !0, f = c && h, p = Array.from(
14707
14707
  new Map(
14708
14708
  r.filter(Gg).map((v) => [ka(v), Hg(v)])
14709
14709
  ).values()
@@ -14938,7 +14938,7 @@ function Zo({ mode: t }) {
14938
14938
  var r;
14939
14939
  return (r = s.card) == null ? void 0 : r.type;
14940
14940
  });
14941
- return wo(n) ? null : /* @__PURE__ */ a(De, { children: [
14941
+ return So(n) ? null : /* @__PURE__ */ a(Ie, { children: [
14942
14942
  n === "combo" && /* @__PURE__ */ e(xg, {}),
14943
14943
  (n === "area" || n === "stackedArea") && /* @__PURE__ */ e(Sg, {}),
14944
14944
  n === "line" && /* @__PURE__ */ e(Eg, {}),
@@ -14973,10 +14973,10 @@ function Xg({
14973
14973
  }) {
14974
14974
  const s = O((l) => l.card), r = s.type;
14975
14975
  if (on(s) === "dynamic")
14976
- return /* @__PURE__ */ e("div", { className: "p-6", children: /* @__PURE__ */ a(ao, { children: [
14976
+ return /* @__PURE__ */ e("div", { className: "p-6", children: /* @__PURE__ */ a(no, { children: [
14977
14977
  /* @__PURE__ */ e(Xt, { className: "h-4 w-4" }),
14978
14978
  /* @__PURE__ */ e(zu, { children: "Dynamic mode manages presentation" }),
14979
- /* @__PURE__ */ e(no, { children: "Built-in chart settings are hidden while this card is in dynamic mode. Query and data edits still apply, and the dynamic visual editor in the main panel controls the rendered output." })
14979
+ /* @__PURE__ */ e(so, { children: "Built-in chart settings are hidden while this card is in dynamic mode. Query and data edits still apply, and the dynamic visual editor in the main panel controls the rendered output." })
14980
14980
  ] }) });
14981
14981
  function i() {
14982
14982
  if ($r(r))
@@ -14990,7 +14990,7 @@ function Xg({
14990
14990
  );
14991
14991
  switch (r) {
14992
14992
  case "kpi":
14993
- return /* @__PURE__ */ e(If, {});
14993
+ return /* @__PURE__ */ e(Df, {});
14994
14994
  case "map":
14995
14995
  return /* @__PURE__ */ e(Ff, {});
14996
14996
  case "custom":
@@ -15114,13 +15114,13 @@ function ex(t) {
15114
15114
  (U) => U.selectedConnectionId
15115
15115
  ), T = O(
15116
15116
  (U) => U.selectedSchemaName
15117
- ), k = Ie(
15117
+ ), k = De(
15118
15118
  (U) => U.dashboard.aiScopeTables
15119
15119
  ), {
15120
15120
  errorMessage: S,
15121
- refetch: I,
15121
+ refetch: D,
15122
15122
  data: A
15123
- } = Nt(P), { setTriggerAIRun: M, setCurrentAssitantScope: V, setCardConfig: F } = Ne(), { selectedDatamodelName: b, connectionType: D, selectedDatamodelId: L } = $u(), R = (xe = Fi().data) == null ? void 0 : xe.assistantProfileId, B = Me(ns()), z = Me(null), _ = Me(o), q = Me(!1), H = () => {
15123
+ } = Nt(P), { setTriggerAIRun: M, setCurrentAssitantScope: V, setCardConfig: F } = Ne(), { selectedDatamodelName: b, connectionType: I, selectedDatamodelId: L } = $u(), R = (xe = Fi().data) == null ? void 0 : xe.assistantProfileId, B = Me(ns()), z = Me(null), _ = Me(o), q = Me(!1), H = () => {
15124
15124
  const U = z.current;
15125
15125
  U && (z.current = null, B.current = ns(), U === "clear" && J([]));
15126
15126
  }, {
@@ -15159,7 +15159,7 @@ function ex(t) {
15159
15159
  prepareSendMessagesRequest: ({ messages: U, body: fe }) => ({
15160
15160
  body: {
15161
15161
  ...fe,
15162
- messages: yo(U)
15162
+ messages: vo(U)
15163
15163
  }
15164
15164
  })
15165
15165
  }),
@@ -15261,7 +15261,7 @@ function ex(t) {
15261
15261
  s("Generating query config...");
15262
15262
  const He = ((ut = U.input) == null ? void 0 : ut.chartType) ?? ((pe = U.args) == null ? void 0 : pe.chartType), qt = ((ce = U.input) == null ? void 0 : ce.queryConfig) ?? ((we = U.args) == null ? void 0 : we.queryConfig);
15263
15263
  ((Ve = U.input) == null ? void 0 : Ve.cardConfig) ?? ((je = U.args) == null || je.cardConfig), g(He), F(qt), p(void 0), f(void 0);
15264
- const We = await I();
15264
+ const We = await D();
15265
15265
  if ((mt = We == null ? void 0 : We.data) != null && mt.error) {
15266
15266
  he({
15267
15267
  tool: U.toolName,
@@ -15329,7 +15329,7 @@ function ex(t) {
15329
15329
  datamodelId: L || "",
15330
15330
  datamodelName: li(b),
15331
15331
  connectionId: w || "",
15332
- connectionType: D || ""
15332
+ connectionType: I || ""
15333
15333
  }, fe = Yl([...x, U]);
15334
15334
  at(fe);
15335
15335
  }
@@ -15340,7 +15340,7 @@ function ex(t) {
15340
15340
  tableName: N || "",
15341
15341
  datamodelName: li(b),
15342
15342
  connectionId: w || "",
15343
- connectionType: D || "",
15343
+ connectionType: I || "",
15344
15344
  datamodelId: L || ""
15345
15345
  };
15346
15346
  if (!Uu(
@@ -15393,14 +15393,14 @@ function ki({
15393
15393
  onFullscreenChange: n,
15394
15394
  fullscreenContainer: s
15395
15395
  }) {
15396
- const r = Me(null), d = Me(!1), [i, l] = K(!1), [o, c] = K(fh), [h, m] = K(!1), [f, p] = K(!1), [u, g] = K(!1), [C, x] = K(0), y = t ?? u, E = gh(), { setCurrentAIContext: P, setHasEditorEntitySelectionOverride: v } = Br(), { clearQueue: N } = xh(), { clearFileAttachments: w } = bh(), T = yh("editor"), { selectedEntities: k } = Ei("editor"), S = O((me) => me.card.id), I = O((me) => me.card.dataSource), A = O(
15396
+ const r = Me(null), d = Me(!1), [i, l] = K(!1), [o, c] = K(fh), [h, m] = K(!1), [f, p] = K(!1), [u, g] = K(!1), [C, x] = K(0), y = t ?? u, E = gh(), { setCurrentAIContext: P, setHasEditorEntitySelectionOverride: v } = Br(), { clearQueue: N } = xh(), { clearFileAttachments: w } = bh(), T = yh("editor"), { selectedEntities: k } = Ei("editor"), S = O((me) => me.card.id), D = O((me) => me.card.dataSource), A = O(
15397
15397
  (me) => {
15398
15398
  var be;
15399
15399
  return (be = me.card.dataSource) == null ? void 0 : be.selectedEntities;
15400
15400
  }
15401
- ), M = O((me) => me.actions.setCardSql), V = O((me) => me.actions.setRunSql), F = O((me) => me.showAIDialog), b = Ie(
15401
+ ), M = O((me) => me.actions.setCardSql), V = O((me) => me.actions.setRunSql), F = O((me) => me.showAIDialog), b = De(
15402
15402
  (me) => me.handleOpenAssistantProfile
15403
- ), { setShowAIDialog: D, setCardPython: L } = Ne(), { assistantProfile: R } = Hu(), {
15403
+ ), { setShowAIDialog: I, setCardPython: L } = Ne(), { assistantProfile: R } = Hu(), {
15404
15404
  messages: B,
15405
15405
  setMessages: z,
15406
15406
  sendMessage: _,
@@ -15606,7 +15606,7 @@ function ki({
15606
15606
  onClick: () => {
15607
15607
  z([]), N("editor"), W();
15608
15608
  },
15609
- children: /* @__PURE__ */ e(io, { className: "size-4" })
15609
+ children: /* @__PURE__ */ e(oo, { className: "size-4" })
15610
15610
  }
15611
15611
  ),
15612
15612
  /* @__PURE__ */ e(
@@ -15616,7 +15616,7 @@ function ki({
15616
15616
  className: "h-7 p-2 text-muted-foreground hover:text-foreground",
15617
15617
  size: "sm",
15618
15618
  onClick: () => {
15619
- D(!1);
15619
+ I(!1);
15620
15620
  },
15621
15621
  children: /* @__PURE__ */ e(et, { className: "size-4" })
15622
15622
  }
@@ -15695,7 +15695,7 @@ function ki({
15695
15695
  incomingSelectedEntities: k,
15696
15696
  open: f,
15697
15697
  onOpenChange: p,
15698
- dataSource: I || nm,
15698
+ dataSource: D || nm,
15699
15699
  dialogMode: "aiContext",
15700
15700
  onSaveSelectedEntities: (me) => {
15701
15701
  v(!0), P({
@@ -15791,7 +15791,7 @@ function nx({
15791
15791
  "aria-label": "Edit alias template"
15792
15792
  }
15793
15793
  ),
15794
- d && s !== t && /* @__PURE__ */ a(De, { children: [
15794
+ d && s !== t && /* @__PURE__ */ a(Ie, { children: [
15795
15795
  /* @__PURE__ */ e(
15796
15796
  Z,
15797
15797
  {
@@ -15838,7 +15838,7 @@ function sx({
15838
15838
  return /* @__PURE__ */ a("div", { className: "space-y-1", children: [
15839
15839
  /* @__PURE__ */ e($, { className: "text-xs font-medium text-muted-foreground", children: "Pivot Value Aliases" }),
15840
15840
  /* @__PURE__ */ a("div", { className: "space-y-2", children: [
15841
- Object.entries(t).map(([f, p], u) => /* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: s === f ? /* @__PURE__ */ a(De, { children: [
15841
+ Object.entries(t).map(([f, p], u) => /* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: s === f ? /* @__PURE__ */ a(Ie, { children: [
15842
15842
  /* @__PURE__ */ e(
15843
15843
  Fe,
15844
15844
  {
@@ -15889,7 +15889,7 @@ function sx({
15889
15889
  children: /* @__PURE__ */ e(et, { className: "h-4 w-4 text-muted-foreground" })
15890
15890
  }
15891
15891
  )
15892
- ] }) : /* @__PURE__ */ a(De, { children: [
15892
+ ] }) : /* @__PURE__ */ a(Ie, { children: [
15893
15893
  /* @__PURE__ */ e(
15894
15894
  Fe,
15895
15895
  {
@@ -16052,7 +16052,7 @@ function Qr({
16052
16052
  className: n,
16053
16053
  delayDuration: s
16054
16054
  }) {
16055
- return /* @__PURE__ */ e(Vt, { children: /* @__PURE__ */ a(It, { delayDuration: s, children: [
16055
+ return /* @__PURE__ */ e(Vt, { children: /* @__PURE__ */ a(Dt, { delayDuration: s, children: [
16056
16056
  /* @__PURE__ */ e(Et, { asChild: !0, children: /* @__PURE__ */ e(
16057
16057
  "span",
16058
16058
  {
@@ -16063,7 +16063,7 @@ function Qr({
16063
16063
  children: t
16064
16064
  }
16065
16065
  ) }),
16066
- /* @__PURE__ */ e(Dt, { children: t })
16066
+ /* @__PURE__ */ e(It, { children: t })
16067
16067
  ] }) });
16068
16068
  }
16069
16069
  function lx(t, n = 30) {
@@ -16141,7 +16141,7 @@ function ix({
16141
16141
  }
16142
16142
  ),
16143
16143
  /* @__PURE__ */ e(
16144
- ro,
16144
+ lo,
16145
16145
  {
16146
16146
  onClick: () => h("area"),
16147
16147
  className: Y(
@@ -16223,7 +16223,7 @@ function ox() {
16223
16223
  }
16224
16224
  ) });
16225
16225
  }
16226
- return /* @__PURE__ */ e(De, { children: n ? i() : l() });
16226
+ return /* @__PURE__ */ e(Ie, { children: n ? i() : l() });
16227
16227
  }
16228
16228
  function cx({
16229
16229
  column: t
@@ -16261,7 +16261,7 @@ function dx({
16261
16261
  t.name,
16262
16262
  n,
16263
16263
  s
16264
- ], c = oo({
16264
+ ], c = co({
16265
16265
  queryKey: o,
16266
16266
  queryFn: async () => {
16267
16267
  if (!(l != null && l.connectionId))
@@ -16622,7 +16622,7 @@ function px({
16622
16622
  hasPivotColumns: i = !1,
16623
16623
  cardType: l
16624
16624
  }) {
16625
- var rl, ll, il, ol, cl, dl, ul, ml, hl, pl, fl, gl, xl, bl, yl, vl, Nl, Cl, wl, Sl, Tl, kl, Dl, Il, El, Al, Ol, Ml, Fl, Rl, Ll, Pl, Vl, Bl, _l;
16625
+ var rl, ll, il, ol, cl, dl, ul, ml, hl, pl, fl, gl, xl, bl, yl, vl, Nl, Cl, wl, Sl, Tl, kl, Il, Dl, El, Al, Ol, Ml, Fl, Rl, Ll, Pl, Vl, Bl, _l;
16626
16626
  const {
16627
16627
  attributes: o,
16628
16628
  listeners: c,
@@ -16630,11 +16630,11 @@ function px({
16630
16630
  transform: m,
16631
16631
  transition: f,
16632
16632
  isDragging: p
16633
- } = Ds({ id: t.id }), u = O((G) => G.card), g = O((G) => G.frame), C = Ie((G) => G.isVisualEditing), x = Ie((G) => G.selectedSheetId), y = Ie(
16633
+ } = Is({ id: t.id }), u = O((G) => G.card), g = O((G) => G.frame), C = De((G) => G.isVisualEditing), x = De((G) => G.selectedSheetId), y = De(
16634
16634
  (G) => G.actions.updateSheetCalculatedFields
16635
- ), E = Ie(
16635
+ ), E = De(
16636
16636
  (G) => G.actions.updateDashboardCalculatedFields
16637
- ), v = Ie(
16637
+ ), v = De(
16638
16638
  (G) => {
16639
16639
  var te;
16640
16640
  return G.visualEditPendingDashboardCalculatedFields ?? ((te = G.dashboard) == null ? void 0 : te.calculatedFields);
@@ -16643,11 +16643,11 @@ function px({
16643
16643
  scopedFields: N,
16644
16644
  valuePickFilterableFields: w,
16645
16645
  isLoading: T
16646
- } = Is(), { userContext: k } = Ir(), { tokenProps: S } = xa(), I = (k == null ? void 0 : k.type) === "organization", M = ((ll = (rl = S == null ? void 0 : S.params) == null ? void 0 : rl.calendarContext) == null ? void 0 : ll.tz) || ((il = S == null ? void 0 : S.params) == null ? void 0 : il.timezone) || Intl.DateTimeFormat().resolvedOptions().timeZone, {
16646
+ } = Ds(), { userContext: k } = Dr(), { tokenProps: S } = xa(), D = (k == null ? void 0 : k.type) === "organization", M = ((ll = (rl = S == null ? void 0 : S.params) == null ? void 0 : rl.calendarContext) == null ? void 0 : ll.tz) || ((il = S == null ? void 0 : S.params) == null ? void 0 : il.timezone) || Intl.DateTimeFormat().resolvedOptions().timeZone, {
16647
16647
  updateLabel: V,
16648
16648
  handleAggregationChange: F,
16649
16649
  handleDateFormatChange: b,
16650
- handleGranularityChange: D,
16650
+ handleGranularityChange: I,
16651
16651
  handleAliasTemplateChange: L,
16652
16652
  handleValueAliasesChange: R,
16653
16653
  handleMetricFormatChange: B,
@@ -16666,7 +16666,7 @@ function px({
16666
16666
  handleKpiTrendlineWindowChange: Pe,
16667
16667
  handleKpiTrendlineGranularityChange: tt,
16668
16668
  handleMetricTargetValueChange: Je
16669
- } = co(u), [le, Oe] = K(!1), [Be, at] = K(() => {
16669
+ } = uo(u), [le, Oe] = K(!1), [Be, at] = K(() => {
16670
16670
  var G;
16671
16671
  return !!((G = t.parameters) != null && G.windowTransform);
16672
16672
  }), [dt, ge] = K(!1), [Ue, _e] = K(!1), [xe, U] = K(null), fe = de(() => {
@@ -16702,14 +16702,14 @@ function px({
16702
16702
  }, qt = (G) => {
16703
16703
  var ye;
16704
16704
  const Te = (ye = js(G)[0]) == null ? void 0 : ye.value;
16705
- Te && !ut && (be(Te), n === "groupBy" && b(s, Te, "", n)), n === "groupBy" && D(s, G);
16705
+ Te && !ut && (be(Te), n === "groupBy" && b(s, Te, "", n)), n === "groupBy" && I(s, G);
16706
16706
  }, We = (G) => {
16707
16707
  Ve(G), n === "metrics" && L(s, G);
16708
16708
  }, Yn = (G) => {
16709
16709
  mt(G), n === "metrics" && R(s, G);
16710
16710
  }, Ba = (G) => {
16711
16711
  V(n, s, G);
16712
- }, dn = cm(t), sa = uo(t), un = dm(t), _a = t.role === "metric" && un, ra = un && (dn === "user_calculated" || dn === "inline_expression" && t.fieldScope !== "domain"), Lt = ra ? kh({
16712
+ }, dn = cm(t), sa = mo(t), un = dm(t), _a = t.role === "metric" && un, ra = un && (dn === "user_calculated" || dn === "inline_expression" && t.fieldScope !== "domain"), Lt = ra ? kh({
16713
16713
  field: t,
16714
16714
  sheetFields: (g == null ? void 0 : g.calculatedFields) || [],
16715
16715
  dashboardFields: v
@@ -16735,16 +16735,16 @@ function px({
16735
16735
  transition: f
16736
16736
  }, Bs = nt(
16737
16737
  fe.dataType || t.dataType
16738
- ), ja = Bs === "date", Zn = l === "kpi", Ka = n === "detailColumns", hn = (cl = u.config) == null ? void 0 : cl.metricColumns, Kt = (dl = u.config) == null ? void 0 : dl.groupByColumns, es = Ie((G) => G.dashboard), ts = Ie(
16738
+ ), ja = Bs === "date", Zn = l === "kpi", Ka = n === "detailColumns", hn = (cl = u.config) == null ? void 0 : cl.metricColumns, Kt = (dl = u.config) == null ? void 0 : dl.groupByColumns, es = De((G) => G.dashboard), ts = De(
16739
16739
  (G) => {
16740
16740
  var te;
16741
16741
  return (te = G.dashboard) == null ? void 0 : te.filters;
16742
16742
  }
16743
- ), pn = Ie(
16743
+ ), pn = De(
16744
16744
  (G) => G.filterValues
16745
- ), as = Ie(
16745
+ ), as = De(
16746
16746
  (G) => G.dashboardInputValues
16747
- ), wa = Ie(
16747
+ ), wa = De(
16748
16748
  (G) => G.dashboardInputValuesAreAuthoritative
16749
16749
  ), la = t.granularity || "day", fn = Ae.includes(
16750
16750
  la
@@ -16760,7 +16760,7 @@ function px({
16760
16760
  return;
16761
16761
  ce.current = G;
16762
16762
  const te = "day";
16763
- if (D(s, te), !ut) {
16763
+ if (I(s, te), !ut) {
16764
16764
  const ye = (Te = js(te)[0]) == null ? void 0 : Te.value;
16765
16765
  ye && (be(ye), b(s, ye, "", n));
16766
16766
  }
@@ -16768,7 +16768,7 @@ function px({
16768
16768
  t.dataType,
16769
16769
  t.id,
16770
16770
  b,
16771
- D,
16771
+ I,
16772
16772
  X,
16773
16773
  s,
16774
16774
  ut,
@@ -16777,7 +16777,7 @@ function px({
16777
16777
  fe.dataType,
16778
16778
  n
16779
16779
  ]);
16780
- const Re = !!l && Dh.includes(l), Le = l === "kpi" || l === "table", ke = de(
16780
+ const Re = !!l && Ih.includes(l), Le = l === "kpi" || l === "table", ke = de(
16781
16781
  () => Kt == null ? void 0 : Kt.find((G) => nt(G.dataType || "") === "date"),
16782
16782
  [Kt]
16783
16783
  ), it = de(
@@ -16843,7 +16843,7 @@ function px({
16843
16843
  (G) => G.id && (!_s || G.id !== Ua)
16844
16844
  ),
16845
16845
  ...ic ? (((wl = u.config) == null ? void 0 : wl.pivotByColumns) || []).filter((G) => G.id) : []
16846
- ], tl = ((kl = (Tl = (Sl = Xe.parameters) == null ? void 0 : Sl.windowTransform) == null ? void 0 : Tl.movingAverage) == null ? void 0 : kl.windowSize) || 7, oc = ((El = (Il = (Dl = Xe.parameters) == null ? void 0 : Dl.windowTransform) == null ? void 0 : Il.movingAverage) == null ? void 0 : El.minPeriods) || 1, cc = ((Ml = (Ol = (Al = Xe.parameters) == null ? void 0 : Al.windowTransform) == null ? void 0 : Ol.previousPeriodDelta) == null ? void 0 : Ml.mode) || "absolute", al = ((Ll = (Rl = (Fl = Xe.parameters) == null ? void 0 : Fl.windowTransform) == null ? void 0 : Rl.percentOfTotal) == null ? void 0 : Ll.scope) || "grand_total", dc = ((Bl = (Vl = (Pl = Xe.parameters) == null ? void 0 : Pl.windowTransform) == null ? void 0 : Vl.percentOfTotal) == null ? void 0 : Bl.output) || "percent", uc = de(
16846
+ ], tl = ((kl = (Tl = (Sl = Xe.parameters) == null ? void 0 : Sl.windowTransform) == null ? void 0 : Tl.movingAverage) == null ? void 0 : kl.windowSize) || 7, oc = ((El = (Dl = (Il = Xe.parameters) == null ? void 0 : Il.windowTransform) == null ? void 0 : Dl.movingAverage) == null ? void 0 : El.minPeriods) || 1, cc = ((Ml = (Ol = (Al = Xe.parameters) == null ? void 0 : Al.windowTransform) == null ? void 0 : Ol.previousPeriodDelta) == null ? void 0 : Ml.mode) || "absolute", al = ((Ll = (Rl = (Fl = Xe.parameters) == null ? void 0 : Fl.windowTransform) == null ? void 0 : Rl.percentOfTotal) == null ? void 0 : Ll.scope) || "grand_total", dc = ((Bl = (Vl = (Pl = Xe.parameters) == null ? void 0 : Pl.windowTransform) == null ? void 0 : Vl.percentOfTotal) == null ? void 0 : Bl.output) || "percent", uc = de(
16847
16847
  () => (hn || []).some(
16848
16848
  (G) => G.comparisonType === "start_vs_end"
16849
16849
  ),
@@ -16921,7 +16921,7 @@ function px({
16921
16921
  ]
16922
16922
  }
16923
16923
  )
16924
- ] }) : null, vc = () => pc ? /* @__PURE__ */ a(De, { children: [
16924
+ ] }) : null, vc = () => pc ? /* @__PURE__ */ a(Ie, { children: [
16925
16925
  sl(),
16926
16926
  /* @__PURE__ */ a("div", { className: "space-y-1", children: [
16927
16927
  /* @__PURE__ */ e($, { className: "text-xs font-medium text-muted-foreground", children: "Date Format" }),
@@ -16963,7 +16963,7 @@ function px({
16963
16963
  ] }) : null, Nc = () => {
16964
16964
  var te, Te, ye, ze;
16965
16965
  const G = fc;
16966
- return G ? /* @__PURE__ */ e(De, { children: G && /* @__PURE__ */ a(De, { children: [
16966
+ return G ? /* @__PURE__ */ e(Ie, { children: G && /* @__PURE__ */ a(Ie, { children: [
16967
16967
  /* @__PURE__ */ e("div", { className: "space-y-1", children: /* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: [
16968
16968
  /* @__PURE__ */ e($, { className: "text-xs font-medium text-muted-foreground", children: "Show Trendline" }),
16969
16969
  /* @__PURE__ */ e(
@@ -16975,7 +16975,7 @@ function px({
16975
16975
  }
16976
16976
  )
16977
16977
  ] }) }),
16978
- ((Te = u.config) == null ? void 0 : Te.showTrendline) && /* @__PURE__ */ a(De, { children: [
16978
+ ((Te = u.config) == null ? void 0 : Te.showTrendline) && /* @__PURE__ */ a(Ie, { children: [
16979
16979
  /* @__PURE__ */ a("div", { className: "space-y-1", children: [
16980
16980
  /* @__PURE__ */ e($, { className: "text-xs font-medium text-muted-foreground", children: "Trendline Window" }),
16981
16981
  /* @__PURE__ */ e(
@@ -17017,8 +17017,8 @@ function px({
17017
17017
  }, Cc = () => {
17018
17018
  if (!gc) return null;
17019
17019
  const G = _a;
17020
- return /* @__PURE__ */ a(De, { children: [
17021
- G && I && !$a && /* @__PURE__ */ a("div", { className: "space-y-1", children: [
17020
+ return /* @__PURE__ */ a(Ie, { children: [
17021
+ G && D && !$a && /* @__PURE__ */ a("div", { className: "space-y-1", children: [
17022
17022
  /* @__PURE__ */ e($, { className: "text-xs font-medium text-muted-foreground", children: "Formula" }),
17023
17023
  /* @__PURE__ */ a(
17024
17024
  Z,
@@ -17049,7 +17049,7 @@ function px({
17049
17049
  /* @__PURE__ */ a(re, { children: [
17050
17050
  /* @__PURE__ */ e(j, { className: "text-xs", value: "COUNT", children: "Count" }),
17051
17051
  /* @__PURE__ */ e(j, { className: "text-xs", value: "DISTINCT", children: "Count Distinct" }),
17052
- nt(t.dataType) === "number" && /* @__PURE__ */ a(De, { children: [
17052
+ nt(t.dataType) === "number" && /* @__PURE__ */ a(Ie, { children: [
17053
17053
  /* @__PURE__ */ e(j, { className: "text-xs", value: "SUM", children: "Sum" }),
17054
17054
  /* @__PURE__ */ e(j, { className: "text-xs", value: "AVG", children: "Average" }),
17055
17055
  /* @__PURE__ */ e(j, { className: "text-xs", value: "MIN", children: "Min" }),
@@ -17155,8 +17155,8 @@ function px({
17155
17155
  !gn.supported && !yt && /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground", children: gn.reason }),
17156
17156
  xn && !yt && /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground", children: "Disable comparison to enable metric transforms." })
17157
17157
  ] }),
17158
- yt && /* @__PURE__ */ a(De, { children: [
17159
- _s && /* @__PURE__ */ a(De, { children: [
17158
+ yt && /* @__PURE__ */ a(Ie, { children: [
17159
+ _s && /* @__PURE__ */ a(Ie, { children: [
17160
17160
  /* @__PURE__ */ a("div", { className: "space-y-1", children: [
17161
17161
  /* @__PURE__ */ e($, { className: "text-xs font-medium text-muted-foreground", children: "Order By" }),
17162
17162
  /* @__PURE__ */ a(
@@ -17254,7 +17254,7 @@ function px({
17254
17254
  }
17255
17255
  )
17256
17256
  ] }),
17257
- Ft === "percent_of_total" && /* @__PURE__ */ a(De, { children: [
17257
+ Ft === "percent_of_total" && /* @__PURE__ */ a(Ie, { children: [
17258
17258
  /* @__PURE__ */ a("div", { className: "space-y-1", children: [
17259
17259
  /* @__PURE__ */ e($, { className: "text-xs font-medium text-muted-foreground", children: "Scope" }),
17260
17260
  /* @__PURE__ */ a(
@@ -17344,7 +17344,7 @@ function px({
17344
17344
  /* @__PURE__ */ a(re, { children: [
17345
17345
  /* @__PURE__ */ e(j, { value: "none", children: "No Comparison" }),
17346
17346
  (() => {
17347
- const te = !it || !Sa, Te = it ? Sa ? void 0 : "Add a date filter to enable" : "Add a date groupBy to enable", ye = (ze, ot) => /* @__PURE__ */ e(Vt, { children: /* @__PURE__ */ a(It, { children: [
17347
+ const te = !it || !Sa, Te = it ? Sa ? void 0 : "Add a date filter to enable" : "Add a date groupBy to enable", ye = (ze, ot) => /* @__PURE__ */ e(Vt, { children: /* @__PURE__ */ a(Dt, { children: [
17348
17348
  /* @__PURE__ */ e(Et, { asChild: !0, children: /* @__PURE__ */ e(
17349
17349
  j,
17350
17350
  {
@@ -17354,9 +17354,9 @@ function px({
17354
17354
  children: ot
17355
17355
  }
17356
17356
  ) }),
17357
- te && Te && /* @__PURE__ */ e(Dt, { side: "right", children: Te })
17357
+ te && Te && /* @__PURE__ */ e(It, { side: "right", children: Te })
17358
17358
  ] }) });
17359
- return /* @__PURE__ */ a(De, { children: [
17359
+ return /* @__PURE__ */ a(Ie, { children: [
17360
17360
  ye("previous_period", "Previous Period"),
17361
17361
  ye(
17362
17362
  "same_period_last_year",
@@ -17409,10 +17409,10 @@ function px({
17409
17409
  te.field.label,
17410
17410
  ":"
17411
17411
  ] }),
17412
- /* @__PURE__ */ e(Vt, { children: /* @__PURE__ */ a(It, { children: [
17412
+ /* @__PURE__ */ e(Vt, { children: /* @__PURE__ */ a(Dt, { children: [
17413
17413
  /* @__PURE__ */ e(Et, { asChild: !0, children: /* @__PURE__ */ e("span", { className: "cursor-help text-muted-foreground", children: Array.isArray(te.value) ? te.value.length === 1 ? String(te.value[0]) : te.value.length <= 2 ? te.value.join(", ") : `${te.value.slice(0, 2).join(", ")} +${te.value.length - 2}` : String(te.value) }) }),
17414
17414
  Array.isArray(te.value) && te.value.length > 1 && /* @__PURE__ */ e(
17415
- Dt,
17415
+ It,
17416
17416
  {
17417
17417
  side: "top",
17418
17418
  className: "max-w-[300px]",
@@ -17484,7 +17484,7 @@ function px({
17484
17484
  )
17485
17485
  ] }),
17486
17486
  /* @__PURE__ */ e(cx, { column: t }),
17487
- i && /* @__PURE__ */ a(De, { children: [
17487
+ i && /* @__PURE__ */ a(Ie, { children: [
17488
17488
  /* @__PURE__ */ e(
17489
17489
  nx,
17490
17490
  {
@@ -17504,7 +17504,7 @@ function px({
17504
17504
  };
17505
17505
  Ke != null && Ke.conditions && Ke.conditions.length > 0;
17506
17506
  const wc = n !== "sortBy";
17507
- return /* @__PURE__ */ a(De, { children: [
17507
+ return /* @__PURE__ */ a(Ie, { children: [
17508
17508
  /* @__PURE__ */ a(Ot, { open: le, onOpenChange: Oe, children: [
17509
17509
  /* @__PURE__ */ a(
17510
17510
  "div",
@@ -17532,19 +17532,19 @@ function px({
17532
17532
  }
17533
17533
  ),
17534
17534
  /* @__PURE__ */ e(
17535
- mo,
17535
+ ho,
17536
17536
  {
17537
17537
  dataType: Bs,
17538
17538
  calculated: !!sa
17539
17539
  }
17540
17540
  ),
17541
17541
  /* @__PURE__ */ e(Qr, { className: "block w-0 min-w-0 flex-1 text-[12px] text-foreground", children: Jl(t) }),
17542
- n === "metrics" && ((_l = Ke == null ? void 0 : Ke.conditions) == null ? void 0 : _l.length) && !le && /* @__PURE__ */ e(Vt, { children: /* @__PURE__ */ a(It, { children: [
17542
+ n === "metrics" && ((_l = Ke == null ? void 0 : Ke.conditions) == null ? void 0 : _l.length) && !le && /* @__PURE__ */ e(Vt, { children: /* @__PURE__ */ a(Dt, { children: [
17543
17543
  /* @__PURE__ */ e(Et, { asChild: !0, children: /* @__PURE__ */ a("div", { className: "flex shrink-0 items-center gap-1 rounded-[3px] bg-primary/10 px-1 text-[10px] tabular-nums text-primary/90", children: [
17544
17544
  /* @__PURE__ */ e(ma, { className: "h-2.5 w-2.5" }),
17545
17545
  /* @__PURE__ */ e("span", { children: Ke.conditions.length })
17546
17546
  ] }) }),
17547
- /* @__PURE__ */ e(Dt, { side: "top", children: /* @__PURE__ */ e("div", { className: "text-xs", children: Ke.conditions.map((G) => /* @__PURE__ */ a("div", { children: [
17547
+ /* @__PURE__ */ e(It, { side: "top", children: /* @__PURE__ */ e("div", { className: "text-xs", children: Ke.conditions.map((G) => /* @__PURE__ */ a("div", { children: [
17548
17548
  G.field.label,
17549
17549
  ":",
17550
17550
  " ",
@@ -17629,7 +17629,7 @@ function px({
17629
17629
  }
17630
17630
  ),
17631
17631
  Ue && n === "metrics" && _a && /* @__PURE__ */ e(
17632
- ho,
17632
+ po,
17633
17633
  {
17634
17634
  open: Ue,
17635
17635
  onOpenChange: _e,
@@ -17650,7 +17650,7 @@ function px({
17650
17650
  nextSortByFields: _t,
17651
17651
  nextStoredFields: Zt,
17652
17652
  nextSharedFields: ia
17653
- } = go({
17653
+ } = xo({
17654
17654
  activeFields: ze,
17655
17655
  sortByFields: ot,
17656
17656
  storedFields: te.calculatedFields || [],
@@ -17686,7 +17686,7 @@ function px({
17686
17686
  nextStoredFields: ia,
17687
17687
  nextSheetFields: Ga,
17688
17688
  nextDashboardFields: Gt
17689
- } = fo({
17689
+ } = go({
17690
17690
  activeFields: ot,
17691
17691
  sortByFields: pt,
17692
17692
  storedFields: te.calculatedFields || [],
@@ -17730,7 +17730,7 @@ function px({
17730
17730
  nextStoredFields: ia,
17731
17731
  nextSharedFields: Ga,
17732
17732
  nextSheetFields: Gt
17733
- } = po({
17733
+ } = fo({
17734
17734
  activeFields: ot,
17735
17735
  sortByFields: pt,
17736
17736
  storedFields: te.calculatedFields || [],
@@ -17833,11 +17833,11 @@ function xx({
17833
17833
  i
17834
17834
  ))
17835
17835
  ] }) }),
17836
- /* @__PURE__ */ e("tbody", { children: Di.map((i, l) => /* @__PURE__ */ a(
17836
+ /* @__PURE__ */ e("tbody", { children: Ii.map((i, l) => /* @__PURE__ */ a(
17837
17837
  "tr",
17838
17838
  {
17839
17839
  className: Y(
17840
- l !== Di.length - 1 && "border-b border-border/60"
17840
+ l !== Ii.length - 1 && "border-b border-border/60"
17841
17841
  ),
17842
17842
  children: [
17843
17843
  /* @__PURE__ */ e(
@@ -17867,7 +17867,7 @@ function xx({
17867
17867
  )) })
17868
17868
  ] }) });
17869
17869
  }
17870
- const Di = [
17870
+ const Ii = [
17871
17871
  { label: "Electronics", values: ["2,300", "1,800", "3,400"] },
17872
17872
  { label: "Clothing", values: ["1,300", "620", "480"] }
17873
17873
  ], bx = {
@@ -17875,7 +17875,7 @@ const Di = [
17875
17875
  pivotBy: qr,
17876
17876
  metrics: Xh,
17877
17877
  detailColumns: Ms,
17878
- sortBy: Io
17878
+ sortBy: Do
17879
17879
  };
17880
17880
  function wn({
17881
17881
  zone: t,
@@ -17981,16 +17981,16 @@ function vx({
17981
17981
  u && ((ee = m == null ? void 0 : m.customCardPreferences) != null && ee.url);
17982
17982
  const g = Nm(p == null ? void 0 : p.slots), C = O(
17983
17983
  (W) => W.actions.updateCardConfig
17984
- ), x = O((W) => W.actions.updateCard), y = O((W) => W.actions.updateFrame), E = Ie((W) => W.isVisualEditing), P = Ie((W) => W.selectedSheetId), v = Ie(
17984
+ ), x = O((W) => W.actions.updateCard), y = O((W) => W.actions.updateFrame), E = De((W) => W.isVisualEditing), P = De((W) => W.selectedSheetId), v = De(
17985
17985
  (W) => W.actions.updateSheetCalculatedFields
17986
- ), N = Ie(
17986
+ ), N = De(
17987
17987
  (W) => W.actions.updateDashboardCalculatedFields
17988
- ), T = Ie(
17988
+ ), T = De(
17989
17989
  (W) => {
17990
17990
  var ue;
17991
17991
  return W.visualEditPendingDashboardCalculatedFields ?? ((ue = W.dashboard) == null ? void 0 : ue.calculatedFields);
17992
17992
  }
17993
- ) ?? yx, { scopedFields: k } = lo(), { userContext: S } = Ir(), I = u && (m == null ? void 0 : m.id) === c.id && g ? g : c == null ? void 0 : c.type, A = I === "detailTable", M = t.length > 0 || s.length > 0 || d.length > 0, V = !A && (I !== "kpi" || s.length <= 2), F = !A, b = !A && I !== "kpi", D = I !== "kpi" && M, L = A, R = "Drop sort fields here", B = (S == null ? void 0 : S.type) === "organization", z = [
17993
+ ) ?? yx, { scopedFields: k } = io(), { userContext: S } = Dr(), D = u && (m == null ? void 0 : m.id) === c.id && g ? g : c == null ? void 0 : c.type, A = D === "detailTable", M = t.length > 0 || s.length > 0 || d.length > 0, V = !A && (D !== "kpi" || s.length <= 2), F = !A, b = !A && D !== "kpi", I = D !== "kpi" && M, L = A, R = "Drop sort fields here", B = (S == null ? void 0 : S.type) === "organization", z = [
17994
17994
  "pie",
17995
17995
  "doughnut",
17996
17996
  "polar",
@@ -17998,20 +17998,20 @@ function vx({
17998
17998
  "aggregateTable",
17999
17999
  "bubble",
18000
18000
  "scatter"
18001
- ].includes(I), _ = b && !z, q = () => I === "kpi" ? {
18001
+ ].includes(D), _ = b && !z, q = () => D === "kpi" ? {
18002
18002
  label: "Trend By",
18003
18003
  placeholder: "Drop trend field here"
18004
18004
  } : {
18005
18005
  label: "Rows",
18006
18006
  placeholder: "Drop dimensions here"
18007
- }, H = () => I === "kpi" ? {
18007
+ }, H = () => D === "kpi" ? {
18008
18008
  label: "Metric",
18009
18009
  placeholder: "Drop metric here"
18010
18010
  } : {
18011
18011
  label: "Metrics",
18012
18012
  placeholder: "Drop metrics here"
18013
18013
  };
18014
- return /* @__PURE__ */ a(De, { children: [
18014
+ return /* @__PURE__ */ a(Ie, { children: [
18015
18015
  /* @__PURE__ */ a("div", { className: "sticky top-0 z-10 flex items-center justify-between bg-background px-4 py-2", children: [
18016
18016
  /* @__PURE__ */ e("span", { className: "text-[11px] font-semibold uppercase tracking-[0.08em] text-foreground/70", children: "Fields" }),
18017
18017
  M && /* @__PURE__ */ e(
@@ -18087,7 +18087,7 @@ function vx({
18087
18087
  ]
18088
18088
  }
18089
18089
  ),
18090
- D && /* @__PURE__ */ e(
18090
+ I && /* @__PURE__ */ e(
18091
18091
  wn,
18092
18092
  {
18093
18093
  zone: "sortBy",
@@ -18099,7 +18099,7 @@ function vx({
18099
18099
  )
18100
18100
  ] }),
18101
18101
  /* @__PURE__ */ e(
18102
- ho,
18102
+ po,
18103
18103
  {
18104
18104
  open: l,
18105
18105
  onOpenChange: o,
@@ -18108,7 +18108,7 @@ function vx({
18108
18108
  allowedFieldTypes: ["metric"],
18109
18109
  onSave: (W) => {
18110
18110
  if (W.role !== "metric") return;
18111
- const { nextStoredFields: ue } = go({
18111
+ const { nextStoredFields: ue } = xo({
18112
18112
  activeFields: s,
18113
18113
  storedFields: c.calculatedFields || [],
18114
18114
  sharedFields: h.calculatedFields || [],
@@ -18121,7 +18121,7 @@ function vx({
18121
18121
  },
18122
18122
  onSaveToSheet: (W) => {
18123
18123
  if (W.role !== "metric") return;
18124
- const ue = h.calculatedFields || [], { nextSheetFields: ve } = fo({
18124
+ const ue = h.calculatedFields || [], { nextSheetFields: ve } = go({
18125
18125
  activeFields: s,
18126
18126
  storedFields: c.calculatedFields || [],
18127
18127
  sheetFields: ue,
@@ -18139,7 +18139,7 @@ function vx({
18139
18139
  },
18140
18140
  onSaveToDashboard: (W) => {
18141
18141
  if (W.role !== "metric") return;
18142
- const { nextSharedFields: ue } = po({
18142
+ const { nextSharedFields: ue } = fo({
18143
18143
  activeFields: s,
18144
18144
  storedFields: c.calculatedFields || [],
18145
18145
  sharedFields: T,
@@ -18170,7 +18170,7 @@ function Nx() {
18170
18170
  var w;
18171
18171
  return N.name === ((w = h == null ? void 0 : h.customCardPreferences) == null ? void 0 : w.componentName);
18172
18172
  }
18173
- ), u = ya(h, f) === "multiple" && !!((v = h == null ? void 0 : h.customCardPreferences) != null && v.url), g = !l || u, C = l || u, x = n ? "KPI Settings" : "Chart Settings", y = g && !wo(t);
18173
+ ), u = ya(h, f) === "multiple" && !!((v = h == null ? void 0 : h.customCardPreferences) != null && v.url), g = !l || u, C = l || u, x = n ? "KPI Settings" : "Chart Settings", y = g && !So(t);
18174
18174
  return Se(() => {
18175
18175
  n && r(!0);
18176
18176
  }, [n]), !y && !C ? null : /* @__PURE__ */ a("div", { className: "shrink-0 border-t border-border bg-background", children: [
@@ -18261,7 +18261,7 @@ function Cx({ onEditJoins: t }) {
18261
18261
  id: m,
18262
18262
  operator: h.operator,
18263
18263
  condition: i(h.keys)
18264
- })), o = /* @__PURE__ */ e(Vt, { children: /* @__PURE__ */ a(It, { children: [
18264
+ })), o = /* @__PURE__ */ e(Vt, { children: /* @__PURE__ */ a(Dt, { children: [
18265
18265
  /* @__PURE__ */ e(Et, { asChild: !0, children: /* @__PURE__ */ e(
18266
18266
  "button",
18267
18267
  {
@@ -18272,7 +18272,7 @@ function Cx({ onEditJoins: t }) {
18272
18272
  }
18273
18273
  ) }),
18274
18274
  /* @__PURE__ */ e(
18275
- Dt,
18275
+ It,
18276
18276
  {
18277
18277
  side: "bottom",
18278
18278
  align: "start",
@@ -18338,7 +18338,7 @@ function Cx({ onEditJoins: t }) {
18338
18338
  onClick: t,
18339
18339
  className: "inline-flex h-5 w-5 shrink-0 items-center justify-center rounded-control text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus:outline-none focus-visible:border-ring",
18340
18340
  "aria-label": "Edit resolved joins",
18341
- children: /* @__PURE__ */ e(io, { className: "h-3 w-3", strokeWidth: 1.75 })
18341
+ children: /* @__PURE__ */ e(oo, { className: "h-3 w-3", strokeWidth: 1.75 })
18342
18342
  }
18343
18343
  )
18344
18344
  ] });
@@ -18471,7 +18471,7 @@ function Sx({
18471
18471
  }
18472
18472
  );
18473
18473
  O((v) => v.card.dataSource);
18474
- const { filterableFields: d, isLoading: i } = Is(), l = n || d || [], o = {
18474
+ const { filterableFields: d, isLoading: i } = Ds(), l = n || d || [], o = {
18475
18475
  id: "default",
18476
18476
  qualifiedFieldName: "default",
18477
18477
  name: "default",
@@ -18559,10 +18559,10 @@ function Sx({
18559
18559
  );
18560
18560
  const k = (S) => S.id === v ? {
18561
18561
  ...S,
18562
- conditions: S.conditions.map((I) => I.id === N ? {
18563
- ...I,
18562
+ conditions: S.conditions.map((D) => D.id === N ? {
18563
+ ...D,
18564
18564
  [w]: T
18565
- } : I)
18565
+ } : D)
18566
18566
  } : {
18567
18567
  ...S,
18568
18568
  groups: S.groups.map(k)
@@ -18620,46 +18620,46 @@ function Sx({
18620
18620
  let k = "";
18621
18621
  typeof T.field == "object" ? k = T.field.entityName ? `${T.field.entityName}.${T.field.name}` : T.field.name : k = String(T.field);
18622
18622
  const S = T.operator;
18623
- let I = T.value;
18623
+ let D = T.value;
18624
18624
  if (T.field.dataType === "string" && !["in", "not in"].includes(T.operator))
18625
- typeof I == "string" ? I = `'${I}'` : Array.isArray(I) && (I = `'${I.join(", ")}'`);
18625
+ typeof D == "string" ? D = `'${D}'` : Array.isArray(D) && (D = `'${D.join(", ")}'`);
18626
18626
  else if (T.field.dataType === "date" || T.field.dataType === "datetime" || T.field.dataType === "timestamp")
18627
- if (T.operator === "between" && Array.isArray(I) && I.length === 2) {
18628
- const A = I[0] ? `'${I[0]}'` : "NULL", M = I[1] ? `'${I[1]}'` : "NULL";
18627
+ if (T.operator === "between" && Array.isArray(D) && D.length === 2) {
18628
+ const A = D[0] ? `'${D[0]}'` : "NULL", M = D[1] ? `'${D[1]}'` : "NULL";
18629
18629
  return `${k} BETWEEN ${A} AND ${M}`;
18630
- } else if ((T.operator === "in" || T.operator === "not in") && Array.isArray(I)) {
18631
- const A = I.map((M) => M ? `'${M}'` : "NULL").join(", ");
18630
+ } else if ((T.operator === "in" || T.operator === "not in") && Array.isArray(D)) {
18631
+ const A = D.map((M) => M ? `'${M}'` : "NULL").join(", ");
18632
18632
  return `${k} ${S} (${A})`;
18633
- } else typeof I == "string" || I instanceof Date ? I = `'${I}'` : Array.isArray(I) && I.length > 0 && (I = `'${I[0]}'`);
18633
+ } else typeof D == "string" || D instanceof Date ? D = `'${D}'` : Array.isArray(D) && D.length > 0 && (D = `'${D[0]}'`);
18634
18634
  else if (["in", "not in"].includes(T.operator)) {
18635
18635
  let A = [];
18636
- Array.isArray(I) ? A = I.map(
18636
+ Array.isArray(D) ? A = D.map(
18637
18637
  (M) => typeof M == "string" ? `'${M}'` : String(M)
18638
- ) : typeof I == "string" ? A = I.split(",").map((M) => {
18638
+ ) : typeof D == "string" ? A = D.split(",").map((M) => {
18639
18639
  const V = M.trim();
18640
18640
  return T.field.dataType === "string" ? `'${V}'` : V;
18641
- }) : typeof I == "number" && (A = [String(I)]), I = `(${A.join(", ")})`;
18641
+ }) : typeof D == "number" && (A = [String(D)]), D = `(${A.join(", ")})`;
18642
18642
  }
18643
18643
  switch (S) {
18644
18644
  case "contains":
18645
- return typeof I == "string" ? `${k} LIKE '%${I.replace(/'/g, "")}'` : `${k} LIKE '%${String(I)}'`;
18645
+ return typeof D == "string" ? `${k} LIKE '%${D.replace(/'/g, "")}'` : `${k} LIKE '%${String(D)}'`;
18646
18646
  case "startsWith":
18647
- return typeof I == "string" ? `${k} LIKE '${I.replace(/'/g, "")}%'` : `${k} LIKE '${String(I)}%'`;
18647
+ return typeof D == "string" ? `${k} LIKE '${D.replace(/'/g, "")}%'` : `${k} LIKE '${String(D)}%'`;
18648
18648
  case "endsWith":
18649
- return typeof I == "string" ? `${k} LIKE '%${I.replace(/'/g, "")}'` : `${k} LIKE '%${String(I)}'`;
18649
+ return typeof D == "string" ? `${k} LIKE '%${D.replace(/'/g, "")}'` : `${k} LIKE '%${String(D)}'`;
18650
18650
  case "isNull":
18651
18651
  return `${k} IS NULL`;
18652
18652
  case "isNotNull":
18653
18653
  return `${k} IS NOT NULL`;
18654
18654
  default:
18655
- return `${k} ${S} ${I}`;
18655
+ return `${k} ${S} ${D}`;
18656
18656
  }
18657
18657
  }, w = (T) => {
18658
18658
  const k = T.conditions.map(N), S = T.groups.map(
18659
18659
  (V) => w(V)
18660
- ), I = [...k, ...S].filter(Boolean);
18661
- if (I.length === 0) return "";
18662
- const A = I.join(` ${T.logicalOperator} `), M = I.length > 1 ? `(${A})` : A;
18660
+ ), D = [...k, ...S].filter(Boolean);
18661
+ if (D.length === 0) return "";
18662
+ const A = D.join(` ${T.logicalOperator} `), M = D.length > 1 ? `(${A})` : A;
18663
18663
  return T.negate ? `NOT ${M}` : M;
18664
18664
  };
18665
18665
  return w(v);
@@ -18688,7 +18688,7 @@ function Tx({
18688
18688
  className: n,
18689
18689
  delayDuration: s
18690
18690
  }) {
18691
- return /* @__PURE__ */ e(Vt, { children: /* @__PURE__ */ a(It, { delayDuration: s, children: [
18691
+ return /* @__PURE__ */ e(Vt, { children: /* @__PURE__ */ a(Dt, { delayDuration: s, children: [
18692
18692
  /* @__PURE__ */ e(Et, { asChild: !0, children: /* @__PURE__ */ e(
18693
18693
  "div",
18694
18694
  {
@@ -18699,7 +18699,7 @@ function Tx({
18699
18699
  children: t
18700
18700
  }
18701
18701
  ) }),
18702
- /* @__PURE__ */ e(Dt, { children: t })
18702
+ /* @__PURE__ */ e(It, { children: t })
18703
18703
  ] }) });
18704
18704
  }
18705
18705
  const kx = (t) => {
@@ -18709,7 +18709,7 @@ const kx = (t) => {
18709
18709
  }
18710
18710
  return "default";
18711
18711
  };
18712
- function Dx({
18712
+ function Ix({
18713
18713
  value: t,
18714
18714
  onValueChange: n,
18715
18715
  availableFields: s,
@@ -18741,7 +18741,7 @@ function Dx({
18741
18741
  ".",
18742
18742
  t.name
18743
18743
  ] }) }) : r,
18744
- /* @__PURE__ */ e(Do, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
18744
+ /* @__PURE__ */ e(zi, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
18745
18745
  ]
18746
18746
  }
18747
18747
  ) }),
@@ -18752,7 +18752,7 @@ function Dx({
18752
18752
  Vn,
18753
18753
  {
18754
18754
  heading: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
18755
- /* @__PURE__ */ e(In, { className: "h-3 w-3" }),
18755
+ /* @__PURE__ */ e(Dn, { className: "h-3 w-3" }),
18756
18756
  c
18757
18757
  ] }),
18758
18758
  children: Object.entries(h).map(([m, f]) => /* @__PURE__ */ a("div", { children: [
@@ -18816,7 +18816,7 @@ function Yr(t) {
18816
18816
  groupByColumns: [l],
18817
18817
  metricColumns: [o],
18818
18818
  sortByColumns: [c]
18819
- }, m = ((C = n.dataSource) == null ? void 0 : C.connectionId) || n.connectionId, { data: f, isPending: p, error: u } = oo({
18819
+ }, m = ((C = n.dataSource) == null ? void 0 : C.connectionId) || n.connectionId, { data: f, isPending: p, error: u } = co({
18820
18820
  queryKey: [
18821
18821
  "filterValues",
18822
18822
  t.entityId,
@@ -18850,7 +18850,7 @@ function Yr(t) {
18850
18850
  })
18851
18851
  ), isPending: p, error: u };
18852
18852
  }
18853
- function Ix({
18853
+ function Dx({
18854
18854
  field: t,
18855
18855
  selected: n,
18856
18856
  onChange: s,
@@ -18973,7 +18973,7 @@ function Ax({
18973
18973
  const y = new Date(x);
18974
18974
  if (!isNaN(y.getTime()))
18975
18975
  return y;
18976
- }, [t, o]), m = (x) => n === "<=" || n === ">" ? Ih(x, l) : Eh(x, l);
18976
+ }, [t, o]), m = (x) => n === "<=" || n === ">" ? Dh(x, l) : Eh(x, l);
18977
18977
  return /* @__PURE__ */ e(
18978
18978
  wm,
18979
18979
  {
@@ -19073,7 +19073,7 @@ const Jr = [
19073
19073
  isNotNull: "Is Not Null",
19074
19074
  "not between": "Not Between"
19075
19075
  };
19076
- function Ii(t) {
19076
+ function Di(t) {
19077
19077
  return Px[t] || Pt(t);
19078
19078
  }
19079
19079
  function Vx(t) {
@@ -19108,7 +19108,7 @@ function ac({
19108
19108
  transform: p,
19109
19109
  transition: u,
19110
19110
  isDragging: g
19111
- } = Ds({ id: t.id }), { isPending: C, error: x } = Yr(
19111
+ } = Is({ id: t.id }), { isPending: C, error: x } = Yr(
19112
19112
  t.field
19113
19113
  ), y = {
19114
19114
  transform: Es.Transform.toString(p),
@@ -19146,7 +19146,7 @@ function ac({
19146
19146
  ),
19147
19147
  n === 0 && /* @__PURE__ */ e("div", { className: "w-24" }),
19148
19148
  /* @__PURE__ */ e(
19149
- Dx,
19149
+ Ix,
19150
19150
  {
19151
19151
  value: t.field,
19152
19152
  onValueChange: (E) => {
@@ -19183,9 +19183,9 @@ function ac({
19183
19183
  });
19184
19184
  },
19185
19185
  children: [
19186
- /* @__PURE__ */ e(ne, { className: "w-32", children: /* @__PURE__ */ e(se, { children: t.operator ? Ii(t.operator) : "" }) }),
19186
+ /* @__PURE__ */ e(ne, { className: "w-32", children: /* @__PURE__ */ e(se, { children: t.operator ? Di(t.operator) : "" }) }),
19187
19187
  /* @__PURE__ */ e(re, { children: Vx(nt(t.field.dataType)).map(
19188
- (E) => /* @__PURE__ */ e(j, { className: "hover:bg-muted", value: E, children: Ii(E) }, E)
19188
+ (E) => /* @__PURE__ */ e(j, { className: "hover:bg-muted", value: E, children: Di(E) }, E)
19189
19189
  ) })
19190
19190
  ]
19191
19191
  }
@@ -19194,7 +19194,7 @@ function ac({
19194
19194
  /* @__PURE__ */ e(ga, { className: "mr-2 size-3.5 animate-spin" }),
19195
19195
  " Loading values..."
19196
19196
  ] }) : x ? /* @__PURE__ */ e("div", { className: "flex-1 p-2 text-xs text-red-500", children: "Error loading values" }) : /* @__PURE__ */ e(
19197
- Ix,
19197
+ Dx,
19198
19198
  {
19199
19199
  field: t.field,
19200
19200
  selected: Array.isArray(t.value) && t.value.every((E) => typeof E == "string") ? t.value : [],
@@ -19300,23 +19300,23 @@ function Bx({
19300
19300
  transform: P,
19301
19301
  transition: v,
19302
19302
  isDragging: N
19303
- } = Ds({ id: t.id }), w = {
19303
+ } = Is({ id: t.id }), w = {
19304
19304
  transform: Es.Transform.toString(P),
19305
19305
  transition: v
19306
19306
  }, T = (S) => {
19307
- const { active: I, over: A } = S;
19308
- if (A && I.id !== A.id) {
19307
+ const { active: D, over: A } = S;
19308
+ if (A && D.id !== A.id) {
19309
19309
  const M = t.conditions.findIndex(
19310
- (F) => F.id === I.id
19310
+ (F) => F.id === D.id
19311
19311
  ), V = t.conditions.findIndex(
19312
19312
  (F) => F.id === A.id
19313
19313
  );
19314
19314
  M !== -1 && V !== -1 && h(t.id, M, V);
19315
19315
  }
19316
19316
  }, k = (S) => {
19317
- const { active: I, over: A } = S;
19318
- if (A && I.id !== A.id && s) {
19319
- const M = t.groups.findIndex((F) => F.id === I.id), V = t.groups.findIndex((F) => F.id === A.id);
19317
+ const { active: D, over: A } = S;
19318
+ if (A && D.id !== A.id && s) {
19319
+ const M = t.groups.findIndex((F) => F.id === D.id), V = t.groups.findIndex((F) => F.id === A.id);
19320
19320
  M !== -1 && V !== -1 && m(s, M, V);
19321
19321
  }
19322
19322
  };
@@ -19392,11 +19392,11 @@ function Bx({
19392
19392
  {
19393
19393
  items: t.conditions.map((S) => S.id),
19394
19394
  strategy: Xa,
19395
- children: t.conditions.map((S, I) => /* @__PURE__ */ e(
19395
+ children: t.conditions.map((S, D) => /* @__PURE__ */ e(
19396
19396
  ac,
19397
19397
  {
19398
19398
  condition: S,
19399
- index: I,
19399
+ index: D,
19400
19400
  groupId: t.id,
19401
19401
  groupLogicalOperator: t.logicalOperator,
19402
19402
  onUpdateCondition: l,
@@ -19503,11 +19503,11 @@ function _x({
19503
19503
  ), [w, T] = K(!1), k = (A, M, V) => {
19504
19504
  const F = (b) => b.id === A ? {
19505
19505
  ...b,
19506
- conditions: b.conditions.map((D) => D.id === M ? {
19507
- ...D,
19506
+ conditions: b.conditions.map((I) => I.id === M ? {
19507
+ ...I,
19508
19508
  field: V,
19509
19509
  dataType: V.dataType
19510
- } : D)
19510
+ } : I)
19511
19511
  } : {
19512
19512
  ...b,
19513
19513
  groups: b.groups.map(F)
@@ -19520,12 +19520,12 @@ function _x({
19520
19520
  sensors: N,
19521
19521
  collisionDetection: La,
19522
19522
  onDragEnd: (F) => {
19523
- const { active: b, over: D } = F;
19524
- if (D && b.id !== D.id) {
19523
+ const { active: b, over: I } = F;
19524
+ if (I && b.id !== I.id) {
19525
19525
  const L = A.conditions.findIndex(
19526
19526
  (B) => B.id === b.id
19527
19527
  ), R = A.conditions.findIndex(
19528
- (B) => B.id === D.id
19528
+ (B) => B.id === I.id
19529
19529
  );
19530
19530
  L !== -1 && R !== -1 && x(A.id, L, R);
19531
19531
  }
@@ -19561,12 +19561,12 @@ function _x({
19561
19561
  sensors: N,
19562
19562
  collisionDetection: La,
19563
19563
  onDragEnd: (F) => {
19564
- const { active: b, over: D } = F;
19565
- if (D && b.id !== D.id) {
19564
+ const { active: b, over: I } = F;
19565
+ if (I && b.id !== I.id) {
19566
19566
  const L = A.groups.findIndex(
19567
19567
  (B) => B.id === b.id
19568
19568
  ), R = A.groups.findIndex(
19569
- (B) => B.id === D.id
19569
+ (B) => B.id === I.id
19570
19570
  );
19571
19571
  L !== -1 && R !== -1 && y(A.id, L, R);
19572
19572
  }
@@ -19632,9 +19632,9 @@ function _x({
19632
19632
  updateConditionFields: u
19633
19633
  },
19634
19634
  A.id
19635
- ), I = xo(t);
19635
+ ), D = bo(t);
19636
19636
  return /* @__PURE__ */ a("div", { className: "space-y-4", children: [
19637
- /* @__PURE__ */ e(ji, { children: /* @__PURE__ */ e(Ki, { className: "p-4", children: /* @__PURE__ */ a("div", { className: "space-y-4", children: [
19637
+ /* @__PURE__ */ e(Ki, { children: /* @__PURE__ */ e(Ui, { className: "p-4", children: /* @__PURE__ */ a("div", { className: "space-y-4", children: [
19638
19638
  o ? /* @__PURE__ */ a("div", { className: "flex items-center justify-center p-4", children: [
19639
19639
  /* @__PURE__ */ e("div", { className: "h-5 w-5 animate-spin rounded-full border-2 border-gray-300 border-t-gray-600" }),
19640
19640
  /* @__PURE__ */ e("span", { className: "ml-2 text-sm text-gray-600", children: "Loading columns..." })
@@ -19665,7 +19665,7 @@ function _x({
19665
19665
  ] }) }) }),
19666
19666
  /* @__PURE__ */ a("div", { className: "flex justify-end gap-2", children: [
19667
19667
  /* @__PURE__ */ e(Z, { size: "sm", variant: "outline", onClick: d, children: "Cancel" }),
19668
- I > 0 && /* @__PURE__ */ e(Z, { variant: "outline", size: "sm", onClick: r, children: "Clear All" }),
19668
+ D > 0 && /* @__PURE__ */ e(Z, { variant: "outline", size: "sm", onClick: r, children: "Clear All" }),
19669
19669
  /* @__PURE__ */ e(
19670
19670
  Z,
19671
19671
  {
@@ -19753,8 +19753,8 @@ function $x({
19753
19753
  i(null);
19754
19754
  return;
19755
19755
  }
19756
- const T = N.id, k = w.id, S = g(T), I = g(k) || k;
19757
- if (I === "sortBy") {
19756
+ const T = N.id, k = w.id, S = g(T), D = g(k) || k;
19757
+ if (D === "sortBy") {
19758
19758
  if (S === "source") {
19759
19759
  const M = n.find((F) => F.id === T);
19760
19760
  if (!M) {
@@ -19779,8 +19779,8 @@ function $x({
19779
19779
  return;
19780
19780
  }
19781
19781
  }
19782
- if (S === "source" && I === "sortBy") {
19783
- const M = [...n].find((D) => D.id === T);
19782
+ if (S === "source" && D === "sortBy") {
19783
+ const M = [...n].find((I) => I.id === T);
19784
19784
  if (!M) {
19785
19785
  i(null);
19786
19786
  return;
@@ -19811,7 +19811,7 @@ function $x({
19811
19811
  i(null), r("sortBy", [...V, b]);
19812
19812
  return;
19813
19813
  }
19814
- if (S === "source" && I !== "source" && I !== "sortBy") {
19814
+ if (S === "source" && D !== "source" && D !== "sortBy") {
19815
19815
  const M = [...n].find((B) => B.id === T);
19816
19816
  if (!M) {
19817
19817
  i(null);
@@ -19859,19 +19859,19 @@ function $x({
19859
19859
  }
19860
19860
  }
19861
19861
  }
19862
- const b = s(I);
19862
+ const b = s(D);
19863
19863
  if (Ks(M, b)) {
19864
19864
  i(null);
19865
19865
  return;
19866
19866
  }
19867
- const D = us(
19867
+ const I = us(
19868
19868
  M,
19869
- I,
19869
+ D,
19870
19870
  l.type
19871
19871
  );
19872
- if (!D.isValid) {
19872
+ if (!I.isValid) {
19873
19873
  Ze.error("Invalid Field Type", {
19874
- description: D.reason,
19874
+ description: I.reason,
19875
19875
  position: "top-center",
19876
19876
  duration: 3e3
19877
19877
  }), i(null);
@@ -19879,10 +19879,10 @@ function $x({
19879
19879
  }
19880
19880
  const L = Us(
19881
19881
  M,
19882
- I,
19882
+ D,
19883
19883
  b
19884
19884
  ), R = [...b, L];
19885
- if (i(null), r(I, R), I === "metrics" && t) {
19885
+ if (i(null), r(D, R), D === "metrics" && t) {
19886
19886
  const B = Zl(
19887
19887
  l,
19888
19888
  L,
@@ -19899,15 +19899,15 @@ function $x({
19899
19899
  }
19900
19900
  return;
19901
19901
  }
19902
- if (S && I && S !== "source" && I !== "source" && S !== I) {
19903
- const M = s(S), V = s(I), F = M.find((B) => B.id === T);
19902
+ if (S && D && S !== "source" && D !== "source" && S !== D) {
19903
+ const M = s(S), V = s(D), F = M.find((B) => B.id === T);
19904
19904
  if (!F) {
19905
19905
  i(null);
19906
19906
  return;
19907
19907
  }
19908
19908
  const b = us(
19909
19909
  F,
19910
- I,
19910
+ D,
19911
19911
  l.type
19912
19912
  );
19913
19913
  if (!b.isValid) {
@@ -19918,22 +19918,22 @@ function $x({
19918
19918
  }), i(null);
19919
19919
  return;
19920
19920
  }
19921
- const D = Us(
19921
+ const I = Us(
19922
19922
  F,
19923
- I,
19923
+ D,
19924
19924
  V
19925
19925
  );
19926
- if (i(null), I === "sortBy") {
19927
- Ks(F, V) || r(I, [...V, D]);
19926
+ if (i(null), D === "sortBy") {
19927
+ Ks(F, V) || r(D, [...V, I]);
19928
19928
  return;
19929
19929
  }
19930
19930
  const L = M.filter(
19931
19931
  (B) => B.id !== T
19932
- ), R = [...V, D];
19933
- if (r(S, L), r(I, R), I === "metrics" && t) {
19932
+ ), R = [...V, I];
19933
+ if (r(S, L), r(D, R), D === "metrics" && t) {
19934
19934
  const B = Zl(
19935
19935
  l,
19936
- D,
19936
+ I,
19937
19937
  l.preferences
19938
19938
  );
19939
19939
  B && c(B), ei(
@@ -19947,7 +19947,7 @@ function $x({
19947
19947
  }
19948
19948
  return;
19949
19949
  }
19950
- if (S && I && S === I && S !== "source") {
19950
+ if (S && D && S === D && S !== "source") {
19951
19951
  const M = s(S), V = M.findIndex((b) => b.id === T), F = M.findIndex((b) => b.id === k);
19952
19952
  if (V !== F) {
19953
19953
  const b = xs(M, V, F);
@@ -20072,13 +20072,13 @@ function Ux({
20072
20072
  onDynamicInspectorOpenChange: m
20073
20073
  }) {
20074
20074
  const f = de(() => (n == null ? void 0 : n.records) || [], [n == null ? void 0 : n.records]), p = on(t) === "dynamic", u = /* @__PURE__ */ e(
20075
- Da,
20075
+ Ia,
20076
20076
  {
20077
20077
  alwaysRenderOverride: !0,
20078
20078
  renderCardOverride: () => /* @__PURE__ */ e(
20079
20079
  Go,
20080
20080
  {
20081
- fallbackPreview: /* @__PURE__ */ e(Da, {}),
20081
+ fallbackPreview: /* @__PURE__ */ e(Ia, {}),
20082
20082
  records: f,
20083
20083
  title: t.title,
20084
20084
  isInspectorOpen: h,
@@ -20124,7 +20124,7 @@ function Ux({
20124
20124
  ] })
20125
20125
  }
20126
20126
  )
20127
- ] }) : u : !c || ["table", "pivotTable", "aggregateTable", "detailTable"].includes(t.type) ? /* @__PURE__ */ e(Da, {}) : /* @__PURE__ */ a(na, { direction: "vertical", className: "h-full min-h-0 w-full", children: [
20127
+ ] }) : u : !c || ["table", "pivotTable", "aggregateTable", "detailTable"].includes(t.type) ? /* @__PURE__ */ e(Ia, {}) : /* @__PURE__ */ a(na, { direction: "vertical", className: "h-full min-h-0 w-full", children: [
20128
20128
  /* @__PURE__ */ e(
20129
20129
  ft,
20130
20130
  {
@@ -20132,7 +20132,7 @@ function Ux({
20132
20132
  minSize: 30,
20133
20133
  role: "chart-section",
20134
20134
  className: "flex flex-col pb-3",
20135
- children: /* @__PURE__ */ e(Da, {})
20135
+ children: /* @__PURE__ */ e(Ia, {})
20136
20136
  }
20137
20137
  ),
20138
20138
  /* @__PURE__ */ e(pa, { withHandle: !0 }),
@@ -20181,8 +20181,8 @@ function Qx({
20181
20181
  effectiveCardType: n = t.type,
20182
20182
  queryResultColumns: s
20183
20183
  }) {
20184
- return $r(n) ? /* @__PURE__ */ a(Dm, { modal: !1, children: [
20185
- /* @__PURE__ */ e(Im, { asChild: !0, children: /* @__PURE__ */ a(
20184
+ return $r(n) ? /* @__PURE__ */ a(Im, { modal: !1, children: [
20185
+ /* @__PURE__ */ e(Dm, { asChild: !0, children: /* @__PURE__ */ a(
20186
20186
  gt,
20187
20187
  {
20188
20188
  tooltip: "Table settings",
@@ -20227,9 +20227,9 @@ function Yx({
20227
20227
  className: t,
20228
20228
  visible: n
20229
20229
  }) {
20230
- const s = Ie((o) => o.selectedFrameId), r = Mm((o) => o.selectedVisual), d = O((o) => o.frame), l = !!!(d != null && d.visualId || r != null && r.id) && !!s;
20230
+ const s = De((o) => o.selectedFrameId), r = Mm((o) => o.selectedVisual), d = O((o) => o.frame), l = !!!(d != null && d.visualId || r != null && r.id) && !!s;
20231
20231
  return !n || l ? null : /* @__PURE__ */ e("div", { className: Y("flex", t), children: /* @__PURE__ */ e(
20232
- ko,
20232
+ Io,
20233
20233
  {
20234
20234
  showLabel: !0,
20235
20235
  className: "h-6 w-fit px-2 py-0.5 text-[11px]"
@@ -20254,16 +20254,16 @@ function Jx({
20254
20254
  (ge) => ge.inlineFilterValuesMap[(r == null ? void 0 : r.id) || ""]
20255
20255
  ), c = O(
20256
20256
  (ge) => ge.actions.removeCardInlineFilterValue
20257
- ), h = Ie((ge) => ge.filterValues), m = Ie((ge) => ge.selectedSheetId), { updateCardConfig: f, setCard: p, updateCardInFrame: u, setShowAIDialog: g } = Ne(), C = O((ge) => ge.showAIDialog), x = O((ge) => ge.isDevMode), y = Ie((ge) => ge.isVisualEditing), [E, P] = K(!1), [v, N] = K(!1), [w, T] = K(!1), [k, S] = K(
20257
+ ), h = De((ge) => ge.filterValues), m = De((ge) => ge.selectedSheetId), { updateCardConfig: f, setCard: p, updateCardInFrame: u, setShowAIDialog: g } = Ne(), C = O((ge) => ge.showAIDialog), x = O((ge) => ge.isDevMode), y = De((ge) => ge.isVisualEditing), [E, P] = K(!1), [v, N] = K(!1), [w, T] = K(!1), [k, S] = K(
20258
20258
  null
20259
- ), { config: I } = wr(Er).tokenProps, A = (I == null ? void 0 : I.showInfoTab) !== !1, M = (I == null ? void 0 : I.showQueryDebugTools) !== !1, [V, F] = Wx();
20259
+ ), { config: D } = wr(Er).tokenProps, A = (D == null ? void 0 : D.showInfoTab) !== !1, M = (D == null ? void 0 : D.showQueryDebugTools) !== !1, [V, F] = Wx();
20260
20260
  O(
20261
20261
  (ge) => {
20262
20262
  var Ue;
20263
20263
  return !!((Ue = ge.card.customCardPreferences) != null && Ue.url);
20264
20264
  }
20265
20265
  );
20266
- const D = on(i) === "dynamic", L = (l == null ? void 0 : l.type) === "documentSection", R = xt(), {
20266
+ const I = on(i) === "dynamic", L = (l == null ? void 0 : l.type) === "documentSection", R = xt(), {
20267
20267
  data: B,
20268
20268
  errorMessage: z,
20269
20269
  isLoading: _,
@@ -20322,7 +20322,7 @@ function Jx({
20322
20322
  children: /* @__PURE__ */ a("div", { className: "group/visualization relative flex h-full max-w-full grow flex-col", children: [
20323
20323
  /* @__PURE__ */ a("div", { className: "flex h-11 items-center gap-3 border-b border-border px-4", children: [
20324
20324
  /* @__PURE__ */ a("div", { className: "flex items-center gap-3", children: [
20325
- t === "chart" && C && !L && !D && /* @__PURE__ */ e("div", { className: "w-[200px]", children: /* @__PURE__ */ e(
20325
+ t === "chart" && C && !L && !I && /* @__PURE__ */ e("div", { className: "w-[200px]", children: /* @__PURE__ */ e(
20326
20326
  nf,
20327
20327
  {
20328
20328
  variant: x ? "secondary" : "ghost"
@@ -20353,7 +20353,7 @@ function Jx({
20353
20353
  variant: "compact"
20354
20354
  }
20355
20355
  ),
20356
- C && /* @__PURE__ */ e(To, {})
20356
+ C && /* @__PURE__ */ e(ko, {})
20357
20357
  ] }),
20358
20358
  /* @__PURE__ */ a("div", { className: "flex grow items-center justify-end gap-1", children: [
20359
20359
  /* @__PURE__ */ e(
@@ -20361,7 +20361,7 @@ function Jx({
20361
20361
  {
20362
20362
  cardId: r.id,
20363
20363
  cardFilters: (at = r.config) == null ? void 0 : at.filters,
20364
- cardFilterCount: xo(
20364
+ cardFilterCount: bo(
20365
20365
  ((dt = r.config) == null ? void 0 : dt.filters) || null
20366
20366
  ),
20367
20367
  onFiltersClick: s,
@@ -20399,7 +20399,7 @@ function Jx({
20399
20399
  queryResultColumns: he
20400
20400
  }
20401
20401
  ),
20402
- t === "chart" && !D && /* @__PURE__ */ e(
20402
+ t === "chart" && !I && /* @__PURE__ */ e(
20403
20403
  Uo,
20404
20404
  {
20405
20405
  showInlineFilters: !1,
@@ -20513,7 +20513,7 @@ function Jx({
20513
20513
  } : void 0,
20514
20514
  onSendFeedback: () => {
20515
20515
  const ge = Lm(
20516
- $i.QUERY_GENERATION,
20516
+ qi.QUERY_GENERATION,
20517
20517
  {
20518
20518
  cardConfig: i.config,
20519
20519
  dataSource: r.dataSource,
@@ -20552,7 +20552,7 @@ function Jx({
20552
20552
  ) }) })
20553
20553
  ] }),
20554
20554
  k && /* @__PURE__ */ e(
20555
- Hi,
20555
+ Wi,
20556
20556
  {
20557
20557
  open: v,
20558
20558
  onOpenChange: N,
@@ -20568,13 +20568,13 @@ function Xx({ activeField: t }) {
20568
20568
  if (Se(() => {
20569
20569
  t && s(!0);
20570
20570
  }, [t]), !t) return null;
20571
- const r = !!uo(t);
20571
+ const r = !!mo(t);
20572
20572
  return /* @__PURE__ */ a(
20573
20573
  "div",
20574
20574
  {
20575
20575
  className: `flex h-7 max-w-[300px] items-center gap-2 rounded-[5px] border border-border bg-popover px-3 text-[13px] text-foreground/90 shadow-[0_4px_12px_rgba(0,0,0,0.08)] transition-all duration-150 ${n ? "scale-100 opacity-100" : "scale-95 opacity-0"}`,
20576
20576
  children: [
20577
- /* @__PURE__ */ e(mo, { dataType: t.dataType, calculated: r }),
20577
+ /* @__PURE__ */ e(ho, { dataType: t.dataType, calculated: r }),
20578
20578
  /* @__PURE__ */ e("span", { className: "overflow-hidden text-ellipsis whitespace-nowrap", children: t.label || t.name })
20579
20579
  ]
20580
20580
  }
@@ -20633,7 +20633,7 @@ function eb({ column: t, isSelected: n, onSelect: s, availableFields: r, width:
20633
20633
  transform: T,
20634
20634
  transition: k,
20635
20635
  isDragging: S
20636
- } = Ds({ id: t.id }), I = {
20636
+ } = Is({ id: t.id }), D = {
20637
20637
  transform: Es.Transform.toString(T),
20638
20638
  transition: k
20639
20639
  }, A = nt(t.dataType), M = tb(A), V = () => {
@@ -20685,7 +20685,7 @@ function eb({ column: t, isSelected: n, onSelect: s, availableFields: r, width:
20685
20685
  groupByColumns: [...q, J]
20686
20686
  });
20687
20687
  }
20688
- }, D = (q) => {
20688
+ }, I = (q) => {
20689
20689
  var J;
20690
20690
  const H = ((J = l == null ? void 0 : l.config) == null ? void 0 : J.metricColumns) || [];
20691
20691
  if (!H.some(
@@ -20705,7 +20705,7 @@ function eb({ column: t, isSelected: n, onSelect: s, availableFields: r, width:
20705
20705
  }, L = () => {
20706
20706
  t.role === "groupby" ? c(l.id, t.id) : t.role === "metric" && h(l.id, t.id);
20707
20707
  }, R = {
20708
- ...I,
20708
+ ...D,
20709
20709
  width: d ? `${d}px` : void 0,
20710
20710
  minWidth: d ? `${d}px` : "120px"
20711
20711
  };
@@ -20776,12 +20776,12 @@ function eb({ column: t, isSelected: n, onSelect: s, availableFields: r, width:
20776
20776
  "Summarize"
20777
20777
  ] }),
20778
20778
  /* @__PURE__ */ a(Bm, { children: [
20779
- /* @__PURE__ */ e(ct, { onClick: () => D("SUM"), children: "Sum" }),
20780
- /* @__PURE__ */ e(ct, { onClick: () => D("AVG"), children: "Average" }),
20781
- /* @__PURE__ */ e(ct, { onClick: () => D("COUNT"), children: "Count" }),
20782
- /* @__PURE__ */ e(ct, { onClick: () => D("DISTINCT"), children: "Count Distinct" }),
20783
- /* @__PURE__ */ e(ct, { onClick: () => D("MIN"), children: "Min" }),
20784
- /* @__PURE__ */ e(ct, { onClick: () => D("MAX"), children: "Max" })
20779
+ /* @__PURE__ */ e(ct, { onClick: () => I("SUM"), children: "Sum" }),
20780
+ /* @__PURE__ */ e(ct, { onClick: () => I("AVG"), children: "Average" }),
20781
+ /* @__PURE__ */ e(ct, { onClick: () => I("COUNT"), children: "Count" }),
20782
+ /* @__PURE__ */ e(ct, { onClick: () => I("DISTINCT"), children: "Count Distinct" }),
20783
+ /* @__PURE__ */ e(ct, { onClick: () => I("MIN"), children: "Min" }),
20784
+ /* @__PURE__ */ e(ct, { onClick: () => I("MAX"), children: "Max" })
20785
20785
  ] })
20786
20786
  ] }),
20787
20787
  /* @__PURE__ */ e(Wt, {}),
@@ -20857,19 +20857,19 @@ function ab({
20857
20857
  sourceFields: r = [],
20858
20858
  filterableFields: d = r
20859
20859
  }) {
20860
- var S, I, A, M;
20860
+ var S, D, A, M;
20861
20861
  const i = O((V) => V.card), { updateCardConfig: l } = Ne(), [o, c] = K(null), [h, m] = K({}), [f, p] = K(!1), u = de(() => {
20862
- var b, D;
20863
- const V = ((b = i == null ? void 0 : i.config) == null ? void 0 : b.groupByColumns) || [], F = ((D = i == null ? void 0 : i.config) == null ? void 0 : D.metricColumns) || [];
20862
+ var b, I;
20863
+ const V = ((b = i == null ? void 0 : i.config) == null ? void 0 : b.groupByColumns) || [], F = ((I = i == null ? void 0 : i.config) == null ? void 0 : I.metricColumns) || [];
20864
20864
  return [...V, ...F];
20865
- }, [(S = i == null ? void 0 : i.config) == null ? void 0 : S.groupByColumns, (I = i == null ? void 0 : i.config) == null ? void 0 : I.metricColumns]), g = de(() => {
20865
+ }, [(S = i == null ? void 0 : i.config) == null ? void 0 : S.groupByColumns, (D = i == null ? void 0 : i.config) == null ? void 0 : D.metricColumns]), g = de(() => {
20866
20866
  const V = new Set(u.map((F) => `${F.qualifiedEntityName}.${F.name}`));
20867
20867
  return r.filter((F) => !V.has(`${F.qualifiedEntityName}.${F.name}`));
20868
20868
  }, [r, u]), { data: C, isLoading: x } = Nt(i), y = (C == null ? void 0 : C.records) || [], E = Ee((V, F) => {
20869
20869
  m((b) => ({ ...b, [V]: F }));
20870
20870
  }, []), P = Ee((V) => {
20871
20871
  var L, R;
20872
- const F = nt(V.dataType), b = ((L = i == null ? void 0 : i.config) == null ? void 0 : L.groupByColumns) || [], D = ((R = i == null ? void 0 : i.config) == null ? void 0 : R.metricColumns) || [];
20872
+ const F = nt(V.dataType), b = ((L = i == null ? void 0 : i.config) == null ? void 0 : L.groupByColumns) || [], I = ((R = i == null ? void 0 : i.config) == null ? void 0 : R.metricColumns) || [];
20873
20873
  if (F === "number") {
20874
20874
  const B = {
20875
20875
  ...V,
@@ -20878,7 +20878,7 @@ function ab({
20878
20878
  aggregate: "SUM"
20879
20879
  };
20880
20880
  l(i.id, {
20881
- metricColumns: [...D, B]
20881
+ metricColumns: [...I, B]
20882
20882
  });
20883
20883
  } else {
20884
20884
  const B = {
@@ -20902,9 +20902,9 @@ function ab({
20902
20902
  }, w = (V) => {
20903
20903
  const { active: F, over: b } = V;
20904
20904
  if (c(null), !b || F.id === b.id) return;
20905
- const D = u.findIndex((R) => R.id === F.id), L = u.findIndex((R) => R.id === b.id);
20906
- if (D !== -1 && L !== -1) {
20907
- const R = xs(u, D, L), B = R.filter((_) => _.role === "groupby"), z = R.filter((_) => _.role === "metric");
20905
+ const I = u.findIndex((R) => R.id === F.id), L = u.findIndex((R) => R.id === b.id);
20906
+ if (I !== -1 && L !== -1) {
20907
+ const R = xs(u, I, L), B = R.filter((_) => _.role === "groupby"), z = R.filter((_) => _.role === "metric");
20908
20908
  l(i.id, {
20909
20909
  groupByColumns: B,
20910
20910
  metricColumns: z
@@ -21036,7 +21036,7 @@ function ab({
21036
21036
  children: [
21037
21037
  /* @__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: F + 1 }),
21038
21038
  u.map((b) => {
21039
- const D = V[b.name] ?? V[b.label ?? ""];
21039
+ const I = V[b.name] ?? V[b.label ?? ""];
21040
21040
  return /* @__PURE__ */ e(
21041
21041
  "td",
21042
21042
  {
@@ -21048,7 +21048,7 @@ function ab({
21048
21048
  "border-r border-border px-3 py-2 text-sm",
21049
21049
  (t == null ? void 0 : t.id) === b.id && "bg-primary/5"
21050
21050
  ),
21051
- children: /* @__PURE__ */ e("span", { className: "block truncate", children: nb(D, b) })
21051
+ children: /* @__PURE__ */ e("span", { className: "block truncate", children: nb(I, b) })
21052
21052
  },
21053
21053
  `${F}-${b.id}`
21054
21054
  );
@@ -21059,7 +21059,7 @@ function ab({
21059
21059
  F
21060
21060
  )) })
21061
21061
  ] }),
21062
- /* @__PURE__ */ e(bo, { children: T && /* @__PURE__ */ e("div", { className: "rounded border border-primary bg-background px-3 py-2 text-sm font-medium shadow-lg", children: T.label || T.name }) })
21062
+ /* @__PURE__ */ e(yo, { children: T && /* @__PURE__ */ e("div", { className: "rounded border border-primary bg-background px-3 py-2 text-sm font-medium shadow-lg", children: T.label || T.name }) })
21063
21063
  ]
21064
21064
  }
21065
21065
  ) }),
@@ -21272,19 +21272,19 @@ function sb({
21272
21272
  /* @__PURE__ */ e("span", { className: "text-xs text-muted-foreground", children: w.length })
21273
21273
  ] }),
21274
21274
  /* @__PURE__ */ e(Yt, { children: /* @__PURE__ */ e("div", { className: "ml-4 space-y-0.5 border-l border-border pl-2", children: w.map((k) => {
21275
- const S = E(k.dataType), I = C(k);
21275
+ const S = E(k.dataType), D = C(k);
21276
21276
  return /* @__PURE__ */ a(
21277
21277
  "label",
21278
21278
  {
21279
21279
  className: Y(
21280
21280
  "flex cursor-pointer items-center gap-2 rounded px-2 py-1.5 text-sm transition-colors hover:bg-muted/50",
21281
- I && "bg-primary/5"
21281
+ D && "bg-primary/5"
21282
21282
  ),
21283
21283
  children: [
21284
21284
  /* @__PURE__ */ e(
21285
21285
  wt,
21286
21286
  {
21287
- checked: I,
21287
+ checked: D,
21288
21288
  onCheckedChange: (A) => x(k, A),
21289
21289
  className: "h-3.5 w-3.5"
21290
21290
  }
@@ -21492,7 +21492,7 @@ function ib({ className: t }) {
21492
21492
  columns: l = [],
21493
21493
  columnGroups: o = [],
21494
21494
  isLoading: c
21495
- } = Oi(), { valuePickFilterableFields: h = [] } = Is();
21495
+ } = Oi(), { valuePickFilterableFields: h = [] } = Ds();
21496
21496
  (u = n == null ? void 0 : n.config) != null && u.groupByColumns, (g = n == null ? void 0 : n.config) != null && g.metricColumns, (C = n == null ? void 0 : n.config) != null && C.groupByColumns, (x = n == null ? void 0 : n.config) != null && x.pivotByColumns;
21497
21497
  const m = (y) => {
21498
21498
  r(y), i(y ? `[${y.label || y.name}]` : "");
@@ -21538,7 +21538,7 @@ function ob() {
21538
21538
  var B, z;
21539
21539
  const [t, n] = K(
21540
21540
  "chart"
21541
- ), [s, r] = K(!1), [d, i] = K(!0), [l, o] = K(!0), c = O((_) => _.showAIDialog), h = Ie((_) => _.isVisualEditing), { setCardType: m } = Ne(), f = O((_) => _.card.type);
21541
+ ), [s, r] = K(!1), [d, i] = K(!0), [l, o] = K(!0), c = O((_) => _.showAIDialog), h = De((_) => _.isVisualEditing), { setCardType: m } = Ne(), f = O((_) => _.card.type);
21542
21542
  Se(() => Zx(), []);
21543
21543
  const p = (_) => {
21544
21544
  m(_);
@@ -21550,7 +21550,7 @@ function ob() {
21550
21550
  columnFields: v = [],
21551
21551
  scopedFields: N = [],
21552
21552
  filterableFields: w = []
21553
- } = Is(), T = _n(
21553
+ } = Ds(), T = _n(
21554
21554
  ca(zn, {
21555
21555
  activationConstraint: {
21556
21556
  distance: 8
@@ -21558,12 +21558,12 @@ function ob() {
21558
21558
  })
21559
21559
  ), k = g, {
21560
21560
  getFieldsForContainer: S,
21561
- setFieldsForContainer: I
21562
- } = co(k), { activeField: A, handleDragStart: M, handleDragEnd: V } = $x({
21561
+ setFieldsForContainer: D
21562
+ } = uo(k), { activeField: A, handleDragStart: M, handleDragEnd: V } = $x({
21563
21563
  activeCardId: u.activeCardId,
21564
21564
  sourceFields: N,
21565
21565
  getFieldsForContainer: S,
21566
- setFieldsForContainer: I
21566
+ setFieldsForContainer: D
21567
21567
  }), F = (_, q) => {
21568
21568
  q && P(_, q);
21569
21569
  }, b = (_) => {
@@ -21574,7 +21574,7 @@ function ob() {
21574
21574
  filters: void 0
21575
21575
  }
21576
21576
  });
21577
- }, D = w, L = (_) => {
21577
+ }, I = w, L = (_) => {
21578
21578
  if (!_) return 0;
21579
21579
  let q = _.conditions.length;
21580
21580
  return _.groups.forEach((H) => {
@@ -21597,7 +21597,7 @@ function ob() {
21597
21597
  onToggleVisibility: () => i(!d)
21598
21598
  }
21599
21599
  ),
21600
- /* @__PURE__ */ e("div", { className: "flex flex-1 transition-all duration-300 ease-in-out", children: f === "tableBuilder" ? /* @__PURE__ */ e(ib, { className: "flex-1" }) : /* @__PURE__ */ a(De, { children: [
21600
+ /* @__PURE__ */ e("div", { className: "flex flex-1 transition-all duration-300 ease-in-out", children: f === "tableBuilder" ? /* @__PURE__ */ e(ib, { className: "flex-1" }) : /* @__PURE__ */ a(Ie, { children: [
21601
21601
  !c && /* @__PURE__ */ e(
21602
21602
  wx,
21603
21603
  {
@@ -21639,7 +21639,7 @@ function ob() {
21639
21639
  className: "h-10 w-10 rounded-full border-border bg-background p-0 shadow-lg hover:bg-muted",
21640
21640
  onClick: () => i(!0),
21641
21641
  title: "Show Data Source Panel",
21642
- children: /* @__PURE__ */ e(In, { className: "h-4 w-4" })
21642
+ children: /* @__PURE__ */ e(Dn, { className: "h-4 w-4" })
21643
21643
  }
21644
21644
  ) })
21645
21645
  ] }),
@@ -21650,23 +21650,23 @@ function ob() {
21650
21650
  filters: ((z = k.config) == null ? void 0 : z.filters) || null,
21651
21651
  onFiltersChange: F,
21652
21652
  onClearFilters: b,
21653
- availableFields: D,
21653
+ availableFields: I,
21654
21654
  isOpen: s,
21655
21655
  onOpenChange: r
21656
21656
  }
21657
21657
  ),
21658
- /* @__PURE__ */ e(bo, { dropAnimation: null, children: /* @__PURE__ */ e(Xx, { activeField: A || null }) })
21658
+ /* @__PURE__ */ e(yo, { dropAnimation: null, children: /* @__PURE__ */ e(Xx, { activeField: A || null }) })
21659
21659
  ]
21660
21660
  }
21661
21661
  );
21662
21662
  }
21663
21663
  function cb({ authToken: t, onSave: n, onClose: s }) {
21664
- const r = Me(null), d = O((T) => T.showAIDialog), i = O((T) => T.isDevMode), l = Hs((T) => T.setFullscreen), o = Hs((T) => T.setPanelOpen), c = Hs((T) => T.setContainer), h = _m("editor"), m = zm(), f = $m("editor"), p = m === "editor", u = Dr(), g = Ee(
21664
+ const r = Me(null), d = O((T) => T.showAIDialog), i = O((T) => T.isDevMode), l = Hs((T) => T.setFullscreen), o = Hs((T) => T.setPanelOpen), c = Hs((T) => T.setContainer), h = _m("editor"), m = zm(), f = $m("editor"), p = m === "editor", u = Ir(), g = Ee(
21665
21665
  (T) => {
21666
21666
  c("editor", T);
21667
21667
  },
21668
21668
  [c]
21669
- ), { setAuthToken: C } = vo(), { setShowAIDialog: x, setOnSave: y, setOnClose: E } = Ne(), { setActiveAssistantType: P } = Br();
21669
+ ), { setAuthToken: C } = No(), { setShowAIDialog: x, setOnSave: y, setOnClose: E } = Ne(), { setActiveAssistantType: P } = Br();
21670
21670
  Se(() => {
21671
21671
  n && y(n), s && E(s);
21672
21672
  }, [n, y, s, E]), Se(() => {
@@ -21686,7 +21686,7 @@ function cb({ authToken: t, onSave: n, onClose: s }) {
21686
21686
  T < 1 ? (x(!1), o("editor", !1), m === "editor" && l(null), P(null), (k = r.current) == null || k.resize(0)) : (d || (x(!0), P("editor")), h.isOpen || o("editor", !0));
21687
21687
  }
21688
21688
  function N() {
21689
- return /* @__PURE__ */ a(De, { children: [
21689
+ return /* @__PURE__ */ a(Ie, { children: [
21690
21690
  /* @__PURE__ */ e(Lo, { isVisible: !0, onToggleVisibility: () => {
21691
21691
  } }),
21692
21692
  /* @__PURE__ */ a("div", { className: "relative flex grow", children: [
@@ -21802,10 +21802,10 @@ function cb({ authToken: t, onSave: n, onClose: s }) {
21802
21802
  ) });
21803
21803
  }
21804
21804
  function Nb() {
21805
- Ie((u) => u.selectedCardId);
21806
- const t = Ie((u) => u.selectedSheetId), n = Ie((u) => u.dashboard), { setIsVisualEditing: s, setSelectedSheetId: r } = Ie(
21805
+ De((u) => u.selectedCardId);
21806
+ const t = De((u) => u.selectedSheetId), n = De((u) => u.dashboard), { setIsVisualEditing: s, setSelectedSheetId: r } = De(
21807
21807
  (u) => u.actions
21808
- ), d = O((u) => u.editorContext), { clearEditorContext: i } = O((u) => u.actions), l = Dr(), o = Ie((u) => u.isVisualEditing), c = Ie((u) => u.actions.updateFrame), h = Ie(
21808
+ ), d = O((u) => u.editorContext), { clearEditorContext: i } = O((u) => u.actions), l = Ir(), o = De((u) => u.isVisualEditing), c = De((u) => u.actions.updateFrame), h = De(
21809
21809
  (u) => u.actions.updateDocumentSectionCard
21810
21810
  ), m = jm();
21811
21811
  async function f(u) {