react-semaphor 0.1.560 → 0.1.561

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 (107) hide show
  1. package/dist/analytics-protocol/index.js +353 -349
  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 +9 -9
  5. package/dist/briefings/index.js +5 -5
  6. package/dist/chunks/{analytics-base-schemas-CHLxsPfX.js → analytics-base-schemas-CB3oFAXk.js} +199 -171
  7. package/dist/chunks/{assistant-chat-Bu2fFm_I.js → assistant-chat-DiVHY3Hw.js} +27 -28
  8. package/dist/chunks/bookmark-impact-CR09dpkn.js +75 -0
  9. package/dist/chunks/bookmark-state-BusLpkb7.js +743 -0
  10. package/dist/chunks/{braces-Da41xfUd.js → braces-u8VorWJc.js} +1 -1
  11. package/dist/chunks/{comparison-window-caption-4FNkMrzE.js → comparison-window-caption-DDsIWJYT.js} +108 -108
  12. package/dist/chunks/{context-BgPDzLHZ.js → context-TUjw9eqr.js} +1 -1
  13. package/dist/chunks/{custom-visual-inputs-Dz-enUNR.js → custom-visual-inputs-DfolidZ9.js} +1 -1
  14. package/dist/chunks/{dashboard-_MeBuy67.js → dashboard-BRdZBPqr.js} +1 -1
  15. package/dist/chunks/{dashboard-briefing-launcher-CEi4Pr_v.js → dashboard-briefing-launcher-CgvTLndW.js} +161 -162
  16. package/dist/chunks/{dashboard-controls-Bi7fyG-4.js → dashboard-controls-B4vfSzTF.js} +881 -945
  17. package/dist/chunks/{dashboard-json-B1mU_OMa.js → dashboard-json-Y3MF59g7.js} +5 -5
  18. package/dist/chunks/document-dashboard-inputs-CvBbFTUA.js +1718 -0
  19. package/dist/chunks/{edit-dashboard-visual-0CJN31Y3.js → edit-dashboard-visual-DwjZcxj-.js} +6112 -6146
  20. package/dist/chunks/{filter-reach-copy-BF4w4kI2.js → filter-reach-copy-bijwf_-b.js} +1250 -1392
  21. package/dist/chunks/{filter-value-text-CRC-K_l_.js → filter-value-text-DFnhwuEW.js} +3 -3
  22. package/dist/chunks/global-date-filter-utils-BXgCpvQM.js +15142 -0
  23. package/dist/chunks/{index-DtHidOPV.js → index-ClwbY3BL.js} +197 -198
  24. package/dist/chunks/{layout-grid-BvsH4RY2.js → layout-grid-CtvCBfOm.js} +1 -1
  25. package/dist/chunks/{list-filter-Dg0otx5E.js → list-filter-BklYgciR.js} +1 -1
  26. package/dist/chunks/{matrix-analytical-definition-CM18W8w6.js → matrix-analytical-definition-pU51-JmY.js} +4 -4
  27. package/dist/chunks/{matrix-card-HPskLaPy.js → matrix-card-CUorIB7Q.js} +3 -3
  28. package/dist/chunks/{matrix-member-presentation-Bbrfrke4.js → matrix-member-presentation-Df5UgCGN.js} +1 -1
  29. package/dist/chunks/{matrix-operation-contract-WPv4R-H_.js → matrix-operation-contract-BSiGEXVC.js} +255 -248
  30. package/dist/chunks/{metric-comparison-ljMKYZKa.js → metric-comparison-95aC0uEO.js} +6 -6
  31. package/dist/chunks/{model-change-Ccn1zaxl.js → model-change-B5wQhg5G.js} +1 -1
  32. package/dist/chunks/{palette-Bsh376zO.js → palette-DTnMhipt.js} +1 -1
  33. package/dist/chunks/pivot-result-contract-expectations-Bo-86vwS.js +56 -0
  34. package/dist/chunks/{pivot-result-identity-vS9TSh4f.js → pivot-result-identity-olvXJoB9.js} +1 -1
  35. package/dist/chunks/{report-preferences-dialog-BV8L0SeS.js → report-preferences-dialog-C2YUIwKG.js} +14 -14
  36. package/dist/chunks/{report-runtime-context-BZQh9ywy.js → report-runtime-context-DoIUr3MP.js} +2 -2
  37. package/dist/chunks/resolve-dashboard-input-context-q_iiNXE1.js +6503 -0
  38. package/dist/chunks/{save-B5EAsgQF.js → save-DH4RyrnG.js} +1 -1
  39. package/dist/chunks/{saved-dashboard-context-n2Wn11cV.js → saved-dashboard-context-8jqfI7hI.js} +12 -12
  40. package/dist/chunks/{selection-reducer-D0YnaAD9.js → selection-reducer-CV7K4FI6.js} +1 -1
  41. package/dist/chunks/{semaphor-ready-indicator-XLBLOJ2V.js → semaphor-ready-indicator-E2XWyibu.js} +30253 -31076
  42. package/dist/chunks/{shelf-drop-preview-context-DHMa54a-.js → shelf-drop-preview-context-C29EUzDp.js} +7 -7
  43. package/dist/chunks/{source-entity-resolution-dUG5VWRm.js → source-entity-resolution-BXI3nQ5Z.js} +1 -1
  44. package/dist/chunks/{switch-ByxH4M7t.js → switch-balDSHc7.js} +3 -3
  45. package/dist/chunks/{table-export-sheet-C_GdeTYU.js → table-export-sheet-CK8tvh4d.js} +1 -1
  46. package/dist/chunks/temporal-input-presentation-B77JsAzU.js +5002 -0
  47. package/dist/chunks/{token-types-CQtXUVMy.js → token-types-DhYH5YKb.js} +1 -1
  48. package/dist/chunks/{upload-wbR-NVzq.js → upload-Ufj8vjyn.js} +1 -1
  49. package/dist/chunks/{use-create-flow-overlay-state-CEBaLOKC.js → use-create-flow-overlay-state-9WsnzEO5.js} +6 -6
  50. package/dist/chunks/{validators-CXTneCA4.js → validators-BtaCFIEB.js} +37 -37
  51. package/dist/chunks/{zoned-wall-clock-B1n_WjW3.js → zoned-wall-clock-CGLVI40Q.js} +1 -1
  52. package/dist/dashboard/index.js +2 -2
  53. package/dist/dashboard-authoring/index.js +2400 -1856
  54. package/dist/data-app-sdk/index.js +20 -20
  55. package/dist/data-app-sdk-adapters/index.js +3 -3
  56. package/dist/data-app-sdk-validation/index.js +10 -10
  57. package/dist/format-utils/index.js +257 -256
  58. package/dist/index.js +214 -215
  59. package/dist/report-runtime-context/index.js +2 -2
  60. package/dist/style.css +1 -1
  61. package/dist/surfboard/index.js +2 -2
  62. package/dist/types/components/dashboard/summary-number-formatter.d.ts +6 -0
  63. package/dist/types/index.js +50 -51
  64. package/dist/types/lib/formatters/kpi-number-formatter.d.ts +41 -0
  65. package/dist/types/lib/stores/editor-store.d.ts +9 -1
  66. package/dist/types/lib/stores/table-actions.d.ts +0 -2
  67. package/dist/types/shared/analytics-protocol/analytics-base-schemas.d.ts +10 -0
  68. package/dist/types/shared/analytics-protocol/measure-aggregation-profile.d.ts +12 -0
  69. package/dist/types/shared/dashboard-authoring/card-settings/apply-card-settings.d.ts +11 -0
  70. package/dist/types/shared/dashboard-authoring/card-settings/card-display-write.d.ts +52 -0
  71. package/dist/types/shared/dashboard-authoring/card-settings/card-kinds.d.ts +14 -0
  72. package/dist/types/shared/dashboard-authoring/card-settings/carry-column-settings.d.ts +3 -0
  73. package/dist/types/shared/dashboard-authoring/card-settings/column-format-write.d.ts +8 -0
  74. package/dist/types/shared/dashboard-authoring/card-settings/column-names.d.ts +51 -0
  75. package/dist/types/shared/dashboard-authoring/card-settings/column-sources.d.ts +14 -0
  76. package/dist/types/shared/dashboard-authoring/card-settings/confirm-class.d.ts +9 -0
  77. package/dist/types/shared/dashboard-authoring/card-settings/highlight-inputs.d.ts +19 -0
  78. package/dist/types/shared/dashboard-authoring/card-settings/index.d.ts +15 -0
  79. package/dist/types/shared/dashboard-authoring/card-settings/inputs.d.ts +102 -0
  80. package/dist/types/shared/dashboard-authoring/card-settings/read-card-settings.d.ts +10 -0
  81. package/dist/types/shared/dashboard-authoring/card-settings/resolve-card-highlights.d.ts +14 -0
  82. package/dist/types/shared/dashboard-authoring/card-settings/resolve-card-settings.d.ts +59 -0
  83. package/dist/types/shared/dashboard-authoring/card-settings/resolved.d.ts +40 -0
  84. package/dist/types/shared/dashboard-authoring/card-settings/views.d.ts +28 -0
  85. package/dist/types/shared/dashboard-authoring/changes/card-query-part.d.ts +6 -0
  86. package/dist/types/shared/dashboard-authoring/changes/card-types.d.ts +32 -0
  87. package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +539 -22
  88. package/dist/types/shared/dashboard-authoring/changes/diagnostics.d.ts +27 -8
  89. package/dist/types/shared/dashboard-authoring/changes/resolve-dashboard-changes.d.ts +25 -1
  90. package/dist/types/shared/dashboard-authoring/conditional-formatting/kpi.d.ts +1 -8
  91. package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +10 -10
  92. package/dist/types/shared/dashboard-authoring/index.d.ts +3 -0
  93. package/dist/types/shared/dashboard-authoring/kpi-figure.d.ts +123 -0
  94. package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +21 -1
  95. package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +10 -4
  96. package/dist/types/shared/dashboard-viewer/bookmark-impact.d.ts +33 -0
  97. package/dist/types/shared/format-utils/formatters/matrix-formatter.d.ts +8 -1
  98. package/dist/types/shared/format-utils/raw-temporal.d.ts +16 -0
  99. package/package.json +2 -2
  100. package/dist/chunks/bookmark-state-BFY9oNmr.js +0 -111
  101. package/dist/chunks/document-dashboard-inputs-CkWfDB8c.js +0 -3010
  102. package/dist/chunks/global-date-filter-utils-D8365uPH.js +0 -12889
  103. package/dist/chunks/pivot-result-contract-expectations-Bl5suy4-.js +0 -1832
  104. package/dist/chunks/raw-temporal-presentation-BHm7s-hz.js +0 -540
  105. package/dist/chunks/resolve-dashboard-input-context-CAMiWvyR.js +0 -5280
  106. package/dist/chunks/table-settings-Imz0FgWi.js +0 -637
  107. package/dist/chunks/temporal-input-presentation-uvNK_tM0.js +0 -3228
@@ -1,27 +1,26 @@
1
1
  import { jsx as e, jsxs as s, Fragment as R } from "react/jsx-runtime";
2
- import Pt, { useState as D, useEffect as ve, useCallback as X, useMemo as ee, useLayoutEffect as Dt, useRef as nt, useContext as Ut } from "react";
3
- import { cF as ot, bK as Ie, bL as Te, bN as Le, cG as na, b8 as it, b5 as Qe, cH as sa, cI as Ke, cJ as lt, a7 as Ge, a4 as de, u as w, cK as oa, cL as ia, bJ as E, cM as la, a6 as Z, b3 as da, ca, cN as ua, cO as ha, bD as ma, a$ as xe, cu as Ot, aS as $e, o as pa, k as fa, cP as ga, cx as dt, cy as ct, cz as ut, cA as ht, cB as mt, cC as pt, cD as ft, cE as Rt, aP as gt, cQ as ba, cR as va, cm as et, cj as Ve, ck as Be, cS as zt, cl as Me, c6 as K, cv as xa, cq as We, cT as ya, c4 as Ca, bM as bt, bO as vt, cU as wa, bI as Na, cV as _t, bu as xt, cW as Sa, bv as ka, i as Da, cX as Aa, bp as Fa, w as Ea, t as Ia, cY as Ta, cZ as La, c_ as Va, c$ as ue, d0 as Ba, R as jt, d1 as Ma, d2 as Pa, d3 as Ua, aM as Oa, d4 as Ra, d5 as le, d6 as za, W as yt, d7 as _a, d8 as ja, d9 as $a, da as Wa, db as qa, dc as Ha, dd as Qa, de as $t, df as Ka, dg as Ga, dh as Ya, di as Wt, dj as Xa, dk as ze, dl as Ja, dm as Za, dn as er, A as tr, aB as ar, aC as rr, ah as nr, ag as sr, af as or, ae as ir, ab as lr, a9 as dr, dp as cr, dq as ur, dr as hr, ds as mr, dt as pr, az as fr } from "./semaphor-ready-indicator-XLBLOJ2V.js";
4
- import { c as fe, B as T, X as Ye, m as De, r as st, L as ae, k as qt, d as Ct, j as gr, y as wt, P as Ae, a3 as br, b as Fe, a as qe, S as Ht } from "./switch-ByxH4M7t.js";
5
- import { L as Ee } from "./layout-grid-BvsH4RY2.js";
2
+ import Mt, { useState as D, useEffect as ve, useCallback as Y, useMemo as ee, useLayoutEffect as Dt, useRef as nt, useContext as Ut } from "react";
3
+ import { cF as ot, bK as Ie, bL as Te, bN as Le, cG as na, b8 as it, b5 as Qe, cH as sa, cI as Ke, cJ as lt, a7 as Ge, a4 as de, u as w, cK as oa, cL as ia, bJ as E, cM as la, a6 as Z, b3 as da, ca, cN as ua, cO as ha, bD as ma, a$ as xe, cu as Ot, aS as $e, o as pa, k as fa, cP as ga, cx as dt, cy as ct, cz as ut, cA as ht, cB as mt, cC as pt, cD as ft, cE as Rt, aP as gt, cQ as ba, cR as va, cm as et, cj as Ve, ck as Be, cS as zt, cl as Pe, c6 as K, cv as xa, cq as We, cT as ya, c4 as Ca, bM as bt, bO as vt, cU as wa, bI as Na, cV as _t, bu as xt, cW as Sa, bv as ka, i as Da, cX as Aa, bp as Fa, w as Ea, t as Ia, cY as Ta, cZ as La, c_ as Va, c$ as ue, d0 as Ba, R as jt, d1 as Pa, d2 as Ma, d3 as Ua, aM as Oa, d4 as Ra, d5 as le, d6 as za, W as yt, d7 as _a, d8 as ja, d9 as $a, da as Wa, db as qa, dc as Ha, dd as Qa, de as $t, df as Ka, dg as Ga, dh as Xa, di as Wt, dj as Ya, dk as ze, dl as Ja, dm as Za, dn as er, A as tr, aB as ar, aC as rr, ah as nr, ag as sr, af as or, ae as ir, ab as lr, a9 as dr, dp as cr, dq as ur, dr as hr, ds as mr, dt as pr, az as fr } from "./semaphor-ready-indicator-E2XWyibu.js";
4
+ import { c as fe, B as T, X as Xe, m as De, r as st, L as ae, k as qt, d as Ct, j as gr, y as wt, P as Ae, a3 as br, b as Fe, a as qe, S as Ht } from "./switch-balDSHc7.js";
5
+ import { L as Ee } from "./layout-grid-CtvCBfOm.js";
6
6
  import "./index-CuHybtft.js";
7
- import { o as vr } from "./validators-CXTneCA4.js";
8
- import "./matrix-operation-contract-WPv4R-H_.js";
9
- import "./analytics-base-schemas-CHLxsPfX.js";
7
+ import { o as vr } from "./validators-BtaCFIEB.js";
8
+ import "./matrix-operation-contract-BSiGEXVC.js";
9
+ import "./analytics-base-schemas-CB3oFAXk.js";
10
10
  import "zod";
11
11
  import "../value-format-preferences/index.js";
12
12
  import { c as J } from "./_commonjsHelpers-DimLPMtv.js";
13
13
  import { s as _e } from "./normalize-dashboard-for-dirty-check-XKgH3GFX.js";
14
- import { aY as At, aC as Ft, d8 as Et, ep as xr, eq as He, v as It, er as yr, aw as Nt, es as Cr, dK as wr, dx as Nr, bF as Sr, et as kr } from "./global-date-filter-utils-D8365uPH.js";
14
+ import { bp as At, b1 as Ft, dJ as Et, f4 as xr, f5 as He, v as It, f6 as yr, aX as Nt, f7 as Cr, ee as wr, e0 as Nr, c9 as Sr, f8 as kr } from "./global-date-filter-utils-BXgCpvQM.js";
15
15
  import { createPortal as Dr } from "react-dom";
16
- import "./temporal-input-presentation-uvNK_tM0.js";
16
+ import { aK as Tt } from "./temporal-input-presentation-B77JsAzU.js";
17
17
  import "./index-CJW5BdWT.js";
18
- import { J as Ar } from "./table-settings-Imz0FgWi.js";
19
- import { S as Qt } from "./save-B5EAsgQF.js";
20
- import { V as Fr, L as Er, a as Ir, u as Kt, C as Gt, F as Tr, b as Lr } from "./use-create-flow-overlay-state-CEBaLOKC.js";
21
- import { m as Vr, k as Yt, n as Xt } from "./report-preferences-dialog-BV8L0SeS.js";
22
- import { u as Tt } from "./pivot-result-contract-expectations-Bl5suy4-.js";
23
- import { g as Br, f as Mr } from "./document-dashboard-inputs-CkWfDB8c.js";
24
- import { g as ie, d as Pr, a as Ur } from "./index-DtHidOPV.js";
18
+ import { P as Ar } from "./bookmark-state-BusLpkb7.js";
19
+ import { S as Qt } from "./save-DH4RyrnG.js";
20
+ import { V as Fr, L as Er, a as Ir, u as Kt, C as Gt, F as Tr, b as Lr } from "./use-create-flow-overlay-state-9WsnzEO5.js";
21
+ import { m as Vr, k as Xt, n as Yt } from "./report-preferences-dialog-C2YUIwKG.js";
22
+ import { g as Br, d as Pr } from "./document-dashboard-inputs-CvBbFTUA.js";
23
+ import { g as ie, d as Mr, a as Ur } from "./index-ClwbY3BL.js";
25
24
  /**
26
25
  * @license lucide-react v0.453.0 - ISC
27
26
  *
@@ -169,7 +168,7 @@ function Wr({
169
168
  onClick: () => h(!1),
170
169
  "aria-label": "Close",
171
170
  disabled: n,
172
- children: /* @__PURE__ */ e(Ye, { className: "h-3.5 w-3.5" })
171
+ children: /* @__PURE__ */ e(Xe, { className: "h-3.5 w-3.5" })
173
172
  }
174
173
  )
175
174
  ] }),
@@ -361,7 +360,7 @@ function Kr() {
361
360
  return ((i = n.card.customCardPreferences) == null ? void 0 : i.url) || "";
362
361
  }
363
362
  ), a = qr(t);
364
- return { getUpdatedFrame: X(() => {
363
+ return { getUpdatedFrame: Y(() => {
365
364
  var N;
366
365
  da();
367
366
  const {
@@ -383,8 +382,8 @@ function Kr() {
383
382
  stripConfig: Ft
384
383
  }), f = n.cards.map((S) => {
385
384
  if (S.id === i.id) return Et({ before: i, after: p });
386
- const P = xr(S) ? At(S, { isDevMode: !0, cardSql: S.sql, stripConfig: Ft }) : S;
387
- return Et({ before: S, after: P });
385
+ const M = xr(S) ? At(S, { isDevMode: !0, cardSql: S.sql, stripConfig: Ft }) : S;
386
+ return Et({ before: S, after: M });
388
387
  }), g = f.flatMap((S) => S.dropped);
389
388
  g.length && E.info("Some conditional formatting rules were removed", {
390
389
  description: `Their column isn't in the saved visual: ${g.map((S) => S.name || "an unnamed rule").join(", ")}.`
@@ -400,7 +399,7 @@ function Kr() {
400
399
  function ye() {
401
400
  const { authToken: t, tokenProps: a } = it(), o = Qe(), n = sa(), i = Ke(), { selectVisual: r } = lt(), {
402
401
  setFrame: d,
403
- setCard: c,
402
+ loadCard: c,
404
403
  setIsDevMode: l,
405
404
  initializeModeDrafts: u,
406
405
  setActiveTabCardId: h,
@@ -411,7 +410,7 @@ function ye() {
411
410
  setSelectedSchemaName: x,
412
411
  setSelectedTableName: N,
413
412
  setSelectedDatamodelId: S,
414
- setInlineFilterValuesMap: P,
413
+ setInlineFilterValuesMap: M,
415
414
  setApplyFilters: U,
416
415
  clearEditorContext: F
417
416
  } = Ge(), {
@@ -422,11 +421,11 @@ function ye() {
422
421
  (V) => V.inlineFilterValuesMap
423
422
  ), L = oa((i == null ? void 0 : i.id) || "", {
424
423
  enabled: !!(i != null && i.id) && !!(t != null && t.accessToken)
425
- }), z = X(
424
+ }), z = Y(
426
425
  async (V) => {
427
426
  try {
428
427
  r(V), I(), F();
429
- const { data: te, fromCache: Y } = await Bt(
428
+ const { data: te, fromCache: X } = await Bt(
430
429
  a.apiServiceUrl,
431
430
  (t == null ? void 0 : t.accessToken) || "",
432
431
  V.id,
@@ -435,7 +434,7 @@ function ye() {
435
434
  );
436
435
  if (!Qr(te, {
437
436
  setFrame: d,
438
- setCard: c,
437
+ loadCard: c,
439
438
  setIsDevMode: l,
440
439
  initializeModeDrafts: u,
441
440
  setActiveTabCardId: h,
@@ -446,7 +445,7 @@ function ye() {
446
445
  setSelectedSchemaName: x,
447
446
  setSelectedTableName: N,
448
447
  setSelectedDatamodelId: S,
449
- setInlineFilterValuesMap: P,
448
+ setInlineFilterValuesMap: M,
450
449
  setApplyFilters: U,
451
450
  setIsDashboardEditing: O,
452
451
  setIsVisualEditing: b,
@@ -456,7 +455,7 @@ function ye() {
456
455
  inlineFilterValuesMap: j
457
456
  }))
458
457
  throw new Error("Failed to setup editor with visual data");
459
- return { success: !0, fromCache: Y };
458
+ return { success: !0, fromCache: X };
460
459
  } catch (te) {
461
460
  return console.error("Error editing visual:", te), { success: !1, error: "Failed to load visual for editing" };
462
461
  }
@@ -480,7 +479,7 @@ function ye() {
480
479
  x,
481
480
  N,
482
481
  S,
483
- P,
482
+ M,
484
483
  U,
485
484
  F,
486
485
  I,
@@ -489,9 +488,9 @@ function ye() {
489
488
  A,
490
489
  j
491
490
  ]
492
- ), G = X(
491
+ ), G = Y(
493
492
  async (V) => {
494
- var Y;
493
+ var X;
495
494
  const te = (H) => (E.error(H), { success: !1, error: H });
496
495
  try {
497
496
  if (r(V), !C)
@@ -502,7 +501,7 @@ function ye() {
502
501
  V.id,
503
502
  o,
504
503
  "Adding visual to dashboard..."
505
- ), ge = (H == null ? void 0 : H.frameObject) ?? ((Y = H == null ? void 0 : H.visual) == null ? void 0 : Y.frameObject);
504
+ ), ge = (H == null ? void 0 : H.frameObject) ?? ((X = H == null ? void 0 : H.visual) == null ? void 0 : X.frameObject);
506
505
  if (!ge)
507
506
  return te("Visual has no frame data");
508
507
  const Q = Jt(ge);
@@ -560,15 +559,15 @@ function St(t, a) {
560
559
  function Gr(t, a) {
561
560
  return St(t, a).split(/\s+/).filter(Boolean).slice(0, 2).map((n) => n.charAt(0).toUpperCase()).join("") || "?";
562
561
  }
563
- function Yr(t) {
562
+ function Xr(t) {
564
563
  const a = (t || "").toLowerCase();
565
564
  return a.includes("table") ? qt : a.includes("pie") || a.includes("donut") ? ba : a.includes("line") ? va : a.includes("bar") ? gr : Ee;
566
565
  }
567
- function Xr({ visual: t }) {
566
+ function Yr({ visual: t }) {
568
567
  const a = t.ownership.status === "public" ? "Public" : t.ownership.status === "shared" || t.ownership.sharedCount > 0 ? "Shared" : "Private";
569
568
  return /* @__PURE__ */ e("span", { className: "inline-flex items-center rounded-[4px] border border-border/60 px-1.5 py-px text-[11px] text-muted-foreground", children: a });
570
569
  }
571
- function cs({
570
+ function ds({
572
571
  open: t,
573
572
  onOpenChange: a
574
573
  }) {
@@ -576,7 +575,7 @@ function cs({
576
575
  null
577
576
  ), [m, p] = D(
578
577
  null
579
- ), [f, g] = D(!1), [x, N] = D(null), [S, P] = D(null), U = () => {
578
+ ), [f, g] = D(!1), [x, N] = D(null), [S, M] = D(null), U = () => {
580
579
  d(/* @__PURE__ */ new Set()), h(null), p(null), g(!1), N(null);
581
580
  }, F = () => {
582
581
  a(!1), U();
@@ -589,7 +588,7 @@ function cs({
589
588
  deleteResourceAsync: G,
590
589
  duplicateResource: V,
591
590
  isCreating: te,
592
- isDeleting: Y
591
+ isDeleting: X
593
592
  } = ua(
594
593
  void 0,
595
594
  (v) => {
@@ -618,13 +617,13 @@ function cs({
618
617
  (v) => v.permissions.canShare
619
618
  ), Ce = _.length > 0 && _.every(
620
619
  (v) => r.has(v.id)
621
- ), Pe = _.some(
620
+ ), Me = _.some(
622
621
  (v) => r.has(v.id)
623
- ), Xe = (v) => {
622
+ ), Ye = (v) => {
624
623
  const B = new Set(r);
625
624
  v(B), d(B);
626
625
  }, $ = (v) => {
627
- Xe((B) => {
626
+ Ye((B) => {
628
627
  B.has(v) ? B.delete(v) : B.add(v);
629
628
  });
630
629
  }, W = () => {
@@ -651,8 +650,8 @@ function cs({
651
650
  }, Je = (v) => {
652
651
  I(v), F();
653
652
  }, be = (v) => {
654
- P(v), V(v, {
655
- onSettled: () => P(null)
653
+ M(v), V(v, {
654
+ onSettled: () => M(null)
656
655
  });
657
656
  }, Ue = () => {
658
657
  if (me.length === 0) {
@@ -779,7 +778,7 @@ function cs({
779
778
  visuals: _,
780
779
  selectedIds: r,
781
780
  allFilteredSelected: Ce,
782
- someFilteredSelected: Pe,
781
+ someFilteredSelected: Me,
783
782
  onSelectAll: W,
784
783
  onToggleSelection: $,
785
784
  onAddVisual: re,
@@ -791,7 +790,7 @@ function cs({
791
790
  },
792
791
  onDuplicateVisual: be,
793
792
  duplicatingId: S,
794
- isDeleting: Y,
793
+ isDeleting: X,
795
794
  isConsoleMode: C
796
795
  }
797
796
  ) }),
@@ -901,7 +900,7 @@ function cs({
901
900
  {
902
901
  open: f,
903
902
  onOpenChange: (v) => {
904
- !v && Y || (g(v), v || N(null));
903
+ !v && X || (g(v), v || N(null));
905
904
  },
906
905
  children: /* @__PURE__ */ s(ct, { children: [
907
906
  /* @__PURE__ */ s(ut, { children: [
@@ -915,17 +914,17 @@ function cs({
915
914
  /* @__PURE__ */ e(mt, { children: "This cannot be undone. Visuals already added to dashboards may need to be removed from those dashboards separately." })
916
915
  ] }),
917
916
  /* @__PURE__ */ s(pt, { children: [
918
- /* @__PURE__ */ e(ft, { disabled: Y, children: "Cancel" }),
917
+ /* @__PURE__ */ e(ft, { disabled: X, children: "Cancel" }),
919
918
  /* @__PURE__ */ s(
920
919
  Rt,
921
920
  {
922
921
  onClick: (v) => {
923
922
  v.preventDefault(), Ze();
924
923
  },
925
- disabled: Y || ke === 0,
924
+ disabled: X || ke === 0,
926
925
  children: [
927
- Y ? /* @__PURE__ */ e(ae, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ e($e, { className: "h-3.5 w-3.5" }),
928
- Y ? "Deleting..." : "Delete"
926
+ X ? /* @__PURE__ */ e(ae, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ e($e, { className: "h-3.5 w-3.5" }),
927
+ X ? "Deleting..." : "Delete"
929
928
  ]
930
929
  }
931
930
  )
@@ -1004,7 +1003,7 @@ function Zr({
1004
1003
  isConsoleMode: m
1005
1004
  }) {
1006
1005
  var g;
1007
- const p = Yr(t.kind), f = () => {
1006
+ const p = Xr(t.kind), f = () => {
1008
1007
  n(t);
1009
1008
  };
1010
1009
  return /* @__PURE__ */ s(
@@ -1058,7 +1057,7 @@ function Zr({
1058
1057
  /* @__PURE__ */ e("span", { className: "truncate text-muted-foreground", children: St(t, m) })
1059
1058
  ] }),
1060
1059
  /* @__PURE__ */ e("span", { className: "text-muted-foreground", children: Zt(t.updatedAt) }),
1061
- /* @__PURE__ */ e(Xr, { visual: t }),
1060
+ /* @__PURE__ */ e(Yr, { visual: t }),
1062
1061
  /* @__PURE__ */ e("span", { className: "text-right tabular-nums text-muted-foreground", children: t.ownership.sharedCount > 0 ? t.ownership.sharedCount : "—" }),
1063
1062
  /* @__PURE__ */ e(
1064
1063
  en,
@@ -1118,7 +1117,7 @@ function en({
1118
1117
  }
1119
1118
  ) }),
1120
1119
  /* @__PURE__ */ s(
1121
- Me,
1120
+ Pe,
1122
1121
  {
1123
1122
  align: "end",
1124
1123
  className: "z-[60] w-44 rounded-[6px] border-border/60 p-1 shadow-sm",
@@ -1180,12 +1179,12 @@ function en({
1180
1179
  }
1181
1180
  );
1182
1181
  }
1183
- function us(t, a, o = !1) {
1182
+ function cs(t, a, o = !1) {
1184
1183
  const n = w((u) => u.dashboard), i = w(
1185
1184
  (u) => u.isDashboardEditing
1186
1185
  ), r = w(
1187
1186
  (u) => u.onDashboardLifecycleEvent
1188
- ), d = X(() => {
1187
+ ), d = Y(() => {
1189
1188
  const u = w.getState().dashboard;
1190
1189
  return a || !t || !u || u.id !== t.id ? !1 : _e(u) !== _e(t);
1191
1190
  }, [t, a]);
@@ -1231,7 +1230,7 @@ function tn({
1231
1230
  const [c, l] = D(
1232
1231
  o && n ? `Copy of ${n}` : n || ""
1233
1232
  ), [u, h] = D("");
1234
- Pt.useEffect(() => {
1233
+ Mt.useEffect(() => {
1235
1234
  t && (l(
1236
1235
  o && n ? `Copy of ${n}` : n || ""
1237
1236
  ), h(""));
@@ -1431,7 +1430,7 @@ function rn({
1431
1430
  ...x,
1432
1431
  visualId: g
1433
1432
  // Keep the link to library visual
1434
- }, S = He(c, N.id), P = await p(N, {
1433
+ }, S = He(c, N.id), M = await p(N, {
1435
1434
  previousFrame: S
1436
1435
  });
1437
1436
  await m.mutateAsync({
@@ -1440,7 +1439,7 @@ function rn({
1440
1439
  frameObject: x
1441
1440
  }
1442
1441
  }), l(d, N, {
1443
- semanticExecutionPayload: P
1442
+ semanticExecutionPayload: M
1444
1443
  }), a.invalidateQueries({ queryKey: ["visuals"] }), a.invalidateQueries({ queryKey: ["visual", g] }), E.success("Saved to library and applied locally"), setTimeout(() => {
1445
1444
  u(!1);
1446
1445
  }, 300);
@@ -1483,14 +1482,14 @@ function at({ className: t }) {
1483
1482
  size: "xs",
1484
1483
  variant: "outline",
1485
1484
  children: [
1486
- /* @__PURE__ */ e(Ye, { className: "h-3.5 w-3.5" }),
1485
+ /* @__PURE__ */ e(Xe, { className: "h-3.5 w-3.5" }),
1487
1486
  "Close"
1488
1487
  ]
1489
1488
  }
1490
1489
  );
1491
1490
  }
1492
1491
  function nn() {
1493
- const [t, a] = D(!1), [o, n] = D(!1), [i, r] = D(null), [d, c] = D(null), l = Z((b) => b.frame), u = Z((b) => b.card), h = Ke(), m = w((b) => b.selectedSheetId), p = w((b) => b.dashboard), { getUpdatedFrame: f } = ye(), { selectVisual: g } = lt(), { addFrame: x, setIsVisualEditing: N } = de(), S = xt(), P = !!(l != null && l.visualId), U = (() => {
1492
+ const [t, a] = D(!1), [o, n] = D(!1), [i, r] = D(null), [d, c] = D(null), l = Z((b) => b.frame), u = Z((b) => b.card), h = Ke(), m = w((b) => b.selectedSheetId), p = w((b) => b.dashboard), { getUpdatedFrame: f } = ye(), { selectVisual: g } = lt(), { addFrame: x, setIsVisualEditing: N } = de(), S = xt(), M = !!(l != null && l.visualId), U = (() => {
1494
1493
  var b, I;
1495
1494
  return ((b = l == null ? void 0 : l.cards) == null ? void 0 : b.length) === 1 && ((I = l.cards[0]) != null && I.title) ? l.cards[0].title : h != null && h.title ? h.title : (u == null ? void 0 : u.title) || "Untitled Visual";
1496
1495
  })(), F = Sa((b) => {
@@ -1578,13 +1577,13 @@ function nn() {
1578
1577
  }
1579
1578
  }
1580
1579
  },
1581
- isLibraryVisual: P,
1580
+ isLibraryVisual: M,
1582
1581
  currentVisualName: U,
1583
1582
  isSaving: F.isPending
1584
1583
  };
1585
1584
  }
1586
- function hs(t = {}) {
1587
- const { isInspectionMode: a } = ka(), o = Z((L) => L.frame), n = Z((L) => L.editorContext), i = Da((L) => L.selectedVisual), r = w((L) => L.selectedFrameId), d = w((L) => L.selectedSheetId), c = w((L) => L.dashboard), { setIsVisualEditing: l, updateFrame: u } = de(), [h, m] = D(!1), [p, f] = D("both"), g = xt(), x = (n == null ? void 0 : n.type) === "documentSection", N = !!(o != null && o.visualId || i != null && i.id), S = !!(o != null && o.visualId && r), P = N && !S, {
1585
+ function us(t = {}) {
1586
+ const { isInspectionMode: a } = ka(), o = Z((L) => L.frame), n = Z((L) => L.editorContext), i = Da((L) => L.selectedVisual), r = w((L) => L.selectedFrameId), d = w((L) => L.selectedSheetId), c = w((L) => L.dashboard), { setIsVisualEditing: l, updateFrame: u } = de(), [h, m] = D(!1), [p, f] = D("both"), g = xt(), x = (n == null ? void 0 : n.type) === "documentSection", N = !!(o != null && o.visualId || i != null && i.id), S = !!(o != null && o.visualId && r), M = N && !S, {
1588
1587
  saveAsDialogOpen: U,
1589
1588
  setSaveAsDialogOpen: F,
1590
1589
  handleSaveAs: O,
@@ -1641,7 +1640,7 @@ function hs(t = {}) {
1641
1640
  return /* @__PURE__ */ s(R, { children: [
1642
1641
  /* @__PURE__ */ s("div", { className: "inline-flex items-center overflow-hidden rounded-control", children: [
1643
1642
  !N && /* @__PURE__ */ e(tt, { className: "!rounded-none", variant: "default" }),
1644
- N && P && /* @__PURE__ */ e(an, { className: "!rounded-none", variant: "default" }),
1643
+ N && M && /* @__PURE__ */ e(an, { className: "!rounded-none", variant: "default" }),
1645
1644
  N && S && /* @__PURE__ */ e(rn, { className: "!rounded-none" }),
1646
1645
  /* @__PURE__ */ s(Ve, { modal: !1, children: [
1647
1646
  /* @__PURE__ */ e(Be, { asChild: !0, children: /* @__PURE__ */ e(
@@ -1656,7 +1655,7 @@ function hs(t = {}) {
1656
1655
  }
1657
1656
  ) }),
1658
1657
  /* @__PURE__ */ s(
1659
- Me,
1658
+ Pe,
1660
1659
  {
1661
1660
  align: "end",
1662
1661
  className: "min-w-[220px] rounded-control border border-border/60 p-1 shadow-sm",
@@ -1730,7 +1729,7 @@ function hs(t = {}) {
1730
1729
  )
1731
1730
  ] });
1732
1731
  }
1733
- function ms({ className: t }) {
1732
+ function hs({ className: t }) {
1734
1733
  const a = Z((h) => h.isDevMode), o = Z((h) => h.card.type), n = w((h) => h.isVisualEditing), { setIsDevMode: i } = Ge(), { config: r } = Ut(Aa).tokenProps, d = (r == null ? void 0 : r.showAdvancedMode) !== !1;
1735
1734
  if (!n || !d || !yr(o))
1736
1735
  return null;
@@ -1753,7 +1752,7 @@ function ms({ className: t }) {
1753
1752
  }
1754
1753
  );
1755
1754
  }
1756
- function ps() {
1755
+ function ms() {
1757
1756
  const t = Vr() === "sm", a = w((l) => l.isDashboardEditing), o = w((l) => l.isVisualEditing), n = w((l) => {
1758
1757
  var h;
1759
1758
  const u = ((h = l.dashboard) == null ? void 0 : h.sheets) ?? [];
@@ -1808,19 +1807,19 @@ function ps() {
1808
1807
  children: /* @__PURE__ */ e(wt, { className: "h-3.5 w-3.5" })
1809
1808
  }
1810
1809
  ) }),
1811
- /* @__PURE__ */ e(Me, { align: "end", className: "z-[60] w-48 rounded-[6px] border-border/60 p-1 shadow-sm", children: /* @__PURE__ */ s(K, { onClick: () => c(!0), children: [
1810
+ /* @__PURE__ */ e(Pe, { align: "end", className: "z-[60] w-48 rounded-[6px] border-border/60 p-1 shadow-sm", children: /* @__PURE__ */ s(K, { onClick: () => c(!0), children: [
1812
1811
  /* @__PURE__ */ e(Ee, { className: "h-3.5 w-3.5" }),
1813
1812
  "Keep my order"
1814
1813
  ] }) })
1815
1814
  ] })
1816
1815
  ] });
1817
1816
  }
1818
- function fs() {
1817
+ function ps() {
1819
1818
  const t = w((i) => i.screenSizesOpen), a = w((i) => {
1820
1819
  var c, l;
1821
1820
  const r = ((c = i.dashboard) == null ? void 0 : c.sheets) ?? [], d = r.find((u) => u.id === i.selectedSheetId) ?? r[0];
1822
1821
  return !!d && !Nt(d) && !!((l = d.frames) != null && l.length);
1823
- }), o = w((i) => i.actions.setScreenSizesOpen), n = Yt(
1822
+ }), o = w((i) => i.actions.setScreenSizesOpen), n = Xt(
1824
1823
  "screen-sizes",
1825
1824
  "lg",
1826
1825
  a ? {
@@ -1846,7 +1845,7 @@ function fs() {
1846
1845
  }
1847
1846
  );
1848
1847
  }
1849
- function gs({ dashboardId: t }) {
1848
+ function fs({ dashboardId: t }) {
1850
1849
  const { openDashboardId: a, access: o, printMode: n, serverIsFavorite: i, fetchedAt: r } = w(
1851
1850
  Fa((l) => {
1852
1851
  var u;
@@ -1870,14 +1869,14 @@ function gs({ dashboardId: t }) {
1870
1869
  }
1871
1870
  );
1872
1871
  }
1873
- function bs({
1872
+ function gs({
1874
1873
  width: t,
1875
1874
  hasOverflowMenu: a = !0,
1876
1875
  children: o
1877
1876
  }) {
1878
1877
  const [n, i] = D(
1879
1878
  () => /* @__PURE__ */ new Map()
1880
- ), [r, d] = D(null), [c, l] = D(null), u = X((m) => (i((p) => new Map(p).set(m.id, m)), () => i((p) => {
1879
+ ), [r, d] = D(null), [c, l] = D(null), u = Y((m) => (i((p) => new Map(p).set(m.id, m)), () => i((p) => {
1881
1880
  if (p.get(m.id) !== m) return p;
1882
1881
  const f = new Map(p);
1883
1882
  return f.delete(m.id), f;
@@ -1894,13 +1893,13 @@ function bs({
1894
1893
  }),
1895
1894
  [c, a, n, r, u, t]
1896
1895
  );
1897
- return /* @__PURE__ */ e(Xt.Provider, { value: h, children: o });
1896
+ return /* @__PURE__ */ e(Yt.Provider, { value: h, children: o });
1898
1897
  }
1899
- function vs() {
1900
- const { setAnchorSlot: t } = Ut(Xt);
1898
+ function bs() {
1899
+ const { setAnchorSlot: t } = Ut(Yt);
1901
1900
  return /* @__PURE__ */ e("span", { ref: t, "aria-hidden": !0, className: "relative -mr-1.5 block h-7 w-0" });
1902
1901
  }
1903
- function xs(t) {
1902
+ function vs(t) {
1904
1903
  var l;
1905
1904
  const { authToken: a, tokenProps: o } = it(), { data: n } = Ta(), { mutate: i, isPending: r } = La(), d = !!t && ((l = n == null ? void 0 : n.preference) == null ? void 0 : l.defaultDashboardId) === t, c = !n || r;
1906
1905
  return {
@@ -1912,7 +1911,7 @@ function xs(t) {
1912
1911
  }
1913
1912
  };
1914
1913
  }
1915
- function ys({
1914
+ function xs({
1916
1915
  open: t,
1917
1916
  onOpenChange: a,
1918
1917
  onSave: o,
@@ -1952,7 +1951,7 @@ function ys({
1952
1951
  ] })
1953
1952
  ] }) });
1954
1953
  }
1955
- async function Cs(t) {
1954
+ async function ys(t) {
1956
1955
  var r, d;
1957
1956
  const a = (d = (r = w.getState()) == null ? void 0 : r.authToken) == null ? void 0 : d.accessToken;
1958
1957
  if (!a)
@@ -2014,7 +2013,7 @@ function on({ row: t, now: a, api: o }) {
2014
2013
  type: "button",
2015
2014
  onClick: () => void c(),
2016
2015
  className: "shrink-0 text-[12px] font-medium text-foreground/80 underline-offset-2 hover:text-foreground hover:underline focus-visible:underline focus-visible:outline-none",
2017
- children: Ma[d]
2016
+ children: Pa[d]
2018
2017
  }
2019
2018
  )
2020
2019
  ] }),
@@ -2030,14 +2029,14 @@ function on({ row: t, now: a, api: o }) {
2030
2029
  f,
2031
2030
  " ",
2032
2031
  /* @__PURE__ */ e("span", { children: ue.started(Tt(h, a)) }),
2033
- r.running.percent !== void 0 && /* @__PURE__ */ e(Pa, { value: r.running.percent, className: "mt-1.5 h-1" }),
2032
+ r.running.percent !== void 0 && /* @__PURE__ */ e(Ma, { value: r.running.percent, className: "mt-1.5 h-1" }),
2034
2033
  p && /* @__PURE__ */ e("div", { className: "mt-1", children: ue.longRunning })
2035
2034
  ] }),
2036
2035
  r.status !== "running" && /* @__PURE__ */ s("div", { className: "flex items-center gap-1.5 text-[12px] leading-4 text-muted-foreground", children: [
2037
2036
  r.status === "ready" && r.finishedDetail.length > 0 ? (
2038
2037
  // Disclosed on hover or focus only; the time is what a reader scans.
2039
2038
  /* @__PURE__ */ s("span", { className: "hidden group-hover:contents group-focus-within:contents", children: [
2040
- r.finishedDetail.map((g, x) => /* @__PURE__ */ s(Pt.Fragment, { children: [
2039
+ r.finishedDetail.map((g, x) => /* @__PURE__ */ s(Mt.Fragment, { children: [
2041
2040
  x > 0 && f,
2042
2041
  /* @__PURE__ */ e("span", { children: g })
2043
2042
  ] }, x)),
@@ -2055,8 +2054,8 @@ function on({ row: t, now: a, api: o }) {
2055
2054
  ] })
2056
2055
  ] });
2057
2056
  }
2058
- function ws({ variant: t }) {
2059
- const { snapshot: a, markSeen: o } = yt(), n = a.runningCount > 0 ? a.runningCount > 9 ? "9+" : String(a.runningCount) : a.hasUnseenFinished ? "" : null, i = Yt("activity", "md", {
2057
+ function Cs({ variant: t }) {
2058
+ const { snapshot: a, markSeen: o } = yt(), n = a.runningCount > 0 ? a.runningCount > 9 ? "9+" : String(a.runningCount) : a.hasUnseenFinished ? "" : null, i = Xt("activity", "md", {
2060
2059
  label: le.title,
2061
2060
  icon: /* @__PURE__ */ e(Lt, { className: "h-3.5 w-3.5" }),
2062
2061
  hint: n || (n === "" ? "New" : void 0),
@@ -2082,7 +2081,7 @@ function ws({ variant: t }) {
2082
2081
  align: "end",
2083
2082
  sideOffset: 8,
2084
2083
  onFocusOutside: (r) => r.preventDefault(),
2085
- children: /* @__PURE__ */ e(Mt, {})
2084
+ children: /* @__PURE__ */ e(Pt, {})
2086
2085
  }
2087
2086
  )
2088
2087
  ]
@@ -2110,10 +2109,10 @@ function ws({ variant: t }) {
2110
2109
  ]
2111
2110
  }
2112
2111
  ) }),
2113
- /* @__PURE__ */ e(Fe, { className: "w-80 p-0", align: "end", sideOffset: 8, children: /* @__PURE__ */ e(Mt, {}) })
2112
+ /* @__PURE__ */ e(Fe, { className: "w-80 p-0", align: "end", sideOffset: 8, children: /* @__PURE__ */ e(Pt, {}) })
2114
2113
  ] });
2115
2114
  }
2116
- function Mt() {
2115
+ function Pt() {
2117
2116
  const t = yt(), a = _a(), { rows: o, activeTruncated: n } = t.snapshot, i = o.some((r) => ja(r.item.status));
2118
2117
  return o.length === 0 ? /* @__PURE__ */ s("div", { className: "flex flex-col items-center gap-1.5 px-6 py-8 text-center", children: [
2119
2118
  /* @__PURE__ */ e("span", { className: "flex h-8 w-8 items-center justify-center rounded-[6px] border border-border text-muted-foreground", children: /* @__PURE__ */ e($a, { className: "h-3.5 w-3.5", strokeWidth: 1.75 }) }),
@@ -2219,13 +2218,13 @@ function dn({
2219
2218
  ), S = Cr({
2220
2219
  ...p || {},
2221
2220
  controls: []
2222
- }), P = Ha(p), U = (C, A, k) => {
2221
+ }), M = Ha(p), U = (C, A, k) => {
2223
2222
  f(
2224
2223
  C,
2225
2224
  A,
2226
2225
  ln(k)
2227
2226
  );
2228
- }, F = X(() => {
2227
+ }, F = Y(() => {
2229
2228
  if (r) {
2230
2229
  d();
2231
2230
  return;
@@ -2242,7 +2241,7 @@ function dn({
2242
2241
  availableFieldChoices: x,
2243
2242
  availableMetricChoices: N,
2244
2243
  structuralParticipants: g,
2245
- structuralParticipantIdsByControlId: P,
2244
+ structuralParticipantIdsByControlId: M,
2246
2245
  initialCreateFlow: i === "create",
2247
2246
  onCreateFlowActiveChange: m,
2248
2247
  onCreateFlowComplete: F,
@@ -2338,19 +2337,19 @@ function un({
2338
2337
  ), S = ee(
2339
2338
  () => N.map((C) => C.control),
2340
2339
  [N]
2341
- ), P = ee(
2340
+ ), M = ee(
2342
2341
  () => mn(S),
2343
2342
  [S]
2344
2343
  ), U = ee(
2345
2344
  () => hn(h),
2346
2345
  [h]
2347
- ), F = X(() => {
2346
+ ), F = Y(() => {
2348
2347
  if (n) {
2349
2348
  i();
2350
2349
  return;
2351
2350
  }
2352
2351
  u(!1);
2353
- }, [n, i, u]), O = X(
2352
+ }, [n, i, u]), O = Y(
2354
2353
  (C, A, k) => {
2355
2354
  !g || !(f != null && f.document) || p(
2356
2355
  fn({
@@ -2394,7 +2393,7 @@ function un({
2394
2393
  scope: "dashboard",
2395
2394
  controls: S,
2396
2395
  reservedControlIds: U,
2397
- defaultValues: P,
2396
+ defaultValues: M,
2398
2397
  usageByControlId: {},
2399
2398
  availableFieldChoices: [],
2400
2399
  availableMetricChoices: [],
@@ -2466,7 +2465,7 @@ function fn({
2466
2465
  }
2467
2466
  for (const p of d.values())
2468
2467
  l.has(p.id) || u.push(
2469
- Mr({
2468
+ Pr({
2470
2469
  control: p,
2471
2470
  existingInputs: [...t, ...u],
2472
2471
  sheetId: a
@@ -2618,7 +2617,7 @@ function vn() {
2618
2617
  /* @__PURE__ */ e("h3", { className: "mb-1 text-[13px] font-medium text-foreground", children: "No fields configured" }),
2619
2618
  /* @__PURE__ */ e("p", { className: "text-[11px] text-muted-foreground", children: "Configure a data source for this card to enable filtering." })
2620
2619
  ] }),
2621
- n && /* @__PURE__ */ e("div", { className: "flex flex-1 overflow-hidden", children: /* @__PURE__ */ e(Ya, { context: "filter" }) })
2620
+ n && /* @__PURE__ */ e("div", { className: "flex flex-1 overflow-hidden", children: /* @__PURE__ */ e(Xa, { context: "filter" }) })
2622
2621
  ] });
2623
2622
  }
2624
2623
  function xn({
@@ -2714,7 +2713,7 @@ function yn({
2714
2713
  )
2715
2714
  ] });
2716
2715
  }
2717
- function Ns({
2716
+ function ws({
2718
2717
  size: t,
2719
2718
  className: a,
2720
2719
  primaryButtonClassName: o,
@@ -2725,11 +2724,11 @@ function Ns({
2725
2724
  var O;
2726
2725
  const [d, c] = D(null), l = w((b) => b.dashboard), u = w((b) => b.selectedSheetId), h = w((b) => b.showFilters), m = w((b) => b.actions), { setDocumentPanelTarget: p, setShowFilters: f } = m, g = (O = l.sheets) == null ? void 0 : O.find(
2727
2726
  (b) => b.id === u
2728
- ), x = Nt(g), N = X((b) => {
2727
+ ), x = Nt(g), N = Y((b) => {
2729
2728
  window.setTimeout(() => {
2730
2729
  c(b);
2731
2730
  }, 0);
2732
- }, []), S = X(
2731
+ }, []), S = Y(
2733
2732
  (b) => {
2734
2733
  if (x && u) {
2735
2734
  b && p(u, {
@@ -2746,11 +2745,11 @@ function Ns({
2746
2745
  p,
2747
2746
  f
2748
2747
  ]
2749
- ), P = X(() => {
2748
+ ), M = Y(() => {
2750
2749
  S(!0);
2751
- }, [S]), U = X(() => {
2750
+ }, [S]), U = Y(() => {
2752
2751
  N("create");
2753
- }, [N]), F = X(() => {
2752
+ }, [N]), F = Y(() => {
2754
2753
  N("manage");
2755
2754
  }, [N]);
2756
2755
  return /* @__PURE__ */ s(R, { children: [
@@ -2763,7 +2762,7 @@ function Ns({
2763
2762
  settingsContent: (b) => /* @__PURE__ */ e(
2764
2763
  xn,
2765
2764
  {
2766
- onAddFilter: P,
2765
+ onAddFilter: M,
2767
2766
  onAddControl: U,
2768
2767
  onManageControls: F,
2769
2768
  onDismiss: b
@@ -2843,7 +2842,7 @@ function Sn(t) {
2843
2842
  return d < 5 ? `${d}w ago` : `${Math.round(r / 30)}mo ago`;
2844
2843
  }
2845
2844
  function kn(t) {
2846
- return t.scheduleExpr ? Pr(
2845
+ return t.scheduleExpr ? Mr(
2847
2846
  t.scheduleExpr,
2848
2847
  t.timezone || "UTC"
2849
2848
  ) ?? "Invalid schedule" : "On demand";
@@ -2911,10 +2910,10 @@ function En({
2911
2910
  selectingId: x,
2912
2911
  busyId: N,
2913
2912
  manageBriefingsHref: S,
2914
- contentKind: P,
2913
+ contentKind: M,
2915
2914
  hideHeader: U = !1
2916
2915
  }) {
2917
- const F = t.length, O = t.filter((k) => k.status === "ACTIVE").length, b = P === "reports" ? F === 1 ? "report" : "reports" : P === "briefings" ? F === 1 ? "briefing" : "briefings" : F === 1 ? "item" : "items", I = t.find((k) => k.hasActiveRun) ?? null, C = P ?? "reports & briefings", A = o === "dashboard" ? a : `Project ${C}`;
2916
+ const F = t.length, O = t.filter((k) => k.status === "ACTIVE").length, b = M === "reports" ? F === 1 ? "report" : "reports" : M === "briefings" ? F === 1 ? "briefing" : "briefings" : F === 1 ? "item" : "items", I = t.find((k) => k.hasActiveRun) ?? null, C = M ?? "reports & briefings", A = o === "dashboard" ? a : `Project ${C}`;
2918
2917
  return /* @__PURE__ */ s(
2919
2918
  "section",
2920
2919
  {
@@ -2933,7 +2932,7 @@ function En({
2933
2932
  onClick: d,
2934
2933
  className: "rounded-control p-1 text-muted-foreground hover:bg-muted hover:text-foreground",
2935
2934
  "aria-label": `Close ${C.replace("&", "and")} panel`,
2936
- children: /* @__PURE__ */ e(Ye, { className: "h-3.5 w-3.5" })
2935
+ children: /* @__PURE__ */ e(Xe, { className: "h-3.5 w-3.5" })
2937
2936
  }
2938
2937
  )
2939
2938
  ] }),
@@ -2980,7 +2979,7 @@ function En({
2980
2979
  /* @__PURE__ */ e(xe, { className: "h-3 w-3" }),
2981
2980
  " New"
2982
2981
  ] }) }),
2983
- /* @__PURE__ */ s(Me, { align: "end", children: [
2982
+ /* @__PURE__ */ s(Pe, { align: "end", children: [
2984
2983
  /* @__PURE__ */ e(K, { onClick: () => l("scheduled_report"), children: "Schedule a report" }),
2985
2984
  /* @__PURE__ */ e(
2986
2985
  K,
@@ -3028,7 +3027,7 @@ function En({
3028
3027
  canCreate: u,
3029
3028
  canCreateScheduledReport: h,
3030
3029
  analyticalBriefingsEnabled: m,
3031
- contentKind: P
3030
+ contentKind: M
3032
3031
  }
3033
3032
  ) : null,
3034
3033
  t.map((k) => /* @__PURE__ */ e(
@@ -3316,7 +3315,7 @@ function Ln({
3316
3315
  /* @__PURE__ */ e("span", { className: "text-border", children: "·" }),
3317
3316
  /* @__PURE__ */ e("span", { children: An(t) }),
3318
3317
  /* @__PURE__ */ e("span", { className: "text-border", children: "·" }),
3319
- /* @__PURE__ */ e(Xa, { className: "h-3 w-3" }),
3318
+ /* @__PURE__ */ e(Ya, { className: "h-3 w-3" }),
3320
3319
  /* @__PURE__ */ e("span", { className: "truncate", children: kn(t) }),
3321
3320
  t.lastRunAt ? /* @__PURE__ */ s(R, { children: [
3322
3321
  /* @__PURE__ */ e("span", { className: "text-border", children: "·" }),
@@ -3352,7 +3351,7 @@ function Ln({
3352
3351
  children: /* @__PURE__ */ e(zt, { className: "h-3.5 w-3.5" })
3353
3352
  }
3354
3353
  ) }),
3355
- /* @__PURE__ */ s(Me, { align: "end", className: "w-44", children: [
3354
+ /* @__PURE__ */ s(Pe, { align: "end", className: "w-44", children: [
3356
3355
  /* @__PURE__ */ s(K, { onClick: n, children: [
3357
3356
  /* @__PURE__ */ e(Wt, { className: "h-3.5 w-3.5" }),
3358
3357
  "Edit ",
@@ -3412,12 +3411,12 @@ function Vn(t) {
3412
3411
  function Bn(t) {
3413
3412
  return t === "This dashboard" ? "Watch this dashboard" : `Watch ${t}`;
3414
3413
  }
3415
- function Mn(t, a, o) {
3414
+ function Pn(t, a, o) {
3416
3415
  return a !== "dashboard" ? t : t.filter(
3417
3416
  (n) => n.source.type === "dashboard" && n.source.dashboardId === o
3418
3417
  );
3419
3418
  }
3420
- async function Pn(t) {
3419
+ async function Mn(t) {
3421
3420
  const o = [];
3422
3421
  let n = 1, i = 0, r = Number.POSITIVE_INFINITY;
3423
3422
  for (; i < r; ) {
@@ -3439,7 +3438,7 @@ const Un = {
3439
3438
  deleteBriefing: sr,
3440
3439
  runBriefingNow: nr
3441
3440
  };
3442
- function Ss(t) {
3441
+ function Ns(t) {
3443
3442
  return /* @__PURE__ */ e(tr, { authToken: t.token ? { accessToken: t.token } : void 0, children: /* @__PURE__ */ e(ar, { children: /* @__PURE__ */ e(On, { ...t }) }) });
3444
3443
  }
3445
3444
  function On({
@@ -3457,44 +3456,44 @@ function On({
3457
3456
  openRun: m,
3458
3457
  client: p
3459
3458
  }) {
3460
- const { authToken: f, tokenProps: g } = it(), x = rr(), N = !h || x.canCreate && (h === "scheduled_report" || x.analyticalBriefingsEnabled), [S, P] = D(!1), U = c ?? S, F = (y) => {
3461
- c === void 0 && P(y), l == null || l(y);
3459
+ const { authToken: f, tokenProps: g } = it(), x = rr(), N = !h || x.canCreate && (h === "scheduled_report" || x.analyticalBriefingsEnabled), [S, M] = D(!1), U = c ?? S, F = (y) => {
3460
+ c === void 0 && M(y), l == null || l(y);
3462
3461
  }, [O, b] = D(
3463
3462
  h ? "author" : "list"
3464
3463
  ), [I, C] = D(
3465
3464
  h ?? "analytical_briefing"
3466
3465
  ), [A, k] = D("dashboard"), [j, L] = D(
3467
3466
  []
3468
- ), [z, G] = D(null), V = h && !N && !z ? "list" : O, [te, Y] = D(!1), [H, he] = D(null), [ge, Q] = D(null), [_, se] = D(
3467
+ ), [z, G] = D(null), V = h && !N && !z ? "list" : O, [te, X] = D(!1), [H, he] = D(null), [ge, Q] = D(null), [_, se] = D(
3469
3468
  null
3470
- ), [me, pe] = D(null), Ce = nt(null), Pe = nt(U);
3469
+ ), [me, pe] = D(null), Ce = nt(null), Me = nt(U);
3471
3470
  ve(() => {
3472
- const y = U && !Pe.current;
3473
- Pe.current = U, !(!y || !h) && (G(null), k("dashboard"), C(h), b("author"), pe(null));
3471
+ const y = U && !Me.current;
3472
+ Me.current = U, !(!y || !h) && (G(null), k("dashboard"), C(h), b("author"), pe(null));
3474
3473
  }, [U, h]);
3475
- const Xe = yt(), $ = o ?? (g == null ? void 0 : g.apiServiceUrl), W = n ?? (f == null ? void 0 : f.accessToken), re = ee(() => ({ ...Un, ...p }), [p]), [we, Je] = D(null);
3474
+ const Ye = yt(), $ = o ?? (g == null ? void 0 : g.apiServiceUrl), W = n ?? (f == null ? void 0 : f.accessToken), re = ee(() => ({ ...Un, ...p }), [p]), [we, Je] = D(null);
3476
3475
  ve(() => {
3477
3476
  if (!m || !$ || !W) return;
3478
3477
  let y = !0;
3479
- return re.getBriefing($, W, m.briefingId).then(({ briefing: M }) => {
3480
- y && (G(M), Je(m), b("author"));
3481
- }, (M) => {
3482
- y && E.error(M instanceof Error ? M.message : "Could not open the run.");
3478
+ return re.getBriefing($, W, m.briefingId).then(({ briefing: P }) => {
3479
+ y && (G(P), Je(m), b("author"));
3480
+ }, (P) => {
3481
+ y && E.error(P instanceof Error ? P.message : "Could not open the run.");
3483
3482
  }), () => {
3484
3483
  y = !1;
3485
3484
  };
3486
3485
  }, [m, $, W, re]);
3487
3486
  const be = Vn(a), Ue = ee(() => {
3488
- const y = Mn(
3487
+ const y = Pn(
3489
3488
  j,
3490
3489
  A,
3491
3490
  t
3492
3491
  );
3493
3492
  if (!h)
3494
3493
  return y;
3495
- const M = h === "scheduled_report" ? "report" : "briefing";
3494
+ const P = h === "scheduled_report" ? "report" : "briefing";
3496
3495
  return y.filter(
3497
- (Oe) => ie(Oe).noun === M
3496
+ (Oe) => ie(Oe).noun === P
3498
3497
  );
3499
3498
  }, [t, j, A, h]), Ze = ee(() => A === "dashboard" ? {
3500
3499
  source: { type: "dashboard", dashboardId: t },
@@ -3508,12 +3507,12 @@ function On({
3508
3507
  canCreate: x.canCreate,
3509
3508
  analyticalBriefingsEnabled: x.analyticalBriefingsEnabled,
3510
3509
  scheduledReportAvailable: A === "dashboard"
3511
- }), ne = X(async () => {
3510
+ }), ne = Y(async () => {
3512
3511
  if (!(!$ || !W)) {
3513
- Y(!0), pe(null);
3512
+ X(!0), pe(null);
3514
3513
  try {
3515
3514
  L(
3516
- await Pn({
3515
+ await Mn({
3517
3516
  apiClient: re,
3518
3517
  apiServiceUrl: $,
3519
3518
  token: W
@@ -3524,7 +3523,7 @@ function On({
3524
3523
  y instanceof Error ? y.message : "Could not load briefings."
3525
3524
  );
3526
3525
  } finally {
3527
- Y(!1);
3526
+ X(!1);
3528
3527
  }
3529
3528
  }
3530
3529
  }, [re, $, W]);
@@ -3539,15 +3538,15 @@ function On({
3539
3538
  if (!(!$ || !W)) {
3540
3539
  he(y), pe(null);
3541
3540
  try {
3542
- const M = await re.getBriefing(
3541
+ const P = await re.getBriefing(
3543
3542
  $,
3544
3543
  W,
3545
3544
  y
3546
3545
  );
3547
- G(M.briefing), b("author");
3548
- } catch (M) {
3546
+ G(P.briefing), b("author");
3547
+ } catch (P) {
3549
3548
  pe(
3550
- M instanceof Error ? M.message : "Could not open briefing."
3549
+ P instanceof Error ? P.message : "Could not open briefing."
3551
3550
  );
3552
3551
  } finally {
3553
3552
  he(null);
@@ -3557,16 +3556,16 @@ function On({
3557
3556
  if (!(!$ || !W)) {
3558
3557
  Q(y.id);
3559
3558
  try {
3560
- const M = await re.runBriefingNow(
3559
+ const P = await re.runBriefingNow(
3561
3560
  $,
3562
3561
  W,
3563
3562
  y.id,
3564
3563
  { requestId: Rn() }
3565
3564
  );
3566
- Xe.track({ kind: "briefing", id: M.run.id, title: y.name, briefingId: y.id }), ne();
3567
- } catch (M) {
3565
+ Ye.track({ kind: "briefing", id: P.run.id, title: y.name, briefingId: y.id }), ne();
3566
+ } catch (P) {
3568
3567
  E.error(
3569
- M instanceof Error ? M.message : "Could not start the run."
3568
+ P instanceof Error ? P.message : "Could not start the run."
3570
3569
  );
3571
3570
  } finally {
3572
3571
  Q(null);
@@ -3574,7 +3573,7 @@ function On({
3574
3573
  }
3575
3574
  }, oe = async (y) => {
3576
3575
  if (!$ || !W) return;
3577
- const { noun: M } = ie(y), Oe = M === "report" ? "Report" : "Briefing";
3576
+ const { noun: P } = ie(y), Oe = P === "report" ? "Report" : "Briefing";
3578
3577
  Q(y.id);
3579
3578
  try {
3580
3579
  const Re = y.status === "PAUSED" ? await re.resumeBriefing(
@@ -3591,7 +3590,7 @@ function On({
3591
3590
  ), ne();
3592
3591
  } catch (Re) {
3593
3592
  E.error(
3594
- Re instanceof Error ? Re.message : `Could not update the ${M} status.`
3593
+ Re instanceof Error ? Re.message : `Could not update the ${P} status.`
3595
3594
  );
3596
3595
  } finally {
3597
3596
  Q(null);
@@ -3606,11 +3605,11 @@ function On({
3606
3605
  W,
3607
3606
  y.id
3608
3607
  );
3609
- const { noun: M } = ie(y);
3610
- E.success(`${M === "report" ? "Report" : "Briefing"} deleted`), se(null), ne();
3611
- } catch (M) {
3608
+ const { noun: P } = ie(y);
3609
+ E.success(`${P === "report" ? "Report" : "Briefing"} deleted`), se(null), ne();
3610
+ } catch (P) {
3612
3611
  E.error(
3613
- M instanceof Error ? M.message : "Could not delete the briefing."
3612
+ P instanceof Error ? P.message : "Could not delete the briefing."
3614
3613
  );
3615
3614
  } finally {
3616
3615
  Q(null);
@@ -3634,8 +3633,8 @@ function On({
3634
3633
  hideClose: !0,
3635
3634
  className: "flex h-full w-full flex-col overflow-hidden p-0 outline-none sm:max-w-[560px]",
3636
3635
  onOpenAutoFocus: (y) => {
3637
- var M;
3638
- y.preventDefault(), (M = Ce.current) == null || M.focus({ preventScroll: !0 });
3636
+ var P;
3637
+ y.preventDefault(), (P = Ce.current) == null || P.focus({ preventScroll: !0 });
3639
3638
  },
3640
3639
  children: [
3641
3640
  /* @__PURE__ */ s(hr, { className: "sr-only", children: [
@@ -3692,7 +3691,7 @@ function On({
3692
3691
  onClick: () => F(!1),
3693
3692
  className: "rounded-control p-1 text-muted-foreground hover:bg-muted hover:text-foreground",
3694
3693
  "aria-label": h === "scheduled_report" ? "Close email report workflow" : "Close analytical briefing workflow",
3695
- children: /* @__PURE__ */ e(Ye, { className: "h-3.5 w-3.5" })
3694
+ children: /* @__PURE__ */ e(Xe, { className: "h-3.5 w-3.5" })
3696
3695
  }
3697
3696
  )
3698
3697
  ] }) : null,
@@ -3806,23 +3805,23 @@ function Rn() {
3806
3805
  return typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : `briefing-run-now-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
3807
3806
  }
3808
3807
  export {
3809
- ms as A,
3810
- gs as D,
3811
- fs as S,
3812
- vs as T,
3813
- ys as U,
3814
- cs as V,
3808
+ hs as A,
3809
+ fs as D,
3810
+ ps as S,
3811
+ bs as T,
3812
+ xs as U,
3813
+ ds as V,
3815
3814
  Cn as W,
3816
- hs as a,
3817
- ps as b,
3818
- bs as c,
3819
- xs as d,
3820
- ws as e,
3815
+ us as a,
3816
+ ms as b,
3817
+ gs as c,
3818
+ vs as d,
3819
+ Cs as e,
3821
3820
  dn as f,
3822
3821
  un as g,
3823
3822
  gn as h,
3824
- Cs as i,
3825
- Ns as j,
3826
- Ss as k,
3827
- us as u
3823
+ ys as i,
3824
+ ws as j,
3825
+ Ns as k,
3826
+ cs as u
3828
3827
  };