react-semaphor 0.1.427 → 0.1.428

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 (24) hide show
  1. package/dist/chunks/{calendar-preferences-dialog-DE4tk3t3.js → calendar-preferences-dialog-BF9bNAF_.js} +1 -1
  2. package/dist/chunks/{calendar-preferences-dialog-DuGX1NPV.js → calendar-preferences-dialog-_L9eBQfj.js} +1 -1
  3. package/dist/chunks/{dashboard-DSxho2LN.js → dashboard-509sbC4_.js} +5323 -5257
  4. package/dist/chunks/{dashboard-ogxedhSY.js → dashboard-CMDXBLnG.js} +85 -85
  5. package/dist/chunks/{dashboard-briefing-launcher-CguxcHIl.js → dashboard-briefing-launcher-B-ZTWJwo.js} +1 -1
  6. package/dist/chunks/{dashboard-briefing-launcher-BFIw5BOf.js → dashboard-briefing-launcher-DIdYHNTq.js} +2 -2
  7. package/dist/chunks/{dashboard-controls-Cl0LagTr.js → dashboard-controls-CWprw-Pb.js} +2 -2
  8. package/dist/chunks/{dashboard-controls-jD-HpCNK.js → dashboard-controls-CbRzWo1N.js} +170 -166
  9. package/dist/chunks/{dashboard-json-7mpQsizF.js → dashboard-json-BEZrxx_k.js} +1 -1
  10. package/dist/chunks/{dashboard-json-BovTt0uu.js → dashboard-json-jO4GQfZk.js} +1 -1
  11. package/dist/chunks/{edit-dashboard-visual-B7wLrHeF.js → edit-dashboard-visual-D3uhqgm3.js} +1 -1
  12. package/dist/chunks/{edit-dashboard-visual-dlm8F_Qu.js → edit-dashboard-visual-KgQTjqWp.js} +2 -2
  13. package/dist/chunks/{use-create-flow-overlay-state-kbl6avDY.js → use-create-flow-overlay-state-BiMYdjZP.js} +1 -1
  14. package/dist/chunks/{use-create-flow-overlay-state-BU0ROMSm.js → use-create-flow-overlay-state-CGsLzp9A.js} +1 -1
  15. package/dist/dashboard/index.cjs +1 -1
  16. package/dist/dashboard/index.js +1 -1
  17. package/dist/data-app-builder/index.cjs +1 -1
  18. package/dist/data-app-builder/index.js +1 -1
  19. package/dist/index.cjs +1 -1
  20. package/dist/index.js +4 -4
  21. package/dist/style.css +1 -1
  22. package/dist/surfboard/index.cjs +1 -1
  23. package/dist/surfboard/index.js +2 -2
  24. package/package.json +1 -1
@@ -1,30 +1,30 @@
1
1
  import { jsx as e, jsxs as n, Fragment as T } from "react/jsx-runtime";
2
- import { u as D, B as U, aw as dt, D as Zt, L as za, Z as _a, c as ge, ax as lt, ay as qa, az as Ha, aA as ea, aB as be, aC as ct, aD as ta, e as Ge, aE as aa, aF as ja, F as $t, Q as Ka, V as Qa, W as Wa, Y as Ja, p as Xa, aG as Ya } from "./code-editor-CojfM3qp.js";
3
- import { bA as Za, bB as er, u as z, b as ra, bC as tr, aX as H, c as sa, d as ar, e as st, f as nt, o as rr, bD as fe, bE as Te, bF as sr, bG as Bt, bH as na, bI as oa, bJ as nr, bK as ut, bL as or, bM as ir, bN as dr, bO as lr, bP as cr, bQ as ur, b6 as xe, bR as ve, p as C, bS as mr, bT as ia, bp as mt, bU as pr, bV as hr, bW as da, bX as fr, bY as la, bZ as O, b_ as gr, au as br, b$ as xr, c0 as vr, c1 as yr, ay as wr, aG as Fe, aH as Nr, O as at, c2 as Dr, c3 as Cr, c4 as kr, c5 as Sr, at as Ir, c6 as Mr, c7 as Er, I as zt, c8 as Ar, c9 as Lr, ca as Pr, cb as Ur, cc as _t, cd as qt, ce as Ht, cf as Rr, cg as Vr, ch as Fr, ci as Or, a$ as jt, cj as Tr, ck as Gr, cl as $r, Q as Br, cm as zr, aN as _r, aQ as qr, aR as Hr, aS as jr, aT as Kr, aU as Qr, aV as Wr, aW as Kt, w as ot } from "./dashboard-DSxho2LN.js";
4
- import { c as Z, X as ca, C as Jr } from "./index-xHCrHprY.js";
2
+ import { u as D, B as U, aw as dt, D as Zt, L as za, Z as _a, c as ge, ax as lt, ay as qa, az as Ha, aA as ea, aB as be, aC as ct, aD as ta, e as Be, aE as aa, aF as ja, F as Gt, Q as Ka, V as Qa, W as Wa, Y as Ja, p as Xa, aG as Ya } from "./code-editor-CojfM3qp.js";
3
+ import { bA as Za, bB as er, u as z, b as ra, bC as tr, aX as H, c as sa, d as ar, e as st, f as nt, o as rr, bD as fe, bE as Te, bF as sr, bG as $t, bH as na, bI as oa, bJ as nr, bK as ut, bL as or, bM as ir, bN as dr, bO as lr, bP as cr, bQ as ur, b6 as xe, bR as ve, p as C, bS as mr, bT as ia, bp as mt, bU as pr, bV as hr, bW as da, bX as fr, bY as la, bZ as O, b_ as gr, au as br, b$ as xr, c0 as vr, c1 as yr, ay as wr, aG as Fe, aH as Nr, O as at, c2 as Dr, c3 as Cr, c4 as kr, c5 as Sr, at as Ir, c6 as Mr, c7 as Er, I as zt, c8 as Ar, c9 as Lr, ca as Pr, cb as Ur, cc as Rr, cd as _t, ce as qt, cf as Ht, cg as Vr, ch as Fr, ci as Or, cj as Tr, a$ as jt, ck as Br, cl as Gr, cm as $r, Q as zr, cn as _r, aN as qr, aQ as Hr, aR as jr, aS as Kr, aT as Qr, aU as Wr, aV as Jr, aW as Kt, w as ot } from "./dashboard-509sbC4_.js";
4
+ import { c as Z, X as ca, C as Xr } from "./index-xHCrHprY.js";
5
5
  import "./analyze-result-contract-DnfF8kBb.js";
6
6
  import * as L from "react";
7
- import { useState as N, useMemo as Y, useEffect as $e, useRef as Qt, useLayoutEffect as Xr, useCallback as Yr } from "react";
7
+ import { useState as N, useMemo as Y, useEffect as Ge, useRef as Qt, useLayoutEffect as Yr, useCallback as Zr } from "react";
8
8
  import "./index-If0wlXGi.js";
9
9
  import "./comparison-document-migration-BJH1idOd.js";
10
- import { createPortal as Zr } from "react-dom";
10
+ import { createPortal as es } from "react-dom";
11
11
  import "../briefings/index.js";
12
- import { g as es, u as ts, A as as, V as rs, c as ss, f as ns, N as os, D as is, U as ds } from "./dashboard-briefing-launcher-BFIw5BOf.js";
13
- import { S as ls, C as cs } from "./search-DHZCro8B.js";
12
+ import { g as ts, u as as, A as rs, V as ss, c as ns, f as os, N as is, D as ds, U as ls } from "./dashboard-briefing-launcher-DIdYHNTq.js";
13
+ import { S as cs, C as us } from "./search-DHZCro8B.js";
14
14
  import { d as ua } from "./index-CnujJ3fa.js";
15
- import { C as us } from "./calendar-preferences-dialog-DE4tk3t3.js";
16
- import { u as ms } from "./use-debounced-dirty-check-BwAbnX_5.js";
15
+ import { C as ms } from "./calendar-preferences-dialog-BF9bNAF_.js";
16
+ import { u as ps } from "./use-debounced-dirty-check-BwAbnX_5.js";
17
17
  import { s as rt } from "./normalize-dashboard-for-dirty-check-5KpZN8xr.js";
18
18
  import { S as Wt } from "./save-HCJjjzdX.js";
19
- import { P as ps } from "./palette-jqaAcwiQ.js";
20
- import { B as hs } from "./braces-BdbUk_r9.js";
19
+ import { P as hs } from "./palette-jqaAcwiQ.js";
20
+ import { B as fs } from "./braces-BdbUk_r9.js";
21
21
  /**
22
22
  * @license lucide-react v0.453.0 - ISC
23
23
  *
24
24
  * This source code is licensed under the ISC license.
25
25
  * See the LICENSE file in the root directory of this source tree.
26
26
  */
27
- const fs = Z("Glasses", [
27
+ const gs = Z("Glasses", [
28
28
  ["circle", { cx: "6", cy: "15", r: "4", key: "vux9w4" }],
29
29
  ["circle", { cx: "18", cy: "15", r: "4", key: "18o8ve" }],
30
30
  ["path", { d: "M14 15a2 2 0 0 0-2-2 2 2 0 0 0-2 2", key: "1ag4bs" }],
@@ -37,7 +37,7 @@ const fs = Z("Glasses", [
37
37
  * This source code is licensed under the ISC license.
38
38
  * See the LICENSE file in the root directory of this source tree.
39
39
  */
40
- const gs = Z("Monitor", [
40
+ const bs = Z("Monitor", [
41
41
  ["rect", { width: "20", height: "14", x: "2", y: "3", rx: "2", key: "48i651" }],
42
42
  ["line", { x1: "8", x2: "16", y1: "21", y2: "21", key: "1svkeh" }],
43
43
  ["line", { x1: "12", x2: "12", y1: "17", y2: "21", key: "vw1qmm" }]
@@ -48,7 +48,7 @@ const gs = Z("Monitor", [
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 bs = Z("Moon", [
51
+ const xs = Z("Moon", [
52
52
  ["path", { d: "M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z", key: "a7tn18" }]
53
53
  ]);
54
54
  /**
@@ -57,7 +57,7 @@ const bs = Z("Moon", [
57
57
  * This source code is licensed under the ISC license.
58
58
  * See the LICENSE file in the root directory of this source tree.
59
59
  */
60
- const xs = Z("ShieldX", [
60
+ const vs = Z("ShieldX", [
61
61
  [
62
62
  "path",
63
63
  {
@@ -74,7 +74,7 @@ const xs = Z("ShieldX", [
74
74
  * This source code is licensed under the ISC license.
75
75
  * See the LICENSE file in the root directory of this source tree.
76
76
  */
77
- const vs = Z("Sun", [
77
+ const ys = Z("Sun", [
78
78
  ["circle", { cx: "12", cy: "12", r: "4", key: "4exip2" }],
79
79
  ["path", { d: "M12 2v2", key: "tus03m" }],
80
80
  ["path", { d: "M12 20v2", key: "1lh1kg" }],
@@ -91,7 +91,7 @@ const vs = Z("Sun", [
91
91
  * This source code is licensed under the ISC license.
92
92
  * See the LICENSE file in the root directory of this source tree.
93
93
  */
94
- const ys = Z("UserPlus", [
94
+ const ws = Z("UserPlus", [
95
95
  ["path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2", key: "1yyitq" }],
96
96
  ["circle", { cx: "9", cy: "7", r: "4", key: "nufk8" }],
97
97
  ["line", { x1: "19", x2: "19", y1: "8", y2: "14", key: "1bvyxn" }],
@@ -107,7 +107,7 @@ const ma = Z("UserRound", [
107
107
  ["circle", { cx: "12", cy: "8", r: "5", key: "1hypcn" }],
108
108
  ["path", { d: "M20 21a8 8 0 0 0-16 0", key: "rfgkzh" }]
109
109
  ]), Oe = ["light", "dark", "system"];
110
- function ws() {
110
+ function Ns() {
111
111
  const { theme: t, setTheme: s } = Za(), r = D(
112
112
  (h) => h.actions.setDashboardTheme
113
113
  );
@@ -115,7 +115,7 @@ function ws() {
115
115
  const h = Oe.includes(t) ? t : "system", m = Oe[(Oe.indexOf(h) + 1) % Oe.length];
116
116
  s(m), r(m);
117
117
  }
118
- const o = t === "light" ? vs : t === "dark" ? bs : gs, l = t === "light" ? "Theme: light (click for dark)" : t === "dark" ? "Theme: dark (click for system)" : "Theme: system (click for light)";
118
+ const o = t === "light" ? ys : t === "dark" ? xs : bs, l = t === "light" ? "Theme: light (click for dark)" : t === "dark" ? "Theme: dark (click for system)" : "Theme: system (click for light)";
119
119
  return /* @__PURE__ */ e(
120
120
  U,
121
121
  {
@@ -150,7 +150,7 @@ function pa(t) {
150
150
  dashboardInputValues: r.dashboardInputValues
151
151
  };
152
152
  }
153
- async function Ns(t, s, r, a, o, l) {
153
+ async function Ds(t, s, r, a, o, l) {
154
154
  if (!l)
155
155
  return null;
156
156
  const h = JSON.stringify(r), m = `${t}/v1/lens`;
@@ -183,7 +183,7 @@ async function it(t, s, r) {
183
183
  operation: "update"
184
184
  });
185
185
  }
186
- async function Ds(t, s, r) {
186
+ async function Cs(t, s, r) {
187
187
  if (!r)
188
188
  return null;
189
189
  const a = `${t}/v1/lens`;
@@ -192,8 +192,8 @@ async function Ds(t, s, r) {
192
192
  lensId: s
193
193
  });
194
194
  }
195
- const Cs = "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground";
196
- function ks({
195
+ const ks = "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground";
196
+ function Ss({
197
197
  open: t,
198
198
  onOpenChange: s
199
199
  } = {}) {
@@ -209,7 +209,7 @@ function ks({
209
209
  controlValues: x.controlValues,
210
210
  inlineFilterValuesMap: x.inlineFilterValuesMap,
211
211
  cardControlValuesMap: x.cardControlValuesMap
212
- }), q = await Ns(
212
+ }), q = await Ds(
213
213
  P.apiServiceUrl,
214
214
  r,
215
215
  c,
@@ -230,7 +230,7 @@ function ks({
230
230
  /* @__PURE__ */ e(nt, { className: "text-[13px] leading-5", children: "Lenses are private by default and are only visible to you." })
231
231
  ] }),
232
232
  /* @__PURE__ */ n("div", { className: "space-y-1.5 py-1", children: [
233
- /* @__PURE__ */ e(za, { htmlFor: "lens-name", className: Cs, children: "Name" }),
233
+ /* @__PURE__ */ e(za, { htmlFor: "lens-name", className: ks, children: "Name" }),
234
234
  /* @__PURE__ */ e(
235
235
  _a,
236
236
  {
@@ -259,13 +259,13 @@ function ks({
259
259
  ] })
260
260
  ] });
261
261
  }
262
- function Ss({ includeLabel: t = !1 } = {}) {
262
+ function Is({ includeLabel: t = !1 } = {}) {
263
263
  const s = D((d) => d.lenses), r = D((d) => d.selectedLensId), { setLenses: a, setSelectedLensId: o } = Zt(), { authToken: l, tokenProps: h } = z();
264
264
  async function m(d) {
265
265
  o(d);
266
266
  }
267
267
  async function p(d) {
268
- if (await Ds(h.apiServiceUrl, d, l == null ? void 0 : l.accessToken)) {
268
+ if (await Cs(h.apiServiceUrl, d, l == null ? void 0 : l.accessToken)) {
269
269
  const b = s == null ? void 0 : s.filter((f) => f.id !== d);
270
270
  a(b || []), o("original");
271
271
  }
@@ -304,9 +304,9 @@ function Ss({ includeLabel: t = !1 } = {}) {
304
304
  value: r,
305
305
  onValueChange: m,
306
306
  children: [
307
- /* @__PURE__ */ e(Bt, { value: "original", children: "Original" }),
307
+ /* @__PURE__ */ e($t, { value: "original", children: "Original" }),
308
308
  s == null ? void 0 : s.map((d) => /* @__PURE__ */ n(
309
- Bt,
309
+ $t,
310
310
  {
311
311
  className: "group flex justify-between gap-2",
312
312
  value: d.id,
@@ -349,7 +349,7 @@ function Ss({ includeLabel: t = !1 } = {}) {
349
349
  )
350
350
  ] });
351
351
  }
352
- function Is() {
352
+ function Ms() {
353
353
  const { displayPreferences: t, shouldShowElement: s } = nr(), { currentUser: r, userContext: a } = ut(), o = Y(
354
354
  () => or(r),
355
355
  [r]
@@ -373,15 +373,15 @@ function Is() {
373
373
  currentUser: r
374
374
  };
375
375
  }
376
- var pt = "Avatar", [Ms] = qa(pt), Es = [
376
+ var pt = "Avatar", [Es] = qa(pt), As = [
377
377
  0,
378
378
  () => {
379
379
  }
380
- ], [As, ha] = Ms(pt), ht = L.forwardRef(
380
+ ], [Ls, ha] = Es(pt), ht = L.forwardRef(
381
381
  (t, s) => {
382
- const { __scopeAvatar: r, ...a } = t, [o, l] = L.useState("idle"), [h, m] = Ps();
382
+ const { __scopeAvatar: r, ...a } = t, [o, l] = L.useState("idle"), [h, m] = Us();
383
383
  return /* @__PURE__ */ e(
384
- As,
384
+ Ls,
385
385
  {
386
386
  scope: r,
387
387
  imageLoadingStatus: o,
@@ -397,8 +397,8 @@ ht.displayName = pt;
397
397
  var fa = "AvatarImage", ft = L.forwardRef(
398
398
  (t, s) => {
399
399
  const { __scopeAvatar: r, src: a, onLoadingStatusChange: o, ...l } = t, h = ha(fa, r);
400
- Us(h.setImageCount);
401
- const m = Ls(a, {
400
+ Rs(h.setImageCount);
401
+ const m = Ps(a, {
402
402
  referrerPolicy: l.referrerPolicy,
403
403
  crossOrigin: l.crossOrigin,
404
404
  loadingStatus: h.imageLoadingStatus,
@@ -425,7 +425,7 @@ var ga = "AvatarFallback", gt = L.forwardRef(
425
425
  }
426
426
  );
427
427
  gt.displayName = ga;
428
- function Ls(t, {
428
+ function Ps(t, {
429
429
  loadingStatus: s,
430
430
  setLoadingStatus: r,
431
431
  referrerPolicy: a,
@@ -448,8 +448,8 @@ function Ls(t, {
448
448
  function Jt(t) {
449
449
  return t.complete ? t.naturalWidth > 0 ? "loaded" : "error" : "loading";
450
450
  }
451
- function Ps() {
452
- let t = Es;
451
+ function Us() {
452
+ let t = As;
453
453
  {
454
454
  t = L.useState(0);
455
455
  const [s] = t, r = L.useRef(!1);
@@ -461,7 +461,7 @@ function Ps() {
461
461
  }
462
462
  return t;
463
463
  }
464
- function Us(t) {
464
+ function Rs(t) {
465
465
  L.useEffect(() => (t((s) => s + 1), () => {
466
466
  t((s) => s - 1);
467
467
  }), [t]);
@@ -478,7 +478,7 @@ const ba = L.forwardRef(({ className: t, ...s }, r) => /* @__PURE__ */ e(
478
478
  }
479
479
  ));
480
480
  ba.displayName = ht.displayName;
481
- const Rs = L.forwardRef(({ className: t, ...s }, r) => /* @__PURE__ */ e(
481
+ const Vs = L.forwardRef(({ className: t, ...s }, r) => /* @__PURE__ */ e(
482
482
  ft,
483
483
  {
484
484
  ref: r,
@@ -486,7 +486,7 @@ const Rs = L.forwardRef(({ className: t, ...s }, r) => /* @__PURE__ */ e(
486
486
  ...s
487
487
  }
488
488
  ));
489
- Rs.displayName = ft.displayName;
489
+ Vs.displayName = ft.displayName;
490
490
  const xa = L.forwardRef(({ className: t, ...s }, r) => /* @__PURE__ */ e(
491
491
  gt,
492
492
  {
@@ -499,16 +499,16 @@ const xa = L.forwardRef(({ className: t, ...s }, r) => /* @__PURE__ */ e(
499
499
  }
500
500
  ));
501
501
  xa.displayName = gt.displayName;
502
- const Vs = async (t, s, r) => {
502
+ const Fs = async (t, s, r) => {
503
503
  const a = `${t}/management/v1/groups`;
504
504
  return await ta(a, s, r);
505
- }, Fs = async (t, s, r, a) => {
505
+ }, Os = async (t, s, r, a) => {
506
506
  const o = `${t}/management/v1/groups/${r}`;
507
507
  return ct(o, s, "PATCH", a);
508
- }, Os = async (t, s, r) => {
508
+ }, Ts = async (t, s, r) => {
509
509
  const a = `${t}/management/v1/groups/${r}`;
510
510
  await ct(a, s, "DELETE");
511
- }, Ts = async (t, s, r, a) => {
511
+ }, Bs = async (t, s, r, a) => {
512
512
  const o = `${t}/management/v1/groups/${r}/members`;
513
513
  return await ta(o, s, a);
514
514
  }, Gs = async (t, s, r, a) => {
@@ -518,7 +518,7 @@ const Vs = async (t, s, r) => {
518
518
  function $s() {
519
519
  const { authToken: t, tokenProps: s } = z(), r = xe();
520
520
  return ve({
521
- mutationFn: (a) => Vs(s.apiServiceUrl, (t == null ? void 0 : t.accessToken) || "", a),
521
+ mutationFn: (a) => Fs(s.apiServiceUrl, (t == null ? void 0 : t.accessToken) || "", a),
522
522
  onSuccess: () => {
523
523
  r.invalidateQueries({ queryKey: ["groups"] }), C.success("Group created successfully");
524
524
  },
@@ -529,13 +529,13 @@ function $s() {
529
529
  }
530
530
  });
531
531
  }
532
- function Bs() {
532
+ function zs() {
533
533
  const { authToken: t, tokenProps: s } = z(), r = xe();
534
534
  return ve({
535
535
  mutationFn: ({
536
536
  groupId: a,
537
537
  data: o
538
- }) => Fs(s.apiServiceUrl, (t == null ? void 0 : t.accessToken) || "", a, o),
538
+ }) => Os(s.apiServiceUrl, (t == null ? void 0 : t.accessToken) || "", a, o),
539
539
  onSuccess: (a, o) => {
540
540
  r.invalidateQueries({ queryKey: ["group", o.groupId] }), r.invalidateQueries({ queryKey: ["groups"] }), C.success("Group updated successfully");
541
541
  },
@@ -546,10 +546,10 @@ function Bs() {
546
546
  }
547
547
  });
548
548
  }
549
- function zs() {
549
+ function _s() {
550
550
  const { authToken: t, tokenProps: s } = z(), r = xe();
551
551
  return ve({
552
- mutationFn: (a) => Os(s.apiServiceUrl, (t == null ? void 0 : t.accessToken) || "", a),
552
+ mutationFn: (a) => Ts(s.apiServiceUrl, (t == null ? void 0 : t.accessToken) || "", a),
553
553
  onSuccess: (a, o) => {
554
554
  r.invalidateQueries({ queryKey: ["groups"] }), r.removeQueries({ queryKey: ["group", o] }), C.success("Group deleted successfully");
555
555
  },
@@ -560,13 +560,13 @@ function zs() {
560
560
  }
561
561
  });
562
562
  }
563
- function _s() {
563
+ function qs() {
564
564
  const { authToken: t, tokenProps: s } = z(), r = xe();
565
565
  return ve({
566
566
  mutationFn: ({
567
567
  groupId: a,
568
568
  data: o
569
- }) => Ts(s.apiServiceUrl, (t == null ? void 0 : t.accessToken) || "", a, o),
569
+ }) => Bs(s.apiServiceUrl, (t == null ? void 0 : t.accessToken) || "", a, o),
570
570
  onSuccess: (a, o) => {
571
571
  r.invalidateQueries({ queryKey: ["group", o.groupId] }), r.invalidateQueries({
572
572
  queryKey: ["group-members", o.groupId]
@@ -579,7 +579,7 @@ function _s() {
579
579
  }
580
580
  });
581
581
  }
582
- function qs() {
582
+ function Hs() {
583
583
  const { authToken: t, tokenProps: s } = z(), r = xe();
584
584
  return ve({
585
585
  mutationFn: ({
@@ -598,8 +598,8 @@ function qs() {
598
598
  }
599
599
  });
600
600
  }
601
- const Hs = [];
602
- function js({
601
+ const js = [];
602
+ function Ks({
603
603
  open: t,
604
604
  onOpenChange: s
605
605
  }) {
@@ -613,8 +613,8 @@ function js({
613
613
  type: o ? "TENANT_GROUP" : "all",
614
614
  tenantId: o ? l : void 0,
615
615
  includeMembers: !1
616
- }), d = p ? va(p, "Unable to load groups.") : null, [u, b] = N({ kind: "list" }), [f, w] = N(null), y = zs();
617
- $e(() => {
616
+ }), d = p ? va(p, "Unable to load groups.") : null, [u, b] = N({ kind: "list" }), [f, w] = N(null), y = _s();
617
+ Ge(() => {
618
618
  t || (b({ kind: "list" }), w(null));
619
619
  }, [t]);
620
620
  const c = u.kind === "members" && h.find((x) => x.id === u.groupId) || null, M = async () => {
@@ -643,7 +643,7 @@ function js({
643
643
  /* @__PURE__ */ e(nt, { className: "sr-only", children: "Create a new group to organize members." })
644
644
  ] }) : null,
645
645
  u.kind === "list" && /* @__PURE__ */ e(
646
- Ks,
646
+ Qs,
647
647
  {
648
648
  groups: h,
649
649
  isLoading: m,
@@ -656,7 +656,7 @@ function js({
656
656
  }
657
657
  ),
658
658
  u.kind === "members" && c && /* @__PURE__ */ e(
659
- Js,
659
+ Xs,
660
660
  {
661
661
  group: c,
662
662
  isTenantViewer: o,
@@ -671,7 +671,7 @@ function js({
671
671
  c.id
672
672
  ),
673
673
  u.kind === "create" && /* @__PURE__ */ e(
674
- Xs,
674
+ Ys,
675
675
  {
676
676
  isTenantUser: o,
677
677
  tenantId: l,
@@ -707,7 +707,7 @@ function js({
707
707
  disabled: y.isPending,
708
708
  className: "inline-flex h-7 items-center gap-1.5 rounded-[5px] bg-rose-600 px-2.5 text-[12px] font-medium text-white hover:bg-rose-700 disabled:opacity-60",
709
709
  children: [
710
- y.isPending ? /* @__PURE__ */ e(Ge, { className: "h-3 w-3 animate-spin" }) : /* @__PURE__ */ e(mt, { className: "h-3 w-3" }),
710
+ y.isPending ? /* @__PURE__ */ e(Be, { className: "h-3 w-3 animate-spin" }) : /* @__PURE__ */ e(mt, { className: "h-3 w-3" }),
711
711
  "Delete group"
712
712
  ]
713
713
  }
@@ -716,7 +716,7 @@ function js({
716
716
  ] })
717
717
  ] }) });
718
718
  }
719
- function Ks({
719
+ function Qs({
720
720
  groups: t,
721
721
  isLoading: s,
722
722
  errorMessage: r,
@@ -735,7 +735,7 @@ function Ks({
735
735
  return /* @__PURE__ */ n("div", { className: "flex flex-1 flex-col overflow-hidden", children: [
736
736
  /* @__PURE__ */ n("div", { className: "flex shrink-0 items-center gap-2 border-b border-border px-5 py-2.5", children: [
737
737
  /* @__PURE__ */ n("div", { className: "flex flex-1 items-center gap-2 rounded-[5px] border border-border bg-background px-2 focus-within:border-foreground/40", children: [
738
- /* @__PURE__ */ e(ls, { className: "h-3 w-3 text-muted-foreground" }),
738
+ /* @__PURE__ */ e(cs, { className: "h-3 w-3 text-muted-foreground" }),
739
739
  /* @__PURE__ */ e(
740
740
  "input",
741
741
  {
@@ -781,7 +781,7 @@ function Ks({
781
781
  message: r,
782
782
  onRetry: a
783
783
  }
784
- ) : d.length === 0 && t.length === 0 ? /* @__PURE__ */ e(Ws, { onCreate: h }) : d.length === 0 ? /* @__PURE__ */ n("div", { className: "flex h-full flex-col items-center justify-center gap-1 py-10 text-center", children: [
784
+ ) : d.length === 0 && t.length === 0 ? /* @__PURE__ */ e(Js, { onCreate: h }) : d.length === 0 ? /* @__PURE__ */ n("div", { className: "flex h-full flex-col items-center justify-center gap-1 py-10 text-center", children: [
785
785
  /* @__PURE__ */ n("div", { className: "text-[12px] text-foreground", children: [
786
786
  'No groups match "',
787
787
  p,
@@ -791,7 +791,7 @@ function Ks({
791
791
  ] }) : d.map((u) => {
792
792
  var b;
793
793
  return /* @__PURE__ */ e(
794
- Qs,
794
+ Ws,
795
795
  {
796
796
  group: u,
797
797
  canDelete: ((b = u.permissions) == null ? void 0 : b.canDelete) ?? u.createdBy === o,
@@ -803,7 +803,7 @@ function Ks({
803
803
  }) })
804
804
  ] });
805
805
  }
806
- function Qs({
806
+ function Ws({
807
807
  group: t,
808
808
  canDelete: s,
809
809
  onClick: r,
@@ -862,13 +862,13 @@ function Qs({
862
862
  children: /* @__PURE__ */ e(mt, { className: "h-3 w-3" })
863
863
  }
864
864
  ),
865
- /* @__PURE__ */ e(cs, { className: "h-3.5 w-3.5 text-muted-foreground" })
865
+ /* @__PURE__ */ e(us, { className: "h-3.5 w-3.5 text-muted-foreground" })
866
866
  ] })
867
867
  ]
868
868
  }
869
869
  );
870
870
  }
871
- function Ws({ onCreate: t }) {
871
+ function Js({ onCreate: t }) {
872
872
  return /* @__PURE__ */ n("div", { className: "flex h-full flex-col items-center justify-center gap-2 py-12 text-center", children: [
873
873
  /* @__PURE__ */ e("div", { className: "flex h-9 w-9 items-center justify-center rounded-full border border-border bg-muted/40 text-muted-foreground", children: /* @__PURE__ */ e(da, { className: "h-4 w-4" }) }),
874
874
  /* @__PURE__ */ e("div", { className: "text-[13px] font-medium text-foreground", children: "No groups yet" }),
@@ -887,7 +887,7 @@ function Ws({ onCreate: t }) {
887
887
  )
888
888
  ] });
889
889
  }
890
- function Js({
890
+ function Xs({
891
891
  group: t,
892
892
  isTenantViewer: s,
893
893
  canEdit: r,
@@ -903,7 +903,7 @@ function Js({
903
903
  isLoading: d,
904
904
  error: u,
905
905
  refetch: b
906
- } = pr(t.id), f = (v == null ? void 0 : v.members) ?? Hs, w = u ? va(u, "Unable to load members for this group.") : null, y = t.type === "TENANT_GROUP" ? "tenant" : "organization", { users: c } = hr({
906
+ } = pr(t.id), f = (v == null ? void 0 : v.members) ?? js, w = u ? va(u, "Unable to load members for this group.") : null, y = t.type === "TENANT_GROUP" ? "tenant" : "organization", { users: c } = hr({
907
907
  type: y,
908
908
  tenantId: t.tenantId || void 0,
909
909
  active: !0,
@@ -911,7 +911,7 @@ function Js({
911
911
  }), M = Y(
912
912
  () => new Set(f.map((g) => g.userId)),
913
913
  [f]
914
- ), S = _s(), P = qs(), k = Bs(), [x, _] = N(!1), [q, j] = N(t.name), [Be, K] = N(!1), [te, Q] = N(t.description || ""), [ae, re] = N(""), [ye, ee] = N(!1), ze = Y(() => {
914
+ ), S = qs(), P = Hs(), k = zs(), [x, _] = N(!1), [q, j] = N(t.name), [$e, K] = N(!1), [te, Q] = N(t.description || ""), [ae, re] = N(""), [ye, ee] = N(!1), ze = Y(() => {
915
915
  const g = ae.trim().toLowerCase();
916
916
  return c.filter((R) => !M.has(R.id)).filter(
917
917
  (R) => !g || (R.name || "").toLowerCase().includes(g) || (R.email || "").toLowerCase().includes(g)
@@ -960,11 +960,11 @@ function Js({
960
960
  } catch {
961
961
  }
962
962
  };
963
- let G = "";
963
+ let B = "";
964
964
  try {
965
- G = ua(new Date(t.createdAt), "MMM d, yyyy");
965
+ B = ua(new Date(t.createdAt), "MMM d, yyyy");
966
966
  } catch {
967
- G = "";
967
+ B = "";
968
968
  }
969
969
  return /* @__PURE__ */ n("div", { className: "flex flex-1 flex-col overflow-hidden", children: [
970
970
  /* @__PURE__ */ n("div", { className: "flex h-10 shrink-0 items-center gap-1.5 border-b border-border px-5", children: [
@@ -1010,7 +1010,7 @@ function Js({
1010
1010
  f.length === 1 ? "" : "s"
1011
1011
  ] })
1012
1012
  ] }),
1013
- /* @__PURE__ */ e("div", { className: "shrink-0 border-b border-border px-5 py-2.5", children: Be ? /* @__PURE__ */ n("div", { children: [
1013
+ /* @__PURE__ */ e("div", { className: "shrink-0 border-b border-border px-5 py-2.5", children: $e ? /* @__PURE__ */ n("div", { children: [
1014
1014
  /* @__PURE__ */ e(
1015
1015
  "textarea",
1016
1016
  {
@@ -1067,14 +1067,14 @@ function Js({
1067
1067
  children: [
1068
1068
  t.description ? /* @__PURE__ */ e("p", { className: "text-[12px] leading-[1.55] text-foreground/90", children: t.description }) : /* @__PURE__ */ e("p", { className: "text-[12px] leading-[1.55] text-muted-foreground", children: r ? "Add a description…" : "No description" }),
1069
1069
  /* @__PURE__ */ n("p", { className: "mt-1 text-[10.5px] text-muted-foreground", children: [
1070
- G ? `Created ${G}` : "Recently created",
1070
+ B ? `Created ${B}` : "Recently created",
1071
1071
  r ? " · You can edit this group" : ""
1072
1072
  ] })
1073
1073
  ]
1074
1074
  }
1075
1075
  ) }),
1076
1076
  o && /* @__PURE__ */ e(
1077
- Ys,
1077
+ Zs,
1078
1078
  {
1079
1079
  query: ae,
1080
1080
  setQuery: re,
@@ -1145,7 +1145,7 @@ function Js({
1145
1145
  ) })
1146
1146
  ] });
1147
1147
  }
1148
- function Xs({
1148
+ function Ys({
1149
1149
  isTenantUser: t,
1150
1150
  tenantId: s,
1151
1151
  onCancel: r,
@@ -1221,7 +1221,7 @@ function Xs({
1221
1221
  disabled: !u || d.isPending,
1222
1222
  className: "inline-flex h-7 items-center gap-1.5 rounded-[5px] bg-foreground px-2.5 text-[12px] font-medium text-background hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-60",
1223
1223
  children: d.isPending ? /* @__PURE__ */ n(T, { children: [
1224
- /* @__PURE__ */ e(Ge, { className: "h-3 w-3 animate-spin" }),
1224
+ /* @__PURE__ */ e(Be, { className: "h-3 w-3 animate-spin" }),
1225
1225
  "Creating…"
1226
1226
  ] }) : /* @__PURE__ */ n(T, { children: [
1227
1227
  /* @__PURE__ */ e(H, { className: "h-3 w-3" }),
@@ -1232,7 +1232,7 @@ function Xs({
1232
1232
  ] })
1233
1233
  ] });
1234
1234
  }
1235
- function Ys({
1235
+ function Zs({
1236
1236
  query: t,
1237
1237
  setQuery: s,
1238
1238
  open: r,
@@ -1243,7 +1243,7 @@ function Ys({
1243
1243
  busy: m
1244
1244
  }) {
1245
1245
  const p = Qt(null), v = Qt(null), [d, u] = N(null);
1246
- Xr(() => {
1246
+ Yr(() => {
1247
1247
  if (!r) {
1248
1248
  u(null);
1249
1249
  return;
@@ -1262,7 +1262,7 @@ function Ys({
1262
1262
  return f(), window.addEventListener("resize", f), window.addEventListener("scroll", f, !0), () => {
1263
1263
  window.removeEventListener("resize", f), window.removeEventListener("scroll", f, !0);
1264
1264
  };
1265
- }, [r, o.length]), $e(() => {
1265
+ }, [r, o.length]), Ge(() => {
1266
1266
  if (!r) return;
1267
1267
  const f = (w) => {
1268
1268
  var c, M;
@@ -1279,7 +1279,7 @@ function Ys({
1279
1279
  ref: p,
1280
1280
  className: "flex items-center gap-2 rounded-[5px] border border-border bg-background px-2 focus-within:border-foreground/40",
1281
1281
  children: [
1282
- /* @__PURE__ */ e(ys, { className: "h-3 w-3 text-muted-foreground" }),
1282
+ /* @__PURE__ */ e(ws, { className: "h-3 w-3 text-muted-foreground" }),
1283
1283
  /* @__PURE__ */ e(
1284
1284
  "input",
1285
1285
  {
@@ -1296,7 +1296,7 @@ function Ys({
1296
1296
  ]
1297
1297
  }
1298
1298
  ),
1299
- b && typeof document < "u" && Zr(
1299
+ b && typeof document < "u" && es(
1300
1300
  /* @__PURE__ */ e(
1301
1301
  "div",
1302
1302
  {
@@ -1382,7 +1382,7 @@ function he(t, s) {
1382
1382
  var r;
1383
1383
  return ((r = aa(t, s)) == null ? void 0 : r.title) || s;
1384
1384
  }
1385
- function Zs(t) {
1385
+ function en(t) {
1386
1386
  const { errors: s, dashboard: r } = t;
1387
1387
  if (!r)
1388
1388
  return s;
@@ -1467,7 +1467,7 @@ function Zs(t) {
1467
1467
  }
1468
1468
  return Array.from(a.values());
1469
1469
  }
1470
- function en({
1470
+ function tn({
1471
1471
  visible: t,
1472
1472
  onSelect: s
1473
1473
  }) {
@@ -1476,7 +1476,7 @@ function en({
1476
1476
  "Schedule email report"
1477
1477
  ] }) : null;
1478
1478
  }
1479
- function tn({
1479
+ function an({
1480
1480
  scheduleReportVisible: t,
1481
1481
  analyticalBriefingVisible: s,
1482
1482
  onScheduleReport: r,
@@ -1484,7 +1484,7 @@ function tn({
1484
1484
  }) {
1485
1485
  return /* @__PURE__ */ n(T, { children: [
1486
1486
  /* @__PURE__ */ e(
1487
- en,
1487
+ tn,
1488
1488
  {
1489
1489
  visible: t,
1490
1490
  onSelect: r
@@ -1502,28 +1502,28 @@ function Yt(t, s) {
1502
1502
  semanticExecutionPayload: ot(s)
1503
1503
  };
1504
1504
  }
1505
- function Dn() {
1505
+ function Cn() {
1506
1506
  var Pt, Ut, Rt, Vt, Ft, Ot, Tt;
1507
- es(), ts();
1507
+ ts(), as();
1508
1508
  const {
1509
1509
  authToken: t,
1510
1510
  tokenProps: s,
1511
1511
  id: r,
1512
1512
  showBriefings: a
1513
- } = z(), o = br(), { isLocalDev: l } = xr(), { openBrandStudioPreview: h } = vr(), { permissions: m } = Is(), p = yr(), { isLoading: v } = wr(), d = D((i) => i.theme), u = D((i) => i.isDownloadingPdf), b = D(
1513
+ } = z(), o = br(), { isLocalDev: l } = xr(), { openBrandStudioPreview: h } = vr(), { permissions: m } = Ms(), p = yr(), { isLoading: v } = wr(), d = D((i) => i.theme), u = D((i) => i.isDownloadingPdf), b = D(
1514
1514
  (i) => i.dashboardAssistantDraftScopeKey
1515
1515
  ), f = D((i) => i.lenses), w = D((i) => i.selectedLensId), y = f == null ? void 0 : f.find((i) => i.id === w), c = D((i) => i.dashboard), M = D((i) => i.selectedSheetId), S = (Pt = c == null ? void 0 : c.sheets) == null ? void 0 : Pt.find(
1516
1516
  (i) => i.id === M
1517
1517
  ), P = ja(S), k = P ? (Ut = S == null ? void 0 : S.document) == null ? void 0 : Ut.page : void 0, x = D(
1518
1518
  (i) => i.isDashboardEditing
1519
- ), { setDashboardTitle: _ } = D((i) => i.actions), [q, j] = N(!1), [Be, K] = N(!1), [te, Q] = N(!1), [ae, re] = N(!1), [ye, ee] = N(null), [ze, se] = N(!1), [we, Ne] = N(!1), [_e, G] = N(!1), [g, R] = N(null), [ne, W] = N([]), [oe, J] = N(!1), [De, bt] = N(!1), xt = D((i) => i.filterValues), E = D((i) => i.isVisualEditing);
1520
- $t((i) => i.card);
1519
+ ), { setDashboardTitle: _ } = D((i) => i.actions), [q, j] = N(!1), [$e, K] = N(!1), [te, Q] = N(!1), [ae, re] = N(!1), [ye, ee] = N(null), [ze, se] = N(!1), [we, Ne] = N(!1), [_e, B] = N(!1), [g, R] = N(null), [ne, W] = N([]), [oe, J] = N(!1), [De, bt] = N(!1), xt = D((i) => i.filterValues), E = D((i) => i.isVisualEditing);
1520
+ Gt((i) => i.card);
1521
1521
  const ie = Fe(
1522
1522
  (i) => i.selectedDashboard
1523
1523
  ), Ce = Fe(
1524
1524
  (i) => i.initialDashboard
1525
1525
  );
1526
- Fe((i) => i.selectedVisual), D((i) => i.selectedFrameId), $t((i) => i.frame);
1526
+ Fe((i) => i.selectedVisual), D((i) => i.selectedFrameId), Gt((i) => i.frame);
1527
1527
  const ke = ie ? (Vt = ie == null ? void 0 : ie.permissions) == null ? void 0 : Vt.canEdit : (Rt = Ce == null ? void 0 : Ce.permissions) == null ? void 0 : Rt.canEdit, vt = D(
1528
1528
  (i) => i.showDashboardJSON
1529
1529
  ), qe = D((i) => i.onSaveFunction), {
@@ -1531,14 +1531,14 @@ function Dn() {
1531
1531
  setShowDashboardJSON: wt
1532
1532
  } = D((i) => i.actions), { setInitialDashboard: Nt, clearSelectedDashboard: He } = Fe(
1533
1533
  (i) => i.actions
1534
- ), de = !!s.orgUserId || !!(s.tenantId && s.endUserId && s.endUserEmail), { resources: Se } = Nr(at.DASHBOARD), { data: je } = Dr(), Na = ((Ft = je == null ? void 0 : je.preference) == null ? void 0 : Ft.defaultDashboardId) || null, { mutate: Da, isPending: Ca } = Cr(), { currentUser: ka } = ut(), Sa = kr(ka), $ = ie || Ce, Ie = Sr({
1534
+ ), de = !!s.orgUserId || !!(s.tenantId && s.endUserId && s.endUserEmail), { resources: Se } = Nr(at.DASHBOARD), { data: je } = Dr(), Na = ((Ft = je == null ? void 0 : je.preference) == null ? void 0 : Ft.defaultDashboardId) || null, { mutate: Da, isPending: Ca } = Cr(), { currentUser: ka } = ut(), Sa = kr(ka), G = ie || Ce, Ie = Sr({
1535
1535
  config: s.config,
1536
1536
  canNavigateDashboardHub: de,
1537
- canShareDashboard: ((Ot = $ == null ? void 0 : $.permissions) == null ? void 0 : Ot.canShare) === !0,
1537
+ canShareDashboard: ((Ot = G == null ? void 0 : G.permissions) == null ? void 0 : Ot.canShare) === !0,
1538
1538
  canManageGroups: Sa
1539
- }), Dt = $ ? {
1540
- id: $.id,
1541
- title: (c == null ? void 0 : c.title) || $.title || "Dashboard"
1539
+ }), Dt = G ? {
1540
+ id: G.id,
1541
+ title: (c == null ? void 0 : c.title) || G.title || "Dashboard"
1542
1542
  } : null, { handleAddNewFrame: Ia } = Ir(), [Ke, Qe] = N(!1), [Ma, le] = N(!1), [We, Me] = N("close"), ce = Mr(at.DASHBOARD), [V, Ee] = N(null), Ea = async (i, I) => {
1543
1543
  if (!(c != null && c.id)) {
1544
1544
  console.log("No dashboard ID found");
@@ -1563,7 +1563,7 @@ function Dn() {
1563
1563
  }
1564
1564
  );
1565
1565
  };
1566
- $e(() => {
1566
+ Ge(() => {
1567
1567
  if (Se && Se.length > 0) {
1568
1568
  const i = c == null ? void 0 : c.id;
1569
1569
  if (i) {
@@ -1575,7 +1575,7 @@ function Dn() {
1575
1575
  }
1576
1576
  }, [Se, c == null ? void 0 : c.id, Nt]);
1577
1577
  const ue = s.orgUserId || s.tenantId, Je = Y(
1578
- () => an({
1578
+ () => rn({
1579
1579
  accessToken: t == null ? void 0 : t.accessToken,
1580
1580
  dashboardId: (c == null ? void 0 : c.id) || r || s.dashboard_id,
1581
1581
  selectedSheetId: P ? M : void 0,
@@ -1601,7 +1601,7 @@ function Dn() {
1601
1601
  }, Xe = () => {
1602
1602
  yt(!1), wt(!1), Ee(null);
1603
1603
  };
1604
- $e(() => {
1604
+ Ge(() => {
1605
1605
  if (!x) {
1606
1606
  V && Ee(null);
1607
1607
  return;
@@ -1619,13 +1619,13 @@ function Dn() {
1619
1619
  v,
1620
1620
  St
1621
1621
  ]);
1622
- const Ae = (V == null ? void 0 : V.dashboard) ?? null, { isDirty: It, isDirtyPending: La, resetDirty: Le } = ms(
1622
+ const Ae = (V == null ? void 0 : V.dashboard) ?? null, { isDirty: It, isDirtyPending: La, resetDirty: Le } = ps(
1623
1623
  c,
1624
1624
  Ae,
1625
1625
  300,
1626
1626
  1e3,
1627
1627
  rt
1628
- ), Mt = Yr(() => Ae ? rt(c) !== rt(Ae) : !1, [c, Ae]), Et = It || La, Pe = Ke || ce.isPending, Pa = () => {
1628
+ ), Mt = Zr(() => Ae ? rt(c) !== rt(Ae) : !1, [c, Ae]), Et = It || La, Pe = Ke || ce.isPending, Pa = () => {
1629
1629
  Mt() ? (Me("close"), le(!0)) : (Xe(), Le());
1630
1630
  }, Ua = async () => {
1631
1631
  await Ye({
@@ -1657,19 +1657,19 @@ function Dn() {
1657
1657
  const F = (i == null ? void 0 : i.closeAfterSave) ?? oe, Ze = (i == null ? void 0 : i.navigateHomeAfterSave) ?? !1;
1658
1658
  J(F), F && le(!1);
1659
1659
  const et = ot(I);
1660
- G(!0), R(null), W([]), Qe(!0);
1661
- const Ba = {
1660
+ B(!0), R(null), W([]), Qe(!0);
1661
+ const $a = {
1662
1662
  template: I
1663
1663
  };
1664
1664
  ce.mutate(
1665
1665
  {
1666
1666
  resourceId: I.id,
1667
- data: Ba
1667
+ data: $a
1668
1668
  },
1669
1669
  {
1670
1670
  onSuccess: (A) => {
1671
- var Ue, Re, Gt;
1672
- const X = (A == null ? void 0 : A.id) || ((Ue = A == null ? void 0 : A.dashboard) == null ? void 0 : Ue.id) || ((Re = A == null ? void 0 : A.resource) == null ? void 0 : Re.id) || ((Gt = A == null ? void 0 : A.template) == null ? void 0 : Gt.id) || null;
1671
+ var Ue, Re, Bt;
1672
+ const X = (A == null ? void 0 : A.id) || ((Ue = A == null ? void 0 : A.dashboard) == null ? void 0 : Ue.id) || ((Re = A == null ? void 0 : A.resource) == null ? void 0 : Re.id) || ((Bt = A == null ? void 0 : A.template) == null ? void 0 : Bt.id) || null;
1673
1673
  if (!I.id && X) {
1674
1674
  const tt = Ya.getState(), Ve = tt.pendingDashboardDraftMigration;
1675
1675
  (Ve == null ? void 0 : Ve.scopeKey) === b ? tt.actions.setPendingDashboardDraftMigrationExpectedDashboardId(
@@ -1681,7 +1681,7 @@ function Dn() {
1681
1681
  et,
1682
1682
  D.getState().semanticExecutionPayload
1683
1683
  )
1684
- ), G(!1), J(!1), F && (Xe(), Le(), Ze && de && He()), Me("close");
1684
+ ), B(!1), J(!1), F && (Xe(), Le(), Ze && de && He()), Me("close");
1685
1685
  },
1686
1686
  onError: (A) => {
1687
1687
  Qe(!1), R("Failed to save dashboard. Please try again.");
@@ -1691,7 +1691,7 @@ function Dn() {
1691
1691
  (Re) => typeof Re == "string"
1692
1692
  ) : [];
1693
1693
  W(
1694
- Zs({
1694
+ en({
1695
1695
  errors: Ue,
1696
1696
  dashboard: I || void 0
1697
1697
  })
@@ -1733,12 +1733,12 @@ function Dn() {
1733
1733
  dashboardId: c == null ? void 0 : c.id,
1734
1734
  currentLensName: y == null ? void 0 : y.name
1735
1735
  });
1736
- const Ta = de && !!(t != null && t.accessToken) && !!(s != null && s.apiServiceUrl), Ga = p && Ie.showDashboardHub, B = (c == null ? void 0 : c.id) || null, Lt = Er(
1736
+ const Ta = de && !!(t != null && t.accessToken) && !!(s != null && s.apiServiceUrl), Ba = p && Ie.showDashboardHub, $ = (c == null ? void 0 : c.id) || null, Lt = Er(
1737
1737
  (Tt = s.config) == null ? void 0 : Tt.showBriefings,
1738
1738
  a
1739
- ), me = !!B && Na === B, $a = () => {
1740
- B && Da({
1741
- dashboardId: me ? null : B
1739
+ ), me = !!$ && Na === $, Ga = () => {
1740
+ $ && Da({
1741
+ dashboardId: me ? null : $
1742
1742
  });
1743
1743
  };
1744
1744
  return !p && !E ? null : /* @__PURE__ */ n(
@@ -1748,7 +1748,7 @@ function Dn() {
1748
1748
  role: "dashboard-controls",
1749
1749
  children: [
1750
1750
  /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
1751
- Ga && !E && /* @__PURE__ */ e(
1751
+ Ba && !E && /* @__PURE__ */ e(
1752
1752
  zt,
1753
1753
  {
1754
1754
  "aria-label": "Dashboard Hub",
@@ -1781,7 +1781,11 @@ function Dn() {
1781
1781
  const I = (c == null ? void 0 : c.title) || "";
1782
1782
  _(i), Ea(i, I);
1783
1783
  },
1784
- isEditable: ke && !y,
1784
+ isEditable: Lr({
1785
+ isDashboardEditing: x,
1786
+ canEditDashboard: ke === !0,
1787
+ hasCurrentLens: !!y
1788
+ }),
1785
1789
  displayClassName: "text-[13px] font-medium",
1786
1790
  inputClassName: "text-[13px] font-medium",
1787
1791
  placeholder: "Dashboard Title",
@@ -1796,17 +1800,17 @@ function Dn() {
1796
1800
  children: "Default"
1797
1801
  }
1798
1802
  ),
1799
- Ta && B && /* @__PURE__ */ e(Ka, { children: /* @__PURE__ */ n(Qa, { children: [
1803
+ Ta && $ && /* @__PURE__ */ e(Ka, { children: /* @__PURE__ */ n(Qa, { children: [
1800
1804
  /* @__PURE__ */ e(Wa, { asChild: !0, children: /* @__PURE__ */ e(
1801
1805
  U,
1802
1806
  {
1803
1807
  variant: "ghost",
1804
1808
  size: "xs",
1805
- onClick: $a,
1809
+ onClick: Ga,
1806
1810
  disabled: Ca || !(t != null && t.accessToken) || !(s != null && s.apiServiceUrl),
1807
1811
  className: "w-7 px-0 text-muted-foreground hover:text-foreground",
1808
1812
  "aria-label": me ? "Clear default dashboard" : "Set as default dashboard",
1809
- children: me ? /* @__PURE__ */ e(Lr, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ e(Pr, { className: "h-3.5 w-3.5" })
1813
+ children: me ? /* @__PURE__ */ e(Pr, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ e(Ur, { className: "h-3.5 w-3.5" })
1810
1814
  }
1811
1815
  ) }),
1812
1816
  /* @__PURE__ */ e(Ja, { children: /* @__PURE__ */ e("p", { children: me ? "Clear default" : "Set as default" }) })
@@ -1815,8 +1819,8 @@ function Dn() {
1815
1819
  ] }),
1816
1820
  /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
1817
1821
  E && /* @__PURE__ */ n(T, { children: [
1818
- /* @__PURE__ */ e(as, {}),
1819
- /* @__PURE__ */ e(rs, {})
1822
+ /* @__PURE__ */ e(rs, {}),
1823
+ /* @__PURE__ */ e(ss, {})
1820
1824
  ] }),
1821
1825
  !E && p && Ie.showDashboardSharing && /* @__PURE__ */ n(
1822
1826
  U,
@@ -1825,12 +1829,12 @@ function Dn() {
1825
1829
  size: "xs",
1826
1830
  onClick: () => K(!0),
1827
1831
  children: [
1828
- /* @__PURE__ */ e(Ur, { className: "h-3.5 w-3.5" }),
1832
+ /* @__PURE__ */ e(Rr, { className: "h-3.5 w-3.5" }),
1829
1833
  "Share"
1830
1834
  ]
1831
1835
  }
1832
1836
  ),
1833
- !E && x && m.canUseFilters && p && /* @__PURE__ */ e(ss, {}),
1837
+ !E && x && m.canUseFilters && p && /* @__PURE__ */ e(ns, {}),
1834
1838
  x && !E && ue && y && l && p && /* @__PURE__ */ n(
1835
1839
  U,
1836
1840
  {
@@ -1868,7 +1872,7 @@ function Dn() {
1868
1872
  className: "h-full w-7 rounded-none border-0 border-l border-border/60 px-0 shadow-none hover:bg-accent",
1869
1873
  "aria-label": "Open visual options",
1870
1874
  disabled: !x,
1871
- children: /* @__PURE__ */ e(Jr, { className: "h-3.5 w-3.5" })
1875
+ children: /* @__PURE__ */ e(Xr, { className: "h-3.5 w-3.5" })
1872
1876
  }
1873
1877
  ) }),
1874
1878
  /* @__PURE__ */ e(
@@ -1884,7 +1888,7 @@ function Dn() {
1884
1888
  )
1885
1889
  ] }),
1886
1890
  /* @__PURE__ */ e(
1887
- ns,
1891
+ os,
1888
1892
  {
1889
1893
  open: De,
1890
1894
  onOpenChange: bt
@@ -1892,7 +1896,7 @@ function Dn() {
1892
1896
  )
1893
1897
  ] }),
1894
1898
  !E && !x && ke && p && /* @__PURE__ */ n(U, { size: "xs", onClick: Aa, children: [
1895
- /* @__PURE__ */ e(Rr, { className: "h-3.5 w-3.5" }),
1899
+ /* @__PURE__ */ e(Vr, { className: "h-3.5 w-3.5" }),
1896
1900
  "Edit"
1897
1901
  ] }),
1898
1902
  Ct && p && It && /* @__PURE__ */ n(
@@ -1903,7 +1907,7 @@ function Dn() {
1903
1907
  onClick: Va,
1904
1908
  disabled: Pe,
1905
1909
  children: [
1906
- /* @__PURE__ */ e(Vr, { className: "h-3.5 w-3.5" }),
1910
+ /* @__PURE__ */ e(Fr, { className: "h-3.5 w-3.5" }),
1907
1911
  "Undo"
1908
1912
  ]
1909
1913
  }
@@ -1916,7 +1920,7 @@ function Dn() {
1916
1920
  disabled: Pe || !Et,
1917
1921
  onClick: () => Ye(),
1918
1922
  children: [
1919
- Pe ? /* @__PURE__ */ e(Ge, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ e(Wt, { className: "h-3.5 w-3.5" }),
1923
+ Pe ? /* @__PURE__ */ e(Be, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ e(Wt, { className: "h-3.5 w-3.5" }),
1920
1924
  Pe ? "Saving..." : "Save"
1921
1925
  ]
1922
1926
  }
@@ -1925,8 +1929,8 @@ function Dn() {
1925
1929
  /* @__PURE__ */ e(oa, { className: "h-3.5 w-3.5" }),
1926
1930
  "Close"
1927
1931
  ] }),
1928
- !E && p && /* @__PURE__ */ e("div", { className: "ml-2", children: /* @__PURE__ */ e(os, {}) }),
1929
- !E && l && /* @__PURE__ */ e(ws, {}),
1932
+ !E && p && /* @__PURE__ */ e("div", { className: "ml-2", children: /* @__PURE__ */ e(is, {}) }),
1933
+ !E && l && /* @__PURE__ */ e(Ns, {}),
1930
1934
  !E && p && /* @__PURE__ */ n(_t, { children: [
1931
1935
  /* @__PURE__ */ e(qt, { asChild: !0, children: /* @__PURE__ */ e(
1932
1936
  zt,
@@ -1938,7 +1942,7 @@ function Dn() {
1938
1942
  variant: "ghost",
1939
1943
  "aria-label": "More dashboard options"
1940
1944
  },
1941
- children: /* @__PURE__ */ e(Fr, { className: "h-3.5 w-3.5" })
1945
+ children: /* @__PURE__ */ e(Or, { className: "h-3.5 w-3.5" })
1942
1946
  }
1943
1947
  ) }),
1944
1948
  /* @__PURE__ */ n(
@@ -1954,16 +1958,16 @@ function Dn() {
1954
1958
  disabled: u,
1955
1959
  onSelect: () => Ne(!0),
1956
1960
  children: [
1957
- /* @__PURE__ */ e(Or, { className: "h-3.5 w-3.5" }),
1961
+ /* @__PURE__ */ e(Tr, { className: "h-3.5 w-3.5" }),
1958
1962
  "Export"
1959
1963
  ]
1960
1964
  }
1961
1965
  ),
1962
1966
  /* @__PURE__ */ e(
1963
- tn,
1967
+ an,
1964
1968
  {
1965
- scheduleReportVisible: !!(Lt && o.surfaceVisible && B && !x),
1966
- analyticalBriefingVisible: !!(Lt && o.surfaceVisible && B && !x),
1969
+ scheduleReportVisible: !!(Lt && o.surfaceVisible && $ && !x),
1970
+ analyticalBriefingVisible: !!(Lt && o.surfaceVisible && $ && !x),
1967
1971
  onScheduleReport: () => ee("scheduled_report"),
1968
1972
  onCreateAnalyticalBriefing: () => ee("analytical_briefing")
1969
1973
  }
@@ -2039,13 +2043,13 @@ function Dn() {
2039
2043
  {
2040
2044
  onSelect: () => Xa(s.apiServiceUrl),
2041
2045
  children: [
2042
- /* @__PURE__ */ e(xs, { className: "h-3.5 w-3.5" }),
2046
+ /* @__PURE__ */ e(vs, { className: "h-3.5 w-3.5" }),
2043
2047
  "Invalidate token"
2044
2048
  ]
2045
2049
  }
2046
2050
  ),
2047
2051
  /* @__PURE__ */ n(O, { onSelect: h, children: [
2048
- /* @__PURE__ */ e(ps, { className: "h-3.5 w-3.5" }),
2052
+ /* @__PURE__ */ e(hs, { className: "h-3.5 w-3.5" }),
2049
2053
  "Brand Studio"
2050
2054
  ] }),
2051
2055
  x && /* @__PURE__ */ n(
@@ -2053,7 +2057,7 @@ function Dn() {
2053
2057
  {
2054
2058
  onSelect: () => wt(!vt),
2055
2059
  children: [
2056
- /* @__PURE__ */ e(hs, { className: "h-3.5 w-3.5" }),
2060
+ /* @__PURE__ */ e(fs, { className: "h-3.5 w-3.5" }),
2057
2061
  vt ? "Hide dashboard JSON" : "Show dashboard JSON"
2058
2062
  ]
2059
2063
  }
@@ -2062,20 +2066,20 @@ function Dn() {
2062
2066
  /* @__PURE__ */ e(H, { className: "h-3.5 w-3.5" }),
2063
2067
  "Add lens"
2064
2068
  ] }),
2065
- ue && /* @__PURE__ */ n(Tr, { children: [
2069
+ ue && /* @__PURE__ */ n(Br, { children: [
2066
2070
  /* @__PURE__ */ n(Gr, { children: [
2067
- /* @__PURE__ */ e(fs, { className: "h-3.5 w-3.5" }),
2071
+ /* @__PURE__ */ e(gs, { className: "h-3.5 w-3.5" }),
2068
2072
  "Lenses"
2069
2073
  ] }),
2070
- /* @__PURE__ */ e($r, { className: "w-60", children: /* @__PURE__ */ e(Ss, {}) })
2074
+ /* @__PURE__ */ e($r, { className: "w-60", children: /* @__PURE__ */ e(Is, {}) })
2071
2075
  ] })
2072
2076
  ] })
2073
2077
  ]
2074
2078
  }
2075
2079
  )
2076
2080
  ] }),
2077
- Be && Dt && /* @__PURE__ */ e(
2078
- Br,
2081
+ $e && Dt && /* @__PURE__ */ e(
2082
+ zr,
2079
2083
  {
2080
2084
  resource: Dt,
2081
2085
  resourceType: at.DASHBOARD,
@@ -2083,24 +2087,24 @@ function Dn() {
2083
2087
  }
2084
2088
  ),
2085
2089
  Ie.showGroupManagement && /* @__PURE__ */ e(
2086
- js,
2090
+ Ks,
2087
2091
  {
2088
2092
  open: te,
2089
2093
  onOpenChange: Q
2090
2094
  }
2091
2095
  ),
2092
2096
  /* @__PURE__ */ e(
2093
- us,
2097
+ ms,
2094
2098
  {
2095
2099
  open: ae,
2096
2100
  onOpenChange: re
2097
2101
  }
2098
2102
  ),
2099
- B && ye ? /* @__PURE__ */ e(
2100
- is,
2103
+ $ && ye ? /* @__PURE__ */ e(
2104
+ ds,
2101
2105
  {
2102
- dashboardId: B,
2103
- dashboardTitle: (c == null ? void 0 : c.title) || ($ == null ? void 0 : $.title),
2106
+ dashboardId: $,
2107
+ dashboardTitle: (c == null ? void 0 : c.title) || (G == null ? void 0 : G.title),
2104
2108
  open: !0,
2105
2109
  onOpenChange: (i) => {
2106
2110
  i || ee(null);
@@ -2109,36 +2113,36 @@ function Dn() {
2109
2113
  workflowIntent: ye
2110
2114
  }
2111
2115
  ) : null,
2112
- l && ue && p && /* @__PURE__ */ e(ks, { open: ze, onOpenChange: se }),
2116
+ l && ue && p && /* @__PURE__ */ e(Ss, { open: ze, onOpenChange: se }),
2113
2117
  p && /* @__PURE__ */ e(
2114
- zr,
2118
+ _r,
2115
2119
  {
2116
2120
  open: we,
2117
2121
  onOpenChange: Ne
2118
2122
  }
2119
2123
  ),
2120
2124
  /* @__PURE__ */ e(
2121
- _r,
2125
+ qr,
2122
2126
  {
2123
2127
  open: _e,
2124
2128
  onOpenChange: (i) => {
2125
- !i && Ke && !g || (G(i), i || (R(null), W([]), J(!1)));
2129
+ !i && Ke && !g || (B(i), i || (R(null), W([]), J(!1)));
2126
2130
  },
2127
- children: /* @__PURE__ */ n(qr, { className: "max-w-sm", children: [
2128
- /* @__PURE__ */ n(Hr, { children: [
2129
- /* @__PURE__ */ e(jr, { children: g ? "Save failed" : "Saving dashboard" }),
2130
- /* @__PURE__ */ e(Kr, { className: "pt-2", children: g ? "We could not save the dashboard. Please try again." : "Please wait while we save your changes." }),
2131
+ children: /* @__PURE__ */ n(Hr, { className: "max-w-sm", children: [
2132
+ /* @__PURE__ */ n(jr, { children: [
2133
+ /* @__PURE__ */ e(Kr, { children: g ? "Save failed" : "Saving dashboard" }),
2134
+ /* @__PURE__ */ e(Qr, { className: "pt-2", children: g ? "We could not save the dashboard. Please try again." : "Please wait while we save your changes." }),
2131
2135
  ne.length > 0 && /* @__PURE__ */ n("div", { className: "space-y-1 rounded-md border border-destructive/20 bg-destructive/5 p-3 text-left", children: [
2132
2136
  /* @__PURE__ */ e("div", { className: "text-sm font-medium text-destructive", children: "What needs attention" }),
2133
2137
  /* @__PURE__ */ e("ul", { className: "list-disc space-y-1 pl-4 text-xs text-muted-foreground", children: ne.slice(0, 5).map((i) => /* @__PURE__ */ e("li", { children: i }, i)) })
2134
2138
  ] })
2135
2139
  ] }),
2136
- /* @__PURE__ */ e(Qr, { className: "flex-col gap-2 sm:flex-row sm:justify-end", children: g ? /* @__PURE__ */ n(T, { children: [
2140
+ /* @__PURE__ */ e(Wr, { className: "flex-col gap-2 sm:flex-row sm:justify-end", children: g ? /* @__PURE__ */ n(T, { children: [
2137
2141
  /* @__PURE__ */ e(
2138
- Wr,
2142
+ Jr,
2139
2143
  {
2140
2144
  onClick: () => {
2141
- G(!1), R(null), W([]), J(!1);
2145
+ B(!1), R(null), W([]), J(!1);
2142
2146
  },
2143
2147
  className: "m-0",
2144
2148
  children: "Close"
@@ -2156,14 +2160,14 @@ function Dn() {
2156
2160
  }
2157
2161
  )
2158
2162
  ] }) : /* @__PURE__ */ n(Kt, { disabled: !0, className: "m-0 cursor-default", children: [
2159
- /* @__PURE__ */ e(Ge, { className: "mr-2 h-4 w-4 animate-spin" }),
2163
+ /* @__PURE__ */ e(Be, { className: "mr-2 h-4 w-4 animate-spin" }),
2160
2164
  "Saving..."
2161
2165
  ] }) })
2162
2166
  ] })
2163
2167
  }
2164
2168
  ),
2165
2169
  /* @__PURE__ */ e(
2166
- ds,
2170
+ ls,
2167
2171
  {
2168
2172
  open: Ma,
2169
2173
  onOpenChange: (i) => {
@@ -2181,7 +2185,7 @@ function Dn() {
2181
2185
  }
2182
2186
  );
2183
2187
  }
2184
- function an({
2188
+ function rn({
2185
2189
  accessToken: t,
2186
2190
  dashboardId: s,
2187
2191
  selectedSheetId: r,
@@ -2197,5 +2201,5 @@ function an({
2197
2201
  return m.searchParams.set("pdfMode", "document"), m.searchParams.set("pageSize", a || "letter"), m.searchParams.set("orientation", o || "portrait"), m.searchParams.set("url", h.toString()), m.toString();
2198
2202
  }
2199
2203
  export {
2200
- Dn as default
2204
+ Cn as default
2201
2205
  };