react-semaphor 0.1.102 → 0.1.103

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 (28) hide show
  1. package/dist/chunks/{dashboard-controls-BcI9OPvx.js → dashboard-controls-DAzaYym5.js} +283 -283
  2. package/dist/chunks/{dashboard-controls-B69rp7Eg.js → dashboard-controls-Ds2RCrWu.js} +2 -2
  3. package/dist/chunks/{dashboard-json-DsxHtR1h.js → dashboard-json-BQy-8SIJ.js} +1 -1
  4. package/dist/chunks/{dashboard-json-BJ1c04y3.js → dashboard-json-o5bAUblk.js} +1 -1
  5. package/dist/chunks/{edit-dashboard-visual-C2PPgPSf.js → edit-dashboard-visual-BHwFOR_7.js} +3 -3
  6. package/dist/chunks/{edit-dashboard-visual-CRvSRhC4.js → edit-dashboard-visual-DLOAVvlt.js} +1 -1
  7. package/dist/chunks/{editor-action-buttons-D74G-fOO.js → editor-action-buttons-Bw5bnTxX.js} +2 -2
  8. package/dist/chunks/{editor-action-buttons-18dPoIIF.js → editor-action-buttons-rOZTI_GI.js} +1 -1
  9. package/dist/chunks/{index-DLEb3N-R.js → index-CPOSsRox.js} +13199 -13073
  10. package/dist/chunks/{index-BYjv54tY.js → index-dvY8LY1x.js} +150 -150
  11. package/dist/chunks/{resource-management-panel-DToljP14.js → resource-management-panel-CGTRDq_I.js} +1 -1
  12. package/dist/chunks/{resource-management-panel-k_ZQIBfh.js → resource-management-panel-C_TggF7q.js} +2 -2
  13. package/dist/chunks/{schedule-dashboard-fjtSpUVj.js → schedule-dashboard-CUvbs5p8.js} +3 -3
  14. package/dist/chunks/{schedule-dashboard-vZXqGP-q.js → schedule-dashboard-DV_zyKrN.js} +1 -1
  15. package/dist/chunks/{use-visual-utils-Btxew3Er.js → use-visual-utils-DcXPSN6e.js} +1 -1
  16. package/dist/chunks/{use-visual-utils-CMaqO2nT.js → use-visual-utils-s86DJ2mG.js} +1 -1
  17. package/dist/dashboard/index.cjs +1 -1
  18. package/dist/dashboard/index.js +1 -1
  19. package/dist/index.cjs +1 -1
  20. package/dist/index.js +4 -4
  21. package/dist/style.css +1 -1
  22. package/dist/surfboard/index.cjs +1 -1
  23. package/dist/surfboard/index.js +1 -1
  24. package/dist/types/dashboard.d.ts +19 -0
  25. package/dist/types/main.d.ts +19 -0
  26. package/dist/types/surfboard.d.ts +19 -0
  27. package/dist/types/types.d.ts +19 -0
  28. package/package.json +1 -1
@@ -1,17 +1,17 @@
1
- import { jsxs as n, jsx as e, Fragment as E } from "react/jsx-runtime";
2
- import { b as J, bp as Ns, bq as ys, u as y, aC as Ce, aD as Se, B as k, aF as Me, aG as W, br as ke, a8 as Ve, aj as R, ao as oe, bs as ws, aU as Le, ap as ie, aq as le, ar as ce, as as Pe, at as te, bt as Q, ax as Qe, I as V, bu as xs, aW as Ds, bv as Cs, bw as qe, bx as He, c as X, by as Be, bz as Ss, bA as Ms, bB as ks, bC as Ls, bD as Ps, ah as C, z as ze, ad as de, bE as ue, bF as Ke, av as As, bG as Is, ac as H, aR as _, bH as Es, bI as Fs, bJ as Ts, bK as We, bL as Je, bM as re, bN as ne, bj as be, aM as ve, bO as Ne, aX as Xe, bP as ye, aw as Ye, a$ as Ze, bQ as Gs, b3 as Rs, b4 as Os, b5 as Us, b6 as qs, b7 as zs, b8 as _s, b9 as $s, ba as js, bR as Vs, aO as Qs, be as Hs, bS as Bs, bT as Ks, aa as _e, aA as se, bU as Ws, R as fe, bV as Js, bW as Xs, bX as Ys, bY as Zs, y as ea, bZ as sa, b_ as aa, b$ as ta, c0 as ra, v as na } from "./index-DLEb3N-R.js";
1
+ import { jsxs as r, jsx as e, Fragment as E } from "react/jsx-runtime";
2
+ import { b as J, bp as vs, bq as Ns, u as y, aC as Ce, aD as Se, B as k, aF as Me, aG as W, br as ke, a8 as Ve, aj as R, ao as oe, bs as ys, aU as Le, ap as ie, aq as le, ar as ce, as as Pe, at as te, bt as Q, ax as Qe, I as V, bu as ws, aW as xs, bv as Ds, bw as qe, bx as He, c as X, by as Be, bz as Cs, bA as Ss, bB as Ms, bC as ks, bD as Ls, ah as C, z as ze, ad as de, bE as ue, bF as Ke, av as Ps, bG as As, ac as H, aR as $, bH as Is, bI as Es, bJ as Fs, bK as We, bL as Je, bM as re, bN as ne, bj as be, aM as ve, bO as Ne, aX as Xe, bP as ye, aw as Ye, a$ as Ze, bQ as Ts, b3 as Gs, b4 as Rs, b5 as Os, b6 as Us, b7 as qs, b8 as zs, b9 as $s, ba as js, bR as _s, aO as Vs, be as Qs, bS as Hs, bT as Bs, aa as $e, aA as se, bU as Ks, R as fe, bV as Ws, bW as Js, bX as Xs, bY as Ys, y as Zs, bZ as ea, b_ as sa, b$ as aa, c0 as ta, v as ra } from "./index-CPOSsRox.js";
3
3
  import * as S from "react";
4
- import { useState as w, useMemo as ae, useEffect as oa } from "react";
4
+ import { useState as w, useMemo as ae, useEffect as na } from "react";
5
5
  import "react-dom";
6
- import { g as we, A as ia, V as la, S as ca } from "./schedule-dashboard-fjtSpUVj.js";
7
- import { S as $e } from "./editor-action-buttons-D74G-fOO.js";
6
+ import { g as we, A as oa, V as ia, S as la } from "./schedule-dashboard-CUvbs5p8.js";
7
+ import { S as je } from "./editor-action-buttons-Bw5bnTxX.js";
8
8
  /**
9
9
  * @license lucide-react v0.453.0 - ISC
10
10
  *
11
11
  * This source code is licensed under the ISC license.
12
12
  * See the LICENSE file in the root directory of this source tree.
13
13
  */
14
- const da = J("Glasses", [
14
+ const ca = J("Glasses", [
15
15
  ["circle", { cx: "6", cy: "15", r: "4", key: "vux9w4" }],
16
16
  ["circle", { cx: "18", cy: "15", r: "4", key: "18o8ve" }],
17
17
  ["path", { d: "M14 15a2 2 0 0 0-2-2 2 2 0 0 0-2 2", key: "1ag4bs" }],
@@ -24,7 +24,7 @@ const da = J("Glasses", [
24
24
  * This source code is licensed under the ISC license.
25
25
  * See the LICENSE file in the root directory of this source tree.
26
26
  */
27
- const ua = J("Menu", [
27
+ const da = J("Menu", [
28
28
  ["line", { x1: "4", x2: "20", y1: "12", y2: "12", key: "1e0a9i" }],
29
29
  ["line", { x1: "4", x2: "20", y1: "6", y2: "6", key: "1owob3" }],
30
30
  ["line", { x1: "4", x2: "20", y1: "18", y2: "18", key: "yk5zj1" }]
@@ -35,7 +35,7 @@ const ua = J("Menu", [
35
35
  * This source code is licensed under the ISC license.
36
36
  * See the LICENSE file in the root directory of this source tree.
37
37
  */
38
- const ma = J("Moon", [
38
+ const ua = J("Moon", [
39
39
  ["path", { d: "M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z", key: "a7tn18" }]
40
40
  ]);
41
41
  /**
@@ -44,7 +44,7 @@ const ma = J("Moon", [
44
44
  * This source code is licensed under the ISC license.
45
45
  * See the LICENSE file in the root directory of this source tree.
46
46
  */
47
- const ha = J("ShieldX", [
47
+ const ma = J("ShieldX", [
48
48
  [
49
49
  "path",
50
50
  {
@@ -61,7 +61,7 @@ const ha = J("ShieldX", [
61
61
  * This source code is licensed under the ISC license.
62
62
  * See the LICENSE file in the root directory of this source tree.
63
63
  */
64
- const pa = J("Sun", [
64
+ const ha = J("Sun", [
65
65
  ["circle", { cx: "12", cy: "12", r: "4", key: "4exip2" }],
66
66
  ["path", { d: "M12 2v2", key: "tus03m" }],
67
67
  ["path", { d: "M12 20v2", key: "1lh1kg" }],
@@ -72,22 +72,22 @@ const pa = J("Sun", [
72
72
  ["path", { d: "m6.34 17.66-1.41 1.41", key: "1m8zz5" }],
73
73
  ["path", { d: "m19.07 4.93-1.41 1.41", key: "1shlcs" }]
74
74
  ]);
75
- var ga = Ns();
76
- function fa() {
77
- const { setTheme: s } = ys(), r = y(
75
+ var pa = vs();
76
+ function ga() {
77
+ const { setTheme: s } = Ns(), n = y(
78
78
  (a) => a.actions.setDashboardTheme
79
79
  );
80
- return /* @__PURE__ */ n(Ce, { children: [
81
- /* @__PURE__ */ e(Se, { asChild: !0, children: /* @__PURE__ */ n(k, { className: "h-7 p-2", variant: "ghost", size: "sm", children: [
80
+ return /* @__PURE__ */ r(Ce, { children: [
81
+ /* @__PURE__ */ e(Se, { asChild: !0, children: /* @__PURE__ */ r(k, { className: "h-7 p-2", variant: "ghost", size: "sm", children: [
82
82
  /* @__PURE__ */ e(
83
- pa,
83
+ ha,
84
84
  {
85
85
  strokeWidth: 1.5,
86
86
  className: "h-4 w-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"
87
87
  }
88
88
  ),
89
89
  /* @__PURE__ */ e(
90
- ma,
90
+ ua,
91
91
  {
92
92
  strokeWidth: 1.5,
93
93
  className: "absolute h-4 w-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"
@@ -95,12 +95,12 @@ function fa() {
95
95
  ),
96
96
  /* @__PURE__ */ e("span", { className: "sr-only", children: "Toggle theme" })
97
97
  ] }) }),
98
- /* @__PURE__ */ n(Me, { align: "end", children: [
98
+ /* @__PURE__ */ r(Me, { align: "end", children: [
99
99
  /* @__PURE__ */ e(
100
100
  W,
101
101
  {
102
102
  onClick: () => {
103
- s("light"), r("light");
103
+ s("light"), n("light");
104
104
  },
105
105
  children: "Light"
106
106
  }
@@ -109,7 +109,7 @@ function fa() {
109
109
  W,
110
110
  {
111
111
  onClick: () => {
112
- s("dark"), r("dark");
112
+ s("dark"), n("dark");
113
113
  },
114
114
  children: "Dark"
115
115
  }
@@ -118,7 +118,7 @@ function fa() {
118
118
  W,
119
119
  {
120
120
  onClick: () => {
121
- s("system"), r("system");
121
+ s("system"), n("system");
122
122
  },
123
123
  children: "System"
124
124
  }
@@ -126,21 +126,21 @@ function fa() {
126
126
  ] })
127
127
  ] });
128
128
  }
129
- async function ba(s, r, a, t, i) {
129
+ async function fa(s, n, a, t, i) {
130
130
  if (!i)
131
131
  return null;
132
132
  const o = JSON.stringify(a), l = `${s}/v1/lens`;
133
133
  return await ke(l, i, {
134
- name: r,
134
+ name: n,
135
135
  template: o,
136
136
  filterValues: t,
137
137
  operation: "create"
138
138
  });
139
139
  }
140
- async function xe(s, r, a) {
140
+ async function xe(s, n, a) {
141
141
  if (!a)
142
142
  return null;
143
- const { id: t, template: i, filterValues: o, isDefault: l, shared: m } = r, h = `${s}/v1/lens`;
143
+ const { id: t, template: i, filterValues: o, isDefault: l, shared: m } = n, h = `${s}/v1/lens`;
144
144
  return await ke(h, a, {
145
145
  lensId: t,
146
146
  template: i,
@@ -150,22 +150,22 @@ async function xe(s, r, a) {
150
150
  operation: "update"
151
151
  });
152
152
  }
153
- async function va(s, r, a) {
153
+ async function ba(s, n, a) {
154
154
  if (!a)
155
155
  return null;
156
156
  const t = `${s}/v1/lens`;
157
157
  return await ke(t, a, {
158
158
  operation: "delete",
159
- lensId: r
159
+ lensId: n
160
160
  });
161
161
  }
162
- function Na() {
163
- const [s, r] = w(""), [a, t] = w(!1), i = y((M) => M.lenses), { setLenses: o, setSelectedLensId: l } = Ve(), [m, h] = w(!1), [f, u] = w(!1), c = y((M) => M.dashboard), p = y((M) => M.filterValues), { authToken: b, tokenProps: v } = R();
162
+ function va() {
163
+ const [s, n] = w(""), [a, t] = w(!1), i = y((M) => M.lenses), { setLenses: o, setSelectedLensId: l } = Ve(), [m, h] = w(!1), [f, u] = w(!1), c = y((M) => M.dashboard), p = y((M) => M.filterValues), { authToken: b, tokenProps: v } = R();
164
164
  async function x() {
165
165
  h(!0);
166
166
  const M = we(
167
167
  c
168
- ), P = await ba(
168
+ ), P = await fa(
169
169
  v.apiServiceUrl,
170
170
  s,
171
171
  M,
@@ -174,8 +174,8 @@ function Na() {
174
174
  );
175
175
  P && (o([...i || [], P]), l(P.id), u(!1)), h(!1);
176
176
  }
177
- return /* @__PURE__ */ n(oe, { open: f, onOpenChange: u, children: [
178
- /* @__PURE__ */ e(ws, { asChild: !0, children: /* @__PURE__ */ n(
177
+ return /* @__PURE__ */ r(oe, { open: f, onOpenChange: u, children: [
178
+ /* @__PURE__ */ e(ys, { asChild: !0, children: /* @__PURE__ */ r(
179
179
  k,
180
180
  {
181
181
  variant: "secondary",
@@ -187,19 +187,19 @@ function Na() {
187
187
  ]
188
188
  }
189
189
  ) }),
190
- /* @__PURE__ */ n(ie, { className: "sm:max-w-[425px]", children: [
191
- /* @__PURE__ */ n(le, { children: [
190
+ /* @__PURE__ */ r(ie, { className: "sm:max-w-[425px]", children: [
191
+ /* @__PURE__ */ r(le, { children: [
192
192
  /* @__PURE__ */ e(ce, { children: "Create Lens" }),
193
193
  /* @__PURE__ */ e(Pe, { children: "Lenses are private by default and are only visible to you." })
194
194
  ] }),
195
- /* @__PURE__ */ e("div", { className: "grid gap-4 py-4", children: /* @__PURE__ */ n("div", { className: "grid grid-cols-8 items-center gap-4", children: [
195
+ /* @__PURE__ */ e("div", { className: "grid gap-4 py-4", children: /* @__PURE__ */ r("div", { className: "grid grid-cols-8 items-center gap-4", children: [
196
196
  /* @__PURE__ */ e(te, { className: "text-right", children: "Name" }),
197
197
  /* @__PURE__ */ e(
198
198
  Q,
199
199
  {
200
200
  value: s,
201
201
  onChange: (M) => {
202
- r(M.target.value);
202
+ n(M.target.value);
203
203
  },
204
204
  id: "name",
205
205
  className: "col-span-7 focus-visible:ring-0 focus-visible:ring-ring focus-visible:ring-offset-0"
@@ -221,13 +221,13 @@ function Na() {
221
221
  ] })
222
222
  ] });
223
223
  }
224
- function ya() {
225
- const [s, r] = w(!1), a = y((c) => c.lenses), t = y((c) => c.selectedLensId), { setLenses: i, setSelectedLensId: o } = Ve(), { authToken: l, tokenProps: m } = R();
224
+ function Na() {
225
+ const [s, n] = w(!1), a = y((c) => c.lenses), t = y((c) => c.selectedLensId), { setLenses: i, setSelectedLensId: o } = Ve(), { authToken: l, tokenProps: m } = R();
226
226
  async function h(c) {
227
227
  o(c);
228
228
  }
229
229
  async function f(c) {
230
- if (await va(m.apiServiceUrl, c, l == null ? void 0 : l.accessToken)) {
230
+ if (await ba(m.apiServiceUrl, c, l == null ? void 0 : l.accessToken)) {
231
231
  const b = a == null ? void 0 : a.filter((v) => v.id !== c);
232
232
  i(b || []), o("original");
233
233
  }
@@ -255,26 +255,26 @@ function ya() {
255
255
  await xe(m.apiServiceUrl, x, l == null ? void 0 : l.accessToken);
256
256
  }
257
257
  }
258
- return /* @__PURE__ */ n(Ce, { open: s, onOpenChange: r, children: [
259
- /* @__PURE__ */ e(Se, { asChild: !0, children: /* @__PURE__ */ e(V, { tooltip: "Lenses", className: "h-7 p-2", children: /* @__PURE__ */ e(da, { className: "h-4 w-4" }) }) }),
260
- /* @__PURE__ */ n(Me, { align: "end", className: "w-60", children: [
261
- /* @__PURE__ */ e(xs, { className: "px-3", children: "Lenses" }),
262
- /* @__PURE__ */ e(Ds, {}),
263
- /* @__PURE__ */ n(
264
- Cs,
258
+ return /* @__PURE__ */ r(Ce, { open: s, onOpenChange: n, children: [
259
+ /* @__PURE__ */ e(Se, { asChild: !0, children: /* @__PURE__ */ e(V, { tooltip: "Lenses", className: "h-7 p-2", children: /* @__PURE__ */ e(ca, { className: "h-4 w-4" }) }) }),
260
+ /* @__PURE__ */ r(Me, { align: "end", className: "w-60", children: [
261
+ /* @__PURE__ */ e(ws, { className: "px-3", children: "Lenses" }),
262
+ /* @__PURE__ */ e(xs, {}),
263
+ /* @__PURE__ */ r(
264
+ Ds,
265
265
  {
266
266
  value: t,
267
267
  onValueChange: h,
268
268
  children: [
269
269
  /* @__PURE__ */ e(qe, { value: "original", children: "Original" }),
270
- a == null ? void 0 : a.map((c) => /* @__PURE__ */ n(
270
+ a == null ? void 0 : a.map((c) => /* @__PURE__ */ r(
271
271
  qe,
272
272
  {
273
273
  className: "group flex justify-between gap-2",
274
274
  value: c.id,
275
275
  children: [
276
276
  /* @__PURE__ */ e("p", { children: c.name }),
277
- /* @__PURE__ */ n("span", { className: "flex items-center gap-3", children: [
277
+ /* @__PURE__ */ r("span", { className: "flex items-center gap-3", children: [
278
278
  /* @__PURE__ */ e(
279
279
  He,
280
280
  {
@@ -312,10 +312,10 @@ function ya() {
312
312
  ] })
313
313
  ] });
314
314
  }
315
- function wa({
315
+ function ya({
316
316
  iconClassName: s
317
317
  }) {
318
- const [r, a] = w(!1), [t, i] = w(""), [o, l] = w(!1), m = y((c) => c.isDownloadingPdf), { tokenProps: h } = R();
318
+ const [n, a] = w(!1), [t, i] = w(""), [o, l] = w(!1), m = y((c) => c.isDownloadingPdf), { tokenProps: h } = R();
319
319
  async function f() {
320
320
  const c = C.loading(
321
321
  "Generating PDF... may take up to 60 seconds"
@@ -346,8 +346,8 @@ function wa({
346
346
  C.dismiss(c), C.error("Failed to download protected PDF. Please try again."), console.error("Protected PDF download error:", p);
347
347
  }
348
348
  }
349
- return /* @__PURE__ */ n(E, { children: [
350
- /* @__PURE__ */ n(Ce, { modal: !1, children: [
349
+ return /* @__PURE__ */ r(E, { children: [
350
+ /* @__PURE__ */ r(Ce, { modal: !1, children: [
351
351
  /* @__PURE__ */ e(Se, { asChild: !0, children: /* @__PURE__ */ e(
352
352
  k,
353
353
  {
@@ -355,16 +355,16 @@ function wa({
355
355
  size: "sm",
356
356
  className: "h-7 p-2",
357
357
  disabled: m,
358
- children: /* @__PURE__ */ e(Ss, { className: X("size-4", s) })
358
+ children: /* @__PURE__ */ e(Cs, { className: X("size-4", s) })
359
359
  }
360
360
  ) }),
361
- /* @__PURE__ */ n(Me, { align: "end", children: [
362
- /* @__PURE__ */ n(W, { onClick: f, children: [
363
- /* @__PURE__ */ e(Ms, { className: "mr-2 h-4 w-4" }),
361
+ /* @__PURE__ */ r(Me, { align: "end", children: [
362
+ /* @__PURE__ */ r(W, { onClick: f, children: [
363
+ /* @__PURE__ */ e(Ss, { className: "mr-2 h-4 w-4" }),
364
364
  "Download PDF"
365
365
  ] }),
366
- /* @__PURE__ */ n(W, { onClick: () => a(!0), children: [
367
- /* @__PURE__ */ e(ks, { className: "mr-2 h-4 w-4" }),
366
+ /* @__PURE__ */ r(W, { onClick: () => a(!0), children: [
367
+ /* @__PURE__ */ e(Ms, { className: "mr-2 h-4 w-4" }),
368
368
  "Download Protected PDF"
369
369
  ] })
370
370
  ] })
@@ -372,16 +372,16 @@ function wa({
372
372
  /* @__PURE__ */ e(
373
373
  oe,
374
374
  {
375
- open: r,
375
+ open: n,
376
376
  onOpenChange: a,
377
- children: /* @__PURE__ */ n(ie, { className: "sm:max-w-[425px]", children: [
378
- /* @__PURE__ */ n(le, { children: [
377
+ children: /* @__PURE__ */ r(ie, { className: "sm:max-w-[425px]", children: [
378
+ /* @__PURE__ */ r(le, { children: [
379
379
  /* @__PURE__ */ e(ce, { children: "Download Protected PDF" }),
380
380
  /* @__PURE__ */ e(Pe, { children: "Enter a password to protect your PDF. The PDF will be encrypted and require this password to open." })
381
381
  ] }),
382
- /* @__PURE__ */ e("div", { className: "grid gap-4 py-4", children: /* @__PURE__ */ n("div", { className: "grid gap-2", children: [
382
+ /* @__PURE__ */ e("div", { className: "grid gap-4 py-4", children: /* @__PURE__ */ r("div", { className: "grid gap-2", children: [
383
383
  /* @__PURE__ */ e(te, { htmlFor: "password", children: "Password" }),
384
- /* @__PURE__ */ n("div", { className: "relative", children: [
384
+ /* @__PURE__ */ r("div", { className: "relative", children: [
385
385
  /* @__PURE__ */ e(
386
386
  Q,
387
387
  {
@@ -404,12 +404,12 @@ function wa({
404
404
  size: "sm",
405
405
  className: "absolute right-0 top-0 h-full px-3 py-2 hover:bg-transparent",
406
406
  onClick: () => l(!o),
407
- children: o ? /* @__PURE__ */ e(Ls, { className: "h-4 w-4 text-muted-foreground" }) : /* @__PURE__ */ e(Ps, { className: "h-4 w-4 text-muted-foreground" })
407
+ children: o ? /* @__PURE__ */ e(ks, { className: "h-4 w-4 text-muted-foreground" }) : /* @__PURE__ */ e(Ls, { className: "h-4 w-4 text-muted-foreground" })
408
408
  }
409
409
  )
410
410
  ] })
411
411
  ] }) }),
412
- /* @__PURE__ */ n(Qe, { children: [
412
+ /* @__PURE__ */ r(Qe, { children: [
413
413
  /* @__PURE__ */ e(
414
414
  k,
415
415
  {
@@ -425,29 +425,29 @@ function wa({
425
425
  )
426
426
  ] });
427
427
  }
428
- const xa = async (s, r, a) => {
428
+ const wa = async (s, n, a) => {
429
429
  const t = `${s}/management/v1/groups`;
430
- return await Ke(t, r, a);
431
- }, Da = async (s, r, a) => {
430
+ return await Ke(t, n, a);
431
+ }, xa = async (s, n, a) => {
432
432
  const t = `${s}/management/v1/groups/${a}`, i = await fetch(t, {
433
433
  method: "DELETE",
434
434
  headers: {
435
- Authorization: `Bearer ${r}`
435
+ Authorization: `Bearer ${n}`
436
436
  }
437
437
  });
438
438
  if (!i.ok) {
439
439
  const o = await i.text();
440
440
  throw new Error(o || "Failed to delete group");
441
441
  }
442
- }, Ca = async (s, r, a, t) => {
442
+ }, Da = async (s, n, a, t) => {
443
443
  const i = `${s}/management/v1/groups/${a}/members`;
444
- return await Ke(i, r, t);
445
- }, Sa = async (s, r, a, t) => {
444
+ return await Ke(i, n, t);
445
+ }, Ca = async (s, n, a, t) => {
446
446
  const i = `${s}/management/v1/groups/${a}/members`, o = await fetch(i, {
447
447
  method: "DELETE",
448
448
  headers: {
449
449
  "Content-Type": "application/json",
450
- Authorization: `Bearer ${r}`
450
+ Authorization: `Bearer ${n}`
451
451
  },
452
452
  body: JSON.stringify(t)
453
453
  });
@@ -456,10 +456,10 @@ const xa = async (s, r, a) => {
456
456
  throw new Error(l || "Failed to remove group members");
457
457
  }
458
458
  };
459
- function Ma() {
460
- const { authToken: s, tokenProps: r } = R(), a = de();
459
+ function Sa() {
460
+ const { authToken: s, tokenProps: n } = R(), a = de();
461
461
  return ue({
462
- mutationFn: (t) => xa(r.apiServiceUrl, (s == null ? void 0 : s.accessToken) || "", t),
462
+ mutationFn: (t) => wa(n.apiServiceUrl, (s == null ? void 0 : s.accessToken) || "", t),
463
463
  onSuccess: () => {
464
464
  a.invalidateQueries({ queryKey: ["groups"] }), C.success("Group created successfully");
465
465
  },
@@ -470,10 +470,10 @@ function Ma() {
470
470
  }
471
471
  });
472
472
  }
473
- function ka() {
474
- const { authToken: s, tokenProps: r } = R(), a = de();
473
+ function Ma() {
474
+ const { authToken: s, tokenProps: n } = R(), a = de();
475
475
  return ue({
476
- mutationFn: (t) => Da(r.apiServiceUrl, (s == null ? void 0 : s.accessToken) || "", t),
476
+ mutationFn: (t) => xa(n.apiServiceUrl, (s == null ? void 0 : s.accessToken) || "", t),
477
477
  onSuccess: (t, i) => {
478
478
  a.invalidateQueries({ queryKey: ["groups"] }), a.removeQueries({ queryKey: ["group", i] }), C.success("Group deleted successfully");
479
479
  },
@@ -484,13 +484,13 @@ function ka() {
484
484
  }
485
485
  });
486
486
  }
487
- function La() {
488
- const { authToken: s, tokenProps: r } = R(), a = de();
487
+ function ka() {
488
+ const { authToken: s, tokenProps: n } = R(), a = de();
489
489
  return ue({
490
490
  mutationFn: ({
491
491
  groupId: t,
492
492
  data: i
493
- }) => Ca(r.apiServiceUrl, (s == null ? void 0 : s.accessToken) || "", t, i),
493
+ }) => Da(n.apiServiceUrl, (s == null ? void 0 : s.accessToken) || "", t, i),
494
494
  onSuccess: (t, i) => {
495
495
  a.invalidateQueries({ queryKey: ["group", i.groupId] }), a.invalidateQueries({
496
496
  queryKey: ["group-members", i.groupId]
@@ -503,13 +503,13 @@ function La() {
503
503
  }
504
504
  });
505
505
  }
506
- function Pa() {
507
- const { authToken: s, tokenProps: r } = R(), a = de();
506
+ function La() {
507
+ const { authToken: s, tokenProps: n } = R(), a = de();
508
508
  return ue({
509
509
  mutationFn: ({
510
510
  groupId: t,
511
511
  data: i
512
- }) => Sa(r.apiServiceUrl, (s == null ? void 0 : s.accessToken) || "", t, i),
512
+ }) => Ca(n.apiServiceUrl, (s == null ? void 0 : s.accessToken) || "", t, i),
513
513
  onSuccess: (t, i) => {
514
514
  a.invalidateQueries({ queryKey: ["group", i.groupId] }), a.invalidateQueries({
515
515
  queryKey: ["group-members", i.groupId]
@@ -522,22 +522,22 @@ function Pa() {
522
522
  }
523
523
  });
524
524
  }
525
- function Aa({
525
+ function Pa({
526
526
  onSuccess: s,
527
- tenantId: r,
527
+ tenantId: n,
528
528
  isTenantUser: a
529
529
  }) {
530
- const [t, i] = w(""), [o, l] = w(""), [m, h] = w({}), f = Ma(), u = () => {
530
+ const [t, i] = w(""), [o, l] = w(""), [m, h] = w({}), f = Sa(), u = () => {
531
531
  const p = {};
532
532
  return t.trim() ? t.length < 3 ? p.name = "Group name must be at least 3 characters" : t.length > 50 && (p.name = "Group name must be less than 50 characters") : p.name = "Group name is required", o && o.length > 200 && (p.description = "Description must be less than 200 characters"), h(p), Object.keys(p).length === 0;
533
533
  };
534
- return /* @__PURE__ */ n("form", { onSubmit: async (p) => {
534
+ return /* @__PURE__ */ r("form", { onSubmit: async (p) => {
535
535
  if (p.preventDefault(), !u()) return;
536
536
  const b = {
537
537
  name: t.trim(),
538
538
  description: o.trim() || void 0,
539
539
  type: a ? "TENANT_GROUP" : "ORG_GROUP",
540
- ...a && r ? { tenantId: r } : {}
540
+ ...a && n ? { tenantId: n } : {}
541
541
  };
542
542
  try {
543
543
  await f.mutateAsync(b), i(""), l(""), h({}), s();
@@ -545,9 +545,9 @@ function Aa({
545
545
  console.error("Failed to create group:", v);
546
546
  }
547
547
  }, className: "space-y-6", children: [
548
- /* @__PURE__ */ n("div", { className: "space-y-4", children: [
549
- /* @__PURE__ */ n("div", { className: "space-y-2", children: [
550
- /* @__PURE__ */ n(te, { htmlFor: "group-name", children: [
548
+ /* @__PURE__ */ r("div", { className: "space-y-4", children: [
549
+ /* @__PURE__ */ r("div", { className: "space-y-2", children: [
550
+ /* @__PURE__ */ r(te, { htmlFor: "group-name", children: [
551
551
  "Group Name ",
552
552
  /* @__PURE__ */ e("span", { className: "text-destructive", children: "*" })
553
553
  ] }),
@@ -566,13 +566,13 @@ function Aa({
566
566
  ),
567
567
  m.name && /* @__PURE__ */ e("p", { className: "text-sm text-destructive", children: m.name })
568
568
  ] }),
569
- /* @__PURE__ */ n("div", { className: "space-y-2", children: [
570
- /* @__PURE__ */ n(te, { htmlFor: "group-description", children: [
569
+ /* @__PURE__ */ r("div", { className: "space-y-2", children: [
570
+ /* @__PURE__ */ r(te, { htmlFor: "group-description", children: [
571
571
  "Description",
572
572
  /* @__PURE__ */ e("span", { className: "ml-2 text-xs text-muted-foreground", children: "(optional)" })
573
573
  ] }),
574
574
  /* @__PURE__ */ e(
575
- As,
575
+ Ps,
576
576
  {
577
577
  id: "group-description",
578
578
  placeholder: "Describe the purpose of this group...",
@@ -586,17 +586,17 @@ function Aa({
586
586
  }
587
587
  ),
588
588
  m.description && /* @__PURE__ */ e("p", { className: "text-sm text-destructive", children: m.description }),
589
- /* @__PURE__ */ n("p", { className: "text-xs text-muted-foreground", children: [
589
+ /* @__PURE__ */ r("p", { className: "text-xs text-muted-foreground", children: [
590
590
  o.length,
591
591
  "/200 characters"
592
592
  ] })
593
593
  ] }),
594
- /* @__PURE__ */ e("div", { className: "rounded-lg border bg-muted/50 p-4", children: /* @__PURE__ */ n("div", { className: "flex gap-3", children: [
595
- /* @__PURE__ */ e(Is, { className: "h-4 w-4 mt-0.5 text-muted-foreground" }),
594
+ /* @__PURE__ */ e("div", { className: "rounded-lg border bg-muted/50 p-4", children: /* @__PURE__ */ r("div", { className: "flex gap-3", children: [
595
+ /* @__PURE__ */ e(As, { className: "h-4 w-4 mt-0.5 text-muted-foreground" }),
596
596
  /* @__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." })
597
597
  ] }) })
598
598
  ] }),
599
- /* @__PURE__ */ n("div", { className: "flex justify-end gap-3", children: [
599
+ /* @__PURE__ */ r("div", { className: "flex justify-end gap-3", children: [
600
600
  /* @__PURE__ */ e(
601
601
  k,
602
602
  {
@@ -614,11 +614,11 @@ function Aa({
614
614
  {
615
615
  type: "submit",
616
616
  disabled: f.isPending || !t.trim(),
617
- children: f.isPending ? /* @__PURE__ */ n(E, { children: [
617
+ children: f.isPending ? /* @__PURE__ */ r(E, { children: [
618
618
  /* @__PURE__ */ e(H, { className: "mr-2 h-4 w-4 animate-spin" }),
619
619
  "Creating..."
620
- ] }) : /* @__PURE__ */ n(E, { children: [
621
- /* @__PURE__ */ e(_, { className: "mr-2 h-4 w-4" }),
620
+ ] }) : /* @__PURE__ */ r(E, { children: [
621
+ /* @__PURE__ */ e($, { className: "mr-2 h-4 w-4" }),
622
622
  "Create Group"
623
623
  ] })
624
624
  }
@@ -626,7 +626,7 @@ function Aa({
626
626
  ] })
627
627
  ] });
628
628
  }
629
- function Ia(s, r = []) {
629
+ function Aa(s, n = []) {
630
630
  let a = [];
631
631
  function t(o, l) {
632
632
  const m = S.createContext(l), h = a.length;
@@ -656,11 +656,11 @@ function Ia(s, r = []) {
656
656
  );
657
657
  };
658
658
  };
659
- return i.scopeName = s, [t, Ea(i, ...r)];
659
+ return i.scopeName = s, [t, Ia(i, ...n)];
660
660
  }
661
- function Ea(...s) {
662
- const r = s[0];
663
- if (s.length === 1) return r;
661
+ function Ia(...s) {
662
+ const n = s[0];
663
+ if (s.length === 1) return n;
664
664
  const a = () => {
665
665
  const t = s.map((i) => ({
666
666
  useScope: i(),
@@ -671,22 +671,22 @@ function Ea(...s) {
671
671
  const c = h(o)[`__scope${f}`];
672
672
  return { ...m, ...c };
673
673
  }, {});
674
- return S.useMemo(() => ({ [`__scope${r.scopeName}`]: l }), [l]);
674
+ return S.useMemo(() => ({ [`__scope${n.scopeName}`]: l }), [l]);
675
675
  };
676
676
  };
677
- return a.scopeName = r.scopeName, a;
677
+ return a.scopeName = n.scopeName, a;
678
678
  }
679
- function Fa(s) {
680
- const r = S.useRef(s);
679
+ function Ea(s) {
680
+ const n = S.useRef(s);
681
681
  return S.useEffect(() => {
682
- r.current = s;
682
+ n.current = s;
683
683
  }), S.useMemo(() => (...a) => {
684
684
  var t;
685
- return (t = r.current) == null ? void 0 : t.call(r, ...a);
685
+ return (t = n.current) == null ? void 0 : t.call(n, ...a);
686
686
  }, []);
687
687
  }
688
688
  var De = globalThis != null && globalThis.document ? S.useLayoutEffect : () => {
689
- }, Ta = [
689
+ }, Fa = [
690
690
  "a",
691
691
  "button",
692
692
  "div",
@@ -704,85 +704,85 @@ var De = globalThis != null && globalThis.document ? S.useLayoutEffect : () => {
704
704
  "span",
705
705
  "svg",
706
706
  "ul"
707
- ], Ae = Ta.reduce((s, r) => {
708
- const a = Es(`Primitive.${r}`), t = S.forwardRef((i, o) => {
709
- const { asChild: l, ...m } = i, h = l ? a : r;
707
+ ], Ae = Fa.reduce((s, n) => {
708
+ const a = Is(`Primitive.${n}`), t = S.forwardRef((i, o) => {
709
+ const { asChild: l, ...m } = i, h = l ? a : n;
710
710
  return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ e(h, { ...m, ref: o });
711
711
  });
712
- return t.displayName = `Primitive.${r}`, { ...s, [r]: t };
712
+ return t.displayName = `Primitive.${n}`, { ...s, [n]: t };
713
713
  }, {});
714
- function Ga() {
715
- return ga.useSyncExternalStore(
716
- Ra,
714
+ function Ta() {
715
+ return pa.useSyncExternalStore(
716
+ Ga,
717
717
  () => !0,
718
718
  () => !1
719
719
  );
720
720
  }
721
- function Ra() {
721
+ function Ga() {
722
722
  return () => {
723
723
  };
724
724
  }
725
- var Ie = "Avatar", [Oa] = Ia(Ie), [Ua, es] = Oa(Ie), ss = S.forwardRef(
726
- (s, r) => {
725
+ var Ie = "Avatar", [Ra] = Aa(Ie), [Oa, es] = Ra(Ie), ss = S.forwardRef(
726
+ (s, n) => {
727
727
  const { __scopeAvatar: a, ...t } = s, [i, o] = S.useState("idle");
728
728
  return /* @__PURE__ */ e(
729
- Ua,
729
+ Oa,
730
730
  {
731
731
  scope: a,
732
732
  imageLoadingStatus: i,
733
733
  onImageLoadingStatusChange: o,
734
- children: /* @__PURE__ */ e(Ae.span, { ...t, ref: r })
734
+ children: /* @__PURE__ */ e(Ae.span, { ...t, ref: n })
735
735
  }
736
736
  );
737
737
  }
738
738
  );
739
739
  ss.displayName = Ie;
740
740
  var as = "AvatarImage", ts = S.forwardRef(
741
- (s, r) => {
741
+ (s, n) => {
742
742
  const { __scopeAvatar: a, src: t, onLoadingStatusChange: i = () => {
743
- }, ...o } = s, l = es(as, a), m = qa(t, o), h = Fa((f) => {
743
+ }, ...o } = s, l = es(as, a), m = Ua(t, o), h = Ea((f) => {
744
744
  i(f), l.onImageLoadingStatusChange(f);
745
745
  });
746
746
  return De(() => {
747
747
  m !== "idle" && h(m);
748
- }, [m, h]), m === "loaded" ? /* @__PURE__ */ e(Ae.img, { ...o, ref: r, src: t }) : null;
748
+ }, [m, h]), m === "loaded" ? /* @__PURE__ */ e(Ae.img, { ...o, ref: n, src: t }) : null;
749
749
  }
750
750
  );
751
751
  ts.displayName = as;
752
752
  var rs = "AvatarFallback", ns = S.forwardRef(
753
- (s, r) => {
753
+ (s, n) => {
754
754
  const { __scopeAvatar: a, delayMs: t, ...i } = s, o = es(rs, a), [l, m] = S.useState(t === void 0);
755
755
  return S.useEffect(() => {
756
756
  if (t !== void 0) {
757
757
  const h = window.setTimeout(() => m(!0), t);
758
758
  return () => window.clearTimeout(h);
759
759
  }
760
- }, [t]), l && o.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ e(Ae.span, { ...i, ref: r }) : null;
760
+ }, [t]), l && o.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ e(Ae.span, { ...i, ref: n }) : null;
761
761
  }
762
762
  );
763
763
  ns.displayName = rs;
764
- function je(s, r) {
765
- return s ? r ? (s.src !== r && (s.src = r), s.complete && s.naturalWidth > 0 ? "loaded" : "loading") : "error" : "idle";
764
+ function _e(s, n) {
765
+ return s ? n ? (s.src !== n && (s.src = n), s.complete && s.naturalWidth > 0 ? "loaded" : "loading") : "error" : "idle";
766
766
  }
767
- function qa(s, { referrerPolicy: r, crossOrigin: a }) {
768
- const t = Ga(), i = S.useRef(null), o = t ? (i.current || (i.current = new window.Image()), i.current) : null, [l, m] = S.useState(
769
- () => je(o, s)
767
+ function Ua(s, { referrerPolicy: n, crossOrigin: a }) {
768
+ const t = Ta(), i = S.useRef(null), o = t ? (i.current || (i.current = new window.Image()), i.current) : null, [l, m] = S.useState(
769
+ () => _e(o, s)
770
770
  );
771
771
  return De(() => {
772
- m(je(o, s));
772
+ m(_e(o, s));
773
773
  }, [o, s]), De(() => {
774
774
  const h = (c) => () => {
775
775
  m(c);
776
776
  };
777
777
  if (!o) return;
778
778
  const f = h("loaded"), u = h("error");
779
- return o.addEventListener("load", f), o.addEventListener("error", u), r && (o.referrerPolicy = r), typeof a == "string" && (o.crossOrigin = a), () => {
779
+ return o.addEventListener("load", f), o.addEventListener("error", u), n && (o.referrerPolicy = n), typeof a == "string" && (o.crossOrigin = a), () => {
780
780
  o.removeEventListener("load", f), o.removeEventListener("error", u);
781
781
  };
782
- }, [o, a, r]), l;
782
+ }, [o, a, n]), l;
783
783
  }
784
784
  var os = ss, is = ts, ls = ns;
785
- const Ee = S.forwardRef(({ className: s, ...r }, a) => /* @__PURE__ */ e(
785
+ const Ee = S.forwardRef(({ className: s, ...n }, a) => /* @__PURE__ */ e(
786
786
  os,
787
787
  {
788
788
  ref: a,
@@ -790,20 +790,20 @@ const Ee = S.forwardRef(({ className: s, ...r }, a) => /* @__PURE__ */ e(
790
790
  "relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
791
791
  s
792
792
  ),
793
- ...r
793
+ ...n
794
794
  }
795
795
  ));
796
796
  Ee.displayName = os.displayName;
797
- const za = S.forwardRef(({ className: s, ...r }, a) => /* @__PURE__ */ e(
797
+ const qa = S.forwardRef(({ className: s, ...n }, a) => /* @__PURE__ */ e(
798
798
  is,
799
799
  {
800
800
  ref: a,
801
801
  className: X("aspect-square h-full w-full", s),
802
- ...r
802
+ ...n
803
803
  }
804
804
  ));
805
- za.displayName = is.displayName;
806
- const Fe = S.forwardRef(({ className: s, ...r }, a) => /* @__PURE__ */ e(
805
+ qa.displayName = is.displayName;
806
+ const Fe = S.forwardRef(({ className: s, ...n }, a) => /* @__PURE__ */ e(
807
807
  ls,
808
808
  {
809
809
  ref: a,
@@ -811,22 +811,22 @@ const Fe = S.forwardRef(({ className: s, ...r }, a) => /* @__PURE__ */ e(
811
811
  "flex h-full w-full items-center justify-center rounded-full bg-muted",
812
812
  s
813
813
  ),
814
- ...r
814
+ ...n
815
815
  }
816
816
  ));
817
817
  Fe.displayName = ls.displayName;
818
- function _a({
818
+ function za({
819
819
  open: s,
820
- onOpenChange: r,
820
+ onOpenChange: n,
821
821
  group: a,
822
822
  onUpdate: t
823
823
  }) {
824
- const [i, o] = w("members"), [l, m] = w(""), [h, f] = w([]), [u, c] = w([]), { data: p, isLoading: b, refetch: v } = Fs(a.id), x = a.type === "TENANT_GROUP" ? "tenant" : "organization", { users: M, isLoading: P } = Ts({
824
+ const [i, o] = w("members"), [l, m] = w(""), [h, f] = w([]), [u, c] = w([]), { data: p, isLoading: b, refetch: v } = Es(a.id), x = a.type === "TENANT_GROUP" ? "tenant" : "organization", { users: M, isLoading: P } = Fs({
825
825
  type: x,
826
826
  tenantId: a.tenantId || void 0,
827
827
  active: !0,
828
828
  limit: 100
829
- }), O = La(), G = Pa(), A = (p == null ? void 0 : p.members) || [], $ = ae(() => new Set(A.map((g) => g.userId)), [A]), N = ae(() => M.filter((g) => !$.has(g.id)), [M, $]), F = ae(() => {
829
+ }), O = ka(), G = La(), A = (p == null ? void 0 : p.members) || [], j = ae(() => new Set(A.map((g) => g.userId)), [A]), N = ae(() => M.filter((g) => !j.has(g.id)), [M, j]), T = ae(() => {
830
830
  if (!l) return N;
831
831
  const g = l.toLowerCase();
832
832
  return N.filter(
@@ -878,29 +878,29 @@ function _a({
878
878
  (L) => L.includes(g) ? L.filter((I) => I !== g) : [...L, g]
879
879
  );
880
880
  };
881
- return /* @__PURE__ */ e(E, { children: /* @__PURE__ */ e(oe, { open: s, onOpenChange: r, children: /* @__PURE__ */ n(ie, { className: "max-w-3xl max-h-[80vh]", "aria-describedby": "group-members-description", children: [
882
- /* @__PURE__ */ n(le, { children: [
881
+ return /* @__PURE__ */ e(E, { children: /* @__PURE__ */ e(oe, { open: s, onOpenChange: n, children: /* @__PURE__ */ r(ie, { className: "max-w-3xl max-h-[80vh]", "aria-describedby": "group-members-description", children: [
882
+ /* @__PURE__ */ r(le, { children: [
883
883
  /* @__PURE__ */ e(ce, { children: a.name }),
884
- /* @__PURE__ */ e("div", { className: "flex items-center gap-2 mt-1", children: /* @__PURE__ */ n("p", { className: "text-sm text-muted-foreground", children: [
884
+ /* @__PURE__ */ e("div", { className: "flex items-center gap-2 mt-1", children: /* @__PURE__ */ r("p", { className: "text-sm text-muted-foreground", children: [
885
885
  A.length,
886
886
  " ",
887
887
  A.length === 1 ? "member" : "members"
888
888
  ] }) }),
889
- /* @__PURE__ */ n("p", { id: "group-members-description", className: "sr-only", children: [
889
+ /* @__PURE__ */ r("p", { id: "group-members-description", className: "sr-only", children: [
890
890
  "Add or remove members from the ",
891
891
  a.name,
892
892
  " group"
893
893
  ] })
894
894
  ] }),
895
- /* @__PURE__ */ n(We, { value: i, onValueChange: (g) => {
895
+ /* @__PURE__ */ r(We, { value: i, onValueChange: (g) => {
896
896
  o(g), m(""), c([]);
897
897
  }, className: "mt-4", children: [
898
- /* @__PURE__ */ n(Je, { className: "grid w-full grid-cols-2", children: [
898
+ /* @__PURE__ */ r(Je, { className: "grid w-full grid-cols-2", children: [
899
899
  /* @__PURE__ */ e(re, { value: "members", children: "Current Members" }),
900
900
  /* @__PURE__ */ e(re, { value: "add", children: "Add Members" })
901
901
  ] }),
902
- /* @__PURE__ */ n(ne, { value: "members", className: "mt-4 space-y-4", children: [
903
- /* @__PURE__ */ n("div", { className: "relative", children: [
902
+ /* @__PURE__ */ r(ne, { value: "members", className: "mt-4 space-y-4", children: [
903
+ /* @__PURE__ */ r("div", { className: "relative", children: [
904
904
  /* @__PURE__ */ e(be, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }),
905
905
  /* @__PURE__ */ e(
906
906
  Q,
@@ -912,8 +912,8 @@ function _a({
912
912
  }
913
913
  )
914
914
  ] }),
915
- /* @__PURE__ */ e(ve, { className: u.length > 0 ? "h-[300px]" : "h-[350px]", children: b ? /* @__PURE__ */ e("div", { className: "space-y-2", children: [1, 2, 3].map((g) => /* @__PURE__ */ e(Ne, { className: "h-16 w-full" }, g)) }) : D.length === 0 ? /* @__PURE__ */ n("div", { className: "flex flex-col items-center justify-center py-12 text-muted-foreground", children: [
916
- /* @__PURE__ */ e(_, { className: "h-12 w-12 mb-3 opacity-50" }),
915
+ /* @__PURE__ */ e(ve, { className: u.length > 0 ? "h-[300px]" : "h-[350px]", children: b ? /* @__PURE__ */ e("div", { className: "space-y-2", children: [1, 2, 3].map((g) => /* @__PURE__ */ e(Ne, { className: "h-16 w-full" }, g)) }) : D.length === 0 ? /* @__PURE__ */ r("div", { className: "flex flex-col items-center justify-center py-12 text-muted-foreground", children: [
916
+ /* @__PURE__ */ e($, { className: "h-12 w-12 mb-3 opacity-50" }),
917
917
  /* @__PURE__ */ e("p", { className: "text-sm font-medium", children: l ? "No members found" : "No members yet" }),
918
918
  /* @__PURE__ */ e("p", { className: "text-xs mt-1", children: l ? "Try a different search" : 'Switch to the "Add Members" tab to add people to this group' })
919
919
  ] }) : /* @__PURE__ */ e("div", { className: "space-y-2", children: D.map((g) => /* @__PURE__ */ e(
@@ -925,8 +925,8 @@ function _a({
925
925
  },
926
926
  g.id
927
927
  )) }) }),
928
- u.length > 0 && /* @__PURE__ */ n("div", { className: "flex items-center justify-between pt-4 border-t", children: [
929
- /* @__PURE__ */ n("span", { className: "text-sm text-muted-foreground", children: [
928
+ u.length > 0 && /* @__PURE__ */ r("div", { className: "flex items-center justify-between pt-4 border-t", children: [
929
+ /* @__PURE__ */ r("span", { className: "text-sm text-muted-foreground", children: [
930
930
  u.length,
931
931
  " member",
932
932
  u.length !== 1 ? "s" : "",
@@ -939,10 +939,10 @@ function _a({
939
939
  size: "sm",
940
940
  onClick: me,
941
941
  disabled: G.isPending,
942
- children: G.isPending ? /* @__PURE__ */ n(E, { children: [
942
+ children: G.isPending ? /* @__PURE__ */ r(E, { children: [
943
943
  /* @__PURE__ */ e(H, { className: "mr-2 h-4 w-4 animate-spin" }),
944
944
  "Removing..."
945
- ] }) : /* @__PURE__ */ n(E, { children: [
945
+ ] }) : /* @__PURE__ */ r(E, { children: [
946
946
  /* @__PURE__ */ e(Xe, { className: "mr-2 h-4 w-4" }),
947
947
  "Remove Selected"
948
948
  ] })
@@ -950,8 +950,8 @@ function _a({
950
950
  )
951
951
  ] })
952
952
  ] }),
953
- /* @__PURE__ */ n(ne, { value: "add", className: "mt-4 space-y-4", children: [
954
- /* @__PURE__ */ n("div", { className: "relative", children: [
953
+ /* @__PURE__ */ r(ne, { value: "add", className: "mt-4 space-y-4", children: [
954
+ /* @__PURE__ */ r("div", { className: "relative", children: [
955
955
  /* @__PURE__ */ e(be, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }),
956
956
  /* @__PURE__ */ e(
957
957
  Q,
@@ -963,11 +963,11 @@ function _a({
963
963
  }
964
964
  )
965
965
  ] }),
966
- /* @__PURE__ */ e(ve, { className: "h-[300px]", children: P ? /* @__PURE__ */ e("div", { className: "space-y-2", children: [1, 2, 3].map((g) => /* @__PURE__ */ e(Ne, { className: "h-16 w-full" }, g)) }) : F.length === 0 ? /* @__PURE__ */ n("div", { className: "flex flex-col items-center justify-center py-12 text-muted-foreground", children: [
966
+ /* @__PURE__ */ e(ve, { className: "h-[300px]", children: P ? /* @__PURE__ */ e("div", { className: "space-y-2", children: [1, 2, 3].map((g) => /* @__PURE__ */ e(Ne, { className: "h-16 w-full" }, g)) }) : T.length === 0 ? /* @__PURE__ */ r("div", { className: "flex flex-col items-center justify-center py-12 text-muted-foreground", children: [
967
967
  /* @__PURE__ */ e(ye, { className: "h-12 w-12 mb-3 opacity-50" }),
968
968
  /* @__PURE__ */ e("p", { className: "text-sm font-medium", children: "No available users" }),
969
969
  /* @__PURE__ */ e("p", { className: "text-xs mt-1", children: l ? "Try a different search" : "All eligible users are already members" })
970
- ] }) : /* @__PURE__ */ e("div", { className: "space-y-2", children: F.map((g) => /* @__PURE__ */ e(
970
+ ] }) : /* @__PURE__ */ e("div", { className: "space-y-2", children: T.map((g) => /* @__PURE__ */ e(
971
971
  ja,
972
972
  {
973
973
  user: g,
@@ -976,8 +976,8 @@ function _a({
976
976
  },
977
977
  g.id
978
978
  )) }) }),
979
- h.length > 0 && /* @__PURE__ */ n("div", { className: "flex items-center justify-between pt-4 border-t", children: [
980
- /* @__PURE__ */ n("span", { className: "text-sm text-muted-foreground", children: [
979
+ h.length > 0 && /* @__PURE__ */ r("div", { className: "flex items-center justify-between pt-4 border-t", children: [
980
+ /* @__PURE__ */ r("span", { className: "text-sm text-muted-foreground", children: [
981
981
  h.length,
982
982
  " user",
983
983
  h.length !== 1 ? "s" : "",
@@ -988,10 +988,10 @@ function _a({
988
988
  {
989
989
  onClick: U,
990
990
  disabled: O.isPending,
991
- children: O.isPending ? /* @__PURE__ */ n(E, { children: [
991
+ children: O.isPending ? /* @__PURE__ */ r(E, { children: [
992
992
  /* @__PURE__ */ e(H, { className: "mr-2 h-4 w-4 animate-spin" }),
993
993
  "Adding..."
994
- ] }) : /* @__PURE__ */ n(E, { children: [
994
+ ] }) : /* @__PURE__ */ r(E, { children: [
995
995
  /* @__PURE__ */ e(ye, { className: "mr-2 h-4 w-4" }),
996
996
  "Add Members"
997
997
  ] })
@@ -1004,20 +1004,20 @@ function _a({
1004
1004
  }
1005
1005
  function $a({
1006
1006
  member: s,
1007
- selected: r,
1007
+ selected: n,
1008
1008
  onToggle: a
1009
1009
  }) {
1010
1010
  var i, o, l, m;
1011
1011
  const t = ((o = (i = s.user) == null ? void 0 : i.name) == null ? void 0 : o.split(" ").map((h) => h[0]).join("").toUpperCase()) || "?";
1012
- return /* @__PURE__ */ n(
1012
+ return /* @__PURE__ */ r(
1013
1013
  "div",
1014
1014
  {
1015
1015
  className: "flex items-center gap-3 p-3 rounded-lg border bg-card hover:bg-muted/50 cursor-pointer",
1016
1016
  onClick: a,
1017
1017
  children: [
1018
- /* @__PURE__ */ e(Ye, { checked: r }),
1018
+ /* @__PURE__ */ e(Ye, { checked: n }),
1019
1019
  /* @__PURE__ */ e(Ee, { className: "h-8 w-8", children: /* @__PURE__ */ e(Fe, { className: "text-xs", children: t }) }),
1020
- /* @__PURE__ */ n("div", { className: "flex-1", children: [
1020
+ /* @__PURE__ */ r("div", { className: "flex-1", children: [
1021
1021
  /* @__PURE__ */ e("p", { className: "text-sm font-medium", children: ((l = s.user) == null ? void 0 : l.name) || "Unknown User" }),
1022
1022
  /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: (m = s.user) == null ? void 0 : m.email })
1023
1023
  ] })
@@ -1027,20 +1027,20 @@ function $a({
1027
1027
  }
1028
1028
  function ja({
1029
1029
  user: s,
1030
- selected: r,
1030
+ selected: n,
1031
1031
  onToggle: a
1032
1032
  }) {
1033
1033
  var i;
1034
1034
  const t = ((i = s.name) == null ? void 0 : i.split(" ").map((o) => o[0]).join("").toUpperCase()) || "?";
1035
- return /* @__PURE__ */ n(
1035
+ return /* @__PURE__ */ r(
1036
1036
  "div",
1037
1037
  {
1038
1038
  className: "flex items-center gap-3 p-3 rounded-lg border bg-card hover:bg-muted/50 cursor-pointer",
1039
1039
  onClick: a,
1040
1040
  children: [
1041
- /* @__PURE__ */ e(Ye, { checked: r }),
1041
+ /* @__PURE__ */ e(Ye, { checked: n }),
1042
1042
  /* @__PURE__ */ e(Ee, { className: "h-8 w-8", children: /* @__PURE__ */ e(Fe, { className: "text-xs", children: t }) }),
1043
- /* @__PURE__ */ n("div", { className: "flex-1", children: [
1043
+ /* @__PURE__ */ r("div", { className: "flex-1", children: [
1044
1044
  /* @__PURE__ */ e("p", { className: "text-sm font-medium", children: s.name }),
1045
1045
  /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: s.email })
1046
1046
  ] })
@@ -1048,11 +1048,11 @@ function ja({
1048
1048
  }
1049
1049
  );
1050
1050
  }
1051
- function Va({
1051
+ function _a({
1052
1052
  open: s,
1053
- onOpenChange: r
1053
+ onOpenChange: n
1054
1054
  }) {
1055
- const [a, t] = w("groups"), [i, o] = w(""), [l, m] = w(null), [h, f] = w(!1), [u, c] = w(null), { tokenProps: p } = R(), { currentUser: b } = Ze(), v = ka(), x = (b == null ? void 0 : b.type) === "tenant", M = p == null ? void 0 : p.tenantId, { groups: P, isLoading: O, refetch: G } = Gs({
1055
+ const [a, t] = w("groups"), [i, o] = w(""), [l, m] = w(null), [h, f] = w(!1), [u, c] = w(null), { tokenProps: p } = R(), { currentUser: b } = Ze(), v = Ma(), x = (b == null ? void 0 : b.type) === "tenant", M = p == null ? void 0 : p.tenantId, { groups: P, isLoading: O, refetch: G } = Ts({
1056
1056
  type: x ? "TENANT_GROUP" : "all",
1057
1057
  tenantId: x ? M : void 0,
1058
1058
  includeMembers: !1
@@ -1061,7 +1061,7 @@ function Va({
1061
1061
  var U;
1062
1062
  return D.name.toLowerCase().includes(i.toLowerCase()) || ((U = D.description) == null ? void 0 : U.toLowerCase().includes(i.toLowerCase()));
1063
1063
  }
1064
- ), $ = async () => {
1064
+ ), j = async () => {
1065
1065
  if (u)
1066
1066
  try {
1067
1067
  await v.mutateAsync(u.id), c(null), G();
@@ -1070,31 +1070,31 @@ function Va({
1070
1070
  }
1071
1071
  }, N = (D) => {
1072
1072
  m(D), f(!0);
1073
- }, F = () => {
1073
+ }, T = () => {
1074
1074
  t("groups"), G();
1075
1075
  };
1076
- return /* @__PURE__ */ n(E, { children: [
1077
- /* @__PURE__ */ e(oe, { open: s, onOpenChange: r, children: /* @__PURE__ */ n(ie, { className: "max-w-4xl max-h-[80vh]", children: [
1078
- /* @__PURE__ */ n(le, { children: [
1079
- /* @__PURE__ */ n(ce, { className: "flex items-center gap-2", children: [
1080
- /* @__PURE__ */ e(_, { className: "h-5 w-5" }),
1076
+ return /* @__PURE__ */ r(E, { children: [
1077
+ /* @__PURE__ */ e(oe, { open: s, onOpenChange: n, children: /* @__PURE__ */ r(ie, { className: "max-w-4xl max-h-[80vh]", children: [
1078
+ /* @__PURE__ */ r(le, { children: [
1079
+ /* @__PURE__ */ r(ce, { className: "flex items-center gap-2", children: [
1080
+ /* @__PURE__ */ e($, { className: "h-5 w-5" }),
1081
1081
  "Group Management"
1082
1082
  ] }),
1083
1083
  /* @__PURE__ */ e(Pe, { children: "Manage your groups, create new groups, and control group membership" })
1084
1084
  ] }),
1085
- /* @__PURE__ */ n(We, { value: a, onValueChange: t, className: "mt-4", children: [
1086
- /* @__PURE__ */ n(Je, { className: "grid w-full grid-cols-2", children: [
1087
- /* @__PURE__ */ n(re, { value: "groups", className: "flex items-center gap-2", children: [
1088
- /* @__PURE__ */ e(_, { className: "h-4 w-4" }),
1085
+ /* @__PURE__ */ r(We, { value: a, onValueChange: t, className: "mt-4", children: [
1086
+ /* @__PURE__ */ r(Je, { className: "grid w-full grid-cols-2", children: [
1087
+ /* @__PURE__ */ r(re, { value: "groups", className: "flex items-center gap-2", children: [
1088
+ /* @__PURE__ */ e($, { className: "h-4 w-4" }),
1089
1089
  "Groups"
1090
1090
  ] }),
1091
- /* @__PURE__ */ n(re, { value: "create", className: "flex items-center gap-2", children: [
1091
+ /* @__PURE__ */ r(re, { value: "create", className: "flex items-center gap-2", children: [
1092
1092
  /* @__PURE__ */ e(Le, { className: "h-4 w-4" }),
1093
1093
  "Create Group"
1094
1094
  ] })
1095
1095
  ] }),
1096
- /* @__PURE__ */ e(ne, { value: "groups", className: "mt-4", children: /* @__PURE__ */ n("div", { className: "space-y-4", children: [
1097
- /* @__PURE__ */ n("div", { className: "relative", children: [
1096
+ /* @__PURE__ */ e(ne, { value: "groups", className: "mt-4", children: /* @__PURE__ */ r("div", { className: "space-y-4", children: [
1097
+ /* @__PURE__ */ r("div", { className: "relative", children: [
1098
1098
  /* @__PURE__ */ e(be, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }),
1099
1099
  /* @__PURE__ */ e(
1100
1100
  Q,
@@ -1106,12 +1106,12 @@ function Va({
1106
1106
  }
1107
1107
  )
1108
1108
  ] }),
1109
- /* @__PURE__ */ e(ve, { className: "h-[400px]", children: O ? /* @__PURE__ */ e("div", { className: "space-y-3", children: [1, 2, 3].map((D) => /* @__PURE__ */ e(Ne, { className: "h-24 w-full" }, D)) }) : A.length === 0 ? /* @__PURE__ */ n("div", { className: "flex flex-col items-center justify-center py-12 text-muted-foreground", children: [
1110
- /* @__PURE__ */ e(_, { className: "h-12 w-12 mb-3 opacity-50" }),
1109
+ /* @__PURE__ */ e(ve, { className: "h-[400px]", children: O ? /* @__PURE__ */ e("div", { className: "space-y-3", children: [1, 2, 3].map((D) => /* @__PURE__ */ e(Ne, { className: "h-24 w-full" }, D)) }) : A.length === 0 ? /* @__PURE__ */ r("div", { className: "flex flex-col items-center justify-center py-12 text-muted-foreground", children: [
1110
+ /* @__PURE__ */ e($, { className: "h-12 w-12 mb-3 opacity-50" }),
1111
1111
  /* @__PURE__ */ e("p", { className: "text-sm font-medium", children: "No groups found" }),
1112
1112
  /* @__PURE__ */ e("p", { className: "text-xs mt-1", children: i ? "Try a different search" : "Create your first group to get started" })
1113
1113
  ] }) : /* @__PURE__ */ e("div", { className: "space-y-3", children: A.map((D) => /* @__PURE__ */ e(
1114
- Qa,
1114
+ Va,
1115
1115
  {
1116
1116
  group: D,
1117
1117
  onManageMembers: () => N(D),
@@ -1122,9 +1122,9 @@ function Va({
1122
1122
  )) }) })
1123
1123
  ] }) }),
1124
1124
  /* @__PURE__ */ e(ne, { value: "create", className: "mt-4", children: /* @__PURE__ */ e(
1125
- Aa,
1125
+ Pa,
1126
1126
  {
1127
- onSuccess: F,
1127
+ onSuccess: T,
1128
1128
  tenantId: M,
1129
1129
  isTenantUser: x
1130
1130
  }
@@ -1132,7 +1132,7 @@ function Va({
1132
1132
  ] })
1133
1133
  ] }) }),
1134
1134
  l && /* @__PURE__ */ e(
1135
- _a,
1135
+ za,
1136
1136
  {
1137
1137
  open: h,
1138
1138
  onOpenChange: f,
@@ -1141,28 +1141,28 @@ function Va({
1141
1141
  }
1142
1142
  ),
1143
1143
  /* @__PURE__ */ e(
1144
- Rs,
1144
+ Gs,
1145
1145
  {
1146
1146
  open: !!u,
1147
1147
  onOpenChange: () => c(null),
1148
- children: /* @__PURE__ */ n(Os, { children: [
1149
- /* @__PURE__ */ n(Us, { children: [
1150
- /* @__PURE__ */ e(qs, { children: "Delete Group" }),
1151
- /* @__PURE__ */ n(zs, { children: [
1148
+ children: /* @__PURE__ */ r(Rs, { children: [
1149
+ /* @__PURE__ */ r(Os, { children: [
1150
+ /* @__PURE__ */ e(Us, { children: "Delete Group" }),
1151
+ /* @__PURE__ */ r(qs, { children: [
1152
1152
  'Are you sure you want to delete "',
1153
1153
  u == null ? void 0 : u.name,
1154
1154
  '"? This action cannot be undone and will remove all members from the group.'
1155
1155
  ] })
1156
1156
  ] }),
1157
- /* @__PURE__ */ n(_s, { children: [
1157
+ /* @__PURE__ */ r(zs, { children: [
1158
1158
  /* @__PURE__ */ e($s, { children: "Cancel" }),
1159
1159
  /* @__PURE__ */ e(
1160
1160
  js,
1161
1161
  {
1162
- onClick: $,
1162
+ onClick: j,
1163
1163
  disabled: v.isPending,
1164
1164
  className: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
1165
- children: v.isPending ? /* @__PURE__ */ n(E, { children: [
1165
+ children: v.isPending ? /* @__PURE__ */ r(E, { children: [
1166
1166
  /* @__PURE__ */ e(H, { className: "mr-2 h-4 w-4 animate-spin" }),
1167
1167
  "Deleting..."
1168
1168
  ] }) : "Delete Group"
@@ -1174,39 +1174,39 @@ function Va({
1174
1174
  )
1175
1175
  ] });
1176
1176
  }
1177
- function Qa({
1177
+ function Va({
1178
1178
  group: s,
1179
- onManageMembers: r,
1179
+ onManageMembers: n,
1180
1180
  onDelete: a,
1181
1181
  currentUserId: t
1182
1182
  }) {
1183
1183
  const i = s.createdBy === t;
1184
- return /* @__PURE__ */ e("div", { className: "rounded-lg border bg-card p-4 transition-colors hover:bg-muted/50", children: /* @__PURE__ */ n("div", { className: "flex items-start justify-between gap-3", children: [
1185
- /* @__PURE__ */ n("div", { className: "flex-1 space-y-2", children: [
1186
- /* @__PURE__ */ n("div", { children: [
1184
+ return /* @__PURE__ */ e("div", { className: "rounded-lg border bg-card p-4 transition-colors hover:bg-muted/50", children: /* @__PURE__ */ r("div", { className: "flex items-start justify-between gap-3", children: [
1185
+ /* @__PURE__ */ r("div", { className: "flex-1 space-y-2", children: [
1186
+ /* @__PURE__ */ r("div", { children: [
1187
1187
  /* @__PURE__ */ e("h4", { className: "font-medium", children: s.name }),
1188
1188
  s.description && /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground mt-1", children: s.description })
1189
1189
  ] }),
1190
- /* @__PURE__ */ n("div", { className: "flex flex-wrap items-center gap-3 text-xs text-muted-foreground", children: [
1191
- /* @__PURE__ */ n("span", { className: "flex items-center gap-1", children: [
1192
- /* @__PURE__ */ e(_, { className: "h-3 w-3" }),
1190
+ /* @__PURE__ */ r("div", { className: "flex flex-wrap items-center gap-3 text-xs text-muted-foreground", children: [
1191
+ /* @__PURE__ */ r("span", { className: "flex items-center gap-1", children: [
1192
+ /* @__PURE__ */ e($, { className: "h-3 w-3" }),
1193
1193
  s.memberCount,
1194
1194
  " ",
1195
1195
  s.memberCount === 1 ? "member" : "members"
1196
1196
  ] }),
1197
- /* @__PURE__ */ n("span", { children: [
1197
+ /* @__PURE__ */ r("span", { children: [
1198
1198
  "Created ",
1199
- Vs(new Date(s.createdAt), "MMM d, yyyy")
1199
+ _s(new Date(s.createdAt), "MMM d, yyyy")
1200
1200
  ] })
1201
1201
  ] })
1202
1202
  ] }),
1203
- /* @__PURE__ */ n("div", { className: "flex items-center gap-1", children: [
1203
+ /* @__PURE__ */ r("div", { className: "flex items-center gap-1", children: [
1204
1204
  /* @__PURE__ */ e(
1205
1205
  k,
1206
1206
  {
1207
1207
  variant: "ghost",
1208
1208
  size: "sm",
1209
- onClick: r,
1209
+ onClick: n,
1210
1210
  title: "Manage members",
1211
1211
  children: /* @__PURE__ */ e(ye, { className: "h-4 w-4" })
1212
1212
  }
@@ -1229,9 +1229,9 @@ function Ya() {
1229
1229
  var Re, Oe, Ue;
1230
1230
  const {
1231
1231
  authToken: s,
1232
- tokenProps: r,
1232
+ tokenProps: n,
1233
1233
  id: a
1234
- } = R(), { isLocalDev: t } = Qs(), { permissions: i } = Hs(), o = Bs(), { isLoading: l } = Ks();
1234
+ } = R(), { isLocalDev: t } = Vs(), { permissions: i } = Qs(), o = Hs(), { isLoading: l } = Bs();
1235
1235
  y((d) => d.theme);
1236
1236
  const m = y((d) => d.lenses), h = y((d) => d.selectedLensId), f = m == null ? void 0 : m.find((d) => d.id === h), u = y((d) => d.dashboard);
1237
1237
  y((d) => d.selectedSheetId);
@@ -1239,15 +1239,15 @@ function Ya() {
1239
1239
  (d) => d.isDashboardEditing
1240
1240
  ), { setDashboardTitle: p } = y((d) => d.actions), [b, v] = w(!1), [x, M] = w(!1), [P, O] = w(!1), G = y((d) => d.isDashboardPanelOpen), A = y(
1241
1241
  (d) => d.actions.setIsDashboardPanelOpen
1242
- ), $ = y((d) => d.filterValues), N = y((d) => d.isVisualEditing);
1243
- _e((d) => d.card);
1244
- const F = se(
1242
+ ), j = y((d) => d.filterValues), N = y((d) => d.isVisualEditing);
1243
+ $e((d) => d.card);
1244
+ const T = se(
1245
1245
  (d) => d.selectedDashboard
1246
1246
  ), D = se(
1247
1247
  (d) => d.initialDashboard
1248
1248
  );
1249
- se((d) => d.selectedVisual), y((d) => d.selectedFrameId), _e((d) => d.frame);
1250
- const U = F ? (Oe = F == null ? void 0 : F.permissions) == null ? void 0 : Oe.canEdit : (Re = D == null ? void 0 : D.permissions) == null ? void 0 : Re.canEdit, me = y((d) => d.showFilters), he = y(
1249
+ se((d) => d.selectedVisual), y((d) => d.selectedFrameId), $e((d) => d.frame);
1250
+ const U = T ? (Oe = T == null ? void 0 : T.permissions) == null ? void 0 : Oe.canEdit : (Re = D == null ? void 0 : D.permissions) == null ? void 0 : Re.canEdit, me = y((d) => d.showFilters), he = y(
1251
1251
  (d) => d.showDashboardJSON
1252
1252
  ), B = y((d) => d.onSaveFunction), g = y(
1253
1253
  (d) => d.actions.setShowFilters
@@ -1255,10 +1255,10 @@ function Ya() {
1255
1255
  (d) => d.actions
1256
1256
  ), { setInitialDashboard: q, clearSelectedDashboard: Y } = se(
1257
1257
  (d) => d.actions
1258
- ), { resources: z } = Ws(fe.DASHBOARD), { currentUser: cs } = Ze(), ds = Js(cs), j = F || D, Te = j ? {
1259
- id: j.id,
1260
- title: (u == null ? void 0 : u.title) || j.title || "Dashboard"
1261
- } : null, { handleAddNewFrame: us } = Xs(), [pe, ge] = w(!1), Z = Ys(fe.DASHBOARD), ms = async (d, T) => {
1258
+ ), { resources: z } = Ks(fe.DASHBOARD), { currentUser: cs } = Ze(), ds = Ws(cs), _ = T || D, Te = _ ? {
1259
+ id: _.id,
1260
+ title: (u == null ? void 0 : u.title) || _.title || "Dashboard"
1261
+ } : null, { handleAddNewFrame: us } = Js(), [pe, ge] = w(!1), Z = Xs(fe.DASHBOARD), ms = async (d, F) => {
1262
1262
  if (!(u != null && u.id)) {
1263
1263
  console.log("No dashboard ID found");
1264
1264
  return;
@@ -1266,7 +1266,7 @@ function Ya() {
1266
1266
  console.log("Updating dashboard title:", {
1267
1267
  dashboardId: u.id,
1268
1268
  newTitle: d,
1269
- previousTitle: T
1269
+ previousTitle: F
1270
1270
  }), Z.mutate(
1271
1271
  {
1272
1272
  resourceId: u.id,
@@ -1277,23 +1277,23 @@ function Ya() {
1277
1277
  console.log("Dashboard title updated successfully"), C.success("Dashboard title updated");
1278
1278
  },
1279
1279
  onError: (K) => {
1280
- console.error("Failed to update dashboard title:", K), C.error("Failed to update dashboard title"), p(T);
1280
+ console.error("Failed to update dashboard title:", K), C.error("Failed to update dashboard title"), p(F);
1281
1281
  }
1282
1282
  }
1283
1283
  );
1284
1284
  };
1285
- oa(() => {
1285
+ na(() => {
1286
1286
  if (z && z.length > 0) {
1287
1287
  const d = u == null ? void 0 : u.id;
1288
1288
  if (d) {
1289
- const T = z.find(
1289
+ const F = z.find(
1290
1290
  (K) => K.id === d
1291
1291
  );
1292
- T && q(T);
1292
+ F && q(F);
1293
1293
  }
1294
1294
  }
1295
1295
  }, [z, u == null ? void 0 : u.id, q]);
1296
- const ee = r.orgUserId || r.tenantId, hs = c && !N && ee && U, ps = () => {
1296
+ const ee = n.orgUserId || n.tenantId, hs = c && !N && ee && U, ps = () => {
1297
1297
  L(!0);
1298
1298
  };
1299
1299
  async function gs() {
@@ -1301,13 +1301,13 @@ function Ya() {
1301
1301
  u
1302
1302
  );
1303
1303
  ge(!0);
1304
- const T = {
1304
+ const F = {
1305
1305
  template: d
1306
1306
  };
1307
1307
  Z.mutate(
1308
1308
  {
1309
1309
  resourceId: d.id,
1310
- data: T
1310
+ data: F
1311
1311
  },
1312
1312
  {
1313
1313
  onSuccess: () => {
@@ -1323,13 +1323,13 @@ function Ya() {
1323
1323
  if (v(!0), !h || !f) return;
1324
1324
  const d = we(
1325
1325
  u
1326
- ), T = JSON.stringify(d), K = {
1326
+ ), F = JSON.stringify(d), K = {
1327
1327
  ...f,
1328
- template: T,
1329
- filterValues: $
1328
+ template: F,
1329
+ filterValues: j
1330
1330
  };
1331
1331
  await xe(
1332
- r.apiServiceUrl,
1332
+ n.apiServiceUrl,
1333
1333
  K,
1334
1334
  s == null ? void 0 : s.accessToken
1335
1335
  ), C.success("Lens saved"), B == null || B(d), v(!1);
@@ -1341,15 +1341,15 @@ function Ya() {
1341
1341
  dashboardId: u == null ? void 0 : u.id,
1342
1342
  currentLensName: f == null ? void 0 : f.name
1343
1343
  });
1344
- const bs = r.orgUserId || r.tenantId && r.endUserId && r.endUserEmail, vs = F && !(r != null && r.dashboard_id) && !a;
1345
- return /* @__PURE__ */ n(
1344
+ const bs = n.orgUserId || n.tenantId && n.endUserId && n.endUserEmail;
1345
+ return /* @__PURE__ */ r(
1346
1346
  "div",
1347
1347
  {
1348
1348
  className: "flex h-11 items-center justify-between gap-2 border-b px-4 py-2",
1349
1349
  role: "dashboard-controls",
1350
1350
  children: [
1351
- /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
1352
- bs && /* @__PURE__ */ n(E, { children: [
1351
+ /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
1352
+ bs && /* @__PURE__ */ r(E, { children: [
1353
1353
  /* @__PURE__ */ e(
1354
1354
  V,
1355
1355
  {
@@ -1359,10 +1359,10 @@ function Ya() {
1359
1359
  A(!G);
1360
1360
  },
1361
1361
  className: "h-7 p-2",
1362
- children: /* @__PURE__ */ e(ua, { className: "h-4 w-4" })
1362
+ children: /* @__PURE__ */ e(da, { className: "h-4 w-4" })
1363
1363
  }
1364
1364
  ),
1365
- vs && !N && /* @__PURE__ */ e(
1365
+ o && !N && /* @__PURE__ */ e(
1366
1366
  V,
1367
1367
  {
1368
1368
  "aria-label": "Dashboard Hub",
@@ -1373,11 +1373,11 @@ function Ya() {
1373
1373
  }
1374
1374
  )
1375
1375
  ] }),
1376
- !N && o && (l ? /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
1376
+ !N && o && (l ? /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
1377
1377
  /* @__PURE__ */ e(H, { className: "h-3 w-3 animate-spin text-muted-foreground" }),
1378
1378
  /* @__PURE__ */ e("span", { className: "text-sm text-muted-foreground", children: "Loading..." })
1379
1379
  ] }) : /* @__PURE__ */ e(
1380
- Zs,
1380
+ Ys,
1381
1381
  {
1382
1382
  value: Ge || "Untitled Dashboard",
1383
1383
  onSave: (d) => {
@@ -1386,8 +1386,8 @@ function Ya() {
1386
1386
  canEditDashboard: U,
1387
1387
  dashboardId: u == null ? void 0 : u.id
1388
1388
  });
1389
- const T = (u == null ? void 0 : u.title) || "";
1390
- p(d), ms(d, T);
1389
+ const F = (u == null ? void 0 : u.title) || "";
1390
+ p(d), ms(d, F);
1391
1391
  },
1392
1392
  isEditable: U && !f,
1393
1393
  displayClassName: "text-sm font-medium",
@@ -1397,38 +1397,38 @@ function Ya() {
1397
1397
  }
1398
1398
  ))
1399
1399
  ] }),
1400
- /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
1401
- N && /* @__PURE__ */ n(E, { children: [
1402
- /* @__PURE__ */ e(ia, { className: "mr-2" }),
1403
- /* @__PURE__ */ e(la, { className: "h-7" })
1400
+ /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
1401
+ N && /* @__PURE__ */ r(E, { children: [
1402
+ /* @__PURE__ */ e(oa, { className: "mr-2" }),
1403
+ /* @__PURE__ */ e(ia, { className: "h-7" })
1404
1404
  ] }),
1405
1405
  t && !N && /* @__PURE__ */ e(
1406
1406
  V,
1407
1407
  {
1408
1408
  tooltip: "Invalidate Token",
1409
- onClick: () => ea(r.apiServiceUrl),
1409
+ onClick: () => Zs(n.apiServiceUrl),
1410
1410
  className: "h-7 p-2",
1411
- children: /* @__PURE__ */ e(ha, { className: "h-4 w-4" })
1411
+ children: /* @__PURE__ */ e(ma, { className: "h-4 w-4" })
1412
1412
  }
1413
1413
  ),
1414
- !N && o && /* @__PURE__ */ e(wa, {}),
1415
- !N && o && /* @__PURE__ */ e(ca, {}),
1414
+ !N && o && /* @__PURE__ */ e(ya, {}),
1415
+ !N && o && /* @__PURE__ */ e(la, {}),
1416
1416
  !N && o && ds && /* @__PURE__ */ e(
1417
1417
  V,
1418
1418
  {
1419
1419
  tooltip: "Manage Groups",
1420
1420
  onClick: () => O(!0),
1421
1421
  className: "h-7 p-2",
1422
- children: /* @__PURE__ */ e(_, { className: "h-4 w-4" })
1422
+ children: /* @__PURE__ */ e($, { className: "h-4 w-4" })
1423
1423
  }
1424
1424
  ),
1425
- !N && o && ((Ue = j == null ? void 0 : j.permissions) == null ? void 0 : Ue.canShare) && /* @__PURE__ */ e(
1425
+ !N && o && ((Ue = _ == null ? void 0 : _.permissions) == null ? void 0 : Ue.canShare) && /* @__PURE__ */ e(
1426
1426
  V,
1427
1427
  {
1428
1428
  tooltip: "Share Dashboard",
1429
1429
  onClick: () => M(!0),
1430
1430
  className: "h-7 p-2",
1431
- children: /* @__PURE__ */ e(sa, { className: "h-4 w-4" })
1431
+ children: /* @__PURE__ */ e(ea, { className: "h-4 w-4" })
1432
1432
  }
1433
1433
  ),
1434
1434
  !me && !N && c && i.canUseFilters && o && /* @__PURE__ */ e(
@@ -1438,12 +1438,12 @@ function Ya() {
1438
1438
  variant: "outline",
1439
1439
  onClick: () => g(!0),
1440
1440
  size: "sm",
1441
- children: /* @__PURE__ */ e(aa, { className: "h-4 w-4" })
1441
+ children: /* @__PURE__ */ e(sa, { className: "h-4 w-4" })
1442
1442
  }
1443
1443
  ),
1444
- c && !N && ee && t && o && /* @__PURE__ */ e(Na, {}),
1445
- !N && ee && t && o && /* @__PURE__ */ e(ya, {}),
1446
- c && !N && ee && f && t && o && /* @__PURE__ */ n(
1444
+ c && !N && ee && t && o && /* @__PURE__ */ e(va, {}),
1445
+ !N && ee && t && o && /* @__PURE__ */ e(Na, {}),
1446
+ c && !N && ee && f && t && o && /* @__PURE__ */ r(
1447
1447
  k,
1448
1448
  {
1449
1449
  className: "h-7 p-2",
@@ -1452,12 +1452,12 @@ function Ya() {
1452
1452
  onClick: fs,
1453
1453
  size: "sm",
1454
1454
  children: [
1455
- /* @__PURE__ */ e($e, { className: "mr-2 h-4 w-4" }),
1455
+ /* @__PURE__ */ e(je, { className: "mr-2 h-4 w-4" }),
1456
1456
  "Save Lens"
1457
1457
  ]
1458
1458
  }
1459
1459
  ),
1460
- c && !N && o && /* @__PURE__ */ n(
1460
+ c && !N && o && /* @__PURE__ */ r(
1461
1461
  k,
1462
1462
  {
1463
1463
  variant: "outline",
@@ -1471,7 +1471,7 @@ function Ya() {
1471
1471
  ]
1472
1472
  }
1473
1473
  ),
1474
- !N && !c && i.canEdit && o && /* @__PURE__ */ n(
1474
+ !N && !c && i.canEdit && o && /* @__PURE__ */ r(
1475
1475
  k,
1476
1476
  {
1477
1477
  variant: "outline",
@@ -1479,12 +1479,12 @@ function Ya() {
1479
1479
  onClick: ps,
1480
1480
  size: "sm",
1481
1481
  children: [
1482
- /* @__PURE__ */ e(ta, { className: "mr-2 h-4 w-4" }),
1482
+ /* @__PURE__ */ e(aa, { className: "mr-2 h-4 w-4" }),
1483
1483
  "Edit"
1484
1484
  ]
1485
1485
  }
1486
1486
  ),
1487
- hs && o && /* @__PURE__ */ n(
1487
+ hs && o && /* @__PURE__ */ r(
1488
1488
  k,
1489
1489
  {
1490
1490
  className: "h-7 p-2",
@@ -1492,7 +1492,7 @@ function Ya() {
1492
1492
  onClick: gs,
1493
1493
  size: "sm",
1494
1494
  children: [
1495
- pe ? /* @__PURE__ */ e(H, { className: "mr-2 h-4 w-4 animate-spin" }) : /* @__PURE__ */ e($e, { className: "mr-2 h-4 w-4" }),
1495
+ pe ? /* @__PURE__ */ e(H, { className: "mr-2 h-4 w-4 animate-spin" }) : /* @__PURE__ */ e(je, { className: "mr-2 h-4 w-4" }),
1496
1496
  pe ? "Saving..." : "Save"
1497
1497
  ]
1498
1498
  }
@@ -1504,11 +1504,11 @@ function Ya() {
1504
1504
  onClick: () => I(!he),
1505
1505
  size: "sm",
1506
1506
  variant: "ghost",
1507
- children: /* @__PURE__ */ e(ra, { className: "h-4 w-4" })
1507
+ children: /* @__PURE__ */ e(ta, { className: "h-4 w-4" })
1508
1508
  }
1509
1509
  ) }),
1510
- !N && t && /* @__PURE__ */ e(fa, {}),
1511
- c && !N && o && /* @__PURE__ */ n(
1510
+ !N && t && /* @__PURE__ */ e(ga, {}),
1511
+ c && !N && o && /* @__PURE__ */ r(
1512
1512
  k,
1513
1513
  {
1514
1514
  variant: "outline",
@@ -1523,7 +1523,7 @@ function Ya() {
1523
1523
  }
1524
1524
  ),
1525
1525
  x && Te && /* @__PURE__ */ e(
1526
- na,
1526
+ ra,
1527
1527
  {
1528
1528
  resource: Te,
1529
1529
  resourceType: fe.DASHBOARD,
@@ -1531,7 +1531,7 @@ function Ya() {
1531
1531
  }
1532
1532
  ),
1533
1533
  /* @__PURE__ */ e(
1534
- Va,
1534
+ _a,
1535
1535
  {
1536
1536
  open: P,
1537
1537
  onOpenChange: O