react-semaphor 0.1.215 → 0.1.217

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 (42) hide show
  1. package/dist/chunks/{dashboard-controls-gCssNmJm.js → dashboard-controls-DLjwyISu.js} +548 -470
  2. package/dist/chunks/dashboard-controls-p-PLTBKo.js +47 -0
  3. package/dist/chunks/{dashboard-json-DqjdMwqj.js → dashboard-json-DC8Hr2u7.js} +1 -1
  4. package/dist/chunks/{dashboard-json-BZdOqyyK.js → dashboard-json-Dy8OL7sx.js} +5 -5
  5. package/dist/chunks/{dashboard-summary-settings-dialog-BxEopSPW.js → dashboard-summary-settings-dialog-CQISZPzc.js} +1 -1
  6. package/dist/chunks/{dashboard-summary-settings-dialog-Diz1-VIZ.js → dashboard-summary-settings-dialog-Dlzv-d9Z.js} +1 -1
  7. package/dist/chunks/{edit-dashboard-visual-CWytKzAl.js → edit-dashboard-visual-DAiqFH7i.js} +9 -9
  8. package/dist/chunks/{edit-dashboard-visual-Bq0O78OS.js → edit-dashboard-visual-DkZya-OV.js} +2649 -2653
  9. package/dist/chunks/{editor-action-buttons-D3hMMbWz.js → editor-action-buttons-4-UuoSZc.js} +1 -1
  10. package/dist/chunks/{editor-action-buttons-CdrejHS2.js → editor-action-buttons-BQtxnqBZ.js} +2 -2
  11. package/dist/chunks/index-CRJ97-41.js +1098 -0
  12. package/dist/chunks/{index-Cxj7oWTZ.js → index-Cr-d0ray.js} +27027 -27593
  13. package/dist/chunks/normalize-dashboard-for-dirty-check-B7NQDI1H.js +1 -0
  14. package/dist/chunks/normalize-dashboard-for-dirty-check-Bn27S0PN.js +69 -0
  15. package/dist/chunks/{notification-bell-D1NnHIWO.js → notification-bell-CyZx_uZ1.js} +1 -1
  16. package/dist/chunks/{notification-bell-BTWYtgvh.js → notification-bell-_OADjyy7.js} +37 -37
  17. package/dist/chunks/{resource-management-panel-DATz276M.js → resource-management-panel-Bq9zRYsk.js} +1 -1
  18. package/dist/chunks/{resource-management-panel-BnRwLkjR.js → resource-management-panel-rmEMdbbS.js} +33 -33
  19. package/dist/chunks/use-debounced-dirty-check-BwAbnX_5.js +59 -0
  20. package/dist/chunks/use-debounced-dirty-check-XHSwAefL.js +1 -0
  21. package/dist/chunks/{use-role-aware-display-preferences-ASD7plKm.js → use-role-aware-display-preferences-1U-ed07h.js} +1 -1
  22. package/dist/chunks/{use-role-aware-display-preferences-DP-Ng_hb.js → use-role-aware-display-preferences-DOA8kcfK.js} +1 -1
  23. package/dist/chunks/{use-visual-utils-C_9jH8bu.js → use-visual-utils-DX-4Hwoe.js} +1 -1
  24. package/dist/chunks/{use-visual-utils-873PUDHm.js → use-visual-utils-DxigSU7y.js} +1 -1
  25. package/dist/dashboard/index.cjs +1 -1
  26. package/dist/dashboard/index.js +1 -1
  27. package/dist/index.cjs +1 -1
  28. package/dist/index.js +19 -18
  29. package/dist/shared/index.cjs +1 -1
  30. package/dist/shared/index.js +5 -4
  31. package/dist/surfboard/index.cjs +1 -1
  32. package/dist/surfboard/index.js +2 -2
  33. package/dist/types/dashboard.d.ts +9 -4
  34. package/dist/types/main.d.ts +17 -8
  35. package/dist/types/shared.d.ts +9 -4
  36. package/dist/types/surfboard.d.ts +9 -4
  37. package/dist/types/types.d.ts +9 -4
  38. package/package.json +2 -1
  39. package/dist/chunks/dashboard-controls-DO8B0l2Z.js +0 -47
  40. package/dist/chunks/index-BkklWRT2.js +0 -1109
  41. package/dist/chunks/normalize-dashboard-for-dirty-check-D9x96J2F.js +0 -1
  42. package/dist/chunks/normalize-dashboard-for-dirty-check-XKgH3GFX.js +0 -119
@@ -1,14 +1,15 @@
1
- import { jsxs as a, jsx as e, Fragment as k } from "react/jsx-runtime";
2
- import { bS as Z, cS as Na, u as w, c8 as $e, c9 as Be, B as L, cb as Ke, cc as H, cT as Qe, Z as xs, l as P, m as We, cU as Sa, c7 as Je, n as Xe, o as Ze, p as Ye, q as Ds, L as Ge, Q as oe, 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 be, c_ as ye, I as E, c$ as Es, cH as La, d0 as Ea, H as q, cf as V, d1 as es, d2 as Aa, d3 as ka, d4 as Re, d5 as Ma, d6 as Oa, d7 as As, d8 as ks, d9 as ge, da as ve, cD as Pe, cm as Fe, db as je, ch as Ms, dc as He, dd as Os, e as Is, de as Ia, cp as Ts, cq as _s, cr as Us, cs as Gs, ct as Rs, cu as Ps, cv as Fs, cw as qe, c6 as Ta, df as _a, bG as Ua, a1 as bs, bO as pe, dg as Ga, bP as Ra, as as Ie, dh as Pa, di as Fa, dj as ja, bj as Ha, dk as qa, dl as Va, bZ as za, b_ as $a, b$ as Ba, dm as Ka, c1 as Qa, cd as Wa, a_ as Ja, dn as Xa, dp as Za, dq as Ya, dr as et, ds as st, dt as at, ca as tt, ae as rt, cj as nt, du as ot, au as it, af as lt, ay as ct } from "./index-Cxj7oWTZ.js";
3
- import * as _ from "react";
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 H, cT as Qe, Z as xs, l as G, 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 oe, 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 be, c_ as ye, I as A, c$ as Es, cH as La, d0 as Ea, H as q, cf as V, d1 as ka, d2 as Aa, d3 as Re, d4 as Ma, d5 as Oa, d6 as ks, d7 as As, d8 as ge, d9 as ve, cD as Ge, cm as Fe, da as je, ch as Ms, db as He, dc as Os, e as Is, dd as Ia, cp as Ts, cq as _s, cr as Ps, cs as Us, ct as Rs, cu as Gs, cv as Fs, cw as qe, c6 as Ta, de as _a, ai as Pa, a1 as bs, ah as pe, df as Ua, ao as Ra, aj as Ie, dg as Ga, dh as Fa, di as ja, aD as Ha, dj as qa, 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-Cr-d0ray.js";
3
+ import * as E from "react";
4
4
  import js, { useState as S, useMemo as fe, 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-BTWYtgvh.js";
7
- import { u as yt } from "./use-role-aware-display-preferences-DP-Ng_hb.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-_OADjyy7.js";
7
+ import { u as yt } from "./use-role-aware-display-preferences-DOA8kcfK.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-BxEopSPW.js";
10
- import { u as xt, s as Te } from "./normalize-dashboard-for-dirty-check-XKgH3GFX.js";
11
- import { S as ys } from "./editor-action-buttons-CdrejHS2.js";
9
+ import { C as St, D as wt } from "./dashboard-summary-settings-dialog-CQISZPzc.js";
10
+ import { u as xt } from "./use-debounced-dirty-check-BwAbnX_5.js";
11
+ import { s as Te } from "./normalize-dashboard-for-dirty-check-Bn27S0PN.js";
12
+ import { S as ys } from "./editor-action-buttons-BQtxnqBZ.js";
12
13
  /**
13
14
  * @license lucide-react v0.453.0 - ISC
14
15
  *
@@ -59,7 +60,7 @@ const Et = Z("Moon", [
59
60
  * This source code is licensed under the ISC license.
60
61
  * See the LICENSE file in the root directory of this source tree.
61
62
  */
62
- const At = Z("ShieldX", [
63
+ const kt = Z("ShieldX", [
63
64
  [
64
65
  "path",
65
66
  {
@@ -76,7 +77,7 @@ const At = Z("ShieldX", [
76
77
  * This source code is licensed under the ISC license.
77
78
  * See the LICENSE file in the root directory of this source tree.
78
79
  */
79
- const kt = Z("Sun", [
80
+ const At = Z("Sun", [
80
81
  ["circle", { cx: "12", cy: "12", r: "4", key: "4exip2" }],
81
82
  ["path", { d: "M12 2v2", key: "tus03m" }],
82
83
  ["path", { d: "M12 20v2", key: "1lh1kg" }],
@@ -102,43 +103,43 @@ function Mt() {
102
103
  if (Ns) return _e;
103
104
  Ns = 1;
104
105
  var s = js;
105
- function o(d, m) {
106
- return d === m && (d !== 0 || 1 / d === 1 / m) || d !== d && m !== m;
106
+ function n(d, h) {
107
+ return d === h && (d !== 0 || 1 / d === 1 / h) || d !== d && h !== h;
107
108
  }
108
- var t = typeof Object.is == "function" ? Object.is : o, r = s.useState, l = s.useEffect, c = s.useLayoutEffect, u = s.useDebugValue;
109
- function p(d, m) {
110
- var h = m(), b = r({ inst: { value: h, getSnapshot: m } }), y = b[0].inst, N = b[1];
111
- return c(
109
+ var t = typeof Object.is == "function" ? Object.is : n, r = s.useState, l = s.useEffect, i = s.useLayoutEffect, u = s.useDebugValue;
110
+ function m(d, h) {
111
+ var p = h(), g = r({ inst: { value: p, getSnapshot: h } }), y = g[0].inst, N = g[1];
112
+ return i(
112
113
  function() {
113
- y.value = h, y.getSnapshot = m, g(y) && N({ inst: y });
114
+ y.value = p, y.getSnapshot = h, f(y) && N({ inst: y });
114
115
  },
115
- [d, h, m]
116
+ [d, p, h]
116
117
  ), l(
117
118
  function() {
118
- return g(y) && N({ inst: y }), d(function() {
119
- g(y) && N({ inst: y });
119
+ return f(y) && N({ inst: y }), d(function() {
120
+ f(y) && N({ inst: y });
120
121
  });
121
122
  },
122
123
  [d]
123
- ), u(h), h;
124
+ ), u(p), p;
124
125
  }
125
- function g(d) {
126
- var m = d.getSnapshot;
126
+ function f(d) {
127
+ var h = d.getSnapshot;
127
128
  d = d.value;
128
129
  try {
129
- var h = m();
130
- return !t(d, h);
130
+ var p = h();
131
+ return !t(d, p);
131
132
  } catch {
132
133
  return !0;
133
134
  }
134
135
  }
135
- function v(d, m) {
136
- return m();
136
+ function b(d, h) {
137
+ return h();
137
138
  }
138
- var i = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? v : p;
139
- return _e.useSyncExternalStore = s.useSyncExternalStore !== void 0 ? s.useSyncExternalStore : i, _e;
139
+ var c = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? b : m;
140
+ return _e.useSyncExternalStore = s.useSyncExternalStore !== void 0 ? s.useSyncExternalStore : c, _e;
140
141
  }
141
- var Ue = {};
142
+ var Pe = {};
142
143
  /**
143
144
  * @license React
144
145
  * use-sync-external-store-shim.development.js
@@ -151,66 +152,66 @@ var Ue = {};
151
152
  var Ss;
152
153
  function Ot() {
153
154
  return Ss || (Ss = 1, process.env.NODE_ENV !== "production" && function() {
154
- function s(h, b) {
155
- return h === b && (h !== 0 || 1 / h === 1 / b) || h !== h && b !== b;
155
+ function s(p, g) {
156
+ return p === g && (p !== 0 || 1 / p === 1 / g) || p !== p && g !== g;
156
157
  }
157
- function o(h, b) {
158
- i || l.startTransition === void 0 || (i = !0, console.error(
158
+ function n(p, g) {
159
+ c || l.startTransition === void 0 || (c = !0, console.error(
159
160
  "You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
160
161
  ));
161
- var y = b();
162
+ var y = g();
162
163
  if (!d) {
163
- var N = b();
164
- c(y, N) || (console.error(
164
+ var N = g();
165
+ i(y, N) || (console.error(
165
166
  "The result of getSnapshot should be cached to avoid an infinite loop"
166
167
  ), d = !0);
167
168
  }
168
169
  N = u({
169
- inst: { value: y, getSnapshot: b }
170
+ inst: { value: y, getSnapshot: g }
170
171
  });
171
- var A = N[0].inst, I = N[1];
172
- return g(
172
+ var k = N[0].inst, T = N[1];
173
+ return f(
173
174
  function() {
174
- A.value = y, A.getSnapshot = b, t(A) && I({ inst: A });
175
+ k.value = y, k.getSnapshot = g, t(k) && T({ inst: k });
175
176
  },
176
- [h, y, b]
177
- ), p(
177
+ [p, y, g]
178
+ ), m(
178
179
  function() {
179
- return t(A) && I({ inst: A }), h(function() {
180
- t(A) && I({ inst: A });
180
+ return t(k) && T({ inst: k }), p(function() {
181
+ t(k) && T({ inst: k });
181
182
  });
182
183
  },
183
- [h]
184
- ), v(y), y;
184
+ [p]
185
+ ), b(y), y;
185
186
  }
186
- function t(h) {
187
- var b = h.getSnapshot;
188
- h = h.value;
187
+ function t(p) {
188
+ var g = p.getSnapshot;
189
+ p = p.value;
189
190
  try {
190
- var y = b();
191
- return !c(h, y);
191
+ var y = g();
192
+ return !i(p, y);
192
193
  } catch {
193
194
  return !0;
194
195
  }
195
196
  }
196
- function r(h, b) {
197
- return b();
197
+ function r(p, g) {
198
+ return g();
198
199
  }
199
200
  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
200
- var l = js, c = typeof Object.is == "function" ? Object.is : s, u = l.useState, p = l.useEffect, g = l.useLayoutEffect, v = l.useDebugValue, i = !1, d = !1, m = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? r : o;
201
- Ue.useSyncExternalStore = l.useSyncExternalStore !== void 0 ? l.useSyncExternalStore : m, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
202
- }()), Ue;
201
+ var l = js, i = typeof Object.is == "function" ? Object.is : s, u = l.useState, m = l.useEffect, f = l.useLayoutEffect, b = l.useDebugValue, c = !1, d = !1, h = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? r : n;
202
+ Pe.useSyncExternalStore = l.useSyncExternalStore !== void 0 ? l.useSyncExternalStore : h, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
203
+ }()), Pe;
203
204
  }
204
205
  process.env.NODE_ENV === "production" ? Ve.exports = Mt() : Ve.exports = Ot();
205
206
  var It = Ve.exports;
206
207
  function Tt() {
207
- const { setTheme: s } = Na(), o = w(
208
+ const { setTheme: s } = Na(), n = w(
208
209
  (t) => t.actions.setDashboardTheme
209
210
  );
210
- return /* @__PURE__ */ a($e, { children: [
211
+ return /* @__PURE__ */ a(ze, { children: [
211
212
  /* @__PURE__ */ e(Be, { asChild: !0, children: /* @__PURE__ */ a(L, { className: "h-7 p-2", variant: "ghost", size: "sm", children: [
212
213
  /* @__PURE__ */ e(
213
- kt,
214
+ At,
214
215
  {
215
216
  strokeWidth: 1.5,
216
217
  className: "h-4 w-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"
@@ -230,7 +231,7 @@ function Tt() {
230
231
  H,
231
232
  {
232
233
  onClick: () => {
233
- s("light"), o("light");
234
+ s("light"), n("light");
234
235
  },
235
236
  children: "Light"
236
237
  }
@@ -239,7 +240,7 @@ function Tt() {
239
240
  H,
240
241
  {
241
242
  onClick: () => {
242
- s("dark"), o("dark");
243
+ s("dark"), n("dark");
243
244
  },
244
245
  children: "Dark"
245
246
  }
@@ -248,7 +249,7 @@ function Tt() {
248
249
  H,
249
250
  {
250
251
  onClick: () => {
251
- s("system"), o("system");
252
+ s("system"), n("system");
252
253
  },
253
254
  children: "System"
254
255
  }
@@ -256,53 +257,53 @@ function Tt() {
256
257
  ] })
257
258
  ] });
258
259
  }
259
- async function _t(s, o, t, r, l) {
260
+ async function _t(s, n, t, r, l) {
260
261
  if (!l)
261
262
  return null;
262
- const c = JSON.stringify(t), u = `${s}/v1/lens`;
263
+ const i = JSON.stringify(t), u = `${s}/v1/lens`;
263
264
  return await Qe(u, l, {
264
- name: o,
265
- template: c,
265
+ name: n,
266
+ template: i,
266
267
  filterValues: r,
267
268
  operation: "create"
268
269
  });
269
270
  }
270
- async function ze(s, o, t) {
271
+ async function $e(s, n, t) {
271
272
  if (!t)
272
273
  return null;
273
- const { id: r, template: l, filterValues: c, isDefault: u, shared: p } = o, g = `${s}/v1/lens`;
274
- return await Qe(g, t, {
274
+ const { id: r, template: l, filterValues: i, isDefault: u, shared: m } = n, f = `${s}/v1/lens`;
275
+ return await Qe(f, t, {
275
276
  lensId: r,
276
277
  template: l,
277
- filterValues: c,
278
+ filterValues: i,
278
279
  isDefault: u,
279
- shared: p,
280
+ shared: m,
280
281
  operation: "update"
281
282
  });
282
283
  }
283
- async function Ut(s, o, t) {
284
+ async function Pt(s, n, t) {
284
285
  if (!t)
285
286
  return null;
286
287
  const r = `${s}/v1/lens`;
287
288
  return await Qe(r, t, {
288
289
  operation: "delete",
289
- lensId: o
290
+ lensId: n
290
291
  });
291
292
  }
292
- function Gt() {
293
- const [s, o] = S(""), [t, r] = S(!1), l = w((N) => N.lenses), { setLenses: c, setSelectedLensId: u } = xs(), [p, g] = S(!1), [v, i] = S(!1), d = w((N) => N.dashboard), m = w((N) => N.filterValues), { authToken: h, tokenProps: b } = P();
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 } = G();
294
295
  async function y() {
295
- g(!0);
296
+ f(!0);
296
297
  const N = await _t(
297
- b.apiServiceUrl,
298
+ g.apiServiceUrl,
298
299
  s,
299
300
  d,
300
- m,
301
- h == null ? void 0 : h.accessToken
301
+ h,
302
+ p == null ? void 0 : p.accessToken
302
303
  );
303
- N && (c([...l || [], N]), u(N.id), i(!1)), g(!1);
304
+ N && (i([...l || [], N]), u(N.id), c(!1)), f(!1);
304
305
  }
305
- return /* @__PURE__ */ a(We, { open: v, onOpenChange: i, children: [
306
+ return /* @__PURE__ */ a(We, { open: b, onOpenChange: c, children: [
306
307
  /* @__PURE__ */ e(Sa, { asChild: !0, children: /* @__PURE__ */ a(
307
308
  L,
308
309
  {
@@ -321,13 +322,13 @@ function Gt() {
321
322
  /* @__PURE__ */ e(Ds, { children: "Lenses are private by default and are only visible to you." })
322
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(Ge, { className: "text-right", children: "Name" }),
325
+ /* @__PURE__ */ e(Ue, { className: "text-right", children: "Name" }),
325
326
  /* @__PURE__ */ e(
326
327
  oe,
327
328
  {
328
329
  value: s,
329
330
  onChange: (N) => {
330
- o(N.target.value);
331
+ n(N.target.value);
331
332
  },
332
333
  id: "name",
333
334
  className: "col-span-7 focus-visible:ring-0 focus-visible:ring-ring focus-visible:ring-offset-0"
@@ -342,48 +343,48 @@ function Gt() {
342
343
  variant: "outline",
343
344
  type: "submit",
344
345
  onClick: y,
345
- disabled: p,
346
- children: p ? "Creating..." : "Add"
346
+ disabled: m,
347
+ children: m ? "Creating..." : "Add"
347
348
  }
348
349
  ) })
349
350
  ] })
350
351
  ] });
351
352
  }
352
353
  function Rt() {
353
- const [s, o] = S(!1), t = w((d) => d.lenses), r = w((d) => d.selectedLensId), { setLenses: l, setSelectedLensId: c } = xs(), { authToken: u, tokenProps: p } = P();
354
- async function g(d) {
355
- c(d);
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 } = G();
355
+ async function f(d) {
356
+ i(d);
356
357
  }
357
- async function v(d) {
358
- if (await Ut(p.apiServiceUrl, d, u == null ? void 0 : u.accessToken)) {
359
- const h = t == null ? void 0 : t.filter((b) => b.id !== d);
360
- l(h || []), c("original");
358
+ async function b(d) {
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);
361
+ l(p || []), i("original");
361
362
  }
362
363
  }
363
- async function i(d) {
364
- const m = t == null ? void 0 : t.map((y) => y.id === d.id ? {
364
+ async function c(d) {
365
+ const h = t == null ? void 0 : t.map((y) => y.id === d.id ? {
365
366
  ...y,
366
367
  isDefault: !d.isDefault
367
368
  } : {
368
369
  ...y,
369
370
  isDefault: !1
370
371
  });
371
- l(m || []);
372
- const h = {
372
+ l(h || []);
373
+ const p = {
373
374
  ...d,
374
375
  isDefault: !d.isDefault
375
376
  };
376
- await ze(p.apiServiceUrl, h, u == null ? void 0 : u.accessToken);
377
- const b = t == null ? void 0 : t.find((y) => y.isDefault);
378
- if (b && b.id !== d.id) {
377
+ await $e(m.apiServiceUrl, p, u == null ? void 0 : u.accessToken);
378
+ const g = t == null ? void 0 : t.find((y) => y.isDefault);
379
+ if (g && g.id !== d.id) {
379
380
  const y = {
380
- ...b,
381
+ ...g,
381
382
  isDefault: !1
382
383
  };
383
- await ze(p.apiServiceUrl, y, u == null ? void 0 : u.accessToken);
384
+ await $e(m.apiServiceUrl, y, u == null ? void 0 : u.accessToken);
384
385
  }
385
386
  }
386
- return /* @__PURE__ */ a($e, { open: s, onOpenChange: o, children: [
387
+ return /* @__PURE__ */ a(ze, { open: s, onOpenChange: n, children: [
387
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" }) }) }),
388
389
  /* @__PURE__ */ a(Ke, { align: "end", className: "w-60", children: [
389
390
  /* @__PURE__ */ e(xa, { className: "px-3", children: "Lenses" }),
@@ -392,7 +393,7 @@ function Rt() {
392
393
  Ca,
393
394
  {
394
395
  value: r,
395
- onValueChange: g,
396
+ onValueChange: f,
396
397
  children: [
397
398
  /* @__PURE__ */ e(vs, { value: "original", children: "Original" }),
398
399
  t == null ? void 0 : t.map((d) => /* @__PURE__ */ a(
@@ -406,8 +407,8 @@ function Rt() {
406
407
  /* @__PURE__ */ e(
407
408
  Cs,
408
409
  {
409
- onClick: (m) => {
410
- m.preventDefault(), i(d);
410
+ onClick: (h) => {
411
+ h.preventDefault(), c(d);
411
412
  },
412
413
  className: X(
413
414
  "size-3.5 text-muted-foreground hover:cursor-pointer hover:text-foreground group-hover:visible",
@@ -422,8 +423,8 @@ function Rt() {
422
423
  /* @__PURE__ */ e(
423
424
  Ls,
424
425
  {
425
- onClick: (m) => {
426
- m.preventDefault(), v(d.id);
426
+ onClick: (h) => {
427
+ h.preventDefault(), b(d.id);
427
428
  },
428
429
  className: "invisible size-3.5 text-muted-foreground hover:cursor-pointer hover:text-foreground group-hover:visible",
429
430
  strokeWidth: 1.5
@@ -440,98 +441,98 @@ function Rt() {
440
441
  ] })
441
442
  ] });
442
443
  }
443
- const Pt = async (s, o, t) => {
444
+ const Gt = async (s, n, t) => {
444
445
  const r = `${s}/management/v1/groups`;
445
- return await Es(r, o, t);
446
- }, Ft = async (s, o, t) => {
446
+ return await Es(r, n, t);
447
+ }, Ft = async (s, n, t) => {
447
448
  const r = `${s}/management/v1/groups/${t}`, l = await fetch(r, {
448
449
  method: "DELETE",
449
450
  headers: {
450
- Authorization: `Bearer ${o}`
451
+ Authorization: `Bearer ${n}`
451
452
  }
452
453
  });
453
454
  if (!l.ok) {
454
- const c = await l.text();
455
- throw new Error(c || "Failed to delete group");
455
+ const i = await l.text();
456
+ throw new Error(i || "Failed to delete group");
456
457
  }
457
- }, jt = async (s, o, t, r) => {
458
+ }, jt = async (s, n, t, r) => {
458
459
  const l = `${s}/management/v1/groups/${t}/members`;
459
- return await Es(l, o, r);
460
- }, Ht = async (s, o, t, r) => {
461
- const l = `${s}/management/v1/groups/${t}/members`, c = await fetch(l, {
460
+ return await Es(l, n, r);
461
+ }, Ht = async (s, n, t, r) => {
462
+ const l = `${s}/management/v1/groups/${t}/members`, i = await fetch(l, {
462
463
  method: "DELETE",
463
464
  headers: {
464
465
  "Content-Type": "application/json",
465
- Authorization: `Bearer ${o}`
466
+ Authorization: `Bearer ${n}`
466
467
  },
467
468
  body: JSON.stringify(r)
468
469
  });
469
- if (!c.ok) {
470
- const u = await c.text();
470
+ if (!i.ok) {
471
+ const u = await i.text();
471
472
  throw new Error(u || "Failed to remove group members");
472
473
  }
473
474
  };
474
475
  function qt() {
475
- const { authToken: s, tokenProps: o } = P(), t = be();
476
+ const { authToken: s, tokenProps: n } = G(), t = be();
476
477
  return ye({
477
- mutationFn: (r) => Pt(o.apiServiceUrl, (s == null ? void 0 : s.accessToken) || "", r),
478
+ mutationFn: (r) => Gt(n.apiServiceUrl, (s == null ? void 0 : s.accessToken) || "", r),
478
479
  onSuccess: () => {
479
- t.invalidateQueries({ queryKey: ["groups"] }), E.success("Group created successfully");
480
+ t.invalidateQueries({ queryKey: ["groups"] }), A.success("Group created successfully");
480
481
  },
481
482
  onError: (r) => {
482
- console.error("Failed to create group:", r), E.error("Failed to create group", {
483
+ console.error("Failed to create group:", r), A.error("Failed to create group", {
483
484
  description: r.message
484
485
  });
485
486
  }
486
487
  });
487
488
  }
488
489
  function Vt() {
489
- const { authToken: s, tokenProps: o } = P(), t = be();
490
+ const { authToken: s, tokenProps: n } = G(), t = be();
490
491
  return ye({
491
- mutationFn: (r) => Ft(o.apiServiceUrl, (s == null ? void 0 : s.accessToken) || "", r),
492
+ mutationFn: (r) => Ft(n.apiServiceUrl, (s == null ? void 0 : s.accessToken) || "", r),
492
493
  onSuccess: (r, l) => {
493
- t.invalidateQueries({ queryKey: ["groups"] }), t.removeQueries({ queryKey: ["group", l] }), E.success("Group deleted successfully");
494
+ t.invalidateQueries({ queryKey: ["groups"] }), t.removeQueries({ queryKey: ["group", l] }), A.success("Group deleted successfully");
494
495
  },
495
496
  onError: (r) => {
496
- console.error("Failed to delete group:", r), E.error("Failed to delete group", {
497
+ console.error("Failed to delete group:", r), A.error("Failed to delete group", {
497
498
  description: r.message
498
499
  });
499
500
  }
500
501
  });
501
502
  }
502
- function zt() {
503
- const { authToken: s, tokenProps: o } = P(), t = be();
503
+ function $t() {
504
+ const { authToken: s, tokenProps: n } = G(), t = be();
504
505
  return ye({
505
506
  mutationFn: ({
506
507
  groupId: r,
507
508
  data: l
508
- }) => jt(o.apiServiceUrl, (s == null ? void 0 : s.accessToken) || "", r, l),
509
+ }) => jt(n.apiServiceUrl, (s == null ? void 0 : s.accessToken) || "", r, l),
509
510
  onSuccess: (r, l) => {
510
511
  t.invalidateQueries({ queryKey: ["group", l.groupId] }), t.invalidateQueries({
511
512
  queryKey: ["group-members", l.groupId]
512
- }), t.invalidateQueries({ queryKey: ["groups"] }), E.success("Members added successfully");
513
+ }), t.invalidateQueries({ queryKey: ["groups"] }), A.success("Members added successfully");
513
514
  },
514
515
  onError: (r) => {
515
- console.error("Failed to add group members:", r), E.error("Failed to add members", {
516
+ console.error("Failed to add group members:", r), A.error("Failed to add members", {
516
517
  description: r.message
517
518
  });
518
519
  }
519
520
  });
520
521
  }
521
- function $t() {
522
- const { authToken: s, tokenProps: o } = P(), t = be();
522
+ function zt() {
523
+ const { authToken: s, tokenProps: n } = G(), t = be();
523
524
  return ye({
524
525
  mutationFn: ({
525
526
  groupId: r,
526
527
  data: l
527
- }) => Ht(o.apiServiceUrl, (s == null ? void 0 : s.accessToken) || "", r, l),
528
+ }) => Ht(n.apiServiceUrl, (s == null ? void 0 : s.accessToken) || "", r, l),
528
529
  onSuccess: (r, l) => {
529
530
  t.invalidateQueries({ queryKey: ["group", l.groupId] }), t.invalidateQueries({
530
531
  queryKey: ["group-members", l.groupId]
531
- }), t.invalidateQueries({ queryKey: ["groups"] }), E.success("Members removed successfully");
532
+ }), t.invalidateQueries({ queryKey: ["groups"] }), A.success("Members removed successfully");
532
533
  },
533
534
  onError: (r) => {
534
- console.error("Failed to remove group members:", r), E.error("Failed to remove members", {
535
+ console.error("Failed to remove group members:", r), A.error("Failed to remove members", {
535
536
  description: r.message
536
537
  });
537
538
  }
@@ -539,30 +540,30 @@ function $t() {
539
540
  }
540
541
  function Bt({
541
542
  onSuccess: s,
542
- tenantId: o,
543
+ tenantId: n,
543
544
  isTenantUser: t
544
545
  }) {
545
- const [r, l] = S(""), [c, u] = S(""), [p, g] = S({}), v = qt(), i = () => {
546
- const m = {};
547
- return r.trim() ? r.length < 3 ? m.name = "Group name must be at least 3 characters" : r.length > 50 && (m.name = "Group name must be less than 50 characters") : m.name = "Group name is required", c && c.length > 200 && (m.description = "Description must be less than 200 characters"), g(m), Object.keys(m).length === 0;
546
+ const [r, l] = S(""), [i, u] = S(""), [m, f] = S({}), b = qt(), c = () => {
547
+ const h = {};
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;
548
549
  };
549
- return /* @__PURE__ */ a("form", { onSubmit: async (m) => {
550
- if (m.preventDefault(), !i()) return;
551
- const h = {
550
+ return /* @__PURE__ */ a("form", { onSubmit: async (h) => {
551
+ if (h.preventDefault(), !c()) return;
552
+ const p = {
552
553
  name: r.trim(),
553
- description: c.trim() || void 0,
554
+ description: i.trim() || void 0,
554
555
  type: t ? "TENANT_GROUP" : "ORG_GROUP",
555
- ...t && o ? { tenantId: o } : {}
556
+ ...t && n ? { tenantId: n } : {}
556
557
  };
557
558
  try {
558
- await v.mutateAsync(h), l(""), u(""), g({}), s();
559
- } catch (b) {
560
- console.error("Failed to create group:", b);
559
+ await b.mutateAsync(p), l(""), u(""), f({}), s();
560
+ } catch (g) {
561
+ console.error("Failed to create group:", g);
561
562
  }
562
563
  }, className: "space-y-6", children: [
563
564
  /* @__PURE__ */ a("div", { className: "space-y-4", children: [
564
565
  /* @__PURE__ */ a("div", { className: "space-y-2", children: [
565
- /* @__PURE__ */ a(Ge, { htmlFor: "group-name", children: [
566
+ /* @__PURE__ */ a(Ue, { htmlFor: "group-name", children: [
566
567
  "Group Name ",
567
568
  /* @__PURE__ */ e("span", { className: "text-destructive", children: "*" })
568
569
  ] }),
@@ -572,17 +573,17 @@ function Bt({
572
573
  id: "group-name",
573
574
  placeholder: "e.g., Marketing Team, Engineering Squad",
574
575
  value: r,
575
- onChange: (m) => {
576
- l(m.target.value), p.name && g((h) => ({ ...h, name: "" }));
576
+ onChange: (h) => {
577
+ l(h.target.value), m.name && f((p) => ({ ...p, name: "" }));
577
578
  },
578
- className: p.name ? "border-destructive" : "",
579
- disabled: v.isPending
579
+ className: m.name ? "border-destructive" : "",
580
+ disabled: b.isPending
580
581
  }
581
582
  ),
582
- p.name && /* @__PURE__ */ e("p", { className: "text-sm text-destructive", children: p.name })
583
+ m.name && /* @__PURE__ */ e("p", { className: "text-sm text-destructive", children: m.name })
583
584
  ] }),
584
585
  /* @__PURE__ */ a("div", { className: "space-y-2", children: [
585
- /* @__PURE__ */ a(Ge, { htmlFor: "group-description", children: [
586
+ /* @__PURE__ */ a(Ue, { htmlFor: "group-description", children: [
586
587
  "Description",
587
588
  /* @__PURE__ */ e("span", { className: "ml-2 text-xs text-muted-foreground", children: "(optional)" })
588
589
  ] }),
@@ -591,18 +592,18 @@ function Bt({
591
592
  {
592
593
  id: "group-description",
593
594
  placeholder: "Describe the purpose of this group...",
594
- value: c,
595
- onChange: (m) => {
596
- u(m.target.value), p.description && g((h) => ({ ...h, description: "" }));
595
+ value: i,
596
+ onChange: (h) => {
597
+ u(h.target.value), m.description && f((p) => ({ ...p, description: "" }));
597
598
  },
598
- className: p.description ? "border-destructive" : "",
599
- disabled: v.isPending,
599
+ className: m.description ? "border-destructive" : "",
600
+ disabled: b.isPending,
600
601
  rows: 3
601
602
  }
602
603
  ),
603
- p.description && /* @__PURE__ */ e("p", { className: "text-sm text-destructive", children: p.description }),
604
+ m.description && /* @__PURE__ */ e("p", { className: "text-sm text-destructive", children: m.description }),
604
605
  /* @__PURE__ */ a("p", { className: "text-xs text-muted-foreground", children: [
605
- c.length,
606
+ i.length,
606
607
  "/200 characters"
607
608
  ] })
608
609
  ] }),
@@ -618,9 +619,9 @@ function Bt({
618
619
  type: "button",
619
620
  variant: "outline",
620
621
  onClick: () => {
621
- l(""), u(""), g({});
622
+ l(""), u(""), f({});
622
623
  },
623
- disabled: v.isPending,
624
+ disabled: b.isPending,
624
625
  children: "Clear"
625
626
  }
626
627
  ),
@@ -628,11 +629,11 @@ function Bt({
628
629
  L,
629
630
  {
630
631
  type: "submit",
631
- disabled: v.isPending || !r.trim(),
632
- children: v.isPending ? /* @__PURE__ */ a(k, { children: [
632
+ disabled: b.isPending || !r.trim(),
633
+ children: b.isPending ? /* @__PURE__ */ a(M, { children: [
633
634
  /* @__PURE__ */ e(q, { className: "mr-2 h-4 w-4 animate-spin" }),
634
635
  "Creating..."
635
- ] }) : /* @__PURE__ */ a(k, { children: [
636
+ ] }) : /* @__PURE__ */ a(M, { children: [
636
637
  /* @__PURE__ */ e(V, { className: "mr-2 h-4 w-4" }),
637
638
  "Create Group"
638
639
  ] })
@@ -641,78 +642,155 @@ function Bt({
641
642
  ] })
642
643
  ] });
643
644
  }
644
- function Kt() {
645
+ function Kt(s, n = []) {
646
+ let t = [];
647
+ function r(i, u) {
648
+ const m = E.createContext(u);
649
+ m.displayName = i + "Context";
650
+ const f = t.length;
651
+ t = [...t, u];
652
+ const b = (d) => {
653
+ var k;
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));
655
+ return /* @__PURE__ */ e(y.Provider, { value: N, children: p });
656
+ };
657
+ b.displayName = i + "Provider";
658
+ function c(d, h) {
659
+ var y;
660
+ const p = ((y = h == null ? void 0 : h[s]) == null ? void 0 : y[f]) || m, g = E.useContext(p);
661
+ if (g) return g;
662
+ if (u !== void 0) return u;
663
+ throw new Error(`\`${d}\` must be used within \`${i}\``);
664
+ }
665
+ return [b, c];
666
+ }
667
+ const l = () => {
668
+ const i = t.map((u) => E.createContext(u));
669
+ return function(m) {
670
+ const f = (m == null ? void 0 : m[s]) || i;
671
+ return E.useMemo(
672
+ () => ({ [`__scope${s}`]: { ...m, [s]: f } }),
673
+ [m, f]
674
+ );
675
+ };
676
+ };
677
+ return l.scopeName = s, [r, Qt(l, ...n)];
678
+ }
679
+ function Qt(...s) {
680
+ const n = s[0];
681
+ if (s.length === 1) return n;
682
+ const t = () => {
683
+ const r = s.map((l) => ({
684
+ useScope: l(),
685
+ scopeName: l.scopeName
686
+ }));
687
+ return function(i) {
688
+ const u = r.reduce((m, { useScope: f, scopeName: b }) => {
689
+ const d = f(i)[`__scope${b}`];
690
+ return { ...m, ...d };
691
+ }, {});
692
+ return E.useMemo(() => ({ [`__scope${n.scopeName}`]: u }), [u]);
693
+ };
694
+ };
695
+ return t.scopeName = n.scopeName, t;
696
+ }
697
+ var Wt = [
698
+ "a",
699
+ "button",
700
+ "div",
701
+ "form",
702
+ "h2",
703
+ "h3",
704
+ "img",
705
+ "input",
706
+ "label",
707
+ "li",
708
+ "nav",
709
+ "ol",
710
+ "p",
711
+ "select",
712
+ "span",
713
+ "svg",
714
+ "ul"
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;
718
+ return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ e(f, { ...m, ref: i });
719
+ });
720
+ return r.displayName = `Primitive.${n}`, { ...s, [n]: r };
721
+ }, {});
722
+ function Jt() {
645
723
  return It.useSyncExternalStore(
646
- Qt,
724
+ Xt,
647
725
  () => !0,
648
726
  () => !1
649
727
  );
650
728
  }
651
- function Qt() {
729
+ function Xt() {
652
730
  return () => {
653
731
  };
654
732
  }
655
- var ss = "Avatar", [Wt] = Aa(ss), [Jt, Hs] = Wt(ss), qs = _.forwardRef(
656
- (s, o) => {
657
- const { __scopeAvatar: t, ...r } = s, [l, c] = _.useState("idle");
733
+ var ss = "Avatar", [Zt] = Kt(ss), [Yt, Hs] = Zt(ss), qs = E.forwardRef(
734
+ (s, n) => {
735
+ const { __scopeAvatar: t, ...r } = s, [l, i] = E.useState("idle");
658
736
  return /* @__PURE__ */ e(
659
- Jt,
737
+ Yt,
660
738
  {
661
739
  scope: t,
662
740
  imageLoadingStatus: l,
663
- onImageLoadingStatusChange: c,
664
- children: /* @__PURE__ */ e(es.span, { ...r, ref: o })
741
+ onImageLoadingStatusChange: i,
742
+ children: /* @__PURE__ */ e(es.span, { ...r, ref: n })
665
743
  }
666
744
  );
667
745
  }
668
746
  );
669
747
  qs.displayName = ss;
670
- var Vs = "AvatarImage", zs = _.forwardRef(
671
- (s, o) => {
748
+ var Vs = "AvatarImage", $s = E.forwardRef(
749
+ (s, n) => {
672
750
  const { __scopeAvatar: t, src: r, onLoadingStatusChange: l = () => {
673
- }, ...c } = s, u = Hs(Vs, t), p = Xt(r, c), g = ka((v) => {
674
- l(v), u.onImageLoadingStatusChange(v);
751
+ }, ...i } = s, u = Hs(Vs, t), m = en(r, i), f = Aa((b) => {
752
+ l(b), u.onImageLoadingStatusChange(b);
675
753
  });
676
754
  return Re(() => {
677
- p !== "idle" && g(p);
678
- }, [p, g]), p === "loaded" ? /* @__PURE__ */ e(es.img, { ...c, ref: o, src: r }) : null;
755
+ m !== "idle" && f(m);
756
+ }, [m, f]), m === "loaded" ? /* @__PURE__ */ e(es.img, { ...i, ref: n, src: r }) : null;
679
757
  }
680
758
  );
681
- zs.displayName = Vs;
682
- var $s = "AvatarFallback", Bs = _.forwardRef(
683
- (s, o) => {
684
- const { __scopeAvatar: t, delayMs: r, ...l } = s, c = Hs($s, t), [u, p] = _.useState(r === void 0);
685
- return _.useEffect(() => {
759
+ $s.displayName = Vs;
760
+ var zs = "AvatarFallback", Bs = E.forwardRef(
761
+ (s, n) => {
762
+ const { __scopeAvatar: t, delayMs: r, ...l } = s, i = Hs(zs, t), [u, m] = E.useState(r === void 0);
763
+ return E.useEffect(() => {
686
764
  if (r !== void 0) {
687
- const g = window.setTimeout(() => p(!0), r);
688
- return () => window.clearTimeout(g);
765
+ const f = window.setTimeout(() => m(!0), r);
766
+ return () => window.clearTimeout(f);
689
767
  }
690
- }, [r]), u && c.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ e(es.span, { ...l, ref: o }) : null;
768
+ }, [r]), u && i.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ e(es.span, { ...l, ref: n }) : null;
691
769
  }
692
770
  );
693
- Bs.displayName = $s;
694
- function ws(s, o) {
695
- return s ? o ? (s.src !== o && (s.src = o), s.complete && s.naturalWidth > 0 ? "loaded" : "loading") : "error" : "idle";
771
+ Bs.displayName = zs;
772
+ function ws(s, n) {
773
+ return s ? n ? (s.src !== n && (s.src = n), s.complete && s.naturalWidth > 0 ? "loaded" : "loading") : "error" : "idle";
696
774
  }
697
- function Xt(s, { referrerPolicy: o, crossOrigin: t }) {
698
- const r = Kt(), l = _.useRef(null), c = r ? (l.current || (l.current = new window.Image()), l.current) : null, [u, p] = _.useState(
699
- () => ws(c, s)
775
+ function en(s, { referrerPolicy: n, crossOrigin: t }) {
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
+ () => ws(i, s)
700
778
  );
701
779
  return Re(() => {
702
- p(ws(c, s));
703
- }, [c, s]), Re(() => {
704
- const g = (d) => () => {
705
- p(d);
780
+ m(ws(i, s));
781
+ }, [i, s]), Re(() => {
782
+ const f = (d) => () => {
783
+ m(d);
706
784
  };
707
- if (!c) return;
708
- const v = g("loaded"), i = g("error");
709
- return c.addEventListener("load", v), c.addEventListener("error", i), o && (c.referrerPolicy = o), typeof t == "string" && (c.crossOrigin = t), () => {
710
- c.removeEventListener("load", v), c.removeEventListener("error", i);
785
+ if (!i) return;
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), () => {
788
+ i.removeEventListener("load", b), i.removeEventListener("error", c);
711
789
  };
712
- }, [c, t, o]), u;
790
+ }, [i, t, n]), u;
713
791
  }
714
- var Ks = qs, Qs = zs, Ws = Bs;
715
- const as = _.forwardRef(({ className: s, ...o }, t) => /* @__PURE__ */ e(
792
+ var Ks = qs, Qs = $s, Ws = Bs;
793
+ const as = E.forwardRef(({ className: s, ...n }, t) => /* @__PURE__ */ e(
716
794
  Ks,
717
795
  {
718
796
  ref: t,
@@ -720,20 +798,20 @@ const as = _.forwardRef(({ className: s, ...o }, t) => /* @__PURE__ */ e(
720
798
  "relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
721
799
  s
722
800
  ),
723
- ...o
801
+ ...n
724
802
  }
725
803
  ));
726
804
  as.displayName = Ks.displayName;
727
- const Zt = _.forwardRef(({ className: s, ...o }, t) => /* @__PURE__ */ e(
805
+ const sn = E.forwardRef(({ className: s, ...n }, t) => /* @__PURE__ */ e(
728
806
  Qs,
729
807
  {
730
808
  ref: t,
731
809
  className: X("aspect-square h-full w-full", s),
732
- ...o
810
+ ...n
733
811
  }
734
812
  ));
735
- Zt.displayName = Qs.displayName;
736
- const ts = _.forwardRef(({ className: s, ...o }, t) => /* @__PURE__ */ e(
813
+ sn.displayName = Qs.displayName;
814
+ const ts = E.forwardRef(({ className: s, ...n }, t) => /* @__PURE__ */ e(
737
815
  Ws,
738
816
  {
739
817
  ref: t,
@@ -741,80 +819,80 @@ const ts = _.forwardRef(({ className: s, ...o }, t) => /* @__PURE__ */ e(
741
819
  "flex h-full w-full items-center justify-center rounded-full bg-muted",
742
820
  s
743
821
  ),
744
- ...o
822
+ ...n
745
823
  }
746
824
  ));
747
825
  ts.displayName = Ws.displayName;
748
- function Yt({
826
+ function an({
749
827
  open: s,
750
- onOpenChange: o,
828
+ onOpenChange: n,
751
829
  group: t,
752
830
  onUpdate: r
753
831
  }) {
754
- const [l, c] = S("members"), [u, p] = S(""), [g, v] = S([]), [i, d] = S([]), { data: m, isLoading: h, refetch: b } = Ma(t.id), y = t.type === "TENANT_GROUP" ? "tenant" : "organization", { users: N, isLoading: A } = Oa({
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({
755
833
  type: y,
756
834
  tenantId: t.tenantId || void 0,
757
835
  active: !0,
758
836
  limit: 100
759
- }), I = zt(), U = $t(), M = (m == null ? void 0 : m.members) || [], z = fe(() => new Set(M.map((f) => f.userId)), [M]), R = fe(() => N.filter((f) => !z.has(f.id)), [N, z]), $ = fe(() => {
837
+ }), T = $t(), P = zt(), O = (h == null ? void 0 : h.members) || [], $ = fe(() => new Set(O.map((v) => v.userId)), [O]), R = fe(() => N.filter((v) => !$.has(v.id)), [N, $]), z = fe(() => {
760
838
  if (!u) return R;
761
- const f = u.toLowerCase();
839
+ const v = u.toLowerCase();
762
840
  return R.filter(
763
841
  (C) => {
764
- var T, F;
765
- return ((T = C.name) == null ? void 0 : T.toLowerCase().includes(f)) || ((F = C.email) == null ? void 0 : F.toLowerCase().includes(f));
842
+ var _, F;
843
+ return ((_ = C.name) == null ? void 0 : _.toLowerCase().includes(v)) || ((F = C.email) == null ? void 0 : F.toLowerCase().includes(v));
766
844
  }
767
845
  );
768
846
  }, [R, u]), x = fe(() => {
769
- if (!u) return M;
770
- const f = u.toLowerCase();
771
- return M.filter(
847
+ if (!u) return O;
848
+ const v = u.toLowerCase();
849
+ return O.filter(
772
850
  (C) => {
773
- var T, F, ie, D;
774
- return ((F = (T = C.user) == null ? void 0 : T.name) == null ? void 0 : F.toLowerCase().includes(f)) || ((D = (ie = C.user) == null ? void 0 : ie.email) == null ? void 0 : D.toLowerCase().includes(f));
851
+ var _, F, ie, D;
852
+ return ((F = (_ = C.user) == null ? void 0 : _.name) == null ? void 0 : F.toLowerCase().includes(v)) || ((D = (ie = C.user) == null ? void 0 : ie.email) == null ? void 0 : D.toLowerCase().includes(v));
775
853
  }
776
854
  );
777
- }, [M, u]), B = async () => {
778
- if (g.length !== 0)
855
+ }, [O, u]), B = async () => {
856
+ if (f.length !== 0)
779
857
  try {
780
- await I.mutateAsync({
858
+ await T.mutateAsync({
781
859
  groupId: t.id,
782
860
  data: {
783
- userIds: g,
861
+ userIds: f,
784
862
  userType: y === "tenant" ? "tenant" : "org"
785
863
  }
786
- }), v([]), c("members"), b(), r == null || r();
787
- } catch (f) {
788
- console.error("Failed to add members:", f);
864
+ }), b([]), i("members"), g(), r == null || r();
865
+ } catch (v) {
866
+ console.error("Failed to add members:", v);
789
867
  }
790
868
  }, K = async () => {
791
- if (i.length !== 0)
869
+ if (c.length !== 0)
792
870
  try {
793
- await U.mutateAsync({
871
+ await P.mutateAsync({
794
872
  groupId: t.id,
795
873
  data: {
796
- userIds: i
874
+ userIds: c
797
875
  }
798
- }), d([]), b(), r == null || r();
799
- } catch (f) {
800
- console.error("Failed to remove members:", f);
876
+ }), d([]), g(), r == null || r();
877
+ } catch (v) {
878
+ console.error("Failed to remove members:", v);
801
879
  }
802
- }, Q = (f) => {
803
- v(
804
- (C) => C.includes(f) ? C.filter((T) => T !== f) : [...C, f]
880
+ }, Q = (v) => {
881
+ b(
882
+ (C) => C.includes(v) ? C.filter((_) => _ !== v) : [...C, v]
805
883
  );
806
- }, W = (f) => {
884
+ }, W = (v) => {
807
885
  d(
808
- (C) => C.includes(f) ? C.filter((T) => T !== f) : [...C, f]
886
+ (C) => C.includes(v) ? C.filter((_) => _ !== v) : [...C, v]
809
887
  );
810
888
  };
811
- return /* @__PURE__ */ e(k, { children: /* @__PURE__ */ e(We, { open: s, onOpenChange: o, children: /* @__PURE__ */ a(Xe, { className: "max-w-3xl max-h-[80vh]", "aria-describedby": "group-members-description", children: [
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: [
812
890
  /* @__PURE__ */ a(Ze, { children: [
813
891
  /* @__PURE__ */ e(Ye, { children: t.name }),
814
892
  /* @__PURE__ */ e("div", { className: "flex items-center gap-2 mt-1", children: /* @__PURE__ */ a("p", { className: "text-sm text-muted-foreground", children: [
815
- M.length,
893
+ O.length,
816
894
  " ",
817
- M.length === 1 ? "member" : "members"
895
+ O.length === 1 ? "member" : "members"
818
896
  ] }) }),
819
897
  /* @__PURE__ */ a("p", { id: "group-members-description", className: "sr-only", children: [
820
898
  "Add or remove members from the ",
@@ -822,44 +900,44 @@ function Yt({
822
900
  " group"
823
901
  ] })
824
902
  ] }),
825
- /* @__PURE__ */ a(As, { value: l, onValueChange: (f) => {
826
- c(f), p(""), d([]);
903
+ /* @__PURE__ */ a(ks, { value: l, onValueChange: (v) => {
904
+ i(v), m(""), d([]);
827
905
  }, className: "mt-4", children: [
828
- /* @__PURE__ */ a(ks, { className: "grid w-full grid-cols-2", children: [
906
+ /* @__PURE__ */ a(As, { className: "grid w-full grid-cols-2", children: [
829
907
  /* @__PURE__ */ e(ge, { value: "members", children: "Current Members" }),
830
908
  /* @__PURE__ */ e(ge, { value: "add", children: "Add Members" })
831
909
  ] }),
832
910
  /* @__PURE__ */ a(ve, { value: "members", className: "mt-4 space-y-4", children: [
833
911
  /* @__PURE__ */ a("div", { className: "relative", children: [
834
- /* @__PURE__ */ e(Pe, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }),
912
+ /* @__PURE__ */ e(Ge, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }),
835
913
  /* @__PURE__ */ e(
836
914
  oe,
837
915
  {
838
916
  placeholder: "Search members...",
839
917
  value: u,
840
- onChange: (f) => p(f.target.value),
918
+ onChange: (v) => m(v.target.value),
841
919
  className: "pl-10"
842
920
  }
843
921
  )
844
922
  ] }),
845
- /* @__PURE__ */ e(Fe, { className: i.length > 0 ? "h-[300px]" : "h-[350px]", children: h ? /* @__PURE__ */ e("div", { className: "space-y-2", children: [1, 2, 3].map((f) => /* @__PURE__ */ e(je, { className: "h-16 w-full" }, f)) }) : x.length === 0 ? /* @__PURE__ */ a("div", { className: "flex flex-col items-center justify-center py-12 text-muted-foreground", children: [
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: [
846
924
  /* @__PURE__ */ e(V, { className: "h-12 w-12 mb-3 opacity-50" }),
847
925
  /* @__PURE__ */ e("p", { className: "text-sm font-medium", children: u ? "No members found" : "No members yet" }),
848
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' })
849
- ] }) : /* @__PURE__ */ e("div", { className: "space-y-2", children: x.map((f) => /* @__PURE__ */ e(
850
- er,
927
+ ] }) : /* @__PURE__ */ e("div", { className: "space-y-2", children: x.map((v) => /* @__PURE__ */ e(
928
+ tn,
851
929
  {
852
- member: f,
853
- selected: i.includes(f.userId),
854
- onToggle: () => W(f.userId)
930
+ member: v,
931
+ selected: c.includes(v.userId),
932
+ onToggle: () => W(v.userId)
855
933
  },
856
- f.id
934
+ v.id
857
935
  )) }) }),
858
- i.length > 0 && /* @__PURE__ */ a("div", { className: "flex items-center justify-between pt-4 border-t", children: [
936
+ c.length > 0 && /* @__PURE__ */ a("div", { className: "flex items-center justify-between pt-4 border-t", children: [
859
937
  /* @__PURE__ */ a("span", { className: "text-sm text-muted-foreground", children: [
860
- i.length,
938
+ c.length,
861
939
  " member",
862
- i.length !== 1 ? "s" : "",
940
+ c.length !== 1 ? "s" : "",
863
941
  " selected"
864
942
  ] }),
865
943
  /* @__PURE__ */ e(
@@ -868,11 +946,11 @@ function Yt({
868
946
  variant: "destructive",
869
947
  size: "sm",
870
948
  onClick: K,
871
- disabled: U.isPending,
872
- children: U.isPending ? /* @__PURE__ */ a(k, { children: [
949
+ disabled: P.isPending,
950
+ children: P.isPending ? /* @__PURE__ */ a(M, { children: [
873
951
  /* @__PURE__ */ e(q, { className: "mr-2 h-4 w-4 animate-spin" }),
874
952
  "Removing..."
875
- ] }) : /* @__PURE__ */ a(k, { children: [
953
+ ] }) : /* @__PURE__ */ a(M, { children: [
876
954
  /* @__PURE__ */ e(Ms, { className: "mr-2 h-4 w-4" }),
877
955
  "Remove Selected"
878
956
  ] })
@@ -882,46 +960,46 @@ function Yt({
882
960
  ] }),
883
961
  /* @__PURE__ */ a(ve, { value: "add", className: "mt-4 space-y-4", children: [
884
962
  /* @__PURE__ */ a("div", { className: "relative", children: [
885
- /* @__PURE__ */ e(Pe, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }),
963
+ /* @__PURE__ */ e(Ge, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }),
886
964
  /* @__PURE__ */ e(
887
965
  oe,
888
966
  {
889
967
  placeholder: "Search users to add...",
890
968
  value: u,
891
- onChange: (f) => p(f.target.value),
969
+ onChange: (v) => m(v.target.value),
892
970
  className: "pl-10"
893
971
  }
894
972
  )
895
973
  ] }),
896
- /* @__PURE__ */ e(Fe, { className: "h-[300px]", children: A ? /* @__PURE__ */ e("div", { className: "space-y-2", children: [1, 2, 3].map((f) => /* @__PURE__ */ e(je, { className: "h-16 w-full" }, f)) }) : $.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)) }) : z.length === 0 ? /* @__PURE__ */ a("div", { className: "flex flex-col items-center justify-center py-12 text-muted-foreground", children: [
897
975
  /* @__PURE__ */ e(He, { className: "h-12 w-12 mb-3 opacity-50" }),
898
976
  /* @__PURE__ */ e("p", { className: "text-sm font-medium", children: "No available users" }),
899
977
  /* @__PURE__ */ e("p", { className: "text-xs mt-1", children: u ? "Try a different search" : "All eligible users are already members" })
900
- ] }) : /* @__PURE__ */ e("div", { className: "space-y-2", children: $.map((f) => /* @__PURE__ */ e(
901
- sr,
978
+ ] }) : /* @__PURE__ */ e("div", { className: "space-y-2", children: z.map((v) => /* @__PURE__ */ e(
979
+ nn,
902
980
  {
903
- user: f,
904
- selected: g.includes(f.id),
905
- onToggle: () => Q(f.id)
981
+ user: v,
982
+ selected: f.includes(v.id),
983
+ onToggle: () => Q(v.id)
906
984
  },
907
- f.id
985
+ v.id
908
986
  )) }) }),
909
- g.length > 0 && /* @__PURE__ */ a("div", { className: "flex items-center justify-between pt-4 border-t", children: [
987
+ f.length > 0 && /* @__PURE__ */ a("div", { className: "flex items-center justify-between pt-4 border-t", children: [
910
988
  /* @__PURE__ */ a("span", { className: "text-sm text-muted-foreground", children: [
911
- g.length,
989
+ f.length,
912
990
  " user",
913
- g.length !== 1 ? "s" : "",
991
+ f.length !== 1 ? "s" : "",
914
992
  " selected"
915
993
  ] }),
916
994
  /* @__PURE__ */ e(
917
995
  L,
918
996
  {
919
997
  onClick: B,
920
- disabled: I.isPending,
921
- children: I.isPending ? /* @__PURE__ */ a(k, { children: [
998
+ disabled: T.isPending,
999
+ children: T.isPending ? /* @__PURE__ */ a(M, { children: [
922
1000
  /* @__PURE__ */ e(q, { className: "mr-2 h-4 w-4 animate-spin" }),
923
1001
  "Adding..."
924
- ] }) : /* @__PURE__ */ a(k, { children: [
1002
+ ] }) : /* @__PURE__ */ a(M, { children: [
925
1003
  /* @__PURE__ */ e(He, { className: "mr-2 h-4 w-4" }),
926
1004
  "Add Members"
927
1005
  ] })
@@ -932,43 +1010,43 @@ function Yt({
932
1010
  ] })
933
1011
  ] }) }) });
934
1012
  }
935
- function er({
1013
+ function tn({
936
1014
  member: s,
937
- selected: o,
1015
+ selected: n,
938
1016
  onToggle: t
939
1017
  }) {
940
- var l, c, u, p;
941
- const r = ((c = (l = s.user) == null ? void 0 : l.name) == null ? void 0 : c.split(" ").map((g) => g[0]).join("").toUpperCase()) || "?";
1018
+ var l, i, u, m;
1019
+ const r = ((i = (l = s.user) == null ? void 0 : l.name) == null ? void 0 : i.split(" ").map((f) => f[0]).join("").toUpperCase()) || "?";
942
1020
  return /* @__PURE__ */ a(
943
1021
  "div",
944
1022
  {
945
1023
  className: "flex items-center gap-3 p-3 rounded-lg border bg-card hover:bg-muted/50 cursor-pointer",
946
1024
  onClick: t,
947
1025
  children: [
948
- /* @__PURE__ */ e(Os, { checked: o }),
1026
+ /* @__PURE__ */ e(Os, { checked: n }),
949
1027
  /* @__PURE__ */ e(as, { className: "h-8 w-8", children: /* @__PURE__ */ e(ts, { className: "text-xs", children: r }) }),
950
1028
  /* @__PURE__ */ a("div", { className: "flex-1", children: [
951
1029
  /* @__PURE__ */ e("p", { className: "text-sm font-medium", children: ((u = s.user) == null ? void 0 : u.name) || "Unknown User" }),
952
- /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: (p = s.user) == null ? void 0 : p.email })
1030
+ /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: (m = s.user) == null ? void 0 : m.email })
953
1031
  ] })
954
1032
  ]
955
1033
  }
956
1034
  );
957
1035
  }
958
- function sr({
1036
+ function nn({
959
1037
  user: s,
960
- selected: o,
1038
+ selected: n,
961
1039
  onToggle: t
962
1040
  }) {
963
1041
  var l;
964
- const r = ((l = s.name) == null ? void 0 : l.split(" ").map((c) => c[0]).join("").toUpperCase()) || "?";
1042
+ const r = ((l = s.name) == null ? void 0 : l.split(" ").map((i) => i[0]).join("").toUpperCase()) || "?";
965
1043
  return /* @__PURE__ */ a(
966
1044
  "div",
967
1045
  {
968
1046
  className: "flex items-center gap-3 p-3 rounded-lg border bg-card hover:bg-muted/50 cursor-pointer",
969
1047
  onClick: t,
970
1048
  children: [
971
- /* @__PURE__ */ e(Os, { checked: o }),
1049
+ /* @__PURE__ */ e(Os, { checked: n }),
972
1050
  /* @__PURE__ */ e(as, { className: "h-8 w-8", children: /* @__PURE__ */ e(ts, { className: "text-xs", children: r }) }),
973
1051
  /* @__PURE__ */ a("div", { className: "flex-1", children: [
974
1052
  /* @__PURE__ */ e("p", { className: "text-sm font-medium", children: s.name }),
@@ -978,33 +1056,33 @@ function sr({
978
1056
  }
979
1057
  );
980
1058
  }
981
- function ar({
1059
+ function rn({
982
1060
  open: s,
983
- onOpenChange: o
1061
+ onOpenChange: n
984
1062
  }) {
985
- const [t, r] = S("groups"), [l, c] = S(""), [u, p] = S(null), [g, v] = S(!1), [i, d] = S(null), { tokenProps: m } = P(), { currentUser: h } = Is(), b = Vt(), y = (h == null ? void 0 : h.type) === "tenant", N = m == null ? void 0 : m.tenantId, { groups: A, isLoading: I, refetch: U } = Ia({
1063
+ const [t, r] = S("groups"), [l, i] = S(""), [u, m] = S(null), [f, b] = S(!1), [c, d] = S(null), { tokenProps: h } = G(), { 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({
986
1064
  type: y ? "TENANT_GROUP" : "all",
987
1065
  tenantId: y ? N : void 0,
988
1066
  includeMembers: !1
989
- }), M = A.filter(
1067
+ }), O = k.filter(
990
1068
  (x) => {
991
1069
  var B;
992
1070
  return x.name.toLowerCase().includes(l.toLowerCase()) || ((B = x.description) == null ? void 0 : B.toLowerCase().includes(l.toLowerCase()));
993
1071
  }
994
- ), z = async () => {
995
- if (i)
1072
+ ), $ = async () => {
1073
+ if (c)
996
1074
  try {
997
- await b.mutateAsync(i.id), d(null), U();
1075
+ await g.mutateAsync(c.id), d(null), P();
998
1076
  } catch (x) {
999
1077
  console.error("Failed to delete group:", x);
1000
1078
  }
1001
1079
  }, R = (x) => {
1002
- p(x), v(!0);
1003
- }, $ = () => {
1004
- r("groups"), U();
1080
+ m(x), b(!0);
1081
+ }, z = () => {
1082
+ r("groups"), P();
1005
1083
  };
1006
- return /* @__PURE__ */ a(k, { children: [
1007
- /* @__PURE__ */ e(We, { open: s, onOpenChange: o, children: /* @__PURE__ */ a(Xe, { className: "max-w-4xl max-h-[80vh]", children: [
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: [
1008
1086
  /* @__PURE__ */ a(Ze, { children: [
1009
1087
  /* @__PURE__ */ a(Ye, { className: "flex items-center gap-2", children: [
1010
1088
  /* @__PURE__ */ e(V, { className: "h-5 w-5" }),
@@ -1012,8 +1090,8 @@ function ar({
1012
1090
  ] }),
1013
1091
  /* @__PURE__ */ e(Ds, { children: "Manage your groups, create new groups, and control group membership" })
1014
1092
  ] }),
1015
- /* @__PURE__ */ a(As, { value: t, onValueChange: r, className: "mt-4", children: [
1016
- /* @__PURE__ */ a(ks, { className: "grid w-full grid-cols-2", children: [
1093
+ /* @__PURE__ */ a(ks, { value: t, onValueChange: r, className: "mt-4", children: [
1094
+ /* @__PURE__ */ a(As, { className: "grid w-full grid-cols-2", children: [
1017
1095
  /* @__PURE__ */ a(ge, { value: "groups", className: "flex items-center gap-2", children: [
1018
1096
  /* @__PURE__ */ e(V, { className: "h-4 w-4" }),
1019
1097
  "Groups"
@@ -1025,28 +1103,28 @@ function ar({
1025
1103
  ] }),
1026
1104
  /* @__PURE__ */ e(ve, { value: "groups", className: "mt-4", children: /* @__PURE__ */ a("div", { className: "space-y-4", children: [
1027
1105
  /* @__PURE__ */ a("div", { className: "relative", children: [
1028
- /* @__PURE__ */ e(Pe, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }),
1106
+ /* @__PURE__ */ e(Ge, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }),
1029
1107
  /* @__PURE__ */ e(
1030
1108
  oe,
1031
1109
  {
1032
1110
  placeholder: "Search groups...",
1033
1111
  value: l,
1034
- onChange: (x) => c(x.target.value),
1112
+ onChange: (x) => i(x.target.value),
1035
1113
  className: "pl-10"
1036
1114
  }
1037
1115
  )
1038
1116
  ] }),
1039
- /* @__PURE__ */ e(Fe, { className: "h-[400px]", children: I ? /* @__PURE__ */ e("div", { className: "space-y-3", children: [1, 2, 3].map((x) => /* @__PURE__ */ e(je, { className: "h-24 w-full" }, x)) }) : M.length === 0 ? /* @__PURE__ */ a("div", { className: "flex flex-col items-center justify-center py-12 text-muted-foreground", children: [
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: [
1040
1118
  /* @__PURE__ */ e(V, { className: "h-12 w-12 mb-3 opacity-50" }),
1041
1119
  /* @__PURE__ */ e("p", { className: "text-sm font-medium", children: "No groups found" }),
1042
1120
  /* @__PURE__ */ e("p", { className: "text-xs mt-1", children: l ? "Try a different search" : "Create your first group to get started" })
1043
- ] }) : /* @__PURE__ */ e("div", { className: "space-y-3", children: M.map((x) => /* @__PURE__ */ e(
1044
- tr,
1121
+ ] }) : /* @__PURE__ */ e("div", { className: "space-y-3", children: O.map((x) => /* @__PURE__ */ e(
1122
+ on,
1045
1123
  {
1046
1124
  group: x,
1047
1125
  onManageMembers: () => R(x),
1048
1126
  onDelete: () => d(x),
1049
- currentUserId: h == null ? void 0 : h.id
1127
+ currentUserId: p == null ? void 0 : p.id
1050
1128
  },
1051
1129
  x.id
1052
1130
  )) }) })
@@ -1054,7 +1132,7 @@ function ar({
1054
1132
  /* @__PURE__ */ e(ve, { value: "create", className: "mt-4", children: /* @__PURE__ */ e(
1055
1133
  Bt,
1056
1134
  {
1057
- onSuccess: $,
1135
+ onSuccess: z,
1058
1136
  tenantId: N,
1059
1137
  isTenantUser: y
1060
1138
  }
@@ -1062,37 +1140,37 @@ function ar({
1062
1140
  ] })
1063
1141
  ] }) }),
1064
1142
  u && /* @__PURE__ */ e(
1065
- Yt,
1143
+ an,
1066
1144
  {
1067
- open: g,
1068
- onOpenChange: v,
1145
+ open: f,
1146
+ onOpenChange: b,
1069
1147
  group: u,
1070
- onUpdate: () => U()
1148
+ onUpdate: () => P()
1071
1149
  }
1072
1150
  ),
1073
1151
  /* @__PURE__ */ e(
1074
1152
  Ts,
1075
1153
  {
1076
- open: !!i,
1154
+ open: !!c,
1077
1155
  onOpenChange: () => d(null),
1078
1156
  children: /* @__PURE__ */ a(_s, { children: [
1079
- /* @__PURE__ */ a(Us, { children: [
1080
- /* @__PURE__ */ e(Gs, { children: "Delete Group" }),
1157
+ /* @__PURE__ */ a(Ps, { children: [
1158
+ /* @__PURE__ */ e(Us, { children: "Delete Group" }),
1081
1159
  /* @__PURE__ */ a(Rs, { children: [
1082
1160
  'Are you sure you want to delete "',
1083
- i == null ? void 0 : i.name,
1161
+ c == null ? void 0 : c.name,
1084
1162
  '"? This action cannot be undone and will remove all members from the group.'
1085
1163
  ] })
1086
1164
  ] }),
1087
- /* @__PURE__ */ a(Ps, { children: [
1165
+ /* @__PURE__ */ a(Gs, { children: [
1088
1166
  /* @__PURE__ */ e(Fs, { children: "Cancel" }),
1089
1167
  /* @__PURE__ */ e(
1090
1168
  qe,
1091
1169
  {
1092
- onClick: z,
1093
- disabled: b.isPending,
1170
+ onClick: $,
1171
+ disabled: g.isPending,
1094
1172
  className: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
1095
- children: b.isPending ? /* @__PURE__ */ a(k, { children: [
1173
+ children: g.isPending ? /* @__PURE__ */ a(M, { children: [
1096
1174
  /* @__PURE__ */ e(q, { className: "mr-2 h-4 w-4 animate-spin" }),
1097
1175
  "Deleting..."
1098
1176
  ] }) : "Delete Group"
@@ -1104,9 +1182,9 @@ function ar({
1104
1182
  )
1105
1183
  ] });
1106
1184
  }
1107
- function tr({
1185
+ function on({
1108
1186
  group: s,
1109
- onManageMembers: o,
1187
+ onManageMembers: n,
1110
1188
  onDelete: t,
1111
1189
  currentUserId: r
1112
1190
  }) {
@@ -1136,7 +1214,7 @@ function tr({
1136
1214
  {
1137
1215
  variant: "ghost",
1138
1216
  size: "sm",
1139
- onClick: o,
1217
+ onClick: n,
1140
1218
  title: "Manage members",
1141
1219
  children: /* @__PURE__ */ e(He, { className: "h-4 w-4" })
1142
1220
  }
@@ -1155,105 +1233,105 @@ function tr({
1155
1233
  ] })
1156
1234
  ] }) });
1157
1235
  }
1158
- function pr() {
1236
+ function yn() {
1159
1237
  var hs, ps, fs, gs;
1160
1238
  mt(), ht();
1161
1239
  const {
1162
1240
  authToken: s,
1163
- tokenProps: o,
1241
+ tokenProps: n,
1164
1242
  id: t
1165
- } = P(), { isLocalDev: r } = Ta(), { permissions: l } = yt(), c = _a(), { isLoading: u } = Ua();
1166
- w((n) => n.theme);
1167
- const p = w((n) => n.lenses), g = w((n) => n.selectedLensId), v = p == null ? void 0 : p.find((n) => n.id === g), i = w((n) => n.dashboard);
1168
- w((n) => n.selectedSheetId);
1243
+ } = G(), { isLocalDev: r } = Ta(), { permissions: l } = yt(), i = _a(), { isLoading: u } = Pa();
1244
+ w((o) => o.theme);
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
+ w((o) => o.selectedSheetId);
1169
1247
  const d = w(
1170
- (n) => n.isDashboardEditing
1171
- ), { setDashboardTitle: m } = w((n) => n.actions), [h, b] = S(!1), [y, N] = S(!1), [A, I] = S(!1), [U, M] = S(!1), [z, R] = S(!1), [$, x] = S(!1), [B, K] = S(!1), [Q, W] = S(null), [f, C] = S(!1), T = w((n) => n.isDashboardPanelOpen), F = w(
1172
- (n) => n.actions.setIsDashboardPanelOpen
1173
- ), ie = w((n) => n.filterValues), D = w((n) => n.isVisualEditing);
1174
- bs((n) => n.card);
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), [$, R] = S(!1), [z, x] = S(!1), [B, K] = S(!1), [Q, W] = S(null), [v, C] = S(!1), _ = w((o) => o.isDashboardPanelOpen), F = w(
1250
+ (o) => o.actions.setIsDashboardPanelOpen
1251
+ ), ie = w((o) => o.filterValues), D = w((o) => o.isVisualEditing);
1252
+ bs((o) => o.card);
1175
1253
  const Y = pe(
1176
- (n) => n.selectedDashboard
1254
+ (o) => o.selectedDashboard
1177
1255
  ), le = pe(
1178
- (n) => n.initialDashboard
1256
+ (o) => o.initialDashboard
1179
1257
  );
1180
- pe((n) => n.selectedVisual), w((n) => n.selectedFrameId), bs((n) => n.frame);
1181
- const ce = Y ? (ps = Y == null ? void 0 : Y.permissions) == null ? void 0 : ps.canEdit : (hs = le == null ? void 0 : le.permissions) == null ? void 0 : hs.canEdit, Ne = w((n) => n.showFilters), Js = Ga((n) => n.setPanelOpen), Xs = w(
1182
- (n) => n.showDashboardJSON
1183
- ), Se = w((n) => n.onSaveFunction), Zs = w(
1184
- (n) => n.actions.setShowFilters
1185
- ), { setIsDashboardEditing: rs, setShowDashboardJSON: ns } = w(
1186
- (n) => n.actions
1258
+ pe((o) => o.selectedVisual), w((o) => o.selectedFrameId), bs((o) => o.frame);
1259
+ const ce = Y ? (ps = Y == null ? void 0 : Y.permissions) == null ? void 0 : ps.canEdit : (hs = le == null ? void 0 : le.permissions) == null ? void 0 : hs.canEdit, Ne = w((o) => o.showFilters), Js = Ua((o) => o.setPanelOpen), Xs = w(
1260
+ (o) => o.showDashboardJSON
1261
+ ), Se = w((o) => o.onSaveFunction), Zs = w(
1262
+ (o) => o.actions.setShowFilters
1263
+ ), { setIsDashboardEditing: ns, setShowDashboardJSON: rs } = w(
1264
+ (o) => o.actions
1187
1265
  ), { setInitialDashboard: os, clearSelectedDashboard: we } = pe(
1188
- (n) => n.actions
1189
- ), { resources: de } = Ra(Ie.DASHBOARD), { data: xe } = Pa(), Ys = ((fs = xe == null ? void 0 : xe.preference) == null ? void 0 : fs.defaultDashboardId) || null, { mutate: ea, isPending: sa } = Fa(), { currentUser: aa } = Is(), ta = ja(aa), J = Y || le, is = J ? {
1266
+ (o) => o.actions
1267
+ ), { resources: de } = Ra(Ie.DASHBOARD), { data: xe } = Ga(), Ys = ((fs = xe == null ? void 0 : xe.preference) == null ? void 0 : fs.defaultDashboardId) || null, { mutate: ea, isPending: sa } = Fa(), { currentUser: aa } = Is(), ta = ja(aa), J = Y || le, is = J ? {
1190
1268
  id: J.id,
1191
- title: (i == null ? void 0 : i.title) || J.title || "Dashboard"
1192
- } : null, { handleAddNewFrame: ra } = Ha(), [De, Ce] = S(!1), [na, ee] = S(!1), [se, ue] = S("close"), ae = qa(Ie.DASHBOARD), [G, Le] = S(
1269
+ title: (c == null ? void 0 : c.title) || J.title || "Dashboard"
1270
+ } : null, { handleAddNewFrame: na } = Ha(), [De, Ce] = S(!1), [ra, ee] = S(!1), [se, ue] = S("close"), ae = qa(Ie.DASHBOARD), [U, Le] = S(
1193
1271
  null
1194
- ), oa = async (n, O) => {
1195
- if (!(i != null && i.id)) {
1272
+ ), oa = async (o, I) => {
1273
+ if (!(c != null && c.id)) {
1196
1274
  console.log("No dashboard ID found");
1197
1275
  return;
1198
1276
  }
1199
1277
  console.log("Updating dashboard title:", {
1200
- dashboardId: i.id,
1201
- newTitle: n,
1202
- previousTitle: O
1278
+ dashboardId: c.id,
1279
+ newTitle: o,
1280
+ previousTitle: I
1203
1281
  }), ae.mutate(
1204
1282
  {
1205
- resourceId: i.id,
1206
- data: { title: n }
1283
+ resourceId: c.id,
1284
+ data: { title: o }
1207
1285
  },
1208
1286
  {
1209
1287
  onSuccess: () => {
1210
- console.log("Dashboard title updated successfully"), E.success("Dashboard title updated");
1288
+ console.log("Dashboard title updated successfully"), A.success("Dashboard title updated");
1211
1289
  },
1212
- onError: (ne) => {
1213
- console.error("Failed to update dashboard title:", ne), E.error("Failed to update dashboard title"), m(O);
1290
+ onError: (re) => {
1291
+ console.error("Failed to update dashboard title:", re), A.error("Failed to update dashboard title"), h(I);
1214
1292
  }
1215
1293
  }
1216
1294
  );
1217
1295
  };
1218
1296
  dt(() => {
1219
1297
  if (de && de.length > 0) {
1220
- const n = i == null ? void 0 : i.id;
1221
- if (n) {
1222
- const O = de.find(
1223
- (ne) => ne.id === n
1298
+ const o = c == null ? void 0 : c.id;
1299
+ if (o) {
1300
+ const I = de.find(
1301
+ (re) => re.id === o
1224
1302
  );
1225
- O && os(O);
1303
+ I && os(I);
1226
1304
  }
1227
1305
  }
1228
- }, [de, i == null ? void 0 : i.id, os]);
1229
- const me = o.orgUserId || o.tenantId, ls = d && !D && me && ce, { setDashboard: Ee } = w((n) => n.actions), ia = () => {
1230
- rs(!0);
1231
- }, Ae = () => {
1232
- rs(!1), ns(!1), Le(null);
1306
+ }, [de, c == null ? void 0 : c.id, os]);
1307
+ const me = n.orgUserId || n.tenantId, ls = d && !D && me && ce, { setDashboard: Ee } = w((o) => o.actions), ia = () => {
1308
+ ns(!0);
1309
+ }, ke = () => {
1310
+ ns(!1), rs(!1), Le(null);
1233
1311
  };
1234
1312
  pt(
1235
1313
  d,
1236
- i,
1237
- G,
1238
- (n) => Le(n)
1314
+ c,
1315
+ U,
1316
+ (o) => Le(o)
1239
1317
  );
1240
1318
  const { isDirty: cs, isDirtyPending: la, resetDirty: he } = xt(
1241
- i,
1242
- G,
1319
+ c,
1320
+ U,
1243
1321
  300,
1244
1322
  1e3,
1245
1323
  Te
1246
- ), ds = ut(() => G ? Te(i) !== Te(G) : !1, [i, G]), ke = cs || la, te = De || ae.isPending, ca = () => {
1247
- ds() ? (ue("close"), ee(!0)) : (Ae(), he());
1324
+ ), ds = ut(() => U ? Te(c) !== Te(U) : !1, [c, U]), Ae = cs || la, te = De || ae.isPending, ca = () => {
1325
+ ds() ? (ue("close"), ee(!0)) : (ke(), he());
1248
1326
  }, da = async () => {
1249
1327
  await Me({
1250
1328
  closeAfterSave: !0,
1251
1329
  navigateHomeAfterSave: se === "home"
1252
1330
  });
1253
1331
  }, ua = () => {
1254
- G && Ee(G), Ae(), se === "home" && we(), ue("close"), ee(!1), he();
1332
+ U && Ee(U), ke(), se === "home" && we(), ue("close"), ee(!1), he();
1255
1333
  }, ma = () => {
1256
- G && (Ee(G), he());
1334
+ U && (Ee(U), he());
1257
1335
  }, ha = () => {
1258
1336
  if (d && ds()) {
1259
1337
  ue("home"), ee(!0);
@@ -1261,52 +1339,52 @@ function pr() {
1261
1339
  }
1262
1340
  we();
1263
1341
  };
1264
- async function Me(n) {
1265
- const O = (n == null ? void 0 : n.closeAfterSave) ?? f, ne = (n == null ? void 0 : n.navigateHomeAfterSave) ?? !1;
1266
- C(O), O && ee(!1);
1267
- const ba = ct(i);
1342
+ async function Me(o) {
1343
+ const I = (o == null ? void 0 : o.closeAfterSave) ?? v, re = (o == null ? void 0 : o.navigateHomeAfterSave) ?? !1;
1344
+ C(I), I && ee(!1);
1345
+ const ba = ct(c);
1268
1346
  K(!0), W(null), Ce(!0);
1269
1347
  const ya = {
1270
- template: i
1348
+ template: c
1271
1349
  };
1272
1350
  ae.mutate(
1273
1351
  {
1274
- resourceId: i.id,
1352
+ resourceId: c.id,
1275
1353
  data: ya
1276
1354
  },
1277
1355
  {
1278
1356
  onSuccess: () => {
1279
- Ce(!1), E.success("Dashboard saved!"), Le(ba), K(!1), C(!1), O && (Ae(), he(), ne && we()), ue("close");
1357
+ Ce(!1), A.success("Dashboard saved!"), Le(ba), K(!1), C(!1), I && (ke(), he(), re && we()), ue("close");
1280
1358
  },
1281
1359
  onError: () => {
1282
- Ce(!1), W("Failed to save dashboard. Please try again."), E.error("Failed to save dashboard");
1360
+ Ce(!1), W("Failed to save dashboard. Please try again."), A.error("Failed to save dashboard");
1283
1361
  }
1284
1362
  }
1285
1363
  );
1286
1364
  }
1287
1365
  async function pa() {
1288
- if (b(!0), !g || !v) return;
1289
- const n = JSON.stringify(i), O = {
1290
- ...v,
1291
- template: n,
1366
+ if (g(!0), !f || !b) return;
1367
+ const o = JSON.stringify(c), I = {
1368
+ ...b,
1369
+ template: o,
1292
1370
  filterValues: ie
1293
1371
  };
1294
- await ze(
1295
- o.apiServiceUrl,
1296
- O,
1372
+ await $e(
1373
+ n.apiServiceUrl,
1374
+ I,
1297
1375
  s == null ? void 0 : s.accessToken
1298
- ), E.success("Lens saved"), Se == null || Se(i), b(!1);
1376
+ ), A.success("Lens saved"), Se == null || Se(c), g(!1);
1299
1377
  }
1300
- const us = (v == null ? void 0 : v.name) || i.title;
1378
+ const us = (b == null ? void 0 : b.name) || c.title;
1301
1379
  ae.isPending && console.log("Title during update:", {
1302
1380
  title: us,
1303
- dashboardStateTitle: i.title,
1304
- dashboardId: i == null ? void 0 : i.id,
1305
- currentLensName: v == null ? void 0 : v.name
1381
+ dashboardStateTitle: c.title,
1382
+ dashboardId: c == null ? void 0 : c.id,
1383
+ currentLensName: b == null ? void 0 : b.name
1306
1384
  });
1307
- const ms = o.orgUserId || o.tenantId && o.endUserId && o.endUserEmail, fa = !!ms && !!(s != null && s.accessToken) && !!(o != null && o.apiServiceUrl), ga = c, re = (i == null ? void 0 : i.id) || null, Oe = !!re && Ys === re, va = () => {
1308
- re && ea({
1309
- dashboardId: Oe ? null : re
1385
+ const ms = n.orgUserId || n.tenantId && n.endUserId && n.endUserEmail, fa = !!ms && !!(s != null && s.accessToken) && !!(n != null && n.apiServiceUrl), ga = i, ne = (c == null ? void 0 : c.id) || null, Oe = !!ne && Ys === ne, va = () => {
1386
+ ne && ea({
1387
+ dashboardId: Oe ? null : ne
1310
1388
  });
1311
1389
  };
1312
1390
  return /* @__PURE__ */ a(
@@ -1316,14 +1394,14 @@ function pr() {
1316
1394
  role: "dashboard-controls",
1317
1395
  children: [
1318
1396
  /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
1319
- ms && /* @__PURE__ */ a(k, { children: [
1397
+ ms && /* @__PURE__ */ a(M, { children: [
1320
1398
  /* @__PURE__ */ e(
1321
1399
  j,
1322
1400
  {
1323
1401
  "aria-label": "Manage Dashboards",
1324
1402
  tooltip: "Manage Dashboards",
1325
1403
  onClick: () => {
1326
- F(!T);
1404
+ F(!_);
1327
1405
  },
1328
1406
  className: "h-7 p-2",
1329
1407
  children: /* @__PURE__ */ e(Lt, { className: "h-4 w-4" })
@@ -1340,38 +1418,38 @@ function pr() {
1340
1418
  }
1341
1419
  )
1342
1420
  ] }),
1343
- !D && c && (u ? /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
1421
+ !D && i && (u ? /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
1344
1422
  /* @__PURE__ */ e(q, { className: "h-3 w-3 animate-spin text-muted-foreground" }),
1345
1423
  /* @__PURE__ */ e("span", { className: "text-sm text-muted-foreground", children: "Loading..." })
1346
- ] }) : /* @__PURE__ */ a(k, { children: [
1424
+ ] }) : /* @__PURE__ */ a(M, { children: [
1347
1425
  /* @__PURE__ */ e(
1348
1426
  Va,
1349
1427
  {
1350
1428
  value: us || "Untitled Dashboard",
1351
- onSave: (n) => {
1429
+ onSave: (o) => {
1352
1430
  console.log("EditableText onSave called:", {
1353
- newTitle: n,
1431
+ newTitle: o,
1354
1432
  canEditDashboard: ce,
1355
- dashboardId: i == null ? void 0 : i.id
1433
+ dashboardId: c == null ? void 0 : c.id
1356
1434
  });
1357
- const O = (i == null ? void 0 : i.title) || "";
1358
- m(n), oa(n, O);
1435
+ const I = (c == null ? void 0 : c.title) || "";
1436
+ h(o), oa(o, I);
1359
1437
  },
1360
- isEditable: ce && !v,
1438
+ isEditable: ce && !b,
1361
1439
  displayClassName: "text-sm font-medium",
1362
1440
  inputClassName: "text-sm font-medium",
1363
1441
  placeholder: "Dashboard Title",
1364
1442
  isPending: ae.isPending
1365
1443
  }
1366
1444
  ),
1367
- fa && re && /* @__PURE__ */ e(za, { children: /* @__PURE__ */ a($a, { children: [
1445
+ fa && ne && /* @__PURE__ */ e($a, { children: /* @__PURE__ */ a(za, { children: [
1368
1446
  /* @__PURE__ */ e(Ba, { asChild: !0, children: /* @__PURE__ */ e(
1369
1447
  L,
1370
1448
  {
1371
1449
  variant: "ghost",
1372
1450
  size: "icon",
1373
1451
  onClick: va,
1374
- disabled: sa || !(s != null && s.accessToken) || !(o != null && o.apiServiceUrl),
1452
+ disabled: sa || !(s != null && s.accessToken) || !(n != null && n.apiServiceUrl),
1375
1453
  className: "h-7 w-7",
1376
1454
  children: /* @__PURE__ */ e(
1377
1455
  Ka,
@@ -1389,18 +1467,18 @@ function pr() {
1389
1467
  ] }))
1390
1468
  ] }),
1391
1469
  /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
1392
- D && /* @__PURE__ */ a(k, { children: [
1470
+ D && /* @__PURE__ */ a(M, { children: [
1393
1471
  /* @__PURE__ */ e(ft, { className: "mr-2" }),
1394
1472
  /* @__PURE__ */ e(gt, { className: "h-7" })
1395
1473
  ] }),
1396
- r && !D && /* @__PURE__ */ a(k, { children: [
1474
+ r && !D && /* @__PURE__ */ a(M, { children: [
1397
1475
  /* @__PURE__ */ e(
1398
1476
  j,
1399
1477
  {
1400
1478
  tooltip: "Copy Token",
1401
1479
  onClick: () => {
1402
- var n;
1403
- s != null && s.accessToken && ((n = navigator == null ? void 0 : navigator.clipboard) != null && n.writeText ? navigator.clipboard.writeText(s.accessToken).then(() => E.success("Token copied to clipboard")).catch(() => E.error("Unable to copy token")) : E.error("Clipboard not available"));
1480
+ var o;
1481
+ s != null && s.accessToken && ((o = navigator == null ? void 0 : navigator.clipboard) != null && o.writeText ? navigator.clipboard.writeText(s.accessToken).then(() => A.success("Token copied to clipboard")).catch(() => A.error("Unable to copy token")) : A.error("Clipboard not available"));
1404
1482
  },
1405
1483
  className: "h-7 p-2",
1406
1484
  children: /* @__PURE__ */ e(Wa, { className: "h-4 w-4" })
@@ -1410,15 +1488,15 @@ function pr() {
1410
1488
  j,
1411
1489
  {
1412
1490
  tooltip: "Invalidate Token",
1413
- onClick: () => Ja(o.apiServiceUrl),
1491
+ onClick: () => Ja(n.apiServiceUrl),
1414
1492
  className: "h-7 p-2",
1415
- children: /* @__PURE__ */ e(At, { className: "h-4 w-4" })
1493
+ children: /* @__PURE__ */ e(kt, { className: "h-4 w-4" })
1416
1494
  }
1417
1495
  )
1418
1496
  ] }),
1419
- !D && c && /* @__PURE__ */ e(Xa, {}),
1420
- !D && c && /* @__PURE__ */ e(vt, {}),
1421
- !D && c && ((gs = J == null ? void 0 : J.permissions) == null ? void 0 : gs.canShare) && /* @__PURE__ */ e(
1497
+ !D && i && /* @__PURE__ */ e(Xa, {}),
1498
+ !D && i && /* @__PURE__ */ e(vt, {}),
1499
+ !D && i && ((gs = J == null ? void 0 : J.permissions) == null ? void 0 : gs.canShare) && /* @__PURE__ */ e(
1422
1500
  j,
1423
1501
  {
1424
1502
  tooltip: "Share Dashboard",
@@ -1427,7 +1505,7 @@ function pr() {
1427
1505
  children: /* @__PURE__ */ e(Za, { className: "h-4 w-4" })
1428
1506
  }
1429
1507
  ),
1430
- !D && d && l.canUseFilters && c && /* @__PURE__ */ a(
1508
+ !D && d && l.canUseFilters && i && /* @__PURE__ */ a(
1431
1509
  L,
1432
1510
  {
1433
1511
  className: "h-7 px-2",
@@ -1442,14 +1520,14 @@ function pr() {
1442
1520
  ]
1443
1521
  }
1444
1522
  ),
1445
- d && !D && me && r && c && /* @__PURE__ */ e(Gt, {}),
1446
- !D && me && r && c && /* @__PURE__ */ e(Rt, {}),
1447
- d && !D && me && v && r && c && /* @__PURE__ */ a(
1523
+ d && !D && me && r && i && /* @__PURE__ */ e(Ut, {}),
1524
+ !D && me && r && i && /* @__PURE__ */ e(Rt, {}),
1525
+ d && !D && me && b && r && i && /* @__PURE__ */ a(
1448
1526
  L,
1449
1527
  {
1450
1528
  className: "h-7 p-2",
1451
1529
  variant: "secondary",
1452
- disabled: h,
1530
+ disabled: p,
1453
1531
  onClick: pa,
1454
1532
  size: "sm",
1455
1533
  children: [
@@ -1458,21 +1536,21 @@ function pr() {
1458
1536
  ]
1459
1537
  }
1460
1538
  ),
1461
- d && !D && c && /* @__PURE__ */ a(
1539
+ d && !D && i && /* @__PURE__ */ a(
1462
1540
  L,
1463
1541
  {
1464
1542
  variant: "outline",
1465
1543
  className: "h-7 p-2",
1466
1544
  size: "sm",
1467
1545
  disabled: !d,
1468
- onClick: () => ra(),
1546
+ onClick: () => na(),
1469
1547
  children: [
1470
1548
  /* @__PURE__ */ e(Je, { className: "mr-2 h-4 w-4" }),
1471
1549
  "Visual"
1472
1550
  ]
1473
1551
  }
1474
1552
  ),
1475
- !D && !d && ce && c && /* @__PURE__ */ a(
1553
+ !D && !d && ce && i && /* @__PURE__ */ a(
1476
1554
  L,
1477
1555
  {
1478
1556
  variant: "outline",
@@ -1485,7 +1563,7 @@ function pr() {
1485
1563
  ]
1486
1564
  }
1487
1565
  ),
1488
- ls && c && cs && /* @__PURE__ */ a(
1566
+ ls && i && cs && /* @__PURE__ */ a(
1489
1567
  L,
1490
1568
  {
1491
1569
  variant: "outline",
@@ -1499,12 +1577,12 @@ function pr() {
1499
1577
  ]
1500
1578
  }
1501
1579
  ),
1502
- ls && c && /* @__PURE__ */ a("div", { className: "relative inline-flex", children: [
1580
+ ls && i && /* @__PURE__ */ a("div", { className: "relative inline-flex", children: [
1503
1581
  /* @__PURE__ */ a(
1504
1582
  L,
1505
1583
  {
1506
- className: X("h-7 p-2", !ke && "opacity-60"),
1507
- disabled: te || !ke,
1584
+ className: X("h-7 p-2", !Ae && "opacity-60"),
1585
+ disabled: te || !Ae,
1508
1586
  onClick: () => Me(),
1509
1587
  size: "sm",
1510
1588
  children: [
@@ -1513,7 +1591,7 @@ function pr() {
1513
1591
  ]
1514
1592
  }
1515
1593
  ),
1516
- ke && !te && /* @__PURE__ */ e(
1594
+ Ae && !te && /* @__PURE__ */ e(
1517
1595
  "span",
1518
1596
  {
1519
1597
  "aria-hidden": "true",
@@ -1521,18 +1599,18 @@ function pr() {
1521
1599
  }
1522
1600
  )
1523
1601
  ] }),
1524
- !D && d && r && c && /* @__PURE__ */ e("div", { className: "flex items-center space-x-2", children: /* @__PURE__ */ e(
1602
+ !D && d && r && i && /* @__PURE__ */ e("div", { className: "flex items-center space-x-2", children: /* @__PURE__ */ e(
1525
1603
  L,
1526
1604
  {
1527
1605
  className: "h-7 p-2",
1528
- onClick: () => ns(!Xs),
1606
+ onClick: () => rs(!Xs),
1529
1607
  size: "sm",
1530
1608
  variant: "ghost",
1531
1609
  children: /* @__PURE__ */ e(at, { className: "h-4 w-4" })
1532
1610
  }
1533
1611
  ) }),
1534
1612
  !D && r && /* @__PURE__ */ e(Tt, {}),
1535
- d && !D && c && /* @__PURE__ */ a(
1613
+ d && !D && i && /* @__PURE__ */ a(
1536
1614
  L,
1537
1615
  {
1538
1616
  variant: "outline",
@@ -1544,19 +1622,19 @@ function pr() {
1544
1622
  ]
1545
1623
  }
1546
1624
  ),
1547
- !D && c && /* @__PURE__ */ a($e, { children: [
1625
+ !D && i && /* @__PURE__ */ a(ze, { children: [
1548
1626
  /* @__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" }) }) }),
1549
1627
  /* @__PURE__ */ a(Ke, { align: "end", children: [
1550
- /* @__PURE__ */ a(H, { onClick: () => M(!0), children: [
1551
- /* @__PURE__ */ e(rt, { className: "mr-2 h-4 w-4" }),
1628
+ /* @__PURE__ */ a(H, { onClick: () => O(!0), children: [
1629
+ /* @__PURE__ */ e(nt, { className: "mr-2 h-4 w-4" }),
1552
1630
  "Schedule Dashboard"
1553
1631
  ] }),
1554
- ta && /* @__PURE__ */ a(H, { onClick: () => I(!0), children: [
1632
+ ta && /* @__PURE__ */ a(H, { onClick: () => T(!0), children: [
1555
1633
  /* @__PURE__ */ e(V, { className: "mr-2 h-4 w-4" }),
1556
1634
  "Manage Groups"
1557
1635
  ] }),
1558
1636
  /* @__PURE__ */ a(H, { onClick: () => R(!0), children: [
1559
- /* @__PURE__ */ e(nt, { className: "mr-2 h-4 w-4" }),
1637
+ /* @__PURE__ */ e(rt, { className: "mr-2 h-4 w-4" }),
1560
1638
  "Calendar Preferences"
1561
1639
  ] }),
1562
1640
  /* @__PURE__ */ a(H, { onClick: () => x(!0), children: [
@@ -1574,38 +1652,38 @@ function pr() {
1574
1652
  }
1575
1653
  ),
1576
1654
  /* @__PURE__ */ e(
1577
- ar,
1655
+ rn,
1578
1656
  {
1579
- open: A,
1580
- onOpenChange: I
1657
+ open: k,
1658
+ onOpenChange: T
1581
1659
  }
1582
1660
  ),
1583
- (i == null ? void 0 : i.id) && /* @__PURE__ */ e(
1661
+ (c == null ? void 0 : c.id) && /* @__PURE__ */ e(
1584
1662
  lt,
1585
1663
  {
1586
- open: U,
1587
- onOpenChange: M,
1588
- dashboardId: i.id,
1589
- dashboardName: i == null ? void 0 : i.title
1664
+ open: P,
1665
+ onOpenChange: O,
1666
+ dashboardId: c.id,
1667
+ dashboardName: c == null ? void 0 : c.title
1590
1668
  }
1591
1669
  ),
1592
1670
  /* @__PURE__ */ e(
1593
1671
  St,
1594
1672
  {
1595
- open: z,
1673
+ open: $,
1596
1674
  onOpenChange: R
1597
1675
  }
1598
1676
  ),
1599
1677
  /* @__PURE__ */ e(
1600
1678
  wt,
1601
1679
  {
1602
- open: $,
1680
+ open: z,
1603
1681
  onOpenChange: x,
1604
- dashboard: i,
1682
+ dashboard: c,
1605
1683
  disabled: !d,
1606
- onApply: (n) => Ee({
1607
- ...i,
1608
- summary: n
1684
+ onApply: (o) => Ee({
1685
+ ...c,
1686
+ summary: o
1609
1687
  })
1610
1688
  }
1611
1689
  ),
@@ -1613,15 +1691,15 @@ function pr() {
1613
1691
  Ts,
1614
1692
  {
1615
1693
  open: B,
1616
- onOpenChange: (n) => {
1617
- !n && De && !Q || (K(n), n || (W(null), C(!1)));
1694
+ onOpenChange: (o) => {
1695
+ !o && De && !Q || (K(o), o || (W(null), C(!1)));
1618
1696
  },
1619
1697
  children: /* @__PURE__ */ a(_s, { className: "max-w-sm", children: [
1620
- /* @__PURE__ */ a(Us, { children: [
1621
- /* @__PURE__ */ e(Gs, { children: Q ? "Save failed" : "Saving dashboard" }),
1698
+ /* @__PURE__ */ a(Ps, { children: [
1699
+ /* @__PURE__ */ e(Us, { children: Q ? "Save failed" : "Saving dashboard" }),
1622
1700
  /* @__PURE__ */ e(Rs, { className: "pt-2", children: Q ? "We could not save the dashboard. Please try again." : "Please wait while we save your changes." })
1623
1701
  ] }),
1624
- /* @__PURE__ */ e(Ps, { className: "flex-col gap-2 sm:flex-row sm:justify-end", children: Q ? /* @__PURE__ */ a(k, { children: [
1702
+ /* @__PURE__ */ e(Gs, { className: "flex-col gap-2 sm:flex-row sm:justify-end", children: Q ? /* @__PURE__ */ a(M, { children: [
1625
1703
  /* @__PURE__ */ e(
1626
1704
  Fs,
1627
1705
  {
@@ -1636,7 +1714,7 @@ function pr() {
1636
1714
  qe,
1637
1715
  {
1638
1716
  onClick: () => Me({
1639
- closeAfterSave: f,
1717
+ closeAfterSave: v,
1640
1718
  navigateHomeAfterSave: se === "home"
1641
1719
  }),
1642
1720
  className: "m-0",
@@ -1660,9 +1738,9 @@ function pr() {
1660
1738
  /* @__PURE__ */ e(
1661
1739
  bt,
1662
1740
  {
1663
- open: na,
1664
- onOpenChange: (n) => {
1665
- ee(n);
1741
+ open: ra,
1742
+ onOpenChange: (o) => {
1743
+ ee(o);
1666
1744
  },
1667
1745
  onSave: da,
1668
1746
  onDiscard: ua,
@@ -1677,5 +1755,5 @@ function pr() {
1677
1755
  );
1678
1756
  }
1679
1757
  export {
1680
- pr as default
1758
+ yn as default
1681
1759
  };