react-semaphor 0.1.222 → 0.1.224

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 (29) hide show
  1. package/dist/chunks/{dashboard-controls-D-Sk3bot.js → dashboard-controls--h9IUEDT.js} +240 -235
  2. package/dist/chunks/{dashboard-controls-DzbrN3nE.js → dashboard-controls-IVKTw9Wu.js} +2 -2
  3. package/dist/chunks/{dashboard-json-Kk8hngzJ.js → dashboard-json-BiRlE3tk.js} +1 -1
  4. package/dist/chunks/{dashboard-json-G1x9c18t.js → dashboard-json-DqusEFyG.js} +1 -1
  5. package/dist/chunks/{dashboard-summary-settings-dialog-BLKai9NG.js → dashboard-summary-settings-dialog-CMWA3IWW.js} +1 -1
  6. package/dist/chunks/{dashboard-summary-settings-dialog-BLYkd7o1.js → dashboard-summary-settings-dialog-DgrTQeq5.js} +1 -1
  7. package/dist/chunks/{edit-dashboard-visual-DfhYZXlV.js → edit-dashboard-visual-BFC1d2D4.js} +7802 -6794
  8. package/dist/chunks/edit-dashboard-visual-CJI6k2A4.js +177 -0
  9. package/dist/chunks/{editor-action-buttons-B4ERZhy7.js → editor-action-buttons-DCAIoX0j.js} +1 -1
  10. package/dist/chunks/{editor-action-buttons-BLfcnwJw.js → editor-action-buttons-DdNZTA1e.js} +2 -2
  11. package/dist/chunks/{index-B_GEcxbY.js → index-D232h2I1.js} +20506 -20312
  12. package/dist/chunks/{index--y5CjlXd.js → index-DiWe8LKP.js} +214 -214
  13. package/dist/chunks/{notification-bell-B3WyQGOm.js → notification-bell-D3eMw8QY.js} +1 -1
  14. package/dist/chunks/{notification-bell-D4nz9sko.js → notification-bell-DXAAQK14.js} +3 -3
  15. package/dist/chunks/{resource-management-panel-B41mJoKV.js → resource-management-panel-CLB6XF7s.js} +3 -3
  16. package/dist/chunks/{resource-management-panel-CekU_x8B.js → resource-management-panel-DC2CALo3.js} +1 -1
  17. package/dist/chunks/{use-role-aware-display-preferences-BEDgxtsG.js → use-role-aware-display-preferences-CjMbLlvg.js} +1 -1
  18. package/dist/chunks/{use-role-aware-display-preferences-BFAGv6Wc.js → use-role-aware-display-preferences-R7TnYxh8.js} +1 -1
  19. package/dist/chunks/{use-visual-utils-CTN6OExn.js → use-visual-utils-C4zq-ybd.js} +1 -1
  20. package/dist/chunks/{use-visual-utils-XvC5URrG.js → use-visual-utils-D7HvCrtR.js} +1 -1
  21. package/dist/dashboard/index.cjs +1 -1
  22. package/dist/dashboard/index.js +1 -1
  23. package/dist/index.cjs +1 -1
  24. package/dist/index.js +5 -5
  25. package/dist/style.css +1 -1
  26. package/dist/surfboard/index.cjs +1 -1
  27. package/dist/surfboard/index.js +2 -2
  28. package/package.json +1 -1
  29. package/dist/chunks/edit-dashboard-visual-Cxbe8-qK.js +0 -164
@@ -1,15 +1,15 @@
1
- import { jsxs as a, jsx as e, Fragment as M } from "react/jsx-runtime";
2
- import { bS as Z, cS as Na, u as w, c8 as ze, c9 as Be, B as L, cb as Ke, cc as q, cT as Qe, Z as xs, l as R, m as We, cU as Sa, c7 as Je, n as Xe, o as Ze, p as Ye, q as Ds, L as Ue, Q as re, G as wa, ac as j, cV as xa, cg as Da, cW as Ca, cX as vs, cY as Cs, c as X, cZ as Ls, U as ve, c_ as be, I as A, c$ as Es, cH as La, d0 as Ea, H, cf as V, d1 as ka, d2 as Aa, d3 as Ge, d4 as Ma, d5 as Oa, d6 as ks, d7 as As, d8 as fe, d9 as ge, cD as Re, cm as Fe, da as je, ch as Ms, db as qe, dc as Os, e as Is, dd as Ia, cp as Ts, cq as _s, cr as Ps, cs as Us, ct as Gs, cu as Rs, cv as Fs, cw as He, c6 as Ta, de as _a, ai as Pa, a1 as bs, ah as he, df as Ua, ao as Ga, aj as Ie, dg as Ra, dh as Fa, di as ja, aD as qa, dj as Ha, dk as Va, bZ as $a, b_ as za, b$ as Ba, dl as Ka, c1 as Qa, cd as Wa, av as Ja, dm as Xa, dn as Za, dp as Ya, dq as et, dr as st, ds as at, ca as tt, ae as nt, cj as rt, dt as ot, an as it, af as lt, au as ct } from "./index-B_GEcxbY.js";
1
+ import { jsxs as t, jsx as e, Fragment as M } from "react/jsx-runtime";
2
+ import { bS as Z, cS as Na, u as w, c8 as ze, c9 as Be, B as L, cb as Ke, cc as q, cT as Qe, Z as xs, l as R, m as We, cU as Sa, c7 as Je, n as Xe, o as Ze, p as Ye, q as Ds, L as Ue, Q as re, G as wa, ac as j, cV as xa, cg as Da, cW as Ca, cX as vs, cY as Cs, c as J, cZ as Ls, U as ve, c_ as be, I as A, c$ as Es, cH as La, d0 as Ea, H as X, cf as H, d1 as ka, d2 as Aa, d3 as Ge, d4 as Ma, d5 as Oa, d6 as ks, d7 as As, d8 as fe, d9 as ge, cD as Re, cm as Fe, da as je, ch as Ms, db as qe, dc as Os, e as Is, dd as Ia, cp as Ts, cq as _s, cr as Ps, cs as Us, ct as Gs, cu as Rs, cv as Fs, cw as He, c6 as Ta, de as _a, ai as Pa, a1 as bs, ah as he, df as Ua, ao as Ga, aj as Ie, dg as Ra, dh as Fa, di as ja, aD as qa, dj as Ha, dk as Va, bZ as $a, b_ as za, b$ as Ba, dl as Ka, c1 as Qa, cd as Wa, av as Ja, dm as Xa, dn as Za, dp as Ya, dq as et, dr as st, ds as at, ca as tt, ae as nt, cj as rt, dt as ot, an as it, af as lt, au as ct } from "./index-D232h2I1.js";
3
3
  import * as E from "react";
4
4
  import js, { useState as S, useMemo as pe, useEffect as dt, useCallback as ut } from "react";
5
5
  import "react-dom";
6
- import { b as mt, u as ht, c as pt, A as ft, V as gt, N as vt, U as bt } from "./notification-bell-D4nz9sko.js";
7
- import { u as yt } from "./use-role-aware-display-preferences-BFAGv6Wc.js";
6
+ import { b as mt, u as ht, c as pt, A as ft, V as gt, N as vt, U as bt } from "./notification-bell-DXAAQK14.js";
7
+ import { u as yt } from "./use-role-aware-display-preferences-R7TnYxh8.js";
8
8
  import { d as Nt } from "./date-formatter-Y8Za1ib3.js";
9
- import { C as St, D as wt } from "./dashboard-summary-settings-dialog-BLKai9NG.js";
9
+ import { C as St, D as wt } from "./dashboard-summary-settings-dialog-CMWA3IWW.js";
10
10
  import { u as xt } from "./use-debounced-dirty-check-BwAbnX_5.js";
11
11
  import { s as Te } from "./normalize-dashboard-for-dirty-check-Bn27S0PN.js";
12
- import { S as ys } from "./editor-action-buttons-BLfcnwJw.js";
12
+ import { S as ys } from "./editor-action-buttons-DdNZTA1e.js";
13
13
  /**
14
14
  * @license lucide-react v0.453.0 - ISC
15
15
  *
@@ -106,7 +106,7 @@ function Mt() {
106
106
  function n(d, h) {
107
107
  return d === h && (d !== 0 || 1 / d === 1 / h) || d !== d && h !== h;
108
108
  }
109
- var t = typeof Object.is == "function" ? Object.is : n, r = s.useState, l = s.useEffect, i = s.useLayoutEffect, u = s.useDebugValue;
109
+ var a = typeof Object.is == "function" ? Object.is : n, r = s.useState, l = s.useEffect, i = s.useLayoutEffect, u = s.useDebugValue;
110
110
  function m(d, h) {
111
111
  var p = h(), g = r({ inst: { value: p, getSnapshot: h } }), y = g[0].inst, N = g[1];
112
112
  return i(
@@ -128,7 +128,7 @@ function Mt() {
128
128
  d = d.value;
129
129
  try {
130
130
  var p = h();
131
- return !t(d, p);
131
+ return !a(d, p);
132
132
  } catch {
133
133
  return !0;
134
134
  }
@@ -172,19 +172,19 @@ function Ot() {
172
172
  var k = N[0].inst, T = N[1];
173
173
  return f(
174
174
  function() {
175
- k.value = y, k.getSnapshot = g, t(k) && T({ inst: k });
175
+ k.value = y, k.getSnapshot = g, a(k) && T({ inst: k });
176
176
  },
177
177
  [p, y, g]
178
178
  ), m(
179
179
  function() {
180
- return t(k) && T({ inst: k }), p(function() {
181
- t(k) && T({ inst: k });
180
+ return a(k) && T({ inst: k }), p(function() {
181
+ a(k) && T({ inst: k });
182
182
  });
183
183
  },
184
184
  [p]
185
185
  ), b(y), y;
186
186
  }
187
- function t(p) {
187
+ function a(p) {
188
188
  var g = p.getSnapshot;
189
189
  p = p.value;
190
190
  try {
@@ -206,10 +206,10 @@ process.env.NODE_ENV === "production" ? Ve.exports = Mt() : Ve.exports = Ot();
206
206
  var It = Ve.exports;
207
207
  function Tt() {
208
208
  const { setTheme: s } = Na(), n = w(
209
- (t) => t.actions.setDashboardTheme
209
+ (a) => a.actions.setDashboardTheme
210
210
  );
211
- return /* @__PURE__ */ a(ze, { children: [
212
- /* @__PURE__ */ e(Be, { asChild: !0, children: /* @__PURE__ */ a(L, { className: "h-7 p-2", variant: "ghost", size: "sm", children: [
211
+ return /* @__PURE__ */ t(ze, { children: [
212
+ /* @__PURE__ */ e(Be, { asChild: !0, children: /* @__PURE__ */ t(L, { className: "h-7 p-2", variant: "ghost", size: "sm", children: [
213
213
  /* @__PURE__ */ e(
214
214
  At,
215
215
  {
@@ -226,7 +226,7 @@ function Tt() {
226
226
  ),
227
227
  /* @__PURE__ */ e("span", { className: "sr-only", children: "Toggle theme" })
228
228
  ] }) }),
229
- /* @__PURE__ */ a(Ke, { align: "end", children: [
229
+ /* @__PURE__ */ t(Ke, { align: "end", children: [
230
230
  /* @__PURE__ */ e(
231
231
  q,
232
232
  {
@@ -257,10 +257,10 @@ function Tt() {
257
257
  ] })
258
258
  ] });
259
259
  }
260
- async function _t(s, n, t, r, l) {
260
+ async function _t(s, n, a, r, l) {
261
261
  if (!l)
262
262
  return null;
263
- const i = JSON.stringify(t), u = `${s}/v1/lens`;
263
+ const i = JSON.stringify(a), u = `${s}/v1/lens`;
264
264
  return await Qe(u, l, {
265
265
  name: n,
266
266
  template: i,
@@ -268,11 +268,11 @@ async function _t(s, n, t, r, l) {
268
268
  operation: "create"
269
269
  });
270
270
  }
271
- async function $e(s, n, t) {
272
- if (!t)
271
+ async function $e(s, n, a) {
272
+ if (!a)
273
273
  return null;
274
274
  const { id: r, template: l, filterValues: i, isDefault: u, shared: m } = n, f = `${s}/v1/lens`;
275
- return await Qe(f, t, {
275
+ return await Qe(f, a, {
276
276
  lensId: r,
277
277
  template: l,
278
278
  filterValues: i,
@@ -281,17 +281,17 @@ async function $e(s, n, t) {
281
281
  operation: "update"
282
282
  });
283
283
  }
284
- async function Pt(s, n, t) {
285
- if (!t)
284
+ async function Pt(s, n, a) {
285
+ if (!a)
286
286
  return null;
287
287
  const r = `${s}/v1/lens`;
288
- return await Qe(r, t, {
288
+ return await Qe(r, a, {
289
289
  operation: "delete",
290
290
  lensId: n
291
291
  });
292
292
  }
293
293
  function Ut() {
294
- const [s, n] = S(""), [t, r] = S(!1), l = w((N) => N.lenses), { setLenses: i, setSelectedLensId: u } = xs(), [m, f] = S(!1), [b, c] = S(!1), d = w((N) => N.dashboard), h = w((N) => N.filterValues), { authToken: p, tokenProps: g } = R();
294
+ const [s, n] = S(""), [a, r] = S(!1), l = w((N) => N.lenses), { setLenses: i, setSelectedLensId: u } = xs(), [m, f] = S(!1), [b, c] = S(!1), d = w((N) => N.dashboard), h = w((N) => N.filterValues), { authToken: p, tokenProps: g } = R();
295
295
  async function y() {
296
296
  f(!0);
297
297
  const N = await _t(
@@ -303,8 +303,8 @@ function Ut() {
303
303
  );
304
304
  N && (i([...l || [], N]), u(N.id), c(!1)), f(!1);
305
305
  }
306
- return /* @__PURE__ */ a(We, { open: b, onOpenChange: c, children: [
307
- /* @__PURE__ */ e(Sa, { asChild: !0, children: /* @__PURE__ */ a(
306
+ return /* @__PURE__ */ t(We, { open: b, onOpenChange: c, children: [
307
+ /* @__PURE__ */ e(Sa, { asChild: !0, children: /* @__PURE__ */ t(
308
308
  L,
309
309
  {
310
310
  variant: "secondary",
@@ -316,12 +316,12 @@ function Ut() {
316
316
  ]
317
317
  }
318
318
  ) }),
319
- /* @__PURE__ */ a(Xe, { className: "sm:max-w-[425px]", children: [
320
- /* @__PURE__ */ a(Ze, { children: [
319
+ /* @__PURE__ */ t(Xe, { className: "sm:max-w-[425px]", children: [
320
+ /* @__PURE__ */ t(Ze, { children: [
321
321
  /* @__PURE__ */ e(Ye, { children: "Create Lens" }),
322
322
  /* @__PURE__ */ e(Ds, { children: "Lenses are private by default and are only visible to you." })
323
323
  ] }),
324
- /* @__PURE__ */ e("div", { className: "grid gap-4 py-4", children: /* @__PURE__ */ a("div", { className: "grid grid-cols-8 items-center gap-4", children: [
324
+ /* @__PURE__ */ e("div", { className: "grid gap-4 py-4", children: /* @__PURE__ */ t("div", { className: "grid grid-cols-8 items-center gap-4", children: [
325
325
  /* @__PURE__ */ e(Ue, { className: "text-right", children: "Name" }),
326
326
  /* @__PURE__ */ e(
327
327
  re,
@@ -335,7 +335,7 @@ function Ut() {
335
335
  }
336
336
  )
337
337
  ] }) }),
338
- t && /* @__PURE__ */ e("p", { className: "text-sm", children: "The lens name already exists. Use a differnet name." }),
338
+ a && /* @__PURE__ */ e("p", { className: "text-sm", children: "The lens name already exists. Use a differnet name." }),
339
339
  /* @__PURE__ */ e(wa, { children: /* @__PURE__ */ e(
340
340
  L,
341
341
  {
@@ -351,18 +351,18 @@ function Ut() {
351
351
  ] });
352
352
  }
353
353
  function Gt() {
354
- const [s, n] = S(!1), t = w((d) => d.lenses), r = w((d) => d.selectedLensId), { setLenses: l, setSelectedLensId: i } = xs(), { authToken: u, tokenProps: m } = R();
354
+ const [s, n] = S(!1), a = w((d) => d.lenses), r = w((d) => d.selectedLensId), { setLenses: l, setSelectedLensId: i } = xs(), { authToken: u, tokenProps: m } = R();
355
355
  async function f(d) {
356
356
  i(d);
357
357
  }
358
358
  async function b(d) {
359
359
  if (await Pt(m.apiServiceUrl, d, u == null ? void 0 : u.accessToken)) {
360
- const p = t == null ? void 0 : t.filter((g) => g.id !== d);
360
+ const p = a == null ? void 0 : a.filter((g) => g.id !== d);
361
361
  l(p || []), i("original");
362
362
  }
363
363
  }
364
364
  async function c(d) {
365
- const h = t == null ? void 0 : t.map((y) => y.id === d.id ? {
365
+ const h = a == null ? void 0 : a.map((y) => y.id === d.id ? {
366
366
  ...y,
367
367
  isDefault: !d.isDefault
368
368
  } : {
@@ -375,7 +375,7 @@ function Gt() {
375
375
  isDefault: !d.isDefault
376
376
  };
377
377
  await $e(m.apiServiceUrl, p, u == null ? void 0 : u.accessToken);
378
- const g = t == null ? void 0 : t.find((y) => y.isDefault);
378
+ const g = a == null ? void 0 : a.find((y) => y.isDefault);
379
379
  if (g && g.id !== d.id) {
380
380
  const y = {
381
381
  ...g,
@@ -384,33 +384,33 @@ function Gt() {
384
384
  await $e(m.apiServiceUrl, y, u == null ? void 0 : u.accessToken);
385
385
  }
386
386
  }
387
- return /* @__PURE__ */ a(ze, { open: s, onOpenChange: n, children: [
387
+ return /* @__PURE__ */ t(ze, { open: s, onOpenChange: n, children: [
388
388
  /* @__PURE__ */ e(Be, { asChild: !0, children: /* @__PURE__ */ e(j, { tooltip: "Lenses", className: "h-7 p-2", children: /* @__PURE__ */ e(Ct, { className: "h-4 w-4" }) }) }),
389
- /* @__PURE__ */ a(Ke, { align: "end", className: "w-60", children: [
389
+ /* @__PURE__ */ t(Ke, { align: "end", className: "w-60", children: [
390
390
  /* @__PURE__ */ e(xa, { className: "px-3", children: "Lenses" }),
391
391
  /* @__PURE__ */ e(Da, {}),
392
- /* @__PURE__ */ a(
392
+ /* @__PURE__ */ t(
393
393
  Ca,
394
394
  {
395
395
  value: r,
396
396
  onValueChange: f,
397
397
  children: [
398
398
  /* @__PURE__ */ e(vs, { value: "original", children: "Original" }),
399
- t == null ? void 0 : t.map((d) => /* @__PURE__ */ a(
399
+ a == null ? void 0 : a.map((d) => /* @__PURE__ */ t(
400
400
  vs,
401
401
  {
402
402
  className: "group flex justify-between gap-2",
403
403
  value: d.id,
404
404
  children: [
405
405
  /* @__PURE__ */ e("p", { children: d.name }),
406
- /* @__PURE__ */ a("span", { className: "flex items-center gap-3", children: [
406
+ /* @__PURE__ */ t("span", { className: "flex items-center gap-3", children: [
407
407
  /* @__PURE__ */ e(
408
408
  Cs,
409
409
  {
410
410
  onClick: (h) => {
411
411
  h.preventDefault(), c(d);
412
412
  },
413
- className: X(
413
+ className: J(
414
414
  "size-3.5 text-muted-foreground hover:cursor-pointer hover:text-foreground group-hover:visible",
415
415
  {
416
416
  invisible: !d.isDefault,
@@ -441,11 +441,11 @@ function Gt() {
441
441
  ] })
442
442
  ] });
443
443
  }
444
- const Rt = async (s, n, t) => {
444
+ const Rt = async (s, n, a) => {
445
445
  const r = `${s}/management/v1/groups`;
446
- return await Es(r, n, t);
447
- }, Ft = async (s, n, t) => {
448
- const r = `${s}/management/v1/groups/${t}`, l = await fetch(r, {
446
+ return await Es(r, n, a);
447
+ }, Ft = async (s, n, a) => {
448
+ const r = `${s}/management/v1/groups/${a}`, l = await fetch(r, {
449
449
  method: "DELETE",
450
450
  headers: {
451
451
  Authorization: `Bearer ${n}`
@@ -455,11 +455,11 @@ const Rt = async (s, n, t) => {
455
455
  const i = await l.text();
456
456
  throw new Error(i || "Failed to delete group");
457
457
  }
458
- }, jt = async (s, n, t, r) => {
459
- const l = `${s}/management/v1/groups/${t}/members`;
458
+ }, jt = async (s, n, a, r) => {
459
+ const l = `${s}/management/v1/groups/${a}/members`;
460
460
  return await Es(l, n, r);
461
- }, qt = async (s, n, t, r) => {
462
- const l = `${s}/management/v1/groups/${t}/members`, i = await fetch(l, {
461
+ }, qt = async (s, n, a, r) => {
462
+ const l = `${s}/management/v1/groups/${a}/members`, i = await fetch(l, {
463
463
  method: "DELETE",
464
464
  headers: {
465
465
  "Content-Type": "application/json",
@@ -473,11 +473,11 @@ const Rt = async (s, n, t) => {
473
473
  }
474
474
  };
475
475
  function Ht() {
476
- const { authToken: s, tokenProps: n } = R(), t = ve();
476
+ const { authToken: s, tokenProps: n } = R(), a = ve();
477
477
  return be({
478
478
  mutationFn: (r) => Rt(n.apiServiceUrl, (s == null ? void 0 : s.accessToken) || "", r),
479
479
  onSuccess: () => {
480
- t.invalidateQueries({ queryKey: ["groups"] }), A.success("Group created successfully");
480
+ a.invalidateQueries({ queryKey: ["groups"] }), A.success("Group created successfully");
481
481
  },
482
482
  onError: (r) => {
483
483
  console.error("Failed to create group:", r), A.error("Failed to create group", {
@@ -487,11 +487,11 @@ function Ht() {
487
487
  });
488
488
  }
489
489
  function Vt() {
490
- const { authToken: s, tokenProps: n } = R(), t = ve();
490
+ const { authToken: s, tokenProps: n } = R(), a = ve();
491
491
  return be({
492
492
  mutationFn: (r) => Ft(n.apiServiceUrl, (s == null ? void 0 : s.accessToken) || "", r),
493
493
  onSuccess: (r, l) => {
494
- t.invalidateQueries({ queryKey: ["groups"] }), t.removeQueries({ queryKey: ["group", l] }), A.success("Group deleted successfully");
494
+ a.invalidateQueries({ queryKey: ["groups"] }), a.removeQueries({ queryKey: ["group", l] }), A.success("Group deleted successfully");
495
495
  },
496
496
  onError: (r) => {
497
497
  console.error("Failed to delete group:", r), A.error("Failed to delete group", {
@@ -501,16 +501,16 @@ function Vt() {
501
501
  });
502
502
  }
503
503
  function $t() {
504
- const { authToken: s, tokenProps: n } = R(), t = ve();
504
+ const { authToken: s, tokenProps: n } = R(), a = ve();
505
505
  return be({
506
506
  mutationFn: ({
507
507
  groupId: r,
508
508
  data: l
509
509
  }) => jt(n.apiServiceUrl, (s == null ? void 0 : s.accessToken) || "", r, l),
510
510
  onSuccess: (r, l) => {
511
- t.invalidateQueries({ queryKey: ["group", l.groupId] }), t.invalidateQueries({
511
+ a.invalidateQueries({ queryKey: ["group", l.groupId] }), a.invalidateQueries({
512
512
  queryKey: ["group-members", l.groupId]
513
- }), t.invalidateQueries({ queryKey: ["groups"] }), A.success("Members added successfully");
513
+ }), a.invalidateQueries({ queryKey: ["groups"] }), A.success("Members added successfully");
514
514
  },
515
515
  onError: (r) => {
516
516
  console.error("Failed to add group members:", r), A.error("Failed to add members", {
@@ -520,16 +520,16 @@ function $t() {
520
520
  });
521
521
  }
522
522
  function zt() {
523
- const { authToken: s, tokenProps: n } = R(), t = ve();
523
+ const { authToken: s, tokenProps: n } = R(), a = ve();
524
524
  return be({
525
525
  mutationFn: ({
526
526
  groupId: r,
527
527
  data: l
528
528
  }) => qt(n.apiServiceUrl, (s == null ? void 0 : s.accessToken) || "", r, l),
529
529
  onSuccess: (r, l) => {
530
- t.invalidateQueries({ queryKey: ["group", l.groupId] }), t.invalidateQueries({
530
+ a.invalidateQueries({ queryKey: ["group", l.groupId] }), a.invalidateQueries({
531
531
  queryKey: ["group-members", l.groupId]
532
- }), t.invalidateQueries({ queryKey: ["groups"] }), A.success("Members removed successfully");
532
+ }), a.invalidateQueries({ queryKey: ["groups"] }), A.success("Members removed successfully");
533
533
  },
534
534
  onError: (r) => {
535
535
  console.error("Failed to remove group members:", r), A.error("Failed to remove members", {
@@ -541,19 +541,19 @@ function zt() {
541
541
  function Bt({
542
542
  onSuccess: s,
543
543
  tenantId: n,
544
- isTenantUser: t
544
+ isTenantUser: a
545
545
  }) {
546
546
  const [r, l] = S(""), [i, u] = S(""), [m, f] = S({}), b = Ht(), c = () => {
547
547
  const h = {};
548
548
  return r.trim() ? r.length < 3 ? h.name = "Group name must be at least 3 characters" : r.length > 50 && (h.name = "Group name must be less than 50 characters") : h.name = "Group name is required", i && i.length > 200 && (h.description = "Description must be less than 200 characters"), f(h), Object.keys(h).length === 0;
549
549
  };
550
- return /* @__PURE__ */ a("form", { onSubmit: async (h) => {
550
+ return /* @__PURE__ */ t("form", { onSubmit: async (h) => {
551
551
  if (h.preventDefault(), !c()) return;
552
552
  const p = {
553
553
  name: r.trim(),
554
554
  description: i.trim() || void 0,
555
- type: t ? "TENANT_GROUP" : "ORG_GROUP",
556
- ...t && n ? { tenantId: n } : {}
555
+ type: a ? "TENANT_GROUP" : "ORG_GROUP",
556
+ ...a && n ? { tenantId: n } : {}
557
557
  };
558
558
  try {
559
559
  await b.mutateAsync(p), l(""), u(""), f({}), s();
@@ -561,9 +561,9 @@ function Bt({
561
561
  console.error("Failed to create group:", g);
562
562
  }
563
563
  }, className: "space-y-6", children: [
564
- /* @__PURE__ */ a("div", { className: "space-y-4", children: [
565
- /* @__PURE__ */ a("div", { className: "space-y-2", children: [
566
- /* @__PURE__ */ a(Ue, { htmlFor: "group-name", children: [
564
+ /* @__PURE__ */ t("div", { className: "space-y-4", children: [
565
+ /* @__PURE__ */ t("div", { className: "space-y-2", children: [
566
+ /* @__PURE__ */ t(Ue, { htmlFor: "group-name", children: [
567
567
  "Group Name ",
568
568
  /* @__PURE__ */ e("span", { className: "text-destructive", children: "*" })
569
569
  ] }),
@@ -582,8 +582,8 @@ function Bt({
582
582
  ),
583
583
  m.name && /* @__PURE__ */ e("p", { className: "text-sm text-destructive", children: m.name })
584
584
  ] }),
585
- /* @__PURE__ */ a("div", { className: "space-y-2", children: [
586
- /* @__PURE__ */ a(Ue, { htmlFor: "group-description", children: [
585
+ /* @__PURE__ */ t("div", { className: "space-y-2", children: [
586
+ /* @__PURE__ */ t(Ue, { htmlFor: "group-description", children: [
587
587
  "Description",
588
588
  /* @__PURE__ */ e("span", { className: "ml-2 text-xs text-muted-foreground", children: "(optional)" })
589
589
  ] }),
@@ -602,17 +602,17 @@ function Bt({
602
602
  }
603
603
  ),
604
604
  m.description && /* @__PURE__ */ e("p", { className: "text-sm text-destructive", children: m.description }),
605
- /* @__PURE__ */ a("p", { className: "text-xs text-muted-foreground", children: [
605
+ /* @__PURE__ */ t("p", { className: "text-xs text-muted-foreground", children: [
606
606
  i.length,
607
607
  "/200 characters"
608
608
  ] })
609
609
  ] }),
610
- /* @__PURE__ */ e("div", { className: "rounded-lg border bg-muted/50 p-4", children: /* @__PURE__ */ a("div", { className: "flex gap-3", children: [
610
+ /* @__PURE__ */ e("div", { className: "rounded-lg border bg-muted/50 p-4", children: /* @__PURE__ */ t("div", { className: "flex gap-3", children: [
611
611
  /* @__PURE__ */ e(Ea, { className: "h-4 w-4 mt-0.5 text-muted-foreground" }),
612
612
  /* @__PURE__ */ e("div", { className: "text-sm text-muted-foreground", children: "This group will be accessible to users in your workspace. You can add members after creating the group." })
613
613
  ] }) })
614
614
  ] }),
615
- /* @__PURE__ */ a("div", { className: "flex justify-end gap-3", children: [
615
+ /* @__PURE__ */ t("div", { className: "flex justify-end gap-3", children: [
616
616
  /* @__PURE__ */ e(
617
617
  L,
618
618
  {
@@ -630,11 +630,11 @@ function Bt({
630
630
  {
631
631
  type: "submit",
632
632
  disabled: b.isPending || !r.trim(),
633
- children: b.isPending ? /* @__PURE__ */ a(M, { children: [
634
- /* @__PURE__ */ e(H, { className: "mr-2 h-4 w-4 animate-spin" }),
633
+ children: b.isPending ? /* @__PURE__ */ t(M, { children: [
634
+ /* @__PURE__ */ e(X, { className: "mr-2 h-4 w-4 animate-spin" }),
635
635
  "Creating..."
636
- ] }) : /* @__PURE__ */ a(M, { children: [
637
- /* @__PURE__ */ e(V, { className: "mr-2 h-4 w-4" }),
636
+ ] }) : /* @__PURE__ */ t(M, { children: [
637
+ /* @__PURE__ */ e(H, { className: "mr-2 h-4 w-4" }),
638
638
  "Create Group"
639
639
  ] })
640
640
  }
@@ -643,12 +643,12 @@ function Bt({
643
643
  ] });
644
644
  }
645
645
  function Kt(s, n = []) {
646
- let t = [];
646
+ let a = [];
647
647
  function r(i, u) {
648
648
  const m = E.createContext(u);
649
649
  m.displayName = i + "Context";
650
- const f = t.length;
651
- t = [...t, u];
650
+ const f = a.length;
651
+ a = [...a, u];
652
652
  const b = (d) => {
653
653
  var k;
654
654
  const { scope: h, children: p, ...g } = d, y = ((k = h == null ? void 0 : h[s]) == null ? void 0 : k[f]) || m, N = E.useMemo(() => g, Object.values(g));
@@ -665,7 +665,7 @@ function Kt(s, n = []) {
665
665
  return [b, c];
666
666
  }
667
667
  const l = () => {
668
- const i = t.map((u) => E.createContext(u));
668
+ const i = a.map((u) => E.createContext(u));
669
669
  return function(m) {
670
670
  const f = (m == null ? void 0 : m[s]) || i;
671
671
  return E.useMemo(
@@ -679,7 +679,7 @@ function Kt(s, n = []) {
679
679
  function Qt(...s) {
680
680
  const n = s[0];
681
681
  if (s.length === 1) return n;
682
- const t = () => {
682
+ const a = () => {
683
683
  const r = s.map((l) => ({
684
684
  useScope: l(),
685
685
  scopeName: l.scopeName
@@ -692,7 +692,7 @@ function Qt(...s) {
692
692
  return E.useMemo(() => ({ [`__scope${n.scopeName}`]: u }), [u]);
693
693
  };
694
694
  };
695
- return t.scopeName = n.scopeName, t;
695
+ return a.scopeName = n.scopeName, a;
696
696
  }
697
697
  var Wt = [
698
698
  "a",
@@ -713,8 +713,8 @@ var Wt = [
713
713
  "svg",
714
714
  "ul"
715
715
  ], es = Wt.reduce((s, n) => {
716
- const t = ka(`Primitive.${n}`), r = E.forwardRef((l, i) => {
717
- const { asChild: u, ...m } = l, f = u ? t : n;
716
+ const a = ka(`Primitive.${n}`), r = E.forwardRef((l, i) => {
717
+ const { asChild: u, ...m } = l, f = u ? a : n;
718
718
  return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ e(f, { ...m, ref: i });
719
719
  });
720
720
  return r.displayName = `Primitive.${n}`, { ...s, [n]: r };
@@ -732,11 +732,11 @@ function Xt() {
732
732
  }
733
733
  var ss = "Avatar", [Zt] = Kt(ss), [Yt, qs] = Zt(ss), Hs = E.forwardRef(
734
734
  (s, n) => {
735
- const { __scopeAvatar: t, ...r } = s, [l, i] = E.useState("idle");
735
+ const { __scopeAvatar: a, ...r } = s, [l, i] = E.useState("idle");
736
736
  return /* @__PURE__ */ e(
737
737
  Yt,
738
738
  {
739
- scope: t,
739
+ scope: a,
740
740
  imageLoadingStatus: l,
741
741
  onImageLoadingStatusChange: i,
742
742
  children: /* @__PURE__ */ e(es.span, { ...r, ref: n })
@@ -747,8 +747,8 @@ var ss = "Avatar", [Zt] = Kt(ss), [Yt, qs] = Zt(ss), Hs = E.forwardRef(
747
747
  Hs.displayName = ss;
748
748
  var Vs = "AvatarImage", $s = E.forwardRef(
749
749
  (s, n) => {
750
- const { __scopeAvatar: t, src: r, onLoadingStatusChange: l = () => {
751
- }, ...i } = s, u = qs(Vs, t), m = en(r, i), f = Aa((b) => {
750
+ const { __scopeAvatar: a, src: r, onLoadingStatusChange: l = () => {
751
+ }, ...i } = s, u = qs(Vs, a), m = en(r, i), f = Aa((b) => {
752
752
  l(b), u.onImageLoadingStatusChange(b);
753
753
  });
754
754
  return Ge(() => {
@@ -759,7 +759,7 @@ var Vs = "AvatarImage", $s = E.forwardRef(
759
759
  $s.displayName = Vs;
760
760
  var zs = "AvatarFallback", Bs = E.forwardRef(
761
761
  (s, n) => {
762
- const { __scopeAvatar: t, delayMs: r, ...l } = s, i = qs(zs, t), [u, m] = E.useState(r === void 0);
762
+ const { __scopeAvatar: a, delayMs: r, ...l } = s, i = qs(zs, a), [u, m] = E.useState(r === void 0);
763
763
  return E.useEffect(() => {
764
764
  if (r !== void 0) {
765
765
  const f = window.setTimeout(() => m(!0), r);
@@ -772,7 +772,7 @@ Bs.displayName = zs;
772
772
  function ws(s, n) {
773
773
  return s ? n ? (s.src !== n && (s.src = n), s.complete && s.naturalWidth > 0 ? "loaded" : "loading") : "error" : "idle";
774
774
  }
775
- function en(s, { referrerPolicy: n, crossOrigin: t }) {
775
+ function en(s, { referrerPolicy: n, crossOrigin: a }) {
776
776
  const r = Jt(), l = E.useRef(null), i = r ? (l.current || (l.current = new window.Image()), l.current) : null, [u, m] = E.useState(
777
777
  () => ws(i, s)
778
778
  );
@@ -784,17 +784,17 @@ function en(s, { referrerPolicy: n, crossOrigin: t }) {
784
784
  };
785
785
  if (!i) return;
786
786
  const b = f("loaded"), c = f("error");
787
- return i.addEventListener("load", b), i.addEventListener("error", c), n && (i.referrerPolicy = n), typeof t == "string" && (i.crossOrigin = t), () => {
787
+ return i.addEventListener("load", b), i.addEventListener("error", c), n && (i.referrerPolicy = n), typeof a == "string" && (i.crossOrigin = a), () => {
788
788
  i.removeEventListener("load", b), i.removeEventListener("error", c);
789
789
  };
790
- }, [i, t, n]), u;
790
+ }, [i, a, n]), u;
791
791
  }
792
792
  var Ks = Hs, Qs = $s, Ws = Bs;
793
- const as = E.forwardRef(({ className: s, ...n }, t) => /* @__PURE__ */ e(
793
+ const as = E.forwardRef(({ className: s, ...n }, a) => /* @__PURE__ */ e(
794
794
  Ks,
795
795
  {
796
- ref: t,
797
- className: X(
796
+ ref: a,
797
+ className: J(
798
798
  "relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
799
799
  s
800
800
  ),
@@ -802,20 +802,20 @@ const as = E.forwardRef(({ className: s, ...n }, t) => /* @__PURE__ */ e(
802
802
  }
803
803
  ));
804
804
  as.displayName = Ks.displayName;
805
- const sn = E.forwardRef(({ className: s, ...n }, t) => /* @__PURE__ */ e(
805
+ const sn = E.forwardRef(({ className: s, ...n }, a) => /* @__PURE__ */ e(
806
806
  Qs,
807
807
  {
808
- ref: t,
809
- className: X("aspect-square h-full w-full", s),
808
+ ref: a,
809
+ className: J("aspect-square h-full w-full", s),
810
810
  ...n
811
811
  }
812
812
  ));
813
813
  sn.displayName = Qs.displayName;
814
- const ts = E.forwardRef(({ className: s, ...n }, t) => /* @__PURE__ */ e(
814
+ const ts = E.forwardRef(({ className: s, ...n }, a) => /* @__PURE__ */ e(
815
815
  Ws,
816
816
  {
817
- ref: t,
818
- className: X(
817
+ ref: a,
818
+ className: J(
819
819
  "flex h-full w-full items-center justify-center rounded-full bg-muted",
820
820
  s
821
821
  ),
@@ -826,15 +826,15 @@ ts.displayName = Ws.displayName;
826
826
  function an({
827
827
  open: s,
828
828
  onOpenChange: n,
829
- group: t,
829
+ group: a,
830
830
  onUpdate: r
831
831
  }) {
832
- const [l, i] = S("members"), [u, m] = S(""), [f, b] = S([]), [c, d] = S([]), { data: h, isLoading: p, refetch: g } = Ma(t.id), y = t.type === "TENANT_GROUP" ? "tenant" : "organization", { users: N, isLoading: k } = Oa({
832
+ const [l, i] = S("members"), [u, m] = S(""), [f, b] = S([]), [c, d] = S([]), { data: h, isLoading: p, refetch: g } = Ma(a.id), y = a.type === "TENANT_GROUP" ? "tenant" : "organization", { users: N, isLoading: k } = Oa({
833
833
  type: y,
834
- tenantId: t.tenantId || void 0,
834
+ tenantId: a.tenantId || void 0,
835
835
  active: !0,
836
836
  limit: 100
837
- }), T = $t(), P = zt(), O = (h == null ? void 0 : h.members) || [], $ = pe(() => new Set(O.map((v) => v.userId)), [O]), G = pe(() => N.filter((v) => !$.has(v.id)), [N, $]), z = pe(() => {
837
+ }), T = $t(), P = zt(), O = (h == null ? void 0 : h.members) || [], V = pe(() => new Set(O.map((v) => v.userId)), [O]), G = pe(() => N.filter((v) => !V.has(v.id)), [N, V]), $ = pe(() => {
838
838
  if (!u) return G;
839
839
  const v = u.toLowerCase();
840
840
  return G.filter(
@@ -852,11 +852,11 @@ function an({
852
852
  return ((F = (_ = C.user) == null ? void 0 : _.name) == null ? void 0 : F.toLowerCase().includes(v)) || ((D = (oe = C.user) == null ? void 0 : oe.email) == null ? void 0 : D.toLowerCase().includes(v));
853
853
  }
854
854
  );
855
- }, [O, u]), B = async () => {
855
+ }, [O, u]), z = async () => {
856
856
  if (f.length !== 0)
857
857
  try {
858
858
  await T.mutateAsync({
859
- groupId: t.id,
859
+ groupId: a.id,
860
860
  data: {
861
861
  userIds: f,
862
862
  userType: y === "tenant" ? "tenant" : "org"
@@ -865,11 +865,11 @@ function an({
865
865
  } catch (v) {
866
866
  console.error("Failed to add members:", v);
867
867
  }
868
- }, K = async () => {
868
+ }, B = async () => {
869
869
  if (c.length !== 0)
870
870
  try {
871
871
  await P.mutateAsync({
872
- groupId: t.id,
872
+ groupId: a.id,
873
873
  data: {
874
874
  userIds: c
875
875
  }
@@ -877,38 +877,38 @@ function an({
877
877
  } catch (v) {
878
878
  console.error("Failed to remove members:", v);
879
879
  }
880
- }, Q = (v) => {
880
+ }, K = (v) => {
881
881
  b(
882
882
  (C) => C.includes(v) ? C.filter((_) => _ !== v) : [...C, v]
883
883
  );
884
- }, W = (v) => {
884
+ }, Q = (v) => {
885
885
  d(
886
886
  (C) => C.includes(v) ? C.filter((_) => _ !== v) : [...C, v]
887
887
  );
888
888
  };
889
- return /* @__PURE__ */ e(M, { children: /* @__PURE__ */ e(We, { open: s, onOpenChange: n, children: /* @__PURE__ */ a(Xe, { className: "max-w-3xl max-h-[80vh]", "aria-describedby": "group-members-description", children: [
890
- /* @__PURE__ */ a(Ze, { children: [
891
- /* @__PURE__ */ e(Ye, { children: t.name }),
892
- /* @__PURE__ */ e("div", { className: "flex items-center gap-2 mt-1", children: /* @__PURE__ */ a("p", { className: "text-sm text-muted-foreground", children: [
889
+ return /* @__PURE__ */ e(M, { children: /* @__PURE__ */ e(We, { open: s, onOpenChange: n, children: /* @__PURE__ */ t(Xe, { className: "max-w-3xl max-h-[80vh]", "aria-describedby": "group-members-description", children: [
890
+ /* @__PURE__ */ t(Ze, { children: [
891
+ /* @__PURE__ */ e(Ye, { children: a.name }),
892
+ /* @__PURE__ */ e("div", { className: "flex items-center gap-2 mt-1", children: /* @__PURE__ */ t("p", { className: "text-sm text-muted-foreground", children: [
893
893
  O.length,
894
894
  " ",
895
895
  O.length === 1 ? "member" : "members"
896
896
  ] }) }),
897
- /* @__PURE__ */ a("p", { id: "group-members-description", className: "sr-only", children: [
897
+ /* @__PURE__ */ t("p", { id: "group-members-description", className: "sr-only", children: [
898
898
  "Add or remove members from the ",
899
- t.name,
899
+ a.name,
900
900
  " group"
901
901
  ] })
902
902
  ] }),
903
- /* @__PURE__ */ a(ks, { value: l, onValueChange: (v) => {
903
+ /* @__PURE__ */ t(ks, { value: l, onValueChange: (v) => {
904
904
  i(v), m(""), d([]);
905
905
  }, className: "mt-4", children: [
906
- /* @__PURE__ */ a(As, { className: "grid w-full grid-cols-2", children: [
906
+ /* @__PURE__ */ t(As, { className: "grid w-full grid-cols-2", children: [
907
907
  /* @__PURE__ */ e(fe, { value: "members", children: "Current Members" }),
908
908
  /* @__PURE__ */ e(fe, { value: "add", children: "Add Members" })
909
909
  ] }),
910
- /* @__PURE__ */ a(ge, { value: "members", className: "mt-4 space-y-4", children: [
911
- /* @__PURE__ */ a("div", { className: "relative", children: [
910
+ /* @__PURE__ */ t(ge, { value: "members", className: "mt-4 space-y-4", children: [
911
+ /* @__PURE__ */ t("div", { className: "relative", children: [
912
912
  /* @__PURE__ */ e(Re, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }),
913
913
  /* @__PURE__ */ e(
914
914
  re,
@@ -920,8 +920,8 @@ function an({
920
920
  }
921
921
  )
922
922
  ] }),
923
- /* @__PURE__ */ e(Fe, { className: c.length > 0 ? "h-[300px]" : "h-[350px]", children: p ? /* @__PURE__ */ e("div", { className: "space-y-2", children: [1, 2, 3].map((v) => /* @__PURE__ */ e(je, { className: "h-16 w-full" }, v)) }) : x.length === 0 ? /* @__PURE__ */ a("div", { className: "flex flex-col items-center justify-center py-12 text-muted-foreground", children: [
924
- /* @__PURE__ */ e(V, { className: "h-12 w-12 mb-3 opacity-50" }),
923
+ /* @__PURE__ */ e(Fe, { className: c.length > 0 ? "h-[300px]" : "h-[350px]", children: p ? /* @__PURE__ */ e("div", { className: "space-y-2", children: [1, 2, 3].map((v) => /* @__PURE__ */ e(je, { className: "h-16 w-full" }, v)) }) : x.length === 0 ? /* @__PURE__ */ t("div", { className: "flex flex-col items-center justify-center py-12 text-muted-foreground", children: [
924
+ /* @__PURE__ */ e(H, { className: "h-12 w-12 mb-3 opacity-50" }),
925
925
  /* @__PURE__ */ e("p", { className: "text-sm font-medium", children: u ? "No members found" : "No members yet" }),
926
926
  /* @__PURE__ */ e("p", { className: "text-xs mt-1", children: u ? "Try a different search" : 'Switch to the "Add Members" tab to add people to this group' })
927
927
  ] }) : /* @__PURE__ */ e("div", { className: "space-y-2", children: x.map((v) => /* @__PURE__ */ e(
@@ -929,12 +929,12 @@ function an({
929
929
  {
930
930
  member: v,
931
931
  selected: c.includes(v.userId),
932
- onToggle: () => W(v.userId)
932
+ onToggle: () => Q(v.userId)
933
933
  },
934
934
  v.id
935
935
  )) }) }),
936
- c.length > 0 && /* @__PURE__ */ a("div", { className: "flex items-center justify-between pt-4 border-t", children: [
937
- /* @__PURE__ */ a("span", { className: "text-sm text-muted-foreground", children: [
936
+ c.length > 0 && /* @__PURE__ */ t("div", { className: "flex items-center justify-between pt-4 border-t", children: [
937
+ /* @__PURE__ */ t("span", { className: "text-sm text-muted-foreground", children: [
938
938
  c.length,
939
939
  " member",
940
940
  c.length !== 1 ? "s" : "",
@@ -945,12 +945,12 @@ function an({
945
945
  {
946
946
  variant: "destructive",
947
947
  size: "sm",
948
- onClick: K,
948
+ onClick: B,
949
949
  disabled: P.isPending,
950
- children: P.isPending ? /* @__PURE__ */ a(M, { children: [
951
- /* @__PURE__ */ e(H, { className: "mr-2 h-4 w-4 animate-spin" }),
950
+ children: P.isPending ? /* @__PURE__ */ t(M, { children: [
951
+ /* @__PURE__ */ e(X, { className: "mr-2 h-4 w-4 animate-spin" }),
952
952
  "Removing..."
953
- ] }) : /* @__PURE__ */ a(M, { children: [
953
+ ] }) : /* @__PURE__ */ t(M, { children: [
954
954
  /* @__PURE__ */ e(Ms, { className: "mr-2 h-4 w-4" }),
955
955
  "Remove Selected"
956
956
  ] })
@@ -958,8 +958,8 @@ function an({
958
958
  )
959
959
  ] })
960
960
  ] }),
961
- /* @__PURE__ */ a(ge, { value: "add", className: "mt-4 space-y-4", children: [
962
- /* @__PURE__ */ a("div", { className: "relative", children: [
961
+ /* @__PURE__ */ t(ge, { value: "add", className: "mt-4 space-y-4", children: [
962
+ /* @__PURE__ */ t("div", { className: "relative", children: [
963
963
  /* @__PURE__ */ e(Re, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }),
964
964
  /* @__PURE__ */ e(
965
965
  re,
@@ -971,21 +971,21 @@ function an({
971
971
  }
972
972
  )
973
973
  ] }),
974
- /* @__PURE__ */ e(Fe, { className: "h-[300px]", children: k ? /* @__PURE__ */ e("div", { className: "space-y-2", children: [1, 2, 3].map((v) => /* @__PURE__ */ e(je, { className: "h-16 w-full" }, v)) }) : z.length === 0 ? /* @__PURE__ */ a("div", { className: "flex flex-col items-center justify-center py-12 text-muted-foreground", children: [
974
+ /* @__PURE__ */ e(Fe, { className: "h-[300px]", children: k ? /* @__PURE__ */ e("div", { className: "space-y-2", children: [1, 2, 3].map((v) => /* @__PURE__ */ e(je, { className: "h-16 w-full" }, v)) }) : $.length === 0 ? /* @__PURE__ */ t("div", { className: "flex flex-col items-center justify-center py-12 text-muted-foreground", children: [
975
975
  /* @__PURE__ */ e(qe, { className: "h-12 w-12 mb-3 opacity-50" }),
976
976
  /* @__PURE__ */ e("p", { className: "text-sm font-medium", children: "No available users" }),
977
977
  /* @__PURE__ */ e("p", { className: "text-xs mt-1", children: u ? "Try a different search" : "All eligible users are already members" })
978
- ] }) : /* @__PURE__ */ e("div", { className: "space-y-2", children: z.map((v) => /* @__PURE__ */ e(
978
+ ] }) : /* @__PURE__ */ e("div", { className: "space-y-2", children: $.map((v) => /* @__PURE__ */ e(
979
979
  nn,
980
980
  {
981
981
  user: v,
982
982
  selected: f.includes(v.id),
983
- onToggle: () => Q(v.id)
983
+ onToggle: () => K(v.id)
984
984
  },
985
985
  v.id
986
986
  )) }) }),
987
- f.length > 0 && /* @__PURE__ */ a("div", { className: "flex items-center justify-between pt-4 border-t", children: [
988
- /* @__PURE__ */ a("span", { className: "text-sm text-muted-foreground", children: [
987
+ f.length > 0 && /* @__PURE__ */ t("div", { className: "flex items-center justify-between pt-4 border-t", children: [
988
+ /* @__PURE__ */ t("span", { className: "text-sm text-muted-foreground", children: [
989
989
  f.length,
990
990
  " user",
991
991
  f.length !== 1 ? "s" : "",
@@ -994,12 +994,12 @@ function an({
994
994
  /* @__PURE__ */ e(
995
995
  L,
996
996
  {
997
- onClick: B,
997
+ onClick: z,
998
998
  disabled: T.isPending,
999
- children: T.isPending ? /* @__PURE__ */ a(M, { children: [
1000
- /* @__PURE__ */ e(H, { className: "mr-2 h-4 w-4 animate-spin" }),
999
+ children: T.isPending ? /* @__PURE__ */ t(M, { children: [
1000
+ /* @__PURE__ */ e(X, { className: "mr-2 h-4 w-4 animate-spin" }),
1001
1001
  "Adding..."
1002
- ] }) : /* @__PURE__ */ a(M, { children: [
1002
+ ] }) : /* @__PURE__ */ t(M, { children: [
1003
1003
  /* @__PURE__ */ e(qe, { className: "mr-2 h-4 w-4" }),
1004
1004
  "Add Members"
1005
1005
  ] })
@@ -1013,19 +1013,19 @@ function an({
1013
1013
  function tn({
1014
1014
  member: s,
1015
1015
  selected: n,
1016
- onToggle: t
1016
+ onToggle: a
1017
1017
  }) {
1018
1018
  var l, i, u, m;
1019
1019
  const r = ((i = (l = s.user) == null ? void 0 : l.name) == null ? void 0 : i.split(" ").map((f) => f[0]).join("").toUpperCase()) || "?";
1020
- return /* @__PURE__ */ a(
1020
+ return /* @__PURE__ */ t(
1021
1021
  "div",
1022
1022
  {
1023
1023
  className: "flex items-center gap-3 p-3 rounded-lg border bg-card hover:bg-muted/50 cursor-pointer",
1024
- onClick: t,
1024
+ onClick: a,
1025
1025
  children: [
1026
1026
  /* @__PURE__ */ e(Os, { checked: n }),
1027
1027
  /* @__PURE__ */ e(as, { className: "h-8 w-8", children: /* @__PURE__ */ e(ts, { className: "text-xs", children: r }) }),
1028
- /* @__PURE__ */ a("div", { className: "flex-1", children: [
1028
+ /* @__PURE__ */ t("div", { className: "flex-1", children: [
1029
1029
  /* @__PURE__ */ e("p", { className: "text-sm font-medium", children: ((u = s.user) == null ? void 0 : u.name) || "Unknown User" }),
1030
1030
  /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: (m = s.user) == null ? void 0 : m.email })
1031
1031
  ] })
@@ -1036,19 +1036,19 @@ function tn({
1036
1036
  function nn({
1037
1037
  user: s,
1038
1038
  selected: n,
1039
- onToggle: t
1039
+ onToggle: a
1040
1040
  }) {
1041
1041
  var l;
1042
1042
  const r = ((l = s.name) == null ? void 0 : l.split(" ").map((i) => i[0]).join("").toUpperCase()) || "?";
1043
- return /* @__PURE__ */ a(
1043
+ return /* @__PURE__ */ t(
1044
1044
  "div",
1045
1045
  {
1046
1046
  className: "flex items-center gap-3 p-3 rounded-lg border bg-card hover:bg-muted/50 cursor-pointer",
1047
- onClick: t,
1047
+ onClick: a,
1048
1048
  children: [
1049
1049
  /* @__PURE__ */ e(Os, { checked: n }),
1050
1050
  /* @__PURE__ */ e(as, { className: "h-8 w-8", children: /* @__PURE__ */ e(ts, { className: "text-xs", children: r }) }),
1051
- /* @__PURE__ */ a("div", { className: "flex-1", children: [
1051
+ /* @__PURE__ */ t("div", { className: "flex-1", children: [
1052
1052
  /* @__PURE__ */ e("p", { className: "text-sm font-medium", children: s.name }),
1053
1053
  /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: s.email })
1054
1054
  ] })
@@ -1060,16 +1060,16 @@ function rn({
1060
1060
  open: s,
1061
1061
  onOpenChange: n
1062
1062
  }) {
1063
- const [t, r] = S("groups"), [l, i] = S(""), [u, m] = S(null), [f, b] = S(!1), [c, d] = S(null), { tokenProps: h } = R(), { currentUser: p } = Is(), g = Vt(), y = (p == null ? void 0 : p.type) === "tenant", N = h == null ? void 0 : h.tenantId, { groups: k, isLoading: T, refetch: P } = Ia({
1063
+ const [a, r] = S("groups"), [l, i] = S(""), [u, m] = S(null), [f, b] = S(!1), [c, d] = S(null), { tokenProps: h } = R(), { currentUser: p } = Is(), g = Vt(), y = (p == null ? void 0 : p.type) === "tenant", N = h == null ? void 0 : h.tenantId, { groups: k, isLoading: T, refetch: P } = Ia({
1064
1064
  type: y ? "TENANT_GROUP" : "all",
1065
1065
  tenantId: y ? N : void 0,
1066
1066
  includeMembers: !1
1067
1067
  }), O = k.filter(
1068
1068
  (x) => {
1069
- var B;
1070
- return x.name.toLowerCase().includes(l.toLowerCase()) || ((B = x.description) == null ? void 0 : B.toLowerCase().includes(l.toLowerCase()));
1069
+ var z;
1070
+ return x.name.toLowerCase().includes(l.toLowerCase()) || ((z = x.description) == null ? void 0 : z.toLowerCase().includes(l.toLowerCase()));
1071
1071
  }
1072
- ), $ = async () => {
1072
+ ), V = async () => {
1073
1073
  if (c)
1074
1074
  try {
1075
1075
  await g.mutateAsync(c.id), d(null), P();
@@ -1078,31 +1078,31 @@ function rn({
1078
1078
  }
1079
1079
  }, G = (x) => {
1080
1080
  m(x), b(!0);
1081
- }, z = () => {
1081
+ }, $ = () => {
1082
1082
  r("groups"), P();
1083
1083
  };
1084
- return /* @__PURE__ */ a(M, { children: [
1085
- /* @__PURE__ */ e(We, { open: s, onOpenChange: n, children: /* @__PURE__ */ a(Xe, { className: "max-w-4xl max-h-[80vh]", children: [
1086
- /* @__PURE__ */ a(Ze, { children: [
1087
- /* @__PURE__ */ a(Ye, { className: "flex items-center gap-2", children: [
1088
- /* @__PURE__ */ e(V, { className: "h-5 w-5" }),
1084
+ return /* @__PURE__ */ t(M, { children: [
1085
+ /* @__PURE__ */ e(We, { open: s, onOpenChange: n, children: /* @__PURE__ */ t(Xe, { className: "max-w-4xl max-h-[80vh]", children: [
1086
+ /* @__PURE__ */ t(Ze, { children: [
1087
+ /* @__PURE__ */ t(Ye, { className: "flex items-center gap-2", children: [
1088
+ /* @__PURE__ */ e(H, { className: "h-5 w-5" }),
1089
1089
  "Group Management"
1090
1090
  ] }),
1091
1091
  /* @__PURE__ */ e(Ds, { children: "Manage your groups, create new groups, and control group membership" })
1092
1092
  ] }),
1093
- /* @__PURE__ */ a(ks, { value: t, onValueChange: r, className: "mt-4", children: [
1094
- /* @__PURE__ */ a(As, { className: "grid w-full grid-cols-2", children: [
1095
- /* @__PURE__ */ a(fe, { value: "groups", className: "flex items-center gap-2", children: [
1096
- /* @__PURE__ */ e(V, { className: "h-4 w-4" }),
1093
+ /* @__PURE__ */ t(ks, { value: a, onValueChange: r, className: "mt-4", children: [
1094
+ /* @__PURE__ */ t(As, { className: "grid w-full grid-cols-2", children: [
1095
+ /* @__PURE__ */ t(fe, { value: "groups", className: "flex items-center gap-2", children: [
1096
+ /* @__PURE__ */ e(H, { className: "h-4 w-4" }),
1097
1097
  "Groups"
1098
1098
  ] }),
1099
- /* @__PURE__ */ a(fe, { value: "create", className: "flex items-center gap-2", children: [
1099
+ /* @__PURE__ */ t(fe, { value: "create", className: "flex items-center gap-2", children: [
1100
1100
  /* @__PURE__ */ e(Je, { className: "h-4 w-4" }),
1101
1101
  "Create Group"
1102
1102
  ] })
1103
1103
  ] }),
1104
- /* @__PURE__ */ e(ge, { value: "groups", className: "mt-4", children: /* @__PURE__ */ a("div", { className: "space-y-4", children: [
1105
- /* @__PURE__ */ a("div", { className: "relative", children: [
1104
+ /* @__PURE__ */ e(ge, { value: "groups", className: "mt-4", children: /* @__PURE__ */ t("div", { className: "space-y-4", children: [
1105
+ /* @__PURE__ */ t("div", { className: "relative", children: [
1106
1106
  /* @__PURE__ */ e(Re, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }),
1107
1107
  /* @__PURE__ */ e(
1108
1108
  re,
@@ -1114,8 +1114,8 @@ function rn({
1114
1114
  }
1115
1115
  )
1116
1116
  ] }),
1117
- /* @__PURE__ */ e(Fe, { className: "h-[400px]", children: T ? /* @__PURE__ */ e("div", { className: "space-y-3", children: [1, 2, 3].map((x) => /* @__PURE__ */ e(je, { className: "h-24 w-full" }, x)) }) : O.length === 0 ? /* @__PURE__ */ a("div", { className: "flex flex-col items-center justify-center py-12 text-muted-foreground", children: [
1118
- /* @__PURE__ */ e(V, { className: "h-12 w-12 mb-3 opacity-50" }),
1117
+ /* @__PURE__ */ e(Fe, { className: "h-[400px]", children: T ? /* @__PURE__ */ e("div", { className: "space-y-3", children: [1, 2, 3].map((x) => /* @__PURE__ */ e(je, { className: "h-24 w-full" }, x)) }) : O.length === 0 ? /* @__PURE__ */ t("div", { className: "flex flex-col items-center justify-center py-12 text-muted-foreground", children: [
1118
+ /* @__PURE__ */ e(H, { className: "h-12 w-12 mb-3 opacity-50" }),
1119
1119
  /* @__PURE__ */ e("p", { className: "text-sm font-medium", children: "No groups found" }),
1120
1120
  /* @__PURE__ */ e("p", { className: "text-xs mt-1", children: l ? "Try a different search" : "Create your first group to get started" })
1121
1121
  ] }) : /* @__PURE__ */ e("div", { className: "space-y-3", children: O.map((x) => /* @__PURE__ */ e(
@@ -1132,7 +1132,7 @@ function rn({
1132
1132
  /* @__PURE__ */ e(ge, { value: "create", className: "mt-4", children: /* @__PURE__ */ e(
1133
1133
  Bt,
1134
1134
  {
1135
- onSuccess: z,
1135
+ onSuccess: $,
1136
1136
  tenantId: N,
1137
1137
  isTenantUser: y
1138
1138
  }
@@ -1153,25 +1153,25 @@ function rn({
1153
1153
  {
1154
1154
  open: !!c,
1155
1155
  onOpenChange: () => d(null),
1156
- children: /* @__PURE__ */ a(_s, { children: [
1157
- /* @__PURE__ */ a(Ps, { children: [
1156
+ children: /* @__PURE__ */ t(_s, { children: [
1157
+ /* @__PURE__ */ t(Ps, { children: [
1158
1158
  /* @__PURE__ */ e(Us, { children: "Delete Group" }),
1159
- /* @__PURE__ */ a(Gs, { children: [
1159
+ /* @__PURE__ */ t(Gs, { children: [
1160
1160
  'Are you sure you want to delete "',
1161
1161
  c == null ? void 0 : c.name,
1162
1162
  '"? This action cannot be undone and will remove all members from the group.'
1163
1163
  ] })
1164
1164
  ] }),
1165
- /* @__PURE__ */ a(Rs, { children: [
1165
+ /* @__PURE__ */ t(Rs, { children: [
1166
1166
  /* @__PURE__ */ e(Fs, { children: "Cancel" }),
1167
1167
  /* @__PURE__ */ e(
1168
1168
  He,
1169
1169
  {
1170
- onClick: $,
1170
+ onClick: V,
1171
1171
  disabled: g.isPending,
1172
1172
  className: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
1173
- children: g.isPending ? /* @__PURE__ */ a(M, { children: [
1174
- /* @__PURE__ */ e(H, { className: "mr-2 h-4 w-4 animate-spin" }),
1173
+ children: g.isPending ? /* @__PURE__ */ t(M, { children: [
1174
+ /* @__PURE__ */ e(X, { className: "mr-2 h-4 w-4 animate-spin" }),
1175
1175
  "Deleting..."
1176
1176
  ] }) : "Delete Group"
1177
1177
  }
@@ -1185,30 +1185,30 @@ function rn({
1185
1185
  function on({
1186
1186
  group: s,
1187
1187
  onManageMembers: n,
1188
- onDelete: t,
1188
+ onDelete: a,
1189
1189
  currentUserId: r
1190
1190
  }) {
1191
1191
  const l = s.createdBy === r;
1192
- return /* @__PURE__ */ e("div", { className: "rounded-lg border bg-card p-4 transition-colors hover:bg-muted/50", children: /* @__PURE__ */ a("div", { className: "flex items-start justify-between gap-3", children: [
1193
- /* @__PURE__ */ a("div", { className: "flex-1 space-y-2", children: [
1194
- /* @__PURE__ */ a("div", { children: [
1192
+ return /* @__PURE__ */ e("div", { className: "rounded-lg border bg-card p-4 transition-colors hover:bg-muted/50", children: /* @__PURE__ */ t("div", { className: "flex items-start justify-between gap-3", children: [
1193
+ /* @__PURE__ */ t("div", { className: "flex-1 space-y-2", children: [
1194
+ /* @__PURE__ */ t("div", { children: [
1195
1195
  /* @__PURE__ */ e("h4", { className: "font-medium", children: s.name }),
1196
1196
  s.description && /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground mt-1", children: s.description })
1197
1197
  ] }),
1198
- /* @__PURE__ */ a("div", { className: "flex flex-wrap items-center gap-3 text-xs text-muted-foreground", children: [
1199
- /* @__PURE__ */ a("span", { className: "flex items-center gap-1", children: [
1200
- /* @__PURE__ */ e(V, { className: "h-3 w-3" }),
1198
+ /* @__PURE__ */ t("div", { className: "flex flex-wrap items-center gap-3 text-xs text-muted-foreground", children: [
1199
+ /* @__PURE__ */ t("span", { className: "flex items-center gap-1", children: [
1200
+ /* @__PURE__ */ e(H, { className: "h-3 w-3" }),
1201
1201
  s.memberCount,
1202
1202
  " ",
1203
1203
  s.memberCount === 1 ? "member" : "members"
1204
1204
  ] }),
1205
- /* @__PURE__ */ a("span", { children: [
1205
+ /* @__PURE__ */ t("span", { children: [
1206
1206
  "Created ",
1207
1207
  Nt(new Date(s.createdAt), "MMM d, yyyy")
1208
1208
  ] })
1209
1209
  ] })
1210
1210
  ] }),
1211
- /* @__PURE__ */ a("div", { className: "flex items-center gap-1", children: [
1211
+ /* @__PURE__ */ t("div", { className: "flex items-center gap-1", children: [
1212
1212
  /* @__PURE__ */ e(
1213
1213
  L,
1214
1214
  {
@@ -1224,7 +1224,7 @@ function on({
1224
1224
  {
1225
1225
  variant: "ghost",
1226
1226
  size: "sm",
1227
- onClick: t,
1227
+ onClick: a,
1228
1228
  title: "Delete group",
1229
1229
  className: "text-destructive hover:text-destructive",
1230
1230
  children: /* @__PURE__ */ e(Ms, { className: "h-4 w-4" })
@@ -1239,14 +1239,14 @@ function yn() {
1239
1239
  const {
1240
1240
  authToken: s,
1241
1241
  tokenProps: n,
1242
- id: t
1242
+ id: a
1243
1243
  } = R(), { isLocalDev: r } = Ta(), { permissions: l } = yt(), i = _a(), { isLoading: u } = Pa();
1244
1244
  w((o) => o.theme);
1245
1245
  const m = w((o) => o.lenses), f = w((o) => o.selectedLensId), b = m == null ? void 0 : m.find((o) => o.id === f), c = w((o) => o.dashboard);
1246
1246
  w((o) => o.selectedSheetId);
1247
1247
  const d = w(
1248
1248
  (o) => o.isDashboardEditing
1249
- ), { setDashboardTitle: h } = w((o) => o.actions), [p, g] = S(!1), [y, N] = S(!1), [k, T] = S(!1), [P, O] = S(!1), [$, G] = S(!1), [z, x] = S(!1), [B, K] = S(!1), [Q, W] = S(null), [v, C] = S(!1), _ = w((o) => o.isDashboardPanelOpen), F = w(
1249
+ ), { setDashboardTitle: h } = w((o) => o.actions), [p, g] = S(!1), [y, N] = S(!1), [k, T] = S(!1), [P, O] = S(!1), [V, G] = S(!1), [$, x] = S(!1), [z, B] = S(!1), [K, Q] = S(null), [v, C] = S(!1), _ = w((o) => o.isDashboardPanelOpen), F = w(
1250
1250
  (o) => o.actions.setIsDashboardPanelOpen
1251
1251
  ), oe = w((o) => o.filterValues), D = w((o) => o.isVisualEditing);
1252
1252
  bs((o) => o.card);
@@ -1264,9 +1264,9 @@ function yn() {
1264
1264
  (o) => o.actions
1265
1265
  ), { setInitialDashboard: os, clearSelectedDashboard: Se } = he(
1266
1266
  (o) => o.actions
1267
- ), { resources: ce } = Ga(Ie.DASHBOARD), { data: we } = Ra(), Ys = ((fs = we == null ? void 0 : we.preference) == null ? void 0 : fs.defaultDashboardId) || null, { mutate: ea, isPending: sa } = Fa(), { currentUser: aa } = Is(), ta = ja(aa), J = Y || ie, is = J ? {
1268
- id: J.id,
1269
- title: (c == null ? void 0 : c.title) || J.title || "Dashboard"
1267
+ ), { resources: ce } = Ga(Ie.DASHBOARD), { data: we } = Ra(), Ys = ((fs = we == null ? void 0 : we.preference) == null ? void 0 : fs.defaultDashboardId) || null, { mutate: ea, isPending: sa } = Fa(), { currentUser: aa } = Is(), ta = ja(aa), W = Y || ie, is = W ? {
1268
+ id: W.id,
1269
+ title: (c == null ? void 0 : c.title) || W.title || "Dashboard"
1270
1270
  } : null, { handleAddNewFrame: na } = qa(), [xe, De] = S(!1), [ra, ee] = S(!1), [Ce, de] = S("close"), se = Ha(Ie.DASHBOARD), [U, Le] = S(
1271
1271
  null
1272
1272
  ), oa = async (o, I) => {
@@ -1343,7 +1343,7 @@ function yn() {
1343
1343
  const I = (o == null ? void 0 : o.closeAfterSave) ?? v, ne = (o == null ? void 0 : o.navigateHomeAfterSave) ?? !1;
1344
1344
  C(I), I && ee(!1);
1345
1345
  const ba = ct(c);
1346
- K(!0), W(null), De(!0);
1346
+ B(!0), Q(null), De(!0);
1347
1347
  const ya = {
1348
1348
  template: c
1349
1349
  };
@@ -1354,10 +1354,10 @@ function yn() {
1354
1354
  },
1355
1355
  {
1356
1356
  onSuccess: () => {
1357
- De(!1), A.success("Dashboard saved!"), Le(ba), K(!1), C(!1), I && (ke(), me(), ne && Se()), de("close");
1357
+ De(!1), A.success("Dashboard saved!"), Le(ba), B(!1), C(!1), I && (ke(), me(), ne && Se()), de("close");
1358
1358
  },
1359
1359
  onError: () => {
1360
- De(!1), W("Failed to save dashboard. Please try again."), A.error("Failed to save dashboard");
1360
+ De(!1), Q("Failed to save dashboard. Please try again."), A.error("Failed to save dashboard");
1361
1361
  }
1362
1362
  }
1363
1363
  );
@@ -1387,14 +1387,14 @@ function yn() {
1387
1387
  dashboardId: Oe ? null : te
1388
1388
  });
1389
1389
  };
1390
- return /* @__PURE__ */ a(
1390
+ return /* @__PURE__ */ t(
1391
1391
  "div",
1392
1392
  {
1393
1393
  className: "flex h-11 shrink-0 items-center justify-between gap-2 overflow-x-auto border-b px-4 py-2",
1394
1394
  role: "dashboard-controls",
1395
1395
  children: [
1396
- /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
1397
- ms && /* @__PURE__ */ a(M, { children: [
1396
+ /* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
1397
+ ms && /* @__PURE__ */ t(M, { children: [
1398
1398
  /* @__PURE__ */ e(
1399
1399
  j,
1400
1400
  {
@@ -1418,10 +1418,15 @@ function yn() {
1418
1418
  }
1419
1419
  )
1420
1420
  ] }),
1421
- !D && i && (u ? /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
1422
- /* @__PURE__ */ e(H, { className: "h-3 w-3 animate-spin text-muted-foreground" }),
1423
- /* @__PURE__ */ e("span", { className: "text-sm text-muted-foreground", children: "Loading..." })
1424
- ] }) : /* @__PURE__ */ a(M, { children: [
1421
+ !D && i && (u ? /* @__PURE__ */ e(
1422
+ "div",
1423
+ {
1424
+ className: "h-4 w-28 rounded-md bg-muted/70 animate-pulse",
1425
+ "aria-label": "Loading dashboard title",
1426
+ role: "status",
1427
+ children: /* @__PURE__ */ e("span", { className: "sr-only", children: "Loading dashboard title" })
1428
+ }
1429
+ ) : /* @__PURE__ */ t(M, { children: [
1425
1430
  /* @__PURE__ */ e(
1426
1431
  Va,
1427
1432
  {
@@ -1442,7 +1447,7 @@ function yn() {
1442
1447
  isPending: se.isPending
1443
1448
  }
1444
1449
  ),
1445
- fa && te && /* @__PURE__ */ e($a, { children: /* @__PURE__ */ a(za, { children: [
1450
+ fa && te && /* @__PURE__ */ e($a, { children: /* @__PURE__ */ t(za, { children: [
1446
1451
  /* @__PURE__ */ e(Ba, { asChild: !0, children: /* @__PURE__ */ e(
1447
1452
  L,
1448
1453
  {
@@ -1454,7 +1459,7 @@ function yn() {
1454
1459
  children: /* @__PURE__ */ e(
1455
1460
  Ka,
1456
1461
  {
1457
- className: X(
1462
+ className: J(
1458
1463
  "h-4 w-4 transition-colors",
1459
1464
  Oe ? "fill-yellow-400 text-yellow-400" : "text-muted-foreground hover:text-yellow-400"
1460
1465
  )
@@ -1466,12 +1471,12 @@ function yn() {
1466
1471
  ] }) })
1467
1472
  ] }))
1468
1473
  ] }),
1469
- /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
1470
- D && /* @__PURE__ */ a(M, { children: [
1474
+ /* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
1475
+ D && /* @__PURE__ */ t(M, { children: [
1471
1476
  /* @__PURE__ */ e(ft, { className: "mr-2" }),
1472
1477
  /* @__PURE__ */ e(gt, { className: "h-7" })
1473
1478
  ] }),
1474
- r && !D && /* @__PURE__ */ a(M, { children: [
1479
+ r && !D && /* @__PURE__ */ t(M, { children: [
1475
1480
  /* @__PURE__ */ e(
1476
1481
  j,
1477
1482
  {
@@ -1496,7 +1501,7 @@ function yn() {
1496
1501
  ] }),
1497
1502
  !D && i && /* @__PURE__ */ e(Xa, {}),
1498
1503
  !D && i && /* @__PURE__ */ e(vt, {}),
1499
- !D && i && ((gs = J == null ? void 0 : J.permissions) == null ? void 0 : gs.canShare) && /* @__PURE__ */ e(
1504
+ !D && i && ((gs = W == null ? void 0 : W.permissions) == null ? void 0 : gs.canShare) && /* @__PURE__ */ e(
1500
1505
  j,
1501
1506
  {
1502
1507
  tooltip: "Share Dashboard",
@@ -1505,7 +1510,7 @@ function yn() {
1505
1510
  children: /* @__PURE__ */ e(Za, { className: "h-4 w-4" })
1506
1511
  }
1507
1512
  ),
1508
- !D && d && l.canUseFilters && i && /* @__PURE__ */ a(
1513
+ !D && d && l.canUseFilters && i && /* @__PURE__ */ t(
1509
1514
  L,
1510
1515
  {
1511
1516
  className: "h-7 px-2",
@@ -1522,7 +1527,7 @@ function yn() {
1522
1527
  ),
1523
1528
  d && !D && ue && r && i && /* @__PURE__ */ e(Ut, {}),
1524
1529
  !D && ue && r && i && /* @__PURE__ */ e(Gt, {}),
1525
- d && !D && ue && b && r && i && /* @__PURE__ */ a(
1530
+ d && !D && ue && b && r && i && /* @__PURE__ */ t(
1526
1531
  L,
1527
1532
  {
1528
1533
  className: "h-7 p-2",
@@ -1536,7 +1541,7 @@ function yn() {
1536
1541
  ]
1537
1542
  }
1538
1543
  ),
1539
- d && !D && i && /* @__PURE__ */ a(
1544
+ d && !D && i && /* @__PURE__ */ t(
1540
1545
  L,
1541
1546
  {
1542
1547
  variant: "outline",
@@ -1550,7 +1555,7 @@ function yn() {
1550
1555
  ]
1551
1556
  }
1552
1557
  ),
1553
- !D && !d && le && i && /* @__PURE__ */ a(
1558
+ !D && !d && le && i && /* @__PURE__ */ t(
1554
1559
  L,
1555
1560
  {
1556
1561
  variant: "outline",
@@ -1563,7 +1568,7 @@ function yn() {
1563
1568
  ]
1564
1569
  }
1565
1570
  ),
1566
- ls && i && cs && /* @__PURE__ */ a(
1571
+ ls && i && cs && /* @__PURE__ */ t(
1567
1572
  L,
1568
1573
  {
1569
1574
  variant: "outline",
@@ -1577,16 +1582,16 @@ function yn() {
1577
1582
  ]
1578
1583
  }
1579
1584
  ),
1580
- ls && i && /* @__PURE__ */ a("div", { className: "relative inline-flex", children: [
1581
- /* @__PURE__ */ a(
1585
+ ls && i && /* @__PURE__ */ t("div", { className: "relative inline-flex", children: [
1586
+ /* @__PURE__ */ t(
1582
1587
  L,
1583
1588
  {
1584
- className: X("h-7 p-2", !Ae && "opacity-60"),
1589
+ className: J("h-7 p-2", !Ae && "opacity-60"),
1585
1590
  disabled: ae || !Ae,
1586
1591
  onClick: () => Me(),
1587
1592
  size: "sm",
1588
1593
  children: [
1589
- ae ? /* @__PURE__ */ e(H, { className: "mr-2 h-4 w-4 animate-spin" }) : /* @__PURE__ */ e(ys, { className: "mr-2 h-4 w-4" }),
1594
+ ae ? /* @__PURE__ */ e(X, { className: "mr-2 h-4 w-4 animate-spin" }) : /* @__PURE__ */ e(ys, { className: "mr-2 h-4 w-4" }),
1590
1595
  ae ? "Saving..." : "Save"
1591
1596
  ]
1592
1597
  }
@@ -1610,7 +1615,7 @@ function yn() {
1610
1615
  }
1611
1616
  ) }),
1612
1617
  !D && r && /* @__PURE__ */ e(Tt, {}),
1613
- d && !D && i && /* @__PURE__ */ a(
1618
+ d && !D && i && /* @__PURE__ */ t(
1614
1619
  L,
1615
1620
  {
1616
1621
  variant: "outline",
@@ -1622,22 +1627,22 @@ function yn() {
1622
1627
  ]
1623
1628
  }
1624
1629
  ),
1625
- !D && i && /* @__PURE__ */ a(ze, { children: [
1630
+ !D && i && /* @__PURE__ */ t(ze, { children: [
1626
1631
  /* @__PURE__ */ e(Be, { asChild: !0, children: /* @__PURE__ */ e(j, { tooltip: "More Options", className: "h-7 p-2", children: /* @__PURE__ */ e(tt, { className: "h-4 w-4" }) }) }),
1627
- /* @__PURE__ */ a(Ke, { align: "end", children: [
1628
- /* @__PURE__ */ a(q, { onClick: () => O(!0), children: [
1632
+ /* @__PURE__ */ t(Ke, { align: "end", children: [
1633
+ /* @__PURE__ */ t(q, { onClick: () => O(!0), children: [
1629
1634
  /* @__PURE__ */ e(nt, { className: "mr-2 h-4 w-4" }),
1630
1635
  "Schedule Dashboard"
1631
1636
  ] }),
1632
- ta && /* @__PURE__ */ a(q, { onClick: () => T(!0), children: [
1633
- /* @__PURE__ */ e(V, { className: "mr-2 h-4 w-4" }),
1637
+ ta && /* @__PURE__ */ t(q, { onClick: () => T(!0), children: [
1638
+ /* @__PURE__ */ e(H, { className: "mr-2 h-4 w-4" }),
1634
1639
  "Manage Groups"
1635
1640
  ] }),
1636
- /* @__PURE__ */ a(q, { onClick: () => G(!0), children: [
1641
+ /* @__PURE__ */ t(q, { onClick: () => G(!0), children: [
1637
1642
  /* @__PURE__ */ e(rt, { className: "mr-2 h-4 w-4" }),
1638
1643
  "Calendar Preferences"
1639
1644
  ] }),
1640
- /* @__PURE__ */ a(q, { onClick: () => x(!0), children: [
1645
+ /* @__PURE__ */ t(q, { onClick: () => x(!0), children: [
1641
1646
  /* @__PURE__ */ e(ot, { className: "mr-2 h-4 w-4" }),
1642
1647
  "Summary Settings"
1643
1648
  ] })
@@ -1670,14 +1675,14 @@ function yn() {
1670
1675
  /* @__PURE__ */ e(
1671
1676
  St,
1672
1677
  {
1673
- open: $,
1678
+ open: V,
1674
1679
  onOpenChange: G
1675
1680
  }
1676
1681
  ),
1677
1682
  /* @__PURE__ */ e(
1678
1683
  wt,
1679
1684
  {
1680
- open: z,
1685
+ open: $,
1681
1686
  onOpenChange: x,
1682
1687
  dashboard: c,
1683
1688
  disabled: !d,
@@ -1690,21 +1695,21 @@ function yn() {
1690
1695
  /* @__PURE__ */ e(
1691
1696
  Ts,
1692
1697
  {
1693
- open: B,
1698
+ open: z,
1694
1699
  onOpenChange: (o) => {
1695
- !o && xe && !Q || (K(o), o || (W(null), C(!1)));
1700
+ !o && xe && !K || (B(o), o || (Q(null), C(!1)));
1696
1701
  },
1697
- children: /* @__PURE__ */ a(_s, { className: "max-w-sm", children: [
1698
- /* @__PURE__ */ a(Ps, { children: [
1699
- /* @__PURE__ */ e(Us, { children: Q ? "Save failed" : "Saving dashboard" }),
1700
- /* @__PURE__ */ e(Gs, { className: "pt-2", children: Q ? "We could not save the dashboard. Please try again." : "Please wait while we save your changes." })
1702
+ children: /* @__PURE__ */ t(_s, { className: "max-w-sm", children: [
1703
+ /* @__PURE__ */ t(Ps, { children: [
1704
+ /* @__PURE__ */ e(Us, { children: K ? "Save failed" : "Saving dashboard" }),
1705
+ /* @__PURE__ */ e(Gs, { className: "pt-2", children: K ? "We could not save the dashboard. Please try again." : "Please wait while we save your changes." })
1701
1706
  ] }),
1702
- /* @__PURE__ */ e(Rs, { className: "flex-col gap-2 sm:flex-row sm:justify-end", children: Q ? /* @__PURE__ */ a(M, { children: [
1707
+ /* @__PURE__ */ e(Rs, { className: "flex-col gap-2 sm:flex-row sm:justify-end", children: K ? /* @__PURE__ */ t(M, { children: [
1703
1708
  /* @__PURE__ */ e(
1704
1709
  Fs,
1705
1710
  {
1706
1711
  onClick: () => {
1707
- K(!1), W(null), C(!1);
1712
+ B(!1), Q(null), C(!1);
1708
1713
  },
1709
1714
  className: "m-0",
1710
1715
  children: "Close"
@@ -1721,13 +1726,13 @@ function yn() {
1721
1726
  children: "Retry"
1722
1727
  }
1723
1728
  )
1724
- ] }) : /* @__PURE__ */ a(
1729
+ ] }) : /* @__PURE__ */ t(
1725
1730
  He,
1726
1731
  {
1727
1732
  disabled: !0,
1728
1733
  className: "m-0 cursor-default",
1729
1734
  children: [
1730
- /* @__PURE__ */ e(H, { className: "mr-2 h-4 w-4 animate-spin" }),
1735
+ /* @__PURE__ */ e(X, { className: "mr-2 h-4 w-4 animate-spin" }),
1731
1736
  "Saving..."
1732
1737
  ]
1733
1738
  }