react-semaphor 0.1.587 → 0.1.588

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 (93) hide show
  1. package/dist/analytics-protocol/index.js +341 -338
  2. package/dist/assistant-context/index.js +1 -1
  3. package/dist/assistant-protocol/index.js +5 -5
  4. package/dist/brand-studio/index.js +8 -8
  5. package/dist/briefings/index.js +5 -5
  6. package/dist/chunks/{add-to-dashboard-DhP8wVtM.js → add-to-dashboard-C86FsM8D.js} +1 -1
  7. package/dist/chunks/{aggregate-measure-field-DsFXETpI.js → aggregate-measure-field-BrkXsSJp.js} +2 -2
  8. package/dist/chunks/{analytics-base-schemas-BaIQrEzX.js → analytics-base-schemas-8wz9vqn_.js} +173 -165
  9. package/dist/chunks/{assistant-chat-pfJK-T0b.js → assistant-chat-BeM6joPc.js} +19 -18
  10. package/dist/chunks/{bookmark-impact-BSpGQL1M.js → bookmark-impact-B7pbMx2e.js} +2 -2
  11. package/dist/chunks/{bookmark-state-CL4WEpgB.js → bookmark-state-Bn7k3ttp.js} +5 -5
  12. package/dist/chunks/{card-filter-builder-C8PbhHjq.js → card-filter-builder-DmodrhyI.js} +81 -81
  13. package/dist/chunks/{comparison-window-caption-CoART8BC.js → comparison-window-caption-fqijZdVd.js} +451 -395
  14. package/dist/chunks/{context-BTLBjQNh.js → context-CVXTFljo.js} +1 -1
  15. package/dist/chunks/{dashboard-CVj1oMoW.js → dashboard-Tu5wT0Cw.js} +1 -1
  16. package/dist/chunks/{dashboard-briefing-launcher-TqA58rKz.js → dashboard-briefing-launcher-D8jMxIJo.js} +249 -265
  17. package/dist/chunks/{dashboard-controls-DQ8FsxAz.js → dashboard-controls-uzeAIEkM.js} +65 -65
  18. package/dist/chunks/{dashboard-json-DM88pmk2.js → dashboard-json-i5rpFNCg.js} +5 -5
  19. package/dist/chunks/dates-BunbHJH0.js +115 -0
  20. package/dist/chunks/{edit-dashboard-visual-BpRnU_6G.js → edit-dashboard-visual-BpEK_Sls.js} +2357 -2344
  21. package/dist/chunks/{filter-line-Cu2u1K36.js → filter-line-Dza3ee4w.js} +5 -5
  22. package/dist/chunks/{filter-reach-copy-0Xp97cLk.js → filter-reach-copy-D5AmDHda.js} +944 -942
  23. package/dist/chunks/{filter-value-text-xefXzZlf.js → filter-value-text-DQw4v3nC.js} +6 -6
  24. package/dist/chunks/{index-D_QSeVKy.js → index-dGxJTaP1.js} +39 -39
  25. package/dist/chunks/{layout-grid-9nSS2SL-.js → layout-grid-XCYphks2.js} +1 -1
  26. package/dist/chunks/{list-filter-CfMPI6v4.js → list-filter-DGV3fqqv.js} +1 -1
  27. package/dist/chunks/{matrix-analytical-definition-DOVSFFuf.js → matrix-analytical-definition-SN0JUJVk.js} +3 -3
  28. package/dist/chunks/{matrix-member-presentation-BKDyxJho.js → matrix-member-presentation-DVBJR0MA.js} +1 -1
  29. package/dist/chunks/{matrix-operation-contract-BM5TveR3.js → matrix-operation-contract-JSmproo9.js} +15 -15
  30. package/dist/chunks/{metric-comparison-ZmurmEIs.js → metric-comparison-xE_J6hkg.js} +2 -2
  31. package/dist/chunks/{paintbrush-LzAje2ff.js → paintbrush-DEEZXhDj.js} +1 -1
  32. package/dist/chunks/{palette-DicJG0TC.js → palette-Bgy0H-Nt.js} +1 -1
  33. package/dist/chunks/{pivot-header-presentation-CdeTU96P.js → pivot-header-presentation-D-DfPAjb.js} +1 -1
  34. package/dist/chunks/{pivot-result-contract-expectations-Bx_BCu-7.js → pivot-result-contract-expectations-DbBahmgc.js} +545 -536
  35. package/dist/chunks/{pivot-result-identity-Bvs6Uq3v.js → pivot-result-identity-CUsMt_4r.js} +1 -1
  36. package/dist/chunks/{raw-temporal-value-DH-feMc2.js → raw-temporal-value-BnGCWJAL.js} +1 -1
  37. package/dist/chunks/{report-preferences-dialog-CXKmWyLm.js → report-preferences-dialog-CTM0xfd0.js} +14 -14
  38. package/dist/chunks/{report-runtime-context-NlOXwyRB.js → report-runtime-context-CrOgmuxO.js} +2 -2
  39. package/dist/chunks/{resolve-dashboard-input-context-zEXuitoF.js → resolve-dashboard-input-context-DFBIngUZ.js} +5617 -5485
  40. package/dist/chunks/{save-0wu1Z1U7.js → save-xnRCvMeA.js} +1 -1
  41. package/dist/chunks/{saved-dashboard-context-Cll5LipJ.js → saved-dashboard-context-DKMTP9ib.js} +17 -17
  42. package/dist/chunks/selection-filter-compiler-DkIjp1yH.js +131 -0
  43. package/dist/chunks/{semaphor-ready-indicator-Bnj3H0Dm.js → semaphor-ready-indicator-zU9reNmX.js} +45952 -45617
  44. package/dist/chunks/{shelf-drop-preview-context-B8rmn6BD.js → shelf-drop-preview-context-R9sf4oDX.js} +6 -6
  45. package/dist/chunks/{stored-dashboard-CURqJgoa.js → stored-dashboard-CksluF2S.js} +1539 -1404
  46. package/dist/chunks/{style-sheet-parts-_dGSFzDi.js → style-sheet-parts-D7NbsFL0.js} +3 -3
  47. package/dist/chunks/{table-export-sheet-Dmtqi5NV.js → table-export-sheet-ClSgERQC.js} +1 -1
  48. package/dist/chunks/{token-types-DEe_FP4l.js → token-types-DTocOcwt.js} +1 -1
  49. package/dist/chunks/{upload-CtyOkU_B.js → upload-BXGgYS4g.js} +1 -1
  50. package/dist/chunks/{validators-CJ8Jh0E8.js → validators-CrYXNnNE.js} +51 -49
  51. package/dist/chunks/{variable-draft-DIv-9y6Q.js → variable-draft-rbtGPvmX.js} +16 -14
  52. package/dist/chunks/visual-choice-DDfHfHvY.js +172 -0
  53. package/dist/dashboard/index.js +2 -2
  54. package/dist/dashboard-authoring/index.js +821 -791
  55. package/dist/format-utils/index.js +162 -158
  56. package/dist/index.js +21 -21
  57. package/dist/report-runtime-context/index.js +2 -2
  58. package/dist/style.css +1 -1
  59. package/dist/surfboard/index.js +2 -2
  60. package/dist/types/index.js +5 -5
  61. package/dist/types/lib/dashboard-view-state/card-view-state.d.ts +39 -2
  62. package/dist/types/lib/dashboard-view-state/date-zoom.d.ts +65 -0
  63. package/dist/types/lib/dashboard-view-state/grain-pick.d.ts +38 -0
  64. package/dist/types/lib/dashboard-view-state/index.d.ts +2 -0
  65. package/dist/types/lib/formatters/grouped-temporal-presentation.d.ts +6 -2
  66. package/dist/types/lib/hooks/interactions/use-drill-actions.d.ts +1 -1
  67. package/dist/types/lib/interactions/get-click-context-from-table.d.ts +2 -2
  68. package/dist/types/lib/query-context/assemble-card-query.d.ts +2 -1
  69. package/dist/types/lib/query-context/build-card-query-context.d.ts +15 -1
  70. package/dist/types/lib/query-context/describe-card-execution-snapshot.d.ts +3 -0
  71. package/dist/types/lib/query-context/resolve-runtime-card-filters.d.ts +14 -1
  72. package/dist/types/lib/stores/dashboard-store.d.ts +7 -1
  73. package/dist/types/lib/types/explorer-types.d.ts +13 -0
  74. package/dist/types/lib/utils/card-config-utils.d.ts +1 -1
  75. package/dist/types/shared/analytics-protocol/analytics-base-schemas.d.ts +32 -0
  76. package/dist/types/shared/analytics-protocol/contracts.d.ts +30 -0
  77. package/dist/types/shared/analytics-protocol/filter-field-ownership.d.ts +13 -0
  78. package/dist/types/shared/dashboard-authoring/automatic-grain.d.ts +77 -0
  79. package/dist/types/shared/dashboard-authoring/changes/card-query-part.d.ts +1 -0
  80. package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +13 -8
  81. package/dist/types/shared/dashboard-authoring/control-value-resolution.d.ts +24 -0
  82. package/dist/types/shared/dashboard-authoring/index.d.ts +1 -0
  83. package/dist/types/shared/dashboard-authoring/kpi-trend-rule.d.ts +6 -29
  84. package/dist/types/shared/dashboard-authoring/variable-draft.d.ts +1 -0
  85. package/dist/types/shared/format-utils/index.d.ts +1 -0
  86. package/dist/types/shared/format-utils/partial-period.d.ts +40 -0
  87. package/dist/types/shared/format-utils/temporal-bucket.d.ts +11 -0
  88. package/dist/types/shared/usage-events/details.d.ts +2 -2
  89. package/dist/usage-events/index.js +1 -1
  90. package/package.json +1 -1
  91. package/dist/chunks/dates-5z3b9Loo.js +0 -136
  92. package/dist/chunks/selection-filter-compiler-BReJy-uv.js +0 -92
  93. package/dist/chunks/visual-choice-BBPizkRo.js +0 -206
@@ -1,34 +1,34 @@
1
1
  import { jsx as t, jsxs as r, Fragment as U } from "react/jsx-runtime";
2
2
  import la, { useState as E, useEffect as Ee, useCallback as ie, useMemo as Y, useLayoutEffect as Ut, useRef as et, useContext as Va } from "react";
3
- import { dK as it, bE as Le, bF as Ve, bH as Be, dL as Ba, b2 as $e, a$ as ot, dM as Pa, dN as lt, dO as Ct, ah as dt, ae as ve, u as w, dP as _a, dQ as Oa, bD as M, dR as Ma, ag as oe, aZ as za, c7 as Ra, dS as Ua, dT as $a, bx as da, bX as be, cr as ca, bW as tt, o as ja, k as qa, dU as Wa, cu as wt, cv as St, cw as kt, cx as Dt, cy as At, cz as Ft, cA as Et, cB as ua, cE as It, dV as Qa, dr as Ka, cj as pt, cg as je, ch as qe, dD as ha, ci as We, c3 as re, cs as Ha, cn as at, dW as Ga, c0 as Ya, dX as ma, bo as ct, bG as Tt, bI as ut, dY as pa, bC as Xa, dZ as Ja, bp as Za, i as en, cK as tn, d_ as an, K as nn, I as fa, bj as rn, L as sn, t as on, d$ as ln, e0 as dn, e1 as ga, e2 as cn, e3 as un, e4 as Ce, e5 as hn, R as ba, e6 as mn, e7 as pn, aW as fn, e8 as gn, e9 as ge, ea as bn, a4 as Lt, eb as xn, ec as ft, ed as vn, ee as $t, ef as yn, eg as Nn, eh as Cn, ei as xa, cV as wn, ej as Sn, ek as kn, dx as Vt, cF as va, el as Dn, em as jt, en as An, eo as Fn, ep as En, eq as In, b1 as Tn, by as Ln, c6 as ya, er as Vn, es as Bn, et as Xe, eu as Pn, ev as _n, ew as On, A as Mn, aL as zn, aM as Rn, ar as Un, aq as $n, ap as jn, ao as qn, al as Wn, aj as Qn, ex as Kn, ey as Hn, ez as Gn, eA as Yn, eB as Xn, aJ as Jn } from "./semaphor-ready-indicator-Bnj3H0Dm.js";
4
- import { c as we, B as L, X as Qe, s as Re, x as xe, L as de, q as Bt, j as Pt, p as Zn, F as _t, e as Ie, aa as Na, h as Te, f as nt, i as Ca, g as Nt, y as Se, z as ke, A as De, D as Ae, E as fe, ab as er } from "./style-sheet-parts-_dGSFzDi.js";
5
- import { L as Ue } from "./layout-grid-9nSS2SL-.js";
3
+ import { dK as it, bE as Le, bF as Ve, bH as Be, dL as Ba, b2 as $e, a$ as ot, dM as Pa, dN as lt, dO as Ct, ah as dt, ae as ve, u as w, dP as _a, dQ as Oa, bD as z, dR as za, ag as oe, aZ as Ma, c7 as Ra, dS as Ua, dT as $a, bx as da, bX as be, cr as ca, bW as tt, o as ja, k as qa, dU as Wa, cu as wt, cv as St, cw as kt, cx as Dt, cy as At, cz as Ft, cA as Et, cB as ua, cE as It, dV as Qa, dr as Ka, cj as pt, cg as je, ch as qe, dD as ha, ci as We, c3 as re, cs as Ga, cn as at, dW as Ha, c0 as Ya, dX as ma, bo as ct, bG as Tt, bI as ut, dY as pa, bC as Xa, dZ as Ja, bp as Za, i as en, cK as tn, d_ as an, K as nn, I as fa, bj as rn, L as sn, t as on, d$ as ln, e0 as dn, e1 as ga, e2 as cn, e3 as un, e4 as Ce, e5 as hn, R as ba, e6 as mn, e7 as pn, aW as fn, e8 as gn, e9 as ge, ea as bn, a4 as Lt, eb as xn, ec as ft, ed as vn, ee as $t, ef as yn, eg as Nn, eh as Cn, ei as xa, cV as wn, ej as Sn, ek as kn, el as Dn, dx as Vt, cF as va, em as An, en as jt, eo as Fn, ep as En, eq as In, er as Tn, b1 as Ln, by as Vn, c6 as ya, es as Bn, et as Pn, eu as Xe, ev as _n, ew as On, ex as zn, A as Mn, aL as Rn, aM as Un, ar as $n, aq as jn, ap as qn, ao as Wn, al as Qn, aj as Kn, ey as Gn, ez as Hn, eA as Yn, eB as Xn, eC as Jn, aJ as Zn } from "./semaphor-ready-indicator-zU9reNmX.js";
4
+ import { c as Ae, B as L, X as Qe, s as Re, x as xe, L as de, q as Bt, j as Pt, p as er, F as _t, e as Ie, aa as Na, h as Te, f as nt, i as Ca, g as Nt, y as we, z as Se, A as ke, D as De, E as fe, ab as tr } from "./style-sheet-parts-D7NbsFL0.js";
5
+ import { L as Ue } from "./layout-grid-XCYphks2.js";
6
6
  import { c as J } from "./pickers-DkqmtnTL.js";
7
- import { S as tr } from "./validators-CJ8Jh0E8.js";
8
- import "./matrix-operation-contract-BM5TveR3.js";
9
- import "./analytics-base-schemas-BaIQrEzX.js";
7
+ import { S as ar } from "./validators-CrYXNnNE.js";
8
+ import "./matrix-operation-contract-JSmproo9.js";
9
+ import "./analytics-base-schemas-8wz9vqn_.js";
10
10
  import "../value-format-preferences/index.js";
11
11
  import { s as Je } from "./normalize-dashboard-for-dirty-check-XKgH3GFX.js";
12
- import { bG as qt, bc as Wt, ez as Qt, g7 as ar, g8 as rt, g6 as Kt, g9 as nr, o as Ke, ga as rr, p as sr, gb as ir, gc as or, gd as lr, cu as dr, ge as cr, l as ur, fv as hr, gf as mr, gg as pr, a as Ot, aO as fr, a4 as gr, c8 as br, gh as xr, gi as vr, cj as yr, gj as Nr, gk as Ht, gl as Cr } from "./resolve-dashboard-input-context-zEXuitoF.js";
13
- import { S as wa } from "./save-0wu1Z1U7.js";
14
- import { V as wr, L as Sr, u as Sa, C as ka, F as kr, a as Dr, A as Ar, b as Fr } from "./card-filter-builder-C8PbhHjq.js";
15
- import { createPortal as Er } from "react-dom";
16
- import { b0 as Gt, aA as Ir } from "./pivot-result-contract-expectations-Bx_BCu-7.js";
17
- import { aA as Tr, ao as Lr, D as Vr, a9 as st, S as Br } from "./bookmark-state-CL4WEpgB.js";
12
+ import { bI as qt, be as Wt, eN as Qt, gl as nr, gm as rt, gk as Kt, gn as rr, o as Ke, go as sr, p as ir, gp as or, gq as lr, gr as dr, cG as cr, gs as ur, l as hr, fJ as mr, gt as pr, gu as fr, a as Ot, aO as gr, a4 as br, ck as xr, gv as vr, gw as yr, cv as Nr, gx as Cr, gy as Gt, gz as wr } from "./resolve-dashboard-input-context-DFBIngUZ.js";
13
+ import { S as wa } from "./save-xnRCvMeA.js";
14
+ import { V as Sr, L as kr, u as Sa, C as ka, F as Dr, a as Ar, A as Fr, b as Er } from "./card-filter-builder-DmodrhyI.js";
15
+ import { createPortal as Ir } from "react-dom";
16
+ import { b1 as Ht, aB as Tr } from "./pivot-result-contract-expectations-DbBahmgc.js";
17
+ import { aA as Lr, ao as Vr, D as Br, a9 as st, S as Pr } from "./bookmark-state-Bn7k3ttp.js";
18
18
  import "zod";
19
19
  import "./schema-C9NPiIru.js";
20
20
  import "./index-CV_Kzou0.js";
21
- import "./context-BTLBjQNh.js";
22
- import { v as Pr, G as _r } from "./filter-reach-copy-0Xp97cLk.js";
23
- import { a as Yt, d as Xt, c as Or, i as Mr, b as zr, e as Rr, v as Jt, f as Zt, g as Ur } from "./variable-draft-DIv-9y6Q.js";
24
- import { g as pe, d as $r, a as jr } from "./index-D_QSeVKy.js";
21
+ import "./context-CVXTFljo.js";
22
+ import { v as _r, G as Or } from "./filter-reach-copy-D5AmDHda.js";
23
+ import { a as Yt, d as Xt, c as zr, i as Mr, b as Rr, e as Ur, v as Jt, f as Zt, g as $r } from "./variable-draft-rbtGPvmX.js";
24
+ import { g as pe, d as jr, a as qr } from "./index-dGxJTaP1.js";
25
25
  /**
26
26
  * @license lucide-react v0.453.0 - ISC
27
27
  *
28
28
  * This source code is licensed under the ISC license.
29
29
  * See the LICENSE file in the root directory of this source tree.
30
30
  */
31
- const qr = we("ArrowUpRight", [
31
+ const Wr = Ae("ArrowUpRight", [
32
32
  ["path", { d: "M7 7h10v10", key: "1tivn9" }],
33
33
  ["path", { d: "M7 17 17 7", key: "1vkiza" }]
34
34
  ]);
@@ -38,7 +38,7 @@ const qr = we("ArrowUpRight", [
38
38
  * This source code is licensed under the ISC license.
39
39
  * See the LICENSE file in the root directory of this source tree.
40
40
  */
41
- const ea = we("Bell", [
41
+ const ea = Ae("Bell", [
42
42
  ["path", { d: "M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9", key: "1qo2s2" }],
43
43
  ["path", { d: "M10.3 21a1.94 1.94 0 0 0 3.4 0", key: "qgo35s" }]
44
44
  ]);
@@ -48,23 +48,7 @@ const ea = we("Bell", [
48
48
  * This source code is licensed under the ISC license.
49
49
  * See the LICENSE file in the root directory of this source tree.
50
50
  */
51
- const Wr = we("CalendarRange", [
52
- ["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
53
- ["path", { d: "M16 2v4", key: "4m81vk" }],
54
- ["path", { d: "M3 10h18", key: "8toen8" }],
55
- ["path", { d: "M8 2v4", key: "1cmpym" }],
56
- ["path", { d: "M17 14h-6", key: "bkmgh3" }],
57
- ["path", { d: "M13 18H7", key: "bb0bb7" }],
58
- ["path", { d: "M7 14h.01", key: "1qa3f1" }],
59
- ["path", { d: "M17 18h.01", key: "1bdyru" }]
60
- ]);
61
- /**
62
- * @license lucide-react v0.453.0 - ISC
63
- *
64
- * This source code is licensed under the ISC license.
65
- * See the LICENSE file in the root directory of this source tree.
66
- */
67
- const Qr = we("CodeXml", [
51
+ const Qr = Ae("CodeXml", [
68
52
  ["path", { d: "m18 16 4-4-4-4", key: "1inbqp" }],
69
53
  ["path", { d: "m6 8-4 4 4 4", key: "15zrgr" }],
70
54
  ["path", { d: "m14.5 4-5 16", key: "e7oirm" }]
@@ -75,7 +59,7 @@ const Qr = we("CodeXml", [
75
59
  * This source code is licensed under the ISC license.
76
60
  * See the LICENSE file in the root directory of this source tree.
77
61
  */
78
- const ta = we("MonitorSmartphone", [
62
+ const ta = Ae("MonitorSmartphone", [
79
63
  ["path", { d: "M18 8V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h8", key: "10dyio" }],
80
64
  ["path", { d: "M10 19v-3.96 3.15", key: "1irgej" }],
81
65
  ["path", { d: "M7 19h5", key: "qswx4l" }],
@@ -87,7 +71,7 @@ const ta = we("MonitorSmartphone", [
87
71
  * This source code is licensed under the ISC license.
88
72
  * See the LICENSE file in the root directory of this source tree.
89
73
  */
90
- const Kr = we("MousePointer2", [
74
+ const Kr = Ae("MousePointer2", [
91
75
  [
92
76
  "path",
93
77
  {
@@ -102,7 +86,7 @@ const Kr = we("MousePointer2", [
102
86
  * This source code is licensed under the ISC license.
103
87
  * See the LICENSE file in the root directory of this source tree.
104
88
  */
105
- const Hr = we("Newspaper", [
89
+ const Gr = Ae("Newspaper", [
106
90
  [
107
91
  "path",
108
92
  {
@@ -120,7 +104,7 @@ const Hr = we("Newspaper", [
120
104
  * This source code is licensed under the ISC license.
121
105
  * See the LICENSE file in the root directory of this source tree.
122
106
  */
123
- const Gr = we("Terminal", [
107
+ const Hr = Ae("Terminal", [
124
108
  ["polyline", { points: "4 17 10 11 4 5", key: "akl6gq" }],
125
109
  ["line", { x1: "12", x2: "20", y1: "19", y2: "19", key: "q2wloq" }]
126
110
  ]);
@@ -319,7 +303,7 @@ async function aa(e, a, s, n, i = "Opening library visual...") {
319
303
  if (l)
320
304
  return console.log("Using cached visual data for:", s), { data: l, fromCache: !0 };
321
305
  console.log("Fetching visual data from network for:", s);
322
- const u = M.loading(i, {
306
+ const u = z.loading(i, {
323
307
  position: "top-center"
324
308
  });
325
309
  try {
@@ -334,9 +318,9 @@ async function aa(e, a, s, n, i = "Opening library visual...") {
334
318
  if (!c.ok)
335
319
  throw new Error("Failed to load visual");
336
320
  const d = await c.json();
337
- return n.setQueryData(o, d), M.dismiss(u), { data: d, fromCache: !1 };
321
+ return n.setQueryData(o, d), z.dismiss(u), { data: d, fromCache: !1 };
338
322
  } catch (c) {
339
- throw M.dismiss(u), c;
323
+ throw z.dismiss(u), c;
340
324
  }
341
325
  }
342
326
  function Da(e) {
@@ -357,7 +341,7 @@ function es(e, a) {
357
341
  const i = (l = n.cards) == null ? void 0 : l.find(
358
342
  (u) => u.id === n.activeCardId
359
343
  );
360
- return i ? (Ma({
344
+ return i ? (za({
361
345
  ...a,
362
346
  frame: n,
363
347
  card: i,
@@ -373,7 +357,7 @@ function ts() {
373
357
  ), a = Jr(e);
374
358
  return { getUpdatedFrame: ie(() => {
375
359
  var N;
376
- za();
360
+ Ma();
377
361
  const {
378
362
  frame: n,
379
363
  card: i,
@@ -393,10 +377,10 @@ function ts() {
393
377
  stripConfig: Wt
394
378
  }), f = n.cards.map((k) => {
395
379
  if (k.id === i.id) return Qt({ before: i, after: m });
396
- const V = ar(k) ? qt(k, { isDevMode: !0, cardSql: k.sql, stripConfig: Wt }) : k;
380
+ const V = nr(k) ? qt(k, { isDevMode: !0, cardSql: k.sql, stripConfig: Wt }) : k;
397
381
  return Qt({ before: k, after: V });
398
382
  }), g = f.flatMap((k) => k.dropped);
399
- g.length && M.info("Some conditional formatting rules were removed", {
383
+ g.length && z.info("Some conditional formatting rules were removed", {
400
384
  description: `Their column isn't in the saved visual: ${g.map((k) => k.name || "an unnamed rule").join(", ")}.`
401
385
  });
402
386
  const y = f.map((k) => k.card);
@@ -428,7 +412,7 @@ function Pe() {
428
412
  setIsDashboardEditing: O,
429
413
  setIsVisualEditing: b,
430
414
  clearSelectedFrameId: S
431
- } = ve(), v = w((_) => _.selectedSheetId), T = w((_) => _.selectedFrameId), F = w((_) => _.dashboard), H = w(
415
+ } = ve(), v = w((_) => _.selectedSheetId), T = w((_) => _.selectedFrameId), F = w((_) => _.dashboard), G = w(
432
416
  (_) => _.inlineFilterValuesMap
433
417
  ), P = _a((i == null ? void 0 : i.id) || "", {
434
418
  enabled: !!(i != null && i.id) && !!(e != null && e.accessToken)
@@ -463,7 +447,7 @@ function Pe() {
463
447
  dashboard: F,
464
448
  selectedSheetId: v,
465
449
  selectedFrameId: T,
466
- inlineFilterValuesMap: H
450
+ inlineFilterValuesMap: G
467
451
  }))
468
452
  throw new Error("Failed to setup editor with visual data");
469
453
  return { success: !0, fromCache: Z };
@@ -497,36 +481,36 @@ function Pe() {
497
481
  F,
498
482
  v,
499
483
  T,
500
- H
484
+ G
501
485
  ]
502
486
  ), X = ie(
503
487
  async (_) => {
504
488
  var Z;
505
- const te = (G) => (M.error(G), { success: !1, error: G });
489
+ const te = (H) => (z.error(H), { success: !1, error: H });
506
490
  try {
507
491
  if (o(_), !v)
508
492
  return te("No sheet selected. Please select a sheet first.");
509
- const { data: G, fromCache: I } = await aa(
493
+ const { data: H, fromCache: I } = await aa(
510
494
  a.apiServiceUrl,
511
495
  (e == null ? void 0 : e.accessToken) || "",
512
496
  _.id,
513
497
  s,
514
498
  "Adding visual to dashboard..."
515
- ), ae = (G == null ? void 0 : G.frameObject) ?? ((Z = G == null ? void 0 : G.visual) == null ? void 0 : Z.frameObject);
499
+ ), ae = (H == null ? void 0 : H.frameObject) ?? ((Z = H == null ? void 0 : H.visual) == null ? void 0 : Z.frameObject);
516
500
  if (!ae)
517
501
  return te("Visual has no frame data");
518
502
  const j = Da(ae);
519
503
  if (!(j != null && j.cards) || j.cards.length === 0)
520
504
  return te("Visual frame is malformed");
521
- const z = {
505
+ const M = {
522
506
  ...Oa(j),
523
507
  visualId: _.id
524
508
  // Link this frame to the library visual
525
509
  };
526
- return await n(v, z), O(!0), { success: !0, fromCache: I };
527
- } catch (G) {
528
- return console.error("Error adding visual:", G), te(
529
- G instanceof Error ? G.message : "Failed to add visual to dashboard"
510
+ return await n(v, M), O(!0), { success: !0, fromCache: I };
511
+ } catch (H) {
512
+ return console.error("Error adding visual:", H), te(
513
+ H instanceof Error ? H.message : "Failed to add visual to dashboard"
530
514
  );
531
515
  }
532
516
  },
@@ -563,16 +547,16 @@ function Fa(e, a) {
563
547
  const s = (n = e.ownership.createdBy) == null ? void 0 : n.type;
564
548
  return s === "tenant" || s === "organization" && a;
565
549
  }
566
- function Mt(e, a) {
550
+ function zt(e, a) {
567
551
  var s, n;
568
552
  return Fa(e, a) ? ((s = e.ownership.createdBy) == null ? void 0 : s.name) || ((n = e.createdByTenantUserRel) == null ? void 0 : n.name) || e.lastModifiedBy || "Unknown" : "Organization";
569
553
  }
570
554
  function as(e, a) {
571
- return Mt(e, a).split(/\s+/).filter(Boolean).slice(0, 2).map((n) => n.charAt(0).toUpperCase()).join("") || "?";
555
+ return zt(e, a).split(/\s+/).filter(Boolean).slice(0, 2).map((n) => n.charAt(0).toUpperCase()).join("") || "?";
572
556
  }
573
557
  function ns(e) {
574
558
  const a = (e || "").toLowerCase();
575
- return a.includes("table") ? Bt : a.includes("pie") || a.includes("donut") ? Qa : a.includes("line") ? Ka : a.includes("bar") ? Zn : Ue;
559
+ return a.includes("table") ? Bt : a.includes("pie") || a.includes("donut") ? Qa : a.includes("line") ? Ka : a.includes("bar") ? er : Ue;
576
560
  }
577
561
  function rs({ visual: e }) {
578
562
  const a = e.ownership.status === "public" ? "Public" : e.ownership.status === "shared" || e.ownership.sharedCount > 0 ? "Shared" : "Private";
@@ -593,7 +577,7 @@ function ji({
593
577
  }, { selectVisual: O } = Ct(), { handleAddLibraryVisual: b, handleEditLibraryVisual: S } = Pe(), { isConsoleMode: v } = Ra(), {
594
578
  resources: T,
595
579
  isLoading: F,
596
- isError: H,
580
+ isError: G,
597
581
  createResource: P,
598
582
  updateResource: Q,
599
583
  deleteResourceAsync: X,
@@ -606,10 +590,10 @@ function ji({
606
590
  c(!1), C && (O(C), S(C), D());
607
591
  }
608
592
  ), {
609
- startUpdating: G,
593
+ startUpdating: H,
610
594
  stopUpdating: I,
611
595
  isUpdating: ae
612
- } = $a(), j = T, z = Y(() => {
596
+ } = $a(), j = T, M = Y(() => {
613
597
  const C = n.trim().toLowerCase();
614
598
  return C ? j.filter(
615
599
  (q) => {
@@ -626,9 +610,9 @@ function ji({
626
610
  (C) => C.permissions.canDelete
627
611
  ), he = ne.filter(
628
612
  (C) => C.permissions.canShare
629
- ), ye = z.length > 0 && z.every(
613
+ ), ye = M.length > 0 && M.every(
630
614
  (C) => o.has(C.id)
631
- ), x = z.some(
615
+ ), x = M.some(
632
616
  (C) => o.has(C.id)
633
617
  ), R = (C) => {
634
618
  const q = new Set(o);
@@ -640,9 +624,9 @@ function ji({
640
624
  }, K = () => {
641
625
  l((C) => {
642
626
  const q = new Set(C);
643
- return ye ? z.forEach(
627
+ return ye ? M.forEach(
644
628
  (ee) => q.delete(ee.id)
645
- ) : z.forEach(
629
+ ) : M.forEach(
646
630
  (ee) => q.add(ee.id)
647
631
  ), q;
648
632
  });
@@ -664,9 +648,9 @@ function ji({
664
648
  V(C), _(C, {
665
649
  onSettled: () => V(null)
666
650
  });
667
- }, He = () => {
651
+ }, Ge = () => {
668
652
  if (ue.length === 0) {
669
- M.error("Select a visual you can delete");
653
+ z.error("Select a visual you can delete");
670
654
  return;
671
655
  }
672
656
  N(null), g(!0);
@@ -685,16 +669,16 @@ function ji({
685
669
  }
686
670
  }, Oe = () => {
687
671
  if (ne.length !== 1) {
688
- M.error("Select one visual to share");
672
+ z.error("Select one visual to share");
689
673
  return;
690
674
  }
691
675
  const [C] = ne;
692
676
  if (!C.permissions.canShare) {
693
- M.error("You do not have permission to share this visual");
677
+ z.error("You do not have permission to share this visual");
694
678
  return;
695
679
  }
696
680
  h(C);
697
- }, Me = ({
681
+ }, ze = ({
698
682
  title: C,
699
683
  description: q
700
684
  }) => {
@@ -705,7 +689,7 @@ function ji({
705
689
  return;
706
690
  }
707
691
  const me = Object.keys(ee), Ne = me.length === 1 ? me[0] : void 0;
708
- G(p.id, Ne), Q(
692
+ H(p.id, Ne), Q(
709
693
  {
710
694
  resourceId: p.id,
711
695
  data: ee
@@ -721,7 +705,7 @@ function ji({
721
705
  );
722
706
  }, ce = (C) => {
723
707
  a(C), C || B();
724
- }, ze = y ? 1 : ue.length;
708
+ }, Me = y ? 1 : ue.length;
725
709
  return /* @__PURE__ */ r(U, { children: [
726
710
  /* @__PURE__ */ t(Le, { open: e, onOpenChange: ce, children: /* @__PURE__ */ r(
727
711
  Ve,
@@ -779,14 +763,14 @@ function ji({
779
763
  }
780
764
  )
781
765
  ] }),
782
- /* @__PURE__ */ t("div", { className: "min-h-0 flex-1 overflow-auto", children: F ? /* @__PURE__ */ t("div", { className: "p-3", children: /* @__PURE__ */ t(Yr, {}) }) : H ? /* @__PURE__ */ t("div", { className: "flex flex-col items-center gap-2 px-4 py-12 text-center", children: /* @__PURE__ */ t("p", { className: "text-[13px] text-destructive", children: "Failed to load visuals" }) }) : z.length === 0 ? /* @__PURE__ */ r("div", { className: "flex flex-col items-center gap-2 px-4 py-12 text-center", children: [
766
+ /* @__PURE__ */ t("div", { className: "min-h-0 flex-1 overflow-auto", children: F ? /* @__PURE__ */ t("div", { className: "p-3", children: /* @__PURE__ */ t(Yr, {}) }) : G ? /* @__PURE__ */ t("div", { className: "flex flex-col items-center gap-2 px-4 py-12 text-center", children: /* @__PURE__ */ t("p", { className: "text-[13px] text-destructive", children: "Failed to load visuals" }) }) : M.length === 0 ? /* @__PURE__ */ r("div", { className: "flex flex-col items-center gap-2 px-4 py-12 text-center", children: [
783
767
  /* @__PURE__ */ t(Ue, { className: "h-5 w-5 text-muted-foreground/60" }),
784
768
  /* @__PURE__ */ t("p", { className: "text-[13px] font-medium", children: n ? "No visuals found" : "No visuals yet" }),
785
769
  /* @__PURE__ */ t("p", { className: "text-[12px] text-muted-foreground", children: n ? "Try a different search." : "Create a saved visual to add it here." })
786
770
  ] }) : /* @__PURE__ */ t(
787
771
  ss,
788
772
  {
789
- visuals: z,
773
+ visuals: M,
790
774
  selectedIds: o,
791
775
  allFilteredSelected: ye,
792
776
  someFilteredSelected: x,
@@ -840,7 +824,7 @@ function ji({
840
824
  size: "xs",
841
825
  variant: "outline",
842
826
  className: "text-destructive hover:text-destructive",
843
- onClick: He,
827
+ onClick: Ge,
844
828
  disabled: ue.length === 0,
845
829
  children: [
846
830
  /* @__PURE__ */ t(tt, { className: "h-3.5 w-3.5" }),
@@ -902,7 +886,7 @@ function ji({
902
886
  initialTitle: p.title || "",
903
887
  initialDescription: p.description || "",
904
888
  onClose: () => m(null),
905
- onSave: Me,
889
+ onSave: ze,
906
890
  isSaving: ae(p.id)
907
891
  }
908
892
  ),
@@ -917,9 +901,9 @@ function ji({
917
901
  /* @__PURE__ */ r(kt, { children: [
918
902
  /* @__PURE__ */ r(Dt, { children: [
919
903
  "Delete ",
920
- ze,
904
+ Me,
921
905
  " visual",
922
- ze === 1 ? "" : "s",
906
+ Me === 1 ? "" : "s",
923
907
  "?"
924
908
  ] }),
925
909
  /* @__PURE__ */ t(At, { children: "This cannot be undone. Visuals already added to dashboards may need to be removed from those dashboards separately." })
@@ -932,7 +916,7 @@ function ji({
932
916
  onClick: (C) => {
933
917
  C.preventDefault(), mt();
934
918
  },
935
- disabled: Z || ze === 0,
919
+ disabled: Z || Me === 0,
936
920
  children: [
937
921
  Z ? /* @__PURE__ */ t(de, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ t(tt, { className: "h-3.5 w-3.5" }),
938
922
  Z ? "Deleting..." : "Delete"
@@ -1065,7 +1049,7 @@ function is({
1065
1049
  ),
1066
1050
  /* @__PURE__ */ r("div", { className: "flex min-w-0 items-center gap-2", children: [
1067
1051
  /* @__PURE__ */ t("div", { className: "flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-muted text-[9px] font-medium text-muted-foreground", children: as(e, p) }),
1068
- /* @__PURE__ */ t("span", { className: "truncate text-muted-foreground", children: Mt(e, p) })
1052
+ /* @__PURE__ */ t("span", { className: "truncate text-muted-foreground", children: zt(e, p) })
1069
1053
  ] }),
1070
1054
  /* @__PURE__ */ t("span", { className: "text-muted-foreground", children: Aa(e.updatedAt) }),
1071
1055
  /* @__PURE__ */ t(rs, { visual: e }),
@@ -1143,7 +1127,7 @@ function os({
1143
1127
  onClick: () => o(e.id),
1144
1128
  disabled: l === e.id,
1145
1129
  children: [
1146
- l === e.id ? /* @__PURE__ */ t(de, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ t(Ha, { className: "h-3.5 w-3.5" }),
1130
+ l === e.id ? /* @__PURE__ */ t(de, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ t(Ga, { className: "h-3.5 w-3.5" }),
1147
1131
  l === e.id ? "Duplicating..." : "Duplicate"
1148
1132
  ]
1149
1133
  }
@@ -1174,8 +1158,8 @@ function os({
1174
1158
  /* @__PURE__ */ t(at, {}),
1175
1159
  /* @__PURE__ */ r("div", { className: "space-y-1 px-2 py-1.5 text-[11px] text-muted-foreground", children: [
1176
1160
  Fa(e, c) && /* @__PURE__ */ r("div", { className: "flex items-center gap-1.5", children: [
1177
- /* @__PURE__ */ t(Ga, { className: "h-3 w-3" }),
1178
- /* @__PURE__ */ t("span", { className: "truncate", children: Mt(e, c) })
1161
+ /* @__PURE__ */ t(Ha, { className: "h-3 w-3" }),
1162
+ /* @__PURE__ */ t("span", { className: "truncate", children: zt(e, c) })
1179
1163
  ] }),
1180
1164
  /* @__PURE__ */ r("div", { className: "flex items-center gap-1.5", children: [
1181
1165
  /* @__PURE__ */ t(Ya, { className: "h-3 w-3" }),
@@ -1229,11 +1213,11 @@ function qi(e, a, s = !1) {
1229
1213
  }));
1230
1214
  }, [u, o]), l;
1231
1215
  }
1232
- function zt(e) {
1216
+ function Mt(e) {
1233
1217
  var a;
1234
1218
  for (const s of e.cards)
1235
- if (s.type === "matrixTable" && !tr.safeParse((a = s.config) == null ? void 0 : a.matrix).success)
1236
- return M.error("Matrix requires at least one row field, one metric, and valid settings."), !1;
1219
+ if (s.type === "matrixTable" && !ar.safeParse((a = s.config) == null ? void 0 : a.matrix).success)
1220
+ return z.error("Matrix requires at least one row field, one metric, and valid settings."), !1;
1237
1221
  return !0;
1238
1222
  }
1239
1223
  function gt({
@@ -1243,7 +1227,7 @@ function gt({
1243
1227
  const s = oe((o) => o.onSave), { getUpdatedFrame: n } = Pe();
1244
1228
  function i() {
1245
1229
  const o = n();
1246
- zt(o) && (s == null || s(o));
1230
+ Mt(o) && (s == null || s(o));
1247
1231
  }
1248
1232
  return /* @__PURE__ */ r(
1249
1233
  L,
@@ -1269,11 +1253,11 @@ function ls({
1269
1253
  {
1270
1254
  onClick: () => {
1271
1255
  const p = l();
1272
- if (!zt(p))
1256
+ if (!Mt(p))
1273
1257
  return;
1274
1258
  const m = (c == null ? void 0 : c.visualId) || (u == null ? void 0 : u.id);
1275
1259
  if (!m) {
1276
- M.error("No visual to save");
1260
+ z.error("No visual to save");
1277
1261
  return;
1278
1262
  }
1279
1263
  i(!0), d.mutate(
@@ -1285,13 +1269,13 @@ function ls({
1285
1269
  },
1286
1270
  {
1287
1271
  onSuccess: () => {
1288
- i(!1), M.success("Visual updated successfully"), s.invalidateQueries({
1272
+ i(!1), z.success("Visual updated successfully"), s.invalidateQueries({
1289
1273
  queryKey: ["resource-by-id", "visual", m],
1290
1274
  exact: !0
1291
1275
  });
1292
1276
  },
1293
1277
  onError: () => {
1294
- i(!1), M.error("Failed to update visual");
1278
+ i(!1), z.error("Failed to update visual");
1295
1279
  }
1296
1280
  }
1297
1281
  );
@@ -1318,18 +1302,18 @@ function ds({
1318
1302
  {
1319
1303
  onClick: async () => {
1320
1304
  if (!l) {
1321
- M.error("No sheet selected");
1305
+ z.error("No sheet selected");
1322
1306
  return;
1323
1307
  }
1324
1308
  const g = (o == null ? void 0 : o.visualId) || (i == null ? void 0 : i.id);
1325
1309
  if (!g) {
1326
- M.error("No visual to update");
1310
+ z.error("No visual to update");
1327
1311
  return;
1328
1312
  }
1329
1313
  n(!0);
1330
1314
  try {
1331
1315
  const y = h();
1332
- if (!zt(y)) {
1316
+ if (!Mt(y)) {
1333
1317
  n(!1);
1334
1318
  return;
1335
1319
  }
@@ -1347,11 +1331,11 @@ function ds({
1347
1331
  }
1348
1332
  }), c(l, N, {
1349
1333
  semanticExecutionPayload: V
1350
- }), a.invalidateQueries({ queryKey: ["visuals"] }), a.invalidateQueries({ queryKey: ["visual", g] }), M.success("Saved to library and applied locally"), setTimeout(() => {
1334
+ }), a.invalidateQueries({ queryKey: ["visuals"] }), a.invalidateQueries({ queryKey: ["visual", g] }), z.success("Saved to library and applied locally"), setTimeout(() => {
1351
1335
  d(!1);
1352
1336
  }, 300);
1353
1337
  } catch (y) {
1354
- console.error("Failed to save and apply:", y), M.error(
1338
+ console.error("Failed to save and apply:", y), z.error(
1355
1339
  y instanceof Error ? y.message : "Failed to save and apply changes"
1356
1340
  );
1357
1341
  } finally {
@@ -1443,7 +1427,7 @@ function cs({
1443
1427
  /* @__PURE__ */ r(Be, { className: "flex items-center gap-2", children: [
1444
1428
  /* @__PURE__ */ t("span", { children: "Save Visual As" }),
1445
1429
  m.badgeType !== "local" && /* @__PURE__ */ t(
1446
- wr,
1430
+ Sr,
1447
1431
  {
1448
1432
  type: m.badgeType,
1449
1433
  showLabel: !0,
@@ -1519,7 +1503,7 @@ function us() {
1519
1503
  console.error(
1520
1504
  "Failed to promote semantic metadata for saved visual:",
1521
1505
  S
1522
- ), M.error(
1506
+ ), z.error(
1523
1507
  S instanceof Error ? S.message : "Failed to prepare semantic metadata for the saved visual"
1524
1508
  );
1525
1509
  }
@@ -1530,7 +1514,7 @@ function us() {
1530
1514
  setSaveAsDialogOpen: a,
1531
1515
  handleSaveAs: async (b) => {
1532
1516
  if (!p) {
1533
- M.error("No sheet selected");
1517
+ z.error("No sheet selected");
1534
1518
  return;
1535
1519
  }
1536
1520
  const S = f(), T = S.cards.length === 1 ? {
@@ -1552,20 +1536,20 @@ function us() {
1552
1536
  console.error(
1553
1537
  "Failed to prepare semantic metadata before saving visual:",
1554
1538
  P
1555
- ), M.error(
1539
+ ), z.error(
1556
1540
  P instanceof Error ? P.message : "Failed to prepare semantic metadata for the saved visual"
1557
1541
  );
1558
1542
  return;
1559
1543
  }
1560
1544
  n(b.saveToCurrentDashboard), o(T), u(F);
1561
- const H = {
1545
+ const G = {
1562
1546
  title: b.name,
1563
1547
  description: b.description,
1564
1548
  frameObject: T,
1565
1549
  // Card title synced for single-card frames
1566
1550
  isPrivate: !1
1567
1551
  };
1568
- D.mutate(H);
1552
+ D.mutate(G);
1569
1553
  } else if (b.saveToCurrentDashboard) {
1570
1554
  const F = {
1571
1555
  ...T,
@@ -1575,15 +1559,15 @@ function us() {
1575
1559
  // Explicitly no visualId for local visuals
1576
1560
  };
1577
1561
  try {
1578
- const H = await k(T, {
1562
+ const G = await k(T, {
1579
1563
  previousFrame: rt(m, T.id)
1580
1564
  });
1581
1565
  y(p, F, {
1582
- semanticExecutionPayload: H
1583
- }), M.success("Visual saved to dashboard"), a(!1), N(!1);
1584
- } catch (H) {
1585
- console.error("Failed to save visual to dashboard:", H), M.error(
1586
- H instanceof Error ? H.message : "Failed to prepare semantic metadata for the visual"
1566
+ semanticExecutionPayload: G
1567
+ }), z.success("Visual saved to dashboard"), a(!1), N(!1);
1568
+ } catch (G) {
1569
+ console.error("Failed to save visual to dashboard:", G), z.error(
1570
+ G instanceof Error ? G.message : "Failed to prepare semantic metadata for the visual"
1587
1571
  );
1588
1572
  }
1589
1573
  }
@@ -1620,7 +1604,7 @@ function Wi(e = {}) {
1620
1604
  ] });
1621
1605
  const F = async () => {
1622
1606
  if (!l) {
1623
- M.error("No sheet selected");
1607
+ z.error("No sheet selected");
1624
1608
  return;
1625
1609
  }
1626
1610
  if (h) return;
@@ -1637,15 +1621,15 @@ function Wi(e = {}) {
1637
1621
  semanticExecutionPayload: _
1638
1622
  });
1639
1623
  } catch (_) {
1640
- console.error("Failed to apply local semantic metadata:", _), p(!1), M.error(
1624
+ console.error("Failed to apply local semantic metadata:", _), p(!1), z.error(
1641
1625
  _ instanceof Error ? _.message : "Failed to prepare semantic metadata for this visual"
1642
1626
  );
1643
1627
  return;
1644
1628
  }
1645
1629
  setTimeout(() => {
1646
- p(!1), M.success("Changes applied. Visual is now local to this dashboard"), c(!1);
1630
+ p(!1), z.success("Changes applied. Visual is now local to this dashboard"), c(!1);
1647
1631
  }, 300);
1648
- }, H = (P) => {
1632
+ }, G = (P) => {
1649
1633
  f(P), D(!0);
1650
1634
  };
1651
1635
  return /* @__PURE__ */ r(U, { children: [
@@ -1688,7 +1672,7 @@ function Wi(e = {}) {
1688
1672
  /* @__PURE__ */ r(
1689
1673
  re,
1690
1674
  {
1691
- onClick: () => H("local"),
1675
+ onClick: () => G("local"),
1692
1676
  disabled: v,
1693
1677
  children: [
1694
1678
  /* @__PURE__ */ t(be, { className: "h-3.5 w-3.5" }),
@@ -1699,10 +1683,10 @@ function Wi(e = {}) {
1699
1683
  /* @__PURE__ */ r(
1700
1684
  re,
1701
1685
  {
1702
- onClick: () => H("library"),
1686
+ onClick: () => G("library"),
1703
1687
  disabled: v,
1704
1688
  children: [
1705
- /* @__PURE__ */ t(Sr, { className: "h-3.5 w-3.5" }),
1689
+ /* @__PURE__ */ t(kr, { className: "h-3.5 w-3.5" }),
1706
1690
  "Save as Library Visual"
1707
1691
  ]
1708
1692
  }
@@ -1710,7 +1694,7 @@ function Wi(e = {}) {
1710
1694
  /* @__PURE__ */ r(
1711
1695
  re,
1712
1696
  {
1713
- onClick: () => H("both"),
1697
+ onClick: () => G("both"),
1714
1698
  disabled: v,
1715
1699
  children: [
1716
1700
  /* @__PURE__ */ t(tn, { className: "h-3.5 w-3.5" }),
@@ -1742,7 +1726,7 @@ function Wi(e = {}) {
1742
1726
  }
1743
1727
  function Qi({ className: e }) {
1744
1728
  const a = oe((h) => h.isDevMode), s = oe((h) => h.card.type), n = w((h) => h.isVisualEditing), { setIsDevMode: i } = dt(), { config: o } = Va(an).tokenProps, l = (o == null ? void 0 : o.showAdvancedMode) !== !1;
1745
- if (!n || !l || !nr(s))
1729
+ if (!n || !l || !rr(s))
1746
1730
  return null;
1747
1731
  const u = a ? Kr : Qr, c = a ? "Visual editor" : "SQL editor", d = a ? "Switch to visual editor" : "Switch to SQL editor";
1748
1732
  return /* @__PURE__ */ r(
@@ -1773,10 +1757,10 @@ function Ki() {
1773
1757
  const l = !(n.frames ?? []).length, u = (c) => {
1774
1758
  const d = i(n.id, { keepOrder: c });
1775
1759
  if (!d.ok) {
1776
- M.error(d.reason === "not_a_grid" ? "This sheet has no grid to arrange." : "The dashboard can't be arranged right now.");
1760
+ z.error(d.reason === "not_a_grid" ? "This sheet has no grid to arrange." : "The dashboard can't be arranged right now.");
1777
1761
  return;
1778
1762
  }
1779
- M("Arranged", {
1763
+ z("Arranged", {
1780
1764
  // Long enough to reach Undo after looking at the result; the default 4 seconds isn't.
1781
1765
  duration: 1e4,
1782
1766
  description: c ? "Sizes and gaps fixed on every screen size, in your order." : "KPIs on top, charts in pairs, tables full width, on every screen size.",
@@ -1784,7 +1768,7 @@ function Ki() {
1784
1768
  label: "Undo",
1785
1769
  onClick: () => {
1786
1770
  const h = o();
1787
- !h.ok && h.reason === "changed_since" && M.info("The dashboard changed after Arrange, so it can't be undone from here.");
1771
+ !h.ok && h.reason === "changed_since" && z.info("The dashboard changed after Arrange, so it can't be undone from here.");
1788
1772
  }
1789
1773
  }
1790
1774
  });
@@ -1825,7 +1809,7 @@ function Ki() {
1825
1809
  ] })
1826
1810
  ] });
1827
1811
  }
1828
- function Hi() {
1812
+ function Gi() {
1829
1813
  const e = w((i) => i.screenSizesOpen), a = w((i) => {
1830
1814
  var u, c;
1831
1815
  const o = ((u = i.dashboard) == null ? void 0 : u.sheets) ?? [], l = o.find((d) => d.id === i.selectedSheetId) ?? o[0];
@@ -1856,7 +1840,7 @@ function Hi() {
1856
1840
  }
1857
1841
  );
1858
1842
  }
1859
- function Gi({ dashboardId: e }) {
1843
+ function Hi({ dashboardId: e }) {
1860
1844
  const { openDashboardId: a, access: s, printMode: n, serverIsFavorite: i, fetchedAt: o } = w(
1861
1845
  rn((c) => {
1862
1846
  var d;
@@ -2024,7 +2008,7 @@ function Ea({
2024
2008
  working: i,
2025
2009
  problem: o
2026
2010
  }) {
2027
- const l = e.status === "ready" ? "bg-emerald-500" : e.status === "failed" ? "bg-destructive" : e.status === "cancelled" ? "bg-muted-foreground/40" : "animate-pulse bg-muted-foreground/60", u = e.status === "ready" ? Ce.ready : e.status === "failed" ? Ce.failed : e.status === "cancelled" ? Ce.cancelled : Ce.inProgress, c = Date.parse(e.startedAt), d = Gt(Date.parse(e.finishedAt ?? e.startedAt), a, { addSuffix: !0 }), h = e.status === "running" && s && a - c >= hn, p = /* @__PURE__ */ t("span", { className: "text-muted-foreground/50", children: "·" });
2011
+ const l = e.status === "ready" ? "bg-emerald-500" : e.status === "failed" ? "bg-destructive" : e.status === "cancelled" ? "bg-muted-foreground/40" : "animate-pulse bg-muted-foreground/60", u = e.status === "ready" ? Ce.ready : e.status === "failed" ? Ce.failed : e.status === "cancelled" ? Ce.cancelled : Ce.inProgress, c = Date.parse(e.startedAt), d = Ht(Date.parse(e.finishedAt ?? e.startedAt), a, { addSuffix: !0 }), h = e.status === "running" && s && a - c >= hn, p = /* @__PURE__ */ t("span", { className: "text-muted-foreground/50", children: "·" });
2028
2012
  return /* @__PURE__ */ r("div", { className: "group flex items-start gap-2.5 px-3 py-2 transition-colors hover:bg-muted/40 focus-within:bg-muted/40", children: [
2029
2013
  /* @__PURE__ */ t("span", { className: "flex h-5 shrink-0 items-center", "aria-hidden": "true", children: /* @__PURE__ */ t("span", { className: `h-1.5 w-1.5 rounded-full ${l}` }) }),
2030
2014
  /* @__PURE__ */ t("span", { className: "sr-only", children: u }),
@@ -2053,7 +2037,7 @@ function Ea({
2053
2037
  " ",
2054
2038
  p,
2055
2039
  " ",
2056
- /* @__PURE__ */ t("span", { children: Ce.started(Gt(c, a)) }),
2040
+ /* @__PURE__ */ t("span", { children: Ce.started(Ht(c, a)) }),
2057
2041
  e.running.percent !== void 0 && /* @__PURE__ */ t(mn, { value: e.running.percent, className: "mt-1.5 h-1" }),
2058
2042
  h && /* @__PURE__ */ t("div", { className: "mt-1", children: Ce.longRunning })
2059
2043
  ] }),
@@ -2095,7 +2079,7 @@ function Zi({ variant: e }) {
2095
2079
  i.setPopoverOpen(o), o && s();
2096
2080
  },
2097
2081
  children: [
2098
- i.anchorSlot && Er(
2082
+ i.anchorSlot && Ir(
2099
2083
  /* @__PURE__ */ t(Na, { asChild: !0, children: /* @__PURE__ */ t("span", { className: "absolute right-0 top-0 h-7 w-px" }) }),
2100
2084
  i.anchorSlot
2101
2085
  ),
@@ -2216,7 +2200,7 @@ function fs({
2216
2200
  // create and make consumers use `forceClose()` from a dedicated
2217
2201
  // button.
2218
2202
  dismissMode: n ? "passive" : "explicit-only"
2219
- }), m = w((v) => v.dashboard), { setDashboardControlsModel: f } = ve(), { participants: g } = yn(Tr(m)), y = Array.from(
2203
+ }), m = w((v) => v.dashboard), { setDashboardControlsModel: f } = ve(), { participants: g } = yn(Lr(m)), y = Array.from(
2220
2204
  new Map(
2221
2205
  g.flatMap(
2222
2206
  (v) => v.fieldChoices.map((T) => {
@@ -2246,7 +2230,7 @@ function fs({
2246
2230
  })
2247
2231
  )
2248
2232
  ).values()
2249
- ), k = rr({
2233
+ ), k = sr({
2250
2234
  ...m || {},
2251
2235
  controls: []
2252
2236
  }), V = Nn(m), B = (v, T, F) => {
@@ -2358,7 +2342,7 @@ function bs({
2358
2342
  }), h = w((v) => v.dashboard), p = w((v) => v.selectedSheetId), { setDashboardInputs: m } = ve(), f = (S = h.sheets) == null ? void 0 : S.find(
2359
2343
  (v) => v.id === p
2360
2344
  ), g = (f == null ? void 0 : f.kind) === "document" && !!f.document, y = Y(
2361
- () => g && (f != null && f.document) ? sr(h, f.id) : [],
2345
+ () => g && (f != null && f.document) ? ir(h, f.id) : [],
2362
2346
  [h, g, f == null ? void 0 : f.document, f == null ? void 0 : f.id]
2363
2347
  ), N = Y(
2364
2348
  () => y.filter(
@@ -2483,7 +2467,7 @@ function Ns({
2483
2467
  if (!g)
2484
2468
  continue;
2485
2469
  c.add(g.id);
2486
- const y = ir(
2470
+ const y = or(
2487
2471
  e,
2488
2472
  { name: g.id },
2489
2473
  { exclude: { source: "input", inputId: f.id }, alsoTaken: d }
@@ -2498,7 +2482,7 @@ function Ns({
2498
2482
  }
2499
2483
  for (const f of l.values())
2500
2484
  c.has(f.id) || d.push(
2501
- or({
2485
+ lr({
2502
2486
  control: f,
2503
2487
  dashboard: e,
2504
2488
  alsoTaken: d,
@@ -2548,7 +2532,7 @@ function Cs({
2548
2532
  l
2549
2533
  ),
2550
2534
  children: [
2551
- e ? /* @__PURE__ */ t(kr, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ t(xa, { className: "h-3.5 w-3.5" }),
2535
+ e ? /* @__PURE__ */ t(Dr, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ t(xa, { className: "h-3.5 w-3.5" }),
2552
2536
  "Filter"
2553
2537
  ]
2554
2538
  }
@@ -2600,7 +2584,7 @@ function Cs({
2600
2584
  );
2601
2585
  }
2602
2586
  function ws() {
2603
- Dr();
2587
+ Ar();
2604
2588
  const e = w((c) => c.selectedSheetId), a = w((c) => c.selectedFrameId), s = w((c) => c.dashboard), n = w((c) => c.actions.getSelectedFrame), { setSelectedFrameId: i } = ve(), { setCard: o } = dt(), l = oe((c) => c.card.dataSource);
2605
2589
  return Ee(() => {
2606
2590
  var d, h;
@@ -2623,22 +2607,22 @@ function Ss() {
2623
2607
  ), s = w(
2624
2608
  (c) => c.actions.addFilterInput
2625
2609
  ), { hasEntities: n } = ws(), { isLoading: i } = wn(), o = Y(
2626
- () => lr(e, a),
2610
+ () => dr(e, a),
2627
2611
  [e, a]
2628
- ), u = !dr(e) && o.hasEligibleCards && !i;
2612
+ ), u = !cr(e) && o.hasEligibleCards && !i;
2629
2613
  return /* @__PURE__ */ r("div", { className: "flex h-[520px] w-[400px] flex-col", children: [
2630
2614
  u && /* @__PURE__ */ t("div", { className: "border-b border-border/60 p-2", children: /* @__PURE__ */ r(
2631
2615
  "button",
2632
2616
  {
2633
2617
  type: "button",
2634
- onClick: () => s(cr(), {
2618
+ onClick: () => s(ur(), {
2635
2619
  kind: "allSheets",
2636
2620
  sheetKinds: ["dashboard"]
2637
2621
  }),
2638
2622
  title: `Applies to ${o.eligibleCardCount} of ${o.totalCardCount} date-aware cards`,
2639
2623
  className: "flex w-full items-start gap-2 rounded-control px-2 py-1.5 text-left outline-none transition-colors hover:bg-muted/40 focus-visible:bg-muted/40 focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-border",
2640
2624
  children: [
2641
- /* @__PURE__ */ t(Wr, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
2625
+ /* @__PURE__ */ t(Sn, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
2642
2626
  /* @__PURE__ */ r("span", { className: "flex min-w-0 flex-col", children: [
2643
2627
  /* @__PURE__ */ t("span", { className: "text-[12px] font-medium text-foreground", children: "Add global date filter" }),
2644
2628
  /* @__PURE__ */ t("span", { className: "text-[11px] leading-[1.4] text-muted-foreground", children: "One date range across all date-aware cards." })
@@ -2647,11 +2631,11 @@ function Ss() {
2647
2631
  }
2648
2632
  ) }),
2649
2633
  !n && /* @__PURE__ */ r("div", { className: "flex flex-1 flex-col items-center justify-center px-6 py-8 text-center", children: [
2650
- /* @__PURE__ */ t(Sn, { className: "mb-3 h-10 w-10 text-muted-foreground/50" }),
2634
+ /* @__PURE__ */ t(kn, { className: "mb-3 h-10 w-10 text-muted-foreground/50" }),
2651
2635
  /* @__PURE__ */ t("h3", { className: "mb-1 text-[13px] font-medium text-foreground", children: "No fields configured" }),
2652
2636
  /* @__PURE__ */ t("p", { className: "text-[11px] text-muted-foreground", children: "Configure a data source for this card to enable filtering." })
2653
2637
  ] }),
2654
- n && /* @__PURE__ */ t("div", { className: "flex flex-1 overflow-hidden", children: /* @__PURE__ */ t(kn, { context: "filter" }) })
2638
+ n && /* @__PURE__ */ t("div", { className: "flex flex-1 overflow-hidden", children: /* @__PURE__ */ t(Dn, { context: "filter" }) })
2655
2639
  ] });
2656
2640
  }
2657
2641
  function ks({
@@ -2834,10 +2818,10 @@ function eo({
2834
2818
  }
2835
2819
  function As(e, a) {
2836
2820
  return (e.variables ?? []).map((s) => {
2837
- const n = Lr(e, s.id);
2821
+ const n = Vr(e, s.id);
2838
2822
  return {
2839
2823
  variable: s,
2840
- question: Pr(s),
2824
+ question: _r(s),
2841
2825
  places: n,
2842
2826
  usedHere: !!a && n.some((i) => i.sheetId === a)
2843
2827
  };
@@ -2964,11 +2948,11 @@ function ao() {
2964
2948
  ] });
2965
2949
  }
2966
2950
  function Is(e, a) {
2967
- const s = ur(e);
2951
+ const s = hr(e);
2968
2952
  return new Set(
2969
2953
  (e.sheets ?? []).map((i) => {
2970
2954
  const o = { sheetId: i.id, cardId: a, sheetKind: Ke(i) ? "document" : "dashboard" };
2971
- return s.filter((l) => Vr(l, o)).map((l) => l.runtimeScope === "shared" ? l.id : `${l.id}@${i.id}`).join(`
2955
+ return s.filter((l) => Br(l, o)).map((l) => l.runtimeScope === "shared" ? l.id : `${l.id}@${i.id}`).join(`
2972
2956
  `);
2973
2957
  })
2974
2958
  ).size > 1;
@@ -2981,10 +2965,10 @@ function vt(e) {
2981
2965
  }
2982
2966
  function Ls(e) {
2983
2967
  const a = e == null ? void 0 : e.type;
2984
- return a === "dataset" || a === "model" || mr.includes(a);
2968
+ return a === "dataset" || a === "model" || pr.includes(a);
2985
2969
  }
2986
2970
  function Vs(e, a) {
2987
- return _r(
2971
+ return Or(
2988
2972
  e.map((s, n) => {
2989
2973
  var i, o;
2990
2974
  return {
@@ -3023,10 +3007,10 @@ function Bs(e) {
3023
3007
  };
3024
3008
  },
3025
3009
  [l]
3026
- ), { fields: d, isLoading: h, error: p } = Dn({
3010
+ ), { fields: d, isLoading: h, error: p } = An({
3027
3011
  queries: l.map((m) => ({
3028
3012
  queryKey: ["columns", i, m, (e == null ? void 0 : e.semanticDomainId) ?? null],
3029
- queryFn: () => hr(
3013
+ queryFn: () => mr(
3030
3014
  `${a.apiServiceUrl}/v1/columns`,
3031
3015
  (s == null ? void 0 : s.accessToken) || "",
3032
3016
  m.type === "model" ? vt({
@@ -3063,7 +3047,7 @@ function Ps(e) {
3063
3047
  return a && a.kind !== "target" ? { mode: "period", spec: a } : { mode: "off" };
3064
3048
  }
3065
3049
  function _s(e) {
3066
- return e.mode === "period" ? fr(e.spec) : void 0;
3050
+ return e.mode === "period" ? gr(e.spec) : void 0;
3067
3051
  }
3068
3052
  const Rt = "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", Os = {
3069
3053
  connectionId: "",
@@ -3107,13 +3091,13 @@ function yt({
3107
3091
  }
3108
3092
  );
3109
3093
  }
3110
- function Ms(e) {
3094
+ function zs(e) {
3111
3095
  var s;
3112
3096
  const a = (s = e == null ? void 0 : e.selectedEntities) == null ? void 0 : s[0];
3113
3097
  if (a)
3114
3098
  return a.label || a.name;
3115
3099
  }
3116
- function zs(e) {
3100
+ function Ms(e) {
3117
3101
  const a = Ot(e);
3118
3102
  return a === "date" ? "date" : a === "string" ? "text" : a === "number" ? "number" : a === "boolean" ? "yes/no" : a;
3119
3103
  }
@@ -3124,7 +3108,7 @@ function Rs({
3124
3108
  handle: s,
3125
3109
  onCalculatedFieldOpenChange: n
3126
3110
  }) {
3127
- var _, te, Z, G, I, ae, j, z, ne, ue, he, ye;
3111
+ var _, te, Z, H, I, ae, j, M, ne, ue, he, ye;
3128
3112
  const { tokenProps: i } = $e(), o = ((_ = i.config) == null ? void 0 : _.showAdvancedMode) !== !1, l = ((te = i.config) == null ? void 0 : te.showDirectSource) !== !1, { connections: u } = va(), [c, d] = E(!1), [h, p] = E(!1), [m, f] = E(!1), g = (x) => {
3129
3113
  p(x), n == null || n(x);
3130
3114
  }, { fields: y, isLoading: N, error: k } = Bs(e.mode === "data" ? e.dataSource : void 0), V = [...e.calculatedFields ?? [], ...y], B = (x) => x && (V.find((R) => R.id === x.id) ?? V.find((R) => Us(R, x))), D = [
@@ -3132,8 +3116,8 @@ function Rs({
3132
3116
  ...[e.field, e.sortField].filter(
3133
3117
  (x) => !!x && !B(x) && !V.some((R) => R.id === x.id)
3134
3118
  )
3135
- ], O = ((Z = B(e.field)) == null ? void 0 : Z.id) ?? ((G = e.field) == null ? void 0 : G.id) ?? "", b = ((I = B(e.sortField ?? e.field)) == null ? void 0 : I.id) ?? ((ae = e.sortField ?? e.field) == null ? void 0 : ae.id) ?? "", S = (x) => a({ ...e, ...x }), v = Ms(e.dataSource), T = ((j = e.dataSource) == null ? void 0 : j.mode) === "database" ? Bt : jt, F = "mt-1 inline-flex items-center gap-1 text-[11px] font-medium text-muted-foreground underline-offset-2 hover:text-foreground hover:underline", H = {
3136
- connectionId: ((z = e.dataSource) == null ? void 0 : z.connectionId) || e.connectionId,
3119
+ ], O = ((Z = B(e.field)) == null ? void 0 : Z.id) ?? ((H = e.field) == null ? void 0 : H.id) ?? "", b = ((I = B(e.sortField ?? e.field)) == null ? void 0 : I.id) ?? ((ae = e.sortField ?? e.field) == null ? void 0 : ae.id) ?? "", S = (x) => a({ ...e, ...x }), v = zs(e.dataSource), T = ((j = e.dataSource) == null ? void 0 : j.mode) === "database" ? Bt : jt, F = "mt-1 inline-flex items-center gap-1 text-[11px] font-medium text-muted-foreground underline-offset-2 hover:text-foreground hover:underline", G = {
3120
+ connectionId: ((M = e.dataSource) == null ? void 0 : M.connectionId) || e.connectionId,
3137
3121
  dataSource: e.dataSource,
3138
3122
  config: e.conditions ? { filters: e.conditions } : {},
3139
3123
  cardType: "text"
@@ -3148,14 +3132,14 @@ function Rs({
3148
3132
  S({ field: R, get: $ ? e.get : Xt(R) });
3149
3133
  };
3150
3134
  return h ? /* @__PURE__ */ t(
3151
- An,
3135
+ Fn,
3152
3136
  {
3153
3137
  inline: !0,
3154
3138
  open: !0,
3155
3139
  onOpenChange: g,
3156
3140
  availableFields: D,
3157
3141
  cardId: e.id,
3158
- source: H,
3142
+ source: G,
3159
3143
  onSave: (x) => {
3160
3144
  const R = { ...x, fieldScope: x.fieldScope ?? "card" };
3161
3145
  S({
@@ -3187,13 +3171,13 @@ function Rs({
3187
3171
  e.mode === "sql" ? /* @__PURE__ */ r(U, { children: [
3188
3172
  /* @__PURE__ */ r(se, { label: "Connection", children: [
3189
3173
  /* @__PURE__ */ r(
3190
- Se,
3174
+ we,
3191
3175
  {
3192
3176
  value: e.connectionId ?? "",
3193
3177
  onValueChange: (x) => S({ connectionId: x }),
3194
3178
  children: [
3195
- /* @__PURE__ */ t(ke, { size: "xs", "aria-label": "Connection", children: /* @__PURE__ */ t(De, { placeholder: "Choose a connection" }) }),
3196
- /* @__PURE__ */ t(Ae, { children: u.map((x) => /* @__PURE__ */ t(fe, { value: x.id, children: x.name }, x.id)) })
3179
+ /* @__PURE__ */ t(Se, { size: "xs", "aria-label": "Connection", children: /* @__PURE__ */ t(ke, { placeholder: "Choose a connection" }) }),
3180
+ /* @__PURE__ */ t(De, { children: u.map((x) => /* @__PURE__ */ t(fe, { value: x.id, children: x.name }, x.id)) })
3197
3181
  ]
3198
3182
  }
3199
3183
  ),
@@ -3221,13 +3205,13 @@ function Rs({
3221
3205
  }
3222
3206
  ),
3223
3207
  /* @__PURE__ */ t(se, { label: "Get", children: /* @__PURE__ */ r(
3224
- Se,
3208
+ we,
3225
3209
  {
3226
3210
  value: e.get === "first" ? "first" : "only",
3227
3211
  onValueChange: (x) => S({ get: x }),
3228
3212
  children: [
3229
- /* @__PURE__ */ t(ke, { size: "xs", "aria-label": "Get", children: /* @__PURE__ */ t(De, {}) }),
3230
- /* @__PURE__ */ r(Ae, { children: [
3213
+ /* @__PURE__ */ t(Se, { size: "xs", "aria-label": "Get", children: /* @__PURE__ */ t(ke, {}) }),
3214
+ /* @__PURE__ */ r(De, { children: [
3231
3215
  /* @__PURE__ */ t(fe, { value: "only", children: "The only row" }),
3232
3216
  /* @__PURE__ */ t(fe, { value: "first", children: "The first row" })
3233
3217
  ] })
@@ -3245,12 +3229,12 @@ function Rs({
3245
3229
  var x;
3246
3230
  return S({ mode: "sql", connectionId: ((x = e.dataSource) == null ? void 0 : x.connectionId) || e.connectionId });
3247
3231
  }, className: F, children: [
3248
- /* @__PURE__ */ t(Gr, { className: "h-3 w-3", "aria-hidden": !0 }),
3232
+ /* @__PURE__ */ t(Hr, { className: "h-3 w-3", "aria-hidden": !0 }),
3249
3233
  " Write SQL instead"
3250
3234
  ] }) : null
3251
3235
  ] }),
3252
3236
  /* @__PURE__ */ t(
3253
- Ar,
3237
+ Fr,
3254
3238
  {
3255
3239
  open: c,
3256
3240
  onOpenChange: d,
@@ -3266,14 +3250,14 @@ function Rs({
3266
3250
  }
3267
3251
  ),
3268
3252
  /* @__PURE__ */ r("div", { className: "grid grid-cols-2 gap-3", children: [
3269
- /* @__PURE__ */ t(se, { label: "Field", children: v ? /* @__PURE__ */ r(Se, { value: O, onValueChange: X, disabled: N && !D.length, children: [
3270
- /* @__PURE__ */ t(ke, { size: "xs", "aria-label": "Field", children: /* @__PURE__ */ t(De, { placeholder: N ? "Loading fields…" : k ? "Fields unavailable" : "Choose a field" }) }),
3271
- /* @__PURE__ */ r(Ae, { children: [
3253
+ /* @__PURE__ */ t(se, { label: "Field", children: v ? /* @__PURE__ */ r(we, { value: O, onValueChange: X, disabled: N && !D.length, children: [
3254
+ /* @__PURE__ */ t(Se, { size: "xs", "aria-label": "Field", children: /* @__PURE__ */ t(ke, { placeholder: N ? "Loading fields…" : k ? "Fields unavailable" : "Choose a field" }) }),
3255
+ /* @__PURE__ */ r(De, { children: [
3272
3256
  D.map((x) => /* @__PURE__ */ t(fe, { value: x.id, children: /* @__PURE__ */ r("span", { className: "flex items-center gap-2", children: [
3273
3257
  /* @__PURE__ */ t("span", { children: x.label || x.name }),
3274
- /* @__PURE__ */ t("span", { className: "text-muted-foreground", children: zs(x.dataType) })
3258
+ /* @__PURE__ */ t("span", { className: "text-muted-foreground", children: Ms(x.dataType) })
3275
3259
  ] }) }, x.id)),
3276
- /* @__PURE__ */ t(er, {}),
3260
+ /* @__PURE__ */ t(tr, {}),
3277
3261
  /* @__PURE__ */ t(fe, { value: oa, children: /* @__PURE__ */ r("span", { className: "flex items-center gap-1.5", children: [
3278
3262
  /* @__PURE__ */ t(be, { className: "h-3 w-3", "aria-hidden": !0 }),
3279
3263
  " New calculated field…"
@@ -3281,26 +3265,26 @@ function Rs({
3281
3265
  ] })
3282
3266
  ] }) : /* @__PURE__ */ t(yt, { muted: !0, children: "Choose a source first" }) }),
3283
3267
  /* @__PURE__ */ t(se, { label: "Get", children: /* @__PURE__ */ r(
3284
- Se,
3268
+ we,
3285
3269
  {
3286
3270
  value: e.get,
3287
3271
  onValueChange: (x) => S({ get: x }),
3288
3272
  disabled: !e.field,
3289
3273
  children: [
3290
- /* @__PURE__ */ t(ke, { size: "xs", "aria-label": "Get", children: /* @__PURE__ */ t(De, {}) }),
3291
- /* @__PURE__ */ t(Ae, { children: P.map((x) => /* @__PURE__ */ t(fe, { value: x.value, children: x.label }, x.value)) })
3274
+ /* @__PURE__ */ t(Se, { size: "xs", "aria-label": "Get", children: /* @__PURE__ */ t(ke, {}) }),
3275
+ /* @__PURE__ */ t(De, { children: P.map((x) => /* @__PURE__ */ t(fe, { value: x.value, children: x.label }, x.value)) })
3292
3276
  ]
3293
3277
  }
3294
3278
  ) }),
3295
3279
  e.field && Q ? /* @__PURE__ */ t("p", { className: "col-span-2 -mt-1.5 text-[11px] leading-4 text-muted-foreground", children: Q }) : null,
3296
3280
  k ? /* @__PURE__ */ t("p", { className: "col-span-2 -mt-1.5 text-[11px] leading-4 text-destructive", children: k }) : null,
3297
- Or(e) ? /* @__PURE__ */ t(
3281
+ zr(e) ? /* @__PURE__ */ t(
3298
3282
  se,
3299
3283
  {
3300
3284
  label: "Compare with",
3301
3285
  className: "col-span-2",
3302
3286
  children: /* @__PURE__ */ t(
3303
- Fn,
3287
+ En,
3304
3288
  {
3305
3289
  controlLabel: "Variable",
3306
3290
  selection: Ps(e),
@@ -3311,7 +3295,7 @@ function Rs({
3311
3295
  ) : null,
3312
3296
  e.field && !Mr(e.get) && e.get !== "only" ? /* @__PURE__ */ r("div", { className: J("col-span-2 grid gap-3", e.get === "list" ? "grid-cols-3" : "grid-cols-2"), children: [
3313
3297
  /* @__PURE__ */ t(se, { label: "Order by", children: /* @__PURE__ */ r(
3314
- Se,
3298
+ we,
3315
3299
  {
3316
3300
  value: `${b}|${e.sortDirection}`,
3317
3301
  onValueChange: (x) => {
@@ -3319,8 +3303,8 @@ function Rs({
3319
3303
  S({ sortField: D.find((le) => le.id === $), sortDirection: K });
3320
3304
  },
3321
3305
  children: [
3322
- /* @__PURE__ */ t(ke, { size: "xs", "aria-label": "Order by", children: /* @__PURE__ */ t(De, {}) }),
3323
- /* @__PURE__ */ t(Ae, { children: D.flatMap(
3306
+ /* @__PURE__ */ t(Se, { size: "xs", "aria-label": "Order by", children: /* @__PURE__ */ t(ke, {}) }),
3307
+ /* @__PURE__ */ t(De, { children: D.flatMap(
3324
3308
  (x) => ["asc", "desc"].map((R) => /* @__PURE__ */ r(fe, { value: `${x.id}|${R}`, children: [
3325
3309
  x.label || x.name,
3326
3310
  ", ",
@@ -3352,7 +3336,7 @@ function Rs({
3352
3336
  {
3353
3337
  size: "xs",
3354
3338
  value: e.listSeparator ?? ", ",
3355
- maxLength: pr,
3339
+ maxLength: fr,
3356
3340
  onChange: (x) => S({ listSeparator: x.target.value }),
3357
3341
  className: "font-mono",
3358
3342
  "aria-label": "Separator"
@@ -3365,11 +3349,11 @@ function Rs({
3365
3349
  // In place, not a dialog over the dialog: each edit is the draft's, and
3366
3350
  // Cancel or Done here keeps or drops it. A new source starts a new list.
3367
3351
  /* @__PURE__ */ t(
3368
- Fr,
3352
+ Er,
3369
3353
  {
3370
3354
  filters: e.conditions ?? null,
3371
3355
  availableFields: D,
3372
- source: H,
3356
+ source: G,
3373
3357
  onChange: (x) => S({ conditions: x })
3374
3358
  },
3375
3359
  JSON.stringify(((ye = e.dataSource) == null ? void 0 : ye.selectedEntities) ?? null)
@@ -3436,9 +3420,9 @@ function Qs({
3436
3420
  onClose: a,
3437
3421
  onHoldEscape: s
3438
3422
  }) {
3439
- var Z, G;
3423
+ var Z, H;
3440
3424
  const n = w((I) => I.dashboard), i = w((I) => I.selectedSheetId), o = w((I) => I.actions.saveVariableChange), [l, u] = E(
3441
- () => e ? zr(e) : Rr()
3425
+ () => e ? Rr(e) : Ur()
3442
3426
  ), [c, d] = E("data"), [h, p] = E(!1), m = (I) => {
3443
3427
  p(I), s == null || s(I);
3444
3428
  }, [f, g] = E([]), [y, N] = E(null), k = !e, V = Ws(l), B = Y(
@@ -3460,23 +3444,23 @@ function Qs({
3460
3444
  variables: [...(n.variables ?? []).filter((I) => I.id !== v.id), v]
3461
3445
  }),
3462
3446
  [n, v]
3463
- ), F = Ur(l), H = ct(), P = w((I) => I.actions.mergeSemanticExecutionPayload), [Q, X] = E(!1), _ = async () => {
3447
+ ), F = $r(l), G = ct(), P = w((I) => I.actions.mergeSemanticExecutionPayload), [Q, X] = E(!1), _ = async () => {
3464
3448
  const I = Jt(l, n);
3465
3449
  X(!0);
3466
3450
  let ae;
3467
3451
  try {
3468
- const z = yr(n, e ? { kind: "update", id: e.id, patch: I } : { kind: "add", variable: I });
3469
- if (!z.ok) {
3470
- X(!1), g(z.issues);
3452
+ const M = Nr(n, e ? { kind: "update", id: e.id, patch: I } : { kind: "add", variable: I });
3453
+ if (!M.ok) {
3454
+ X(!1), g(M.issues);
3471
3455
  return;
3472
3456
  }
3473
- const [ne] = z.queryFrames;
3474
- ae = ne ? await H(ne, e ? { previousFrame: Nr(n, e) } : void 0) : { domainsById: {} };
3475
- } catch (z) {
3457
+ const [ne] = M.queryFrames;
3458
+ ae = ne ? await G(ne, e ? { previousFrame: Cr(n, e) } : void 0) : { domainsById: {} };
3459
+ } catch (M) {
3476
3460
  X(!1), g([
3477
3461
  {
3478
3462
  code: "queryMissing",
3479
- message: z instanceof Error && z.message ? z.message : "The data source's details could not be loaded.",
3463
+ message: M instanceof Error && M.message ? M.message : "The data source's details could not be loaded.",
3480
3464
  fix: "Try again, or choose the source again."
3481
3465
  }
3482
3466
  ]);
@@ -3494,7 +3478,7 @@ function Qs({
3494
3478
  if (!e) return;
3495
3479
  const ae = o({ kind: "remove", id: e.id, confirmed: I });
3496
3480
  if (!ae.ok) {
3497
- const j = ae.issues.find((z) => z.code === "inUse");
3481
+ const j = ae.issues.find((M) => M.code === "inUse");
3498
3482
  if (j && !I) {
3499
3483
  N(j);
3500
3484
  return;
@@ -3559,7 +3543,7 @@ function Qs({
3559
3543
  onCalculatedFieldOpenChange: m
3560
3544
  }
3561
3545
  ) : null,
3562
- c === "filters" ? /* @__PURE__ */ t(Hs, { draft: l, draftDashboard: T }) : null,
3546
+ c === "filters" ? /* @__PURE__ */ t(Gs, { draft: l, draftDashboard: T }) : null,
3563
3547
  c === "display" ? /* @__PURE__ */ t(Xs, { draft: l, onChange: u }) : null
3564
3548
  ] }),
3565
3549
  h ? null : /* @__PURE__ */ r(U, { children: [
@@ -3584,7 +3568,7 @@ function Qs({
3584
3568
  " Used in ",
3585
3569
  ((Z = y.places) == null ? void 0 : Z.length) ?? 0,
3586
3570
  " ",
3587
- ((G = y.places) == null ? void 0 : G.length) === 1 ? "place" : "places",
3571
+ ((H = y.places) == null ? void 0 : H.length) === 1 ? "place" : "places",
3588
3572
  ". Its chips then read as missing."
3589
3573
  ] }),
3590
3574
  /* @__PURE__ */ r("div", { className: "mt-1.5 flex gap-1.5", children: [
@@ -3623,10 +3607,10 @@ function Ks(e) {
3623
3607
  emptyText: s.emptyText
3624
3608
  };
3625
3609
  }
3626
- function Hs({ draft: e, draftDashboard: a }) {
3627
- const s = Y(() => gr(a), [a]), n = s.inputs.filter(
3610
+ function Gs({ draft: e, draftDashboard: a }) {
3611
+ const s = Y(() => br(a), [a]), n = s.inputs.filter(
3628
3612
  (o) => s.reachedVariables({ inputId: o.input.id }).some((l) => l.variableId === e.id)
3629
- ), i = e.mode === "sql" && br(e.sql);
3613
+ ), i = e.mode === "sql" && xr(e.sql);
3630
3614
  return n.length ? /* @__PURE__ */ r("div", { className: "divide-y divide-border/60", children: [
3631
3615
  /* @__PURE__ */ t("p", { className: "px-4 py-2 text-[11px] leading-4 text-muted-foreground", children: "How each filter applies here. Change a mapping on the filter's Cards tab, under Variables." }),
3632
3616
  n.map((o) => {
@@ -3635,14 +3619,14 @@ function Hs({ draft: e, draftDashboard: a }) {
3635
3619
  return /* @__PURE__ */ r("div", { className: "flex items-center justify-between gap-3 px-4 py-2 text-[12px]", children: [
3636
3620
  /* @__PURE__ */ r("span", { className: "min-w-0", children: [
3637
3621
  /* @__PURE__ */ t("span", { className: "block truncate font-medium text-foreground", children: o.input.label || o.input.filter.title }),
3638
- /* @__PURE__ */ t("span", { className: "block truncate text-[11px] text-muted-foreground", children: Gs(o.input.scope) })
3622
+ /* @__PURE__ */ t("span", { className: "block truncate text-[11px] text-muted-foreground", children: Hs(o.input.scope) })
3639
3623
  ] }),
3640
3624
  /* @__PURE__ */ t("span", { className: J("shrink-0 text-[11px]", u === "Don't apply" || u === "Not named in the SQL" ? "text-muted-foreground" : "text-foreground"), children: u })
3641
3625
  ] }, o.input.id);
3642
3626
  })
3643
3627
  ] }) : /* @__PURE__ */ t("p", { className: "px-4 py-6 text-center text-[12px] text-muted-foreground", children: "No filter reaches this variable. A filter on the tabs or Documents where it is used reaches it; a variable used nowhere yet follows every tab's filters." });
3644
3628
  }
3645
- function Gs(e) {
3629
+ function Hs(e) {
3646
3630
  switch (e.kind) {
3647
3631
  case "allSheets":
3648
3632
  return "On every tab";
@@ -3663,12 +3647,12 @@ const Ys = [
3663
3647
  ];
3664
3648
  function Xs({ draft: e, onChange: a }) {
3665
3649
  var u, c;
3666
- const s = e.mode === "sql" ? "unknown" : Ot((u = e.field) == null ? void 0 : u.dataType), n = (c = e.presentation) == null ? void 0 : c.temporal, i = n ? n.mode === "style" ? n.dateStyle : n.mode === "pattern" ? "pattern" : "auto" : "auto", o = (n == null ? void 0 : n.mode) === "pattern" ? Ir(n.pattern) : null, l = (d) => a({ ...e, presentation: d && Object.keys(d).length ? d : void 0 });
3650
+ const s = e.mode === "sql" ? "unknown" : Ot((u = e.field) == null ? void 0 : u.dataType), n = (c = e.presentation) == null ? void 0 : c.temporal, i = n ? n.mode === "style" ? n.dateStyle : n.mode === "pattern" ? "pattern" : "auto" : "auto", o = (n == null ? void 0 : n.mode) === "pattern" ? Tr(n.pattern) : null, l = (d) => a({ ...e, presentation: d && Object.keys(d).length ? d : void 0 });
3667
3651
  return /* @__PURE__ */ r(U, { children: [
3668
3652
  s === "date" || s === "unknown" ? /* @__PURE__ */ r(se, { label: "Dates read as", hint: "A chip can change this for itself.", children: [
3669
3653
  /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
3670
3654
  /* @__PURE__ */ r(
3671
- Se,
3655
+ we,
3672
3656
  {
3673
3657
  value: i,
3674
3658
  onValueChange: (d) => l({
@@ -3676,8 +3660,8 @@ function Xs({ draft: e, onChange: a }) {
3676
3660
  temporal: d === "auto" ? void 0 : d === "pattern" ? { mode: "pattern", dialect: "semaphor_tokens", pattern: (n == null ? void 0 : n.mode) === "pattern" ? n.pattern : "MMM D, YYYY" } : { mode: "style", dateStyle: d }
3677
3661
  }),
3678
3662
  children: [
3679
- /* @__PURE__ */ t(ke, { size: "xs", className: "w-44", "aria-label": "Date style", children: /* @__PURE__ */ t(De, {}) }),
3680
- /* @__PURE__ */ t(Ae, { children: Ys.map((d) => /* @__PURE__ */ t(fe, { value: d.value, children: d.label }, d.value)) })
3663
+ /* @__PURE__ */ t(Se, { size: "xs", className: "w-44", "aria-label": "Date style", children: /* @__PURE__ */ t(ke, {}) }),
3664
+ /* @__PURE__ */ t(De, { children: Ys.map((d) => /* @__PURE__ */ t(fe, { value: d.value, children: d.label }, d.value)) })
3681
3665
  ]
3682
3666
  }
3683
3667
  ),
@@ -3694,7 +3678,7 @@ function Xs({ draft: e, onChange: a }) {
3694
3678
  ] }),
3695
3679
  o ? /* @__PURE__ */ t("p", { className: "mt-1 text-[11px] text-destructive", children: o }) : null
3696
3680
  ] }) : null,
3697
- s === "number" || s === "unknown" ? /* @__PURE__ */ t(se, { label: "Numbers read as", hint: "A chip can change any of these for itself.", children: /* @__PURE__ */ t(En, { value: e.presentation, onChange: l }) }) : null,
3681
+ s === "number" || s === "unknown" ? /* @__PURE__ */ t(se, { label: "Numbers read as", hint: "A chip can change any of these for itself.", children: /* @__PURE__ */ t(In, { value: e.presentation, onChange: l }) }) : null,
3698
3682
  /* @__PURE__ */ t(
3699
3683
  se,
3700
3684
  {
@@ -3705,7 +3689,7 @@ function Xs({ draft: e, onChange: a }) {
3705
3689
  {
3706
3690
  size: "xs",
3707
3691
  value: e.emptyText ?? "",
3708
- maxLength: xr,
3692
+ maxLength: vr,
3709
3693
  onChange: (d) => a({ ...e, emptyText: d.target.value || void 0 }),
3710
3694
  placeholder: "Show nothing",
3711
3695
  className: "w-72",
@@ -3727,13 +3711,13 @@ function Js({
3727
3711
  const o = s.sheets ?? [], l = Y(() => Is(s, a.id), [s, a.id]), [u, c] = E(void 0), d = (l ? u : void 0) ?? i ?? ((S = o[0]) == null ? void 0 : S.id), h = o.find((v) => v.id === d), p = w((v) => d ? v.documentSectionRuntimeBySheetId[d] : void 0), m = !!(h && Ke(h)), f = Y(
3728
3712
  () => d ? m ? p ? { kind: "document", sheetId: d, runtime: p } : void 0 : { kind: "sheet", sheetId: d } : void 0,
3729
3713
  [m, p, d]
3730
- ), g = Y(() => n || !f ? [] : [a], [n, a, f]), N = In({
3714
+ ), g = Y(() => n || !f ? [] : [a], [n, a, f]), N = Tn({
3731
3715
  dashboard: s,
3732
3716
  place: f ?? { kind: "sheet", sheetId: d ?? "" },
3733
3717
  purpose: "preview",
3734
3718
  variables: g
3735
- }).byId.get(a.id), k = Tn(), V = Ln(), B = Y(
3736
- () => vr({ preferences: k, calendar: V }),
3719
+ }).byId.get(a.id), k = Ln(), V = Vn(), B = Y(
3720
+ () => yr({ preferences: k, calendar: V }),
3737
3721
  [V, k]
3738
3722
  );
3739
3723
  let D, O = "", b = null;
@@ -3753,7 +3737,7 @@ function Js({
3753
3737
  "No change on ",
3754
3738
  T,
3755
3739
  ". ",
3756
- Vn(v.unavailable, "variable")
3740
+ Bn(v.unavailable, "variable")
3757
3741
  ] })
3758
3742
  ] });
3759
3743
  }
@@ -3761,9 +3745,9 @@ function Js({
3761
3745
  return /* @__PURE__ */ r("div", { className: "shrink-0 border-t border-border/60 bg-muted/30 px-4 py-2.5", "data-testid": "variable-preview", children: [
3762
3746
  /* @__PURE__ */ r("div", { className: "flex items-center gap-3", children: [
3763
3747
  /* @__PURE__ */ t("span", { className: Rt, children: l ? "Preview on" : "Preview" }),
3764
- l ? /* @__PURE__ */ r(Se, { value: d ?? "", onValueChange: c, disabled: !!n, children: [
3765
- /* @__PURE__ */ t(ke, { size: "xs", className: "h-6 w-auto gap-1.5 px-2 text-[12px]", "aria-label": "Preview place", children: /* @__PURE__ */ t(De, {}) }),
3766
- /* @__PURE__ */ t(Ae, { children: o.map((v) => /* @__PURE__ */ t(fe, { value: v.id, children: v.title || v.id }, v.id)) })
3748
+ l ? /* @__PURE__ */ r(we, { value: d ?? "", onValueChange: c, disabled: !!n, children: [
3749
+ /* @__PURE__ */ t(Se, { size: "xs", className: "h-6 w-auto gap-1.5 px-2 text-[12px]", "aria-label": "Preview place", children: /* @__PURE__ */ t(ke, {}) }),
3750
+ /* @__PURE__ */ t(De, { children: o.map((v) => /* @__PURE__ */ t(fe, { value: v.id, children: v.title || v.id }, v.id)) })
3767
3751
  ] }) : null,
3768
3752
  /* @__PURE__ */ t("div", { className: "min-w-0 flex-1 truncate text-right text-[13px]", children: D })
3769
3753
  ] }),
@@ -3779,7 +3763,7 @@ function Zs(e, a, s) {
3779
3763
  ] }), o = (h) => h === void 0 ? "" : h === "beyondCap" ? `more than ${st} match` : `${h} ${h === 1 ? "match" : "matches"}`, l = "filterReach" in a ? a.filterReach : [], u = l.filter((h) => h.status === "applied").length, c = l.length - u, d = l.length ? ` · ${u} ${u === 1 ? "filter" : "filters"} applied${c ? `, ${c} skipped` : ""}` : "";
3780
3764
  switch (a.status) {
3781
3765
  case "answered": {
3782
- const h = Br(e, Object.keys(a.parts))[0], p = h ? a.parts[h] : void 0, m = p && Ht(p, e.presentation, s) || "(empty)", f = `${o(a.matched)}${d}`.replace(/^ · /, ""), g = Cr(e, a, s);
3766
+ const h = Pr(e, Object.keys(a.parts))[0], p = h ? a.parts[h] : void 0, m = p && Gt(p, e.presentation, s) || "(empty)", f = `${o(a.matched)}${d}`.replace(/^ · /, ""), g = wr(e, a, s);
3783
3767
  return g && typeof g == "object" && "unavailable" in g ? { body: n(m), meta: f, unavailable: g.unavailable } : g === "noPrevious" ? { body: n(m), meta: `${f} · Nothing in the period before to compare with.`.replace(/^ · /, "") } : g ? {
3784
3768
  body: /* @__PURE__ */ r(U, { children: [
3785
3769
  n(g.value),
@@ -3794,7 +3778,7 @@ function Zs(e, a, s) {
3794
3778
  } : { body: n(m), meta: f };
3795
3779
  }
3796
3780
  case "listed": {
3797
- const h = a.items.map((m) => Ht(m, e.presentation, s)), p = a.more === "beyondCap" ? " and more" : a.more ? ` and ${a.more} more` : "";
3781
+ const h = a.items.map((m) => Gt(m, e.presentation, s)), p = a.more === "beyondCap" ? " and more" : a.more ? ` and ${a.more} more` : "";
3798
3782
  return { body: n(`${h.join(e.get.kind === "list" ? e.get.separator ?? ", " : ", ")}${p}`), meta: `${o(a.matched)}${d}` };
3799
3783
  }
3800
3784
  case "none":
@@ -3865,7 +3849,7 @@ function ei({
3865
3849
  onClick: n,
3866
3850
  "aria-label": "Reports & briefings",
3867
3851
  children: [
3868
- /* @__PURE__ */ t(Hr, { className: "h-3.5 w-3.5" }),
3852
+ /* @__PURE__ */ t(Gr, { className: "h-3.5 w-3.5" }),
3869
3853
  "Reports & briefings",
3870
3854
  i ? /* @__PURE__ */ t("span", { className: "ml-0.5 rounded-control bg-muted px-1 text-[10px] tabular-nums text-foreground/70", children: a }) : null
3871
3855
  ]
@@ -3891,7 +3875,7 @@ function ni(e) {
3891
3875
  return l < 5 ? `${l}w ago` : `${Math.round(o / 30)}mo ago`;
3892
3876
  }
3893
3877
  function ri(e) {
3894
- return e.scheduleExpr ? $r(
3878
+ return e.scheduleExpr ? jr(
3895
3879
  e.scheduleExpr,
3896
3880
  e.timezone || "UTC"
3897
3881
  ) ?? "Invalid schedule" : "On demand";
@@ -4100,7 +4084,7 @@ function li({
4100
4084
  className: J(Ia, "h-6 px-1 text-[11px]"),
4101
4085
  children: [
4102
4086
  "Manage all reports & briefings",
4103
- /* @__PURE__ */ t(qr, { className: "h-3 w-3" })
4087
+ /* @__PURE__ */ t(Wr, { className: "h-3 w-3" })
4104
4088
  ]
4105
4089
  }
4106
4090
  ) }) : null
@@ -4364,7 +4348,7 @@ function ui({
4364
4348
  /* @__PURE__ */ t("span", { className: "text-border", children: "·" }),
4365
4349
  /* @__PURE__ */ t("span", { children: ii(e) }),
4366
4350
  /* @__PURE__ */ t("span", { className: "text-border", children: "·" }),
4367
- /* @__PURE__ */ t(Bn, { className: "h-3 w-3" }),
4351
+ /* @__PURE__ */ t(Pn, { className: "h-3 w-3" }),
4368
4352
  /* @__PURE__ */ t("span", { className: "truncate", children: ri(e) }),
4369
4353
  e.lastRunAt ? /* @__PURE__ */ r(U, { children: [
4370
4354
  /* @__PURE__ */ t("span", { className: "text-border", children: "·" }),
@@ -4413,7 +4397,7 @@ function ui({
4413
4397
  g.preventDefault(), i();
4414
4398
  },
4415
4399
  children: [
4416
- /* @__PURE__ */ t(Pn, { className: "h-3.5 w-3.5" }),
4400
+ /* @__PURE__ */ t(_n, { className: "h-3.5 w-3.5" }),
4417
4401
  "Run now"
4418
4402
  ]
4419
4403
  }
@@ -4425,10 +4409,10 @@ function ui({
4425
4409
  g.preventDefault(), o();
4426
4410
  },
4427
4411
  children: u ? /* @__PURE__ */ r(U, { children: [
4428
- /* @__PURE__ */ t(_n, { className: "h-3.5 w-3.5" }),
4412
+ /* @__PURE__ */ t(On, { className: "h-3.5 w-3.5" }),
4429
4413
  "Resume"
4430
4414
  ] }) : /* @__PURE__ */ r(U, { children: [
4431
- /* @__PURE__ */ t(On, { className: "h-3.5 w-3.5" }),
4415
+ /* @__PURE__ */ t(zn, { className: "h-3.5 w-3.5" }),
4432
4416
  "Pause"
4433
4417
  ] })
4434
4418
  }
@@ -4480,15 +4464,15 @@ async function fi(e) {
4480
4464
  return s;
4481
4465
  }
4482
4466
  const gi = {
4483
- listBriefings: Qn,
4484
- getBriefing: Wn,
4485
- pauseBriefing: qn,
4486
- resumeBriefing: jn,
4487
- deleteBriefing: $n,
4488
- runBriefingNow: Un
4467
+ listBriefings: Kn,
4468
+ getBriefing: Qn,
4469
+ pauseBriefing: Wn,
4470
+ resumeBriefing: qn,
4471
+ deleteBriefing: jn,
4472
+ runBriefingNow: $n
4489
4473
  };
4490
4474
  function ro(e) {
4491
- return /* @__PURE__ */ t(Mn, { authToken: e.token ? { accessToken: e.token } : void 0, children: /* @__PURE__ */ t(zn, { children: /* @__PURE__ */ t(bi, { ...e }) }) });
4475
+ return /* @__PURE__ */ t(Mn, { authToken: e.token ? { accessToken: e.token } : void 0, children: /* @__PURE__ */ t(Rn, { children: /* @__PURE__ */ t(bi, { ...e }) }) });
4492
4476
  }
4493
4477
  function bi({
4494
4478
  dashboardId: e,
@@ -4505,15 +4489,15 @@ function bi({
4505
4489
  openRun: p,
4506
4490
  client: m
4507
4491
  }) {
4508
- const { authToken: f, tokenProps: g } = $e(), y = Rn(), N = !h || y.canCreate && (h === "scheduled_report" || y.analyticalBriefingsEnabled), [k, V] = E(!1), B = u ?? k, D = (A) => {
4492
+ const { authToken: f, tokenProps: g } = $e(), y = Un(), N = !h || y.canCreate && (h === "scheduled_report" || y.analyticalBriefingsEnabled), [k, V] = E(!1), B = u ?? k, D = (A) => {
4509
4493
  u === void 0 && V(A), c == null || c(A);
4510
4494
  }, [O, b] = E(
4511
4495
  h ? "author" : "list"
4512
4496
  ), [S, v] = E(
4513
4497
  h ?? "analytical_briefing"
4514
- ), [T, F] = E("dashboard"), [H, P] = E(
4498
+ ), [T, F] = E("dashboard"), [G, P] = E(
4515
4499
  []
4516
- ), [Q, X] = E(null), _ = h && !N && !Q ? "list" : O, [te, Z] = E(!1), [G, I] = E(null), [ae, j] = E(null), [z, ne] = E(
4500
+ ), [Q, X] = E(null), _ = h && !N && !Q ? "list" : O, [te, Z] = E(!1), [H, I] = E(null), [ae, j] = E(null), [M, ne] = E(
4517
4501
  null
4518
4502
  ), [ue, he] = E(null), ye = et(null), x = et(B);
4519
4503
  Ee(() => {
@@ -4527,14 +4511,14 @@ function bi({
4527
4511
  return le.getBriefing($, K, p.briefingId).then(({ briefing: W }) => {
4528
4512
  A && (X(W), ht(p), b("author"));
4529
4513
  }, (W) => {
4530
- A && M.error(W instanceof Error ? W.message : "Could not open the run.");
4514
+ A && z.error(W instanceof Error ? W.message : "Could not open the run.");
4531
4515
  }), () => {
4532
4516
  A = !1;
4533
4517
  };
4534
4518
  }, [p, $, K, le]);
4535
- const Fe = hi(a), He = Y(() => {
4519
+ const Fe = hi(a), Ge = Y(() => {
4536
4520
  const A = pi(
4537
- H,
4521
+ G,
4538
4522
  T,
4539
4523
  e
4540
4524
  );
@@ -4542,9 +4526,9 @@ function bi({
4542
4526
  return A;
4543
4527
  const W = h === "scheduled_report" ? "report" : "briefing";
4544
4528
  return A.filter(
4545
- (Ge) => pe(Ge).noun === W
4529
+ (He) => pe(He).noun === W
4546
4530
  );
4547
- }, [e, H, T, h]), mt = Y(() => T === "dashboard" ? {
4531
+ }, [e, G, T, h]), mt = Y(() => T === "dashboard" ? {
4548
4532
  source: { type: "dashboard", dashboardId: e },
4549
4533
  label: Fe,
4550
4534
  detail: mi(Fe)
@@ -4552,7 +4536,7 @@ function bi({
4552
4536
  source: { type: "project" },
4553
4537
  label: "This project",
4554
4538
  detail: "Use any data in this project."
4555
- }, [e, Fe, T]), Oe = !!($ && K), Me = jr({
4539
+ }, [e, Fe, T]), Oe = !!($ && K), ze = qr({
4556
4540
  canCreate: y.canCreate,
4557
4541
  analyticalBriefingsEnabled: y.analyticalBriefingsEnabled,
4558
4542
  scheduledReportAvailable: T === "dashboard"
@@ -4579,7 +4563,7 @@ function bi({
4579
4563
  Ee(() => {
4580
4564
  !B || _ !== "list" || !Oe || ce();
4581
4565
  }, [Oe, _, ce, B]);
4582
- const ze = () => {
4566
+ const Me = () => {
4583
4567
  X(null), F("dashboard"), b("list"), D(!0);
4584
4568
  }, C = (A) => {
4585
4569
  X(null), v(A), b("author");
@@ -4613,7 +4597,7 @@ function bi({
4613
4597
  );
4614
4598
  R.track({ kind: "briefing", id: W.run.id, title: A.name, briefingId: A.id }), ce();
4615
4599
  } catch (W) {
4616
- M.error(
4600
+ z.error(
4617
4601
  W instanceof Error ? W.message : "Could not start the run."
4618
4602
  );
4619
4603
  } finally {
@@ -4622,7 +4606,7 @@ function bi({
4622
4606
  }
4623
4607
  }, me = async (A) => {
4624
4608
  if (!$ || !K) return;
4625
- const { noun: W } = pe(A), Ge = W === "report" ? "Report" : "Briefing";
4609
+ const { noun: W } = pe(A), He = W === "report" ? "Report" : "Briefing";
4626
4610
  j(A.id);
4627
4611
  try {
4628
4612
  const Ye = A.status === "PAUSED" ? await le.resumeBriefing(
@@ -4634,19 +4618,19 @@ function bi({
4634
4618
  K,
4635
4619
  A.id
4636
4620
  );
4637
- M.success(
4638
- Ye.briefing.status === "PAUSED" ? `${Ge} paused` : `${Ge} resumed`
4621
+ z.success(
4622
+ Ye.briefing.status === "PAUSED" ? `${He} paused` : `${He} resumed`
4639
4623
  ), ce();
4640
4624
  } catch (Ye) {
4641
- M.error(
4625
+ z.error(
4642
4626
  Ye instanceof Error ? Ye.message : `Could not update the ${W} status.`
4643
4627
  );
4644
4628
  } finally {
4645
4629
  j(null);
4646
4630
  }
4647
4631
  }, Ne = async () => {
4648
- if (!z || !$ || !K) return;
4649
- const A = z;
4632
+ if (!M || !$ || !K) return;
4633
+ const A = M;
4650
4634
  j(A.id);
4651
4635
  try {
4652
4636
  await le.deleteBriefing(
@@ -4655,23 +4639,23 @@ function bi({
4655
4639
  A.id
4656
4640
  );
4657
4641
  const { noun: W } = pe(A);
4658
- M.success(`${W === "report" ? "Report" : "Briefing"} deleted`), ne(null), ce();
4642
+ z.success(`${W === "report" ? "Report" : "Briefing"} deleted`), ne(null), ce();
4659
4643
  } catch (W) {
4660
- M.error(
4644
+ z.error(
4661
4645
  W instanceof Error ? W.message : "Could not delete the briefing."
4662
4646
  );
4663
4647
  } finally {
4664
4648
  j(null);
4665
4649
  }
4666
- }, La = He.length;
4667
- return y.surfaceVisible ? /* @__PURE__ */ r(Kn, { open: B, onOpenChange: D, children: [
4650
+ }, La = Ge.length;
4651
+ return y.surfaceVisible ? /* @__PURE__ */ r(Gn, { open: B, onOpenChange: D, children: [
4668
4652
  d ? null : /* @__PURE__ */ t(
4669
4653
  ei,
4670
4654
  {
4671
4655
  disabled: i || !Oe,
4672
4656
  briefingCount: La,
4673
4657
  className: o,
4674
- onClick: ze
4658
+ onClick: Me
4675
4659
  }
4676
4660
  ),
4677
4661
  /* @__PURE__ */ r(
@@ -4686,9 +4670,9 @@ function bi({
4686
4670
  A.preventDefault(), (W = ye.current) == null || W.focus({ preventScroll: !0 });
4687
4671
  },
4688
4672
  children: [
4689
- /* @__PURE__ */ r(Gn, { className: "sr-only", children: [
4690
- /* @__PURE__ */ t(Yn, { children: "Reports & briefings" }),
4691
- /* @__PURE__ */ t(Xn, { children: "Manage reports and briefings for this dashboard." })
4673
+ /* @__PURE__ */ r(Yn, { className: "sr-only", children: [
4674
+ /* @__PURE__ */ t(Xn, { children: "Reports & briefings" }),
4675
+ /* @__PURE__ */ t(Jn, { children: "Manage reports and briefings for this dashboard." })
4692
4676
  ] }),
4693
4677
  h ? /* @__PURE__ */ r("div", { className: "flex shrink-0 items-start justify-between gap-3 border-b border-border pl-4 pr-3 pt-2", children: [
4694
4678
  /* @__PURE__ */ r(
@@ -4747,7 +4731,7 @@ function bi({
4747
4731
  _ === "list" ? /* @__PURE__ */ t(
4748
4732
  li,
4749
4733
  {
4750
- briefings: He,
4734
+ briefings: Ge,
4751
4735
  dashboardLabel: Fe,
4752
4736
  sourceView: T,
4753
4737
  error: ue,
@@ -4758,11 +4742,11 @@ function bi({
4758
4742
  q(A);
4759
4743
  },
4760
4744
  onNew: C,
4761
- canCreate: !h && Me.length > 0,
4762
- canCreateScheduledReport: Me.includes(
4745
+ canCreate: !h && ze.length > 0,
4746
+ canCreateScheduledReport: ze.includes(
4763
4747
  "scheduled_report"
4764
4748
  ),
4765
- analyticalBriefingsEnabled: Me.includes(
4749
+ analyticalBriefingsEnabled: ze.includes(
4766
4750
  "analytical_briefing"
4767
4751
  ),
4768
4752
  onRunNow: (A) => {
@@ -4772,14 +4756,14 @@ function bi({
4772
4756
  me(A);
4773
4757
  },
4774
4758
  onDelete: (A) => ne(A),
4775
- selectingId: G,
4759
+ selectingId: H,
4776
4760
  busyId: ae,
4777
4761
  manageBriefingsHref: l,
4778
4762
  contentKind: h === "scheduled_report" ? "reports" : h === "analytical_briefing" ? "briefings" : void 0,
4779
4763
  hideHeader: !!h
4780
4764
  }
4781
4765
  ) : /* @__PURE__ */ t(
4782
- Jn,
4766
+ Zn,
4783
4767
  {
4784
4768
  apiServiceUrl: $,
4785
4769
  token: K,
@@ -4794,7 +4778,7 @@ function bi({
4794
4778
  onCancel: () => D(!1),
4795
4779
  onDeleted: () => {
4796
4780
  const A = Q ? pe(Q).noun : "briefing";
4797
- M.success(`${A === "report" ? "Report" : "Briefing"} deleted`), X(null), b("list"), ce();
4781
+ z.success(`${A === "report" ? "Report" : "Briefing"} deleted`), X(null), b("list"), ce();
4798
4782
  },
4799
4783
  onRunStarted: () => {
4800
4784
  },
@@ -4812,7 +4796,7 @@ function bi({
4812
4796
  /* @__PURE__ */ t(
4813
4797
  wt,
4814
4798
  {
4815
- open: !!z,
4799
+ open: !!M,
4816
4800
  onOpenChange: (A) => {
4817
4801
  A || ne(null);
4818
4802
  },
@@ -4821,12 +4805,12 @@ function bi({
4821
4805
  /* @__PURE__ */ r(Dt, { children: [
4822
4806
  "Delete",
4823
4807
  " ",
4824
- z ? pe(z).noun : "briefing",
4808
+ M ? pe(M).noun : "briefing",
4825
4809
  "?"
4826
4810
  ] }),
4827
4811
  /* @__PURE__ */ r(At, { children: [
4828
4812
  "This permanently deletes ",
4829
- /* @__PURE__ */ t("strong", { children: z == null ? void 0 : z.name }),
4813
+ /* @__PURE__ */ t("strong", { children: M == null ? void 0 : M.name }),
4830
4814
  ". Recipients will stop receiving it."
4831
4815
  ] })
4832
4816
  ] }),
@@ -4840,7 +4824,7 @@ function bi({
4840
4824
  children: [
4841
4825
  "Delete",
4842
4826
  " ",
4843
- z ? pe(z).noun : "briefing"
4827
+ M ? pe(M).noun : "briefing"
4844
4828
  ]
4845
4829
  }
4846
4830
  )
@@ -4855,8 +4839,8 @@ function xi() {
4855
4839
  }
4856
4840
  export {
4857
4841
  Qi as A,
4858
- Gi as D,
4859
- Hi as S,
4842
+ Hi as D,
4843
+ Gi as S,
4860
4844
  Xi as U,
4861
4845
  ji as V,
4862
4846
  ei as W,