react-semaphor 0.1.574 → 0.1.576

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 (23) hide show
  1. package/dist/chunks/{assistant-chat-D95DtCj7.js → assistant-chat-B_tmsxEK.js} +2 -2
  2. package/dist/chunks/attribution-BvoKvhcj.js +32 -0
  3. package/dist/chunks/{card-filter-builder-B3bEPylu.js → card-filter-builder-CwnMUZU2.js} +1 -1
  4. package/dist/chunks/{dashboard-DdALjmc3.js → dashboard-BcIIBCTP.js} +1 -1
  5. package/dist/chunks/{dashboard-briefing-launcher-D2vevpyl.js → dashboard-briefing-launcher-BBpECqg2.js} +2 -2
  6. package/dist/chunks/{dashboard-controls-DxrsGK9A.js → dashboard-controls-CONzvjmO.js} +4 -4
  7. package/dist/chunks/{dashboard-json-rwds0HjB.js → dashboard-json-BF2chEVd.js} +1 -1
  8. package/dist/chunks/{edit-dashboard-visual-BCDz5HOb.js → edit-dashboard-visual-Bf-RcbuD.js} +596 -595
  9. package/dist/chunks/{report-preferences-dialog-D9nBczmk.js → report-preferences-dialog-RN4g9PEN.js} +5 -5
  10. package/dist/chunks/{semaphor-ready-indicator-BdOAS4Uw.js → semaphor-ready-indicator-DtivanBy.js} +18207 -18146
  11. package/dist/chunks/{shelf-drop-preview-context-B1goDUYE.js → shelf-drop-preview-context-BTjYxbHC.js} +1 -1
  12. package/dist/dashboard/index.js +1 -1
  13. package/dist/index.js +184 -183
  14. package/dist/surfboard/index.js +1 -1
  15. package/dist/types/shared/usage-events/attribution.d.ts +3 -3
  16. package/dist/types/shared/usage-events/catalog.d.ts +40 -13
  17. package/dist/types/shared/usage-events/details.d.ts +312 -0
  18. package/dist/types/shared/usage-events/envelope.d.ts +146 -0
  19. package/dist/types/shared/usage-events/index.d.ts +3 -0
  20. package/dist/types/shared/usage-events/validate.d.ts +12 -0
  21. package/dist/types/shared/usage-events/vocabulary.d.ts +14 -0
  22. package/dist/usage-events/index.js +244 -30
  23. package/package.json +1 -1
@@ -1,32 +1,33 @@
1
1
  import { jsx as e, jsxs as n, Fragment as ue } from "react/jsx-runtime";
2
2
  import sl, { useState as U, useEffect as we, useMemo as se, useRef as Ke, useCallback as xt, useId as Ma, useContext as ir, Suspense as Li } from "react";
3
- import { F as Yi, P as _i, a as Vi, b as ll, u as st, S as bs, c as vs, r as ol, E as Bi, T as Ki, A as qi, d as ji, e as Ga, f as $i, g as zi, h as Hi } from "./shelf-drop-preview-context-B1goDUYE.js";
3
+ import { F as Yi, P as _i, a as Vi, b as ll, u as st, S as bs, c as vs, r as ol, E as Bi, T as Ki, A as qi, d as ji, e as Ga, f as $i, g as zi, h as Hi } from "./shelf-drop-preview-context-BTjYxbHC.js";
4
4
  import { c as J } from "./pickers-DkqmtnTL.js";
5
5
  import { a5 as il, M as Ui, v as ys, m as Qa } from "./validators-B8fpdinG.js";
6
6
  import "./matrix-operation-contract-DCVinw1o.js";
7
7
  import { y as Gi } from "./analytics-base-schemas-BaIQrEzX.js";
8
8
  import { DEFAULT_RESOLVED_VALUE_FORMAT_PREFERENCES as ha } from "../value-format-preferences/index.js";
9
- import { cG as Qi, eA as Da, eh as Ea, cF as cl, ek as Pa, eB as Fa, eC as Ji, ag as be, eD as Wi, bD as qt, bE as jt, bF as Wt, bG as $t, bH as zt, bB as Ia, cI as gt, cD as Bt, cB as qa, bC as it, eE as dl, dw as ja, bW as Ft, c0 as Yt, dv as ul, eF as xa, bV as rn, af as F, aZ as ct, eG as ml, eH as Xi, eI as Zi, eJ as ec, c5 as hl, eK as tc, dh as pl, b1 as Zt, dE as fl, et as gl, eL as ac, cr, dC as nc, ct as rc, cu as sc, cv as lc, cw as oc, cx as ic, cy as cc, cz as dc, cA as uc, a_ as dr, u as ge, aX as ea, eM as xl, cd as Ja, eN as bl, aY as Mn, bx as ur, b5 as vl, eO as mr, bL as sn, bS as mc, dW as hc, eP as Qn, cN as ta, cO as aa, cP as na, cS as pc, dY as hr, eQ as pr, eR as ln, eS as yl, dm as fr, dl as Nl, eT as fc, eU as gc, eV as Ot, eW as xc, eX as bc, eY as vc, eZ as yc, e_ as Cl, Z as wl, M as Nc, eb as Cc, e$ as wc, dt as Sc, f0 as gr, E as on, e as xr, f1 as Sl, f2 as kc, f3 as Ns, f4 as Tc, f5 as kl, f6 as Mc, f7 as Dc, bw as Tl, f8 as Ec, f9 as Fc, fa as Ic, fb as Ac, fc as Wa, fd as Pc, fe as Rc, ff as Ml, fg as Dl, fh as Oc, fi as Lc, dT as Yc, fj as _c, fk as El, fl as Vc, dq as Bc, dp as cn, fm as dn, cf as br, cg as vr, ch as yr, fn as Kc, fo as qc, db as Fl, dc as jc, dd as $c, de as zc, aW as Hc, fp as Uc, fq as Gc, fr as Qc, fs as Jc, ft as Cs, fu as Wc, fv as Il, fw as Al, b0 as Pl, b2 as Xc, b7 as Zc, b8 as ed, b3 as td, b4 as ad, fx as nd, fy as rd, fz as sd, fA as ld, fB as ws, ba as od, bb as id, fC as Rl, fD as ca, fE as da, fF as ua, eg as pa, ck as Ol, c2 as Dt, cm as Ss, cn as ks, co as Jn, fG as Ll, fH as cd, fI as dd, fJ as ud, fK as md, fL as un, fM as Re, fN as Oe, fO as Le, dz as hd, dA as pd, fP as Yl, fQ as _l, fR as fd, fS as Nr, fT as Cr, fU as gd, fV as Vl, fW as xd, fX as bd, fY as Wn, fZ as vd, f_ as yd, f$ as Nd, g0 as Cd, g1 as wd, g2 as Sd, g3 as Qt, g4 as Na, g5 as Ts, g6 as kd, g7 as Dn, g8 as Ms, g9 as Td, ga as Md, by as wr, bz as Aa, gb as En, gc as Bl, gd as Dd, ge as Ed, gf as Fd, gg as Id, gh as Kl, gi as ql, gj as Ad, gk as Pd, gl as jl, gm as Rd, gn as Od, go as $l, dr as Ld, ds as Yd, dB as _d, du as Vd, c4 as Bd, gp as Kd, cX as qd, cT as zl, gq as Hl, gr as jd, d0 as $d, gs as Ul, gt as zd, gu as Hd, gv as Ud, gw as Gd, gx as Qd, gy as Sr, el as Gl, gz as Ql, gA as $a, gB as Jl, gC as Wl, gD as Ds, gE as Jd, gF as Wd, gG as Xd, dG as Zd, gH as eu, bc as tu, gI as Es, ev as au, gJ as nu, ew as ru, ey as su, ez as lu, h as ou, gK as iu, da as cu, gL as du, gM as uu, gN as mu, gO as hu, d5 as pu, d6 as fu, gP as gu, gQ as xu, d9 as bu, ad as vu, dF as yu, F as Nu, gR as Cu, bn as wu } from "./semaphor-ready-indicator-BdOAS4Uw.js";
10
- import { c as qe, B as ne, r as Xl, m as mn, s as O, y as W, z as X, A as Z, D as ee, E as z, F as _t, X as rt, w as ut, t as bt, u as mt, v as ht, e as It, f as Vt, h as At, x as Ae, aa as Su, L as Ra, C as Xt, T as Ht, k as Ut, l as at, n as wt, j as ra, I as fa, ac as ku, ad as Tu, q as Zl, i as Xa, ae as Xn, af as eo, d as ke, R as Fs, p as to, ag as Mu } from "./style-sheet-parts-C7qGZuH1.js";
11
- import { U as Du } from "./upload-CiGNKJ_0.js";
12
- import { hy as Eu, de as Fu, hz as Iu, hA as kr, hB as ga, hC as Au, hD as Is, hE as Pu, hF as Ru, hG as As, R as sa, cs as ao, S as la, U as Oa, V as Lt, W as ma, c8 as Ou, bx as no, ey as Lu, hu as Yu, fN as La, i as _u, bc as Vu, gP as Tr, f8 as ro, n as Bu, hH as Ku, hI as qu, hJ as ju, hK as $u, fM as Kt, gq as zu, gp as Hu, hL as Uu, hM as so, fm as Gu, cI as Qu, hN as lo, gQ as Ju, d3 as Wu, d1 as Fn, hO as Xu, hP as Zu, hQ as em, hR as tm, Y as am, T as oo, Z as nm, hS as Zn, hT as rm, hU as sm, hV as lm, hW as Mr, fa as om, ei as Dr, av as im, a8 as er, eE as cm, fS as dm, bP as io, bS as um, bh as mm, bR as tr, bT as za, b as co, hX as hm, bg as pm, bp as fm, hY as gm, hZ as xm, eH as bm, h_ as vm, eG as uo, h$ as ym, i0 as Nm, i1 as Cm, fK as Ct, i2 as wm, i3 as Sm, i4 as km, i5 as Tm, i6 as Mm, i7 as Dm, i8 as Ps, i9 as Rs, ia as Em, a as mo, aj as Fm, ib as Im, ic as Am, id as Pm, gF as Rm, ie as Os, ig as Om, ih as Lm, b9 as Ym, eP as _m, eV as Vm, aa as Bm, fW as Km, ii as ho, gH as qm, bU as jm, ij as $m, ik as zm, il as po, im as Er, e as Za, gO as Hm } from "./resolve-dashboard-input-context-DBFuNhZo.js";
13
- import { d as Um, A as Gm, g as Fr, i as Qm, b as Jm, F as Wm, V as fo, I as nt, e as Xm, u as Zm, C as eh, c as th } from "./card-filter-builder-B3bEPylu.js";
9
+ import { cG as Qi, eA as Da, eh as Ea, cF as cl, ek as Pa, eB as Fa, eC as Ji, ag as be, eD as Wi, bD as qt, bE as jt, bF as Wt, bG as $t, bH as zt, bB as Ia, cI as gt, cD as Bt, cB as qa, bC as it, eE as dl, dw as ja, bW as Ft, c0 as Yt, dv as ul, eF as xa, bV as rn, af as F, aZ as ct, eG as ml, eH as Xi, eI as Zi, eJ as ec, c5 as hl, eK as tc, dh as pl, b1 as Zt, dE as fl, et as gl, eL as ac, cr, dC as nc, ct as rc, cu as sc, cv as lc, cw as oc, cx as ic, cy as cc, cz as dc, cA as uc, a_ as dr, u as ge, aX as ea, eM as xl, cd as Ja, eN as bl, aY as Mn, bx as ur, b5 as vl, eO as mr, bL as sn, bS as mc, dW as hc, eP as Qn, cN as ta, cO as aa, cP as na, cS as pc, dY as hr, eQ as pr, eR as ln, eS as yl, dm as fr, dl as Nl, eT as fc, eU as gc, eV as Ot, eW as xc, eX as bc, eY as vc, eZ as yc, e_ as Cl, Z as wl, M as Nc, eb as Cc, e$ as wc, dt as Sc, f0 as gr, E as on, e as xr, f1 as Sl, f2 as kc, f3 as Ns, f4 as Tc, f5 as kl, f6 as Mc, f7 as Dc, bw as Tl, f8 as Ec, f9 as Fc, fa as Ic, fb as Ac, fc as Wa, fd as Pc, fe as Rc, ff as Ml, fg as Dl, fh as Oc, fi as Lc, dT as Yc, fj as _c, fk as El, fl as Vc, dq as Bc, dp as cn, fm as dn, cf as br, cg as vr, ch as yr, fn as Kc, fo as qc, db as Fl, dc as jc, dd as $c, de as zc, aW as Hc, fp as Uc, fq as Gc, fr as Qc, fs as Jc, ft as Cs, fu as Wc, fv as Il, fw as Al, b0 as Pl, b2 as Xc, b7 as Zc, b8 as ed, b3 as td, b4 as ad, fx as nd, fy as rd, fz as sd, fA as ld, fB as ws, ba as od, bb as id, fC as Rl, fD as ca, fE as da, fF as ua, eg as pa, ck as Ol, c2 as Dt, cm as Ss, cn as ks, co as Jn, fG as Ll, fH as cd, fI as dd, fJ as ud, fK as md, fL as un, fM as Re, fN as Oe, fO as Le, dz as hd, dA as pd, fP as Yl, fQ as _l, fR as fd, fS as Nr, fT as Cr, fU as gd, fV as Vl, fW as xd, fX as bd, fY as Wn, fZ as vd, f_ as yd, f$ as Nd, g0 as Cd, g1 as wd, g2 as Sd, g3 as Qt, g4 as Na, g5 as Ts, g6 as kd, g7 as Dn, g8 as Ms, g9 as Td, ga as Md, by as wr, bz as Aa, gb as En, gc as Bl, gd as Dd, ge as Ed, gf as Fd, gg as Id, gh as Kl, gi as ql, gj as Ad, gk as Pd, gl as jl, gm as Rd, gn as Od, go as $l, dr as Ld, ds as Yd, dB as _d, du as Vd, c4 as Bd, gp as Kd, gq as qd, gr as jd, cX as $d, cT as zl, gs as Hl, gt as zd, d0 as Hd, gu as Ul, gv as Ud, gw as Gd, gx as Qd, gy as Jd, gz as Wd, gA as Sr, el as Gl, gB as Ql, gC as $a, gD as Jl, gE as Wl, gF as Ds, gG as Xd, gH as Zd, gI as eu, dG as tu, gJ as au, bc as nu, gK as Es, ev as ru, gL as su, ew as lu, ey as ou, ez as iu, h as cu, gM as du, da as uu, gN as mu, gO as hu, gP as pu, gQ as fu, d5 as gu, d6 as xu, gR as bu, gS as vu, d9 as yu, ad as Nu, dF as Cu, F as wu, gT as Su, bn as ku } from "./semaphor-ready-indicator-DtivanBy.js";
10
+ import { c as qe, B as ne, r as Xl, m as mn, s as O, y as W, z as X, A as Z, D as ee, E as z, F as _t, X as rt, w as ut, t as bt, u as mt, v as ht, e as It, f as Vt, h as At, x as Ae, aa as Tu, L as Ra, C as Xt, T as Ht, k as Ut, l as at, n as wt, j as ra, I as fa, ac as Mu, ad as Du, q as Zl, i as Xa, ae as Xn, af as eo, d as ke, R as Fs, p as to, ag as Eu } from "./style-sheet-parts-C7qGZuH1.js";
11
+ import { U as Fu } from "./upload-CiGNKJ_0.js";
12
+ import { hy as Iu, de as Au, hz as Pu, hA as kr, hB as ga, hC as Ru, hD as Is, hE as Ou, hF as Lu, hG as As, R as sa, cs as ao, S as la, U as Oa, V as Lt, W as ma, c8 as Yu, bx as no, ey as _u, hu as Vu, fN as La, i as Bu, bc as Ku, gP as Tr, f8 as ro, n as qu, hH as ju, hI as $u, hJ as zu, hK as Hu, fM as Kt, gq as Uu, gp as Gu, hL as Qu, hM as so, fm as Ju, cI as Wu, hN as lo, gQ as Xu, d3 as Zu, d1 as Fn, hO as em, hP as tm, hQ as am, hR as nm, Y as rm, T as oo, Z as sm, hS as Zn, hT as lm, hU as om, hV as im, hW as Mr, fa as cm, ei as Dr, av as dm, a8 as er, eE as um, fS as mm, bP as io, bS as hm, bh as pm, bR as tr, bT as za, b as co, hX as fm, bg as gm, bp as xm, hY as bm, hZ as vm, eH as ym, h_ as Nm, eG as uo, h$ as Cm, i0 as wm, i1 as Sm, fK as Ct, i2 as km, i3 as Tm, i4 as Mm, i5 as Dm, i6 as Em, i7 as Fm, i8 as Ps, i9 as Rs, ia as Im, a as mo, aj as Am, ib as Pm, ic as Rm, id as Om, gF as Lm, ie as Os, ig as Ym, ih as _m, b9 as Vm, eP as Bm, eV as Km, aa as qm, fW as jm, ii as ho, gH as $m, bU as zm, ij as Hm, ik as Um, il as po, im as Er, e as Za, gO as Gm } from "./resolve-dashboard-input-context-DBFuNhZo.js";
13
+ import { d as Qm, A as Jm, g as Fr, i as Wm, b as Xm, F as Zm, V as fo, I as nt, e as eh, u as th, C as ah, c as nh } from "./card-filter-builder-CwnMUZU2.js";
14
14
  import "zod";
15
- import { aE as ah, aD as hn, az as Ir, j as nh, P as rh, av as go } from "./temporal-input-presentation-CqbJjIuu.js";
16
- import { aK as sh } from "./bookmark-state-BEl_G9vr.js";
15
+ import { aE as rh, aD as hn, az as Ir, j as sh, P as lh, av as go } from "./temporal-input-presentation-CqbJjIuu.js";
16
+ import { aK as oh } from "./bookmark-state-BEl_G9vr.js";
17
17
  import "./schema-C9NPiIru.js";
18
18
  import { i as xo } from "./index-CV_Kzou0.js";
19
19
  import "./context-R31TSL5V.js";
20
- import { N as Ar, T as lh, U as bo, V as vo, W as Pr, X as Rr, S as Ha, Y as oh } from "./filter-reach-copy-BTAXnbwQ.js";
21
- import { E as ih, a1 as ch, e as dh, a2 as uh, W as yo, a3 as mh, X as No, a4 as hh, R as ph, s as fh, a5 as gh, a6 as xh, a7 as bh, a8 as vh, a9 as yh, B as Nh } from "./stored-dashboard-rpLzf4mk.js";
20
+ import { N as Ar, T as ih, U as bo, V as vo, W as Pr, X as Rr, S as Ha, Y as ch } from "./filter-reach-copy-BTAXnbwQ.js";
21
+ import { E as dh, a1 as uh, e as mh, a2 as hh, W as yo, a3 as ph, X as No, a4 as fh, R as gh, s as xh, a5 as bh, a6 as vh, a7 as yh, a8 as Nh, a9 as Ch, B as wh } from "./stored-dashboard-rpLzf4mk.js";
22
22
  import "react-dom";
23
23
  import { L as Ls } from "./list-filter-C1-uTgjR.js";
24
- import { r as Ch } from "./export-file-format-C-tJsxsf.js";
25
- import { u as wh } from "./appearance-context-BwBp25ZG.js";
26
- import { P as Sh } from "./paintbrush-aR17Z3C9.js";
27
- import { D as kh } from "./metric-comparison-n9NsIa-2.js";
28
- import { P as Th } from "./palette-a5FCZKFI.js";
29
- import { r as Mh } from "./dates-DlYMDaF2.js";
24
+ import { r as Sh } from "./export-file-format-C-tJsxsf.js";
25
+ import { u as kh } from "./appearance-context-BwBp25ZG.js";
26
+ import { P as Th } from "./paintbrush-aR17Z3C9.js";
27
+ import { D as Mh } from "./metric-comparison-n9NsIa-2.js";
28
+ import { P as Dh } from "./palette-a5FCZKFI.js";
29
+ import "./attribution-BvoKvhcj.js";
30
+ import { r as Eh } from "./dates-DlYMDaF2.js";
30
31
  /**
31
32
  * @license lucide-react v0.453.0 - ISC
32
33
  *
@@ -61,7 +62,7 @@ const wo = qe("Blocks", [
61
62
  * This source code is licensed under the ISC license.
62
63
  * See the LICENSE file in the root directory of this source tree.
63
64
  */
64
- const Dh = qe("CircleHelp", [
65
+ const Fh = qe("CircleHelp", [
65
66
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
66
67
  ["path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3", key: "1u773s" }],
67
68
  ["path", { d: "M12 17h.01", key: "p32p05" }]
@@ -72,7 +73,7 @@ const Dh = qe("CircleHelp", [
72
73
  * This source code is licensed under the ISC license.
73
74
  * See the LICENSE file in the root directory of this source tree.
74
75
  */
75
- const Eh = qe("Component", [
76
+ const Ih = qe("Component", [
76
77
  [
77
78
  "path",
78
79
  {
@@ -108,7 +109,7 @@ const Eh = qe("Component", [
108
109
  * This source code is licensed under the ISC license.
109
110
  * See the LICENSE file in the root directory of this source tree.
110
111
  */
111
- const Fh = qe("DatabaseZap", [
112
+ const Ah = qe("DatabaseZap", [
112
113
  ["ellipse", { cx: "12", cy: "5", rx: "9", ry: "3", key: "msslwz" }],
113
114
  ["path", { d: "M3 5V19A9 3 0 0 0 15 21.84", key: "14ibmq" }],
114
115
  ["path", { d: "M21 5V8", key: "1marbg" }],
@@ -121,7 +122,7 @@ const Fh = qe("DatabaseZap", [
121
122
  * This source code is licensed under the ISC license.
122
123
  * See the LICENSE file in the root directory of this source tree.
123
124
  */
124
- const Ih = qe("FileJson2", [
125
+ const Ph = qe("FileJson2", [
125
126
  ["path", { d: "M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4", key: "1pf5j1" }],
126
127
  ["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
127
128
  [
@@ -139,7 +140,7 @@ const Ih = qe("FileJson2", [
139
140
  * This source code is licensed under the ISC license.
140
141
  * See the LICENSE file in the root directory of this source tree.
141
142
  */
142
- const Ah = qe("Fullscreen", [
143
+ const Rh = qe("Fullscreen", [
143
144
  ["path", { d: "M3 7V5a2 2 0 0 1 2-2h2", key: "aa7l1z" }],
144
145
  ["path", { d: "M17 3h2a2 2 0 0 1 2 2v2", key: "4qcy5o" }],
145
146
  ["path", { d: "M21 17v2a2 2 0 0 1-2 2h-2", key: "6vwrx8" }],
@@ -152,7 +153,7 @@ const Ah = qe("Fullscreen", [
152
153
  * This source code is licensed under the ISC license.
153
154
  * See the LICENSE file in the root directory of this source tree.
154
155
  */
155
- const Ph = qe("GitCompareArrows", [
156
+ const Oh = qe("GitCompareArrows", [
156
157
  ["circle", { cx: "5", cy: "6", r: "3", key: "1qnov2" }],
157
158
  ["path", { d: "M12 6h5a2 2 0 0 1 2 2v7", key: "1yj91y" }],
158
159
  ["path", { d: "m15 9-3-3 3-3", key: "1lwv8l" }],
@@ -166,7 +167,7 @@ const Ph = qe("GitCompareArrows", [
166
167
  * This source code is licensed under the ISC license.
167
168
  * See the LICENSE file in the root directory of this source tree.
168
169
  */
169
- const Rh = qe("LayoutList", [
170
+ const Lh = qe("LayoutList", [
170
171
  ["rect", { width: "7", height: "7", x: "3", y: "3", rx: "1", key: "1g98yp" }],
171
172
  ["rect", { width: "7", height: "7", x: "3", y: "14", rx: "1", key: "1bb6yr" }],
172
173
  ["path", { d: "M14 4h7", key: "3xa0d5" }],
@@ -180,7 +181,7 @@ const Rh = qe("LayoutList", [
180
181
  * This source code is licensed under the ISC license.
181
182
  * See the LICENSE file in the root directory of this source tree.
182
183
  */
183
- const Oh = qe("ListEnd", [
184
+ const Yh = qe("ListEnd", [
184
185
  ["path", { d: "M16 12H3", key: "1a2rj7" }],
185
186
  ["path", { d: "M16 6H3", key: "1wxfjs" }],
186
187
  ["path", { d: "M10 18H3", key: "13769t" }],
@@ -193,7 +194,7 @@ const Oh = qe("ListEnd", [
193
194
  * This source code is licensed under the ISC license.
194
195
  * See the LICENSE file in the root directory of this source tree.
195
196
  */
196
- const Lh = qe("ListStart", [
197
+ const _h = qe("ListStart", [
197
198
  ["path", { d: "M16 12H3", key: "1a2rj7" }],
198
199
  ["path", { d: "M16 18H3", key: "12xzn7" }],
199
200
  ["path", { d: "M10 6H3", key: "lf8lx7" }],
@@ -206,7 +207,7 @@ const Lh = qe("ListStart", [
206
207
  * This source code is licensed under the ISC license.
207
208
  * See the LICENSE file in the root directory of this source tree.
208
209
  */
209
- const Yh = qe("ListX", [
210
+ const Vh = qe("ListX", [
210
211
  ["path", { d: "M11 12H3", key: "51ecnj" }],
211
212
  ["path", { d: "M16 6H3", key: "1wxfjs" }],
212
213
  ["path", { d: "M16 18H3", key: "12xzn7" }],
@@ -241,7 +242,7 @@ const An = qe("MoveVertical", [
241
242
  * This source code is licensed under the ISC license.
242
243
  * See the LICENSE file in the root directory of this source tree.
243
244
  */
244
- const _h = qe("PanelBottom", [
245
+ const Bh = qe("PanelBottom", [
245
246
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
246
247
  ["path", { d: "M3 15h18", key: "5xshup" }]
247
248
  ]);
@@ -263,7 +264,7 @@ const ar = qe("RefreshCcw", [
263
264
  * This source code is licensed under the ISC license.
264
265
  * See the LICENSE file in the root directory of this source tree.
265
266
  */
266
- const Vh = qe("SendHorizontal", [
267
+ const Kh = qe("SendHorizontal", [
267
268
  [
268
269
  "path",
269
270
  {
@@ -279,7 +280,7 @@ const Vh = qe("SendHorizontal", [
279
280
  * This source code is licensed under the ISC license.
280
281
  * See the LICENSE file in the root directory of this source tree.
281
282
  */
282
- const Bh = qe("Sigma", [
283
+ const qh = qe("Sigma", [
283
284
  [
284
285
  "path",
285
286
  {
@@ -294,7 +295,7 @@ const Bh = qe("Sigma", [
294
295
  * This source code is licensed under the ISC license.
295
296
  * See the LICENSE file in the root directory of this source tree.
296
297
  */
297
- const Kh = qe("Spline", [
298
+ const jh = qe("Spline", [
298
299
  ["circle", { cx: "19", cy: "5", r: "2", key: "mhkx31" }],
299
300
  ["circle", { cx: "5", cy: "19", r: "2", key: "v8kfzx" }],
300
301
  ["path", { d: "M5 17A12 12 0 0 1 17 5", key: "1okkup" }]
@@ -305,7 +306,7 @@ const Kh = qe("Spline", [
305
306
  * This source code is licensed under the ISC license.
306
307
  * See the LICENSE file in the root directory of this source tree.
307
308
  */
308
- const qh = qe("SquareSplitVertical", [
309
+ const $h = qe("SquareSplitVertical", [
309
310
  ["path", { d: "M5 8V5c0-1 1-2 2-2h10c1 0 2 1 2 2v3", key: "1pi83i" }],
310
311
  ["path", { d: "M19 16v3c0 1-1 2-2 2H7c-1 0-2-1-2-2v-3", key: "ido5k7" }],
311
312
  ["line", { x1: "4", x2: "20", y1: "12", y2: "12", key: "1e0a9i" }]
@@ -316,7 +317,7 @@ const qh = qe("SquareSplitVertical", [
316
317
  * This source code is licensed under the ISC license.
317
318
  * See the LICENSE file in the root directory of this source tree.
318
319
  */
319
- const jh = qe("Tags", [
320
+ const zh = qe("Tags", [
320
321
  ["path", { d: "m15 5 6.3 6.3a2.4 2.4 0 0 1 0 3.4L17 19", key: "1cbfv1" }],
321
322
  [
322
323
  "path",
@@ -333,11 +334,11 @@ const jh = qe("Tags", [
333
334
  * This source code is licensed under the ISC license.
334
335
  * See the LICENSE file in the root directory of this source tree.
335
336
  */
336
- const $h = qe("TrendingUp", [
337
+ const Hh = qe("TrendingUp", [
337
338
  ["polyline", { points: "22 7 13.5 15.5 8.5 10.5 2 17", key: "126l90" }],
338
339
  ["polyline", { points: "16 7 22 7 22 13", key: "kwv8wd" }]
339
340
  ]);
340
- function zh(t, a = {}) {
341
+ function Uh(t, a = {}) {
341
342
  const { size: r = "h-4 w-4" } = a, s = r;
342
343
  switch (t) {
343
344
  case "table":
@@ -345,7 +346,7 @@ function zh(t, a = {}) {
345
346
  case "view":
346
347
  return /* @__PURE__ */ e(Fa, { className: s });
347
348
  case "materialized view":
348
- return /* @__PURE__ */ e(Fh, { className: s });
349
+ return /* @__PURE__ */ e(Ah, { className: s });
349
350
  case "model":
350
351
  return /* @__PURE__ */ e(Pa, { className: s });
351
352
  case "file":
@@ -353,14 +354,14 @@ function zh(t, a = {}) {
353
354
  case "dataset":
354
355
  return /* @__PURE__ */ e(Ea, { className: s });
355
356
  case "upload":
356
- return /* @__PURE__ */ e(Du, { className: s });
357
+ return /* @__PURE__ */ e(Fu, { className: s });
357
358
  case "url":
358
359
  return /* @__PURE__ */ e(Da, { className: s });
359
360
  default:
360
361
  return /* @__PURE__ */ e(Qi, { className: s });
361
362
  }
362
363
  }
363
- function Hh({
364
+ function Gh({
364
365
  open: t,
365
366
  onOpenChange: a
366
367
  }) {
@@ -449,7 +450,7 @@ function Hh({
449
450
  onCheckedChange: () => d(h)
450
451
  }
451
452
  ),
452
- /* @__PURE__ */ e("div", { className: "flex items-center gap-2 text-muted-foreground", children: zh(h.type) }),
453
+ /* @__PURE__ */ e("div", { className: "flex items-center gap-2 text-muted-foreground", children: Uh(h.type) }),
453
454
  /* @__PURE__ */ n("div", { className: "min-w-0 flex-1", children: [
454
455
  /* @__PURE__ */ e("div", { className: "truncate font-medium", children: u(h) }),
455
456
  /* @__PURE__ */ e("div", { className: "truncate text-sm text-muted-foreground", children: m(h) })
@@ -484,12 +485,12 @@ function Ys() {
484
485
  keys: []
485
486
  };
486
487
  }
487
- function Uh({
488
+ function Qh({
488
489
  initialJoinPlan: t,
489
490
  availableDataSources: a
490
491
  }) {
491
492
  const [r, s] = U(
492
- () => Eu(t, a)
493
+ () => Iu(t, a)
493
494
  ), [l, c] = U(/* @__PURE__ */ new Set()), d = () => {
494
495
  const I = r.joins.length > 0 ? Math.max(...r.joins.map((_) => _.sequence)) + 1 : 1, R = {
495
496
  autoResolved: !1,
@@ -789,23 +790,23 @@ ${w.joinType} JOIN ${y.name}
789
790
  ))
790
791
  };
791
792
  }
792
- const Gh = [
793
+ const Jh = [
793
794
  { value: "LEFT", label: "Keep rows without a match" },
794
795
  { value: "INNER", label: "Only matching rows" },
795
796
  { value: "RIGHT", label: "Keep all target rows" },
796
797
  { value: "FULL", label: "Keep all rows" }
797
- ], Qh = {
798
+ ], Wh = {
798
799
  one_to_one: "One to one",
799
800
  one_to_many: "One to many",
800
801
  many_to_one: "Many to one",
801
802
  many_to_many: "Many to many"
802
- }, Jh = {
803
+ }, Xh = {
803
804
  one_to_one: "1 : 1",
804
805
  one_to_many: "1 : N",
805
806
  many_to_one: "N : 1",
806
807
  many_to_many: "N : N"
807
- }, Wh = ["=", "<", ">", "<=", ">="];
808
- function Xh({
808
+ }, Zh = ["=", "<", ">", "<=", ">="];
809
+ function ep({
809
810
  joinPlan: t,
810
811
  availableDataSources: a,
811
812
  onSave: r,
@@ -813,7 +814,7 @@ function Xh({
813
814
  onCancel: l
814
815
  }) {
815
816
  const { columnGroups: c, columns: d } = dl(), o = c.filter(
816
- (M) => M.entityName !== Fu
817
+ (M) => M.entityName !== Au
817
818
  ), {
818
819
  joinPlan: i,
819
820
  expandedJoins: f,
@@ -834,7 +835,7 @@ function Xh({
834
835
  removeJoinKey: _,
835
836
  generateSQLPreview: w,
836
837
  isValidConfiguration: y
837
- } = Uh({
838
+ } = Qh({
838
839
  initialJoinPlan: t,
839
840
  availableDataSources: a
840
841
  }), [P, V] = U(/* @__PURE__ */ new Set()), [$, L] = U(!1), b = (M) => {
@@ -985,7 +986,7 @@ function Xh({
985
986
  onClick: () => C(M.id),
986
987
  disabled: M.sequence === 1,
987
988
  "aria-label": "Move join earlier",
988
- children: /* @__PURE__ */ e(Zh, {})
989
+ children: /* @__PURE__ */ e(tp, {})
989
990
  }
990
991
  ),
991
992
  /* @__PURE__ */ e(
@@ -997,7 +998,7 @@ function Xh({
997
998
  onClick: () => S(M.id),
998
999
  disabled: M.sequence === i.joins.length,
999
1000
  "aria-label": "Move join later",
1000
- children: /* @__PURE__ */ e(ep, {})
1001
+ children: /* @__PURE__ */ e(ap, {})
1001
1002
  }
1002
1003
  ),
1003
1004
  /* @__PURE__ */ n(
@@ -1114,7 +1115,7 @@ function Xh({
1114
1115
  }),
1115
1116
  children: [
1116
1117
  /* @__PURE__ */ e(X, { className: "h-8 text-[12px]", children: /* @__PURE__ */ e(Z, {}) }),
1117
- /* @__PURE__ */ e(ee, { children: Gh.map((q) => /* @__PURE__ */ e(
1118
+ /* @__PURE__ */ e(ee, { children: Jh.map((q) => /* @__PURE__ */ e(
1118
1119
  z,
1119
1120
  {
1120
1121
  value: q.value,
@@ -1140,10 +1141,10 @@ function Xh({
1140
1141
  /* @__PURE__ */ e(X, { "aria-label": `Matches per row: ${M.source.name || "source"} to ${M.target.name || "target"}`, className: "h-8 text-[12px]", children: /* @__PURE__ */ e(Z, {}) }),
1141
1142
  /* @__PURE__ */ n(ee, { children: [
1142
1143
  /* @__PURE__ */ e(z, { value: "unknown", children: "Detect automatically when possible" }),
1143
- Object.entries(Qh).map(([q, G]) => /* @__PURE__ */ n(z, { value: q, children: [
1144
+ Object.entries(Wh).map(([q, G]) => /* @__PURE__ */ n(z, { value: q, children: [
1144
1145
  G,
1145
1146
  " (",
1146
- Jh[q],
1147
+ Xh[q],
1147
1148
  ")"
1148
1149
  ] }, q))
1149
1150
  ] })
@@ -1156,7 +1157,7 @@ function Xh({
1156
1157
  ] })
1157
1158
  ] }),
1158
1159
  M.source.name && M.target.name && A && B && /* @__PURE__ */ e("div", { className: "space-y-2", children: K ? /* @__PURE__ */ e(
1159
- tp,
1160
+ np,
1160
1161
  {
1161
1162
  join: M,
1162
1163
  getColumnsForEntity: b,
@@ -1263,7 +1264,7 @@ function Xh({
1263
1264
  {
1264
1265
  size: "xs",
1265
1266
  className: "gap-1.5",
1266
- onClick: () => r(Iu(i, d)),
1267
+ onClick: () => r(Pu(i, d)),
1267
1268
  disabled: !y(),
1268
1269
  children: [
1269
1270
  "Save joins",
@@ -1275,7 +1276,7 @@ function Xh({
1275
1276
  ] })
1276
1277
  ] });
1277
1278
  }
1278
- function Zh() {
1279
+ function tp() {
1279
1280
  return /* @__PURE__ */ e(
1280
1281
  "svg",
1281
1282
  {
@@ -1292,7 +1293,7 @@ function Zh() {
1292
1293
  }
1293
1294
  );
1294
1295
  }
1295
- function ep() {
1296
+ function ap() {
1296
1297
  return /* @__PURE__ */ e(
1297
1298
  "svg",
1298
1299
  {
@@ -1349,7 +1350,7 @@ function So({
1349
1350
  onValueChange: (u) => c(t.id, a, r, "operator", u),
1350
1351
  children: [
1351
1352
  /* @__PURE__ */ e(X, { className: "h-7 justify-center px-1 font-mono text-[11px]", children: /* @__PURE__ */ e(Z, {}) }),
1352
- /* @__PURE__ */ e(ee, { children: Wh.map((u) => /* @__PURE__ */ e(z, { value: u, children: u }, u)) })
1353
+ /* @__PURE__ */ e(ee, { children: Zh.map((u) => /* @__PURE__ */ e(z, { value: u, children: u }, u)) })
1353
1354
  ]
1354
1355
  }
1355
1356
  ) }) : /* @__PURE__ */ e("span", { className: "shrink-0 px-1 font-mono text-[12px] text-muted-foreground", children: "=" }),
@@ -1387,7 +1388,7 @@ function So({
1387
1388
  )
1388
1389
  ] });
1389
1390
  }
1390
- function tp({
1391
+ function np({
1391
1392
  join: t,
1392
1393
  getColumnsForEntity: a,
1393
1394
  addJoinKey: r,
@@ -1535,7 +1536,7 @@ function ko({
1535
1536
  /* @__PURE__ */ e(zt, { className: "text-[12px] text-muted-foreground", children: "Datasets joined together so a card can use fields from all of them." })
1536
1537
  ] }),
1537
1538
  /* @__PURE__ */ e(
1538
- Xh,
1539
+ ep,
1539
1540
  {
1540
1541
  joinPlan: s,
1541
1542
  availableDataSources: l,
@@ -1548,7 +1549,7 @@ function ko({
1548
1549
  t
1549
1550
  ] });
1550
1551
  }
1551
- function ap({
1552
+ function rp({
1552
1553
  joins: t,
1553
1554
  baseEntityId: a,
1554
1555
  availableDataSources: r,
@@ -1640,7 +1641,7 @@ function ap({
1640
1641
  ] })
1641
1642
  ] });
1642
1643
  }
1643
- function np({
1644
+ function sp({
1644
1645
  open: t,
1645
1646
  onOpenChange: a,
1646
1647
  variant: r = "button"
@@ -1697,7 +1698,7 @@ ${I.joinType} JOIN ${R.name}
1697
1698
  if (p.length < 2)
1698
1699
  return null;
1699
1700
  const v = d.joins.length > 0 && /* @__PURE__ */ e(ut, { side: "bottom", className: "ml-4 max-w-md overflow-hidden p-0", children: /* @__PURE__ */ e(
1700
- ap,
1701
+ rp,
1701
1702
  {
1702
1703
  joins: d.joins,
1703
1704
  baseEntityId: d.baseEntity.name,
@@ -1759,9 +1760,9 @@ ${I.joinType} JOIN ${R.name}
1759
1760
  )
1760
1761
  ] });
1761
1762
  }
1762
- function rp() {
1763
+ function lp() {
1763
1764
  var Y, k, D, M;
1764
- const [t, a] = U(!1), [r, s] = U(!1), [l, c] = U(!1), d = F((A) => A.card.dataSource), o = F((A) => A.card), i = F((A) => A.isDevMode), { updateCardConfig: f, updateDataSource: u } = be(), { autoJoinMetadata: m } = ct(o), { semanticDomains: p } = Um(), h = se(
1765
+ const [t, a] = U(!1), [r, s] = U(!1), [l, c] = U(!1), d = F((A) => A.card.dataSource), o = F((A) => A.card), i = F((A) => A.isDevMode), { updateCardConfig: f, updateDataSource: u } = be(), { autoJoinMetadata: m } = ct(o), { semanticDomains: p } = Qm(), h = se(
1765
1766
  () => new Map(
1766
1767
  p.map((A) => [
1767
1768
  A.id,
@@ -1779,13 +1780,13 @@ function rp() {
1779
1780
  ...d,
1780
1781
  selectedEntities: (d == null ? void 0 : d.selectedEntities) || []
1781
1782
  }, x = Xi(S.selectedEntities), v = x.length, T = Zi(o), N = se(() => ec(o), [o]), g = se(
1782
- () => Au({
1783
+ () => Ru({
1783
1784
  ...T,
1784
1785
  selectedFields: N,
1785
1786
  dataSourceEntities: x
1786
1787
  }),
1787
1788
  [T, N, x]
1788
- ), E = v === 0 ? "Choose dataset" : v === 1 ? sp(x[0], h) : `${v} datasets`, I = kr(o), R = ((Y = I == null ? void 0 : I.joins) == null ? void 0 : Y.length) ?? 0, _ = Is(
1789
+ ), E = v === 0 ? "Choose dataset" : v === 1 ? op(x[0], h) : `${v} datasets`, I = kr(o), R = ((Y = I == null ? void 0 : I.joins) == null ? void 0 : Y.length) ?? 0, _ = Is(
1789
1790
  I,
1790
1791
  x
1791
1792
  ), w = _.length > 0, y = !i && (v > 1 || R > 0), P = !!(m != null && m.autoResolved);
@@ -1797,7 +1798,7 @@ function rp() {
1797
1798
  o && Is(I, B).length > 0 && f(o.id, ga(o, void 0)), u({
1798
1799
  ...S,
1799
1800
  ...S.mode === "semanticDomain" ? {
1800
- semanticDomainId: Qm(B)
1801
+ semanticDomainId: Wm(B)
1801
1802
  } : {},
1802
1803
  selectedEntities: B
1803
1804
  });
@@ -1857,7 +1858,7 @@ function rp() {
1857
1858
  /* @__PURE__ */ e("span", { className: "font-mono text-[10px] tabular-nums text-muted-foreground/70", children: v })
1858
1859
  ] }),
1859
1860
  v === 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: x.map((A, B) => {
1860
- const j = g[B], le = (j ? Pu(j.state) : !1) ? Ru(j == null ? void 0 : j.state).tag : null;
1861
+ const j = g[B], le = (j ? Ou(j.state) : !1) ? Lu(j == null ? void 0 : j.state).tag : null;
1861
1862
  return /* @__PURE__ */ n(
1862
1863
  "li",
1863
1864
  {
@@ -1872,7 +1873,7 @@ function rp() {
1872
1873
  ),
1873
1874
  /* @__PURE__ */ n("div", { className: "min-w-0 flex-1", children: [
1874
1875
  /* @__PURE__ */ e("p", { className: "truncate text-[13px] text-foreground", children: Or(A) }),
1875
- /* @__PURE__ */ e("p", { className: "truncate text-[11px] text-muted-foreground", children: op(A, h) }),
1876
+ /* @__PURE__ */ e("p", { className: "truncate text-[11px] text-muted-foreground", children: cp(A, h) }),
1876
1877
  le && j && /* @__PURE__ */ e(
1877
1878
  "p",
1878
1879
  {
@@ -1887,7 +1888,7 @@ function rp() {
1887
1888
  {
1888
1889
  type: "button",
1889
1890
  onClick: () => $(A),
1890
- "aria-label": `Remove ${lp(A, h)}`,
1891
+ "aria-label": `Remove ${ip(A, h)}`,
1891
1892
  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",
1892
1893
  children: /* @__PURE__ */ e(rt, { className: "h-3 w-3" })
1893
1894
  }
@@ -1991,7 +1992,7 @@ function rp() {
1991
1992
  )
1992
1993
  ] }),
1993
1994
  /* @__PURE__ */ e(
1994
- Gm,
1995
+ Jm,
1995
1996
  {
1996
1997
  incomingSelectedEntities: (d == null ? void 0 : d.selectedEntities) || [],
1997
1998
  open: r,
@@ -1999,28 +2000,28 @@ function rp() {
1999
2000
  dataSource: S
2000
2001
  }
2001
2002
  ),
2002
- y && !w && /* @__PURE__ */ e("div", { className: "hidden", children: /* @__PURE__ */ e(np, { open: l, onOpenChange: c }) })
2003
+ y && !w && /* @__PURE__ */ e("div", { className: "hidden", children: /* @__PURE__ */ e(sp, { open: l, onOpenChange: c }) })
2003
2004
  ] });
2004
2005
  }
2005
2006
  function Or(t) {
2006
2007
  return "label" in t && t.label ? t.label : t.name || "Dataset";
2007
2008
  }
2008
- function sp(t, a) {
2009
+ function op(t, a) {
2009
2010
  const r = Or(t), s = Fr(t, a);
2010
2011
  return s ? `${r} · ${s}` : r;
2011
2012
  }
2012
- function lp(t, a) {
2013
+ function ip(t, a) {
2013
2014
  const r = Or(t), s = Fr(t, a);
2014
2015
  return s ? `${r} from ${s}` : r;
2015
2016
  }
2016
- function op(t, a) {
2017
+ function cp(t, a) {
2017
2018
  const r = Fr(t, a);
2018
2019
  if (r) return r;
2019
2020
  const s = [];
2020
2021
  return t.connectionType && s.push(String(t.connectionType)), t.database && s.push(t.database), t.schema && s.push(t.schema), s.join(" · ");
2021
2022
  }
2022
2023
  function To({ isVisible: t }) {
2023
- Jm();
2024
+ Xm();
2024
2025
  const [a, r] = U(!1);
2025
2026
  return /* @__PURE__ */ n(
2026
2027
  "div",
@@ -2035,10 +2036,10 @@ function To({ isVisible: t }) {
2035
2036
  }
2036
2037
  ),
2037
2038
  children: [
2038
- /* @__PURE__ */ e("div", { className: "px-4 pt-4", children: /* @__PURE__ */ e(rp, {}) }),
2039
+ /* @__PURE__ */ e("div", { className: "px-4 pt-4", children: /* @__PURE__ */ e(lp, {}) }),
2039
2040
  /* @__PURE__ */ e("div", { className: "min-h-0 flex-1", children: /* @__PURE__ */ e(Yi, {}) }),
2040
2041
  /* @__PURE__ */ e(
2041
- Hh,
2042
+ Gh,
2042
2043
  {
2043
2044
  open: a,
2044
2045
  onOpenChange: r
@@ -2074,12 +2075,12 @@ const nr = ({
2074
2075
  ...r,
2075
2076
  children: t && /* @__PURE__ */ e("div", { className: "z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border", children: /* @__PURE__ */ e(pl, { className: "h-2.5 w-2.5" }) })
2076
2077
  }
2077
- ), ip = 3, rr = "Self-heal", Pn = {
2078
+ ), dp = 3, rr = "Self-heal", Pn = {
2078
2079
  grounding: "Analyzing context",
2079
2080
  drafting: "Drafting SQL",
2080
2081
  validating: "Validating SQL",
2081
2082
  repairing: rr
2082
- }, Ca = "Unable to generate a SQL draft right now. Try again.", cp = "Choose a data source for this card before describing a query.", dp = "Validation service unavailable. You can still replace and run.";
2083
+ }, Ca = "Unable to generate a SQL draft right now. Try again.", up = "Choose a data source for this card before describing a query.", mp = "Validation service unavailable. You can still replace and run.";
2083
2084
  function wa(t, a) {
2084
2085
  typeof window > "u" || window.dispatchEvent(
2085
2086
  new CustomEvent("semaphor:inline-query-writer", {
@@ -2104,10 +2105,10 @@ const Sa = {
2104
2105
  validation: null,
2105
2106
  errorMessage: ""
2106
2107
  };
2107
- function up(t, a) {
2108
- return t === rr && a > 0 ? `${rr} ${a}/${ip}` : t;
2108
+ function hp(t, a) {
2109
+ return t === rr && a > 0 ? `${rr} ${a}/${dp}` : t;
2109
2110
  }
2110
- async function mp(t, a) {
2111
+ async function pp(t, a) {
2111
2112
  try {
2112
2113
  const r = await t.json();
2113
2114
  if (typeof (r == null ? void 0 : r.error) == "string" && r.error.trim())
@@ -2116,7 +2117,7 @@ async function mp(t, a) {
2116
2117
  }
2117
2118
  return a;
2118
2119
  }
2119
- async function hp(t, a) {
2120
+ async function fp(t, a) {
2120
2121
  const r = (d) => {
2121
2122
  const o = d.trim();
2122
2123
  o && a(JSON.parse(o));
@@ -2138,7 +2139,7 @@ async function hp(t, a) {
2138
2139
  }
2139
2140
  r(c + l.decode());
2140
2141
  }
2141
- function pp({
2142
+ function gp({
2142
2143
  currentSql: t,
2143
2144
  selectedDatabaseName: a,
2144
2145
  selectedSchemaName: r,
@@ -2244,11 +2245,11 @@ function pp({
2244
2245
  if (!Me()) return;
2245
2246
  if (!fe.ok) {
2246
2247
  je(
2247
- await mp(fe, Ca)
2248
+ await pp(fe, Ca)
2248
2249
  );
2249
2250
  return;
2250
2251
  }
2251
- await hp(fe, ze), ce || je(Ca);
2252
+ await fp(fe, ze), ce || je(Ca);
2252
2253
  } catch {
2253
2254
  je(Ca);
2254
2255
  } finally {
@@ -2271,7 +2272,7 @@ function pp({
2271
2272
  runId: Ve,
2272
2273
  status: "failed",
2273
2274
  prompt: Se,
2274
- errorMessage: cp
2275
+ errorMessage: up
2275
2276
  });
2276
2277
  return;
2277
2278
  }
@@ -2342,7 +2343,7 @@ function pp({
2342
2343
  } : {
2343
2344
  label: "Validation unavailable",
2344
2345
  className: "border-border/60 bg-muted/20 text-muted-foreground",
2345
- detail: dp
2346
+ detail: mp
2346
2347
  };
2347
2348
  return /* @__PURE__ */ n(
2348
2349
  "div",
@@ -2370,7 +2371,7 @@ function pp({
2370
2371
  }
2371
2372
  ),
2372
2373
  /* @__PURE__ */ n(It, { open: v, onOpenChange: _e, children: [
2373
- /* @__PURE__ */ e(Su, { asChild: !0, children: /* @__PURE__ */ e("div", { className: "pointer-events-none absolute inset-0" }) }),
2374
+ /* @__PURE__ */ e(Tu, { asChild: !0, children: /* @__PURE__ */ e("div", { className: "pointer-events-none absolute inset-0" }) }),
2374
2375
  /* @__PURE__ */ n("div", { className: "absolute right-1 flex items-center gap-1", children: [
2375
2376
  (q || d) && /* @__PURE__ */ e(
2376
2377
  ne,
@@ -2404,7 +2405,7 @@ function pp({
2404
2405
  },
2405
2406
  "aria-label": $ ? "Stop AI generation" : Ne,
2406
2407
  title: $ ? "Stop AI generation" : Ne,
2407
- children: $ ? /* @__PURE__ */ e(fl, { className: "size-3 fill-current" }) : /* @__PURE__ */ e(Vh, { className: "size-3.5" })
2408
+ children: $ ? /* @__PURE__ */ e(fl, { className: "size-3 fill-current" }) : /* @__PURE__ */ e(Kh, { className: "size-3.5" })
2408
2409
  }
2409
2410
  )
2410
2411
  ] }),
@@ -2485,7 +2486,7 @@ function pp({
2485
2486
  "rounded-full border px-2 py-0.5 text-[11px]",
2486
2487
  Fe ? "border-foreground/30 bg-foreground/10 text-foreground" : Me ? "border-border/60 bg-muted/20 text-muted-foreground" : "border-border/50 bg-background text-muted-foreground/80"
2487
2488
  ].join(" "),
2488
- children: up(oe, N.attempt)
2489
+ children: hp(oe, N.attempt)
2489
2490
  },
2490
2491
  `${oe}-${Se}`
2491
2492
  );
@@ -2594,7 +2595,7 @@ function pp({
2594
2595
  }
2595
2596
  );
2596
2597
  }
2597
- function fp({
2598
+ function xp({
2598
2599
  activeEditor: t,
2599
2600
  isRunning: a,
2600
2601
  sqlEditor: r,
@@ -2690,7 +2691,7 @@ function _s(t, a) {
2690
2691
  snapshots: {}
2691
2692
  }), t.current;
2692
2693
  }
2693
- function gp({
2694
+ function bp({
2694
2695
  cardId: t,
2695
2696
  expandedEditor: a
2696
2697
  }) {
@@ -2759,7 +2760,7 @@ function Do({
2759
2760
  }
2760
2761
  };
2761
2762
  }
2762
- function xp({ value: t }) {
2763
+ function vp({ value: t }) {
2763
2764
  const [a, r] = U(!1), s = Ke(null);
2764
2765
  we(() => () => {
2765
2766
  s.current && clearTimeout(s.current);
@@ -2803,7 +2804,7 @@ function xp({ value: t }) {
2803
2804
  }
2804
2805
  );
2805
2806
  }
2806
- function bp({
2807
+ function yp({
2807
2808
  hint: t
2808
2809
  }) {
2809
2810
  const { popoverProps: a, triggerProps: r, contentProps: s } = Do();
@@ -2818,7 +2819,7 @@ function bp({
2818
2819
  ...r,
2819
2820
  className: "h-7 w-7 shrink-0 gap-1.5 border border-amber-300/60 bg-amber-50/60 px-0 text-amber-800 hover:bg-amber-100/70 hover:text-amber-900 @[1550px]:w-auto @[1550px]:px-2 dark:border-amber-500/30 dark:bg-amber-500/10 dark:text-amber-300 dark:hover:bg-amber-500/15 dark:hover:text-amber-200",
2820
2821
  children: [
2821
- /* @__PURE__ */ e(Wm, { className: "h-3.5 w-3.5", strokeWidth: 1.75 }),
2822
+ /* @__PURE__ */ e(Zm, { className: "h-3.5 w-3.5", strokeWidth: 1.75 }),
2822
2823
  /* @__PURE__ */ e("span", { className: "hidden @[1550px]:inline", children: "Dashboard filters off" })
2823
2824
  ]
2824
2825
  }
@@ -2836,7 +2837,7 @@ function bp({
2836
2837
  /* @__PURE__ */ e("p", { className: "text-[13px] font-medium", children: "Dashboard filters aren’t applied" }),
2837
2838
  /* @__PURE__ */ e("p", { className: "text-[12px] leading-relaxed text-muted-foreground", children: t.description })
2838
2839
  ] }),
2839
- /* @__PURE__ */ e(xp, { value: t.helper }),
2840
+ /* @__PURE__ */ e(vp, { value: t.helper }),
2840
2841
  /* @__PURE__ */ e(
2841
2842
  "a",
2842
2843
  {
@@ -2852,7 +2853,7 @@ function bp({
2852
2853
  )
2853
2854
  ] });
2854
2855
  }
2855
- function vp({
2856
+ function Np({
2856
2857
  activeEditor: t,
2857
2858
  onExpand: a,
2858
2859
  trailing: r
@@ -2893,7 +2894,7 @@ function vp({
2893
2894
  ] })
2894
2895
  );
2895
2896
  }
2896
- function yp({ value: t }) {
2897
+ function Cp({ value: t }) {
2897
2898
  const [a, r] = U(!1), s = Ke(null);
2898
2899
  return we(() => () => {
2899
2900
  s.current && clearTimeout(s.current);
@@ -2922,7 +2923,7 @@ function yp({ value: t }) {
2922
2923
  }
2923
2924
  );
2924
2925
  }
2925
- function Np() {
2926
+ function wp() {
2926
2927
  const { popoverProps: t, triggerProps: a, contentProps: r } = Do();
2927
2928
  return /* @__PURE__ */ n(It, { ...t, children: [
2928
2929
  /* @__PURE__ */ e(Vt, { asChild: !0, children: /* @__PURE__ */ n(
@@ -2966,7 +2967,7 @@ function Np() {
2966
2967
  /* @__PURE__ */ n("div", { className: "overflow-hidden rounded-[5px] border border-border/60", children: [
2967
2968
  /* @__PURE__ */ n("div", { className: "flex items-center justify-between border-b border-border/60 bg-muted/30 px-2 py-0.5", children: [
2968
2969
  /* @__PURE__ */ e("span", { className: "text-[11px] text-muted-foreground", children: "Example" }),
2969
- /* @__PURE__ */ e(yp, { value: As })
2970
+ /* @__PURE__ */ e(Cp, { value: As })
2970
2971
  ] }),
2971
2972
  /* @__PURE__ */ e("div", { className: "max-h-40 overflow-auto", children: /* @__PURE__ */ e(
2972
2973
  Xt,
@@ -2987,7 +2988,7 @@ function Np() {
2987
2988
  )
2988
2989
  ] });
2989
2990
  }
2990
- function Cp({
2991
+ function Sp({
2991
2992
  open: t,
2992
2993
  onOpenChange: a,
2993
2994
  onConfirm: r
@@ -3002,7 +3003,7 @@ function Cp({
3002
3003
  /* @__PURE__ */ e(
3003
3004
  uc,
3004
3005
  {
3005
- className: J(ku({ variant: "destructive", size: "xs" })),
3006
+ className: J(Mu({ variant: "destructive", size: "xs" })),
3006
3007
  onClick: r,
3007
3008
  children: "Clear"
3008
3009
  }
@@ -3010,7 +3011,7 @@ function Cp({
3010
3011
  ] })
3011
3012
  ] }) });
3012
3013
  }
3013
- function wp(t, a) {
3014
+ function kp(t, a) {
3014
3015
  return {
3015
3016
  ...t,
3016
3017
  sql: "",
@@ -3024,7 +3025,7 @@ function wp(t, a) {
3024
3025
  type: a ? t.type : Ar
3025
3026
  };
3026
3027
  }
3027
- function Sp() {
3028
+ function Tp() {
3028
3029
  const { setTempQueryData: t } = be(), a = dr(), r = F((N) => N.tempQueryData), s = F((N) => N.card), l = st(), c = se(() => l !== s.type ? { ...s, type: l } : s, [s, l]), { queryKey: d } = ct(c), {
3029
3030
  setCardSql: o,
3030
3031
  setSqlGen: i,
@@ -3045,7 +3046,7 @@ function Sp() {
3045
3046
  queryKey: d,
3046
3047
  queryData: N
3047
3048
  }), a.setQueryData(d, null), a.removeQueries({ queryKey: d, exact: !0 }), o(""), i({}), p(), h(void 0), f(""), u(""), m({});
3048
- const g = F.getState().frame, E = F.getState().card, I = sa(g, E), R = ((w = I == null ? void 0 : I.customCardPreferences) == null ? void 0 : w.visualType) === "multiple" || !!((y = I == null ? void 0 : I.customCardPreferences) != null && y.dataInputCardIds) || (((P = I == null ? void 0 : I.customCardPreferences) == null ? void 0 : P.minInputs) || 0) > 1 || (((V = I == null ? void 0 : I.customCardPreferences) == null ? void 0 : V.maxInputs) || 0) > 1, _ = wp(E, R);
3049
+ const g = F.getState().frame, E = F.getState().card, I = sa(g, E), R = ((w = I == null ? void 0 : I.customCardPreferences) == null ? void 0 : w.visualType) === "multiple" || !!((y = I == null ? void 0 : I.customCardPreferences) != null && y.dataInputCardIds) || (((P = I == null ? void 0 : I.customCardPreferences) == null ? void 0 : P.minInputs) || 0) > 1 || (((V = I == null ? void 0 : I.customCardPreferences) == null ? void 0 : V.maxInputs) || 0) > 1, _ = kp(E, R);
3049
3050
  S({
3050
3051
  ...g,
3051
3052
  cards: g.cards.map(
@@ -3056,15 +3057,15 @@ function Sp() {
3056
3057
  return T;
3057
3058
  }
3058
3059
  const Vs = "[&_.code-editor-pre]:!pb-14 [&_.code-editor-textarea]:!pb-14";
3059
- function kp() {
3060
+ function Mp() {
3060
3061
  var ze, fe, Ie, We;
3061
- const t = dr(), { tokenProps: a } = Zt(), r = ((fe = (ze = a.config) == null ? void 0 : ze.projectFeatures) == null ? void 0 : fe.features.aiWritingHelpers) !== !1, [s, l] = U("sql"), [c, d] = U(!1), [o, i] = U(!1), f = Sp(), [u, m] = U(!1), [p, h] = U(null), C = F((re) => re.frame), S = F((re) => re.card), {
3062
+ const t = dr(), { tokenProps: a } = Zt(), r = ((fe = (ze = a.config) == null ? void 0 : ze.projectFeatures) == null ? void 0 : fe.features.aiWritingHelpers) !== !1, [s, l] = U("sql"), [c, d] = U(!1), [o, i] = U(!1), f = Tp(), [u, m] = U(!1), [p, h] = U(null), C = F((re) => re.frame), S = F((re) => re.card), {
3062
3063
  inlineSqlEditorRef: x,
3063
3064
  inlinePythonEditorRef: v,
3064
3065
  expandedSqlEditorRef: T,
3065
3066
  expandedPythonEditorRef: N,
3066
3067
  captureEditorSessions: g
3067
- } = gp({
3068
+ } = bp({
3068
3069
  cardId: S.id,
3069
3070
  expandedEditor: p
3070
3071
  });
@@ -3115,7 +3116,7 @@ function kp() {
3115
3116
  S,
3116
3117
  b,
3117
3118
  V == null ? void 0 : V.slots
3118
- ) ?? S.type, [y, $, b, S, V == null ? void 0 : V.slots]), k = se(() => Y !== S.type ? { ...S, type: Y } : S, [S, Y]), D = se(() => _ === 0 ? null : Ou(S == null ? void 0 : S.sql), [S == null ? void 0 : S.sql, _]), M = Ke(!0), {
3119
+ ) ?? S.type, [y, $, b, S, V == null ? void 0 : V.slots]), k = se(() => Y !== S.type ? { ...S, type: Y } : S, [S, Y]), D = se(() => _ === 0 ? null : Yu(S == null ? void 0 : S.sql), [S == null ? void 0 : S.sql, _]), M = Ke(!0), {
3119
3120
  setCardCustomCfg: A,
3120
3121
  setQueryResultColumns: B,
3121
3122
  setCardSql: j,
@@ -3150,7 +3151,7 @@ function kp() {
3150
3151
  position: "top-center",
3151
3152
  richColors: !0
3152
3153
  }), de.records.length > 0) {
3153
- const { keys: re } = xl(de.records), Be = yt ? Lu(de.records).value : void 0;
3154
+ const { keys: re } = xl(de.records), Be = yt ? _u(de.records).value : void 0;
3154
3155
  B(
3155
3156
  S.type === "kpi" ? Be ? [Be] : [] : re,
3156
3157
  de.columnKeyMap,
@@ -3249,18 +3250,18 @@ function kp() {
3249
3250
  className: "flex min-h-0 grow flex-col",
3250
3251
  children: [
3251
3252
  /* @__PURE__ */ e(
3252
- vp,
3253
+ Np,
3253
3254
  {
3254
3255
  activeEditor: s,
3255
3256
  onExpand: () => Fe(s),
3256
3257
  trailing: /* @__PURE__ */ n(ue, { children: [
3257
3258
  D ? /* @__PURE__ */ e(
3258
- bp,
3259
+ yp,
3259
3260
  {
3260
3261
  hint: D
3261
3262
  }
3262
3263
  ) : null,
3263
- s === "python" ? /* @__PURE__ */ e(Np, {}) : null
3264
+ s === "python" ? /* @__PURE__ */ e(wp, {}) : null
3264
3265
  ] })
3265
3266
  }
3266
3267
  ),
@@ -3318,7 +3319,7 @@ function kp() {
3318
3319
  className: "pointer-events-none absolute inset-x-4 bottom-3 z-10 flex items-end justify-end gap-2",
3319
3320
  children: [
3320
3321
  r ? c ? /* @__PURE__ */ e("div", { className: "pointer-events-auto flex min-w-0 max-w-[560px] flex-1", children: /* @__PURE__ */ e(
3321
- pp,
3322
+ gp,
3322
3323
  {
3323
3324
  currentSql: S == null ? void 0 : S.sql,
3324
3325
  selectedDatabaseName: E,
@@ -3373,7 +3374,7 @@ function kp() {
3373
3374
  }
3374
3375
  ),
3375
3376
  /* @__PURE__ */ e(
3376
- Cp,
3377
+ Sp,
3377
3378
  {
3378
3379
  open: o,
3379
3380
  onOpenChange: i,
@@ -3381,7 +3382,7 @@ function kp() {
3381
3382
  }
3382
3383
  ),
3383
3384
  /* @__PURE__ */ e(
3384
- fp,
3385
+ xp,
3385
3386
  {
3386
3387
  activeEditor: p,
3387
3388
  isRunning: ce,
@@ -3409,13 +3410,13 @@ function kp() {
3409
3410
  )
3410
3411
  );
3411
3412
  }
3412
- function Tp(t) {
3413
+ function Dp(t) {
3413
3414
  const a = ge((h) => h.dashboard), r = ge((h) => h.adHocFilterValues), s = ge((h) => h.selectedSheetId), l = ge(
3414
3415
  (h) => h.dashboardInputValues
3415
3416
  ), c = ge(
3416
3417
  (h) => h.actions.getCard(t)
3417
3418
  ), d = F((h) => h.editorContext), o = F((h) => h.card), i = ur(), u = (d == null ? void 0 : d.type) === "documentSection" && d.cardId === t ? d : void 0, m = u ? o : c;
3418
- if (Yu({
3419
+ if (Vu({
3419
3420
  dashboard: a,
3420
3421
  dashboardInputValues: l,
3421
3422
  // The visual editor's filter preview: authoring never sees carried state.
@@ -3438,7 +3439,7 @@ function Tp(t) {
3438
3439
  cardFilterValues: u.documentFilterValues || []
3439
3440
  } : {
3440
3441
  cardFilters: [],
3441
- cardFilterValues: ih(
3442
+ cardFilterValues: dh(
3442
3443
  r,
3443
3444
  s
3444
3445
  )
@@ -3458,10 +3459,10 @@ const Rn = [
3458
3459
  { value: "table", label: "Table" },
3459
3460
  { value: "detailTable", label: "Detail" }
3460
3461
  ];
3461
- function Mp({ className: t }) {
3462
+ function Ep({ className: t }) {
3462
3463
  const a = F((h) => h.card), r = F((h) => h.frame), s = F((h) => h.editorContext), l = st(), { setCard: c, updateCardInFrame: d } = be(), o = (s == null ? void 0 : s.type) === "documentSection" && !!s.lockedKind, i = (s == null ? void 0 : s.type) === "documentSection" ? Rn.filter((h) => h.value === "table") : Rn, f = Rn.some(
3463
3464
  (h) => h.value === l
3464
- ), u = La(a.config, a.type), m = _u(a, r.cards);
3465
+ ), u = La(a.config, a.type), m = Bu(a, r.cards);
3465
3466
  if (!f || !u || m || o || i.length < 2)
3466
3467
  return /* @__PURE__ */ e(
3467
3468
  "div",
@@ -3474,7 +3475,7 @@ function Mp({ className: t }) {
3474
3475
  const p = (h) => {
3475
3476
  if (h === l || m)
3476
3477
  return;
3477
- const C = h, S = a.config ?? {}, x = Vu(
3478
+ const C = h, S = a.config ?? {}, x = Ku(
3478
3479
  l,
3479
3480
  C,
3480
3481
  S
@@ -3504,7 +3505,7 @@ function Mp({ className: t }) {
3504
3505
  );
3505
3506
  }) });
3506
3507
  }
3507
- const Dp = {
3508
+ const Fp = {
3508
3509
  async writeTextToClipboard(t) {
3509
3510
  return typeof navigator > "u" || !navigator.clipboard ? !1 : (await navigator.clipboard.writeText(t), !0);
3510
3511
  }
@@ -3551,7 +3552,7 @@ function Io({
3551
3552
  }
3552
3553
  );
3553
3554
  }
3554
- const Ka = 50, Ep = {
3555
+ const Ka = 50, Ip = {
3555
3556
  request: "Query request",
3556
3557
  response: "Query response"
3557
3558
  };
@@ -3562,7 +3563,7 @@ function Bs(t) {
3562
3563
  return console.error("Unable to stringify debug payload", a), null;
3563
3564
  }
3564
3565
  }
3565
- function Fp(t) {
3566
+ function Ap(t) {
3566
3567
  if (!t || typeof t != "object")
3567
3568
  return { value: t };
3568
3569
  const a = t.records;
@@ -3603,16 +3604,16 @@ function Po({
3603
3604
  onClose: a,
3604
3605
  className: r
3605
3606
  }) {
3606
- const s = t.queryResponse !== void 0, [l, c] = U("request"), d = l === "response" && !s ? "request" : l, o = Ep[d], i = d === "request" ? t.queryRequest : t.queryResponse, f = se(() => {
3607
+ const s = t.queryResponse !== void 0, [l, c] = U("request"), d = l === "response" && !s ? "request" : l, o = Ip[d], i = d === "request" ? t.queryRequest : t.queryResponse, f = se(() => {
3607
3608
  if (i === void 0) return null;
3608
- const m = d === "response" ? Fp(i) : { value: i }, p = Bs(m.value);
3609
+ const m = d === "response" ? Ap(i) : { value: i }, p = Bs(m.value);
3609
3610
  return p ? { json: p, truncationMessage: m.truncationMessage } : null;
3610
3611
  }, [i, d]), u = async () => {
3611
3612
  const m = i === void 0 ? null : Bs(i);
3612
3613
  if (!m)
3613
3614
  return it.error(`No ${o.toLowerCase()} available`), !1;
3614
3615
  try {
3615
- return await Dp.writeTextToClipboard(m) ? (it.success(`${o} copied`), !0) : (it.error("Clipboard is not available"), !1);
3616
+ return await Fp.writeTextToClipboard(m) ? (it.success(`${o} copied`), !0) : (it.error("Clipboard is not available"), !1);
3616
3617
  } catch (p) {
3617
3618
  return console.error("Failed to copy debug payload", p), it.error(`Unable to copy ${o.toLowerCase()}`), !1;
3618
3619
  }
@@ -3697,8 +3698,8 @@ function Po({
3697
3698
  }
3698
3699
  );
3699
3700
  }
3700
- const Ip = 1200;
3701
- function Ap(t) {
3701
+ const Pp = 1200;
3702
+ function Rp(t) {
3702
3703
  var s;
3703
3704
  const a = t.target;
3704
3705
  if (a instanceof HTMLInputElement || a instanceof HTMLTextAreaElement)
@@ -3728,7 +3729,7 @@ function Ro({
3728
3729
  }, p = () => {
3729
3730
  u.current && clearTimeout(u.current), f(!0), u.current = setTimeout(() => {
3730
3731
  f(!1), u.current = void 0;
3731
- }, Ip);
3732
+ }, Pp);
3732
3733
  }, h = async () => {
3733
3734
  try {
3734
3735
  let v = !1;
@@ -3737,7 +3738,7 @@ function Ro({
3737
3738
  console.error("Failed to copy text", v);
3738
3739
  }
3739
3740
  }, C = (v) => {
3740
- c == null || c(v), !(v.defaultPrevented || Ap(v)) && h();
3741
+ c == null || c(v), !(v.defaultPrevented || Rp(v)) && h();
3741
3742
  }, S = J(
3742
3743
  "group/copy-on-click relative block w-full cursor-pointer rounded-control text-left transition-[background-color,box-shadow] duration-150",
3743
3744
  "hover:bg-muted/30 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring motion-reduce:transition-none",
@@ -3781,9 +3782,9 @@ function Ro({
3781
3782
  }
3782
3783
  ) });
3783
3784
  }
3784
- const Pp = "This visual couldn't load its data.";
3785
+ const Op = "This visual couldn't load its data.";
3785
3786
  function Oo({
3786
- title: t = Pp,
3787
+ title: t = Op,
3787
3788
  hint: a,
3788
3789
  detail: r,
3789
3790
  defaultDetailsOpen: s = !1,
@@ -3839,7 +3840,7 @@ function Oo({
3839
3840
  }
3840
3841
  );
3841
3842
  }
3842
- const Rp = () => {
3843
+ const Lp = () => {
3843
3844
  };
3844
3845
  function Lo({
3845
3846
  sql: t,
@@ -3882,7 +3883,7 @@ function Lo({
3882
3883
  Xt,
3883
3884
  {
3884
3885
  value: t,
3885
- onValueChange: Rp,
3886
+ onValueChange: Lp,
3886
3887
  language: "sql",
3887
3888
  readOnly: !0,
3888
3889
  embedded: !0,
@@ -4010,7 +4011,7 @@ function _o(t) {
4010
4011
  handleOpenInEditor: !r && Tr(a.type) ? c : void 0
4011
4012
  };
4012
4013
  }
4013
- function Op() {
4014
+ function Yp() {
4014
4015
  const { authToken: t, tokenProps: a } = Zt(), { currentUser: r } = sn(), s = mc({
4015
4016
  mutationFn: async (l) => {
4016
4017
  if (!(t != null && t.accessToken))
@@ -4051,7 +4052,7 @@ function Op() {
4051
4052
  reset: s.reset
4052
4053
  };
4053
4054
  }
4054
- function Lp(t, a, r) {
4055
+ function _p(t, a, r) {
4055
4056
  return {
4056
4057
  category: t,
4057
4058
  userMessage: r,
@@ -4064,14 +4065,14 @@ function Lp(t, a, r) {
4064
4065
  }
4065
4066
  };
4066
4067
  }
4067
- function Yp({
4068
+ function Vp({
4068
4069
  code: t,
4069
4070
  language: a,
4070
4071
  wrapLongLines: r = !1,
4071
4072
  className: s,
4072
4073
  ariaLabel: l
4073
4074
  }) {
4074
- const c = se(() => Tu(t, a), [t, a]);
4075
+ const c = se(() => Du(t, a), [t, a]);
4075
4076
  return (
4076
4077
  // `.code-editor` scopes the token colors — see code-editor.css.
4077
4078
  /* @__PURE__ */ e("div", { className: J("code-editor", s), children: /* @__PURE__ */ e(
@@ -4114,7 +4115,7 @@ function _r({
4114
4115
  isError: p,
4115
4116
  data: h,
4116
4117
  reset: C
4117
- } = Op(), S = m ? "Feedback Sent" : "Report a Query Issue", x = m ? "Your feedback was sent to the support team." : "Tell us what happened. We’ll include technical details to help support investigate.", v = () => {
4118
+ } = Yp(), S = m ? "Feedback Sent" : "Report a Query Issue", x = m ? "Your feedback was sent to the support team." : "Tell us what happened. We’ll include technical details to help support investigate.", v = () => {
4118
4119
  const P = {
4119
4120
  ...r,
4120
4121
  userMessage: c.trim() || void 0
@@ -4232,7 +4233,7 @@ function _r({
4232
4233
  )
4233
4234
  ] }),
4234
4235
  /* @__PURE__ */ e(na, { className: "mt-2 min-w-0", children: /* @__PURE__ */ e(mn, { className: "h-[300px] w-full rounded-card border bg-muted/50 p-4", children: /* @__PURE__ */ e("div", { className: "min-w-0 max-w-full overflow-x-hidden text-xs", children: /* @__PURE__ */ e(
4235
- Yp,
4236
+ Vp,
4236
4237
  {
4237
4238
  code: JSON.stringify(g, null, 2),
4238
4239
  language: "json",
@@ -4344,13 +4345,13 @@ function Vo(t, a) {
4344
4345
  feedbackPayload: f
4345
4346
  };
4346
4347
  }
4347
- const _p = "__editor_sql__", Vp = "__editor_python__";
4348
- function Bp(t) {
4348
+ const Bp = "__editor_sql__", Kp = "__editor_python__";
4349
+ function qp(t) {
4349
4350
  var r;
4350
- const a = Bu(t.python || "");
4351
+ const a = qu(t.python || "");
4351
4352
  return {
4352
- sql: (r = t.sql) != null && r.trim() ? _p : "",
4353
- python: a.trim() ? Vp : ""
4353
+ sql: (r = t.sql) != null && r.trim() ? Bp : "",
4354
+ python: a.trim() ? Kp : ""
4354
4355
  };
4355
4356
  }
4356
4357
  function Bo({
@@ -4409,7 +4410,7 @@ function Bo({
4409
4410
  setFeedbackDialogOpen: M,
4410
4411
  handleSendFeedback: A,
4411
4412
  feedbackPayload: B
4412
- } = Vo(V, $ || s.sql || s.python), j = se(() => (w == null ? void 0 : w.records) || [], [w == null ? void 0 : w.records]), { setCard: K, updateCardInFrame: le } = be(), ae = b.id, te = b.config, q = b.interactionConfig, G = b.controls, he = b.controlBindings, pe = b.customCfg, ve = b.preferences, de = b.queryConfig, Ne = Bp({
4413
+ } = Vo(V, $ || s.sql || s.python), j = se(() => (w == null ? void 0 : w.records) || [], [w == null ? void 0 : w.records]), { setCard: K, updateCardInFrame: le } = be(), ae = b.id, te = b.config, q = b.interactionConfig, G = b.controls, he = b.controlBindings, pe = b.customCfg, ve = b.preferences, de = b.queryConfig, Ne = qp({
4413
4414
  sql: b.sql,
4414
4415
  python: b.python
4415
4416
  }), Te = Ne.sql, Ye = Ne.python, He = w == null ? void 0 : w.records, me = se(
@@ -4585,7 +4586,7 @@ function Bo({
4585
4586
  ) }),
4586
4587
  /* @__PURE__ */ e(bl, { card: s }),
4587
4588
  /* @__PURE__ */ e(fo, {}),
4588
- /* @__PURE__ */ e("div", { className: "ml-auto", children: /* @__PURE__ */ e(Mp, {}) })
4589
+ /* @__PURE__ */ e("div", { className: "ml-auto", children: /* @__PURE__ */ e(Ep, {}) })
4589
4590
  ] }),
4590
4591
  /* @__PURE__ */ e("div", { className: "min-w-0", children: /* @__PURE__ */ e(
4591
4592
  Ja,
@@ -4689,7 +4690,7 @@ const On = ({
4689
4690
  readOnly: s,
4690
4691
  embedded: !0
4691
4692
  }
4692
- ), Kp = () => /* @__PURE__ */ n(Wt, { children: [
4693
+ ), jp = () => /* @__PURE__ */ n(Wt, { children: [
4693
4694
  /* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ e($t, { children: "Customize Card" }) }),
4694
4695
  /* @__PURE__ */ n(zt, { children: [
4695
4696
  "See the configuration options and documentation",
@@ -4703,7 +4704,7 @@ const On = ({
4703
4704
  }
4704
4705
  )
4705
4706
  ] })
4706
- ] }), qp = ({
4707
+ ] }), $p = ({
4707
4708
  // defaultConfig,
4708
4709
  customCode: t,
4709
4710
  cardCustomCfgString: a,
@@ -4763,7 +4764,7 @@ const On = ({
4763
4764
  )
4764
4765
  }
4765
4766
  )
4766
- ] }), jp = ({
4767
+ ] }), zp = ({
4767
4768
  error: t,
4768
4769
  hasCardCustomConfig: a,
4769
4770
  onReset: r,
@@ -4775,7 +4776,7 @@ const On = ({
4775
4776
  /* @__PURE__ */ e(ne, { onClick: s, variant: "outline", children: "Apply" }),
4776
4777
  /* @__PURE__ */ e(ne, { onClick: l, variant: "outline", children: "Close" })
4777
4778
  ] });
4778
- function $p({
4779
+ function Hp({
4779
4780
  triggerVariant: t = "icon",
4780
4781
  className: a,
4781
4782
  label: r = "Customize Visual"
@@ -4806,7 +4807,7 @@ function $p({
4806
4807
  if (f && I(f), o) {
4807
4808
  const y = JSON.parse(
4808
4809
  o
4809
- ), P = ch(
4810
+ ), P = uh(
4810
4811
  JSON.parse(c),
4811
4812
  y
4812
4813
  );
@@ -4845,11 +4846,11 @@ function $p({
4845
4846
  }
4846
4847
  ) }),
4847
4848
  /* @__PURE__ */ n(jt, { className: "flex h-[600px] grow flex-col overflow-auto sm:min-w-[900px] lg:min-w-[1200px]", children: [
4848
- /* @__PURE__ */ e(Kp, {}),
4849
+ /* @__PURE__ */ e(jp, {}),
4849
4850
  /* @__PURE__ */ n("div", { className: "flex grow gap-2", children: [
4850
4851
  /* @__PURE__ */ e(on, { FallbackComponent: xr, children: /* @__PURE__ */ e(Bo, { className: "w-1/2 rounded shadow-none" }) }),
4851
4852
  /* @__PURE__ */ e(
4852
- qp,
4853
+ $p,
4853
4854
  {
4854
4855
  customCode: f,
4855
4856
  cardCustomCfgString: x,
@@ -4860,7 +4861,7 @@ function $p({
4860
4861
  )
4861
4862
  ] }),
4862
4863
  /* @__PURE__ */ e(
4863
- jp,
4864
+ zp,
4864
4865
  {
4865
4866
  error: m,
4866
4867
  hasCardCustomConfig: !!S,
@@ -4874,13 +4875,13 @@ function $p({
4874
4875
  ] })
4875
4876
  ] });
4876
4877
  }
4877
- function zp(t) {
4878
+ function Up(t) {
4878
4879
  let a = 0;
4879
4880
  for (let s = 0; s < t.length; s++)
4880
4881
  a = t.charCodeAt(s) + ((a << 5) - a);
4881
4882
  return `hsl(${Math.abs(a % 360)}, 65%, 45%)`;
4882
4883
  }
4883
- function Hp(t) {
4884
+ function Gp(t) {
4884
4885
  const a = t.trim().split(/\s+/);
4885
4886
  return a.length > 1 ? (a[0][0] + a[1][0]).toUpperCase() : t.slice(0, 2).toUpperCase();
4886
4887
  }
@@ -4895,7 +4896,7 @@ function Ko({
4895
4896
  const l = Mc(a);
4896
4897
  if (l)
4897
4898
  return sl.cloneElement(l, { className: s });
4898
- const c = Hp(a), d = zp(a);
4899
+ const c = Gp(a), d = Up(a);
4899
4900
  return /* @__PURE__ */ e(
4900
4901
  "div",
4901
4902
  {
@@ -4967,7 +4968,7 @@ const $s = [
4967
4968
  { id: "trend", label: "Trend" },
4968
4969
  { id: "part", label: "Part of a whole" },
4969
4970
  { id: "relationship", label: "Relationship" }
4970
- ], Up = [
4971
+ ], Qp = [
4971
4972
  { id: "table", name: "Table", group: "tables" },
4972
4973
  { id: "matrixTable", name: "Matrix Table", group: "tables" },
4973
4974
  { id: "bar", name: "Bar Chart", group: "comparison" },
@@ -4993,11 +4994,11 @@ const $s = [
4993
4994
  { id: "text", name: "Text", group: "other" }
4994
4995
  ], Ln = 2;
4995
4996
  function qo(t) {
4996
- return Up.filter(
4997
- (a) => Ku(a.id, t)
4997
+ return Qp.filter(
4998
+ (a) => ju(a.id, t)
4998
4999
  );
4999
5000
  }
5000
- function Gp({
5001
+ function Jp({
5001
5002
  selectedChart: t,
5002
5003
  onChartSelect: a,
5003
5004
  onClose: r
@@ -5030,10 +5031,10 @@ function Gp({
5030
5031
  }, [i, s]), R = (k) => {
5031
5032
  u(k).status !== "refused" && (a == null || a(k), r == null || r());
5032
5033
  }, _ = (k) => {
5033
- const D = qu(k);
5034
+ const D = $u(k);
5034
5035
  if (D === "multiple" && k.slots && k.slots.length > 0) {
5035
5036
  x(null), m({}), v(void 0), N();
5036
- const A = ju(k.slots, k, p);
5037
+ const A = zu(k.slots, k, p);
5037
5038
  T(A), A[0] && g(A[0]), r == null || r();
5038
5039
  return;
5039
5040
  } else if (u("custom", {
@@ -5203,15 +5204,15 @@ const Yn = {
5203
5204
  radar: "Radar",
5204
5205
  polarArea: "Polar Area",
5205
5206
  text: "Text"
5206
- }, Qp = [
5207
+ }, Wp = [
5207
5208
  { id: "table" },
5208
5209
  { id: "bar" },
5209
5210
  { id: "line" },
5210
5211
  { id: "pie" },
5211
5212
  { id: "kpi" },
5212
5213
  { id: "matrixTable" }
5213
- ], Jp = 6;
5214
- function Wp({
5214
+ ], Xp = 6;
5215
+ function Zp({
5215
5216
  selectedChart: t,
5216
5217
  onChartChange: a
5217
5218
  }) {
@@ -5241,7 +5242,7 @@ function sr({
5241
5242
  ), i = se(() => {
5242
5243
  const h = new Set(
5243
5244
  qo({ isDevMode: d }).map((S) => S.id)
5244
- ), C = Qp.filter(
5245
+ ), C = Wp.filter(
5245
5246
  (S) => h.has(S.id)
5246
5247
  ).map((S) => ({
5247
5248
  id: S.id,
@@ -5258,7 +5259,7 @@ function sr({
5258
5259
  label: _n[t] ?? t,
5259
5260
  icon: Yn[t],
5260
5261
  isCustom: !1
5261
- }), C.slice(0, Jp);
5262
+ }), C.slice(0, Xp);
5262
5263
  }, [t, o, d]), f = (h) => h.isCustom ? t === "custom" && o === h.id : t === h.id, u = (h) => {
5263
5264
  h.isCustom || a(h.id);
5264
5265
  }, m = i.some(f), p = m ? "More" : t === "custom" ? o || "Custom" : _n[t] || "More";
@@ -5333,7 +5334,7 @@ function sr({
5333
5334
  align: "end",
5334
5335
  onOpenAutoFocus: (h) => h.preventDefault(),
5335
5336
  children: /* @__PURE__ */ e(
5336
- Gp,
5337
+ Jp,
5337
5338
  {
5338
5339
  selectedChart: t,
5339
5340
  onChartSelect: (h) => {
@@ -5347,7 +5348,7 @@ function sr({
5347
5348
  ] })
5348
5349
  ] }) });
5349
5350
  }
5350
- function Xp() {
5351
+ function ef() {
5351
5352
  const t = F(
5352
5353
  (i) => {
5353
5354
  var f, u;
@@ -5507,12 +5508,12 @@ function Kr({
5507
5508
  ), h = qc(), C = (c == null ? void 0 : c.inlineFilters) || [], S = ur() ?? void 0;
5508
5509
  function x(E) {
5509
5510
  if (C.find(
5510
- (_) => $u(_, E)
5511
+ (_) => Hu(_, E)
5511
5512
  ))
5512
5513
  return;
5513
5514
  const R = {
5514
5515
  id: Kt(),
5515
- ...Xm(E, {
5516
+ ...eh(E, {
5516
5517
  dataSource: c == null ? void 0 : c.dataSource,
5517
5518
  connectionId: d
5518
5519
  }),
@@ -5540,9 +5541,9 @@ function Kr({
5540
5541
  inlineFilters: _
5541
5542
  });
5542
5543
  const w = _.find((P) => P.id === E);
5543
- if (!w || !zu(R, w))
5544
+ if (!w || !Uu(R, w))
5544
5545
  return;
5545
- const y = Hu(
5546
+ const y = Gu(
5546
5547
  w,
5547
5548
  S
5548
5549
  );
@@ -5628,7 +5629,7 @@ function Kr({
5628
5629
  C.length > 0 && /* @__PURE__ */ n("div", { className: "border-t px-4 py-3", children: [
5629
5630
  /* @__PURE__ */ e("p", { className: "mb-2 text-xs font-medium text-muted-foreground", children: "Active Filters" }),
5630
5631
  /* @__PURE__ */ e("div", { className: "space-y-1", children: C.map((E) => /* @__PURE__ */ e(
5631
- Zp,
5632
+ tf,
5632
5633
  {
5633
5634
  filter: E,
5634
5635
  onUpdate: (I) => T(E.id, I),
@@ -5644,7 +5645,7 @@ function Kr({
5644
5645
  }
5645
5646
  );
5646
5647
  }
5647
- function Zp({
5648
+ function tf({
5648
5649
  filter: t,
5649
5650
  onUpdate: a,
5650
5651
  onRemove: r
@@ -5683,16 +5684,16 @@ function Zp({
5683
5684
  ] })
5684
5685
  ] });
5685
5686
  }
5686
- const ef = {
5687
+ const af = {
5687
5688
  metric_selector: "Displayed metric",
5688
5689
  field_selector: "Group by field",
5689
5690
  aggregation_selector: "Aggregation",
5690
5691
  grain_selector: "Time grain"
5691
5692
  };
5692
- function tf(t, a) {
5693
+ function nf(t, a) {
5693
5694
  return t && typeof t == "object" && "label" in t && typeof t.label == "string" && t.label.trim().length > 0 ? t.label : a || null;
5694
5695
  }
5695
- const af = {
5696
+ const rf = {
5696
5697
  metric_selector: "config_metric_selector",
5697
5698
  field_selector: "config_field_selector",
5698
5699
  aggregation_selector: "config_aggregation",
@@ -5701,7 +5702,7 @@ const af = {
5701
5702
  function tn(t, a) {
5702
5703
  return `${t}:${a}`;
5703
5704
  }
5704
- function nf(t, a, r, s, l) {
5705
+ function sf(t, a, r, s, l) {
5705
5706
  const c = new Set(
5706
5707
  r.filter(
5707
5708
  (o) => o.target !== "sql_param" && o.target !== "presentation_currency"
@@ -5712,7 +5713,7 @@ function nf(t, a, r, s, l) {
5712
5713
  control: o,
5713
5714
  matrixSpec: s,
5714
5715
  resolveDataType: l
5715
- }).map((p) => p.value), f = af[o.type], m = [
5716
+ }).map((p) => p.value), f = rf[o.type], m = [
5716
5717
  ...f && i.includes(f) ? [f] : [],
5717
5718
  ...i.filter((p) => p !== f)
5718
5719
  ].find(
@@ -5729,7 +5730,7 @@ function nf(t, a, r, s, l) {
5729
5730
  mapping: {}
5730
5731
  } : null;
5731
5732
  }
5732
- function rf({
5733
+ function lf({
5733
5734
  card: t,
5734
5735
  dashboardControls: a,
5735
5736
  bindings: r,
@@ -5742,11 +5743,11 @@ function rf({
5742
5743
  matrixPresentation: f
5743
5744
  }) {
5744
5745
  const u = se(
5745
- () => f ?? (i ? ah(i).presentation : void 0),
5746
+ () => f ?? (i ? rh(i).presentation : void 0),
5746
5747
  [i, f]
5747
5748
  );
5748
5749
  function m(w) {
5749
- return !i || !u ? [] : Qu(i, w, x).map((y) => ({
5750
+ return !i || !u ? [] : Wu(i, w, x).map((y) => ({
5750
5751
  id: y.id,
5751
5752
  label: y.kind === "measure" ? `${hn(y.measure, u)} (${y.measure.aggregate})` : `${y.axis === "rows" ? "Rows" : "Columns"}: ${Ir(y.level, u)}`
5752
5753
  }));
@@ -5756,14 +5757,14 @@ function rf({
5756
5757
  ...t.controls || []
5757
5758
  ], [h, C] = U(
5758
5759
  {}
5759
- ), S = dh({
5760
+ ), S = mh({
5760
5761
  sql: t.sql,
5761
5762
  controlBindings: t.controlBindings
5762
5763
  });
5763
5764
  function x(w) {
5764
5765
  return i ? lo(w, i.source, c) : w.dataType;
5765
5766
  }
5766
- const v = Uu(t, i, x), T = new Set(
5767
+ const v = Qu(t, i, x), T = new Set(
5767
5768
  r.map((w) => tn(w.controlId, w.target))
5768
5769
  ), N = p.some(
5769
5770
  (w) => so({
@@ -5833,7 +5834,7 @@ function rf({
5833
5834
  }, R = (w) => {
5834
5835
  s(r.filter((y, P) => P !== w));
5835
5836
  }, _ = () => {
5836
- const w = nf(t, p, r, i, x);
5837
+ const w = sf(t, p, r, i, x);
5837
5838
  w && s([...r, w]);
5838
5839
  };
5839
5840
  if (typeof t.sql == "string" && t.sql.trim().length > 0) {
@@ -5892,7 +5893,7 @@ function rf({
5892
5893
  r.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." }) : r.map((w, y) => {
5893
5894
  const P = v[w.target] || [], V = p.find(
5894
5895
  (K) => K.id === w.controlId
5895
- ), $ = V ? Gu(V) : null, L = ($ == null ? void 0 : $.source.kind) === "manual" ? $.source.options : [], b = E(w.target), Y = m(w.target), k = w.matrixTargetId !== void 0 && !Y.some((K) => K.id === w.matrixTargetId), D = Array.from(
5896
+ ), $ = V ? Ju(V) : null, L = ($ == null ? void 0 : $.source.kind) === "manual" ? $.source.options : [], b = E(w.target), Y = m(w.target), k = w.matrixTargetId !== void 0 && !Y.some((K) => K.id === w.matrixTargetId), D = Array.from(
5896
5897
  /* @__PURE__ */ new Set([
5897
5898
  ...L.map((K) => K.value),
5898
5899
  ...Object.keys(w.mapping)
@@ -5903,7 +5904,7 @@ function rf({
5903
5904
  value: K,
5904
5905
  label: (le == null ? void 0 : le.label) || K
5905
5906
  };
5906
- }), M = `${w.controlId}-${w.target}-${y}`, A = h[M] ?? y === 0, B = Object.keys(w.mapping).length, j = V != null && V.type ? ef[V.type] || V.type : null;
5907
+ }), M = `${w.controlId}-${w.target}-${y}`, A = h[M] ?? y === 0, B = Object.keys(w.mapping).length, j = V != null && V.type ? af[V.type] || V.type : null;
5907
5908
  return /* @__PURE__ */ n(
5908
5909
  ta,
5909
5910
  {
@@ -5977,7 +5978,7 @@ function rf({
5977
5978
  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." }) : b.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__ */ n("div", { className: "space-y-2", children: [
5978
5979
  /* @__PURE__ */ e(O, { className: "text-xs", children: "Map each choice" }),
5979
5980
  /* @__PURE__ */ e("div", { className: "space-y-2", children: D.map((K) => {
5980
- const le = w.mapping[K.value], ae = w.target === "config_metric_selector" || w.target === "config_field_selector" ? typeof le == "string" ? le : le == null ? void 0 : le.id : typeof le == "string" ? le : void 0, te = !o && typeof ae == "string" && !b.some((he) => he.value === ae), q = tf(
5981
+ const le = w.mapping[K.value], ae = w.target === "config_metric_selector" || w.target === "config_field_selector" ? typeof le == "string" ? le : le == null ? void 0 : le.id : typeof le == "string" ? le : void 0, te = !o && typeof ae == "string" && !b.some((he) => he.value === ae), q = nf(
5981
5982
  le,
5982
5983
  ae
5983
5984
  ), G = ae && te ? [
@@ -6079,15 +6080,15 @@ function rf({
6079
6080
  ] }) : null
6080
6081
  ] });
6081
6082
  }
6082
- function sf(t, a, r) {
6083
+ function of(t, a, r) {
6083
6084
  const { eligibleTargets: s } = yo(
6084
6085
  t,
6085
6086
  a,
6086
6087
  r
6087
- ), l = hh(t), c = new Map(
6088
+ ), l = fh(t), c = new Map(
6088
6089
  l.map((o) => [o.id, o])
6089
6090
  ), d = new Map(
6090
- ph(t, r).map((o) => [
6091
+ gh(t, r).map((o) => [
6091
6092
  o.measureId,
6092
6093
  o.label
6093
6094
  ])
@@ -6101,10 +6102,10 @@ function sf(t, a, r) {
6101
6102
  };
6102
6103
  });
6103
6104
  }
6104
- function lf(t) {
6105
+ function cf(t) {
6105
6106
  return t ? t.kind === "metric" ? t.metricId : t.kind === "column" ? t.columnKey : t.measureId : "invalid target";
6106
6107
  }
6107
- function of({
6108
+ function df({
6108
6109
  matrixCatalog: t,
6109
6110
  card: a,
6110
6111
  dashboardControls: r,
@@ -6112,13 +6113,13 @@ function of({
6112
6113
  bindings: l,
6113
6114
  onChange: c
6114
6115
  }) {
6115
- const d = [...r, ...a.controls || []], o = d.filter(uh), i = se(
6116
- () => sf(a, s, t),
6116
+ const d = [...r, ...a.controls || []], o = d.filter(hh), i = se(
6117
+ () => of(a, s, t),
6117
6118
  [a, s, t]
6118
6119
  ), f = se(
6119
6120
  () => yo(a, s, t),
6120
6121
  [a, s, t]
6121
- ), u = mh({
6122
+ ), u = ph({
6122
6123
  bindings: l,
6123
6124
  controls: d,
6124
6125
  ...f
@@ -6127,7 +6128,7 @@ function of({
6127
6128
  ), N = (g) => {
6128
6129
  if (!m)
6129
6130
  return;
6130
- const E = lh({
6131
+ const E = ih({
6131
6132
  card: a,
6132
6133
  target: g,
6133
6134
  resultColumnKeys: s,
@@ -6136,7 +6137,7 @@ function of({
6136
6137
  matrixCatalog: t
6137
6138
  });
6138
6139
  if (E)
6139
- return nh(1e3, E);
6140
+ return sh(1e3, E);
6140
6141
  };
6141
6142
  return o.length === 0 && l.length === 0 ? /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: "Add a manual enum whose options are ISO currency codes to enable presentation currency bindings." }) : /* @__PURE__ */ n("div", { className: "space-y-3", children: [
6142
6143
  /* @__PURE__ */ n("div", { className: "space-y-1", children: [
@@ -6152,7 +6153,7 @@ function of({
6152
6153
  g.controlId,
6153
6154
  " →",
6154
6155
  " ",
6155
- lf(g.presentationTarget),
6156
+ cf(g.presentationTarget),
6156
6157
  g.presentationTarget ? ` · ${N(g.presentationTarget) ?? "unavailable"}` : null
6157
6158
  ] }),
6158
6159
  /* @__PURE__ */ e(
@@ -6203,7 +6204,7 @@ function of({
6203
6204
  ] })
6204
6205
  ] });
6205
6206
  }
6206
- const cf = [];
6207
+ const uf = [];
6207
6208
  function qr({
6208
6209
  className: t,
6209
6210
  triggerVariant: a = "icon",
@@ -6215,31 +6216,31 @@ function qr({
6215
6216
  preventPassiveDismissDuringCreate: l,
6216
6217
  resolvedOpen: c,
6217
6218
  setIsCreateFlowActive: d
6218
- } = Zm({}), o = F((j) => j.card), i = F((j) => j.frame), f = F(
6219
+ } = th({}), o = F((j) => j.card), i = F((j) => j.frame), f = F(
6219
6220
  (j) => j.queryResultColumns
6220
6221
  ), u = ge((j) => j.dashboard), p = ge(
6221
6222
  (j) => j.dashboard.controls
6222
- ) || cf, { setCard: h, updateCardInFrame: C } = be(), [S, x] = U(null);
6223
+ ) || uf, { setCard: h, updateCardInFrame: C } = be(), [S, x] = U(null);
6223
6224
  we(() => {
6224
6225
  c && !S && (o != null && o.id) && x(o.id);
6225
6226
  }, [o == null ? void 0 : o.id, c, S]), we(() => {
6226
6227
  !c && S !== null && x(null);
6227
6228
  }, [c, S]);
6228
6229
  const v = se(() => S ? (i == null ? void 0 : i.cards.find((j) => j.id === S)) || ((o == null ? void 0 : o.id) === S ? o : void 0) : o, [o, i == null ? void 0 : i.cards, S]), T = (v == null ? void 0 : v.type) === "matrixTable" ? (M = v.config) == null ? void 0 : M.matrix : void 0, N = se(
6229
- () => c && T ? fh(T.spec, v == null ? void 0 : v.controlBindings) : [],
6230
+ () => c && T ? xh(T.spec, v == null ? void 0 : v.controlBindings) : [],
6230
6231
  [c, T, v == null ? void 0 : v.controlBindings]
6231
6232
  ), g = Qc(N), E = se(() => g.catalog.map((j) => ({
6232
6233
  ...j.field,
6233
6234
  dataType: il(j.resolvedField.dataType)
6234
- })), [g.catalog]), I = (v == null ? void 0 : v.controls) || [], R = v ? Ju(u, { excludeCardId: v.id }) : p.map((j) => j.id), _ = ((v == null ? void 0 : v.controlBindings) || []).filter(
6235
- Wu
6235
+ })), [g.catalog]), I = (v == null ? void 0 : v.controls) || [], R = v ? Xu(u, { excludeCardId: v.id }) : p.map((j) => j.id), _ = ((v == null ? void 0 : v.controlBindings) || []).filter(
6236
+ Zu
6236
6237
  ), w = ((v == null ? void 0 : v.controlBindings) || []).filter(
6237
6238
  Fn
6238
6239
  ), y = Jc({
6239
6240
  card: v,
6240
6241
  controls: I
6241
6242
  }), P = {
6242
- choices: Xu(v),
6243
+ choices: em(v),
6243
6244
  targetMap: Object.fromEntries(
6244
6245
  (((A = v == null ? void 0 : v.config) == null ? void 0 : A.groupByColumns) || []).map((j) => [
6245
6246
  j.id,
@@ -6247,7 +6248,7 @@ function qr({
6247
6248
  ])
6248
6249
  )
6249
6250
  }, V = {
6250
- choices: Zu(v),
6251
+ choices: tm(v),
6251
6252
  targetMap: Object.fromEntries(
6252
6253
  (((B = v == null ? void 0 : v.config) == null ? void 0 : B.metricColumns) || []).map((j) => [
6253
6254
  j.id,
@@ -6273,7 +6274,7 @@ function qr({
6273
6274
  }) : v, ae = {
6274
6275
  ...le,
6275
6276
  controls: j,
6276
- controlBindings: em(
6277
+ controlBindings: am(
6277
6278
  le.controlBindings,
6278
6279
  j
6279
6280
  )
@@ -6285,7 +6286,7 @@ function qr({
6285
6286
  const K = {
6286
6287
  ...v,
6287
6288
  controlBindings: [
6288
- ...tm(
6289
+ ...nm(
6289
6290
  j,
6290
6291
  (v.controlBindings || []).filter(
6291
6292
  (le) => !Fn(le)
@@ -6359,7 +6360,7 @@ function qr({
6359
6360
  ] }),
6360
6361
  /* @__PURE__ */ e("div", { className: "flex-1 overflow-y-auto pt-5", children: /* @__PURE__ */ n("div", { className: "space-y-5 pr-1", children: [
6361
6362
  /* @__PURE__ */ e(
6362
- eh,
6363
+ ah,
6363
6364
  {
6364
6365
  scope: "card",
6365
6366
  card: v,
@@ -6379,7 +6380,7 @@ function qr({
6379
6380
  ] }),
6380
6381
  v ? /* @__PURE__ */ n(ue, { children: [
6381
6382
  /* @__PURE__ */ e(
6382
- rf,
6383
+ lf,
6383
6384
  {
6384
6385
  card: v,
6385
6386
  dashboardControls: p,
@@ -6394,7 +6395,7 @@ function qr({
6394
6395
  }
6395
6396
  ),
6396
6397
  /* @__PURE__ */ e("div", { className: "border-t pt-4", children: /* @__PURE__ */ e(
6397
- of,
6398
+ df,
6398
6399
  {
6399
6400
  matrixCatalog: g.catalog,
6400
6401
  card: v,
@@ -6452,7 +6453,7 @@ function jo({
6452
6453
  "text"
6453
6454
  ].includes(c.type);
6454
6455
  return u || m || r || s || l ? /* @__PURE__ */ n("div", { "data-info": "visual-settings", className: "flex items-center gap-2", children: [
6455
- u && /* @__PURE__ */ e(ue, { children: /* @__PURE__ */ e(Xp, {}) }),
6456
+ u && /* @__PURE__ */ e(ue, { children: /* @__PURE__ */ e(ef, {}) }),
6456
6457
  m && /* @__PURE__ */ n(
6457
6458
  nt,
6458
6459
  {
@@ -6472,7 +6473,7 @@ function jo({
6472
6473
  l && /* @__PURE__ */ e(Br, {})
6473
6474
  ] }) : null;
6474
6475
  }
6475
- function df({
6476
+ function mf({
6476
6477
  errorMessage: t,
6477
6478
  errorSql: a,
6478
6479
  onOpenInEditor: r
@@ -6508,7 +6509,7 @@ function df({
6508
6509
  )
6509
6510
  ] });
6510
6511
  }
6511
- function uf({
6512
+ function hf({
6512
6513
  isPreviewMode: t,
6513
6514
  onPreviewToggle: a,
6514
6515
  configCard: r
@@ -6547,7 +6548,7 @@ function uf({
6547
6548
  function y(A) {
6548
6549
  const B = (r == null ? void 0 : r.id) === A;
6549
6550
  (I && B ? s.cards.length > 1 : E) && m(A, {
6550
- renumber: S && !I ? rm : void 0
6551
+ renumber: S && !I ? lm : void 0
6551
6552
  });
6552
6553
  }
6553
6554
  function P(A, B) {
@@ -6598,7 +6599,7 @@ function uf({
6598
6599
  h.slots,
6599
6600
  le
6600
6601
  );
6601
- q && (B = sm(q), j = q.label || `Tab ${le + 1}`, K = q.description || "");
6602
+ q && (B = om(q), j = q.label || `Tab ${le + 1}`, K = q.description || "");
6602
6603
  }
6603
6604
  const ae = {
6604
6605
  dataSource: A.dataSource,
@@ -6616,7 +6617,7 @@ function uf({
6616
6617
  ],
6617
6618
  ...B === "text" ? {
6618
6619
  textVisualOptions: {
6619
- richContent: lm()
6620
+ richContent: im()
6620
6621
  }
6621
6622
  } : {}
6622
6623
  },
@@ -6776,7 +6777,7 @@ function lr({
6776
6777
  F((ie) => ie.isDevMode);
6777
6778
  const { switchCardTab: f, resetAllColumnSettings: u } = be(), m = Object.keys(((ce = (je = l.preferences) == null ? void 0 : je.tablePrefs) == null ? void 0 : ce.columnSettingsMap) ?? {}).length > 0 || Object.keys(((ze = l.preferences) == null ? void 0 : ze.sqlColumns) ?? {}).length > 0, [p, h] = U({}), [C, S] = U(
6778
6779
  () => /* @__PURE__ */ new Set()
6779
- ), { authToken: x } = Zt(), v = am(x == null ? void 0 : x.accessToken), { compiledAppearance: T } = wh(), N = se(
6780
+ ), { authToken: x } = Zt(), v = rm(x == null ? void 0 : x.accessToken), { compiledAppearance: T } = kh(), N = se(
6780
6781
  () => Xc(T),
6781
6782
  [T]
6782
6783
  ), {
@@ -6824,7 +6825,7 @@ function lr({
6824
6825
  K || l.sql || l.python
6825
6826
  ), G = l.type === "text" && ((Be = (re = l.preferences) == null ? void 0 : re.textVisualOptions) == null ? void 0 : Be.isDynamicText) === !0 && !!j, he = xt(
6826
6827
  (ie, Ee) => {
6827
- const Gt = nm(Ee);
6828
+ const Gt = sm(Ee);
6828
6829
  h((St) => ({
6829
6830
  ...St,
6830
6831
  [ie]: Gt
@@ -6982,7 +6983,7 @@ function lr({
6982
6983
  isFetching: A,
6983
6984
  isError: B
6984
6985
  }) : l.type === "kpi" ? M || A ? /* @__PURE__ */ e("div", { className: "z-50 flex h-full items-center justify-center", children: /* @__PURE__ */ e(Ot, { size: "md", color: "muted", "aria-label": "Loading data" }) }) : j ? /* @__PURE__ */ e(
6985
- df,
6986
+ mf,
6986
6987
  {
6987
6988
  errorMessage: j,
6988
6989
  errorSql: K || l.sql || l.python,
@@ -7040,7 +7041,7 @@ function lr({
7040
7041
  ie.id
7041
7042
  )),
7042
7043
  /* @__PURE__ */ e(
7043
- uf,
7044
+ hf,
7044
7045
  {
7045
7046
  isPreviewMode: P,
7046
7047
  onPreviewToggle: d,
@@ -7143,7 +7144,7 @@ function Vn({
7143
7144
  isCurrentQueryResult: w
7144
7145
  } = ct(v), y = Ke(R);
7145
7146
  y.current = R;
7146
- const P = se(() => (T == null ? void 0 : T.records) || [], [T == null ? void 0 : T.records]), { cardFilterValues: V } = Tp(
7147
+ const P = se(() => (T == null ? void 0 : T.records) || [], [T == null ? void 0 : T.records]), { cardFilterValues: V } = Dp(
7147
7148
  (c == null ? void 0 : c.id) ?? ""
7148
7149
  ), [$, L] = U(!1), b = Rl(c), [Y, k] = U();
7149
7150
  we(() => {
@@ -7183,7 +7184,7 @@ function Vn({
7183
7184
  dd(
7184
7185
  ud({
7185
7186
  records: M,
7186
- encoding: Ch({
7187
+ encoding: Sh({
7187
7188
  dashboardDefault: u
7188
7189
  })
7189
7190
  }),
@@ -7450,7 +7451,7 @@ function Vn({
7450
7451
  onSelect: j,
7451
7452
  className: "gap-2 text-[13px]",
7452
7453
  children: [
7453
- /* @__PURE__ */ e(Ih, { className: "h-3.5 w-3.5" }),
7454
+ /* @__PURE__ */ e(Ph, { className: "h-3.5 w-3.5" }),
7454
7455
  "Download JSON"
7455
7456
  ]
7456
7457
  }
@@ -7471,7 +7472,7 @@ function Vn({
7471
7472
  /* @__PURE__ */ e(Ss, {}),
7472
7473
  /* @__PURE__ */ e(ks, { children: "Customize" }),
7473
7474
  !["table", "detailTable", "custom"].includes(c.type) && f && /* @__PURE__ */ e(
7474
- $p,
7475
+ Hp,
7475
7476
  {
7476
7477
  triggerVariant: "menu",
7477
7478
  className: "w-full"
@@ -7501,7 +7502,7 @@ function Vn({
7501
7502
  },
7502
7503
  className: "gap-2 text-[13px]",
7503
7504
  children: [
7504
- /* @__PURE__ */ e(Sh, { className: "h-3.5 w-3.5" }),
7505
+ /* @__PURE__ */ e(Th, { className: "h-3.5 w-3.5" }),
7505
7506
  "Table settings"
7506
7507
  ]
7507
7508
  }
@@ -7531,7 +7532,7 @@ function Vn({
7531
7532
  }
7532
7533
  );
7533
7534
  }
7534
- function mf({ onToggleEditor: t, children: a }) {
7535
+ function pf({ onToggleEditor: t, children: a }) {
7535
7536
  return /* @__PURE__ */ n("div", { className: "relative isolate shrink-0 border-t border-border bg-muted/30 @container", children: [
7536
7537
  /* @__PURE__ */ e(
7537
7538
  ll,
@@ -7621,7 +7622,7 @@ function Ua({
7621
7622
  }
7622
7623
  );
7623
7624
  }
7624
- function hf(t, a) {
7625
+ function ff(t, a) {
7625
7626
  return Zn(t, a) || null;
7626
7627
  }
7627
7628
  function ka(t) {
@@ -7635,7 +7636,7 @@ function ka(t) {
7635
7636
  const r = t.match(/^(\d+)\+$/);
7636
7637
  return r ? `Tabs ${Number(r[1]) + 1}+` : `Tab ${t}`;
7637
7638
  }
7638
- function pf(t) {
7639
+ function gf(t) {
7639
7640
  return t ? Array.isArray(t) ? t : [t] : [];
7640
7641
  }
7641
7642
  function Bn(t) {
@@ -7646,7 +7647,7 @@ function Bn(t) {
7646
7647
  const a = !!((l = t.sql) != null && l.trim()), r = La(t.config);
7647
7648
  return a || r;
7648
7649
  }
7649
- function ff({
7650
+ function xf({
7650
7651
  slots: t,
7651
7652
  cards: a,
7652
7653
  minInputs: r
@@ -7703,16 +7704,16 @@ function ff({
7703
7704
  }
7704
7705
  }), a.forEach((c, d) => {
7705
7706
  if (!c) return;
7706
- const o = hf(t, d);
7707
+ const o = ff(t, d);
7707
7708
  if (!o || !o.expectedType) return;
7708
- const i = pf(o.expectedType);
7709
+ const i = gf(o.expectedType);
7709
7710
  i.length !== 0 && (i.includes(c.type) || s.push({
7710
7711
  type: "wrong-type",
7711
7712
  message: `${ka(d)} ("${o.label}") expects ${i.join(", ")}, but is configured as ${c.type}.`
7712
7713
  }));
7713
7714
  })), s;
7714
7715
  }
7715
- const gf = {
7716
+ const bf = {
7716
7717
  table: ({ children: t }) => /* @__PURE__ */ e("table", { className: "my-3 w-full border-collapse overflow-hidden rounded-md border border-border text-sm", children: t }),
7717
7718
  thead: ({ children: t }) => /* @__PURE__ */ e("thead", { className: "bg-muted", children: t }),
7718
7719
  th: ({ children: t }) => /* @__PURE__ */ e("th", { className: "border border-border px-3 py-2 text-left font-medium", children: t }),
@@ -7759,7 +7760,7 @@ function zo() {
7759
7760
  }),
7760
7761
  [v, u == null ? void 0 : u.slots]
7761
7762
  ), N = se(
7762
- () => ff({
7763
+ () => xf({
7763
7764
  slots: u == null ? void 0 : u.slots,
7764
7765
  cards: T,
7765
7766
  minInputs: C
@@ -7795,7 +7796,7 @@ function zo() {
7795
7796
  return b === "input" ? /* @__PURE__ */ e(
7796
7797
  ot,
7797
7798
  {
7798
- className: `h-8 w-full ${om}`,
7799
+ className: `h-8 w-full ${cm}`,
7799
7800
  value: String(
7800
7801
  j ?? ""
7801
7802
  ),
@@ -7974,7 +7975,7 @@ function zo() {
7974
7975
  ((t == null ? void 0 : t.type) === "component" || (t == null ? void 0 : t.type) === void 0) && t && (!p || h) && /* @__PURE__ */ e(ue, { children: i && /* @__PURE__ */ e(
7975
7976
  Ua,
7976
7977
  {
7977
- icon: /* @__PURE__ */ e(Eh, { className: "h-3.5 w-3.5" }),
7978
+ icon: /* @__PURE__ */ e(Ih, { className: "h-3.5 w-3.5" }),
7978
7979
  className: "h-9 w-full",
7979
7980
  label: "Select Component",
7980
7981
  options: (i == null ? void 0 : i.map((b) => ({
@@ -8028,7 +8029,7 @@ function zo() {
8028
8029
  hd,
8029
8030
  {
8030
8031
  remarkPlugins: [pd],
8031
- components: gf,
8032
+ components: bf,
8032
8033
  children: u.docs.dataSchema
8033
8034
  }
8034
8035
  ) })
@@ -8099,7 +8100,7 @@ function Ho(t, a, r) {
8099
8100
  an(a)
8100
8101
  ) : s;
8101
8102
  }
8102
- function xf(t, a) {
8103
+ function vf(t, a) {
8103
8104
  return {
8104
8105
  ...t,
8105
8106
  decimalPlaces: void 0,
@@ -8117,7 +8118,7 @@ function zs(t) {
8117
8118
  maximumFractionDigits: t.maximumFractionDigits ?? a
8118
8119
  };
8119
8120
  }
8120
- function bf(t, a) {
8121
+ function yf(t, a) {
8121
8122
  const r = t.type || "auto";
8122
8123
  return r === "auto" ? t : r === "duration" ? {
8123
8124
  type: "duration",
@@ -8143,7 +8144,7 @@ function Uo(t, a) {
8143
8144
  maximumFractionDigits: a
8144
8145
  };
8145
8146
  }
8146
- const Kn = "__report_default__", vf = [
8147
+ const Kn = "__report_default__", Nf = [
8147
8148
  "auto",
8148
8149
  "number",
8149
8150
  "currency",
@@ -8153,7 +8154,7 @@ const Kn = "__report_default__", vf = [
8153
8154
  "duration"
8154
8155
  ];
8155
8156
  function Go(t, a) {
8156
- return vf.filter((r) => r !== "auto" && (!t || t.includes(r) || r === a));
8157
+ return Nf.filter((r) => r !== "auto" && (!t || t.includes(r) || r === a));
8157
8158
  }
8158
8159
  const Hs = [
8159
8160
  // 🌐 Global Reserve & Major Currencies
@@ -8214,14 +8215,14 @@ const Hs = [
8214
8215
  { value: "minute", label: "Minutes" },
8215
8216
  { value: "hour", label: "Hours" },
8216
8217
  { value: "day", label: "Days" }
8217
- ], yf = [
8218
+ ], Cf = [
8218
8219
  { value: "compact", label: "Compact (6min 32s)" },
8219
8220
  { value: "digital", label: "Digital (6:32)" },
8220
8221
  { value: "long", label: "Long (6 minutes 32 seconds)" }
8221
- ], Nf = (t) => t.charAt(0).toUpperCase() + t.slice(1);
8222
- function Cf(t, a) {
8222
+ ], wf = (t) => t.charAt(0).toUpperCase() + t.slice(1);
8223
+ function Sf(t, a) {
8223
8224
  try {
8224
- return rh(
8225
+ return lh(
8225
8226
  t,
8226
8227
  a
8227
8228
  ).maximumFractionDigits ?? an("currency");
@@ -8240,7 +8241,7 @@ function Ya({
8240
8241
  drawnTypes: o
8241
8242
  }) {
8242
8243
  var w;
8243
- const i = t.type || "auto", f = bf(t, {
8244
+ const i = t.type || "auto", f = yf(t, {
8244
8245
  preserveSparseCurrency: !!c
8245
8246
  }), u = (y) => {
8246
8247
  y.stopPropagation();
@@ -8249,7 +8250,7 @@ function Ya({
8249
8250
  ...f,
8250
8251
  [y]: P
8251
8252
  });
8252
- }, p = f.decimalPlaces ?? f.maximumFractionDigits ?? f.minimumFractionDigits, h = t.currency ?? (c == null ? void 0 : c.currency) ?? "USD", C = t.locale ?? (c == null ? void 0 : c.locale) ?? "en-US", S = i === "currency" ? Cf(
8253
+ }, p = f.decimalPlaces ?? f.maximumFractionDigits ?? f.minimumFractionDigits, h = t.currency ?? (c == null ? void 0 : c.currency) ?? "USD", C = t.locale ?? (c == null ? void 0 : c.locale) ?? "en-US", S = i === "currency" ? Sf(
8253
8254
  C,
8254
8255
  h
8255
8256
  ) : void 0, x = p ?? S ?? an(i), v = i === "currency" && f.decimalPlaces === void 0 && f.minimumFractionDigits === void 0 && f.maximumFractionDigits === void 0, [T, N] = U(
@@ -8267,7 +8268,7 @@ function Ya({
8267
8268
  a(
8268
8269
  c && y === "currency" && t.type !== "currency" ? zs(P) : P
8269
8270
  );
8270
- }, R = (y) => c && i === "currency" ? xf(
8271
+ }, R = (y) => c && i === "currency" ? vf(
8271
8272
  f,
8272
8273
  y
8273
8274
  ) : Uo(f, y), _ = ((w = Hs.find(
@@ -8298,7 +8299,7 @@ function Ya({
8298
8299
  children: /* @__PURE__ */ e(Z, {})
8299
8300
  }
8300
8301
  ),
8301
- /* @__PURE__ */ e(ee, { children: [...d ? ["auto"] : [], ...Go(o, i)].map((y) => /* @__PURE__ */ e(z, { value: y, className: "text-xs", children: y === "auto" ? "Auto (Default)" : Nf(y) }, y)) })
8302
+ /* @__PURE__ */ e(ee, { children: [...d ? ["auto"] : [], ...Go(o, i)].map((y) => /* @__PURE__ */ e(z, { value: y, className: "text-xs", children: y === "auto" ? "Auto (Default)" : wf(y) }, y)) })
8302
8303
  ]
8303
8304
  }
8304
8305
  )
@@ -8545,7 +8546,7 @@ function Ya({
8545
8546
  children: /* @__PURE__ */ e(Z, {})
8546
8547
  }
8547
8548
  ),
8548
- /* @__PURE__ */ e(ee, { children: yf.map((y) => /* @__PURE__ */ e(
8549
+ /* @__PURE__ */ e(ee, { children: Cf.map((y) => /* @__PURE__ */ e(
8549
8550
  z,
8550
8551
  {
8551
8552
  value: y.value,
@@ -8642,24 +8643,24 @@ function jr({ cardId: t }) {
8642
8643
  "."
8643
8644
  ] });
8644
8645
  }
8645
- const wf = {
8646
+ const kf = {
8646
8647
  type: "number",
8647
8648
  minimumFractionDigits: 0,
8648
8649
  maximumFractionDigits: 0
8649
8650
  };
8650
- function Sf(t) {
8651
+ function Tf(t) {
8651
8652
  var a;
8652
- return bo((a = t == null ? void 0 : t.sqlKpiValue) == null ? void 0 : a.format) || wf;
8653
+ return bo((a = t == null ? void 0 : t.sqlKpiValue) == null ? void 0 : a.format) || kf;
8653
8654
  }
8654
8655
  function Us(t, a) {
8655
8656
  const r = a ? vo(a) : void 0, { format: s, ...l } = t.sqlKpiValue ?? {}, c = r ? { ...l, format: r } : l, { sqlKpiValue: d, ...o } = t;
8656
8657
  return Object.keys(c).length ? { ...o, sqlKpiValue: c } : o;
8657
8658
  }
8658
- function kf() {
8659
+ function Mf() {
8659
8660
  var f, u;
8660
8661
  const t = F((m) => m.card), a = F(
8661
8662
  (m) => m.actions.setCardPreferences
8662
- ), r = Yl() ?? ha.locale, s = _l() ?? ha.defaultCurrency, l = fd(t) === "config", c = Sf(t.preferences), d = !!((u = (f = t.preferences) == null ? void 0 : f.sqlKpiValue) != null && u.format), o = (m) => {
8663
+ ), r = Yl() ?? ha.locale, s = _l() ?? ha.defaultCurrency, l = fd(t) === "config", c = Tf(t.preferences), d = !!((u = (f = t.preferences) == null ? void 0 : f.sqlKpiValue) != null && u.format), o = (m) => {
8663
8664
  const p = F.getState().card.preferences ?? {};
8664
8665
  a(Us(p, m));
8665
8666
  }, i = (m) => {
@@ -8706,7 +8707,7 @@ function Gs({ card: t }) {
8706
8707
  t.id,
8707
8708
  Dr(t),
8708
8709
  a
8709
- ), l = im(t), c = l == null ? void 0 : l.value, d = (l == null ? void 0 : l.source) === "config" ? l.measure : void 0, o = c ? [{ value: er(c), label: d ? d.label || d.alias || d.name : "Value" }] : [];
8710
+ ), l = dm(t), c = l == null ? void 0 : l.value, d = (l == null ? void 0 : l.source) === "config" ? l.measure : void 0, o = c ? [{ value: er(c), label: d ? d.label || d.alias || d.name : "Value" }] : [];
8710
8711
  return o.length ? /* @__PURE__ */ n("div", { className: "space-y-2", children: [
8711
8712
  /* @__PURE__ */ e(jr, { cardId: t.id }),
8712
8713
  /* @__PURE__ */ e(
@@ -8721,7 +8722,7 @@ function Gs({ card: t }) {
8721
8722
  )
8722
8723
  ] }) : null;
8723
8724
  }
8724
- const Tf = {
8725
+ const Df = {
8725
8726
  combo: {
8726
8727
  label: "Combo Chart",
8727
8728
  query: "SELECT x-axis, metric-1, metric-2, ... FROM table",
@@ -8977,9 +8978,9 @@ const Tf = {
8977
8978
  }
8978
8979
  };
8979
8980
  function Qo(t) {
8980
- return Tf[t];
8981
+ return Df[t];
8981
8982
  }
8982
- function Mf({
8983
+ function Ef({
8983
8984
  chartType: t,
8984
8985
  showDocsLink: a = !0
8985
8986
  }) {
@@ -9031,7 +9032,7 @@ function Mf({
9031
9032
  )
9032
9033
  ] }) : null;
9033
9034
  }
9034
- function Df({
9035
+ function Ff({
9035
9036
  chartType: t
9036
9037
  }) {
9037
9038
  return Qo(t) ? /* @__PURE__ */ n(ca, { openDelay: 200, children: [
@@ -9050,7 +9051,7 @@ function Df({
9050
9051
  side: "left",
9051
9052
  align: "start",
9052
9053
  sideOffset: 8,
9053
- children: /* @__PURE__ */ e(Mf, { chartType: t })
9054
+ children: /* @__PURE__ */ e(Ef, { chartType: t })
9054
9055
  }
9055
9056
  )
9056
9057
  ] }) : null;
@@ -9061,28 +9062,28 @@ function Jo({
9061
9062
  }) {
9062
9063
  return /* @__PURE__ */ n("div", { className: "flex items-center justify-between", children: [
9063
9064
  /* @__PURE__ */ e("h3", { className: "text-xs font-medium", children: a }),
9064
- /* @__PURE__ */ e(Df, { chartType: t })
9065
+ /* @__PURE__ */ e(Ff, { chartType: t })
9065
9066
  ] });
9066
9067
  }
9067
- function Ef() {
9068
+ function If() {
9068
9069
  const t = F(
9069
9070
  (l) => !La(l.card.config)
9070
9071
  ), a = F(
9071
9072
  (l) => {
9072
9073
  var c, d;
9073
- return ((d = (c = l.card.preferences) == null ? void 0 : c.sqlKpiValue) == null ? void 0 : d.comparisonPolarity) ?? kh;
9074
+ return ((d = (c = l.card.preferences) == null ? void 0 : c.sqlKpiValue) == null ? void 0 : d.comparisonPolarity) ?? Mh;
9074
9075
  }
9075
9076
  ), r = F(
9076
9077
  (l) => l.actions.setCardPreferences
9077
9078
  ), s = (l) => {
9078
9079
  const c = F.getState().card;
9079
9080
  r(
9080
- cm(c, { kind: "sqlKpiValue" }, l).preferences ?? {}
9081
+ um(c, { kind: "sqlKpiValue" }, l).preferences ?? {}
9081
9082
  );
9082
9083
  };
9083
9084
  return /* @__PURE__ */ n("div", { className: "space-y-6 px-6 py-4", children: [
9084
9085
  /* @__PURE__ */ e(Jo, { chartType: "kpi" }),
9085
- /* @__PURE__ */ e("section", { children: /* @__PURE__ */ e(kf, {}) }),
9086
+ /* @__PURE__ */ e("section", { children: /* @__PURE__ */ e(Mf, {}) }),
9086
9087
  t && /* @__PURE__ */ n("section", { className: "space-y-1.5", children: [
9087
9088
  /* @__PURE__ */ e(O, { htmlFor: "query-kpi-favorable-direction", className: "text-xs", children: "Favorable direction" }),
9088
9089
  /* @__PURE__ */ n(
@@ -9186,7 +9187,7 @@ function nn({
9186
9187
  /* @__PURE__ */ e(ke, { id: s, size: "xs", checked: a, onCheckedChange: r })
9187
9188
  ] });
9188
9189
  }
9189
- function Ff({
9190
+ function Af({
9190
9191
  label: t,
9191
9192
  disabled: a,
9192
9193
  onClick: r,
@@ -9257,7 +9258,7 @@ function Wo({
9257
9258
  origin: c,
9258
9259
  drawnTypes: d
9259
9260
  }) {
9260
- const o = dm(r), i = Yl(), f = _l(), u = !!(c && !c.custom && c.modelFormat), m = u ? c == null ? void 0 : c.modelFormat : t, p = bo(m) || {};
9261
+ const o = mm(r), i = Yl(), f = _l(), u = !!(c && !c.custom && c.modelFormat), m = u ? c == null ? void 0 : c.modelFormat : t, p = bo(m) || {};
9261
9262
  if (!Go(d, p.type).length) return null;
9262
9263
  const C = /* @__PURE__ */ e(
9263
9264
  Ya,
@@ -9306,7 +9307,7 @@ function Xo(t, a, r) {
9306
9307
  ...s ? [[Qa(r), r]] : []
9307
9308
  ]);
9308
9309
  }
9309
- const If = [
9310
+ const Pf = [
9310
9311
  { value: ">", label: "Greater than" },
9311
9312
  { value: ">=", label: "At least" },
9312
9313
  { value: "<", label: "Less than" },
@@ -9315,8 +9316,8 @@ const If = [
9315
9316
  { value: "!=", label: "Not equal to" },
9316
9317
  { value: "between", label: "Between" },
9317
9318
  { value: "not between", label: "Not between" }
9318
- ], Af = (t) => t === "between" || t === "not between";
9319
- function Pf({
9319
+ ], Rf = (t) => t === "between" || t === "not between";
9320
+ function Of({
9320
9321
  value: t,
9321
9322
  onChange: a
9322
9323
  }) {
@@ -9355,7 +9356,7 @@ function Pf({
9355
9356
  }
9356
9357
  );
9357
9358
  }
9358
- function Rf({
9359
+ function Lf({
9359
9360
  axis: t,
9360
9361
  level: a,
9361
9362
  value: r,
@@ -9567,18 +9568,18 @@ function Rf({
9567
9568
  {
9568
9569
  label: "Condition",
9569
9570
  value: o.operator,
9570
- options: If,
9571
+ options: Pf,
9571
9572
  onChange: (x) => {
9572
9573
  const v = x, T = C ? C[0] : o.value;
9573
9574
  h({
9574
9575
  operator: v,
9575
- value: Af(v) ? C ?? [T, T] : T
9576
+ value: Rf(v) ? C ?? [T, T] : T
9576
9577
  });
9577
9578
  }
9578
9579
  }
9579
9580
  ),
9580
9581
  /* @__PURE__ */ e(
9581
- Pf,
9582
+ Of,
9582
9583
  {
9583
9584
  value: o.value,
9584
9585
  onChange: (x) => h({ value: x })
@@ -9588,15 +9589,15 @@ function Rf({
9588
9589
  ] })
9589
9590
  ] });
9590
9591
  }
9591
- function Of(t, a) {
9592
+ function Yf(t, a) {
9592
9593
  var s;
9593
- return (s = fm({
9594
+ return (s = xm({
9594
9595
  type: "matrixTable",
9595
9596
  config: { matrix: t },
9596
9597
  preferences: { conditionalFormatting: { version: 1, rules: a } }
9597
9598
  })[0]) == null ? void 0 : s.message;
9598
9599
  }
9599
- function Lf({
9600
+ function _f({
9600
9601
  cardId: t,
9601
9602
  value: a,
9602
9603
  scopeSelection: r,
@@ -9607,7 +9608,7 @@ function Lf({
9607
9608
  t,
9608
9609
  s,
9609
9610
  l,
9610
- (m) => Of(a, m)
9611
+ (m) => Yf(a, m)
9611
9612
  ), d = c.rules, o = (m) => c.onChange(m(d)), i = d.find((m) => !xd(m)), f = i ? `${i.name || "the new rule"} is incomplete` : c.issue ?? "", u = a.spec.measures[0];
9612
9613
  return u ? /* @__PURE__ */ n("div", { className: "min-w-0 space-y-2", children: [
9613
9614
  f && /* @__PURE__ */ n("p", { className: "text-xs text-muted-foreground", children: [
@@ -9724,7 +9725,7 @@ function Lf({
9724
9725
  })
9725
9726
  ] }) : /* @__PURE__ */ e("p", { role: "status", className: "text-xs text-muted-foreground", children: "No metrics available" });
9726
9727
  }
9727
- function Yf({
9728
+ function Vf({
9728
9729
  cardId: t,
9729
9730
  section: a,
9730
9731
  value: r,
@@ -9738,7 +9739,7 @@ function Yf({
9738
9739
  }) {
9739
9740
  const [u, m] = U([]), [p, h] = U(""), C = (N) => lo(N, r.spec.source, s), S = (N) => {
9740
9741
  try {
9741
- const g = pm(r, N, l, C, !0);
9742
+ const g = gm(r, N, l, C, !0);
9742
9743
  h(""), m(g.notices), f(g.config, g.notices, g.removedBindings, g.bindings);
9743
9744
  } catch (g) {
9744
9745
  h(
@@ -9761,7 +9762,7 @@ function Yf({
9761
9762
  }
9762
9763
  x({ [N]: I });
9763
9764
  }, T = (N, g) => {
9764
- const E = r.presentation[g][N], I = d == null ? void 0 : d[g][N], _ = hm(
9765
+ const E = r.presentation[g][N], I = d == null ? void 0 : d[g][N], _ = fm(
9765
9766
  { type: "matrixTable", config: { matrix: r } },
9766
9767
  g === "levelFormats" ? { kind: "matrixLevel", levelId: N } : { kind: "matrixMeasure", measureId: N }
9767
9768
  );
@@ -9782,7 +9783,7 @@ function Yf({
9782
9783
  /* @__PURE__ */ n("div", { className: "flex items-center justify-between", children: [
9783
9784
  /* @__PURE__ */ e("strong", { children: "Updated references" }),
9784
9785
  /* @__PURE__ */ e(
9785
- Ff,
9786
+ Af,
9786
9787
  {
9787
9788
  label: "Dismiss cleanup notices",
9788
9789
  onClick: () => m([]),
@@ -9805,7 +9806,7 @@ function Yf({
9805
9806
  [N]: r.spec[N].map(
9806
9807
  ($) => $.id === g.id ? V : $
9807
9808
  )
9808
- }), R = C(g.field), _ = R === "date" || R === "datetime", w = r.presentation.levelFormats[g.id], y = (w == null ? void 0 : w.type) === "temporal_bucket" ? w : io, P = g.grain ? um(y, g.grain) : void 0;
9809
+ }), R = C(g.field), _ = R === "date" || R === "datetime", w = r.presentation.levelFormats[g.id], y = (w == null ? void 0 : w.type) === "temporal_bucket" ? w : io, P = g.grain ? hm(y, g.grain) : void 0;
9809
9810
  return /* @__PURE__ */ n("div", { className: (a == null ? void 0 : a.kind) === "field" ? "min-w-0" : "min-w-0 border-b pb-2", children: [
9810
9811
  /* @__PURE__ */ e("div", { className: "flex min-w-0 items-center justify-between gap-1", children: /* @__PURE__ */ e("span", { className: "truncate text-xs font-medium", title: E, children: E }) }),
9811
9812
  /* @__PURE__ */ n("details", { open: (a == null ? void 0 : a.kind) === "field" ? !0 : void 0, children: [
@@ -9835,7 +9836,7 @@ function Yf({
9835
9836
  { value: "columns", label: "Columns" }
9836
9837
  ],
9837
9838
  onChange: (V) => {
9838
- V !== N && S(mm(r.spec, g.id, V));
9839
+ V !== N && S(pm(r.spec, g.id, V));
9839
9840
  }
9840
9841
  }
9841
9842
  ),
@@ -9911,7 +9912,7 @@ function Yf({
9911
9912
  }
9912
9913
  ),
9913
9914
  /* @__PURE__ */ e(
9914
- Rf,
9915
+ Lf,
9915
9916
  {
9916
9917
  axis: N,
9917
9918
  level: g,
@@ -10094,7 +10095,7 @@ function Yf({
10094
10095
  children: [
10095
10096
  /* @__PURE__ */ e("h2", { className: "text-xs font-semibold", children: "Conditional formatting" }),
10096
10097
  /* @__PURE__ */ e(
10097
- Lf,
10098
+ _f,
10098
10099
  {
10099
10100
  cardId: t ?? "",
10100
10101
  value: r,
@@ -10109,18 +10110,18 @@ function Yf({
10109
10110
  ] });
10110
10111
  }
10111
10112
  function or({ fieldId: t, section: a = "table" }) {
10112
- const r = F((i) => i.card), s = F((i) => i.actions.updateCard), l = F((i) => i.actions.updateConditionalRules), c = F((i) => i.matrixSelection), d = bd(r), o = gm(r);
10113
+ const r = F((i) => i.card), s = F((i) => i.actions.updateCard), l = F((i) => i.actions.updateConditionalRules), c = F((i) => i.matrixSelection), d = bd(r), o = bm(r);
10113
10114
  return o.status === "invalid" ? /* @__PURE__ */ e("div", { role: "alert", className: "p-3 text-xs text-destructive", children: "Invalid Matrix configuration. Repair or reset the card definition." }) : o.status === "absent" ? /* @__PURE__ */ e("div", { className: "p-3 text-xs text-muted-foreground", children: "No fields selected" }) : /* @__PURE__ */ n(ue, { children: [
10114
10115
  a === "conditional-formatting" && !t && /* @__PURE__ */ e("div", { className: "px-3 pt-3", children: /* @__PURE__ */ e(jr, { cardId: r.id }) }),
10115
10116
  /* @__PURE__ */ e(
10116
- Yf,
10117
+ Vf,
10117
10118
  {
10118
10119
  cardId: r.id,
10119
10120
  value: o.config,
10120
10121
  section: t ? { kind: "field", id: t } : { kind: a },
10121
10122
  scopeSelection: (c == null ? void 0 : c.cardId) === r.id ? c.coordinate : void 0,
10122
10123
  bindings: r.controlBindings,
10123
- modelFormats: gh(o.config.spec, d.catalog),
10124
+ modelFormats: bh(o.config.spec, d.catalog),
10124
10125
  conditionalRules: Dr(r),
10125
10126
  onConditionalRulesChange: l,
10126
10127
  availableFields: d.catalog.map((i) => ({
@@ -10130,20 +10131,20 @@ function or({ fieldId: t, section: a = "table" }) {
10130
10131
  )
10131
10132
  })),
10132
10133
  onChange: (i, f, u, m) => {
10133
- const p = xm(r, { config: i, notices: f, bindings: m });
10134
+ const p = vm(r, { config: i, notices: f, bindings: m });
10134
10135
  s(r.id, p.card);
10135
10136
  }
10136
10137
  }
10137
10138
  )
10138
10139
  ] });
10139
10140
  }
10140
- const _f = {
10141
+ const Bf = {
10141
10142
  green: "#16a34a",
10142
10143
  red: "#dc2626",
10143
10144
  neutral: "#6b7280"
10144
10145
  };
10145
- function Vf(t) {
10146
- return t && (_f[t] ?? t);
10146
+ function Kf(t) {
10147
+ return t && (Bf[t] ?? t);
10147
10148
  }
10148
10149
  function Zo({
10149
10150
  value: t,
@@ -10262,7 +10263,7 @@ function Zo({
10262
10263
  /* @__PURE__ */ e(
10263
10264
  Wn,
10264
10265
  {
10265
- value: Vf(s[l] || d),
10266
+ value: Kf(s[l] || d),
10266
10267
  onChange: (o) => a({
10267
10268
  colors: { ...s, [l]: o || d }
10268
10269
  }),
@@ -10317,7 +10318,7 @@ function Zo({
10317
10318
  )
10318
10319
  ] });
10319
10320
  }
10320
- function Bf() {
10321
+ function qf() {
10321
10322
  var m, p, h, C, S;
10322
10323
  const t = F((x) => x.card), { setCardPreferences: a } = be(), r = st(), s = ((m = t.config) == null ? void 0 : m.metricColumns) || [], l = s.length === 2 && (((p = t.config) == null ? void 0 : p.groupByColumns) || []).length === 0, c = s.some(
10323
10324
  (x) => {
@@ -10325,14 +10326,14 @@ function Bf() {
10325
10326
  return ((v = x.comparison) == null ? void 0 : v.mode) === "explicit";
10326
10327
  }
10327
10328
  );
10328
- if (!vm.includes(r))
10329
+ if (!Nm.includes(r))
10329
10330
  return null;
10330
10331
  const o = ((h = t.preferences) == null ? void 0 : h.comparisonPresentation) || {}, i = (x) => a(
10331
10332
  uo(t.preferences, x)
10332
10333
  ), f = r === "kpi" && ((C = t.preferences) == null ? void 0 : C.metricPairComparisonEnabled) === !0, u = c || f;
10333
10334
  return /* @__PURE__ */ n(Re, { value: "comparison", className: "border-none", children: [
10334
10335
  /* @__PURE__ */ e(Oe, { className: "flex items-center gap-2 py-2 text-[12px] hover:no-underline [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
10335
- /* @__PURE__ */ e(Ph, { className: "h-3.5 w-3.5 text-foreground/60" }),
10336
+ /* @__PURE__ */ e(Oh, { className: "h-3.5 w-3.5 text-foreground/60" }),
10336
10337
  /* @__PURE__ */ e("span", { children: "Comparison" })
10337
10338
  ] }) }),
10338
10339
  /* @__PURE__ */ n(Le, { className: "space-y-4 pb-4 pt-2", children: [
@@ -10348,7 +10349,7 @@ function Bf() {
10348
10349
  size: "xs",
10349
10350
  checked: ((S = t.preferences) == null ? void 0 : S.inheritGlobalComparison) !== !1,
10350
10351
  onCheckedChange: (x) => a(
10351
- bm(t.preferences, x)
10352
+ ym(t.preferences, x)
10352
10353
  )
10353
10354
  }
10354
10355
  )
@@ -10413,7 +10414,7 @@ function ei({
10413
10414
  ), x = yd(
10414
10415
  C,
10415
10416
  h
10416
- ), v = p === "matrixTable" || Cd(p), T = p === "table", N = p === "table", g = p === "table" || p === "detailTable", E = N || g, I = ((ae = S[0]) == null ? void 0 : ae.value) || "", R = Nd(i), _ = xh(C), w = bh(C), [y, P] = U("style");
10417
+ ), v = p === "matrixTable" || Cd(p), T = p === "table", N = p === "table", g = p === "table" || p === "detailTable", E = N || g, I = ((ae = S[0]) == null ? void 0 : ae.value) || "", R = Nd(i), _ = vh(C), w = yh(C), [y, P] = U("style");
10417
10418
  we(() => {
10418
10419
  if (r === "style") {
10419
10420
  P("style");
@@ -10465,10 +10466,10 @@ function ei({
10465
10466
  }
10466
10467
  });
10467
10468
  }, D = (te) => {
10468
- f(ym(o, te));
10469
+ f(Cm(o, te));
10469
10470
  }, M = (te, q) => {
10470
10471
  f(
10471
- Nm({ preferences: o }, te, { hidden: !q }).preferences ?? {}
10472
+ wm({ preferences: o }, te, { hidden: !q }).preferences ?? {}
10472
10473
  );
10473
10474
  }, A = (te) => {
10474
10475
  const { allowViewerColumnCustomization: q, ...G } = i ?? {};
@@ -10478,7 +10479,7 @@ function ei({
10478
10479
  tablePrefs: te ? G : { ...G, allowViewerColumnCustomization: !1 }
10479
10480
  });
10480
10481
  }, B = () => {
10481
- f(Cm({ preferences: o }).preferences ?? {});
10482
+ f(Sm({ preferences: o }).preferences ?? {});
10482
10483
  }, j = () => {
10483
10484
  f({
10484
10485
  ...o,
@@ -10590,7 +10591,7 @@ function ei({
10590
10591
  ) : null
10591
10592
  ] }),
10592
10593
  /* @__PURE__ */ e(wt, { value: "conditional-formatting", className: "mt-0", children: p === "matrixTable" ? /* @__PURE__ */ e(or, { section: "conditional-formatting" }) : v ? I ? /* @__PURE__ */ e(
10593
- Kf,
10594
+ jf,
10594
10595
  {
10595
10596
  columnId: I,
10596
10597
  availableColumns: S
@@ -10600,7 +10601,7 @@ function ei({
10600
10601
  }
10601
10602
  ) });
10602
10603
  }
10603
- function Kf({
10604
+ function jf({
10604
10605
  columnId: t,
10605
10606
  availableColumns: a
10606
10607
  }) {
@@ -10625,7 +10626,7 @@ function Kf({
10625
10626
  )
10626
10627
  ] });
10627
10628
  }
10628
- function qf() {
10629
+ function $f() {
10629
10630
  var l;
10630
10631
  const t = F((c) => c.card.preferences), { setCardPreferences: a } = F((c) => c.actions), r = (l = t == null ? void 0 : t.textVisualOptions) != null && l.isDynamicText ? "dynamic" : "static";
10631
10632
  function s(c) {
@@ -10642,14 +10643,14 @@ function qf() {
10642
10643
  /* @__PURE__ */ e(at, { value: "dynamic", children: "Dynamic" })
10643
10644
  ] }) });
10644
10645
  }
10645
- function jf() {
10646
+ function zf() {
10646
10647
  return /* @__PURE__ */ n("div", { className: "space-y-2 px-6 py-4", children: [
10647
10648
  /* @__PURE__ */ e("div", { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Text mode" }),
10648
- /* @__PURE__ */ e(qf, {}),
10649
+ /* @__PURE__ */ e($f, {}),
10649
10650
  /* @__PURE__ */ e("p", { className: "pt-1 text-[12px] leading-[1.55] text-muted-foreground", children: "Static text is authored inline. Dynamic text reads from the first cell of the card's query." })
10650
10651
  ] });
10651
10652
  }
10652
- function $f({ color: t, onColorChange: a, onClose: r }) {
10653
+ function Hf({ color: t, onColorChange: a, onClose: r }) {
10653
10654
  const [s, l] = U(0), [c, d] = U(100), [o, i] = U(50), [f, u] = U(t);
10654
10655
  we(() => {
10655
10656
  const x = Ws(t);
@@ -10664,7 +10665,7 @@ function $f({ color: t, onColorChange: a, onClose: r }) {
10664
10665
  const v = x.currentTarget.getBoundingClientRect(), T = Math.max(0, Math.min(1, (x.clientX - v.left) / v.width)), N = Math.max(0, Math.min(1, (x.clientY - v.top) / v.height)), g = T * 100, E = (1 - N) * 100;
10665
10666
  d(g), i(E), h(s, g, E);
10666
10667
  }, h = (x, v, T) => {
10667
- const N = Hf(x, v, T), g = zf(N.r, N.g, N.b);
10668
+ const N = Gf(x, v, T), g = Uf(N.r, N.g, N.b);
10668
10669
  u(g);
10669
10670
  }, C = (x) => {
10670
10671
  if (u(x), /^#[0-9A-Fa-f]{6}$/.test(x)) {
@@ -10784,7 +10785,7 @@ function Ws(t) {
10784
10785
  b: parseInt(a[3], 16)
10785
10786
  } : null;
10786
10787
  }
10787
- function zf(t, a, r) {
10788
+ function Uf(t, a, r) {
10788
10789
  return "#" + ((1 << 24) + (t << 16) + (a << 8) + r).toString(16).slice(1);
10789
10790
  }
10790
10791
  function Xs(t, a, r) {
@@ -10812,7 +10813,7 @@ function Xs(t, a, r) {
10812
10813
  l: Math.round(o * 100)
10813
10814
  };
10814
10815
  }
10815
- function Hf(t, a, r) {
10816
+ function Gf(t, a, r) {
10816
10817
  t /= 360, a /= 100, r /= 100;
10817
10818
  let s, l, c;
10818
10819
  if (a === 0)
@@ -10827,7 +10828,7 @@ function Hf(t, a, r) {
10827
10828
  b: Math.round(c * 255)
10828
10829
  };
10829
10830
  }
10830
- const Uf = [
10831
+ const Qf = [
10831
10832
  "#000000",
10832
10833
  // black
10833
10834
  "#ffffff",
@@ -10859,7 +10860,7 @@ const Uf = [
10859
10860
  "#fbbf24"
10860
10861
  // yellow-400
10861
10862
  ];
10862
- function Gf() {
10863
+ function Jf() {
10863
10864
  var E, I, R, _, w, y, P, V, $, L;
10864
10865
  const t = F((b) => b.card), a = F((b) => {
10865
10866
  var Y;
@@ -10986,7 +10987,7 @@ function Gf() {
10986
10987
  }, g = Object.keys(((L = a == null ? void 0 : a.colorConfig) == null ? void 0 : L.segments) || {}).length > 0;
10987
10988
  return /* @__PURE__ */ n(Re, { value: "colors", className: "border-b-0", children: [
10988
10989
  /* @__PURE__ */ e(Oe, { className: "flex w-full items-center gap-2 py-2 text-[12px] font-medium hover:no-underline", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
10989
- /* @__PURE__ */ e(Th, { className: "h-4 w-4 text-muted-foreground" }),
10990
+ /* @__PURE__ */ e(Dh, { className: "h-4 w-4 text-muted-foreground" }),
10990
10991
  /* @__PURE__ */ e("span", { children: "Colors" })
10991
10992
  ] }) }),
10992
10993
  /* @__PURE__ */ e(Le, { className: "", children: /* @__PURE__ */ n("div", { className: "space-y-3", children: [
@@ -11041,7 +11042,7 @@ function Gf() {
11041
11042
  ] }),
11042
11043
  /* @__PURE__ */ n("div", { className: "space-y-1", children: [
11043
11044
  /* @__PURE__ */ e("p", { className: "text-xs font-medium text-muted-foreground", children: "Popular Colors" }),
11044
- /* @__PURE__ */ e("div", { className: "grid grid-cols-5 gap-1.5", children: Uf.map((M, A) => /* @__PURE__ */ e(
11045
+ /* @__PURE__ */ e("div", { className: "grid grid-cols-5 gap-1.5", children: Qf.map((M, A) => /* @__PURE__ */ e(
11045
11046
  "button",
11046
11047
  {
11047
11048
  className: J(
@@ -11102,7 +11103,7 @@ function Gf() {
11102
11103
  }
11103
11104
  ),
11104
11105
  /* @__PURE__ */ e("div", { className: "relative rounded-lg bg-white shadow-lg", children: /* @__PURE__ */ e(
11105
- $f,
11106
+ Hf,
11106
11107
  {
11107
11108
  color: m.color,
11108
11109
  onColorChange: (b) => {
@@ -11188,7 +11189,7 @@ function jn({ axis: t, label: a, type: r, config: s, onChange: l, defaultTitle:
11188
11189
  var D;
11189
11190
  const k = L === "enabled" && b === !0 && !((D = s == null ? void 0 : s.name) != null && D.text) && c;
11190
11191
  l(
11191
- Sm(s, {
11192
+ Tm(s, {
11192
11193
  [L]: b,
11193
11194
  ...k ? { text: c } : {}
11194
11195
  })
@@ -11203,7 +11204,7 @@ function jn({ axis: t, label: a, type: r, config: s, onChange: l, defaultTitle:
11203
11204
  }
11204
11205
  });
11205
11206
  }, h = (L, b) => {
11206
- l(km(s, { [L]: b === "" ? null : Number(b) }));
11207
+ l(Mm(s, { [L]: b === "" ? null : Number(b) }));
11207
11208
  }, C = t === "x" ? ["auto", "top", "bottom"] : ["auto", "left", "right"], S = ["auto", "0", "45", "90", "-45", "-90"];
11208
11209
  return /* @__PURE__ */ n(Re, { value: `${t}-axis`, className: "border-b-0", children: [
11209
11210
  /* @__PURE__ */ n("div", { className: "flex w-full items-center justify-between gap-2", children: [
@@ -11428,7 +11429,7 @@ function $n(t, a, r) {
11428
11429
  }
11429
11430
  return "";
11430
11431
  }
11431
- function Qf() {
11432
+ function Wf() {
11432
11433
  const t = F((i) => i.card), a = F((i) => {
11433
11434
  var f;
11434
11435
  return (f = i.card) == null ? void 0 : f.preferences;
@@ -11444,7 +11445,7 @@ function Qf() {
11444
11445
  const d = (i, f) => {
11445
11446
  let u;
11446
11447
  i === "x" ? u = "xAxisConfig" : i === "y" ? u = "yAxisConfig" : u = "secondaryYAxisConfig";
11447
- const m = wm(a, u, f);
11448
+ const m = km(a, u, f);
11448
11449
  r(m);
11449
11450
  const p = {
11450
11451
  ...t,
@@ -11504,7 +11505,7 @@ function Qf() {
11504
11505
  ] }) })
11505
11506
  ] });
11506
11507
  }
11507
- function Jf() {
11508
+ function Xf() {
11508
11509
  const t = F((m) => m.card), a = st(), r = F(
11509
11510
  (m) => {
11510
11511
  var p, h, C, S;
@@ -11522,7 +11523,7 @@ function Jf() {
11522
11523
  }, f = ["top", "bottom", "left", "right"], u = ["start", "center", "end"];
11523
11524
  return /* @__PURE__ */ n(Re, { value: "legend", className: "border-b-0", children: [
11524
11525
  /* @__PURE__ */ e(Oe, { className: "flex w-full items-center gap-2 py-2 text-[12px] font-medium hover:no-underline", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
11525
- /* @__PURE__ */ e(Rh, { className: "h-4 w-4 text-muted-foreground" }),
11526
+ /* @__PURE__ */ e(Lh, { className: "h-4 w-4 text-muted-foreground" }),
11526
11527
  /* @__PURE__ */ e("span", { children: "Legend" })
11527
11528
  ] }) }),
11528
11529
  /* @__PURE__ */ e(Le, { className: "pt-2", children: /* @__PURE__ */ n("div", { className: "space-y-3", children: [
@@ -11570,7 +11571,7 @@ function Jf() {
11570
11571
  ] }) })
11571
11572
  ] });
11572
11573
  }
11573
- function Wf() {
11574
+ function Zf() {
11574
11575
  var $, L, b, Y, k;
11575
11576
  const t = F((D) => D.card), a = st(), r = F(
11576
11577
  (D) => {
@@ -11581,12 +11582,12 @@ function Wf() {
11581
11582
  var M;
11582
11583
  return (M = D.card) == null ? void 0 : M.preferences;
11583
11584
  }), { setCardPreferences: l, updateCardInFrame: c } = be(), [d, o] = U(!!(r != null && r.valueFormat));
11584
- if (!t || !Tm(a))
11585
+ if (!t || !Dm(a))
11585
11586
  return null;
11586
- const i = a === "bullet" ? (($ = s == null ? void 0 : s.bulletConfig) == null ? void 0 : $.orientation) ?? (((L = s == null ? void 0 : s.chartOptions) == null ? void 0 : L.indexAxis) === "x" ? "vertical" : "horizontal") : void 0, f = i != null ? i === "horizontal" : ((b = s == null ? void 0 : s.chartOptions) == null ? void 0 : b.indexAxis) === "y", u = a === "stackedBar" || a === "stackedLine", m = a === "pie" || a === "doughnut" || a === "polarArea" || a === "funnel", p = a === "bubble" || a === "scatter", h = Mm(
11587
+ const i = a === "bullet" ? (($ = s == null ? void 0 : s.bulletConfig) == null ? void 0 : $.orientation) ?? (((L = s == null ? void 0 : s.chartOptions) == null ? void 0 : L.indexAxis) === "x" ? "vertical" : "horizontal") : void 0, f = i != null ? i === "horizontal" : ((b = s == null ? void 0 : s.chartOptions) == null ? void 0 : b.indexAxis) === "y", u = a === "stackedBar" || a === "stackedLine", m = a === "pie" || a === "doughnut" || a === "polarArea" || a === "funnel", p = a === "bubble" || a === "scatter", h = Em(
11587
11588
  a,
11588
11589
  t.preferences
11589
- ), C = r ?? h, S = Dm(a, t.preferences), x = (r == null ? void 0 : r.enabled) !== void 0 ? r.enabled : S, v = (D, M) => {
11590
+ ), C = r ?? h, S = Fm(a, t.preferences), x = (r == null ? void 0 : r.enabled) !== void 0 ? r.enabled : S, v = (D, M) => {
11590
11591
  const B = (D === "enabled" ? Ps({ type: a, preferences: t.preferences }, { show: M }).dataLabelsConfig : void 0) ?? {
11591
11592
  ...Rs(r, h),
11592
11593
  [D]: M
@@ -11642,7 +11643,7 @@ function Wf() {
11642
11643
  };
11643
11644
  return /* @__PURE__ */ n(Re, { value: "data-labels", className: "border-b-0", children: [
11644
11645
  /* @__PURE__ */ e(Oe, { className: "flex w-full items-center gap-2 py-2 text-[12px] font-medium hover:no-underline", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
11645
- /* @__PURE__ */ e(jh, { className: "h-4 w-4 text-muted-foreground" }),
11646
+ /* @__PURE__ */ e(zh, { className: "h-4 w-4 text-muted-foreground" }),
11646
11647
  /* @__PURE__ */ e("span", { children: "Data Labels" })
11647
11648
  ] }) }),
11648
11649
  /* @__PURE__ */ e(Le, { className: "pt-2", children: /* @__PURE__ */ n("div", { className: "space-y-3", children: [
@@ -11809,7 +11810,7 @@ function Wf() {
11809
11810
  ] }) })
11810
11811
  ] });
11811
11812
  }
11812
- function Xf() {
11813
+ function eg() {
11813
11814
  var c;
11814
11815
  const t = F((d) => {
11815
11816
  var o;
@@ -11875,8 +11876,8 @@ function Xf() {
11875
11876
  ) })
11876
11877
  ] });
11877
11878
  }
11878
- const Zf = Object.keys(Bl);
11879
- function eg() {
11879
+ const tg = Object.keys(Bl);
11880
+ function ag() {
11880
11881
  const t = F((p) => p.card), a = F((p) => {
11881
11882
  var h;
11882
11883
  return (h = p.card) == null ? void 0 : h.preferences;
@@ -11916,7 +11917,7 @@ function eg() {
11916
11917
  onValueChange: (p) => f(p ?? "blue"),
11917
11918
  className: "space-y-3",
11918
11919
  children: [
11919
- Zf.map((p) => {
11920
+ tg.map((p) => {
11920
11921
  const h = Bl[p];
11921
11922
  return /* @__PURE__ */ n(
11922
11923
  "div",
@@ -12008,7 +12009,7 @@ function el(t) {
12008
12009
  const a = { ...t };
12009
12010
  return a.targetMetricKey || delete a.targetMetricKey, a.comparativeMetricKey || delete a.comparativeMetricKey, !a.targetValue && a.targetValue !== 0 && delete a.targetValue, (!a.rangeKeys || Object.keys(a.rangeKeys).length === 0) && delete a.rangeKeys, (!a.ranges || Object.keys(a.ranges).length === 0) && delete a.ranges, (!a.rangeLabels || Object.keys(a.rangeLabels).length === 0) && delete a.rangeLabels, a;
12010
12011
  }
12011
- function tg() {
12012
+ function ng() {
12012
12013
  var $, L;
12013
12014
  const t = F((b) => b.card.preferences), a = F((b) => b.card), r = F((b) => b.isDevMode), { setCardPreferences: s, setChartOrientation: l } = be(), c = se(
12014
12015
  () => (t == null ? void 0 : t.bulletConfig) || {},
@@ -12384,7 +12385,7 @@ function tl(t) {
12384
12385
  if (a.xMetricKey || delete a.xMetricKey, a.yMetricKey || delete a.yMetricKey, a.radiusMetricKey || delete a.radiusMetricKey, a.labelKey || delete a.labelKey, a.groupKey || delete a.groupKey, a.enableGrouping === void 0 && delete a.enableGrouping, a.radiusScale || delete a.radiusScale, a.fixedRadius === void 0 && delete a.fixedRadius, a.minRadius === void 0 && delete a.minRadius, a.maxRadius === void 0 && delete a.maxRadius, Object.keys(a).length !== 0)
12385
12386
  return a;
12386
12387
  }
12387
- function ag() {
12388
+ function rg() {
12388
12389
  var E, I, R, _, w, y, P, V, $, L, b, Y;
12389
12390
  const t = F((k) => k.card.preferences), a = F((k) => k.card), r = st(), s = F((k) => k.isDevMode), { setCardPreferences: l, updateCardInFrame: c } = be(), d = r === "bubble", o = r === "scatter", i = se(
12390
12391
  () => (t == null ? void 0 : t.bubbleScatterConfig) || {},
@@ -12768,7 +12769,7 @@ function ag() {
12768
12769
  ] })
12769
12770
  ] });
12770
12771
  }
12771
- const ng = [
12772
+ const sg = [
12772
12773
  {
12773
12774
  value: "percentOfTotal",
12774
12775
  label: "% of Total",
@@ -12780,7 +12781,7 @@ const ng = [
12780
12781
  description: "First stage = 100%, others relative to first stage"
12781
12782
  }
12782
12783
  ];
12783
- function rg() {
12784
+ function lg() {
12784
12785
  const t = F((p) => p.card), a = F((p) => {
12785
12786
  var h;
12786
12787
  return (h = p.card) == null ? void 0 : h.preferences;
@@ -12814,7 +12815,7 @@ function rg() {
12814
12815
  value: c,
12815
12816
  onValueChange: (p) => f(p),
12816
12817
  className: "space-y-2",
12817
- children: ng.map((p) => /* @__PURE__ */ n(
12818
+ children: sg.map((p) => /* @__PURE__ */ n(
12818
12819
  "div",
12819
12820
  {
12820
12821
  className: "flex items-start gap-2 rounded-md border border-border px-3 py-2",
@@ -12892,7 +12893,7 @@ function rg() {
12892
12893
  }
12893
12894
  function pn() {
12894
12895
  var d, o;
12895
- const t = F((i) => i.card), { data: a, comparisonMetadata: r } = ct(t), s = (a == null ? void 0 : a.records) || [], { keys: l } = xl(s, r), c = l.slice(1).filter((i) => !Em.includes(i));
12896
+ const t = F((i) => i.card), { data: a, comparisonMetadata: r } = ct(t), s = (a == null ? void 0 : a.records) || [], { keys: l } = xl(s, r), c = l.slice(1).filter((i) => !Im.includes(i));
12896
12897
  if (Ed(t.type)) {
12897
12898
  const i = t.config, f = (d = i == null ? void 0 : i.pivotByColumns) != null && d.length && ((o = i == null ? void 0 : i.groupByColumns) != null && o.length) ? Fd(s, i.metricColumns || []) : s, u = Id({
12898
12899
  card: t,
@@ -12915,7 +12916,7 @@ function pn() {
12915
12916
  defaultMetricKeys: c
12916
12917
  };
12917
12918
  }
12918
- const sg = [
12919
+ const og = [
12919
12920
  { value: "USD", label: "USD - US Dollar" },
12920
12921
  { value: "EUR", label: "EUR - Euro" },
12921
12922
  { value: "GBP", label: "GBP - British Pound" },
@@ -12924,7 +12925,7 @@ const sg = [
12924
12925
  { value: "INR", label: "INR - Indian Rupee" },
12925
12926
  { value: "CAD", label: "CAD - Canadian Dollar" },
12926
12927
  { value: "AUD", label: "AUD - Australian Dollar" }
12927
- ], lg = [
12928
+ ], ig = [
12928
12929
  { value: "en-US", label: "English (US)" },
12929
12930
  { value: "en-GB", label: "English (UK)" },
12930
12931
  { value: "de-DE", label: "German" },
@@ -12933,7 +12934,7 @@ const sg = [
12933
12934
  { value: "it-IT", label: "Italian" },
12934
12935
  { value: "pt-BR", label: "Portuguese (Brazil)" },
12935
12936
  { value: "zh-CN", label: "Chinese (Simplified)" }
12936
- ], og = ["center", "start", "end"], ig = ["center", "start", "end", "top", "bottom"];
12937
+ ], cg = ["center", "start", "end"], dg = ["center", "start", "end", "top", "bottom"];
12937
12938
  function fn({
12938
12939
  config: t,
12939
12940
  onChange: a,
@@ -12993,7 +12994,7 @@ function fn({
12993
12994
  onValueChange: (g) => i("anchor", g),
12994
12995
  children: [
12995
12996
  /* @__PURE__ */ e(X, { className: "h-7 w-24 text-xs", children: /* @__PURE__ */ e(Z, {}) }),
12996
- /* @__PURE__ */ e(ee, { children: og.map((g) => /* @__PURE__ */ e(z, { value: g, className: "text-xs", children: Ct(g) }, g)) })
12997
+ /* @__PURE__ */ e(ee, { children: cg.map((g) => /* @__PURE__ */ e(z, { value: g, className: "text-xs", children: Ct(g) }, g)) })
12997
12998
  ]
12998
12999
  }
12999
13000
  )
@@ -13007,7 +13008,7 @@ function fn({
13007
13008
  onValueChange: (g) => i("align", g),
13008
13009
  children: [
13009
13010
  /* @__PURE__ */ e(X, { className: "h-7 w-24 text-xs", children: /* @__PURE__ */ e(Z, {}) }),
13010
- /* @__PURE__ */ e(ee, { children: ig.map((g) => /* @__PURE__ */ e(z, { value: g, className: "text-xs", children: Ct(g) }, g)) })
13011
+ /* @__PURE__ */ e(ee, { children: dg.map((g) => /* @__PURE__ */ e(z, { value: g, className: "text-xs", children: Ct(g) }, g)) })
13011
13012
  ]
13012
13013
  }
13013
13014
  )
@@ -13052,7 +13053,7 @@ function fn({
13052
13053
  onValueChange: (g) => u("currency", g),
13053
13054
  children: [
13054
13055
  /* @__PURE__ */ e(X, { className: "h-7 w-28 text-xs", children: /* @__PURE__ */ e(Z, {}) }),
13055
- /* @__PURE__ */ e(ee, { children: sg.map((g) => /* @__PURE__ */ e(
13056
+ /* @__PURE__ */ e(ee, { children: og.map((g) => /* @__PURE__ */ e(
13056
13057
  z,
13057
13058
  {
13058
13059
  value: g.value,
@@ -13085,7 +13086,7 @@ function fn({
13085
13086
  onValueChange: (g) => u("locale", g),
13086
13087
  children: [
13087
13088
  /* @__PURE__ */ e(X, { className: "h-7 w-28 text-xs", children: /* @__PURE__ */ e(Z, {}) }),
13088
- /* @__PURE__ */ e(ee, { children: lg.map((g) => /* @__PURE__ */ e(
13089
+ /* @__PURE__ */ e(ee, { children: ig.map((g) => /* @__PURE__ */ e(
13089
13090
  z,
13090
13091
  {
13091
13092
  value: g.value,
@@ -13171,10 +13172,10 @@ function fn({
13171
13172
  ] })
13172
13173
  ] });
13173
13174
  }
13174
- const cg = [
13175
+ const ug = [
13175
13176
  { type: "bar", icon: dn, label: "Bar" },
13176
13177
  { type: "line", icon: cn, label: "Line" }
13177
- ], dg = [0, 1, 2, 3, 4, 5, 6, 8, 10], ug = [
13178
+ ], mg = [0, 1, 2, 3, 4, 5, 6, 8, 10], hg = [
13178
13179
  { value: "circle", label: "Circle ●" },
13179
13180
  { value: "rect", label: "Square ■" },
13180
13181
  { value: "rectRounded", label: "Rounded ▢" },
@@ -13185,13 +13186,13 @@ const cg = [
13185
13186
  { value: "star", label: "Star ★" },
13186
13187
  { value: "dash", label: "Dash —" },
13187
13188
  { value: "line", label: "Line │" }
13188
- ], mg = [
13189
+ ], pg = [
13189
13190
  { value: "solid", label: "Solid ───" },
13190
13191
  { value: "dashed", label: "Dashed - - -" },
13191
13192
  { value: "dotted", label: "Dotted ···" },
13192
13193
  { value: "dash-dot", label: "Dash-Dot -·-·" }
13193
13194
  ];
13194
- function hg() {
13195
+ function fg() {
13195
13196
  return F((a) => {
13196
13197
  var r;
13197
13198
  return (r = a.card) == null ? void 0 : r.type;
@@ -13200,14 +13201,14 @@ function hg() {
13200
13201
  /* @__PURE__ */ e(Pa, { className: "h-4 w-4 text-muted-foreground" }),
13201
13202
  /* @__PURE__ */ e("span", { children: "Series" })
13202
13203
  ] }) }),
13203
- /* @__PURE__ */ e(Le, { className: "pt-2", children: /* @__PURE__ */ e(pg, {}) })
13204
+ /* @__PURE__ */ e(Le, { className: "pt-2", children: /* @__PURE__ */ e(gg, {}) })
13204
13205
  ] });
13205
13206
  }
13206
- function pg() {
13207
+ function gg() {
13207
13208
  const { transformedMetricKeys: t } = pn();
13208
- return t.length === 0 ? /* @__PURE__ */ e("div", { className: "rounded-lg border border-dashed border-border p-4 text-center text-xs text-muted-foreground", children: "Add metrics to configure series" }) : /* @__PURE__ */ e("div", { className: "space-y-3", children: t.map((a, r) => /* @__PURE__ */ e(fg, { metricKey: a, idx: r }, a)) });
13209
+ return t.length === 0 ? /* @__PURE__ */ e("div", { className: "rounded-lg border border-dashed border-border p-4 text-center text-xs text-muted-foreground", children: "Add metrics to configure series" }) : /* @__PURE__ */ e("div", { className: "space-y-3", children: t.map((a, r) => /* @__PURE__ */ e(xg, { metricKey: a, idx: r }, a)) });
13209
13210
  }
13210
- function fg({ metricKey: t, idx: a }) {
13211
+ function xg({ metricKey: t, idx: a }) {
13211
13212
  var v;
13212
13213
  const [r, s] = U(!1), l = F((T) => {
13213
13214
  var N;
@@ -13304,7 +13305,7 @@ function fg({ metricKey: t, idx: a }) {
13304
13305
  /* @__PURE__ */ n("div", { className: "flex items-end gap-4", children: [
13305
13306
  /* @__PURE__ */ n("div", { className: "flex-1 space-y-1.5", children: [
13306
13307
  /* @__PURE__ */ e(O, { className: "text-xs text-muted-foreground", children: "Chart Type" }),
13307
- /* @__PURE__ */ e("div", { className: "flex gap-2", children: cg.map(({ type: T, icon: N, label: g }) => /* @__PURE__ */ n(
13308
+ /* @__PURE__ */ e("div", { className: "flex gap-2", children: ug.map(({ type: T, icon: N, label: g }) => /* @__PURE__ */ n(
13308
13309
  "button",
13309
13310
  {
13310
13311
  onClick: () => h(T),
@@ -13350,7 +13351,7 @@ function fg({ metricKey: t, idx: a }) {
13350
13351
  onValueChange: (T) => p({ lineStyle: T }),
13351
13352
  children: [
13352
13353
  /* @__PURE__ */ e(X, { className: "h-8 w-full text-xs", children: /* @__PURE__ */ e(Z, {}) }),
13353
- /* @__PURE__ */ e(ee, { children: mg.map(({ value: T, label: N }) => /* @__PURE__ */ e(
13354
+ /* @__PURE__ */ e(ee, { children: pg.map(({ value: T, label: N }) => /* @__PURE__ */ e(
13354
13355
  z,
13355
13356
  {
13356
13357
  value: T,
@@ -13372,7 +13373,7 @@ function fg({ metricKey: t, idx: a }) {
13372
13373
  onValueChange: (T) => p({ pointRadius: Number(T) }),
13373
13374
  children: [
13374
13375
  /* @__PURE__ */ e(X, { className: "h-8 w-full text-xs", children: /* @__PURE__ */ e(Z, {}) }),
13375
- /* @__PURE__ */ e(ee, { children: dg.map((T) => /* @__PURE__ */ e(
13376
+ /* @__PURE__ */ e(ee, { children: mg.map((T) => /* @__PURE__ */ e(
13376
13377
  z,
13377
13378
  {
13378
13379
  value: String(T),
@@ -13394,7 +13395,7 @@ function fg({ metricKey: t, idx: a }) {
13394
13395
  onValueChange: (T) => p({ pointStyle: T }),
13395
13396
  children: [
13396
13397
  /* @__PURE__ */ e(X, { className: "h-8 w-full text-xs", children: /* @__PURE__ */ e(Z, {}) }),
13397
- /* @__PURE__ */ e(ee, { children: ug.map(({ value: T, label: N }) => /* @__PURE__ */ e(
13398
+ /* @__PURE__ */ e(ee, { children: hg.map(({ value: T, label: N }) => /* @__PURE__ */ e(
13398
13399
  z,
13399
13400
  {
13400
13401
  value: T,
@@ -13442,7 +13443,7 @@ const zn = [
13442
13443
  { value: "-1", label: "Previous Series", description: "Fill to the series below" },
13443
13444
  { value: "+1", label: "Next Series", description: "Fill to the series above" },
13444
13445
  { value: "false", label: "No Fill (Line)", description: "Show as line without fill" }
13445
- ], gg = [0, 1, 2, 3, 4, 5, 6, 8, 10], xg = [
13446
+ ], bg = [0, 1, 2, 3, 4, 5, 6, 8, 10], vg = [
13446
13447
  { value: "circle", label: "Circle ●" },
13447
13448
  { value: "rect", label: "Square ■" },
13448
13449
  { value: "rectRounded", label: "Rounded ▢" },
@@ -13453,16 +13454,16 @@ const zn = [
13453
13454
  { value: "star", label: "Star ★" },
13454
13455
  { value: "dash", label: "Dash —" },
13455
13456
  { value: "line", label: "Line │" }
13456
- ], bg = [
13457
+ ], yg = [
13457
13458
  { value: "solid", label: "Solid ───" },
13458
13459
  { value: "dashed", label: "Dashed - - -" },
13459
13460
  { value: "dotted", label: "Dotted ···" },
13460
13461
  { value: "dash-dot", label: "Dash-Dot -·-·" }
13461
13462
  ];
13462
- function vg(t) {
13463
+ function Ng(t) {
13463
13464
  return t == null ? "origin" : t === !1 ? "false" : t;
13464
13465
  }
13465
- function yg() {
13466
+ function Cg() {
13466
13467
  const t = F((a) => {
13467
13468
  var r;
13468
13469
  return (r = a.card) == null ? void 0 : r.type;
@@ -13472,14 +13473,14 @@ function yg() {
13472
13473
  /* @__PURE__ */ e(Pa, { className: "h-4 w-4 text-muted-foreground" }),
13473
13474
  /* @__PURE__ */ e("span", { children: "Series" })
13474
13475
  ] }) }),
13475
- /* @__PURE__ */ e(Le, { className: "pt-2", children: /* @__PURE__ */ e(Ng, {}) })
13476
+ /* @__PURE__ */ e(Le, { className: "pt-2", children: /* @__PURE__ */ e(wg, {}) })
13476
13477
  ] });
13477
13478
  }
13478
- function Ng() {
13479
+ function wg() {
13479
13480
  const { transformedMetricKeys: t } = pn();
13480
- return t.length === 0 ? /* @__PURE__ */ e("div", { className: "rounded-lg border border-dashed border-border p-4 text-center text-xs text-muted-foreground", children: "Add metrics to configure series" }) : /* @__PURE__ */ e("div", { className: "space-y-3", children: t.map((a, r) => /* @__PURE__ */ e(Cg, { metricKey: a, idx: r }, a)) });
13481
+ return t.length === 0 ? /* @__PURE__ */ e("div", { className: "rounded-lg border border-dashed border-border p-4 text-center text-xs text-muted-foreground", children: "Add metrics to configure series" }) : /* @__PURE__ */ e("div", { className: "space-y-3", children: t.map((a, r) => /* @__PURE__ */ e(Sg, { metricKey: a, idx: r }, a)) });
13481
13482
  }
13482
- function Cg({ metricKey: t, idx: a }) {
13483
+ function Sg({ metricKey: t, idx: a }) {
13483
13484
  var S;
13484
13485
  const [r, s] = U(!1), l = F((x) => {
13485
13486
  var v;
@@ -13489,7 +13490,7 @@ function Cg({ metricKey: t, idx: a }) {
13489
13490
  var v, T;
13490
13491
  return (T = (v = x.card) == null ? void 0 : v.preferences) == null ? void 0 : T.datasetOptions;
13491
13492
  }
13492
- ), d = c == null ? void 0 : c.find((x) => x.idx === a), { setCardPreferences: o } = F((x) => x.actions), i = vg(d == null ? void 0 : d.fill), f = ((S = d == null ? void 0 : d.dataLabels) == null ? void 0 : S.enabled) ?? !1, u = zn.find((x) => x.value === i) || zn[0];
13493
+ ), d = c == null ? void 0 : c.find((x) => x.idx === a), { setCardPreferences: o } = F((x) => x.actions), i = Ng(d == null ? void 0 : d.fill), f = ((S = d == null ? void 0 : d.dataLabels) == null ? void 0 : S.enabled) ?? !1, u = zn.find((x) => x.value === i) || zn[0];
13493
13494
  function m(x) {
13494
13495
  const v = {
13495
13496
  idx: a,
@@ -13591,7 +13592,7 @@ function Cg({ metricKey: t, idx: a }) {
13591
13592
  onValueChange: (x) => m({ lineStyle: x }),
13592
13593
  children: [
13593
13594
  /* @__PURE__ */ e(X, { className: "h-8 w-full text-xs", children: /* @__PURE__ */ e(Z, {}) }),
13594
- /* @__PURE__ */ e(ee, { children: bg.map(({ value: x, label: v }) => /* @__PURE__ */ e(
13595
+ /* @__PURE__ */ e(ee, { children: yg.map(({ value: x, label: v }) => /* @__PURE__ */ e(
13595
13596
  z,
13596
13597
  {
13597
13598
  value: x,
@@ -13613,7 +13614,7 @@ function Cg({ metricKey: t, idx: a }) {
13613
13614
  onValueChange: (x) => m({ pointRadius: Number(x) }),
13614
13615
  children: [
13615
13616
  /* @__PURE__ */ e(X, { className: "h-8 w-full text-xs", children: /* @__PURE__ */ e(Z, {}) }),
13616
- /* @__PURE__ */ e(ee, { children: gg.map((x) => /* @__PURE__ */ e(
13617
+ /* @__PURE__ */ e(ee, { children: bg.map((x) => /* @__PURE__ */ e(
13617
13618
  z,
13618
13619
  {
13619
13620
  value: String(x),
@@ -13635,7 +13636,7 @@ function Cg({ metricKey: t, idx: a }) {
13635
13636
  onValueChange: (x) => m({ pointStyle: x }),
13636
13637
  children: [
13637
13638
  /* @__PURE__ */ e(X, { className: "h-8 w-full text-xs", children: /* @__PURE__ */ e(Z, {}) }),
13638
- /* @__PURE__ */ e(ee, { children: xg.map(({ value: x, label: v }) => /* @__PURE__ */ e(
13639
+ /* @__PURE__ */ e(ee, { children: vg.map(({ value: x, label: v }) => /* @__PURE__ */ e(
13639
13640
  z,
13640
13641
  {
13641
13642
  value: x,
@@ -13676,7 +13677,7 @@ function Cg({ metricKey: t, idx: a }) {
13676
13677
  ] }) }) })
13677
13678
  ] }) });
13678
13679
  }
13679
- const wg = [0, 1, 2, 3, 4, 5, 6, 8, 10], Sg = [
13680
+ const kg = [0, 1, 2, 3, 4, 5, 6, 8, 10], Tg = [
13680
13681
  { value: "circle", label: "Circle ●" },
13681
13682
  { value: "rect", label: "Square ■" },
13682
13683
  { value: "rectRounded", label: "Rounded ▢" },
@@ -13693,7 +13694,7 @@ const wg = [0, 1, 2, 3, 4, 5, 6, 8, 10], Sg = [
13693
13694
  { value: "dotted", label: "Dotted ···" },
13694
13695
  { value: "dash-dot", label: "Dash-Dot -·-·" }
13695
13696
  ];
13696
- function kg() {
13697
+ function Mg() {
13697
13698
  return F((a) => {
13698
13699
  var r;
13699
13700
  return (r = a.card) == null ? void 0 : r.type;
@@ -13702,14 +13703,14 @@ function kg() {
13702
13703
  /* @__PURE__ */ e(Pa, { className: "h-4 w-4 text-muted-foreground" }),
13703
13704
  /* @__PURE__ */ e("span", { children: "Series" })
13704
13705
  ] }) }),
13705
- /* @__PURE__ */ e(Le, { className: "pt-2", children: /* @__PURE__ */ e(Tg, {}) })
13706
+ /* @__PURE__ */ e(Le, { className: "pt-2", children: /* @__PURE__ */ e(Dg, {}) })
13706
13707
  ] });
13707
13708
  }
13708
- function Tg() {
13709
+ function Dg() {
13709
13710
  const { transformedMetricKeys: t } = pn();
13710
- return t.length === 0 ? /* @__PURE__ */ e("div", { className: "rounded-lg border border-dashed border-border p-4 text-center text-xs text-muted-foreground", children: "Add metrics to configure series" }) : /* @__PURE__ */ e("div", { className: "space-y-3", children: t.map((a, r) => /* @__PURE__ */ e(Mg, { metricKey: a, idx: r }, a)) });
13711
+ return t.length === 0 ? /* @__PURE__ */ e("div", { className: "rounded-lg border border-dashed border-border p-4 text-center text-xs text-muted-foreground", children: "Add metrics to configure series" }) : /* @__PURE__ */ e("div", { className: "space-y-3", children: t.map((a, r) => /* @__PURE__ */ e(Eg, { metricKey: a, idx: r }, a)) });
13711
13712
  }
13712
- function Mg({ metricKey: t, idx: a }) {
13713
+ function Eg({ metricKey: t, idx: a }) {
13713
13714
  var x;
13714
13715
  const [r, s] = U(!1), l = F((v) => {
13715
13716
  var T;
@@ -13779,7 +13780,7 @@ function Mg({ metricKey: t, idx: a }) {
13779
13780
  "border border-border bg-background text-muted-foreground"
13780
13781
  ),
13781
13782
  children: [
13782
- /* @__PURE__ */ e($h, { className: "h-3 w-3" }),
13783
+ /* @__PURE__ */ e(Hh, { className: "h-3 w-3" }),
13783
13784
  p.label.split(" ")[0]
13784
13785
  ]
13785
13786
  }
@@ -13820,7 +13821,7 @@ function Mg({ metricKey: t, idx: a }) {
13820
13821
  onValueChange: (v) => h({ pointRadius: Number(v) }),
13821
13822
  children: [
13822
13823
  /* @__PURE__ */ e(X, { className: "h-8 w-full text-xs", children: /* @__PURE__ */ e(Z, {}) }),
13823
- /* @__PURE__ */ e(ee, { children: wg.map((v) => /* @__PURE__ */ e(
13824
+ /* @__PURE__ */ e(ee, { children: kg.map((v) => /* @__PURE__ */ e(
13824
13825
  z,
13825
13826
  {
13826
13827
  value: String(v),
@@ -13842,7 +13843,7 @@ function Mg({ metricKey: t, idx: a }) {
13842
13843
  onValueChange: (v) => h({ pointStyle: v }),
13843
13844
  children: [
13844
13845
  /* @__PURE__ */ e(X, { className: "h-8 w-full text-xs", children: /* @__PURE__ */ e(Z, {}) }),
13845
- /* @__PURE__ */ e(ee, { children: Sg.map(({ value: v, label: T }) => /* @__PURE__ */ e(
13846
+ /* @__PURE__ */ e(ee, { children: Tg.map(({ value: v, label: T }) => /* @__PURE__ */ e(
13846
13847
  z,
13847
13848
  {
13848
13849
  value: v,
@@ -13883,8 +13884,8 @@ function Mg({ metricKey: t, idx: a }) {
13883
13884
  ] }) }) })
13884
13885
  ] }) });
13885
13886
  }
13886
- const Dg = [0, 2, 4, 6, 8, 10, 12, 16, 20];
13887
- function Eg() {
13887
+ const Fg = [0, 2, 4, 6, 8, 10, 12, 16, 20];
13888
+ function Ig() {
13888
13889
  const t = F((a) => {
13889
13890
  var r;
13890
13891
  return (r = a.card) == null ? void 0 : r.type;
@@ -13894,14 +13895,14 @@ function Eg() {
13894
13895
  /* @__PURE__ */ e(Pa, { className: "h-4 w-4 text-muted-foreground" }),
13895
13896
  /* @__PURE__ */ e("span", { children: "Series" })
13896
13897
  ] }) }),
13897
- /* @__PURE__ */ e(Le, { className: "pt-2", children: /* @__PURE__ */ e(Fg, {}) })
13898
+ /* @__PURE__ */ e(Le, { className: "pt-2", children: /* @__PURE__ */ e(Ag, {}) })
13898
13899
  ] });
13899
13900
  }
13900
- function Fg() {
13901
+ function Ag() {
13901
13902
  const { transformedMetricKeys: t } = pn();
13902
- return t.length === 0 ? /* @__PURE__ */ e("div", { className: "rounded-lg border border-dashed border-border p-4 text-center text-xs text-muted-foreground", children: "Add metrics to configure series" }) : /* @__PURE__ */ e("div", { className: "space-y-3", children: t.map((a, r) => /* @__PURE__ */ e(Ig, { metricKey: a, idx: r }, a)) });
13903
+ return t.length === 0 ? /* @__PURE__ */ e("div", { className: "rounded-lg border border-dashed border-border p-4 text-center text-xs text-muted-foreground", children: "Add metrics to configure series" }) : /* @__PURE__ */ e("div", { className: "space-y-3", children: t.map((a, r) => /* @__PURE__ */ e(Pg, { metricKey: a, idx: r }, a)) });
13903
13904
  }
13904
- function Ig({ metricKey: t, idx: a }) {
13905
+ function Pg({ metricKey: t, idx: a }) {
13905
13906
  var C;
13906
13907
  const [r, s] = U(!1), l = F((S) => {
13907
13908
  var x;
@@ -13992,7 +13993,7 @@ function Ig({ metricKey: t, idx: a }) {
13992
13993
  onValueChange: (S) => m({ borderRadius: Number(S) }),
13993
13994
  children: [
13994
13995
  /* @__PURE__ */ e(X, { className: "h-8 w-full text-xs", children: /* @__PURE__ */ e(Z, {}) }),
13995
- /* @__PURE__ */ e(ee, { children: Dg.map((S) => /* @__PURE__ */ e(
13996
+ /* @__PURE__ */ e(ee, { children: Fg.map((S) => /* @__PURE__ */ e(
13996
13997
  z,
13997
13998
  {
13998
13999
  value: String(S),
@@ -14032,7 +14033,7 @@ function Ig({ metricKey: t, idx: a }) {
14032
14033
  ] }) }) })
14033
14034
  ] }) });
14034
14035
  }
14035
- const Ag = [0, 1, 2, 3, 4, 5, 6, 8, 10], Pg = [
14036
+ const Rg = [0, 1, 2, 3, 4, 5, 6, 8, 10], Og = [
14036
14037
  { value: "circle", label: "Circle ●" },
14037
14038
  { value: "rect", label: "Square ■" },
14038
14039
  { value: "rectRounded", label: "Rounded ▢" },
@@ -14043,13 +14044,13 @@ const Ag = [0, 1, 2, 3, 4, 5, 6, 8, 10], Pg = [
14043
14044
  { value: "star", label: "Star ★" },
14044
14045
  { value: "dash", label: "Dash —" },
14045
14046
  { value: "line", label: "Line │" }
14046
- ], Rg = [
14047
+ ], Lg = [
14047
14048
  { value: "solid", label: "Solid ───" },
14048
14049
  { value: "dashed", label: "Dashed - - -" },
14049
14050
  { value: "dotted", label: "Dotted ···" },
14050
14051
  { value: "dash-dot", label: "Dash-Dot -·-·" }
14051
14052
  ];
14052
- function Og() {
14053
+ function Yg() {
14053
14054
  const t = F((o) => o.card), a = F((o) => {
14054
14055
  var i;
14055
14056
  return (i = o.card) == null ? void 0 : i.preferences;
@@ -14068,7 +14069,7 @@ function Og() {
14068
14069
  };
14069
14070
  return /* @__PURE__ */ n(Re, { value: "line-style", className: "border-b-0", children: [
14070
14071
  /* @__PURE__ */ e(Oe, { className: "flex w-full items-center gap-2 py-2 text-[12px] font-medium hover:no-underline", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
14071
- /* @__PURE__ */ e(Kh, { className: "h-4 w-4 text-muted-foreground" }),
14072
+ /* @__PURE__ */ e(jh, { className: "h-4 w-4 text-muted-foreground" }),
14072
14073
  /* @__PURE__ */ e("span", { children: "Line Style" })
14073
14074
  ] }) }),
14074
14075
  /* @__PURE__ */ e(Le, { className: "pt-2", children: /* @__PURE__ */ n("div", { className: "space-y-3", children: [
@@ -14082,7 +14083,7 @@ function Og() {
14082
14083
  onValueChange: (o) => d("lineStyle", o),
14083
14084
  children: [
14084
14085
  /* @__PURE__ */ e(X, { className: "h-8 text-xs", children: /* @__PURE__ */ e(Z, {}) }),
14085
- /* @__PURE__ */ e(ee, { children: Rg.map(({ value: o, label: i }) => /* @__PURE__ */ e(z, { value: o, className: "text-xs", children: i }, o)) })
14086
+ /* @__PURE__ */ e(ee, { children: Lg.map(({ value: o, label: i }) => /* @__PURE__ */ e(z, { value: o, className: "text-xs", children: i }, o)) })
14086
14087
  ]
14087
14088
  }
14088
14089
  )
@@ -14096,7 +14097,7 @@ function Og() {
14096
14097
  onValueChange: (o) => d("pointRadius", Number(o)),
14097
14098
  children: [
14098
14099
  /* @__PURE__ */ e(X, { className: "h-8 text-xs", children: /* @__PURE__ */ e(Z, {}) }),
14099
- /* @__PURE__ */ e(ee, { children: Ag.map((o) => /* @__PURE__ */ e(
14100
+ /* @__PURE__ */ e(ee, { children: Rg.map((o) => /* @__PURE__ */ e(
14100
14101
  z,
14101
14102
  {
14102
14103
  value: String(o),
@@ -14118,7 +14119,7 @@ function Og() {
14118
14119
  onValueChange: (o) => d("pointStyle", o),
14119
14120
  children: [
14120
14121
  /* @__PURE__ */ e(X, { className: "h-8 text-xs", children: /* @__PURE__ */ e(Z, {}) }),
14121
- /* @__PURE__ */ e(ee, { children: Pg.map(({ value: o, label: i }) => /* @__PURE__ */ e(z, { value: o, className: "text-xs", children: i }, o)) })
14122
+ /* @__PURE__ */ e(ee, { children: Og.map(({ value: o, label: i }) => /* @__PURE__ */ e(z, { value: o, className: "text-xs", children: i }, o)) })
14122
14123
  ]
14123
14124
  }
14124
14125
  )
@@ -14126,14 +14127,14 @@ function Og() {
14126
14127
  ] }) })
14127
14128
  ] });
14128
14129
  }
14129
- const Lg = [0, 2, 4, 6, 8, 10, 12, 16, 20], Yg = [
14130
+ const _g = [0, 2, 4, 6, 8, 10, 12, 16, 20], Vg = [
14130
14131
  { value: "0.5", label: "50%" },
14131
14132
  { value: "0.6", label: "60%" },
14132
14133
  { value: "0.7", label: "70%" },
14133
14134
  { value: "0.8", label: "80%" },
14134
14135
  { value: "0.9", label: "90%" },
14135
14136
  { value: "1", label: "100%" }
14136
- ], _g = [
14137
+ ], Bg = [
14137
14138
  { value: "0.5", label: "50%" },
14138
14139
  { value: "0.6", label: "60%" },
14139
14140
  { value: "0.7", label: "70%" },
@@ -14141,7 +14142,7 @@ const Lg = [0, 2, 4, 6, 8, 10, 12, 16, 20], Yg = [
14141
14142
  { value: "0.9", label: "90%" },
14142
14143
  { value: "1", label: "100%" }
14143
14144
  ];
14144
- function Vg() {
14145
+ function Kg() {
14145
14146
  const t = F((o) => o.card), a = F((o) => {
14146
14147
  var i;
14147
14148
  return (i = o.card) == null ? void 0 : i.preferences;
@@ -14174,7 +14175,7 @@ function Vg() {
14174
14175
  onValueChange: (o) => d("borderRadius", Number(o)),
14175
14176
  children: [
14176
14177
  /* @__PURE__ */ e(X, { className: "h-8 text-xs", children: /* @__PURE__ */ e(Z, {}) }),
14177
- /* @__PURE__ */ e(ee, { children: Lg.map((o) => /* @__PURE__ */ e(
14178
+ /* @__PURE__ */ e(ee, { children: _g.map((o) => /* @__PURE__ */ e(
14178
14179
  z,
14179
14180
  {
14180
14181
  value: String(o),
@@ -14196,7 +14197,7 @@ function Vg() {
14196
14197
  onValueChange: (o) => d("barPercentage", Number(o)),
14197
14198
  children: [
14198
14199
  /* @__PURE__ */ e(X, { className: "h-8 text-xs", children: /* @__PURE__ */ e(Z, {}) }),
14199
- /* @__PURE__ */ e(ee, { children: Yg.map(({ value: o, label: i }) => /* @__PURE__ */ e(z, { value: o, className: "text-xs", children: i }, o)) })
14200
+ /* @__PURE__ */ e(ee, { children: Vg.map(({ value: o, label: i }) => /* @__PURE__ */ e(z, { value: o, className: "text-xs", children: i }, o)) })
14200
14201
  ]
14201
14202
  }
14202
14203
  )
@@ -14210,7 +14211,7 @@ function Vg() {
14210
14211
  onValueChange: (o) => d("categoryPercentage", Number(o)),
14211
14212
  children: [
14212
14213
  /* @__PURE__ */ e(X, { className: "h-8 text-xs", children: /* @__PURE__ */ e(Z, {}) }),
14213
- /* @__PURE__ */ e(ee, { children: _g.map(({ value: o, label: i }) => /* @__PURE__ */ e(z, { value: o, className: "text-xs", children: i }, o)) })
14214
+ /* @__PURE__ */ e(ee, { children: Bg.map(({ value: o, label: i }) => /* @__PURE__ */ e(z, { value: o, className: "text-xs", children: i }, o)) })
14214
14215
  ]
14215
14216
  }
14216
14217
  )
@@ -14218,7 +14219,7 @@ function Vg() {
14218
14219
  ] }) })
14219
14220
  ] });
14220
14221
  }
14221
- function Bg() {
14222
+ function qg() {
14222
14223
  const t = F(
14223
14224
  (r) => {
14224
14225
  var s, l;
@@ -14251,29 +14252,29 @@ function Bg() {
14251
14252
  ] }) })
14252
14253
  ] });
14253
14254
  }
14254
- const Kg = ["kpi"], Un = 2;
14255
+ const jg = ["kpi"], Un = 2;
14255
14256
  function Jt(t) {
14256
14257
  return typeof t == "string" ? t.trim().toLowerCase() : ((t == null ? void 0 : t.id) || (t == null ? void 0 : t.qualifiedFieldName) || (t == null ? void 0 : t.name) || (t == null ? void 0 : t.label) || "").trim().toLowerCase();
14257
14258
  }
14258
- function qg(t) {
14259
+ function $g(t) {
14259
14260
  if (!(t != null && t.name) || !(t != null && t.dataType) || t.role === "metric")
14260
14261
  return !1;
14261
14262
  const a = mo(t.dataType);
14262
14263
  return ["date", "string", "boolean"].includes(a);
14263
14264
  }
14264
- function jg(t) {
14265
+ function zg(t) {
14265
14266
  return {
14266
14267
  ...t,
14267
14268
  role: "groupby"
14268
14269
  };
14269
14270
  }
14270
- function $g() {
14271
+ function Hg() {
14271
14272
  var T, N;
14272
14273
  const t = F((g) => g.card), a = F(
14273
14274
  (g) => g.actions.updateCardConfig
14274
- ), r = st(), { scopedFields: s } = ql(), l = ((T = t.config) == null ? void 0 : T.metricColumns) || [], c = ((N = t.config) == null ? void 0 : N.summary) || {}, d = c.breakdownDimensions || [], o = d.length > 0, i = Kg.includes(r), f = l.length > 0, u = c.enabled === !0, m = i && f, p = Array.from(
14275
+ ), r = st(), { scopedFields: s } = ql(), l = ((T = t.config) == null ? void 0 : T.metricColumns) || [], c = ((N = t.config) == null ? void 0 : N.summary) || {}, d = c.breakdownDimensions || [], o = d.length > 0, i = jg.includes(r), f = l.length > 0, u = c.enabled === !0, m = i && f, p = Array.from(
14275
14276
  new Map(
14276
- s.filter(qg).map((g) => [Jt(g), jg(g)])
14277
+ s.filter($g).map((g) => [Jt(g), zg(g)])
14277
14278
  ).values()
14278
14279
  ), h = new Set(
14279
14280
  p.map((g) => Jt(g))
@@ -14424,20 +14425,20 @@ function $g() {
14424
14425
  ) })
14425
14426
  ] });
14426
14427
  }
14427
- function zg() {
14428
+ function Ug() {
14428
14429
  var c;
14429
14430
  const t = F((d) => d.card), { setCardConfig: a } = be();
14430
14431
  if (!t || t.type !== "kpi" || no(t)) return null;
14431
- const r = Fm(t.config) !== void 0, s = ((c = t.config) == null ? void 0 : c.kpiBand) ?? "automatic";
14432
+ const r = Am(t.config) !== void 0, s = ((c = t.config) == null ? void 0 : c.kpiBand) ?? "automatic";
14432
14433
  return /* @__PURE__ */ n(Re, { value: "kpi-band", className: "border-none", children: [
14433
14434
  /* @__PURE__ */ e(Oe, { className: "flex items-center gap-2 py-2 text-[12px] hover:no-underline [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
14434
- /* @__PURE__ */ e(_h, { className: "h-3.5 w-3.5 text-foreground/60" }),
14435
+ /* @__PURE__ */ e(Bh, { className: "h-3.5 w-3.5 text-foreground/60" }),
14435
14436
  /* @__PURE__ */ e("span", { children: "Below the value" })
14436
14437
  ] }) }),
14437
14438
  /* @__PURE__ */ n(Le, { className: "space-y-2 pb-4 pt-2", children: [
14438
14439
  /* @__PURE__ */ e(O, { htmlFor: "kpi-band", className: "text-xs", children: "Show" }),
14439
14440
  /* @__PURE__ */ n(W, { value: s, onValueChange: (d) => a(
14440
- Im(t, d === "automatic" ? null : d).config
14441
+ Pm(t, d === "automatic" ? null : d).config
14441
14442
  ), children: [
14442
14443
  /* @__PURE__ */ e(X, { id: "kpi-band", className: "h-8 text-xs", children: /* @__PURE__ */ e(Z, {}) }),
14443
14444
  /* @__PURE__ */ n(ee, { children: [
@@ -14450,7 +14451,7 @@ function zg() {
14450
14451
  ] })
14451
14452
  ] });
14452
14453
  }
14453
- const Hg = /* @__PURE__ */ new Set([
14454
+ const Gg = /* @__PURE__ */ new Set([
14454
14455
  "area",
14455
14456
  "bar",
14456
14457
  "bubble",
@@ -14469,12 +14470,12 @@ const Hg = /* @__PURE__ */ new Set([
14469
14470
  "stackedLine",
14470
14471
  "tornado"
14471
14472
  ]);
14472
- function Ug() {
14473
+ function Qg() {
14473
14474
  const t = F((u) => u.card), a = F((u) => {
14474
14475
  var m;
14475
14476
  return (m = u.card) == null ? void 0 : m.preferences;
14476
14477
  }), r = st(), { setCardPreferences: s, updateCardInFrame: l } = be(), c = a == null ? void 0 : a.tooltipConfig, [d, o] = U(!!(c != null && c.valueFormat));
14477
- if (!t || !Hg.has(r || ""))
14478
+ if (!t || !Gg.has(r || ""))
14478
14479
  return null;
14479
14480
  const i = d || c != null && c.valueFormat ? "override" : "inherit", f = (u) => {
14480
14481
  const m = {
@@ -14528,36 +14529,36 @@ function ti({ mode: t }) {
14528
14529
  return (s = r.card) == null ? void 0 : s.type;
14529
14530
  });
14530
14531
  return xo(a) ? null : /* @__PURE__ */ n(ue, { children: [
14531
- a === "combo" && /* @__PURE__ */ e(hg, {}),
14532
- (a === "area" || a === "stackedArea") && /* @__PURE__ */ e(yg, {}),
14533
- a === "line" && /* @__PURE__ */ e(kg, {}),
14534
- (a === "bar" || a === "horizontalBar" || a === "stackedBar") && /* @__PURE__ */ e(Eg, {}),
14535
- /* @__PURE__ */ e(Og, {}),
14536
- /* @__PURE__ */ e(Vg, {}),
14537
- /* @__PURE__ */ e(Xf, {}),
14538
- t === "config" && /* @__PURE__ */ e(Bf, {}),
14539
- t === "config" && /* @__PURE__ */ e($g, {}),
14540
- t === "config" && /* @__PURE__ */ e(zg, {}),
14532
+ a === "combo" && /* @__PURE__ */ e(fg, {}),
14533
+ (a === "area" || a === "stackedArea") && /* @__PURE__ */ e(Cg, {}),
14534
+ a === "line" && /* @__PURE__ */ e(Mg, {}),
14535
+ (a === "bar" || a === "horizontalBar" || a === "stackedBar") && /* @__PURE__ */ e(Ig, {}),
14536
+ /* @__PURE__ */ e(Yg, {}),
14537
+ /* @__PURE__ */ e(Kg, {}),
14541
14538
  /* @__PURE__ */ e(eg, {}),
14542
- a === "bullet" && /* @__PURE__ */ e(tg, {}),
14543
- a === "funnel" && /* @__PURE__ */ e(rg, {}),
14544
- (a === "bubble" || a === "scatter") && /* @__PURE__ */ e(ag, {}),
14545
- (a === "stackedBar" || a === "stackedLine") && /* @__PURE__ */ e(Bg, {}),
14546
- /* @__PURE__ */ e(Gf, {}),
14547
- /* @__PURE__ */ e(Qf, {}),
14539
+ t === "config" && /* @__PURE__ */ e(qf, {}),
14540
+ t === "config" && /* @__PURE__ */ e(Hg, {}),
14541
+ t === "config" && /* @__PURE__ */ e(Ug, {}),
14542
+ /* @__PURE__ */ e(ag, {}),
14543
+ a === "bullet" && /* @__PURE__ */ e(ng, {}),
14544
+ a === "funnel" && /* @__PURE__ */ e(lg, {}),
14545
+ (a === "bubble" || a === "scatter") && /* @__PURE__ */ e(rg, {}),
14546
+ (a === "stackedBar" || a === "stackedLine") && /* @__PURE__ */ e(qg, {}),
14548
14547
  /* @__PURE__ */ e(Jf, {}),
14549
14548
  /* @__PURE__ */ e(Wf, {}),
14550
- /* @__PURE__ */ e(Ug, {})
14549
+ /* @__PURE__ */ e(Xf, {}),
14550
+ /* @__PURE__ */ e(Zf, {}),
14551
+ /* @__PURE__ */ e(Qg, {})
14551
14552
  ] });
14552
14553
  }
14553
- function Gg() {
14554
+ function Jg() {
14554
14555
  const t = F((r) => r.card), a = t == null ? void 0 : t.type;
14555
14556
  return a ? /* @__PURE__ */ n("div", { className: "space-y-4 px-6 py-4", children: [
14556
14557
  /* @__PURE__ */ e(Jo, { chartType: a }),
14557
14558
  /* @__PURE__ */ e(un, { type: "single", collapsible: !0, className: "w-full px-2", children: /* @__PURE__ */ e(ti, { mode: "dev" }) })
14558
14559
  ] }) : null;
14559
14560
  }
14560
- function Qg({
14561
+ function Wg({
14561
14562
  focusSection: t,
14562
14563
  focusRequestId: a
14563
14564
  }) {
@@ -14574,22 +14575,22 @@ function Qg({
14574
14575
  );
14575
14576
  switch (s) {
14576
14577
  case "kpi":
14577
- return /* @__PURE__ */ e(Ef, {});
14578
+ return /* @__PURE__ */ e(If, {});
14578
14579
  case "custom":
14579
14580
  return /* @__PURE__ */ e("div", { className: "px-6 py-2", children: /* @__PURE__ */ e(zo, {}) });
14580
14581
  case "text":
14581
- return /* @__PURE__ */ e(jf, {});
14582
+ return /* @__PURE__ */ e(zf, {});
14582
14583
  default:
14583
- return /* @__PURE__ */ e(Gg, {});
14584
+ return /* @__PURE__ */ e(Jg, {});
14584
14585
  }
14585
14586
  }
14586
14587
  return /* @__PURE__ */ n(mn, { className: "h-full w-full text-sm", children: [
14587
14588
  l(),
14588
- /* @__PURE__ */ e(Mu, { orientation: "horizontal" })
14589
+ /* @__PURE__ */ e(Eu, { orientation: "horizontal" })
14589
14590
  ] });
14590
14591
  }
14591
- const Jg = 32;
14592
- function Wg() {
14592
+ const Xg = 32;
14593
+ function Zg() {
14593
14594
  const t = Ke(null), a = F((m) => m.isDevMode), [r, s] = U(!1), [l, c] = U({ section: null, id: 0 }), d = !a || r, o = () => s((m) => !m), i = (m) => {
14594
14595
  m && c((p) => ({
14595
14596
  section: m,
@@ -14620,10 +14621,10 @@ function Wg() {
14620
14621
  defaultSize: 50,
14621
14622
  collapsible: !0,
14622
14623
  collapsedSize: 0,
14623
- children: /* @__PURE__ */ e("div", { className: "flex min-h-0 min-w-0 flex-1 flex-col", children: /* @__PURE__ */ e(kp, {}) })
14624
+ children: /* @__PURE__ */ e("div", { className: "flex min-h-0 min-w-0 flex-1 flex-col", children: /* @__PURE__ */ e(Mp, {}) })
14624
14625
  }
14625
14626
  ),
14626
- /* @__PURE__ */ e(mf, { onToggleEditor: f, children: /* @__PURE__ */ e(
14627
+ /* @__PURE__ */ e(pf, { onToggleEditor: f, children: /* @__PURE__ */ e(
14627
14628
  Vn,
14628
14629
  {
14629
14630
  mode: "toolbar",
@@ -14643,10 +14644,10 @@ function Wg() {
14643
14644
  ia,
14644
14645
  {
14645
14646
  className: "flex",
14646
- defaultSize: Jg,
14647
+ defaultSize: Xg,
14647
14648
  maxSize: 45,
14648
14649
  children: /* @__PURE__ */ e(
14649
- Qg,
14650
+ Wg,
14650
14651
  {
14651
14652
  focusSection: l.section,
14652
14653
  focusRequestId: l.id
@@ -14906,7 +14907,7 @@ function al(t) {
14906
14907
  ];
14907
14908
  }
14908
14909
  }
14909
- function Xg({
14910
+ function ex({
14910
14911
  aliasTemplate: t,
14911
14912
  onAliasTemplateChange: a
14912
14913
  }) {
@@ -14966,7 +14967,7 @@ function Xg({
14966
14967
  ] })
14967
14968
  ] });
14968
14969
  }
14969
- function Zg({
14970
+ function tx({
14970
14971
  valueAliases: t,
14971
14972
  onValueAliasesChange: a
14972
14973
  }) {
@@ -15088,7 +15089,7 @@ function Zg({
15088
15089
  ] })
15089
15090
  ] });
15090
15091
  }
15091
- function ex({ idx: t }) {
15092
+ function ax({ idx: t }) {
15092
15093
  var o;
15093
15094
  const a = F((i) => {
15094
15095
  var f;
@@ -15102,7 +15103,7 @@ function ex({ idx: t }) {
15102
15103
  (i) => i.actions.setCardPreferences
15103
15104
  ), l = (o = a == null ? void 0 : a.chartOptions) == null ? void 0 : o.indexAxis, c = r == null ? void 0 : r.find((i) => i.idx === t);
15104
15105
  function d(i, f) {
15105
- (i === "end" || i === "start") && Am(Pm());
15106
+ (i === "end" || i === "start") && Rm(Om());
15106
15107
  const u = {
15107
15108
  display: i !== "none",
15108
15109
  align: i,
@@ -15149,7 +15150,7 @@ function ex({ idx: t }) {
15149
15150
  onClick: () => d("start", t),
15150
15151
  className: "h-7 p-1 text-xs font-normal",
15151
15152
  children: /* @__PURE__ */ e(
15152
- Oh,
15153
+ Yh,
15153
15154
  {
15154
15155
  className: J("h-4 w-4", {
15155
15156
  "rotate-90": l === "y"
@@ -15164,7 +15165,7 @@ function ex({ idx: t }) {
15164
15165
  onClick: () => d("center", t),
15165
15166
  className: "h-7 p-1 text-xs font-normal",
15166
15167
  children: /* @__PURE__ */ e(
15167
- Yh,
15168
+ Vh,
15168
15169
  {
15169
15170
  className: J("h-4 w-4", {
15170
15171
  "rotate-90": l === "y"
@@ -15179,7 +15180,7 @@ function ex({ idx: t }) {
15179
15180
  onClick: () => d("end", t),
15180
15181
  className: "h-7 p-1 text-xs font-normal",
15181
15182
  children: /* @__PURE__ */ e(
15182
- Lh,
15183
+ _h,
15183
15184
  {
15184
15185
  className: J("h-4 w-4", {
15185
15186
  "rotate-90": l === "y"
@@ -15191,10 +15192,10 @@ function ex({ idx: t }) {
15191
15192
  ] }) })
15192
15193
  ] });
15193
15194
  }
15194
- function tx(t, a = 30) {
15195
+ function nx(t, a = 30) {
15195
15196
  return t.length > a ? t.slice(0, a) + "..." : t;
15196
15197
  }
15197
- function ax({
15198
+ function rx({
15198
15199
  col: t,
15199
15200
  idx: a,
15200
15201
  className: r,
@@ -15243,7 +15244,7 @@ function ax({
15243
15244
  r
15244
15245
  ),
15245
15246
  children: [
15246
- l || /* @__PURE__ */ e($r, { className: "max-w-[100px]", title: t, children: tx(t) }),
15247
+ l || /* @__PURE__ */ e($r, { className: "max-w-[100px]", title: t, children: nx(t) }),
15247
15248
  /* @__PURE__ */ n("div", { className: "flex gap-2", children: [
15248
15249
  /* @__PURE__ */ e(
15249
15250
  dn,
@@ -15275,13 +15276,13 @@ function ax({
15275
15276
  )
15276
15277
  }
15277
15278
  ),
15278
- /* @__PURE__ */ e(ex, { idx: a })
15279
+ /* @__PURE__ */ e(ax, { idx: a })
15279
15280
  ] })
15280
15281
  ]
15281
15282
  }
15282
15283
  );
15283
15284
  }
15284
- function nx() {
15285
+ function sx() {
15285
15286
  const t = F((o) => o.card.type), a = F((o) => o.isDevMode), r = F((o) => o.card.preferences), { setCardPreferences: s } = F((o) => o.actions);
15286
15287
  function l(o) {
15287
15288
  var u;
@@ -15350,7 +15351,7 @@ function nx() {
15350
15351
  }
15351
15352
  return /* @__PURE__ */ e(ue, { children: a ? c() : d() });
15352
15353
  }
15353
- function rx({
15354
+ function lx({
15354
15355
  column: t
15355
15356
  }) {
15356
15357
  const a = F((i) => i.card.type), r = F(
@@ -15362,12 +15363,12 @@ function rx({
15362
15363
  (i) => i === t.label || i === t.name
15363
15364
  ), c = l ? s.indexOf(l) : -1;
15364
15365
  function d() {
15365
- return /* @__PURE__ */ e("div", { className: "pr-1", children: l && /* @__PURE__ */ e(ax, { idx: c, col: l, children: /* @__PURE__ */ e("div", { className: "w-[130px] text-xs text-muted-foreground", children: "Display Series As" }) }) });
15366
+ return /* @__PURE__ */ e("div", { className: "pr-1", children: l && /* @__PURE__ */ e(rx, { idx: c, col: l, children: /* @__PURE__ */ e("div", { className: "w-[130px] text-xs text-muted-foreground", children: "Display Series As" }) }) });
15366
15367
  }
15367
15368
  function o() {
15368
15369
  return /* @__PURE__ */ n("div", { className: "space-y-1", children: [
15369
15370
  /* @__PURE__ */ e(O, { className: "text-xs font-medium text-muted-foreground", children: "Data Labels" }),
15370
- /* @__PURE__ */ e(nx, {})
15371
+ /* @__PURE__ */ e(sx, {})
15371
15372
  ] });
15372
15373
  }
15373
15374
  return /* @__PURE__ */ n("div", { className: "space-y-1", children: [
@@ -15375,7 +15376,7 @@ function rx({
15375
15376
  ["pie", "doughnut"].includes(a) && o()
15376
15377
  ] });
15377
15378
  }
15378
- function sx({
15379
+ function ox({
15379
15380
  field: t,
15380
15381
  searchQuery: a = "",
15381
15382
  limit: r = 500
@@ -15433,7 +15434,7 @@ function sx({
15433
15434
  const p = await ro(
15434
15435
  `${l.apiServiceUrl}/v1/query`,
15435
15436
  (s == null ? void 0 : s.accessToken) || "",
15436
- m
15437
+ qd(m, jd())
15437
15438
  );
15438
15439
  if (p != null && p.error)
15439
15440
  return console.error("Error fetching attribute values:", p.error), [];
@@ -15467,8 +15468,8 @@ function sx({
15467
15468
  refetch: f.refetch
15468
15469
  };
15469
15470
  }
15470
- const lx = /* @__PURE__ */ new Set();
15471
- function ox({
15471
+ const ix = /* @__PURE__ */ new Set();
15472
+ function cx({
15472
15473
  open: t,
15473
15474
  onOpenChange: a,
15474
15475
  availableFields: r,
@@ -15572,10 +15573,10 @@ function ox({
15572
15573
  )) })
15573
15574
  ] }),
15574
15575
  o === "fields" && !d ? /* @__PURE__ */ e("div", { className: "flex flex-col", children: /* @__PURE__ */ e(
15575
- qd,
15576
+ $d,
15576
15577
  {
15577
15578
  fields: h,
15578
- selectedIds: lx,
15579
+ selectedIds: ix,
15579
15580
  onSelect: C,
15580
15581
  query: f,
15581
15582
  onQueryChange: u,
@@ -15586,7 +15587,7 @@ function ox({
15586
15587
  emptyMessage: f ? `No fields found matching "${f}"` : r.length > 0 ? "All available fields are already filtered" : void 0
15587
15588
  }
15588
15589
  ) }) : /* @__PURE__ */ e(
15589
- ix,
15590
+ dx,
15590
15591
  {
15591
15592
  field: m.field,
15592
15593
  selectedValues: m.selectedValues,
@@ -15611,7 +15612,7 @@ function ox({
15611
15612
  ] })
15612
15613
  ] }) });
15613
15614
  }
15614
- function ix({
15615
+ function dx({
15615
15616
  field: t,
15616
15617
  selectedValues: a,
15617
15618
  onValuesChange: r,
@@ -15621,7 +15622,7 @@ function ix({
15621
15622
  values: d,
15622
15623
  isLoading: o,
15623
15624
  isFetching: i
15624
- } = sx({
15625
+ } = ox({
15625
15626
  field: t,
15626
15627
  searchQuery: l,
15627
15628
  limit: 500
@@ -15689,16 +15690,16 @@ function ix({
15689
15690
  ] })
15690
15691
  ] });
15691
15692
  }
15692
- function cx(t, a) {
15693
+ function ux(t, a) {
15693
15694
  return t === "pivotBy" && a === "table";
15694
15695
  }
15695
- const dx = [], Gn = {
15696
+ const mx = [], Gn = {
15696
15697
  running_total: "Running Total",
15697
15698
  moving_average: "Moving Average",
15698
15699
  difference_from_previous: "Difference from previous",
15699
15700
  percent_of_total: "Percent of Total"
15700
15701
  };
15701
- function ux({
15702
+ function hx({
15702
15703
  field: t,
15703
15704
  zone: a,
15704
15705
  index: r,
@@ -15717,13 +15718,13 @@ function ux({
15717
15718
  var Ce;
15718
15719
  return H.visualEditPendingDashboardCalculatedFields ?? ((Ce = H.dashboard) == null ? void 0 : Ce.calculatedFields);
15719
15720
  }
15720
- ) ?? dx, {
15721
+ ) ?? mx, {
15721
15722
  scopedFields: S,
15722
15723
  valuePickFilterableFields: x,
15723
15724
  isLoading: v,
15724
15725
  hasError: T,
15725
15726
  refetch: N
15726
- } = zl(), { userContext: g } = sn(), { tokenProps: E } = Zt(), I = Hl(g), R = ur(), _ = Pl() ?? ha, w = jd() ?? ha, y = $d(), {
15727
+ } = zl(), { userContext: g } = sn(), { tokenProps: E } = Zt(), I = Hl(g), R = ur(), _ = Pl() ?? ha, w = zd() ?? ha, y = Hd(), {
15727
15728
  updateLabel: P,
15728
15729
  handleAggregationChange: V,
15729
15730
  handleDetailDateFormatChange: $,
@@ -15772,7 +15773,7 @@ function ux({
15772
15773
  ]), Se = Vl(
15773
15774
  oe.dataType
15774
15775
  ), Fe = se(
15775
- () => Rm({
15776
+ () => Lm({
15776
15777
  fieldId: t.id,
15777
15778
  dataType: t.dataType,
15778
15779
  granularity: t.granularity,
@@ -15842,10 +15843,10 @@ function ux({
15842
15843
  ) : a === "detailColumns" && $(r, "custom", H);
15843
15844
  }, si = (H) => {
15844
15845
  if (a === "groupBy") {
15845
- const Ce = jm(
15846
+ const Ce = zm(
15846
15847
  Ve.format,
15847
15848
  H
15848
- ), De = $m({
15849
+ ), De = Hm({
15849
15850
  fieldId: t.id,
15850
15851
  dataType: t.dataType,
15851
15852
  granularity: H,
@@ -15862,13 +15863,13 @@ function ux({
15862
15863
  St(H), a === "metrics" && M(r, H);
15863
15864
  }, ci = (H) => {
15864
15865
  P(a, r, H);
15865
- }, xn = zd(t);
15866
- Hd(t);
15867
- const zr = Ud(t), bn = t.role === "metric" && zr, vn = zr && (xn === "user_calculated" || xn === "inline_expression" && t.fieldScope !== "domain"), kt = vn ? oh({
15866
+ }, xn = Ud(t);
15867
+ Gd(t);
15868
+ const zr = Qd(t), bn = t.role === "metric" && zr, vn = zr && (xn === "user_calculated" || xn === "inline_expression" && t.fieldScope !== "domain"), kt = vn ? ch({
15868
15869
  field: t,
15869
15870
  sheetFields: (i == null ? void 0 : i.calculatedFields) || [],
15870
15871
  dashboardFields: C
15871
- }) : void 0, Hr = vn && (kt == null ? void 0 : kt.scope) === "sheet", Ur = vn && (kt == null ? void 0 : kt.scope) === "dashboard", ba = xn === "domain_calculated" || t.fieldScope === "domain", Gr = ba ? Gd(t, S) : void 0, oa = ba ? "domain" : Hr ? "sheet" : Ur ? "dashboard" : "card", _a = ba ? Gr || t : (Hr || Ur) && (kt != null && kt.matchedField) ? kt.matchedField : t, di = ba ? Gr ? "effective" : v ? "loading" : T ? "unavailable" : "unverified" : void 0, Qr = (H) => {
15872
+ }) : void 0, Hr = vn && (kt == null ? void 0 : kt.scope) === "sheet", Ur = vn && (kt == null ? void 0 : kt.scope) === "dashboard", ba = xn === "domain_calculated" || t.fieldScope === "domain", Gr = ba ? Jd(t, S) : void 0, oa = ba ? "domain" : Hr ? "sheet" : Ur ? "dashboard" : "card", _a = ba ? Gr || t : (Hr || Ur) && (kt != null && kt.matchedField) ? kt.matchedField : t, di = ba ? Gr ? "effective" : v ? "loading" : T ? "unavailable" : "unverified" : void 0, Qr = (H) => {
15872
15873
  var Ce;
15873
15874
  if (gn(H), a === "metrics") {
15874
15875
  const De = {
@@ -15887,12 +15888,12 @@ function ux({
15887
15888
  B(a, r);
15888
15889
  }, yn = mo(
15889
15890
  oe.dataType || t.dataType
15890
- ), Jr = yn === "date", Nn = d === "kpi", Cn = a === "detailColumns", Wr = (us = o.config) == null ? void 0 : us.metricColumns, Xr = (ms = o.config) == null ? void 0 : ms.groupByColumns, Zr = Qd(o), es = ge((H) => H.dashboard), ts = ge(
15891
+ ), Jr = yn === "date", Nn = d === "kpi", Cn = a === "detailColumns", Wr = (us = o.config) == null ? void 0 : us.metricColumns, Xr = (ms = o.config) == null ? void 0 : ms.groupByColumns, Zr = Wd(o), es = ge((H) => H.dashboard), ts = ge(
15891
15892
  (H) => H.semanticExecutionPayload
15892
15893
  ), as = t.nativeDataType || t.dataType, mi = se(
15893
- () => a === "detailColumns" ? Om({
15894
+ () => a === "detailColumns" ? Ym({
15894
15895
  format: void 0,
15895
- valueKind: Lm(as) ? "date" : "wall_datetime",
15896
+ valueKind: _m(as) ? "date" : "wall_datetime",
15896
15897
  preferences: w,
15897
15898
  calendarTimezone: y || "UTC"
15898
15899
  }) : void 0,
@@ -15908,20 +15909,20 @@ function ux({
15908
15909
  },
15909
15910
  ...al(Me ?? "day")
15910
15911
  ] : [], hi = Be ? "custom" : !Me && a === "groupBy" ? void 0 : wn.some((H) => H.value === fe) ? fe : a === "detailColumns" ? void 0 : ((hs = wn[0]) == null ? void 0 : hs.value) ?? "YYYY-MM-DD", pt = se(
15911
- () => Mh(
15912
+ () => Eh(
15912
15913
  o,
15913
- vh(
15914
+ Nh(
15914
15915
  Zr,
15915
- yh(es, ts, R)
15916
+ Ch(es, ts, R)
15916
15917
  )
15917
15918
  ),
15918
15919
  [o, Zr, es, ts, R]
15919
15920
  ), dt = se(() => {
15920
15921
  if (a !== "metrics") return;
15921
- const H = Ym("metric", Wr ?? [])[r];
15922
- return H ? _m(o, H, pt) : void 0;
15922
+ const H = Vm("metric", Wr ?? [])[r];
15923
+ return H ? Bm(o, H, pt) : void 0;
15923
15924
  }, [o, pt, r, Wr, a]), Xe = t, et = ((ps = Xe.comparison) == null ? void 0 : ps.mode) === "explicit" ? Xe.comparison.spec : void 0, Sn = (fs = Xe.parameters) == null ? void 0 : fs.windowTransform, va = !!Sn, ft = se(
15924
- () => Sn && a === "metrics" ? Vm(o, Xe.id, (H) => ({ name: H.name, datasetName: Bm(H) })) : void 0,
15925
+ () => Sn && a === "metrics" ? Km(o, Xe.id, (H) => ({ name: H.name, datasetName: qm(H) })) : void 0,
15925
15926
  [o, Xe.id, Sn, a]
15926
15927
  ), Pe = ft == null ? void 0 : ft.transform, Pt = (Pe == null ? void 0 : Pe.kind) ?? null, Tt = dt == null ? void 0 : dt.transform, kn = Tt ? Object.values(Tt.kinds).filter((H) => H.offered) : [], Tn = Tt && !kn.length ? Object.values(Tt.kinds).find((H) => !H.offered) : void 0, pi = kn.some(
15927
15928
  (H) => H.offered && H.replaces === "comparison"
@@ -15933,10 +15934,10 @@ function ux({
15933
15934
  we(() => {
15934
15935
  va && $e(!0);
15935
15936
  }, [va]);
15936
- const Ni = a !== "pivotBy" && a !== "sortBy", Ci = cx(
15937
+ const Ni = a !== "pivotBy" && a !== "sortBy", Ci = ux(
15937
15938
  a,
15938
15939
  d
15939
- ), wi = t.memberOrder ?? "auto", Si = Jr && a === "groupBy", ki = !Nn && Jr && (a === "groupBy" || Cn), Ti = a === "metrics", Mi = !Nn && yn === "number" && (a === "groupBy" || Cn) && Km(d), Ba = !!(dt && Object.values(dt.comparison).some((H) => H.offered)), Di = () => {
15940
+ ), wi = t.memberOrder ?? "auto", Si = Jr && a === "groupBy", ki = !Nn && Jr && (a === "groupBy" || Cn), Ti = a === "metrics", Mi = !Nn && yn === "number" && (a === "groupBy" || Cn) && jm(d), Ba = !!(dt && Object.values(dt.comparison).some((H) => H.offered)), Di = () => {
15940
15941
  const H = t, Ce = a === "metrics" && bn;
15941
15942
  return /* @__PURE__ */ n("div", { className: "space-y-1", children: [
15942
15943
  !Ce && /* @__PURE__ */ e(
@@ -16018,7 +16019,7 @@ function ux({
16018
16019
  onValueChange: si,
16019
16020
  children: [
16020
16021
  /* @__PURE__ */ e(X, { className: "h-8 w-full text-xs", children: /* @__PURE__ */ e(Z, { placeholder: "Select granularity..." }) }),
16021
- /* @__PURE__ */ e(ee, { children: Se.map((H) => /* @__PURE__ */ e(z, { className: "text-xs", value: H, children: qm(H) }, H)) })
16022
+ /* @__PURE__ */ e(ee, { children: Se.map((H) => /* @__PURE__ */ e(z, { className: "text-xs", value: H, children: $m(H) }, H)) })
16022
16023
  ]
16023
16024
  }
16024
16025
  ),
@@ -16504,7 +16505,7 @@ function ux({
16504
16505
  /* @__PURE__ */ n(
16505
16506
  W,
16506
16507
  {
16507
- value: sh(Xe),
16508
+ value: oh(Xe),
16508
16509
  disabled: !!Xe.semanticComparisonPolarity,
16509
16510
  onValueChange: (Q) => le(
16510
16511
  r,
@@ -16639,17 +16640,17 @@ function ux({
16639
16640
  }
16640
16641
  )
16641
16642
  ] }),
16642
- /* @__PURE__ */ e(rx, { column: t }),
16643
+ /* @__PURE__ */ e(lx, { column: t }),
16643
16644
  c && /* @__PURE__ */ n(ue, { children: [
16644
16645
  /* @__PURE__ */ e(
16645
- Xg,
16646
+ ex,
16646
16647
  {
16647
16648
  aliasTemplate: ie,
16648
16649
  onAliasTemplateChange: li
16649
16650
  }
16650
16651
  ),
16651
16652
  /* @__PURE__ */ e(
16652
- Zg,
16653
+ tx,
16653
16654
  {
16654
16655
  valueAliases: Gt,
16655
16656
  onValueAliasesChange: ii
@@ -16700,7 +16701,7 @@ function ux({
16700
16701
  }
16701
16702
  ),
16702
16703
  _e && /* @__PURE__ */ e(
16703
- ox,
16704
+ cx,
16704
16705
  {
16705
16706
  open: _e,
16706
16707
  onOpenChange: (H) => {
@@ -16848,7 +16849,7 @@ function ux({
16848
16849
  )
16849
16850
  ] });
16850
16851
  }
16851
- function mx({
16852
+ function px({
16852
16853
  field: t,
16853
16854
  zone: a,
16854
16855
  onRemove: r
@@ -16870,8 +16871,8 @@ function mx({
16870
16871
  }
16871
16872
  );
16872
16873
  }
16873
- function hx({ concept: t }) {
16874
- const { title: a, description: r } = px[t];
16874
+ function fx({ concept: t }) {
16875
+ const { title: a, description: r } = gx[t];
16875
16876
  return /* @__PURE__ */ n(ca, { openDelay: 150, closeDelay: 50, children: [
16876
16877
  /* @__PURE__ */ e(da, { asChild: !0, children: /* @__PURE__ */ e(
16877
16878
  "button",
@@ -16879,7 +16880,7 @@ function hx({ concept: t }) {
16879
16880
  type: "button",
16880
16881
  "aria-label": `What does ${a} mean?`,
16881
16882
  className: "inline-flex h-3 w-3 shrink-0 items-center justify-center text-muted-foreground/70 transition-colors hover:text-foreground",
16882
- children: /* @__PURE__ */ e(Dh, { className: "h-3 w-3" })
16883
+ children: /* @__PURE__ */ e(Fh, { className: "h-3 w-3" })
16883
16884
  }
16884
16885
  ) }),
16885
16886
  /* @__PURE__ */ n(
@@ -16894,13 +16895,13 @@ function hx({ concept: t }) {
16894
16895
  /* @__PURE__ */ e("p", { className: "text-[12px] font-semibold text-foreground", children: a }),
16895
16896
  /* @__PURE__ */ e("p", { className: "text-[11px] leading-[1.45] text-muted-foreground", children: r })
16896
16897
  ] }),
16897
- t !== "detailColumns" && /* @__PURE__ */ e(fx, { highlight: t })
16898
+ t !== "detailColumns" && /* @__PURE__ */ e(xx, { highlight: t })
16898
16899
  ]
16899
16900
  }
16900
16901
  )
16901
16902
  ] });
16902
16903
  }
16903
- const px = {
16904
+ const gx = {
16904
16905
  groupBy: {
16905
16906
  title: "Rows",
16906
16907
  description: "Each unique value becomes a row. Use for the dimensions you want stacked vertically."
@@ -16918,7 +16919,7 @@ const px = {
16918
16919
  description: "Raw column values with no aggregation — the underlying detail rows from the database."
16919
16920
  }
16920
16921
  };
16921
- function fx({
16922
+ function xx({
16922
16923
  highlight: t
16923
16924
  }) {
16924
16925
  const a = t === "pivotBy", r = t === "groupBy", s = t === "metrics", l = "bg-foreground/[0.06] font-medium text-foreground dark:bg-foreground/[0.12]";
@@ -16974,10 +16975,10 @@ function fx({
16974
16975
  const nl = [
16975
16976
  { label: "Electronics", values: ["2,300", "1,800", "3,400"] },
16976
16977
  { label: "Clothing", values: ["1,300", "620", "480"] }
16977
- ], gx = {
16978
+ ], bx = {
16978
16979
  groupBy: Al,
16979
16980
  pivotBy: Il,
16980
- metrics: Bh,
16981
+ metrics: qh,
16981
16982
  detailColumns: Zl,
16982
16983
  sortBy: Co
16983
16984
  };
@@ -16991,13 +16992,13 @@ function Ta({
16991
16992
  hasPivotColumns: d = !1
16992
16993
  }) {
16993
16994
  const { setNodeRef: o } = jl({
16994
- id: Wd(a),
16995
+ id: Zd(a),
16995
16996
  data: {
16996
16997
  kind: "shelf",
16997
16998
  zone: a,
16998
16999
  pillIds: r.map((g) => g.id)
16999
17000
  }
17000
- }), i = $i(a), { updateSortByColumn: f } = be(), u = F((g) => g.card), m = F((g) => g.card.type), p = r.length > 0, h = i !== null, C = (i == null ? void 0 : i.kind) !== "refused", S = (i == null ? void 0 : i.kind) === "refused" ? Jd(i.notice, s) : null, x = xt((g, E) => {
17001
+ }), i = $i(a), { updateSortByColumn: f } = be(), u = F((g) => g.card), m = F((g) => g.card.type), p = r.length > 0, h = i !== null, C = (i == null ? void 0 : i.kind) !== "refused", S = (i == null ? void 0 : i.kind) === "refused" ? Xd(i.notice, s) : null, x = xt((g, E) => {
17001
17002
  var R;
17002
17003
  !((R = u.config) != null && R.sortByColumns) || u.config.sortByColumns.findIndex(
17003
17004
  (_) => _.id === g
@@ -17007,7 +17008,7 @@ function Ta({
17007
17008
  const R = g.direction;
17008
17009
  return /* @__PURE__ */ n("div", { className: "relative", children: [
17009
17010
  /* @__PURE__ */ e(
17010
- xx,
17011
+ vx,
17011
17012
  {
17012
17013
  zone: a,
17013
17014
  pillId: g.id,
@@ -17015,14 +17016,14 @@ function Ta({
17015
17016
  }
17016
17017
  ),
17017
17018
  m === "matrixTable" ? /* @__PURE__ */ e(
17018
- mx,
17019
+ px,
17019
17020
  {
17020
17021
  field: g,
17021
17022
  zone: a,
17022
17023
  onRemove: () => t(a, E)
17023
17024
  }
17024
17025
  ) : /* @__PURE__ */ e(
17025
- ux,
17026
+ hx,
17026
17027
  {
17027
17028
  field: g,
17028
17029
  zone: a,
@@ -17039,7 +17040,7 @@ function Ta({
17039
17040
  );
17040
17041
  if (a === "sortBy" && c === !1)
17041
17042
  return null;
17042
- const T = a !== "sortBy" && m !== "kpi", N = gx[a] || Ft;
17043
+ const T = a !== "sortBy" && m !== "kpi", N = bx[a] || Ft;
17043
17044
  return /* @__PURE__ */ n("div", { ref: o, className: "w-full", role: "group", "aria-label": s, children: [
17044
17045
  /* @__PURE__ */ n("div", { className: "mb-1 flex min-w-0 items-center justify-between gap-2", children: [
17045
17046
  /* @__PURE__ */ e(O, { className: "block shrink-0 text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: s }),
@@ -17065,13 +17066,13 @@ function Ta({
17065
17066
  children: r.length === 0 ? /* @__PURE__ */ n("div", { className: "flex h-9 items-center justify-center gap-1.5 text-[11px] text-muted-foreground/80", children: [
17066
17067
  /* @__PURE__ */ e(N, { className: "h-3 w-3 shrink-0 text-muted-foreground/60" }),
17067
17068
  /* @__PURE__ */ e("span", { children: l }),
17068
- T && /* @__PURE__ */ e(hx, { concept: a })
17069
+ T && /* @__PURE__ */ e(fx, { concept: a })
17069
17070
  ] }) : v
17070
17071
  }
17071
17072
  )
17072
17073
  ] });
17073
17074
  }
17074
- function xx({
17075
+ function vx({
17075
17076
  zone: t,
17076
17077
  pillId: a,
17077
17078
  isLast: r
@@ -17093,8 +17094,8 @@ function xx({
17093
17094
  }
17094
17095
  ) : null;
17095
17096
  }
17096
- const bx = [];
17097
- function vx({
17097
+ const yx = [];
17098
+ function Nx({
17098
17099
  onRemoveField: t,
17099
17100
  onResetFields: a,
17100
17101
  groupByFields: r,
@@ -17120,7 +17121,7 @@ function vx({
17120
17121
  }
17121
17122
  ), C = la(m, h) === "multiple";
17122
17123
  C && ((te = m == null ? void 0 : m.customCardPreferences) != null && te.url);
17123
- const S = zm(h == null ? void 0 : h.slots);
17124
+ const S = Um(h == null ? void 0 : h.slots);
17124
17125
  F(
17125
17126
  (q) => q.actions.updateCardConfig
17126
17127
  );
@@ -17133,7 +17134,7 @@ function vx({
17133
17134
  var G;
17134
17135
  return q.visualEditPendingDashboardCalculatedFields ?? ((G = q.dashboard) == null ? void 0 : G.calculatedFields);
17135
17136
  }
17136
- ) ?? bx, { scopedFields: _ } = ql(), { userContext: w } = sn(), y = C && (m == null ? void 0 : m.id) === f.id && S ? S : f == null ? void 0 : f.type, P = y === "detailTable", V = r.length > 0 || l.length > 0 || d.length > 0, $ = !P && (y !== "kpi" || l.length <= 2), L = !P, b = !P && y !== "kpi", Y = y !== "kpi" && y !== "matrixTable" && V, k = P, D = "Drop sort fields here", M = Hl(w), A = [
17137
+ ) ?? yx, { scopedFields: _ } = ql(), { userContext: w } = sn(), y = C && (m == null ? void 0 : m.id) === f.id && S ? S : f == null ? void 0 : f.type, P = y === "detailTable", V = r.length > 0 || l.length > 0 || d.length > 0, $ = !P && (y !== "kpi" || l.length <= 2), L = !P, b = !P && y !== "kpi", Y = y !== "kpi" && y !== "matrixTable" && V, k = P, D = "Drop sort fields here", M = Hl(w), A = [
17137
17138
  "pie",
17138
17139
  "doughnut",
17139
17140
  "polar",
@@ -17224,7 +17225,7 @@ function vx({
17224
17225
  onClick: () => i(!0),
17225
17226
  className: "mt-1.5 w-full justify-start border-border/60 border-dashed bg-background text-xs text-foreground/70 hover:bg-muted/40 hover:text-foreground",
17226
17227
  children: [
17227
- /* @__PURE__ */ e(Xd, { className: "mr-2 h-4 w-4" }),
17228
+ /* @__PURE__ */ e(eu, { className: "mr-2 h-4 w-4" }),
17228
17229
  "Create Metric"
17229
17230
  ]
17230
17231
  }
@@ -17292,7 +17293,7 @@ function vx({
17292
17293
  )
17293
17294
  ] });
17294
17295
  }
17295
- function yx() {
17296
+ function Cx() {
17296
17297
  var T, N, g;
17297
17298
  const t = F((E) => {
17298
17299
  var I;
@@ -17385,7 +17386,7 @@ function yx() {
17385
17386
  )
17386
17387
  ] });
17387
17388
  }
17388
- function Nx({ onEditJoins: t }) {
17389
+ function wx({ onEditJoins: t }) {
17389
17390
  const a = F((i) => i.card), { autoJoinMetadata: r } = ct(a);
17390
17391
  if (!(r != null && r.autoResolved))
17391
17392
  return null;
@@ -17477,12 +17478,12 @@ function Nx({ onEditJoins: t }) {
17477
17478
  onClick: t,
17478
17479
  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",
17479
17480
  "aria-label": "Edit resolved joins",
17480
- children: /* @__PURE__ */ e(Zd, { className: "h-3 w-3", strokeWidth: 1.75 })
17481
+ children: /* @__PURE__ */ e(tu, { className: "h-3 w-3", strokeWidth: 1.75 })
17481
17482
  }
17482
17483
  )
17483
17484
  ] });
17484
17485
  }
17485
- function Cx({
17486
+ function Sx({
17486
17487
  onRemoveField: t,
17487
17488
  onResetFields: a,
17488
17489
  selectedChart: r,
@@ -17526,7 +17527,7 @@ function Cx({
17526
17527
  children: [
17527
17528
  !x && /* @__PURE__ */ n("div", { className: "flex items-start", children: [
17528
17529
  /* @__PURE__ */ e("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ e(
17529
- Wp,
17530
+ Zp,
17530
17531
  {
17531
17532
  selectedChart: r,
17532
17533
  onChartChange: s
@@ -17539,14 +17540,14 @@ function Cx({
17539
17540
  "aria-label": "Hide chart configuration",
17540
17541
  onClick: c,
17541
17542
  className: "h-7 w-7 rounded-[5px] p-0 text-muted-foreground hover:text-foreground",
17542
- children: /* @__PURE__ */ e(eu, { className: "h-4 w-4", strokeWidth: 1.75 })
17543
+ children: /* @__PURE__ */ e(au, { className: "h-4 w-4", strokeWidth: 1.75 })
17543
17544
  }
17544
17545
  ) })
17545
17546
  ] }),
17546
17547
  /* @__PURE__ */ n(mn, { className: "min-h-0 w-full flex-1 basis-0 border-t border-border [&>[data-radix-scroll-area-viewport]]:overscroll-none [&>[data-radix-scroll-area-viewport]>div]:!block [&>[data-radix-scroll-area-viewport]>div]:w-full", children: [
17547
- /* @__PURE__ */ e("div", { className: "px-4 pt-4 empty:hidden", children: /* @__PURE__ */ e(Nx, { onEditJoins: R }) }),
17548
+ /* @__PURE__ */ e("div", { className: "px-4 pt-4 empty:hidden", children: /* @__PURE__ */ e(wx, { onEditJoins: R }) }),
17548
17549
  /* @__PURE__ */ e(
17549
- vx,
17550
+ Nx,
17550
17551
  {
17551
17552
  onRemoveField: t,
17552
17553
  onResetFields: a,
@@ -17558,7 +17559,7 @@ function Cx({
17558
17559
  }
17559
17560
  )
17560
17561
  ] }),
17561
- /* @__PURE__ */ e(yx, {}),
17562
+ /* @__PURE__ */ e(Cx, {}),
17562
17563
  /* @__PURE__ */ e(
17563
17564
  ko,
17564
17565
  {
@@ -17592,7 +17593,7 @@ function Cx({
17592
17593
  }
17593
17594
  );
17594
17595
  }
17595
- function wx({
17596
+ function kx({
17596
17597
  cardId: t,
17597
17598
  filters: a,
17598
17599
  onFiltersChange: r,
@@ -17618,7 +17619,7 @@ function wx({
17618
17619
  /* @__PURE__ */ e(zt, { className: "sr-only", children: "Add filters to the card to limit the data that is displayed." })
17619
17620
  ] }),
17620
17621
  /* @__PURE__ */ e(
17621
- th,
17622
+ nh,
17622
17623
  {
17623
17624
  filters: a,
17624
17625
  availableFields: l,
@@ -17638,12 +17639,12 @@ function wx({
17638
17639
  ] });
17639
17640
  }
17640
17641
  const rl = (t) => t.active.data.current ?? null;
17641
- function Sx({
17642
+ function Tx({
17642
17643
  activeCardId: t,
17643
17644
  placeField: a,
17644
17645
  previewFieldPlacement: r
17645
17646
  }) {
17646
- const [s] = U(tu), l = Ke(null), c = xt(() => {
17647
+ const [s] = U(nu), l = Ke(null), c = xt(() => {
17647
17648
  l.current = null, s.set(null);
17648
17649
  }, [s]), d = xt((u) => {
17649
17650
  c();
@@ -17685,7 +17686,7 @@ function Sx({
17685
17686
  handleDragCancel: f
17686
17687
  };
17687
17688
  }
17688
- function kx({
17689
+ function Mx({
17689
17690
  activeView: t,
17690
17691
  onViewChange: a,
17691
17692
  splitViewEnabled: r,
@@ -17721,7 +17722,7 @@ function kx({
17721
17722
  }
17722
17723
  );
17723
17724
  }
17724
- const Tx = [
17725
+ const Dx = [
17725
17726
  { value: "10", label: "10" },
17726
17727
  { value: "20", label: "20" },
17727
17728
  { value: "50", label: "50" },
@@ -17730,7 +17731,7 @@ const Tx = [
17730
17731
  { value: "500", label: "500" },
17731
17732
  { value: "1000", label: "1,000" }
17732
17733
  ];
17733
- function Mx() {
17734
+ function Ex() {
17734
17735
  var r, s;
17735
17736
  const t = F((l) => l.card), { updateRowLimit: a } = be();
17736
17737
  return /* @__PURE__ */ n(
@@ -17751,7 +17752,7 @@ function Mx() {
17751
17752
  ]
17752
17753
  }
17753
17754
  ),
17754
- /* @__PURE__ */ e(ee, { align: "end", children: Tx.map((l) => /* @__PURE__ */ e(
17755
+ /* @__PURE__ */ e(ee, { align: "end", children: Dx.map((l) => /* @__PURE__ */ e(
17755
17756
  z,
17756
17757
  {
17757
17758
  value: l.value,
@@ -17764,7 +17765,7 @@ function Mx() {
17764
17765
  }
17765
17766
  );
17766
17767
  }
17767
- function Dx({
17768
+ function Fx({
17768
17769
  card: t,
17769
17770
  queryData: a,
17770
17771
  isLoading: r,
@@ -17819,7 +17820,7 @@ function Dx({
17819
17820
  )
17820
17821
  ] });
17821
17822
  }
17822
- function Ex(t, a) {
17823
+ function Ix(t, a) {
17823
17824
  const [r, s] = U(() => {
17824
17825
  const l = localStorage.getItem(t);
17825
17826
  return l ? JSON.parse(l) : a;
@@ -17828,11 +17829,11 @@ function Ex(t, a) {
17828
17829
  localStorage.setItem(t, JSON.stringify(r));
17829
17830
  }, [r, t]), [r, s];
17830
17831
  }
17831
- const Fx = "semaphor-split-view-enabled";
17832
- function Ix() {
17833
- return Ex(Fx, !0);
17832
+ const Ax = "semaphor-split-view-enabled";
17833
+ function Px() {
17834
+ return Ix(Ax, !0);
17834
17835
  }
17835
- function Ax({
17836
+ function Rx({
17836
17837
  error: t,
17837
17838
  showInfoTab: a
17838
17839
  }) {
@@ -17845,13 +17846,13 @@ function Ax({
17845
17846
  }
17846
17847
  );
17847
17848
  }
17848
- function Px({
17849
+ function Ox({
17849
17850
  card: t,
17850
17851
  effectiveCardType: a = t.type,
17851
17852
  queryResultColumns: r
17852
17853
  }) {
17853
- return Mr(a) ? /* @__PURE__ */ n(au, { modal: !1, children: [
17854
- /* @__PURE__ */ e(nu, { asChild: !0, children: /* @__PURE__ */ e(
17854
+ return Mr(a) ? /* @__PURE__ */ n(ru, { modal: !1, children: [
17855
+ /* @__PURE__ */ e(su, { asChild: !0, children: /* @__PURE__ */ e(
17855
17856
  nt,
17856
17857
  {
17857
17858
  tooltip: "Table settings",
@@ -17864,14 +17865,14 @@ function Px({
17864
17865
  }
17865
17866
  ) }),
17866
17867
  /* @__PURE__ */ n(
17867
- ru,
17868
+ lu,
17868
17869
  {
17869
17870
  side: "right",
17870
17871
  hideOverlay: !0,
17871
17872
  className: "flex w-[420px] flex-col gap-0 p-0 sm:max-w-[420px]",
17872
17873
  children: [
17873
- /* @__PURE__ */ e(su, { className: "sr-only", children: "Table settings" }),
17874
- /* @__PURE__ */ e(lu, { className: "sr-only", children: "Configure table presentation and conditional formatting." }),
17874
+ /* @__PURE__ */ e(ou, { className: "sr-only", children: "Table settings" }),
17875
+ /* @__PURE__ */ e(iu, { className: "sr-only", children: "Configure table presentation and conditional formatting." }),
17875
17876
  /* @__PURE__ */ n("div", { className: "border-b px-4 py-3", children: [
17876
17877
  /* @__PURE__ */ e("div", { className: "text-[13px] font-semibold text-foreground", children: "Table settings" }),
17877
17878
  /* @__PURE__ */ e("div", { className: "mt-0.5 text-[11px] text-muted-foreground", children: "Settings apply to this table and document exports that reuse it." })
@@ -17889,11 +17890,11 @@ function Px({
17889
17890
  )
17890
17891
  ] }) : null;
17891
17892
  }
17892
- function Rx({
17893
+ function Lx({
17893
17894
  className: t,
17894
17895
  visible: a
17895
17896
  }) {
17896
- const r = ge((o) => o.selectedFrameId), s = ou((o) => o.selectedVisual), l = F((o) => o.frame), d = !!!(l != null && l.visualId || s != null && s.id) && !!r;
17897
+ const r = ge((o) => o.selectedFrameId), s = cu((o) => o.selectedVisual), l = F((o) => o.frame), d = !!!(l != null && l.visualId || s != null && s.id) && !!r;
17897
17898
  return !a || d ? null : /* @__PURE__ */ e("div", { className: J("flex", t), children: /* @__PURE__ */ e(
17898
17899
  fo,
17899
17900
  {
@@ -17902,7 +17903,7 @@ function Rx({
17902
17903
  }
17903
17904
  ) });
17904
17905
  }
17905
- function Ox({
17906
+ function Yx({
17906
17907
  // selectedChart,
17907
17908
  activeView: t,
17908
17909
  onViewChange: a,
@@ -17921,7 +17922,7 @@ function Ox({
17921
17922
  (me) => me.actions.removeCardInlineFilterValue
17922
17923
  ), o = ge((me) => me.selectedSheetId), { updateCardConfig: i, setCard: f, updateCardInFrame: u } = be(), [m, p] = U(!1), [h, C] = U(!1), [S, x] = U(
17923
17924
  null
17924
- ), { config: v } = ir(hr).tokenProps, T = (v == null ? void 0 : v.showInfoTab) !== !1, N = (v == null ? void 0 : v.showQueryDebugTools) !== !1, [g, E] = Ix(), I = Er(l.type), R = T && po(l.type), _ = T && !R, w = t === "table" && (g || !I) || t === "info" && !R ? "chart" : t;
17925
+ ), { config: v } = ir(hr).tokenProps, T = (v == null ? void 0 : v.showInfoTab) !== !1, N = (v == null ? void 0 : v.showQueryDebugTools) !== !1, [g, E] = Px(), I = Er(l.type), R = T && po(l.type), _ = T && !R, w = t === "table" && (g || !I) || t === "info" && !R ? "chart" : t;
17925
17926
  F(
17926
17927
  (me) => {
17927
17928
  var $e;
@@ -17941,10 +17942,10 @@ function Ox({
17941
17942
  resolvedPrimaryDateField: A
17942
17943
  } = ct(s), B = ln(s, P), j = () => {
17943
17944
  var _e;
17944
- const me = ge.getState(), $e = Lp(Vr.QUERY_GENERATION, {
17945
+ const me = ge.getState(), $e = _p(Vr.QUERY_GENERATION, {
17945
17946
  cardConfig: l.config,
17946
17947
  dataSource: s.dataSource,
17947
- dashboardFilters: Nh({
17948
+ dashboardFilters: wh({
17948
17949
  dashboard: me.dashboard,
17949
17950
  runtimeValues: {
17950
17951
  dashboardInputValues: me.dashboardInputValues
@@ -17997,15 +17998,15 @@ function Ox({
17997
17998
  });
17998
17999
  }, Te = se(() => {
17999
18000
  var me;
18000
- return iu((me = l.config) == null ? void 0 : me.sortByColumns);
18001
- }, [(He = l.config) == null ? void 0 : He.sortByColumns]), Ye = cu(
18001
+ return du((me = l.config) == null ? void 0 : me.sortByColumns);
18002
+ }, [(He = l.config) == null ? void 0 : He.sortByColumns]), Ye = uu(
18002
18003
  Za(s) || null
18003
18004
  );
18004
18005
  return /* @__PURE__ */ e("div", { className: "relative flex w-0 grow flex-col", children: /* @__PURE__ */ n("div", { className: "group/visualization relative flex h-full max-w-full grow flex-col", children: [
18005
18006
  /* @__PURE__ */ n("div", { className: "flex h-11 items-center gap-3 border-b border-border px-4", children: [
18006
18007
  /* @__PURE__ */ n("div", { className: "flex items-center gap-3", children: [
18007
18008
  /* @__PURE__ */ e("div", { className: "flex h-11 items-end gap-5 self-stretch", children: /* @__PURE__ */ e(
18008
- kx,
18009
+ Mx,
18009
18010
  {
18010
18011
  activeView: w,
18011
18012
  onViewChange: a,
@@ -18013,9 +18014,9 @@ function Ox({
18013
18014
  hasQueryError: !!V
18014
18015
  }
18015
18016
  ) }),
18016
- y === "kpi" && /* @__PURE__ */ e(Rx, { visible: !0, className: "self-center" }),
18017
+ y === "kpi" && /* @__PURE__ */ e(Lx, { visible: !0, className: "self-center" }),
18017
18018
  D && l.type !== "table" && /* @__PURE__ */ e(
18018
- du,
18019
+ mu,
18019
18020
  {
18020
18021
  metadata: D,
18021
18022
  variant: "compact"
@@ -18023,9 +18024,9 @@ function Ox({
18023
18024
  )
18024
18025
  ] }),
18025
18026
  /* @__PURE__ */ n("div", { className: "flex grow items-center justify-end gap-1", children: [
18026
- !uu(y) && /* @__PURE__ */ e(Mx, {}),
18027
+ !hu(y) && /* @__PURE__ */ e(Ex, {}),
18027
18028
  /* @__PURE__ */ e(
18028
- mu,
18029
+ pu,
18029
18030
  {
18030
18031
  cardId: s.id,
18031
18032
  cardFilters: Za(s),
@@ -18039,7 +18040,7 @@ function Ox({
18039
18040
  }
18040
18041
  ),
18041
18042
  w === "chart" && /* @__PURE__ */ e(
18042
- Px,
18043
+ Ox,
18043
18044
  {
18044
18045
  card: s,
18045
18046
  effectiveCardType: y,
@@ -18111,7 +18112,7 @@ function Ox({
18111
18112
  }
18112
18113
  ),
18113
18114
  I && /* @__PURE__ */ n(Dt, { onClick: ve, children: [
18114
- g ? /* @__PURE__ */ e(Ah, { className: "h-3.5 w-3.5 text-muted-foreground" }) : /* @__PURE__ */ e(qh, { className: "h-3.5 w-3.5 text-muted-foreground" }),
18115
+ g ? /* @__PURE__ */ e(Rh, { className: "h-3.5 w-3.5 text-muted-foreground" }) : /* @__PURE__ */ e($h, { className: "h-3.5 w-3.5 text-muted-foreground" }),
18115
18116
  g ? "Hide results table" : "Show results table"
18116
18117
  ] }),
18117
18118
  q && /* @__PURE__ */ n(
@@ -18141,13 +18142,13 @@ function Ox({
18141
18142
  onOpenInEditor: Tr(l.type) ? K : void 0
18142
18143
  }
18143
18144
  ) }) : /* @__PURE__ */ e(
18144
- Ax,
18145
+ Rx,
18145
18146
  {
18146
18147
  error: V,
18147
18148
  showInfoTab: R
18148
18149
  }
18149
18150
  ) : /* @__PURE__ */ e("div", { className: "flex grow flex-col", children: /* @__PURE__ */ e(
18150
- Dx,
18151
+ Fx,
18151
18152
  {
18152
18153
  card: B,
18153
18154
  queryData: P,
@@ -18227,7 +18228,7 @@ function Ox({
18227
18228
  )
18228
18229
  ] }) });
18229
18230
  }
18230
- function Lx({ activeField: t }) {
18231
+ function _x({ activeField: t }) {
18231
18232
  const [a, r] = U(!0);
18232
18233
  if (we(() => {
18233
18234
  t && r(!0);
@@ -18244,11 +18245,11 @@ function Lx({ activeField: t }) {
18244
18245
  }
18245
18246
  );
18246
18247
  }
18247
- function Yx() {
18248
- const { active: t } = hu(), a = t == null ? void 0 : t.data.current;
18249
- return /* @__PURE__ */ e(Lx, { activeField: (a == null ? void 0 : a.field) ?? null });
18248
+ function Vx() {
18249
+ const { active: t } = fu(), a = t == null ? void 0 : t.data.current;
18250
+ return /* @__PURE__ */ e(_x, { activeField: (a == null ? void 0 : a.field) ?? null });
18250
18251
  }
18251
- const _x = () => {
18252
+ const Bx = () => {
18252
18253
  const t = console.error;
18253
18254
  console.error = (...s) => {
18254
18255
  s.length > 0 && typeof s[0] == "string" && s[0].includes(
@@ -18275,11 +18276,11 @@ const _x = () => {
18275
18276
  );
18276
18277
  };
18277
18278
  };
18278
- function Vx() {
18279
+ function Kx() {
18279
18280
  const [t, a] = U(
18280
18281
  "chart"
18281
18282
  ), [r, s] = U(!1), [l, c] = U(!0), [d, o] = U(!0), i = ge((ae) => ae.isVisualEditing), f = Lr(), u = F((ae) => ae.card.type);
18282
- we(() => _x(), []);
18283
+ we(() => Bx(), []);
18283
18284
  const m = (ae) => {
18284
18285
  f(ae);
18285
18286
  }, p = F((ae) => ae.frame), h = F((ae) => ae.card);
@@ -18289,8 +18290,8 @@ function Vx() {
18289
18290
  const { addCard: C, removeCard: S, updateCard: x, setActiveCard: v, updateFilters: T, clearFilters: N } = be(), {
18290
18291
  scopedFields: g = [],
18291
18292
  filterableFields: E = []
18292
- } = zl(), I = pu(
18293
- fu(bu, {
18293
+ } = zl(), I = gu(
18294
+ xu(yu, {
18294
18295
  activationConstraint: {
18295
18296
  distance: 8
18296
18297
  }
@@ -18308,11 +18309,11 @@ function Vx() {
18308
18309
  handleDragOver: Y,
18309
18310
  handleDragEnd: k,
18310
18311
  handleDragCancel: D
18311
- } = Sx({
18312
+ } = Tx({
18312
18313
  activeCardId: p.activeCardId,
18313
18314
  placeField: w,
18314
18315
  previewFieldPlacement: y
18315
- }), M = se(() => gu(), []), A = (ae, te) => {
18316
+ }), M = se(() => bu(), []), A = (ae, te) => {
18316
18317
  te && T(ae, te);
18317
18318
  }, B = (ae) => {
18318
18319
  N(ae);
@@ -18345,7 +18346,7 @@ function Vx() {
18345
18346
  ),
18346
18347
  /* @__PURE__ */ n("div", { className: "flex flex-1 transition-all duration-300 ease-in-out", children: [
18347
18348
  /* @__PURE__ */ e(
18348
- Cx,
18349
+ Sx,
18349
18350
  {
18350
18351
  onRemoveField: P,
18351
18352
  onResetFields: V,
@@ -18361,7 +18362,7 @@ function Vx() {
18361
18362
  }
18362
18363
  ),
18363
18364
  /* @__PURE__ */ e(
18364
- Ox,
18365
+ Yx,
18365
18366
  {
18366
18367
  selectedChart: u,
18367
18368
  activeView: t,
@@ -18390,7 +18391,7 @@ function Vx() {
18390
18391
  ) })
18391
18392
  ] }),
18392
18393
  R && /* @__PURE__ */ e(
18393
- wx,
18394
+ kx,
18394
18395
  {
18395
18396
  cardId: R.id,
18396
18397
  filters: Za(R) || null,
@@ -18402,13 +18403,13 @@ function Vx() {
18402
18403
  }
18403
18404
  )
18404
18405
  ] }),
18405
- /* @__PURE__ */ e(xu, { dropAnimation: null, children: /* @__PURE__ */ e(Yx, {}) })
18406
+ /* @__PURE__ */ e(vu, { dropAnimation: null, children: /* @__PURE__ */ e(Vx, {}) })
18406
18407
  ]
18407
18408
  }
18408
18409
  );
18409
18410
  }
18410
- function Bx({ authToken: t, onSave: a, onClose: r }) {
18411
- const s = F((u) => u.isDevMode), l = pr(), { setAuthToken: c } = vu(), { setOnSave: d, setOnClose: o } = be();
18411
+ function qx({ authToken: t, onSave: a, onClose: r }) {
18412
+ const s = F((u) => u.isDevMode), l = pr(), { setAuthToken: c } = Nu(), { setOnSave: d, setOnClose: o } = be();
18412
18413
  we(() => {
18413
18414
  a && d(a), r && o(r);
18414
18415
  }, [a, d, r, o]), we(() => {
@@ -18423,7 +18424,7 @@ function Bx({ authToken: t, onSave: a, onClose: r }) {
18423
18424
  {
18424
18425
  "data-content": "editor-main",
18425
18426
  className: "min-w-[510px] flex-1 basis-0 overflow-hidden",
18426
- children: /* @__PURE__ */ e(Wg, {})
18427
+ children: /* @__PURE__ */ e(Zg, {})
18427
18428
  }
18428
18429
  ) })
18429
18430
  ] });
@@ -18434,13 +18435,13 @@ function Bx({ authToken: t, onSave: a, onClose: r }) {
18434
18435
  {
18435
18436
  "data-content": "explorer",
18436
18437
  className: "min-w-[510px] flex-1 basis-0 overflow-hidden",
18437
- children: /* @__PURE__ */ e(Vx, {})
18438
+ children: /* @__PURE__ */ e(Kx, {})
18438
18439
  }
18439
18440
  ) });
18440
18441
  }
18441
18442
  return (
18442
18443
  // Everything the editor renders is its preview (tech spec M7).
18443
- /* @__PURE__ */ e(yu, { children: /* @__PURE__ */ e(on, { FallbackComponent: Nu, children: s ? /* @__PURE__ */ e(
18444
+ /* @__PURE__ */ e(Cu, { children: /* @__PURE__ */ e(on, { FallbackComponent: wu, children: s ? /* @__PURE__ */ e(
18444
18445
  "section",
18445
18446
  {
18446
18447
  className: "isolate flex h-full grow",
@@ -18459,11 +18460,11 @@ function Bx({ authToken: t, onSave: a, onClose: r }) {
18459
18460
  ) }) })
18460
18461
  );
18461
18462
  }
18462
- function gb() {
18463
+ function vb() {
18463
18464
  ge((h) => h.selectedCardId);
18464
18465
  const t = ge((h) => h.selectedSheetId), a = ge((h) => h.dashboard), { setIsVisualEditing: r, setSelectedSheetId: s } = ge(
18465
18466
  (h) => h.actions
18466
- ), l = F((h) => h.editorContext), { clearEditorContext: c } = F((h) => h.actions), d = Cu(), o = pr(), i = ge((h) => h.isVisualEditing), f = ge((h) => h.actions.updateFrame), u = wu();
18467
+ ), l = F((h) => h.editorContext), { clearEditorContext: c } = F((h) => h.actions), d = Su(), o = pr(), i = ge((h) => h.isVisualEditing), f = ge((h) => h.actions.updateFrame), u = ku();
18467
18468
  async function m(h) {
18468
18469
  var T, N, g;
18469
18470
  if ((l == null ? void 0 : l.type) === "documentSection") {
@@ -18482,7 +18483,7 @@ function gb() {
18482
18483
  }
18483
18484
  )) == null ? void 0 : g.id, x = C ? t : S || null;
18484
18485
  if (!x) return;
18485
- const v = Hm(a, h.id);
18486
+ const v = Gm(a, h.id);
18486
18487
  try {
18487
18488
  const E = await u(h, {
18488
18489
  previousFrame: v
@@ -18511,10 +18512,10 @@ function gb() {
18511
18512
  "max-h-0 overflow-hidden": !i
18512
18513
  }),
18513
18514
  style: o.dashboardContainerStyle,
18514
- children: /* @__PURE__ */ e(Bx, { onSave: m, onClose: p })
18515
+ children: /* @__PURE__ */ e(qx, { onSave: m, onClose: p })
18515
18516
  }
18516
18517
  );
18517
18518
  }
18518
18519
  export {
18519
- gb as default
18520
+ vb as default
18520
18521
  };