react-semaphor 0.1.307 → 0.1.308

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 (43) hide show
  1. package/dist/brand-studio/index.cjs +1 -1
  2. package/dist/brand-studio/index.js +4 -4
  3. package/dist/chunks/{braces-CkL8POe0.js → braces-BHDm9arh.js} +1 -1
  4. package/dist/chunks/{braces-e5qkN-I_.js → braces-DEq8EJtw.js} +1 -1
  5. package/dist/chunks/chevrons-up-down-Cbtggnqv.js +14 -0
  6. package/dist/chunks/chevrons-up-down-DDEY9beZ.js +6 -0
  7. package/dist/chunks/{dashboard-controls-5bibC_5a.js → dashboard-controls-DTxSUWvy.js} +233 -223
  8. package/dist/chunks/{dashboard-controls-Dwet_9h0.js → dashboard-controls-DviftQE7.js} +8 -3
  9. package/dist/chunks/dashboard-filter-controls-button-D0nrJ7wl.js +11 -0
  10. package/dist/chunks/{dashboard-filter-controls-button-D0k9NDci.js → dashboard-filter-controls-button-DHKfgPah.js} +304 -303
  11. package/dist/chunks/{dashboard-json-Bi5XdgG5.js → dashboard-json-DYzZ0G6T.js} +1 -1
  12. package/dist/chunks/{dashboard-json-CfRKLL7C.js → dashboard-json-DZmsUV5n.js} +2 -2
  13. package/dist/chunks/dashboard-summary-settings-dialog-Cc3yKCu4.js +1 -0
  14. package/dist/chunks/{dashboard-summary-settings-dialog-Bj4_wBW9.js → dashboard-summary-settings-dialog-QbUTp92u.js} +33 -32
  15. package/dist/chunks/{edit-dashboard-visual-Wfs53Kbn.js → edit-dashboard-visual-BS3LKMJe.js} +32 -32
  16. package/dist/chunks/{edit-dashboard-visual-DIuzuJfj.js → edit-dashboard-visual-CmgculGv.js} +130 -129
  17. package/dist/chunks/{index-DMFCfjgD.js → index-BxYIELMe.js} +60366 -62293
  18. package/dist/chunks/index-C0zD3JgK.js +1330 -0
  19. package/dist/chunks/{palette-Oa4O9jWG.js → palette-CNKSAIrt.js} +1 -1
  20. package/dist/chunks/{palette-D5Lorzf2.js → palette-CteErylX.js} +1 -1
  21. package/dist/chunks/{resource-management-panel-Dqc3gfYn.js → resource-management-panel-8cHoj8SV.js} +52 -52
  22. package/dist/chunks/resource-management-panel-B4QM3fZ_.js +6 -0
  23. package/dist/chunks/{save-CDX2p4v1.js → save-B1-nDZwS.js} +1 -1
  24. package/dist/chunks/{save-zEdICevW.js → save-BVVnWGeb.js} +1 -1
  25. package/dist/chunks/{switch-BPFzGTzF.js → switch-BG4RWnrq.js} +25 -25
  26. package/dist/chunks/{switch-CKiXRRoh.js → switch-BZn7R_Cp.js} +696 -697
  27. package/dist/chunks/{use-create-flow-overlay-state-CSMe5Ls6.js → use-create-flow-overlay-state-Bmb471Fp.js} +1 -1
  28. package/dist/chunks/{use-create-flow-overlay-state-CLyv5c2m.js → use-create-flow-overlay-state-CeWstFjy.js} +49 -49
  29. package/dist/chunks/{use-visual-utils-Det6M3Wd.js → use-visual-utils-CmfDomt0.js} +2 -2
  30. package/dist/chunks/{use-visual-utils-DDAs4dCz.js → use-visual-utils-DflfgX9g.js} +1 -1
  31. package/dist/dashboard/index.cjs +1 -1
  32. package/dist/dashboard/index.js +1 -1
  33. package/dist/index.cjs +1 -1
  34. package/dist/index.js +76 -76
  35. package/dist/style.css +1 -1
  36. package/dist/surfboard/index.cjs +1 -1
  37. package/dist/surfboard/index.js +2 -2
  38. package/dist/types/main.d.ts +10 -2
  39. package/package.json +1 -1
  40. package/dist/chunks/dashboard-filter-controls-button-ZeYO5jux.js +0 -11
  41. package/dist/chunks/dashboard-summary-settings-dialog-DD9Aj2XH.js +0 -1
  42. package/dist/chunks/index-DQCMUspd.js +0 -1350
  43. package/dist/chunks/resource-management-panel-CNr6uMMf.js +0 -6
@@ -1,26 +1,26 @@
1
1
  import { jsx as e, jsxs as c, Fragment as T } from "react/jsx-runtime";
2
- import { c as Q, u as S, B as A, aI as Nt, m as St, L as dt, I as ue, a as Y, aJ as Re, aK as da, aL as ua, E as ls, f as X, aM as ds, aN as us, aO as ut, T as ma, q as ha, r as _e, t as Ue, s as mt, aP as pa, aQ as ms, n as ta, z as hs, A as ps, D as fs, F as gs, K as vs, aR as bs } from "./switch-CKiXRRoh.js";
3
- import { c5 as ys, u as j, b as Ge, c6 as xs, bl as ht, c as $e, d as Ve, e as ze, f as wt, o as Ns, c7 as de, by as Te, c8 as Ss, c9 as aa, ca as fa, cb as ga, cc as ws, bO as Dt, cd as Ds, ce as Cs, cf as Es, cg as Is, ch as Ms, ci as As, r as qe, z as Be, p as M, bV as Ls, cj as Os, ck as ks, bS as pt, cl as ft, bx as Ct, bc as va, ba, cm as Ps, bF as ya, bG as xa, bH as Na, bI as Sa, bJ as wa, bK as Da, bL as Ca, bM as gt, cn as Ts, co as _s, cp as Us, bp as Fs, cq as Rs, cr as Gs, X as $s, W as ke, cs as Vs, a1 as zs, Y as nt, ct as qs, cu as Bs, cv as Hs, ad as js, cw as Ks, L as rt, cx as Qs, cy as Ws, cz as Js, c4 as Ys, cA as Xs, bq as Zs, br as en, bs as tn, bt as an, bu as $, bZ as sn, N as nn, bA as rn, cB as on, bv as sa, cC as cn, cD as ln, cE as dn, a0 as un, O as mn, cF as hn, K as vt } from "./index-DMFCfjgD.js";
4
- import * as L from "react";
2
+ import { c as j, u as w, B as L, aI as Nt, m as wt, L as dt, I as ue, a as Y, aJ as Re, aK as da, aL as ua, E as ls, f as X, aM as ds, aN as us, aO as ut, T as ma, q as ha, r as _e, t as Ue, s as mt, aP as pa, aQ as ms, n as ta, z as hs, A as ps, D as fs, F as gs, K as vs, aR as bs } from "./switch-BZn7R_Cp.js";
3
+ import { c4 as ys, u as K, b as Ge, c5 as xs, bk as ht, c as $e, d as Ve, e as qe, f as St, n as Ns, c6 as de, bx as Te, c7 as ws, c8 as aa, c9 as fa, ca as ga, cb as Ss, bN as Dt, cc as Ds, cd as Cs, ce as Es, cf as Is, cg as Ms, ch as Ls, q as ze, M as Be, o as M, bU as As, ci as ks, cj as Os, bR as pt, ck as ft, bw as Ct, bb as va, b9 as ba, cl as Ps, bE as ya, bF as xa, bG as Na, bH as wa, bI as Sa, bJ as Da, bK as Ca, bL as gt, cm as Ts, cn as _s, co as Us, bo as Fs, cp as Rs, cq as Gs, W as $s, V as Oe, cr as Vs, a0 as qs, X as nt, cs as zs, ct as Bs, cu as Hs, ac as js, cv as Ks, I as rt, cw as Qs, cx as Ws, cy as Js, c3 as Ys, bp as Xs, bq as Zs, br as en, bs as tn, bt as $, bY as an, K as sn, bz as nn, cz as rn, bu as sa, cA as on, cB as cn, cC as ln, $ as dn, L as un, cD as mn, H as vt } from "./index-BxYIELMe.js";
4
+ import * as A from "react";
5
5
  import Ea, { useState as N, useMemo as F, useCallback as Fe, useEffect as ot } from "react";
6
6
  import "./index-CJdxSyQq.js";
7
7
  import "react-dom";
8
- import { b as pn, u as fn, A as gn, V as vn, c as bn, D as yn, N as xn, U as Nn } from "./dashboard-filter-controls-button-D0k9NDci.js";
9
- import { d as Sn } from "./index-DFOb_6HB.js";
10
- import { C as wn, D as Dn } from "./dashboard-summary-settings-dialog-Bj4_wBW9.js";
11
- import { u as Cn } from "./use-debounced-dirty-check-BwAbnX_5.js";
8
+ import { b as hn, u as pn, A as fn, V as gn, c as vn, D as bn, N as yn, U as xn } from "./dashboard-filter-controls-button-DHKfgPah.js";
9
+ import { d as Nn } from "./index-DFOb_6HB.js";
10
+ import { C as wn, D as Sn } from "./dashboard-summary-settings-dialog-QbUTp92u.js";
11
+ import { u as Dn } from "./use-debounced-dirty-check-BwAbnX_5.js";
12
12
  import { s as it } from "./normalize-dashboard-for-dirty-check-5KpZN8xr.js";
13
- import { u as En, e as In } from "./use-create-flow-overlay-state-CLyv5c2m.js";
14
- import { S as na } from "./save-CDX2p4v1.js";
15
- import { P as Mn } from "./palette-Oa4O9jWG.js";
16
- import { B as An } from "./braces-e5qkN-I_.js";
13
+ import { u as Cn, e as En } from "./use-create-flow-overlay-state-CeWstFjy.js";
14
+ import { S as na } from "./save-B1-nDZwS.js";
15
+ import { P as In } from "./palette-CNKSAIrt.js";
16
+ import { B as Mn } from "./braces-DEq8EJtw.js";
17
17
  /**
18
18
  * @license lucide-react v0.453.0 - ISC
19
19
  *
20
20
  * This source code is licensed under the ISC license.
21
21
  * See the LICENSE file in the root directory of this source tree.
22
22
  */
23
- const Ln = Q("Glasses", [
23
+ const Ln = j("Glasses", [
24
24
  ["circle", { cx: "6", cy: "15", r: "4", key: "vux9w4" }],
25
25
  ["circle", { cx: "18", cy: "15", r: "4", key: "18o8ve" }],
26
26
  ["path", { d: "M14 15a2 2 0 0 0-2-2 2 2 0 0 0-2 2", key: "1ag4bs" }],
@@ -33,7 +33,7 @@ const Ln = Q("Glasses", [
33
33
  * This source code is licensed under the ISC license.
34
34
  * See the LICENSE file in the root directory of this source tree.
35
35
  */
36
- const On = Q("Menu", [
36
+ const An = j("Menu", [
37
37
  ["line", { x1: "4", x2: "20", y1: "12", y2: "12", key: "1e0a9i" }],
38
38
  ["line", { x1: "4", x2: "20", y1: "6", y2: "6", key: "1owob3" }],
39
39
  ["line", { x1: "4", x2: "20", y1: "18", y2: "18", key: "yk5zj1" }]
@@ -44,7 +44,7 @@ const On = Q("Menu", [
44
44
  * This source code is licensed under the ISC license.
45
45
  * See the LICENSE file in the root directory of this source tree.
46
46
  */
47
- const kn = Q("Monitor", [
47
+ const kn = j("Monitor", [
48
48
  ["rect", { width: "20", height: "14", x: "2", y: "3", rx: "2", key: "48i651" }],
49
49
  ["line", { x1: "8", x2: "16", y1: "21", y2: "21", key: "1svkeh" }],
50
50
  ["line", { x1: "12", x2: "12", y1: "17", y2: "21", key: "vw1qmm" }]
@@ -55,7 +55,7 @@ const kn = Q("Monitor", [
55
55
  * This source code is licensed under the ISC license.
56
56
  * See the LICENSE file in the root directory of this source tree.
57
57
  */
58
- const Pn = Q("Moon", [
58
+ const On = j("Moon", [
59
59
  ["path", { d: "M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z", key: "a7tn18" }]
60
60
  ]);
61
61
  /**
@@ -64,7 +64,7 @@ const Pn = Q("Moon", [
64
64
  * This source code is licensed under the ISC license.
65
65
  * See the LICENSE file in the root directory of this source tree.
66
66
  */
67
- const Tn = Q("ShieldX", [
67
+ const Pn = j("ShieldX", [
68
68
  [
69
69
  "path",
70
70
  {
@@ -81,7 +81,7 @@ const Tn = Q("ShieldX", [
81
81
  * This source code is licensed under the ISC license.
82
82
  * See the LICENSE file in the root directory of this source tree.
83
83
  */
84
- const _n = Q("Sun", [
84
+ const Tn = j("Sun", [
85
85
  ["circle", { cx: "12", cy: "12", r: "4", key: "4exip2" }],
86
86
  ["path", { d: "M12 2v2", key: "tus03m" }],
87
87
  ["path", { d: "M12 20v2", key: "1lh1kg" }],
@@ -98,7 +98,17 @@ const _n = Q("Sun", [
98
98
  * This source code is licensed under the ISC license.
99
99
  * See the LICENSE file in the root directory of this source tree.
100
100
  */
101
- const bt = Q("UserPlus", [
101
+ const _n = j("Undo2", [
102
+ ["path", { d: "M9 14 4 9l5-5", key: "102s5s" }],
103
+ ["path", { d: "M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11", key: "f3b9sd" }]
104
+ ]);
105
+ /**
106
+ * @license lucide-react v0.453.0 - ISC
107
+ *
108
+ * This source code is licensed under the ISC license.
109
+ * See the LICENSE file in the root directory of this source tree.
110
+ */
111
+ const bt = j("UserPlus", [
102
112
  ["path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2", key: "1yyitq" }],
103
113
  ["circle", { cx: "9", cy: "7", r: "4", key: "nufk8" }],
104
114
  ["line", { x1: "19", x2: "19", y1: "8", y2: "14", key: "1bvyxn" }],
@@ -185,16 +195,16 @@ function Fn() {
185
195
  D = l({
186
196
  inst: { value: b, getSnapshot: r }
187
197
  });
188
- var w = D[0].inst, C = D[1];
198
+ var S = D[0].inst, C = D[1];
189
199
  return g(
190
200
  function() {
191
- w.value = b, w.getSnapshot = r, n(w) && C({ inst: w });
201
+ S.value = b, S.getSnapshot = r, n(S) && C({ inst: S });
192
202
  },
193
203
  [d, b, r]
194
204
  ), p(
195
205
  function() {
196
- return n(w) && C({ inst: w }), d(function() {
197
- n(w) && C({ inst: w });
206
+ return n(S) && C({ inst: S }), d(function() {
207
+ n(S) && C({ inst: S });
198
208
  });
199
209
  },
200
210
  [d]
@@ -222,16 +232,16 @@ process.env.NODE_ENV === "production" ? yt.exports = Un() : yt.exports = Fn();
222
232
  var Rn = yt.exports;
223
233
  const Pe = ["light", "dark", "system"];
224
234
  function Gn() {
225
- const { theme: t, setTheme: a } = ys(), n = S(
235
+ const { theme: t, setTheme: a } = ys(), n = w(
226
236
  (l) => l.actions.setDashboardTheme
227
237
  );
228
238
  function s() {
229
239
  const l = Pe.includes(t) ? t : "system", p = Pe[(Pe.indexOf(l) + 1) % Pe.length];
230
240
  a(p), n(p);
231
241
  }
232
- const i = t === "light" ? _n : t === "dark" ? Pn : kn, u = t === "light" ? "Theme: light (click for dark)" : t === "dark" ? "Theme: dark (click for system)" : "Theme: system (click for light)";
242
+ const i = t === "light" ? Tn : t === "dark" ? On : kn, u = t === "light" ? "Theme: light (click for dark)" : t === "dark" ? "Theme: dark (click for system)" : "Theme: system (click for light)";
233
243
  return /* @__PURE__ */ e(
234
- A,
244
+ L,
235
245
  {
236
246
  type: "button",
237
247
  variant: "ghost",
@@ -277,37 +287,37 @@ async function Vn(t, a, n) {
277
287
  lensId: a
278
288
  });
279
289
  }
280
- const zn = "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground";
281
- function qn({
290
+ const qn = "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground";
291
+ function zn({
282
292
  open: t,
283
293
  onOpenChange: a
284
294
  } = {}) {
285
- const [n, s] = N(""), [i, u] = N(!1), l = S((I) => I.lenses), { setLenses: p, setSelectedLensId: g } = St(), [v, m] = N(!1), [f, h] = N(!1), d = t !== void 0, r = d ? t : f, b = (I) => {
295
+ const [n, s] = N(""), [i, u] = N(!1), l = w((I) => I.lenses), { setLenses: p, setSelectedLensId: g } = wt(), [v, m] = N(!1), [f, h] = N(!1), d = t !== void 0, r = d ? t : f, b = (I) => {
286
296
  d || h(I), a == null || a(I);
287
- }, D = S((I) => I.dashboard), w = S((I) => I.filterValues), { authToken: C, tokenProps: E } = j();
288
- async function O() {
297
+ }, D = w((I) => I.dashboard), S = w((I) => I.filterValues), { authToken: C, tokenProps: E } = K();
298
+ async function k() {
289
299
  m(!0);
290
300
  const I = await $n(
291
301
  E.apiServiceUrl,
292
302
  n,
293
303
  D,
294
- w,
304
+ S,
295
305
  C == null ? void 0 : C.accessToken
296
306
  );
297
307
  I && (p([...l || [], I]), g(I.id), b(!1)), m(!1);
298
308
  }
299
309
  return /* @__PURE__ */ c(Ge, { open: r, onOpenChange: b, children: [
300
- d ? null : /* @__PURE__ */ e(xs, { asChild: !0, children: /* @__PURE__ */ c(A, { variant: "secondary", size: "xs", children: [
310
+ d ? null : /* @__PURE__ */ e(xs, { asChild: !0, children: /* @__PURE__ */ c(L, { variant: "secondary", size: "xs", children: [
301
311
  /* @__PURE__ */ e(ht, { className: "h-3.5 w-3.5" }),
302
312
  "Lens"
303
313
  ] }) }),
304
314
  /* @__PURE__ */ c($e, { className: "rounded-control border-border/60 sm:max-w-[420px] sm:rounded-control", children: [
305
315
  /* @__PURE__ */ c(Ve, { children: [
306
- /* @__PURE__ */ e(ze, { className: "text-[15px]", children: "Create lens" }),
307
- /* @__PURE__ */ e(wt, { className: "text-[13px] leading-5", children: "Lenses are private by default and are only visible to you." })
316
+ /* @__PURE__ */ e(qe, { className: "text-[15px]", children: "Create lens" }),
317
+ /* @__PURE__ */ e(St, { className: "text-[13px] leading-5", children: "Lenses are private by default and are only visible to you." })
308
318
  ] }),
309
319
  /* @__PURE__ */ c("div", { className: "space-y-1.5 py-1", children: [
310
- /* @__PURE__ */ e(dt, { htmlFor: "lens-name", className: zn, children: "Name" }),
320
+ /* @__PURE__ */ e(dt, { htmlFor: "lens-name", className: qn, children: "Name" }),
311
321
  /* @__PURE__ */ e(
312
322
  ue,
313
323
  {
@@ -321,13 +331,13 @@ function qn({
321
331
  i && /* @__PURE__ */ e("p", { className: "text-[12px] text-destructive", children: "A lens with this name already exists. Pick a different one." })
322
332
  ] }),
323
333
  /* @__PURE__ */ c(Ns, { children: [
324
- /* @__PURE__ */ e(A, { variant: "outline", size: "xs", onClick: () => b(!1), children: "Cancel" }),
334
+ /* @__PURE__ */ e(L, { variant: "outline", size: "xs", onClick: () => b(!1), children: "Cancel" }),
325
335
  /* @__PURE__ */ e(
326
- A,
336
+ L,
327
337
  {
328
338
  size: "xs",
329
339
  type: "submit",
330
- onClick: O,
340
+ onClick: k,
331
341
  disabled: v || !n.trim(),
332
342
  children: v ? "Creating…" : "Create"
333
343
  }
@@ -337,7 +347,7 @@ function qn({
337
347
  ] });
338
348
  }
339
349
  function Bn({ includeLabel: t = !1 } = {}) {
340
- const a = S((m) => m.lenses), n = S((m) => m.selectedLensId), { setLenses: s, setSelectedLensId: i } = St(), { authToken: u, tokenProps: l } = j();
350
+ const a = w((m) => m.lenses), n = w((m) => m.selectedLensId), { setLenses: s, setSelectedLensId: i } = wt(), { authToken: u, tokenProps: l } = K();
341
351
  async function p(m) {
342
352
  i(m);
343
353
  }
@@ -376,7 +386,7 @@ function Bn({ includeLabel: t = !1 } = {}) {
376
386
  /* @__PURE__ */ e(Te, {})
377
387
  ] }) : null,
378
388
  /* @__PURE__ */ c(
379
- Ss,
389
+ ws,
380
390
  {
381
391
  value: n,
382
392
  onValueChange: p,
@@ -427,14 +437,14 @@ function Bn({ includeLabel: t = !1 } = {}) {
427
437
  ] });
428
438
  }
429
439
  function Hn() {
430
- const { displayPreferences: t, shouldShowElement: a } = ws(), { currentUser: n, userContext: s } = Dt(), i = F(
440
+ const { displayPreferences: t, shouldShowElement: a } = Ss(), { currentUser: n, userContext: s } = Dt(), i = F(
431
441
  () => Ds(n),
432
442
  [n]
433
443
  ), u = F(() => (p) => i && i[p] !== void 0 && i[p] === !1 ? !1 : a(p), [i, a, t]), l = F(
434
444
  () => {
435
445
  var p, g, v, m, f;
436
446
  return {
437
- canEdit: ((p = s == null ? void 0 : s.permissions) == null ? void 0 : p.canEdit) ?? As(n),
447
+ canEdit: ((p = s == null ? void 0 : s.permissions) == null ? void 0 : p.canEdit) ?? Ls(n),
438
448
  canUseFilters: ((g = s == null ? void 0 : s.permissions) == null ? void 0 : g.canEdit) ?? Ms(n),
439
449
  canManageDashboards: ((v = s == null ? void 0 : s.permissions) == null ? void 0 : v.canCreateDashboard) ?? Is(n),
440
450
  canCreateDashboards: ((m = s == null ? void 0 : s.permissions) == null ? void 0 : m.canCreateDashboard) ?? Es(n),
@@ -464,7 +474,7 @@ const jn = async (t, a, n) => {
464
474
  await da(i, a, "DELETE", s);
465
475
  };
466
476
  function Jn() {
467
- const { authToken: t, tokenProps: a } = j(), n = qe();
477
+ const { authToken: t, tokenProps: a } = K(), n = ze();
468
478
  return Be({
469
479
  mutationFn: (s) => jn(a.apiServiceUrl, (t == null ? void 0 : t.accessToken) || "", s),
470
480
  onSuccess: () => {
@@ -478,7 +488,7 @@ function Jn() {
478
488
  });
479
489
  }
480
490
  function Yn() {
481
- const { authToken: t, tokenProps: a } = j(), n = qe();
491
+ const { authToken: t, tokenProps: a } = K(), n = ze();
482
492
  return Be({
483
493
  mutationFn: (s) => Kn(a.apiServiceUrl, (t == null ? void 0 : t.accessToken) || "", s),
484
494
  onSuccess: (s, i) => {
@@ -492,7 +502,7 @@ function Yn() {
492
502
  });
493
503
  }
494
504
  function Xn() {
495
- const { authToken: t, tokenProps: a } = j(), n = qe();
505
+ const { authToken: t, tokenProps: a } = K(), n = ze();
496
506
  return Be({
497
507
  mutationFn: ({
498
508
  groupId: s,
@@ -511,7 +521,7 @@ function Xn() {
511
521
  });
512
522
  }
513
523
  function Zn() {
514
- const { authToken: t, tokenProps: a } = j(), n = qe();
524
+ const { authToken: t, tokenProps: a } = K(), n = ze();
515
525
  return Be({
516
526
  mutationFn: ({
517
527
  groupId: s,
@@ -577,7 +587,7 @@ function er({
577
587
  /* @__PURE__ */ c("div", { className: "space-y-1.5", children: [
578
588
  /* @__PURE__ */ e(dt, { htmlFor: "group-description", className: ia, children: "Description (optional)" }),
579
589
  /* @__PURE__ */ e(
580
- Ls,
590
+ As,
581
591
  {
582
592
  id: "group-description",
583
593
  placeholder: "Describe the purpose of this group…",
@@ -601,7 +611,7 @@ function er({
601
611
  ] }),
602
612
  /* @__PURE__ */ c("div", { className: "flex justify-end gap-1.5 pt-1", children: [
603
613
  /* @__PURE__ */ e(
604
- A,
614
+ L,
605
615
  {
606
616
  type: "button",
607
617
  variant: "outline",
@@ -614,7 +624,7 @@ function er({
614
624
  }
615
625
  ),
616
626
  /* @__PURE__ */ e(
617
- A,
627
+ L,
618
628
  {
619
629
  type: "submit",
620
630
  size: "xs",
@@ -631,19 +641,19 @@ function er({
631
641
  function tr(t, a = []) {
632
642
  let n = [];
633
643
  function s(u, l) {
634
- const p = L.createContext(l);
644
+ const p = A.createContext(l);
635
645
  p.displayName = u + "Context";
636
646
  const g = n.length;
637
647
  n = [...n, l];
638
648
  const v = (f) => {
639
- var w;
640
- const { scope: h, children: d, ...r } = f, b = ((w = h == null ? void 0 : h[t]) == null ? void 0 : w[g]) || p, D = L.useMemo(() => r, Object.values(r));
649
+ var S;
650
+ const { scope: h, children: d, ...r } = f, b = ((S = h == null ? void 0 : h[t]) == null ? void 0 : S[g]) || p, D = A.useMemo(() => r, Object.values(r));
641
651
  return /* @__PURE__ */ e(b.Provider, { value: D, children: d });
642
652
  };
643
653
  v.displayName = u + "Provider";
644
654
  function m(f, h) {
645
655
  var b;
646
- const d = ((b = h == null ? void 0 : h[t]) == null ? void 0 : b[g]) || p, r = L.useContext(d);
656
+ const d = ((b = h == null ? void 0 : h[t]) == null ? void 0 : b[g]) || p, r = A.useContext(d);
647
657
  if (r) return r;
648
658
  if (l !== void 0) return l;
649
659
  throw new Error(`\`${f}\` must be used within \`${u}\``);
@@ -651,10 +661,10 @@ function tr(t, a = []) {
651
661
  return [v, m];
652
662
  }
653
663
  const i = () => {
654
- const u = n.map((l) => L.createContext(l));
664
+ const u = n.map((l) => A.createContext(l));
655
665
  return function(p) {
656
666
  const g = (p == null ? void 0 : p[t]) || u;
657
- return L.useMemo(
667
+ return A.useMemo(
658
668
  () => ({ [`__scope${t}`]: { ...p, [t]: g } }),
659
669
  [p, g]
660
670
  );
@@ -675,7 +685,7 @@ function ar(...t) {
675
685
  const f = g(u)[`__scope${v}`];
676
686
  return { ...p, ...f };
677
687
  }, {});
678
- return L.useMemo(() => ({ [`__scope${a.scopeName}`]: l }), [l]);
688
+ return A.useMemo(() => ({ [`__scope${a.scopeName}`]: l }), [l]);
679
689
  };
680
690
  };
681
691
  return n.scopeName = a.scopeName, n;
@@ -699,7 +709,7 @@ var sr = [
699
709
  "svg",
700
710
  "ul"
701
711
  ], Et = sr.reduce((t, a) => {
702
- const n = ds(`Primitive.${a}`), s = L.forwardRef((i, u) => {
712
+ const n = ds(`Primitive.${a}`), s = A.forwardRef((i, u) => {
703
713
  const { asChild: l, ...p } = i, g = l ? n : a;
704
714
  return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ e(g, { ...p, ref: u });
705
715
  });
@@ -716,9 +726,9 @@ function rr() {
716
726
  return () => {
717
727
  };
718
728
  }
719
- var It = "Avatar", [or] = tr(It), [ir, Ia] = or(It), Ma = L.forwardRef(
729
+ var It = "Avatar", [or] = tr(It), [ir, Ia] = or(It), Ma = A.forwardRef(
720
730
  (t, a) => {
721
- const { __scopeAvatar: n, ...s } = t, [i, u] = L.useState("idle");
731
+ const { __scopeAvatar: n, ...s } = t, [i, u] = A.useState("idle");
722
732
  return /* @__PURE__ */ e(
723
733
  ir,
724
734
  {
@@ -731,10 +741,10 @@ var It = "Avatar", [or] = tr(It), [ir, Ia] = or(It), Ma = L.forwardRef(
731
741
  }
732
742
  );
733
743
  Ma.displayName = It;
734
- var Aa = "AvatarImage", La = L.forwardRef(
744
+ var La = "AvatarImage", Aa = A.forwardRef(
735
745
  (t, a) => {
736
746
  const { __scopeAvatar: n, src: s, onLoadingStatusChange: i = () => {
737
- }, ...u } = t, l = Ia(Aa, n), p = cr(s, u), g = us((v) => {
747
+ }, ...u } = t, l = Ia(La, n), p = cr(s, u), g = us((v) => {
738
748
  i(v), l.onImageLoadingStatusChange(v);
739
749
  });
740
750
  return ut(() => {
@@ -742,11 +752,11 @@ var Aa = "AvatarImage", La = L.forwardRef(
742
752
  }, [p, g]), p === "loaded" ? /* @__PURE__ */ e(Et.img, { ...u, ref: a, src: s }) : null;
743
753
  }
744
754
  );
745
- La.displayName = Aa;
746
- var Oa = "AvatarFallback", ka = L.forwardRef(
755
+ Aa.displayName = La;
756
+ var ka = "AvatarFallback", Oa = A.forwardRef(
747
757
  (t, a) => {
748
- const { __scopeAvatar: n, delayMs: s, ...i } = t, u = Ia(Oa, n), [l, p] = L.useState(s === void 0);
749
- return L.useEffect(() => {
758
+ const { __scopeAvatar: n, delayMs: s, ...i } = t, u = Ia(ka, n), [l, p] = A.useState(s === void 0);
759
+ return A.useEffect(() => {
750
760
  if (s !== void 0) {
751
761
  const g = window.setTimeout(() => p(!0), s);
752
762
  return () => window.clearTimeout(g);
@@ -754,12 +764,12 @@ var Oa = "AvatarFallback", ka = L.forwardRef(
754
764
  }, [s]), l && u.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ e(Et.span, { ...i, ref: a }) : null;
755
765
  }
756
766
  );
757
- ka.displayName = Oa;
767
+ Oa.displayName = ka;
758
768
  function ca(t, a) {
759
769
  return t ? a ? (t.src !== a && (t.src = a), t.complete && t.naturalWidth > 0 ? "loaded" : "loading") : "error" : "idle";
760
770
  }
761
771
  function cr(t, { referrerPolicy: a, crossOrigin: n }) {
762
- const s = nr(), i = L.useRef(null), u = s ? (i.current || (i.current = new window.Image()), i.current) : null, [l, p] = L.useState(
772
+ const s = nr(), i = A.useRef(null), u = s ? (i.current || (i.current = new window.Image()), i.current) : null, [l, p] = A.useState(
763
773
  () => ca(u, t)
764
774
  );
765
775
  return ut(() => {
@@ -775,8 +785,8 @@ function cr(t, { referrerPolicy: a, crossOrigin: n }) {
775
785
  };
776
786
  }, [u, n, a]), l;
777
787
  }
778
- var Pa = Ma, Ta = La, _a = ka;
779
- const Mt = L.forwardRef(({ className: t, ...a }, n) => /* @__PURE__ */ e(
788
+ var Pa = Ma, Ta = Aa, _a = Oa;
789
+ const Mt = A.forwardRef(({ className: t, ...a }, n) => /* @__PURE__ */ e(
780
790
  Pa,
781
791
  {
782
792
  ref: n,
@@ -788,7 +798,7 @@ const Mt = L.forwardRef(({ className: t, ...a }, n) => /* @__PURE__ */ e(
788
798
  }
789
799
  ));
790
800
  Mt.displayName = Pa.displayName;
791
- const lr = L.forwardRef(({ className: t, ...a }, n) => /* @__PURE__ */ e(
801
+ const lr = A.forwardRef(({ className: t, ...a }, n) => /* @__PURE__ */ e(
792
802
  Ta,
793
803
  {
794
804
  ref: n,
@@ -797,7 +807,7 @@ const lr = L.forwardRef(({ className: t, ...a }, n) => /* @__PURE__ */ e(
797
807
  }
798
808
  ));
799
809
  lr.displayName = Ta.displayName;
800
- const At = L.forwardRef(({ className: t, ...a }, n) => /* @__PURE__ */ e(
810
+ const Lt = A.forwardRef(({ className: t, ...a }, n) => /* @__PURE__ */ e(
801
811
  _a,
802
812
  {
803
813
  ref: n,
@@ -808,37 +818,37 @@ const At = L.forwardRef(({ className: t, ...a }, n) => /* @__PURE__ */ e(
808
818
  ...a
809
819
  }
810
820
  ));
811
- At.displayName = _a.displayName;
821
+ Lt.displayName = _a.displayName;
812
822
  function dr({
813
823
  open: t,
814
824
  onOpenChange: a,
815
825
  group: n,
816
826
  onUpdate: s
817
827
  }) {
818
- const [i, u] = N("members"), [l, p] = N(""), [g, v] = N([]), [m, f] = N([]), { data: h, isLoading: d, refetch: r } = Os(n.id), b = n.type === "TENANT_GROUP" ? "tenant" : "organization", { users: D, isLoading: w } = ks({
828
+ const [i, u] = N("members"), [l, p] = N(""), [g, v] = N([]), [m, f] = N([]), { data: h, isLoading: d, refetch: r } = ks(n.id), b = n.type === "TENANT_GROUP" ? "tenant" : "organization", { users: D, isLoading: S } = Os({
819
829
  type: b,
820
830
  tenantId: n.tenantId || void 0,
821
831
  active: !0,
822
832
  limit: 100
823
- }), C = Xn(), E = Zn(), O = (h == null ? void 0 : h.members) || [], I = F(() => new Set(O.map((y) => y.userId)), [O]), V = F(() => D.filter((y) => !I.has(y.id)), [D, I]), z = F(() => {
833
+ }), C = Xn(), E = Zn(), k = (h == null ? void 0 : h.members) || [], I = F(() => new Set(k.map((y) => y.userId)), [k]), V = F(() => D.filter((y) => !I.has(y.id)), [D, I]), q = F(() => {
824
834
  if (!l) return V;
825
835
  const y = l.toLowerCase();
826
836
  return V.filter(
827
- (k) => {
837
+ (O) => {
828
838
  var G, H;
829
- return ((G = k.name) == null ? void 0 : G.toLowerCase().includes(y)) || ((H = k.email) == null ? void 0 : H.toLowerCase().includes(y));
839
+ return ((G = O.name) == null ? void 0 : G.toLowerCase().includes(y)) || ((H = O.email) == null ? void 0 : H.toLowerCase().includes(y));
830
840
  }
831
841
  );
832
842
  }, [V, l]), x = F(() => {
833
- if (!l) return O;
843
+ if (!l) return k;
834
844
  const y = l.toLowerCase();
835
- return O.filter(
836
- (k) => {
845
+ return k.filter(
846
+ (O) => {
837
847
  var G, H, me, te;
838
- return ((H = (G = k.user) == null ? void 0 : G.name) == null ? void 0 : H.toLowerCase().includes(y)) || ((te = (me = k.user) == null ? void 0 : me.email) == null ? void 0 : te.toLowerCase().includes(y));
848
+ return ((H = (G = O.user) == null ? void 0 : G.name) == null ? void 0 : H.toLowerCase().includes(y)) || ((te = (me = O.user) == null ? void 0 : me.email) == null ? void 0 : te.toLowerCase().includes(y));
839
849
  }
840
850
  );
841
- }, [O, l]), B = async () => {
851
+ }, [k, l]), B = async () => {
842
852
  if (g.length !== 0)
843
853
  try {
844
854
  await C.mutateAsync({
@@ -865,20 +875,20 @@ function dr({
865
875
  }
866
876
  }, Z = (y) => {
867
877
  v(
868
- (k) => k.includes(y) ? k.filter((G) => G !== y) : [...k, y]
878
+ (O) => O.includes(y) ? O.filter((G) => G !== y) : [...O, y]
869
879
  );
870
880
  }, ee = (y) => {
871
881
  f(
872
- (k) => k.includes(y) ? k.filter((G) => G !== y) : [...k, y]
882
+ (O) => O.includes(y) ? O.filter((G) => G !== y) : [...O, y]
873
883
  );
874
884
  };
875
885
  return /* @__PURE__ */ e(T, { children: /* @__PURE__ */ e(Ge, { open: t, onOpenChange: a, children: /* @__PURE__ */ c($e, { className: "max-w-3xl max-h-[80vh]", "aria-describedby": "group-members-description", children: [
876
886
  /* @__PURE__ */ c(Ve, { children: [
877
- /* @__PURE__ */ e(ze, { children: n.name }),
887
+ /* @__PURE__ */ e(qe, { children: n.name }),
878
888
  /* @__PURE__ */ e("div", { className: "flex items-center gap-2 mt-1", children: /* @__PURE__ */ c("p", { className: "text-sm text-muted-foreground", children: [
879
- O.length,
889
+ k.length,
880
890
  " ",
881
- O.length === 1 ? "member" : "members"
891
+ k.length === 1 ? "member" : "members"
882
892
  ] }) }),
883
893
  /* @__PURE__ */ c("p", { id: "group-members-description", className: "sr-only", children: [
884
894
  "Add or remove members from the ",
@@ -927,7 +937,7 @@ function dr({
927
937
  " selected"
928
938
  ] }),
929
939
  /* @__PURE__ */ e(
930
- A,
940
+ L,
931
941
  {
932
942
  variant: "destructive",
933
943
  size: "sm",
@@ -957,11 +967,11 @@ function dr({
957
967
  }
958
968
  )
959
969
  ] }),
960
- /* @__PURE__ */ e(mt, { className: "h-[300px]", children: w ? /* @__PURE__ */ e("div", { className: "space-y-2", children: [1, 2, 3].map((y) => /* @__PURE__ */ e(ft, { className: "h-16 w-full" }, y)) }) : z.length === 0 ? /* @__PURE__ */ c("div", { className: "flex flex-col items-center justify-center py-12 text-muted-foreground", children: [
970
+ /* @__PURE__ */ e(mt, { className: "h-[300px]", children: S ? /* @__PURE__ */ e("div", { className: "space-y-2", children: [1, 2, 3].map((y) => /* @__PURE__ */ e(ft, { className: "h-16 w-full" }, y)) }) : q.length === 0 ? /* @__PURE__ */ c("div", { className: "flex flex-col items-center justify-center py-12 text-muted-foreground", children: [
961
971
  /* @__PURE__ */ e(bt, { className: "h-12 w-12 mb-3 opacity-50" }),
962
972
  /* @__PURE__ */ e("p", { className: "text-sm font-medium", children: "No available users" }),
963
973
  /* @__PURE__ */ e("p", { className: "text-xs mt-1", children: l ? "Try a different search" : "All eligible users are already members" })
964
- ] }) : /* @__PURE__ */ e("div", { className: "space-y-2", children: z.map((y) => /* @__PURE__ */ e(
974
+ ] }) : /* @__PURE__ */ e("div", { className: "space-y-2", children: q.map((y) => /* @__PURE__ */ e(
965
975
  mr,
966
976
  {
967
977
  user: y,
@@ -978,7 +988,7 @@ function dr({
978
988
  " selected"
979
989
  ] }),
980
990
  /* @__PURE__ */ e(
981
- A,
991
+ L,
982
992
  {
983
993
  onClick: B,
984
994
  disabled: C.isPending,
@@ -1010,7 +1020,7 @@ function ur({
1010
1020
  onClick: n,
1011
1021
  children: [
1012
1022
  /* @__PURE__ */ e(ba, { checked: a }),
1013
- /* @__PURE__ */ e(Mt, { className: "h-8 w-8", children: /* @__PURE__ */ e(At, { className: "text-xs", children: s }) }),
1023
+ /* @__PURE__ */ e(Mt, { className: "h-8 w-8", children: /* @__PURE__ */ e(Lt, { className: "text-xs", children: s }) }),
1014
1024
  /* @__PURE__ */ c("div", { className: "flex-1", children: [
1015
1025
  /* @__PURE__ */ e("p", { className: "text-sm font-medium", children: ((l = t.user) == null ? void 0 : l.name) || "Unknown User" }),
1016
1026
  /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: (p = t.user) == null ? void 0 : p.email })
@@ -1033,7 +1043,7 @@ function mr({
1033
1043
  onClick: n,
1034
1044
  children: [
1035
1045
  /* @__PURE__ */ e(ba, { checked: a }),
1036
- /* @__PURE__ */ e(Mt, { className: "h-8 w-8", children: /* @__PURE__ */ e(At, { className: "text-xs", children: s }) }),
1046
+ /* @__PURE__ */ e(Mt, { className: "h-8 w-8", children: /* @__PURE__ */ e(Lt, { className: "text-xs", children: s }) }),
1037
1047
  /* @__PURE__ */ c("div", { className: "flex-1", children: [
1038
1048
  /* @__PURE__ */ e("p", { className: "text-sm font-medium", children: t.name }),
1039
1049
  /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: t.email })
@@ -1046,11 +1056,11 @@ function hr({
1046
1056
  open: t,
1047
1057
  onOpenChange: a
1048
1058
  }) {
1049
- const [n, s] = N("groups"), [i, u] = N(""), [l, p] = N(null), [g, v] = N(!1), [m, f] = N(null), { tokenProps: h } = j(), { currentUser: d } = Dt(), r = Yn(), b = (d == null ? void 0 : d.type) === "tenant", D = h == null ? void 0 : h.tenantId, { groups: w, isLoading: C, refetch: E } = Ps({
1059
+ const [n, s] = N("groups"), [i, u] = N(""), [l, p] = N(null), [g, v] = N(!1), [m, f] = N(null), { tokenProps: h } = K(), { currentUser: d } = Dt(), r = Yn(), b = (d == null ? void 0 : d.type) === "tenant", D = h == null ? void 0 : h.tenantId, { groups: S, isLoading: C, refetch: E } = Ps({
1050
1060
  type: b ? "TENANT_GROUP" : "all",
1051
1061
  tenantId: b ? D : void 0,
1052
1062
  includeMembers: !1
1053
- }), O = w.filter(
1063
+ }), k = S.filter(
1054
1064
  (x) => {
1055
1065
  var B;
1056
1066
  return x.name.toLowerCase().includes(i.toLowerCase()) || ((B = x.description) == null ? void 0 : B.toLowerCase().includes(i.toLowerCase()));
@@ -1064,14 +1074,14 @@ function hr({
1064
1074
  }
1065
1075
  }, V = (x) => {
1066
1076
  p(x), v(!0);
1067
- }, z = () => {
1077
+ }, q = () => {
1068
1078
  s("groups"), E();
1069
1079
  };
1070
1080
  return /* @__PURE__ */ c(T, { children: [
1071
1081
  /* @__PURE__ */ e(Ge, { open: t, onOpenChange: a, children: /* @__PURE__ */ c($e, { className: "max-h-[80vh] max-w-3xl rounded-[6px] border-border/60 sm:rounded-[6px]", children: [
1072
1082
  /* @__PURE__ */ c(Ve, { children: [
1073
- /* @__PURE__ */ e(ze, { className: "text-[15px]", children: "Group management" }),
1074
- /* @__PURE__ */ e(wt, { className: "text-[13px] leading-5", children: "Manage groups, create new ones, and control membership." })
1083
+ /* @__PURE__ */ e(qe, { className: "text-[15px]", children: "Group management" }),
1084
+ /* @__PURE__ */ e(St, { className: "text-[13px] leading-5", children: "Manage groups, create new ones, and control membership." })
1075
1085
  ] }),
1076
1086
  /* @__PURE__ */ c(
1077
1087
  ma,
@@ -1118,10 +1128,10 @@ function hr({
1118
1128
  className: "h-16 w-full rounded-[6px]"
1119
1129
  },
1120
1130
  x
1121
- )) }) : O.length === 0 ? /* @__PURE__ */ c("div", { className: "flex flex-col items-center justify-center py-12 text-muted-foreground", children: [
1131
+ )) }) : k.length === 0 ? /* @__PURE__ */ c("div", { className: "flex flex-col items-center justify-center py-12 text-muted-foreground", children: [
1122
1132
  /* @__PURE__ */ e("p", { className: "text-[13px]", children: "No groups found." }),
1123
1133
  /* @__PURE__ */ e("p", { className: "mt-1 text-[12px]", children: i ? "Try a different search." : "Create your first group to get started." })
1124
- ] }) : /* @__PURE__ */ e("div", { className: "space-y-2 pr-2", children: O.map((x) => /* @__PURE__ */ e(
1134
+ ] }) : /* @__PURE__ */ e("div", { className: "space-y-2 pr-2", children: k.map((x) => /* @__PURE__ */ e(
1125
1135
  pr,
1126
1136
  {
1127
1137
  group: x,
@@ -1135,7 +1145,7 @@ function hr({
1135
1145
  /* @__PURE__ */ e(Ue, { value: "create", className: "mt-4", children: /* @__PURE__ */ e(
1136
1146
  er,
1137
1147
  {
1138
- onSuccess: z,
1148
+ onSuccess: q,
1139
1149
  tenantId: D,
1140
1150
  isTenantUser: b
1141
1151
  }
@@ -1160,8 +1170,8 @@ function hr({
1160
1170
  onOpenChange: () => f(null),
1161
1171
  children: /* @__PURE__ */ c(xa, { children: [
1162
1172
  /* @__PURE__ */ c(Na, { children: [
1163
- /* @__PURE__ */ e(Sa, { children: "Delete group" }),
1164
- /* @__PURE__ */ c(wa, { children: [
1173
+ /* @__PURE__ */ e(wa, { children: "Delete group" }),
1174
+ /* @__PURE__ */ c(Sa, { children: [
1165
1175
  'Delete "',
1166
1176
  m == null ? void 0 : m.name,
1167
1177
  `"? This removes all members and can't be undone.`
@@ -1207,13 +1217,13 @@ function pr({
1207
1217
  ] }),
1208
1218
  /* @__PURE__ */ c("span", { children: [
1209
1219
  "Created ",
1210
- Sn(new Date(t.createdAt), "MMM d, yyyy")
1220
+ Nn(new Date(t.createdAt), "MMM d, yyyy")
1211
1221
  ] })
1212
1222
  ] })
1213
1223
  ] }),
1214
1224
  /* @__PURE__ */ c("div", { className: "flex shrink-0 items-center gap-0.5", children: [
1215
1225
  /* @__PURE__ */ e(
1216
- A,
1226
+ L,
1217
1227
  {
1218
1228
  variant: "ghost",
1219
1229
  size: "xs",
@@ -1225,7 +1235,7 @@ function pr({
1225
1235
  }
1226
1236
  ),
1227
1237
  i && /* @__PURE__ */ e(
1228
- A,
1238
+ L,
1229
1239
  {
1230
1240
  variant: "ghost",
1231
1241
  size: "xs",
@@ -1353,7 +1363,7 @@ function vr({
1353
1363
  onOpenChange: a,
1354
1364
  initialMode: n = "manage"
1355
1365
  }) {
1356
- var z;
1366
+ var q;
1357
1367
  const s = n === "create", {
1358
1368
  forceClose: i,
1359
1369
  handleOpenChange: u,
@@ -1361,12 +1371,12 @@ function vr({
1361
1371
  preventPassiveDismissDuringCreate: p,
1362
1372
  resolvedOpen: g,
1363
1373
  setIsCreateFlowActive: v
1364
- } = En({
1374
+ } = Cn({
1365
1375
  open: t,
1366
1376
  onOpenChange: a,
1367
1377
  initialCreateFlowActive: n === "create",
1368
1378
  dismissMode: "explicit-only"
1369
- }), m = S((x) => x.dashboard), f = S((x) => x.selectedSheetId), { setDashboardInputs: h } = St(), d = (z = m.sheets) == null ? void 0 : z.find(
1379
+ }), m = w((x) => x.dashboard), f = w((x) => x.selectedSheetId), { setDashboardInputs: h } = wt(), d = (q = m.sheets) == null ? void 0 : q.find(
1370
1380
  (x) => x.id === f
1371
1381
  ), r = (d == null ? void 0 : d.kind) === "document" && !!d.document, b = F(
1372
1382
  () => r && (d != null && d.document) ? Ts(m, d.id) : [],
@@ -1376,16 +1386,16 @@ function vr({
1376
1386
  (x) => x.kind === "control"
1377
1387
  ),
1378
1388
  [b]
1379
- ), w = F(
1389
+ ), S = F(
1380
1390
  () => D.map((x) => x.control),
1381
1391
  [D]
1382
1392
  ), C = F(
1383
- () => yr(w),
1384
- [w]
1393
+ () => yr(S),
1394
+ [S]
1385
1395
  ), E = F(
1386
1396
  () => br(m),
1387
1397
  [m]
1388
- ), O = Fe(() => {
1398
+ ), k = Fe(() => {
1389
1399
  if (s) {
1390
1400
  i();
1391
1401
  return;
@@ -1420,9 +1430,9 @@ function vr({
1420
1430
  onPointerDownOutside: p,
1421
1431
  children: [
1422
1432
  /* @__PURE__ */ c(Ve, { className: l ? "space-y-0" : void 0, children: [
1423
- /* @__PURE__ */ e(ze, { className: "text-[15px]", children: l ? "Add document control" : "Document Controls" }),
1433
+ /* @__PURE__ */ e(qe, { className: "text-[15px]", children: l ? "Add document control" : "Document Controls" }),
1424
1434
  /* @__PURE__ */ e(
1425
- wt,
1435
+ St,
1426
1436
  {
1427
1437
  className: l ? "sr-only" : "text-[13px]",
1428
1438
  children: l ? "Configure and add a document-local control input." : "Add document-local control inputs. They are stored on this document sheet and are not dashboard controls."
@@ -1430,10 +1440,10 @@ function vr({
1430
1440
  )
1431
1441
  ] }),
1432
1442
  /* @__PURE__ */ e("div", { className: "min-h-0 overflow-y-auto pr-1", children: /* @__PURE__ */ e(
1433
- In,
1443
+ En,
1434
1444
  {
1435
1445
  scope: "dashboard",
1436
- controls: w,
1446
+ controls: S,
1437
1447
  reservedControlIds: E,
1438
1448
  defaultValues: C,
1439
1449
  usageByControlId: {},
@@ -1444,7 +1454,7 @@ function vr({
1444
1454
  allowedControlTypes: gr,
1445
1455
  initialCreateFlow: n === "create",
1446
1456
  onCreateFlowActiveChange: v,
1447
- onCreateFlowComplete: O,
1457
+ onCreateFlowComplete: k,
1448
1458
  onChange: I,
1449
1459
  emptyMessage: "No document controls yet."
1450
1460
  }
@@ -1528,41 +1538,41 @@ function la(t, a) {
1528
1538
  }
1529
1539
  function Rr() {
1530
1540
  var Qt, Wt, Jt, Yt, Xt, Zt;
1531
- pn(), fn();
1541
+ hn(), pn();
1532
1542
  const {
1533
1543
  authToken: t,
1534
1544
  tokenProps: a,
1535
1545
  id: n
1536
- } = j(), { isLocalDev: s } = Fs(), { openBrandStudioPreview: i } = Rs(), { permissions: u } = Hn(), l = Gs(), { isLoading: p } = $s(), g = S((o) => o.theme), v = S((o) => o.isDownloadingPdf), m = S(
1546
+ } = K(), { isLocalDev: s } = Fs(), { openBrandStudioPreview: i } = Rs(), { permissions: u } = Hn(), l = Gs(), { isLoading: p } = $s(), g = w((o) => o.theme), v = w((o) => o.isDownloadingPdf), m = w(
1537
1547
  (o) => o.dashboardAssistantDraftScopeKey
1538
- ), f = S((o) => o.lenses), h = S((o) => o.selectedLensId), d = f == null ? void 0 : f.find((o) => o.id === h), r = S((o) => o.dashboard), b = S((o) => o.selectedSheetId), D = (Qt = r == null ? void 0 : r.sheets) == null ? void 0 : Qt.find(
1548
+ ), f = w((o) => o.lenses), h = w((o) => o.selectedLensId), d = f == null ? void 0 : f.find((o) => o.id === h), r = w((o) => o.dashboard), b = w((o) => o.selectedSheetId), D = (Qt = r == null ? void 0 : r.sheets) == null ? void 0 : Qt.find(
1539
1549
  (o) => o.id === b
1540
- ), w = ms(D), C = w ? (Wt = D == null ? void 0 : D.document) == null ? void 0 : Wt.page : void 0, E = S(
1550
+ ), S = ms(D), C = S ? (Wt = D == null ? void 0 : D.document) == null ? void 0 : Wt.page : void 0, E = w(
1541
1551
  (o) => o.isDashboardEditing
1542
- ), { setDashboardTitle: O } = S((o) => o.actions), [I, V] = N(!1), [z, x] = N(!1), [B, W] = N(!1), [Z, ee] = N(!1), [y, k] = N(!1), [G, H] = N(!1), [me, te] = N(!1), [Ua, Lt] = N(!1), [He, he] = N(null), [Fa, pe] = N(!1), [fe, ge] = N(null), [Ot, ve] = N([]), [kt, be] = N(!1), Ra = S((o) => o.isDashboardPanelOpen), Ga = S(
1552
+ ), { setDashboardTitle: k } = w((o) => o.actions), [I, V] = N(!1), [q, x] = N(!1), [B, W] = N(!1), [Z, ee] = N(!1), [y, O] = N(!1), [G, H] = N(!1), [me, te] = N(!1), [Ua, At] = N(!1), [He, he] = N(null), [Fa, pe] = N(!1), [fe, ge] = N(null), [kt, ve] = N([]), [Ot, be] = N(!1), Ra = w((o) => o.isDashboardPanelOpen), Ga = w(
1543
1553
  (o) => o.actions.setIsDashboardPanelOpen
1544
- ), $a = S((o) => o.filterValues), _ = S((o) => o.isVisualEditing);
1554
+ ), $a = w((o) => o.filterValues), _ = w((o) => o.isVisualEditing);
1545
1555
  ta((o) => o.card);
1546
- const ae = ke(
1556
+ const ae = Oe(
1547
1557
  (o) => o.selectedDashboard
1548
- ), ye = ke(
1558
+ ), ye = Oe(
1549
1559
  (o) => o.initialDashboard
1550
1560
  );
1551
- ke((o) => o.selectedVisual), S((o) => o.selectedFrameId), ta((o) => o.frame);
1552
- const xe = ae ? (Yt = ae == null ? void 0 : ae.permissions) == null ? void 0 : Yt.canEdit : (Jt = ye == null ? void 0 : ye.permissions) == null ? void 0 : Jt.canEdit, Ne = S((o) => o.showFilters), Pt = Vs((o) => o.setPanelOpen), Tt = S(
1561
+ Oe((o) => o.selectedVisual), w((o) => o.selectedFrameId), ta((o) => o.frame);
1562
+ const xe = ae ? (Yt = ae == null ? void 0 : ae.permissions) == null ? void 0 : Yt.canEdit : (Jt = ye == null ? void 0 : ye.permissions) == null ? void 0 : Jt.canEdit, Ne = w((o) => o.showFilters), Pt = Vs((o) => o.setPanelOpen), Tt = w(
1553
1563
  (o) => o.showDashboardJSON
1554
- ), je = S((o) => o.onSaveFunction), _t = S(
1564
+ ), je = w((o) => o.onSaveFunction), _t = w(
1555
1565
  (o) => o.actions.setShowFilters
1556
1566
  ), {
1557
1567
  setDocumentInspectorTab: Ut,
1558
1568
  setIsDashboardEditing: Ft,
1559
1569
  setShowDashboardJSON: Rt
1560
- } = S((o) => o.actions), { setInitialDashboard: Gt, clearSelectedDashboard: Ke } = ke(
1570
+ } = w((o) => o.actions), { setInitialDashboard: Gt, clearSelectedDashboard: Ke } = Oe(
1561
1571
  (o) => o.actions
1562
- ), { resources: Se } = zs(nt.DASHBOARD), { data: Qe } = qs(), Va = ((Xt = Qe == null ? void 0 : Qe.preference) == null ? void 0 : Xt.defaultDashboardId) || null, { mutate: za, isPending: qa } = Bs(), { currentUser: Ba } = Dt(), Ha = Hs(Ba), J = ae || ye, $t = J ? {
1572
+ ), { resources: we } = qs(nt.DASHBOARD), { data: Qe } = zs(), Va = ((Xt = Qe == null ? void 0 : Qe.preference) == null ? void 0 : Xt.defaultDashboardId) || null, { mutate: qa, isPending: za } = Bs(), { currentUser: Ba } = Dt(), Ha = Hs(Ba), J = ae || ye, $t = J ? {
1563
1573
  id: J.id,
1564
1574
  title: (r == null ? void 0 : r.title) || J.title || "Dashboard"
1565
- } : null, { handleAddNewFrame: ja } = js(), [We, Je] = N(!1), [Ka, se] = N(!1), [Ye, we] = N("close"), ne = Ks(nt.DASHBOARD), [R, De] = N(null), Vt = Fe((o) => {
1575
+ } : null, { handleAddNewFrame: ja } = js(), [We, Je] = N(!1), [Ka, se] = N(!1), [Ye, Se] = N("close"), ne = Ks(nt.DASHBOARD), [R, De] = N(null), Vt = Fe((o) => {
1566
1576
  window.setTimeout(() => {
1567
1577
  he(o);
1568
1578
  }, 0);
@@ -1584,28 +1594,28 @@ function Rr() {
1584
1594
  onSuccess: () => {
1585
1595
  console.log("Dashboard title updated successfully"), M.success("Dashboard title updated");
1586
1596
  },
1587
- onError: (q) => {
1588
- console.error("Failed to update dashboard title:", q), M.error("Failed to update dashboard title"), O(P);
1597
+ onError: (z) => {
1598
+ console.error("Failed to update dashboard title:", z), M.error("Failed to update dashboard title"), k(P);
1589
1599
  }
1590
1600
  }
1591
1601
  );
1592
1602
  };
1593
1603
  ot(() => {
1594
- if (Se && Se.length > 0) {
1604
+ if (we && we.length > 0) {
1595
1605
  const o = r == null ? void 0 : r.id;
1596
1606
  if (o) {
1597
- const P = Se.find(
1598
- (q) => q.id === o
1607
+ const P = we.find(
1608
+ (z) => z.id === o
1599
1609
  );
1600
1610
  P && Gt(P);
1601
1611
  }
1602
1612
  }
1603
- }, [Se, r == null ? void 0 : r.id, Gt]);
1613
+ }, [we, r == null ? void 0 : r.id, Gt]);
1604
1614
  const re = a.orgUserId || a.tenantId, Xe = F(
1605
- () => Sr({
1615
+ () => wr({
1606
1616
  accessToken: t == null ? void 0 : t.accessToken,
1607
1617
  dashboardId: (r == null ? void 0 : r.id) || n || a.dashboard_id,
1608
- selectedSheetId: w ? b : void 0,
1618
+ selectedSheetId: S ? b : void 0,
1609
1619
  pageSize: C == null ? void 0 : C.size,
1610
1620
  orientation: C == null ? void 0 : C.orientation,
1611
1621
  theme: g
@@ -1614,14 +1624,14 @@ function Rr() {
1614
1624
  t == null ? void 0 : t.accessToken,
1615
1625
  n,
1616
1626
  r == null ? void 0 : r.id,
1617
- w,
1627
+ S,
1618
1628
  C == null ? void 0 : C.orientation,
1619
1629
  C == null ? void 0 : C.size,
1620
1630
  b,
1621
1631
  g,
1622
1632
  a.dashboard_id
1623
1633
  ]
1624
- ), zt = E && !_ && re && xe, { setDashboard: Ze } = S((o) => o.actions), et = S(
1634
+ ), qt = E && !_ && re && xe, { setDashboard: Ze } = w((o) => o.actions), et = w(
1625
1635
  (o) => o.semanticExecutionPayload
1626
1636
  ), Wa = () => {
1627
1637
  Ft(!0);
@@ -1646,14 +1656,14 @@ function Rr() {
1646
1656
  p,
1647
1657
  et
1648
1658
  ]);
1649
- const Ce = (R == null ? void 0 : R.dashboard) ?? null, { isDirty: qt, isDirtyPending: Ja, resetDirty: Ee } = Cn(
1659
+ const Ce = (R == null ? void 0 : R.dashboard) ?? null, { isDirty: zt, isDirtyPending: Ja, resetDirty: Ee } = Dn(
1650
1660
  r,
1651
1661
  Ce,
1652
1662
  300,
1653
1663
  1e3,
1654
1664
  it
1655
- ), Bt = Fe(() => Ce ? it(r) !== it(Ce) : !1, [r, Ce]), Ht = qt || Ja, Ie = We || ne.isPending, Ya = () => {
1656
- Bt() ? (we("close"), se(!0)) : (tt(), Ee());
1665
+ ), Bt = Fe(() => Ce ? it(r) !== it(Ce) : !1, [r, Ce]), Ht = zt || Ja, Ie = We || ne.isPending, Ya = () => {
1666
+ Bt() ? (Se("close"), se(!0)) : (tt(), Ee());
1657
1667
  }, Xa = async () => {
1658
1668
  await at({
1659
1669
  closeAfterSave: !0,
@@ -1662,24 +1672,24 @@ function Rr() {
1662
1672
  }, Za = () => {
1663
1673
  R && Ze(R.dashboard, {
1664
1674
  semanticExecutionPayload: R.semanticExecutionPayload
1665
- }), tt(), Ye === "home" && Ke(), we("close"), se(!1), Ee();
1675
+ }), tt(), Ye === "home" && Ke(), Se("close"), se(!1), Ee();
1666
1676
  }, es = () => {
1667
1677
  R && (Ze(R.dashboard, {
1668
1678
  semanticExecutionPayload: R.semanticExecutionPayload
1669
1679
  }), Ee());
1670
1680
  }, ts = () => {
1671
1681
  if (E && Bt()) {
1672
- we("home"), se(!0);
1682
+ Se("home"), se(!0);
1673
1683
  return;
1674
1684
  }
1675
1685
  Ke();
1676
1686
  };
1677
1687
  async function at(o) {
1678
- const P = S.getState().dashboard;
1688
+ const P = w.getState().dashboard;
1679
1689
  if (!P)
1680
1690
  return;
1681
- const q = (o == null ? void 0 : o.closeAfterSave) ?? kt, os = (o == null ? void 0 : o.navigateHomeAfterSave) ?? !1;
1682
- be(q), q && se(!1);
1691
+ const z = (o == null ? void 0 : o.closeAfterSave) ?? Ot, os = (o == null ? void 0 : o.navigateHomeAfterSave) ?? !1;
1692
+ be(z), z && se(!1);
1683
1693
  const is = vt(P);
1684
1694
  pe(!0), ge(null), ve([]), Je(!0);
1685
1695
  const cs = {
@@ -1692,31 +1702,31 @@ function Rr() {
1692
1702
  },
1693
1703
  {
1694
1704
  onSuccess: (U) => {
1695
- var Ae, Le, ea;
1696
- const K = (U == null ? void 0 : U.id) || ((Ae = U == null ? void 0 : U.dashboard) == null ? void 0 : Ae.id) || ((Le = U == null ? void 0 : U.resource) == null ? void 0 : Le.id) || ((ea = U == null ? void 0 : U.template) == null ? void 0 : ea.id) || null;
1697
- if (!P.id && K) {
1698
- const st = bs.getState(), Oe = st.pendingDashboardDraftMigration;
1699
- (Oe == null ? void 0 : Oe.scopeKey) === m ? st.actions.setPendingDashboardDraftMigrationExpectedDashboardId(
1700
- K
1701
- ) : Oe && st.actions.clearPendingDashboardDraftMigration();
1705
+ var Le, Ae, ea;
1706
+ const Q = (U == null ? void 0 : U.id) || ((Le = U == null ? void 0 : U.dashboard) == null ? void 0 : Le.id) || ((Ae = U == null ? void 0 : U.resource) == null ? void 0 : Ae.id) || ((ea = U == null ? void 0 : U.template) == null ? void 0 : ea.id) || null;
1707
+ if (!P.id && Q) {
1708
+ const st = bs.getState(), ke = st.pendingDashboardDraftMigration;
1709
+ (ke == null ? void 0 : ke.scopeKey) === m ? st.actions.setPendingDashboardDraftMigrationExpectedDashboardId(
1710
+ Q
1711
+ ) : ke && st.actions.clearPendingDashboardDraftMigration();
1702
1712
  }
1703
1713
  Je(!1), M.success("Dashboard saved!"), De(
1704
1714
  la(
1705
1715
  is,
1706
- S.getState().semanticExecutionPayload
1716
+ w.getState().semanticExecutionPayload
1707
1717
  )
1708
- ), pe(!1), be(!1), q && (tt(), Ee(), os && Ke()), we("close");
1718
+ ), pe(!1), be(!1), z && (tt(), Ee(), os && Ke()), Se("close");
1709
1719
  },
1710
1720
  onError: (U) => {
1711
1721
  Je(!1), ge("Failed to save dashboard. Please try again.");
1712
- const K = U.details, Ae = Array.isArray(
1713
- K == null ? void 0 : K.errors
1714
- ) ? (K.errors || []).filter(
1715
- (Le) => typeof Le == "string"
1722
+ const Q = U.details, Le = Array.isArray(
1723
+ Q == null ? void 0 : Q.errors
1724
+ ) ? (Q.errors || []).filter(
1725
+ (Ae) => typeof Ae == "string"
1716
1726
  ) : [];
1717
1727
  ve(
1718
1728
  fr({
1719
- errors: Ae,
1729
+ errors: Le,
1720
1730
  dashboard: P || void 0
1721
1731
  })
1722
1732
  ), M.error("Failed to save dashboard");
@@ -1726,19 +1736,19 @@ function Rr() {
1726
1736
  }
1727
1737
  async function as() {
1728
1738
  if (V(!0), !h || !d) return;
1729
- const o = S.getState().dashboard;
1739
+ const o = w.getState().dashboard;
1730
1740
  if (!o) {
1731
1741
  V(!1);
1732
1742
  return;
1733
1743
  }
1734
- const P = JSON.stringify(o), q = {
1744
+ const P = JSON.stringify(o), z = {
1735
1745
  ...d,
1736
1746
  template: P,
1737
1747
  filterValues: $a
1738
1748
  };
1739
1749
  await xt(
1740
1750
  a.apiServiceUrl,
1741
- q,
1751
+ z,
1742
1752
  t == null ? void 0 : t.accessToken
1743
1753
  ), M.success("Lens saved"), je == null || je(o), V(!1);
1744
1754
  }
@@ -1754,7 +1764,7 @@ function Rr() {
1754
1764
  !oe && Z && ee(!1);
1755
1765
  }, [oe, Z]);
1756
1766
  const ns = l, ie = (r == null ? void 0 : r.id) || null, Me = !!ie && Va === ie, rs = () => {
1757
- ie && za({
1767
+ ie && qa({
1758
1768
  dashboardId: Me ? null : ie
1759
1769
  });
1760
1770
  };
@@ -1776,7 +1786,7 @@ function Rr() {
1776
1786
  },
1777
1787
  className: "h-7 w-7 px-0",
1778
1788
  buttonProps: { size: "xs" },
1779
- children: /* @__PURE__ */ e(On, { className: "h-3.5 w-3.5" })
1789
+ children: /* @__PURE__ */ e(An, { className: "h-3.5 w-3.5" })
1780
1790
  }
1781
1791
  ),
1782
1792
  ns && !_ && /* @__PURE__ */ e(
@@ -1811,7 +1821,7 @@ function Rr() {
1811
1821
  dashboardId: r == null ? void 0 : r.id
1812
1822
  });
1813
1823
  const P = (r == null ? void 0 : r.title) || "";
1814
- O(o), Qa(o, P);
1824
+ k(o), Qa(o, P);
1815
1825
  },
1816
1826
  isEditable: xe && !d,
1817
1827
  displayClassName: "text-[13px] font-medium",
@@ -1822,12 +1832,12 @@ function Rr() {
1822
1832
  ),
1823
1833
  ss && ie && /* @__PURE__ */ e(hs, { children: /* @__PURE__ */ c(ps, { children: [
1824
1834
  /* @__PURE__ */ e(fs, { asChild: !0, children: /* @__PURE__ */ e(
1825
- A,
1835
+ L,
1826
1836
  {
1827
1837
  variant: "ghost",
1828
1838
  size: "xs",
1829
1839
  onClick: rs,
1830
- disabled: qa || !(t != null && t.accessToken) || !(a != null && a.apiServiceUrl),
1840
+ disabled: za || !(t != null && t.accessToken) || !(a != null && a.apiServiceUrl),
1831
1841
  className: "w-7 px-0",
1832
1842
  "aria-label": Me ? "Remove as default dashboard" : "Make this a default dashboard",
1833
1843
  children: /* @__PURE__ */ e(
@@ -1847,11 +1857,11 @@ function Rr() {
1847
1857
  ] }),
1848
1858
  /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
1849
1859
  _ && /* @__PURE__ */ c(T, { children: [
1850
- /* @__PURE__ */ e(gn, {}),
1851
- /* @__PURE__ */ e(vn, {})
1860
+ /* @__PURE__ */ e(fn, {}),
1861
+ /* @__PURE__ */ e(gn, {})
1852
1862
  ] }),
1853
1863
  !_ && l && ((Zt = J == null ? void 0 : J.permissions) == null ? void 0 : Zt.canShare) && /* @__PURE__ */ c(
1854
- A,
1864
+ L,
1855
1865
  {
1856
1866
  variant: "outline",
1857
1867
  size: "xs",
@@ -1863,18 +1873,18 @@ function Rr() {
1863
1873
  }
1864
1874
  ),
1865
1875
  !_ && E && u.canUseFilters && l && /* @__PURE__ */ e(
1866
- bn,
1876
+ vn,
1867
1877
  {
1868
- showFilters: w ? !1 : Ne,
1878
+ showFilters: S ? !1 : Ne,
1869
1879
  onToggleFilters: () => {
1870
- if (w && b) {
1880
+ if (S && b) {
1871
1881
  Ut(b, "inputs");
1872
1882
  return;
1873
1883
  }
1874
1884
  Ne || Pt("dashboard", !1), _t(!Ne);
1875
1885
  },
1876
1886
  onAddFilter: () => {
1877
- if (w && b) {
1887
+ if (S && b) {
1878
1888
  Ut(b, "inputs");
1879
1889
  return;
1880
1890
  }
@@ -1886,7 +1896,7 @@ function Rr() {
1886
1896
  onManageControls: () => Vt("manage")
1887
1897
  }
1888
1898
  ),
1889
- E && !_ && l && He ? w ? /* @__PURE__ */ e(
1899
+ E && !_ && l && He ? S ? /* @__PURE__ */ e(
1890
1900
  vr,
1891
1901
  {
1892
1902
  open: !0,
@@ -1896,7 +1906,7 @@ function Rr() {
1896
1906
  initialMode: He
1897
1907
  }
1898
1908
  ) : /* @__PURE__ */ e(
1899
- yn,
1909
+ bn,
1900
1910
  {
1901
1911
  open: !0,
1902
1912
  onOpenChange: (o) => {
@@ -1907,7 +1917,7 @@ function Rr() {
1907
1917
  }
1908
1918
  ) : null,
1909
1919
  E && !_ && re && d && s && l && /* @__PURE__ */ c(
1910
- A,
1920
+ L,
1911
1921
  {
1912
1922
  variant: "secondary",
1913
1923
  size: "xs",
@@ -1919,8 +1929,8 @@ function Rr() {
1919
1929
  ]
1920
1930
  }
1921
1931
  ),
1922
- E && !_ && l && !w && /* @__PURE__ */ c(
1923
- A,
1932
+ E && !_ && l && !S && /* @__PURE__ */ c(
1933
+ L,
1924
1934
  {
1925
1935
  variant: "outline",
1926
1936
  size: "xs",
@@ -1932,25 +1942,25 @@ function Rr() {
1932
1942
  ]
1933
1943
  }
1934
1944
  ),
1935
- !_ && !E && xe && l && /* @__PURE__ */ c(A, { size: "xs", onClick: Wa, children: [
1945
+ !_ && !E && xe && l && /* @__PURE__ */ c(L, { size: "xs", onClick: Wa, children: [
1936
1946
  /* @__PURE__ */ e(Ys, { className: "h-3.5 w-3.5" }),
1937
1947
  "Edit"
1938
1948
  ] }),
1939
- zt && l && qt && /* @__PURE__ */ c(
1940
- A,
1949
+ qt && l && zt && /* @__PURE__ */ c(
1950
+ L,
1941
1951
  {
1942
1952
  variant: "outline",
1943
1953
  size: "xs",
1944
1954
  onClick: es,
1945
1955
  disabled: Ie,
1946
1956
  children: [
1947
- /* @__PURE__ */ e(Xs, { className: "h-3.5 w-3.5" }),
1957
+ /* @__PURE__ */ e(_n, { className: "h-3.5 w-3.5" }),
1948
1958
  "Undo"
1949
1959
  ]
1950
1960
  }
1951
1961
  ),
1952
- zt && l && /* @__PURE__ */ c(
1953
- A,
1962
+ qt && l && /* @__PURE__ */ c(
1963
+ L,
1954
1964
  {
1955
1965
  size: "xs",
1956
1966
  className: Y(!Ht && "opacity-60"),
@@ -1962,14 +1972,14 @@ function Rr() {
1962
1972
  ]
1963
1973
  }
1964
1974
  ),
1965
- E && !_ && l && /* @__PURE__ */ c(A, { variant: "outline", size: "xs", onClick: Ya, children: [
1975
+ E && !_ && l && /* @__PURE__ */ c(L, { variant: "outline", size: "xs", onClick: Ya, children: [
1966
1976
  /* @__PURE__ */ e(ga, { className: "h-3.5 w-3.5" }),
1967
1977
  "Close"
1968
1978
  ] }),
1969
- !_ && l && /* @__PURE__ */ e("div", { className: "ml-2", children: /* @__PURE__ */ e(xn, {}) }),
1979
+ !_ && l && /* @__PURE__ */ e("div", { className: "ml-2", children: /* @__PURE__ */ e(yn, {}) }),
1970
1980
  !_ && s && /* @__PURE__ */ e(Gn, {}),
1971
- !_ && l && /* @__PURE__ */ c(Zs, { children: [
1972
- /* @__PURE__ */ e(en, { asChild: !0, children: /* @__PURE__ */ e(
1981
+ !_ && l && /* @__PURE__ */ c(Xs, { children: [
1982
+ /* @__PURE__ */ e(Zs, { asChild: !0, children: /* @__PURE__ */ e(
1973
1983
  rt,
1974
1984
  {
1975
1985
  tooltip: "More Options",
@@ -1979,11 +1989,11 @@ function Rr() {
1979
1989
  variant: "ghost",
1980
1990
  "aria-label": "More dashboard options"
1981
1991
  },
1982
- children: /* @__PURE__ */ e(tn, { className: "h-3.5 w-3.5" })
1992
+ children: /* @__PURE__ */ e(en, { className: "h-3.5 w-3.5" })
1983
1993
  }
1984
1994
  ) }),
1985
1995
  /* @__PURE__ */ c(
1986
- an,
1996
+ tn,
1987
1997
  {
1988
1998
  align: "end",
1989
1999
  className: "w-56 rounded-control border border-border/60 p-1 shadow-sm",
@@ -1993,9 +2003,9 @@ function Rr() {
1993
2003
  $,
1994
2004
  {
1995
2005
  disabled: v,
1996
- onSelect: () => Lt(!0),
2006
+ onSelect: () => At(!0),
1997
2007
  children: [
1998
- /* @__PURE__ */ e(sn, { className: "h-3.5 w-3.5" }),
2008
+ /* @__PURE__ */ e(an, { className: "h-3.5 w-3.5" }),
1999
2009
  "Export"
2000
2010
  ]
2001
2011
  }
@@ -2008,7 +2018,7 @@ function Rr() {
2008
2018
  oe && ee(!0);
2009
2019
  },
2010
2020
  children: [
2011
- /* @__PURE__ */ e(nn, { className: "h-3.5 w-3.5" }),
2021
+ /* @__PURE__ */ e(sn, { className: "h-3.5 w-3.5" }),
2012
2022
  "Schedule"
2013
2023
  ]
2014
2024
  }
@@ -2029,12 +2039,12 @@ function Rr() {
2029
2039
  /* @__PURE__ */ e(Te, {})
2030
2040
  ] }),
2031
2041
  /* @__PURE__ */ e(de, { children: "Preferences" }),
2032
- /* @__PURE__ */ c($, { onClick: () => k(!0), children: [
2033
- /* @__PURE__ */ e(rn, { className: "h-3.5 w-3.5" }),
2042
+ /* @__PURE__ */ c($, { onClick: () => O(!0), children: [
2043
+ /* @__PURE__ */ e(nn, { className: "h-3.5 w-3.5" }),
2034
2044
  "Calendar Preferences"
2035
2045
  ] }),
2036
2046
  /* @__PURE__ */ c($, { onClick: () => H(!0), children: [
2037
- /* @__PURE__ */ e(on, { className: "h-3.5 w-3.5" }),
2047
+ /* @__PURE__ */ e(rn, { className: "h-3.5 w-3.5" }),
2038
2048
  "Summary Settings"
2039
2049
  ] }),
2040
2050
  s && l && /* @__PURE__ */ c(T, { children: [
@@ -2055,7 +2065,7 @@ function Rr() {
2055
2065
  ]
2056
2066
  }
2057
2067
  ),
2058
- w && /* @__PURE__ */ c(
2068
+ S && /* @__PURE__ */ c(
2059
2069
  $,
2060
2070
  {
2061
2071
  disabled: !Xe,
@@ -2088,13 +2098,13 @@ function Rr() {
2088
2098
  {
2089
2099
  onSelect: () => vs(a.apiServiceUrl),
2090
2100
  children: [
2091
- /* @__PURE__ */ e(Tn, { className: "h-3.5 w-3.5" }),
2101
+ /* @__PURE__ */ e(Pn, { className: "h-3.5 w-3.5" }),
2092
2102
  "Invalidate token"
2093
2103
  ]
2094
2104
  }
2095
2105
  ),
2096
2106
  /* @__PURE__ */ c($, { onSelect: i, children: [
2097
- /* @__PURE__ */ e(Mn, { className: "h-3.5 w-3.5" }),
2107
+ /* @__PURE__ */ e(In, { className: "h-3.5 w-3.5" }),
2098
2108
  "Brand Studio"
2099
2109
  ] }),
2100
2110
  E && /* @__PURE__ */ c(
@@ -2102,7 +2112,7 @@ function Rr() {
2102
2112
  {
2103
2113
  onSelect: () => Rt(!Tt),
2104
2114
  children: [
2105
- /* @__PURE__ */ e(An, { className: "h-3.5 w-3.5" }),
2115
+ /* @__PURE__ */ e(Mn, { className: "h-3.5 w-3.5" }),
2106
2116
  Tt ? "Hide dashboard JSON" : "Show dashboard JSON"
2107
2117
  ]
2108
2118
  }
@@ -2111,20 +2121,20 @@ function Rr() {
2111
2121
  /* @__PURE__ */ e(ht, { className: "h-3.5 w-3.5" }),
2112
2122
  "Add lens"
2113
2123
  ] }),
2114
- re && /* @__PURE__ */ c(cn, { children: [
2115
- /* @__PURE__ */ c(ln, { children: [
2124
+ re && /* @__PURE__ */ c(on, { children: [
2125
+ /* @__PURE__ */ c(cn, { children: [
2116
2126
  /* @__PURE__ */ e(Ln, { className: "h-3.5 w-3.5" }),
2117
2127
  "Lenses"
2118
2128
  ] }),
2119
- /* @__PURE__ */ e(dn, { className: "w-60", children: /* @__PURE__ */ e(Bn, {}) })
2129
+ /* @__PURE__ */ e(ln, { className: "w-60", children: /* @__PURE__ */ e(Bn, {}) })
2120
2130
  ] })
2121
2131
  ] })
2122
2132
  ]
2123
2133
  }
2124
2134
  )
2125
2135
  ] }),
2126
- z && $t && /* @__PURE__ */ e(
2127
- un,
2136
+ q && $t && /* @__PURE__ */ e(
2137
+ dn,
2128
2138
  {
2129
2139
  resource: $t,
2130
2140
  resourceType: nt.DASHBOARD,
@@ -2139,7 +2149,7 @@ function Rr() {
2139
2149
  }
2140
2150
  ),
2141
2151
  oe && (r == null ? void 0 : r.id) && /* @__PURE__ */ e(
2142
- mn,
2152
+ un,
2143
2153
  {
2144
2154
  open: Z,
2145
2155
  onOpenChange: ee,
@@ -2151,11 +2161,11 @@ function Rr() {
2151
2161
  wn,
2152
2162
  {
2153
2163
  open: y,
2154
- onOpenChange: k
2164
+ onOpenChange: O
2155
2165
  }
2156
2166
  ),
2157
2167
  /* @__PURE__ */ e(
2158
- Dn,
2168
+ Sn,
2159
2169
  {
2160
2170
  open: G,
2161
2171
  onOpenChange: H,
@@ -2172,12 +2182,12 @@ function Rr() {
2172
2182
  )
2173
2183
  }
2174
2184
  ),
2175
- s && re && l && /* @__PURE__ */ e(qn, { open: me, onOpenChange: te }),
2185
+ s && re && l && /* @__PURE__ */ e(zn, { open: me, onOpenChange: te }),
2176
2186
  l && /* @__PURE__ */ e(
2177
- hn,
2187
+ mn,
2178
2188
  {
2179
2189
  open: Ua,
2180
- onOpenChange: Lt
2190
+ onOpenChange: At
2181
2191
  }
2182
2192
  ),
2183
2193
  /* @__PURE__ */ e(
@@ -2189,11 +2199,11 @@ function Rr() {
2189
2199
  },
2190
2200
  children: /* @__PURE__ */ c(xa, { className: "max-w-sm", children: [
2191
2201
  /* @__PURE__ */ c(Na, { children: [
2192
- /* @__PURE__ */ e(Sa, { children: fe ? "Save failed" : "Saving dashboard" }),
2193
- /* @__PURE__ */ e(wa, { className: "pt-2", children: fe ? "We could not save the dashboard. Please try again." : "Please wait while we save your changes." }),
2194
- Ot.length > 0 && /* @__PURE__ */ c("div", { className: "space-y-1 rounded-md border border-destructive/20 bg-destructive/5 p-3 text-left", children: [
2202
+ /* @__PURE__ */ e(wa, { children: fe ? "Save failed" : "Saving dashboard" }),
2203
+ /* @__PURE__ */ e(Sa, { className: "pt-2", children: fe ? "We could not save the dashboard. Please try again." : "Please wait while we save your changes." }),
2204
+ kt.length > 0 && /* @__PURE__ */ c("div", { className: "space-y-1 rounded-md border border-destructive/20 bg-destructive/5 p-3 text-left", children: [
2195
2205
  /* @__PURE__ */ e("div", { className: "text-sm font-medium text-destructive", children: "What needs attention" }),
2196
- /* @__PURE__ */ e("ul", { className: "list-disc space-y-1 pl-4 text-xs text-muted-foreground", children: Ot.slice(0, 5).map((o) => /* @__PURE__ */ e("li", { children: o }, o)) })
2206
+ /* @__PURE__ */ e("ul", { className: "list-disc space-y-1 pl-4 text-xs text-muted-foreground", children: kt.slice(0, 5).map((o) => /* @__PURE__ */ e("li", { children: o }, o)) })
2197
2207
  ] })
2198
2208
  ] }),
2199
2209
  /* @__PURE__ */ e(Da, { className: "flex-col gap-2 sm:flex-row sm:justify-end", children: fe ? /* @__PURE__ */ c(T, { children: [
@@ -2211,7 +2221,7 @@ function Rr() {
2211
2221
  gt,
2212
2222
  {
2213
2223
  onClick: () => at({
2214
- closeAfterSave: kt,
2224
+ closeAfterSave: Ot,
2215
2225
  navigateHomeAfterSave: Ye === "home"
2216
2226
  }),
2217
2227
  className: "m-0",
@@ -2226,7 +2236,7 @@ function Rr() {
2226
2236
  }
2227
2237
  ),
2228
2238
  /* @__PURE__ */ e(
2229
- Nn,
2239
+ xn,
2230
2240
  {
2231
2241
  open: Ka,
2232
2242
  onOpenChange: (o) => {
@@ -2244,7 +2254,7 @@ function Rr() {
2244
2254
  }
2245
2255
  );
2246
2256
  }
2247
- function Sr({
2257
+ function wr({
2248
2258
  accessToken: t,
2249
2259
  dashboardId: a,
2250
2260
  selectedSheetId: n,