react-semaphor 0.1.372 → 0.1.374

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 (53) hide show
  1. package/dist/analytics-protocol/index.cjs +1 -1
  2. package/dist/analytics-protocol/index.js +1 -1
  3. package/dist/chunks/{calendar-preferences-dialog-Dn6o2r2Y.js → calendar-preferences-dialog-94DoRSW_.js} +1 -1
  4. package/dist/chunks/{calendar-preferences-dialog-ClBAkMmF.js → calendar-preferences-dialog-DmBRXOH6.js} +1 -1
  5. package/dist/chunks/{dashboard-briefing-launcher-BO-kXtEd.js → dashboard-briefing-launcher-CAFCkwG3.js} +1 -1
  6. package/dist/chunks/{dashboard-briefing-launcher-D3Xfc_26.js → dashboard-briefing-launcher-l0ylhcAv.js} +104 -104
  7. package/dist/chunks/{dashboard-controls-DcXMFgGR.js → dashboard-controls-BX47yuCH.js} +1 -1
  8. package/dist/chunks/{dashboard-controls-B3sdy_Zx.js → dashboard-controls-DyzG0r5f.js} +167 -167
  9. package/dist/chunks/{dashboard-json-BWfkEy48.js → dashboard-json-B8kke4ES.js} +1 -1
  10. package/dist/chunks/{dashboard-json-CFURS_OR.js → dashboard-json-BlPA6wRT.js} +1 -1
  11. package/dist/chunks/{edit-dashboard-visual-DjdhKiP2.js → edit-dashboard-visual-CgJxTZLJ.js} +6592 -6565
  12. package/dist/chunks/{edit-dashboard-visual-BD2AJLiT.js → edit-dashboard-visual-DA8SaE4h.js} +37 -37
  13. package/dist/chunks/index-BJ971AL_.js +1361 -0
  14. package/dist/chunks/{index-C0Qnfr_7.js → index-BiDFY4Gr.js} +36742 -34869
  15. package/dist/chunks/{resource-management-panel-YvIfaphX.js → resource-management-panel-Bssc5uaX.js} +51 -51
  16. package/dist/chunks/{resource-management-panel-DytUMSGA.js → resource-management-panel-C14F7VSc.js} +1 -1
  17. package/dist/chunks/{use-create-flow-overlay-state-BETXykC9.js → use-create-flow-overlay-state-BGhwg121.js} +35 -35
  18. package/dist/chunks/{use-create-flow-overlay-state-CwIG1Ekp.js → use-create-flow-overlay-state-DAVI3fO1.js} +1 -1
  19. package/dist/chunks/{use-visual-utils-Bk135OgA.js → use-visual-utils-47dkDwLK.js} +12 -12
  20. package/dist/chunks/{use-visual-utils-BzFjIykb.js → use-visual-utils-K0yQRSI7.js} +1 -1
  21. package/dist/chunks/{validation-D4Zz6WPD.js → validation-1V7bWmYw.js} +1 -1
  22. package/dist/chunks/{validation-CQFpcSSP.js → validation-DlrTIf1N.js} +1 -1
  23. package/dist/chunks/{validators-CuKnUZFO.js → validators-CtNmgsvG.js} +409 -314
  24. package/dist/chunks/validators-jpoYhpHh.js +1 -0
  25. package/dist/dashboard/index.cjs +1 -1
  26. package/dist/dashboard/index.js +1 -1
  27. package/dist/dashboard-authoring/index.cjs +1 -1
  28. package/dist/dashboard-authoring/index.js +1 -1
  29. package/dist/data-app-builder/index.cjs +1 -1
  30. package/dist/data-app-builder/index.js +1 -1
  31. package/dist/data-app-sdk/index.cjs +1 -1
  32. package/dist/data-app-sdk/index.js +32 -32
  33. package/dist/data-app-sdk-validation/index.cjs +1 -1
  34. package/dist/data-app-sdk-validation/index.js +2 -2
  35. package/dist/index.cjs +1 -1
  36. package/dist/index.js +127 -126
  37. package/dist/style.css +1 -1
  38. package/dist/surfboard/index.cjs +1 -1
  39. package/dist/surfboard/index.js +2 -2
  40. package/dist/types/analytics-protocol.d.ts +102 -11
  41. package/dist/types/dashboard-assistant.d.ts +117 -103
  42. package/dist/types/dashboard-authoring.d.ts +63 -2
  43. package/dist/types/dashboard.d.ts +263 -2
  44. package/dist/types/data-app-builder.d.ts +40 -1
  45. package/dist/types/data-app-sdk-validation.d.ts +94 -102
  46. package/dist/types/data-app-sdk.d.ts +106 -11
  47. package/dist/types/main.d.ts +473 -2
  48. package/dist/types/shared.d.ts +263 -2
  49. package/dist/types/surfboard.d.ts +263 -2
  50. package/dist/types/types.d.ts +529 -2
  51. package/package.json +1 -1
  52. package/dist/chunks/index-DlLvzmJF.js +0 -1361
  53. package/dist/chunks/validators-DHee9kM2.js +0 -1
@@ -1,14 +1,14 @@
1
1
  import { jsx as t, jsxs as i, Fragment as R } from "react/jsx-runtime";
2
- import { c as B, u as N, B as _, az as dt, E as Vt, L as Hr, a1 as qr, a as te, aA as jr, aB as Vr, aC as rt, aD as me, aE as ct, aF as Kt, f as $e, X as Qt, aG as Wt, aH as Kr, G as Rt, Y as Qr, Z as Wr, _ as Jr, a0 as Yr, j as Xr, aI as Zr } from "./switch-Dkx2qEOr.js";
3
- import { bs as ea, u as G, b as Jt, bt as ta, ax as re, c as Yt, d as ra, e as at, f as nt, n as aa, bu as ue, bf as Fe, bv as na, bw as Ut, bx as Xt, by as Zt, bz as sa, bn as lt, bA as oa, bB as ia, bC as da, bD as ca, bE as la, bF as ua, ad as pe, bG as he, o as C, bH as ma, bI as er, aX as ut, aH as pa, bJ as ha, bK as fa, be as tr, bh as rr, aF as ga, b7 as ba, bL as xa, bM as va, y as ya, x as Ue, J as wa, z as Ye, bN as Na, bO as Sa, bP as Da, Z as ka, bQ as Ca, I as Xe, bR as Ea, bS as La, bT as Ia, bU as Aa, b8 as Ma, b9 as Pa, ba as Oa, bb as _a, bc as $, bV as Ra, aC as Tt, bW as Ua, bX as Ta, bY as Fa, H as $a, bZ as Ga, an as Ba, aq as za, ar as Ha, as as qa, at as ja, au as Va, av as Ka, aw as Ft, v as st } from "./index-C0Qnfr_7.js";
2
+ import { c as B, u as N, B as _, az as dt, E as Vt, L as Hr, a1 as jr, a as te, aA as qr, aB as Vr, aC as rt, aD as me, aE as ct, aF as Kt, f as $e, X as Qt, aG as Wt, aH as Kr, G as Rt, Y as Qr, Z as Wr, _ as Jr, a0 as Yr, j as Xr, aI as Zr } from "./switch-Dkx2qEOr.js";
3
+ import { bt as ea, u as G, b as Jt, bu as ta, ay as re, c as Yt, d as ra, e as at, f as nt, n as aa, bv as ue, bg as Fe, bw as na, bx as Ut, by as Xt, bz as Zt, bA as sa, bo as lt, bB as oa, bC as ia, bD as da, bE as ca, bF as la, bG as ua, ae as pe, bH as fe, o as C, bI as ma, bJ as er, aY as ut, aI as pa, bK as fa, bL as ha, bf as tr, bi as rr, aG as ga, b8 as ba, bM as xa, bN as va, y as ya, x as Ue, J as wa, z as Ye, bO as Na, bP as Sa, bQ as Da, _ as ka, bR as Ca, I as Xe, bS as Ea, bT as La, bU as Ia, bV as Aa, b9 as Ma, ba as Pa, bb as Oa, bc as _a, bd as $, bW as Ra, aD as Tt, bX as Ua, bY as Ta, bZ as Fa, H as $a, b_ as Ga, ao as Ba, ar as za, as as Ha, at as ja, au as qa, av as Va, aw as Ka, ax as Ft, v as st } from "./index-BiDFY4Gr.js";
4
4
  import "./index-CuHybtft.js";
5
5
  import * as I from "react";
6
6
  import ar, { useState as w, useMemo as K, useEffect as Ge, useRef as $t, useLayoutEffect as Qa, useCallback as Wa } from "react";
7
7
  import "./index-CJdxSyQq.js";
8
8
  import { createPortal as Ja } from "react-dom";
9
- import { L as Ya, b as Xa, u as Za, A as en, V as tn, K as rn, e as an, M as nn, N as sn, U as on } from "./dashboard-briefing-launcher-D3Xfc_26.js";
9
+ import { L as Ya, b as Xa, u as Za, A as en, V as tn, K as rn, e as an, M as nn, N as sn, U as on } from "./dashboard-briefing-launcher-l0ylhcAv.js";
10
10
  import { d as nr } from "./index-DFOb_6HB.js";
11
- import { C as dn } from "./calendar-preferences-dialog-ClBAkMmF.js";
11
+ import { C as dn } from "./calendar-preferences-dialog-DmBRXOH6.js";
12
12
  import { u as cn } from "./use-debounced-dirty-check-BwAbnX_5.js";
13
13
  import { s as Ze } from "./normalize-dashboard-for-dirty-check-5KpZN8xr.js";
14
14
  import { S as Gt } from "./save-kkBEBeLg.js";
@@ -44,7 +44,7 @@ const pn = B("Menu", [
44
44
  * This source code is licensed under the ISC license.
45
45
  * See the LICENSE file in the root directory of this source tree.
46
46
  */
47
- const hn = B("Monitor", [
47
+ const fn = B("Monitor", [
48
48
  ["rect", { width: "20", height: "14", x: "2", y: "3", rx: "2", key: "48i651" }],
49
49
  ["line", { x1: "8", x2: "16", y1: "21", y2: "21", key: "1svkeh" }],
50
50
  ["line", { x1: "12", x2: "12", y1: "17", y2: "21", key: "vw1qmm" }]
@@ -55,7 +55,7 @@ const hn = B("Monitor", [
55
55
  * This source code is licensed under the ISC license.
56
56
  * See the LICENSE file in the root directory of this source tree.
57
57
  */
58
- const fn = B("Moon", [
58
+ const hn = B("Moon", [
59
59
  ["path", { d: "M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z", key: "a7tn18" }]
60
60
  ]);
61
61
  /**
@@ -129,17 +129,17 @@ function vn() {
129
129
  if (Bt) return et;
130
130
  Bt = 1;
131
131
  var e = ar;
132
- function n(c, h) {
133
- return c === h && (c !== 0 || 1 / c === 1 / h) || c !== c && h !== h;
132
+ function n(c, f) {
133
+ return c === f && (c !== 0 || 1 / c === 1 / f) || c !== c && f !== f;
134
134
  }
135
- var a = typeof Object.is == "function" ? Object.is : n, r = e.useState, s = e.useEffect, u = e.useLayoutEffect, f = e.useDebugValue;
136
- function l(c, h) {
137
- var m = h(), g = r({ inst: { value: m, getSnapshot: h } }), o = g[0].inst, y = g[1];
135
+ var a = typeof Object.is == "function" ? Object.is : n, r = e.useState, s = e.useEffect, u = e.useLayoutEffect, h = e.useDebugValue;
136
+ function l(c, f) {
137
+ var m = f(), g = r({ inst: { value: m, getSnapshot: f } }), o = g[0].inst, y = g[1];
138
138
  return u(
139
139
  function() {
140
- o.value = m, o.getSnapshot = h, b(o) && y({ inst: o });
140
+ o.value = m, o.getSnapshot = f, b(o) && y({ inst: o });
141
141
  },
142
- [c, m, h]
142
+ [c, m, f]
143
143
  ), s(
144
144
  function() {
145
145
  return b(o) && y({ inst: o }), c(function() {
@@ -147,20 +147,20 @@ function vn() {
147
147
  });
148
148
  },
149
149
  [c]
150
- ), f(m), m;
150
+ ), h(m), m;
151
151
  }
152
152
  function b(c) {
153
- var h = c.getSnapshot;
153
+ var f = c.getSnapshot;
154
154
  c = c.value;
155
155
  try {
156
- var m = h();
156
+ var m = f();
157
157
  return !a(c, m);
158
158
  } catch {
159
159
  return !0;
160
160
  }
161
161
  }
162
- function x(c, h) {
163
- return h();
162
+ function x(c, f) {
163
+ return f();
164
164
  }
165
165
  var p = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? x : l;
166
166
  return et.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : p, et;
@@ -192,7 +192,7 @@ function yn() {
192
192
  "The result of getSnapshot should be cached to avoid an infinite loop"
193
193
  ), c = !0);
194
194
  }
195
- y = f({
195
+ y = h({
196
196
  inst: { value: o, getSnapshot: g }
197
197
  });
198
198
  var S = y[0].inst, k = y[1];
@@ -224,8 +224,8 @@ function yn() {
224
224
  return g();
225
225
  }
226
226
  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
227
- var s = ar, u = typeof Object.is == "function" ? Object.is : e, f = s.useState, l = s.useEffect, b = s.useLayoutEffect, x = s.useDebugValue, p = !1, c = !1, h = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? r : n;
228
- tt.useSyncExternalStore = s.useSyncExternalStore !== void 0 ? s.useSyncExternalStore : h, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
227
+ var s = ar, u = typeof Object.is == "function" ? Object.is : e, h = s.useState, l = s.useEffect, b = s.useLayoutEffect, x = s.useDebugValue, p = !1, c = !1, f = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? r : n;
228
+ tt.useSyncExternalStore = s.useSyncExternalStore !== void 0 ? s.useSyncExternalStore : f, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
229
229
  }()), tt;
230
230
  }
231
231
  process.env.NODE_ENV === "production" ? ot.exports = vn() : ot.exports = yn();
@@ -233,13 +233,13 @@ var wn = ot.exports;
233
233
  const Te = ["light", "dark", "system"];
234
234
  function Nn() {
235
235
  const { theme: e, setTheme: n } = ea(), a = N(
236
- (f) => f.actions.setDashboardTheme
236
+ (h) => h.actions.setDashboardTheme
237
237
  );
238
238
  function r() {
239
- const f = Te.includes(e) ? e : "system", l = Te[(Te.indexOf(f) + 1) % Te.length];
239
+ const h = Te.includes(e) ? e : "system", l = Te[(Te.indexOf(h) + 1) % Te.length];
240
240
  n(l), a(l);
241
241
  }
242
- const s = e === "light" ? bn : e === "dark" ? fn : hn, u = e === "light" ? "Theme: light (click for dark)" : e === "dark" ? "Theme: dark (click for system)" : "Theme: system (click for light)";
242
+ const s = e === "light" ? bn : e === "dark" ? hn : fn, u = e === "light" ? "Theme: light (click for dark)" : e === "dark" ? "Theme: dark (click for system)" : "Theme: system (click for light)";
243
243
  return /* @__PURE__ */ t(
244
244
  _,
245
245
  {
@@ -257,8 +257,8 @@ function Nn() {
257
257
  async function Sn(e, n, a, r, s) {
258
258
  if (!s)
259
259
  return null;
260
- const u = JSON.stringify(a), f = `${e}/v1/lens`;
261
- return await dt(f, s, {
260
+ const u = JSON.stringify(a), h = `${e}/v1/lens`;
261
+ return await dt(h, s, {
262
262
  name: n,
263
263
  template: u,
264
264
  filterValues: r,
@@ -268,12 +268,12 @@ async function Sn(e, n, a, r, s) {
268
268
  async function it(e, n, a) {
269
269
  if (!a)
270
270
  return null;
271
- const { id: r, template: s, filterValues: u, isDefault: f, shared: l } = n, b = `${e}/v1/lens`;
271
+ const { id: r, template: s, filterValues: u, isDefault: h, shared: l } = n, b = `${e}/v1/lens`;
272
272
  return await dt(b, a, {
273
273
  lensId: r,
274
274
  template: s,
275
275
  filterValues: u,
276
- isDefault: f,
276
+ isDefault: h,
277
277
  shared: l,
278
278
  operation: "update"
279
279
  });
@@ -292,8 +292,8 @@ function Cn({
292
292
  open: e,
293
293
  onOpenChange: n
294
294
  } = {}) {
295
- const [a, r] = w(""), [s, u] = w(!1), f = N((D) => D.lenses), { setLenses: l, setSelectedLensId: b } = Vt(), [x, p] = w(!1), [c, h] = w(!1), m = e !== void 0, g = m ? e : c, o = (D) => {
296
- m || h(D), n == null || n(D);
295
+ const [a, r] = w(""), [s, u] = w(!1), h = N((D) => D.lenses), { setLenses: l, setSelectedLensId: b } = Vt(), [x, p] = w(!1), [c, f] = w(!1), m = e !== void 0, g = m ? e : c, o = (D) => {
296
+ m || f(D), n == null || n(D);
297
297
  }, y = N((D) => D.dashboard), S = N((D) => D.filterValues), { authToken: k, tokenProps: L } = G();
298
298
  async function E() {
299
299
  p(!0);
@@ -304,7 +304,7 @@ function Cn({
304
304
  S,
305
305
  k == null ? void 0 : k.accessToken
306
306
  );
307
- D && (l([...f || [], D]), b(D.id), o(!1)), p(!1);
307
+ D && (l([...h || [], D]), b(D.id), o(!1)), p(!1);
308
308
  }
309
309
  return /* @__PURE__ */ i(Jt, { open: g, onOpenChange: o, children: [
310
310
  m ? null : /* @__PURE__ */ t(ta, { asChild: !0, children: /* @__PURE__ */ i(_, { variant: "secondary", size: "xs", children: [
@@ -319,7 +319,7 @@ function Cn({
319
319
  /* @__PURE__ */ i("div", { className: "space-y-1.5 py-1", children: [
320
320
  /* @__PURE__ */ t(Hr, { htmlFor: "lens-name", className: kn, children: "Name" }),
321
321
  /* @__PURE__ */ t(
322
- qr,
322
+ jr,
323
323
  {
324
324
  id: "lens-name",
325
325
  size: "xs",
@@ -347,14 +347,14 @@ function Cn({
347
347
  ] });
348
348
  }
349
349
  function En({ includeLabel: e = !1 } = {}) {
350
- const n = N((p) => p.lenses), a = N((p) => p.selectedLensId), { setLenses: r, setSelectedLensId: s } = Vt(), { authToken: u, tokenProps: f } = G();
350
+ const n = N((p) => p.lenses), a = N((p) => p.selectedLensId), { setLenses: r, setSelectedLensId: s } = Vt(), { authToken: u, tokenProps: h } = G();
351
351
  async function l(p) {
352
352
  s(p);
353
353
  }
354
354
  async function b(p) {
355
- if (await Dn(f.apiServiceUrl, p, u == null ? void 0 : u.accessToken)) {
356
- const h = n == null ? void 0 : n.filter((m) => m.id !== p);
357
- r(h || []), s("original");
355
+ if (await Dn(h.apiServiceUrl, p, u == null ? void 0 : u.accessToken)) {
356
+ const f = n == null ? void 0 : n.filter((m) => m.id !== p);
357
+ r(f || []), s("original");
358
358
  }
359
359
  }
360
360
  async function x(p) {
@@ -366,18 +366,18 @@ function En({ includeLabel: e = !1 } = {}) {
366
366
  isDefault: !1
367
367
  });
368
368
  r(c || []);
369
- const h = {
369
+ const f = {
370
370
  ...p,
371
371
  isDefault: !p.isDefault
372
372
  };
373
- await it(f.apiServiceUrl, h, u == null ? void 0 : u.accessToken);
373
+ await it(h.apiServiceUrl, f, u == null ? void 0 : u.accessToken);
374
374
  const m = n == null ? void 0 : n.find((g) => g.isDefault);
375
375
  if (m && m.id !== p.id) {
376
376
  const g = {
377
377
  ...m,
378
378
  isDefault: !1
379
379
  };
380
- await it(f.apiServiceUrl, g, u == null ? void 0 : u.accessToken);
380
+ await it(h.apiServiceUrl, g, u == null ? void 0 : u.accessToken);
381
381
  }
382
382
  }
383
383
  return /* @__PURE__ */ i(R, { children: [
@@ -440,7 +440,7 @@ function Ln() {
440
440
  const { displayPreferences: e, shouldShowElement: n } = sa(), { currentUser: a, userContext: r } = lt(), s = K(
441
441
  () => oa(a),
442
442
  [a]
443
- ), u = K(() => (l) => s && s[l] !== void 0 && s[l] === !1 ? !1 : n(l), [s, n, e]), f = K(
443
+ ), u = K(() => (l) => s && s[l] !== void 0 && s[l] === !1 ? !1 : n(l), [s, n, e]), h = K(
444
444
  () => {
445
445
  var l, b, x, p, c;
446
446
  return {
@@ -456,34 +456,34 @@ function Ln() {
456
456
  return {
457
457
  displayPreferences: e,
458
458
  shouldShowElement: u,
459
- permissions: f,
459
+ permissions: h,
460
460
  currentUser: a
461
461
  };
462
462
  }
463
463
  function In(e, n = []) {
464
464
  let a = [];
465
- function r(u, f) {
466
- const l = I.createContext(f);
465
+ function r(u, h) {
466
+ const l = I.createContext(h);
467
467
  l.displayName = u + "Context";
468
468
  const b = a.length;
469
- a = [...a, f];
469
+ a = [...a, h];
470
470
  const x = (c) => {
471
471
  var S;
472
- const { scope: h, children: m, ...g } = c, o = ((S = h == null ? void 0 : h[e]) == null ? void 0 : S[b]) || l, y = I.useMemo(() => g, Object.values(g));
472
+ const { scope: f, children: m, ...g } = c, o = ((S = f == null ? void 0 : f[e]) == null ? void 0 : S[b]) || l, y = I.useMemo(() => g, Object.values(g));
473
473
  return /* @__PURE__ */ t(o.Provider, { value: y, children: m });
474
474
  };
475
475
  x.displayName = u + "Provider";
476
- function p(c, h) {
476
+ function p(c, f) {
477
477
  var o;
478
- const m = ((o = h == null ? void 0 : h[e]) == null ? void 0 : o[b]) || l, g = I.useContext(m);
478
+ const m = ((o = f == null ? void 0 : f[e]) == null ? void 0 : o[b]) || l, g = I.useContext(m);
479
479
  if (g) return g;
480
- if (f !== void 0) return f;
480
+ if (h !== void 0) return h;
481
481
  throw new Error(`\`${c}\` must be used within \`${u}\``);
482
482
  }
483
483
  return [x, p];
484
484
  }
485
485
  const s = () => {
486
- const u = a.map((f) => I.createContext(f));
486
+ const u = a.map((h) => I.createContext(h));
487
487
  return function(l) {
488
488
  const b = (l == null ? void 0 : l[e]) || u;
489
489
  return I.useMemo(
@@ -503,11 +503,11 @@ function An(...e) {
503
503
  scopeName: s.scopeName
504
504
  }));
505
505
  return function(u) {
506
- const f = r.reduce((l, { useScope: b, scopeName: x }) => {
506
+ const h = r.reduce((l, { useScope: b, scopeName: x }) => {
507
507
  const c = b(u)[`__scope${x}`];
508
508
  return { ...l, ...c };
509
509
  }, {});
510
- return I.useMemo(() => ({ [`__scope${n.scopeName}`]: f }), [f]);
510
+ return I.useMemo(() => ({ [`__scope${n.scopeName}`]: h }), [h]);
511
511
  };
512
512
  };
513
513
  return a.scopeName = n.scopeName, a;
@@ -531,8 +531,8 @@ var Mn = [
531
531
  "svg",
532
532
  "ul"
533
533
  ], mt = Mn.reduce((e, n) => {
534
- const a = jr(`Primitive.${n}`), r = I.forwardRef((s, u) => {
535
- const { asChild: f, ...l } = s, b = f ? a : n;
534
+ const a = qr(`Primitive.${n}`), r = I.forwardRef((s, u) => {
535
+ const { asChild: h, ...l } = s, b = h ? a : n;
536
536
  return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ t(b, { ...l, ref: u });
537
537
  });
538
538
  return r.displayName = `Primitive.${n}`, { ...e, [n]: r };
@@ -566,8 +566,8 @@ ir.displayName = pt;
566
566
  var dr = "AvatarImage", cr = I.forwardRef(
567
567
  (e, n) => {
568
568
  const { __scopeAvatar: a, src: r, onLoadingStatusChange: s = () => {
569
- }, ...u } = e, f = or(dr, a), l = Un(r, u), b = Vr((x) => {
570
- s(x), f.onImageLoadingStatusChange(x);
569
+ }, ...u } = e, h = or(dr, a), l = Un(r, u), b = Vr((x) => {
570
+ s(x), h.onImageLoadingStatusChange(x);
571
571
  });
572
572
  return rt(() => {
573
573
  l !== "idle" && b(l);
@@ -577,13 +577,13 @@ var dr = "AvatarImage", cr = I.forwardRef(
577
577
  cr.displayName = dr;
578
578
  var lr = "AvatarFallback", ur = I.forwardRef(
579
579
  (e, n) => {
580
- const { __scopeAvatar: a, delayMs: r, ...s } = e, u = or(lr, a), [f, l] = I.useState(r === void 0);
580
+ const { __scopeAvatar: a, delayMs: r, ...s } = e, u = or(lr, a), [h, l] = I.useState(r === void 0);
581
581
  return I.useEffect(() => {
582
582
  if (r !== void 0) {
583
583
  const b = window.setTimeout(() => l(!0), r);
584
584
  return () => window.clearTimeout(b);
585
585
  }
586
- }, [r]), f && u.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ t(mt.span, { ...s, ref: n }) : null;
586
+ }, [r]), h && u.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ t(mt.span, { ...s, ref: n }) : null;
587
587
  }
588
588
  );
589
589
  ur.displayName = lr;
@@ -591,7 +591,7 @@ function Ht(e, n) {
591
591
  return e ? n ? (e.src !== n && (e.src = n), e.complete && e.naturalWidth > 0 ? "loaded" : "loading") : "error" : "idle";
592
592
  }
593
593
  function Un(e, { referrerPolicy: n, crossOrigin: a }) {
594
- const r = Pn(), s = I.useRef(null), u = r ? (s.current || (s.current = new window.Image()), s.current) : null, [f, l] = I.useState(
594
+ const r = Pn(), s = I.useRef(null), u = r ? (s.current || (s.current = new window.Image()), s.current) : null, [h, l] = I.useState(
595
595
  () => Ht(u, e)
596
596
  );
597
597
  return rt(() => {
@@ -605,10 +605,10 @@ function Un(e, { referrerPolicy: n, crossOrigin: a }) {
605
605
  return u.addEventListener("load", x), u.addEventListener("error", p), n && (u.referrerPolicy = n), typeof a == "string" && (u.crossOrigin = a), () => {
606
606
  u.removeEventListener("load", x), u.removeEventListener("error", p);
607
607
  };
608
- }, [u, a, n]), f;
608
+ }, [u, a, n]), h;
609
609
  }
610
- var mr = ir, pr = cr, hr = ur;
611
- const fr = I.forwardRef(({ className: e, ...n }, a) => /* @__PURE__ */ t(
610
+ var mr = ir, pr = cr, fr = ur;
611
+ const hr = I.forwardRef(({ className: e, ...n }, a) => /* @__PURE__ */ t(
612
612
  mr,
613
613
  {
614
614
  ref: a,
@@ -619,7 +619,7 @@ const fr = I.forwardRef(({ className: e, ...n }, a) => /* @__PURE__ */ t(
619
619
  ...n
620
620
  }
621
621
  ));
622
- fr.displayName = mr.displayName;
622
+ hr.displayName = mr.displayName;
623
623
  const Tn = I.forwardRef(({ className: e, ...n }, a) => /* @__PURE__ */ t(
624
624
  pr,
625
625
  {
@@ -630,7 +630,7 @@ const Tn = I.forwardRef(({ className: e, ...n }, a) => /* @__PURE__ */ t(
630
630
  ));
631
631
  Tn.displayName = pr.displayName;
632
632
  const gr = I.forwardRef(({ className: e, ...n }, a) => /* @__PURE__ */ t(
633
- hr,
633
+ fr,
634
634
  {
635
635
  ref: a,
636
636
  className: te(
@@ -640,7 +640,7 @@ const gr = I.forwardRef(({ className: e, ...n }, a) => /* @__PURE__ */ t(
640
640
  ...n
641
641
  }
642
642
  ));
643
- gr.displayName = hr.displayName;
643
+ gr.displayName = fr.displayName;
644
644
  const Fn = async (e, n, a) => {
645
645
  const r = `${e}/management/v1/groups`;
646
646
  return await Kt(r, n, a);
@@ -659,7 +659,7 @@ const Fn = async (e, n, a) => {
659
659
  };
660
660
  function Hn() {
661
661
  const { authToken: e, tokenProps: n } = G(), a = pe();
662
- return he({
662
+ return fe({
663
663
  mutationFn: (r) => Fn(n.apiServiceUrl, (e == null ? void 0 : e.accessToken) || "", r),
664
664
  onSuccess: () => {
665
665
  a.invalidateQueries({ queryKey: ["groups"] }), C.success("Group created successfully");
@@ -671,9 +671,9 @@ function Hn() {
671
671
  }
672
672
  });
673
673
  }
674
- function qn() {
674
+ function jn() {
675
675
  const { authToken: e, tokenProps: n } = G(), a = pe();
676
- return he({
676
+ return fe({
677
677
  mutationFn: ({
678
678
  groupId: r,
679
679
  data: s
@@ -688,9 +688,9 @@ function qn() {
688
688
  }
689
689
  });
690
690
  }
691
- function jn() {
691
+ function qn() {
692
692
  const { authToken: e, tokenProps: n } = G(), a = pe();
693
- return he({
693
+ return fe({
694
694
  mutationFn: (r) => Gn(n.apiServiceUrl, (e == null ? void 0 : e.accessToken) || "", r),
695
695
  onSuccess: (r, s) => {
696
696
  a.invalidateQueries({ queryKey: ["groups"] }), a.removeQueries({ queryKey: ["group", s] }), C.success("Group deleted successfully");
@@ -704,7 +704,7 @@ function jn() {
704
704
  }
705
705
  function Vn() {
706
706
  const { authToken: e, tokenProps: n } = G(), a = pe();
707
- return he({
707
+ return fe({
708
708
  mutationFn: ({
709
709
  groupId: r,
710
710
  data: s
@@ -723,7 +723,7 @@ function Vn() {
723
723
  }
724
724
  function Kn() {
725
725
  const { authToken: e, tokenProps: n } = G(), a = pe();
726
- return he({
726
+ return fe({
727
727
  mutationFn: ({
728
728
  groupId: r,
729
729
  data: s
@@ -747,7 +747,7 @@ function Wn({
747
747
  }) {
748
748
  var k, L, E;
749
749
  const { tokenProps: a } = G(), { currentUser: r } = lt(), s = (r == null ? void 0 : r.type) === "tenant", u = a == null ? void 0 : a.tenantId, {
750
- groups: f,
750
+ groups: h,
751
751
  isLoading: l,
752
752
  error: b,
753
753
  refetch: x
@@ -755,14 +755,14 @@ function Wn({
755
755
  type: s ? "TENANT_GROUP" : "all",
756
756
  tenantId: s ? u : void 0,
757
757
  includeMembers: !1
758
- }), p = b ? br(b, "Unable to load groups.") : null, [c, h] = w({ kind: "list" }), [m, g] = w(null), o = jn();
758
+ }), p = b ? br(b, "Unable to load groups.") : null, [c, f] = w({ kind: "list" }), [m, g] = w(null), o = qn();
759
759
  Ge(() => {
760
- e || (h({ kind: "list" }), g(null));
760
+ e || (f({ kind: "list" }), g(null));
761
761
  }, [e]);
762
- const y = c.kind === "members" && f.find((D) => D.id === c.groupId) || null, S = async () => {
762
+ const y = c.kind === "members" && h.find((D) => D.id === c.groupId) || null, S = async () => {
763
763
  if (m)
764
764
  try {
765
- await o.mutateAsync(m.id), g(null), h({ kind: "list" }), x();
765
+ await o.mutateAsync(m.id), g(null), f({ kind: "list" }), x();
766
766
  } catch {
767
767
  }
768
768
  };
@@ -775,7 +775,7 @@ function Wn({
775
775
  "button",
776
776
  {
777
777
  type: "button",
778
- onClick: () => h({ kind: "list" }),
778
+ onClick: () => f({ kind: "list" }),
779
779
  "aria-label": "Back",
780
780
  className: "-ml-1 flex h-6 w-6 items-center justify-center rounded-[3px] text-muted-foreground hover:bg-accent hover:text-foreground",
781
781
  children: /* @__PURE__ */ t(er, { className: "h-3.5 w-3.5" })
@@ -787,13 +787,13 @@ function Wn({
787
787
  c.kind === "list" && /* @__PURE__ */ t(
788
788
  Jn,
789
789
  {
790
- groups: f,
790
+ groups: h,
791
791
  isLoading: l,
792
792
  errorMessage: p,
793
793
  onRetry: () => x(),
794
794
  currentUserId: r == null ? void 0 : r.id,
795
- onOpenGroup: (D) => h({ kind: "members", groupId: D }),
796
- onCreate: () => h({ kind: "create" }),
795
+ onOpenGroup: (D) => f({ kind: "members", groupId: D }),
796
+ onCreate: () => f({ kind: "create" }),
797
797
  onDeleteRequest: (D) => g(D)
798
798
  }
799
799
  ),
@@ -805,7 +805,7 @@ function Wn({
805
805
  canEdit: ((k = y.permissions) == null ? void 0 : k.canEdit) ?? y.createdBy === (r == null ? void 0 : r.id),
806
806
  canDelete: ((L = y.permissions) == null ? void 0 : L.canDelete) ?? y.createdBy === (r == null ? void 0 : r.id),
807
807
  canManageMembers: ((E = y.permissions) == null ? void 0 : E.canManageMembers) ?? y.createdBy === (r == null ? void 0 : r.id),
808
- onBack: () => h({ kind: "list" }),
808
+ onBack: () => f({ kind: "list" }),
809
809
  onMembersChanged: x,
810
810
  onUpdated: x,
811
811
  onRequestDelete: () => g(y)
@@ -817,9 +817,9 @@ function Wn({
817
817
  {
818
818
  isTenantUser: s,
819
819
  tenantId: u,
820
- onCancel: () => h({ kind: "list" }),
820
+ onCancel: () => f({ kind: "list" }),
821
821
  onCreated: (D) => {
822
- x(), h({ kind: "members", groupId: D });
822
+ x(), f({ kind: "members", groupId: D });
823
823
  }
824
824
  }
825
825
  ),
@@ -865,7 +865,7 @@ function Jn({
865
865
  onRetry: r,
866
866
  currentUserId: s,
867
867
  onOpenGroup: u,
868
- onCreate: f,
868
+ onCreate: h,
869
869
  onDeleteRequest: l
870
870
  }) {
871
871
  const [b, x] = w(""), p = K(
@@ -901,7 +901,7 @@ function Jn({
901
901
  "button",
902
902
  {
903
903
  type: "button",
904
- onClick: f,
904
+ onClick: h,
905
905
  className: "inline-flex h-7 items-center gap-1.5 rounded-[5px] bg-foreground px-2.5 text-[12px] font-medium text-background hover:opacity-90",
906
906
  children: [
907
907
  /* @__PURE__ */ t(re, { className: "h-3 w-3" }),
@@ -923,7 +923,7 @@ function Jn({
923
923
  message: a,
924
924
  onRetry: r
925
925
  }
926
- ) : p.length === 0 && e.length === 0 ? /* @__PURE__ */ t(Xn, { onCreate: f }) : p.length === 0 ? /* @__PURE__ */ i("div", { className: "flex h-full flex-col items-center justify-center gap-1 py-10 text-center", children: [
926
+ ) : p.length === 0 && e.length === 0 ? /* @__PURE__ */ t(Xn, { onCreate: h }) : p.length === 0 ? /* @__PURE__ */ i("div", { className: "flex h-full flex-col items-center justify-center gap-1 py-10 text-center", children: [
927
927
  /* @__PURE__ */ i("div", { className: "text-[12px] text-foreground", children: [
928
928
  'No groups match "',
929
929
  b,
@@ -931,12 +931,12 @@ function Jn({
931
931
  ] }),
932
932
  /* @__PURE__ */ t("div", { className: "text-[11px] text-muted-foreground", children: "Try a different search." })
933
933
  ] }) : p.map((c) => {
934
- var h;
934
+ var f;
935
935
  return /* @__PURE__ */ t(
936
936
  Yn,
937
937
  {
938
938
  group: c,
939
- canDelete: ((h = c.permissions) == null ? void 0 : h.canDelete) ?? c.createdBy === s,
939
+ canDelete: ((f = c.permissions) == null ? void 0 : f.canDelete) ?? c.createdBy === s,
940
940
  onClick: () => u(c.id),
941
941
  onDelete: () => l(c)
942
942
  },
@@ -1036,7 +1036,7 @@ function Zn({
1036
1036
  canDelete: r,
1037
1037
  canManageMembers: s,
1038
1038
  onBack: u,
1039
- onMembersChanged: f,
1039
+ onMembersChanged: h,
1040
1040
  onUpdated: l,
1041
1041
  onRequestDelete: b
1042
1042
  }) {
@@ -1044,8 +1044,8 @@ function Zn({
1044
1044
  data: x,
1045
1045
  isLoading: p,
1046
1046
  error: c,
1047
- refetch: h
1048
- } = ha(e.id), m = (x == null ? void 0 : x.members) ?? Qn, g = c ? br(c, "Unable to load members for this group.") : null, o = e.type === "TENANT_GROUP" ? "tenant" : "organization", { users: y } = fa({
1047
+ refetch: f
1048
+ } = fa(e.id), m = (x == null ? void 0 : x.members) ?? Qn, g = c ? br(c, "Unable to load members for this group.") : null, o = e.type === "TENANT_GROUP" ? "tenant" : "organization", { users: y } = ha({
1049
1049
  type: o,
1050
1050
  tenantId: e.tenantId || void 0,
1051
1051
  active: !0,
@@ -1053,7 +1053,7 @@ function Zn({
1053
1053
  }), S = K(
1054
1054
  () => new Set(m.map((v) => v.userId)),
1055
1055
  [m]
1056
- ), k = Vn(), L = Kn(), E = qn(), [D, ae] = w(!1), [Q, ne] = w(e.name), [fe, W] = w(!1), [J, Y] = w(e.description || ""), [X, ge] = w(""), [be, xe] = w(!1), ve = K(() => {
1056
+ ), k = Vn(), L = Kn(), E = jn(), [D, ae] = w(!1), [Q, ne] = w(e.name), [he, W] = w(!1), [J, Y] = w(e.description || ""), [X, ge] = w(""), [be, xe] = w(!1), ve = K(() => {
1057
1057
  const v = X.trim().toLowerCase();
1058
1058
  return y.filter((U) => !S.has(U.id)).filter(
1059
1059
  (U) => !v || (U.name || "").toLowerCase().includes(v) || (U.email || "").toLowerCase().includes(v)
@@ -1088,7 +1088,7 @@ function Zn({
1088
1088
  userIds: [v.id],
1089
1089
  userType: o === "tenant" ? "tenant" : "org"
1090
1090
  }
1091
- }), h(), f();
1091
+ }), f(), h();
1092
1092
  } catch {
1093
1093
  }
1094
1094
  }
@@ -1098,7 +1098,7 @@ function Zn({
1098
1098
  await L.mutateAsync({
1099
1099
  groupId: e.id,
1100
1100
  data: { userIds: [v] }
1101
- }), h(), f();
1101
+ }), f(), h();
1102
1102
  } catch {
1103
1103
  }
1104
1104
  };
@@ -1152,7 +1152,7 @@ function Zn({
1152
1152
  m.length === 1 ? "" : "s"
1153
1153
  ] })
1154
1154
  ] }),
1155
- /* @__PURE__ */ t("div", { className: "shrink-0 border-b border-border px-5 py-2.5", children: fe ? /* @__PURE__ */ i("div", { children: [
1155
+ /* @__PURE__ */ t("div", { className: "shrink-0 border-b border-border px-5 py-2.5", children: he ? /* @__PURE__ */ i("div", { children: [
1156
1156
  /* @__PURE__ */ t(
1157
1157
  "textarea",
1158
1158
  {
@@ -1239,19 +1239,19 @@ function Zn({
1239
1239
  {
1240
1240
  title: "Can't load members",
1241
1241
  message: g,
1242
- onRetry: () => h()
1242
+ onRetry: () => f()
1243
1243
  }
1244
1244
  ) : m.length === 0 ? /* @__PURE__ */ i("div", { className: "flex h-full flex-col items-center justify-center gap-1 py-10 text-center", children: [
1245
1245
  /* @__PURE__ */ t("div", { className: "text-[12px] text-foreground", children: "No members yet" }),
1246
1246
  /* @__PURE__ */ t("div", { className: "text-[11px] text-muted-foreground", children: s ? "Search above to add people to this group." : "This group does not have any members." })
1247
1247
  ] }) : m.map((v) => {
1248
- var U, q, we, Ne, Se, A;
1248
+ var U, j, we, Ne, Se, A;
1249
1249
  return /* @__PURE__ */ i(
1250
1250
  "div",
1251
1251
  {
1252
1252
  className: "group flex items-center gap-2 border-b border-border/60 px-5 py-2",
1253
1253
  children: [
1254
- /* @__PURE__ */ t(vr, { name: ((U = v.user) == null ? void 0 : U.name) || ((q = v.user) == null ? void 0 : q.email) || "?" }),
1254
+ /* @__PURE__ */ t(vr, { name: ((U = v.user) == null ? void 0 : U.name) || ((j = v.user) == null ? void 0 : j.email) || "?" }),
1255
1255
  /* @__PURE__ */ i("div", { className: "min-w-0 flex-1", children: [
1256
1256
  /* @__PURE__ */ t("div", { className: "truncate text-[12.5px] font-medium text-foreground", children: ((we = v.user) == null ? void 0 : we.name) || ((Ne = v.user) == null ? void 0 : Ne.email) || "Unknown" }),
1257
1257
  ((Se = v.user) == null ? void 0 : Se.email) && v.user.name && /* @__PURE__ */ t("div", { className: "truncate text-[10.5px] text-muted-foreground", children: v.user.email })
@@ -1293,12 +1293,12 @@ function es({
1293
1293
  onCancel: a,
1294
1294
  onCreated: r
1295
1295
  }) {
1296
- const [s, u] = w(""), [f, l] = w(""), [b, x] = w(null), p = Hn(), c = s.trim().length >= 3 && s.trim().length <= 50, h = async () => {
1296
+ const [s, u] = w(""), [h, l] = w(""), [b, x] = w(null), p = Hn(), c = s.trim().length >= 3 && s.trim().length <= 50, f = async () => {
1297
1297
  if (!c) return;
1298
1298
  x(null);
1299
1299
  const m = {
1300
1300
  name: s.trim(),
1301
- description: f.trim() || void 0,
1301
+ description: h.trim() || void 0,
1302
1302
  type: e ? "TENANT_GROUP" : "ORG_GROUP",
1303
1303
  ...e && n ? { tenantId: n } : {}
1304
1304
  };
@@ -1311,7 +1311,7 @@ function es({
1311
1311
  };
1312
1312
  return /* @__PURE__ */ i("div", { className: "flex flex-1 flex-col overflow-hidden", children: [
1313
1313
  /* @__PURE__ */ i("div", { className: "flex-1 overflow-y-auto px-5 py-4", children: [
1314
- /* @__PURE__ */ t(qt, { children: "Name" }),
1314
+ /* @__PURE__ */ t(jt, { children: "Name" }),
1315
1315
  /* @__PURE__ */ t(
1316
1316
  "input",
1317
1317
  {
@@ -1325,12 +1325,12 @@ function es({
1325
1325
  ),
1326
1326
  /* @__PURE__ */ t("div", { className: "mt-1 text-[10.5px] text-muted-foreground", children: "3–50 characters." }),
1327
1327
  /* @__PURE__ */ i("div", { className: "mt-4", children: [
1328
- /* @__PURE__ */ t(qt, { children: "Description (optional)" }),
1328
+ /* @__PURE__ */ t(jt, { children: "Description (optional)" }),
1329
1329
  /* @__PURE__ */ t(
1330
1330
  "textarea",
1331
1331
  {
1332
1332
  rows: 2,
1333
- value: f,
1333
+ value: h,
1334
1334
  onChange: (m) => l(m.target.value),
1335
1335
  maxLength: 200,
1336
1336
  placeholder: "What is this group for?",
@@ -1338,7 +1338,7 @@ function es({
1338
1338
  }
1339
1339
  ),
1340
1340
  /* @__PURE__ */ i("div", { className: "mt-1 flex justify-end text-[10.5px] text-muted-foreground", children: [
1341
- f.length,
1341
+ h.length,
1342
1342
  "/200"
1343
1343
  ] })
1344
1344
  ] }),
@@ -1359,7 +1359,7 @@ function es({
1359
1359
  "button",
1360
1360
  {
1361
1361
  type: "button",
1362
- onClick: h,
1362
+ onClick: f,
1363
1363
  disabled: !c || p.isPending,
1364
1364
  className: "inline-flex h-7 items-center gap-1.5 rounded-[5px] bg-foreground px-2.5 text-[12px] font-medium text-background hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-60",
1365
1365
  children: p.isPending ? /* @__PURE__ */ i(R, { children: [
@@ -1381,7 +1381,7 @@ function ts({
1381
1381
  setOpen: r,
1382
1382
  candidates: s,
1383
1383
  showKindChip: u,
1384
- onAdd: f,
1384
+ onAdd: h,
1385
1385
  busy: l
1386
1386
  }) {
1387
1387
  const b = $t(null), x = $t(null), [p, c] = w(null);
@@ -1413,7 +1413,7 @@ function ts({
1413
1413
  };
1414
1414
  return document.addEventListener("mousedown", m), () => document.removeEventListener("mousedown", m);
1415
1415
  }, [a, r]);
1416
- const h = a && s.length > 0 && p;
1416
+ const f = a && s.length > 0 && p;
1417
1417
  return /* @__PURE__ */ i("div", { className: "shrink-0 border-b border-border px-5 py-2.5", children: [
1418
1418
  /* @__PURE__ */ i(
1419
1419
  "div",
@@ -1438,7 +1438,7 @@ function ts({
1438
1438
  ]
1439
1439
  }
1440
1440
  ),
1441
- h && typeof document < "u" && Ja(
1441
+ f && typeof document < "u" && Ja(
1442
1442
  /* @__PURE__ */ t(
1443
1443
  "div",
1444
1444
  {
@@ -1455,7 +1455,7 @@ function ts({
1455
1455
  "button",
1456
1456
  {
1457
1457
  type: "button",
1458
- onClick: () => f(m),
1458
+ onClick: () => h(m),
1459
1459
  className: "flex w-full items-center gap-2 border-b border-border/60 px-2.5 py-2 text-left last:border-b-0 hover:bg-accent",
1460
1460
  children: [
1461
1461
  /* @__PURE__ */ t(vr, { name: m.name || m.email || "?" }),
@@ -1501,21 +1501,21 @@ function xr({
1501
1501
  )
1502
1502
  ] });
1503
1503
  }
1504
- function qt({ children: e }) {
1504
+ function jt({ children: e }) {
1505
1505
  return /* @__PURE__ */ t("label", { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: e });
1506
1506
  }
1507
1507
  function vr({ name: e }) {
1508
1508
  const n = e.split(" ").map((a) => a[0]).filter(Boolean).slice(0, 2).join("").toUpperCase();
1509
- return /* @__PURE__ */ t(fr, { className: "h-6 w-6 shrink-0", children: /* @__PURE__ */ t(gr, { className: "text-[9px] font-semibold", children: n || "?" }) });
1509
+ return /* @__PURE__ */ t(hr, { className: "h-6 w-6 shrink-0", children: /* @__PURE__ */ t(gr, { className: "text-[9px] font-semibold", children: n || "?" }) });
1510
1510
  }
1511
1511
  function ce(e, n, a) {
1512
- var u, f;
1512
+ var u, h;
1513
1513
  const r = (e.controls || []).find(
1514
1514
  (l) => l.id === a
1515
1515
  );
1516
1516
  if (r)
1517
1517
  return r.label;
1518
- const s = (f = (u = Wt(e, n)) == null ? void 0 : u.controls) == null ? void 0 : f.find(
1518
+ const s = (h = (u = Wt(e, n)) == null ? void 0 : u.controls) == null ? void 0 : h.find(
1519
1519
  (l) => l.id === a
1520
1520
  );
1521
1521
  return (s == null ? void 0 : s.label) || a;
@@ -1534,9 +1534,9 @@ function rs(e) {
1534
1534
  /^Card '(.+)' binding for control '(.+)' maps to missing metric '(.+)'\.$/
1535
1535
  );
1536
1536
  if (u) {
1537
- const [, p, c] = u, h = `${p}:${c}:missing-metric`;
1538
- r.has(h) || r.set(
1539
- h,
1537
+ const [, p, c] = u, f = `${p}:${c}:missing-metric`;
1538
+ r.has(f) || r.set(
1539
+ f,
1540
1540
  `"${le(a, p)}" has an outdated "${ce(
1541
1541
  a,
1542
1542
  p,
@@ -1545,13 +1545,13 @@ function rs(e) {
1545
1545
  );
1546
1546
  continue;
1547
1547
  }
1548
- const f = s.match(
1548
+ const h = s.match(
1549
1549
  /^Card '(.+)' binding for control '(.+)' maps to missing group-by field '(.+)'\.$/
1550
1550
  );
1551
- if (f) {
1552
- const [, p, c] = f, h = `${p}:${c}:missing-group-by`;
1553
- r.has(h) || r.set(
1554
- h,
1551
+ if (h) {
1552
+ const [, p, c] = h, f = `${p}:${c}:missing-group-by`;
1553
+ r.has(f) || r.set(
1554
+ f,
1555
1555
  `"${le(a, p)}" has an outdated "${ce(
1556
1556
  a,
1557
1557
  p,
@@ -1564,9 +1564,9 @@ function rs(e) {
1564
1564
  /^Card '(.+)' binding for control '(.+)' maps to an invalid metric target\.$/
1565
1565
  );
1566
1566
  if (l) {
1567
- const [, p, c] = l, h = `${p}:${c}:invalid-metric`;
1568
- r.has(h) || r.set(
1569
- h,
1567
+ const [, p, c] = l, f = `${p}:${c}:invalid-metric`;
1568
+ r.has(f) || r.set(
1569
+ f,
1570
1570
  `"${le(a, p)}" has an invalid "${ce(
1571
1571
  a,
1572
1572
  p,
@@ -1579,9 +1579,9 @@ function rs(e) {
1579
1579
  /^Card '(.+)' binding for control '(.+)' maps to an invalid group-by target\.$/
1580
1580
  );
1581
1581
  if (b) {
1582
- const [, p, c] = b, h = `${p}:${c}:invalid-group-by`;
1583
- r.has(h) || r.set(
1584
- h,
1582
+ const [, p, c] = b, f = `${p}:${c}:invalid-group-by`;
1583
+ r.has(f) || r.set(
1584
+ f,
1585
1585
  `"${le(a, p)}" has an invalid "${ce(
1586
1586
  a,
1587
1587
  p,
@@ -1594,9 +1594,9 @@ function rs(e) {
1594
1594
  /^Card '(.+)' binding for control '(.+)' requires at least one temporal group-by field\.$/
1595
1595
  );
1596
1596
  if (x) {
1597
- const [, p, c] = x, h = `${p}:${c}:missing-temporal-group-by`;
1598
- r.has(h) || r.set(
1599
- h,
1597
+ const [, p, c] = x, f = `${p}:${c}:missing-temporal-group-by`;
1598
+ r.has(f) || r.set(
1599
+ f,
1600
1600
  `"${le(a, p)}" can no longer use "${ce(
1601
1601
  a,
1602
1602
  p,
@@ -1612,7 +1612,7 @@ function rs(e) {
1612
1612
  function as(e, n) {
1613
1613
  return typeof e == "boolean" ? e : typeof n == "boolean" ? n : !0;
1614
1614
  }
1615
- function jt(e, n) {
1615
+ function qt(e, n) {
1616
1616
  return {
1617
1617
  dashboard: st(e),
1618
1618
  semanticExecutionPayload: st(n)
@@ -1626,13 +1626,13 @@ function ys() {
1626
1626
  tokenProps: n,
1627
1627
  id: a,
1628
1628
  showBriefings: r
1629
- } = G(), { isLocalDev: s } = ba(), { openBrandStudioPreview: u } = xa(), { permissions: f } = Ln(), l = va(), { isLoading: b } = ya(), x = N((d) => d.theme), p = N((d) => d.isDownloadingPdf), c = N(
1629
+ } = G(), { isLocalDev: s } = ba(), { openBrandStudioPreview: u } = xa(), { permissions: h } = Ln(), l = va(), { isLoading: b } = ya(), x = N((d) => d.theme), p = N((d) => d.isDownloadingPdf), c = N(
1630
1630
  (d) => d.dashboardAssistantDraftScopeKey
1631
- ), h = N((d) => d.lenses), m = N((d) => d.selectedLensId), g = h == null ? void 0 : h.find((d) => d.id === m), o = N((d) => d.dashboard), y = N((d) => d.selectedSheetId), S = (Et = o == null ? void 0 : o.sheets) == null ? void 0 : Et.find(
1631
+ ), f = N((d) => d.lenses), m = N((d) => d.selectedLensId), g = f == null ? void 0 : f.find((d) => d.id === m), o = N((d) => d.dashboard), y = N((d) => d.selectedSheetId), S = (Et = o == null ? void 0 : o.sheets) == null ? void 0 : Et.find(
1632
1632
  (d) => d.id === y
1633
1633
  ), k = Kr(S), L = k ? (Lt = S == null ? void 0 : S.document) == null ? void 0 : Lt.page : void 0, E = N(
1634
1634
  (d) => d.isDashboardEditing
1635
- ), { setDashboardTitle: D } = N((d) => d.actions), [ae, Q] = w(!1), [ne, fe] = w(!1), [W, J] = w(!1), [Y, X] = w(!1), [ge, be] = w(!1), [xe, ve] = w(!1), [ye, z] = w(!1), [Z, ee] = w(null), [H, v] = w([]), [U, q] = w(!1), we = N((d) => d.isDashboardPanelOpen), Ne = N(
1635
+ ), { setDashboardTitle: D } = N((d) => d.actions), [ae, Q] = w(!1), [ne, he] = w(!1), [W, J] = w(!1), [Y, X] = w(!1), [ge, be] = w(!1), [xe, ve] = w(!1), [ye, z] = w(!1), [Z, ee] = w(null), [H, v] = w([]), [U, j] = w(!1), we = N((d) => d.isDashboardPanelOpen), Ne = N(
1636
1636
  (d) => d.actions.setIsDashboardPanelOpen
1637
1637
  ), Se = N((d) => d.filterValues), A = N((d) => d.isVisualEditing);
1638
1638
  Rt((d) => d.card);
@@ -1642,17 +1642,17 @@ function ys() {
1642
1642
  (d) => d.initialDashboard
1643
1643
  );
1644
1644
  Ue((d) => d.selectedVisual), N((d) => d.selectedFrameId), Rt((d) => d.frame);
1645
- const ke = se ? (At = se == null ? void 0 : se.permissions) == null ? void 0 : At.canEdit : (It = De == null ? void 0 : De.permissions) == null ? void 0 : It.canEdit, ht = N(
1645
+ const ke = se ? (At = se == null ? void 0 : se.permissions) == null ? void 0 : At.canEdit : (It = De == null ? void 0 : De.permissions) == null ? void 0 : It.canEdit, ft = N(
1646
1646
  (d) => d.showDashboardJSON
1647
1647
  ), Be = N((d) => d.onSaveFunction), {
1648
- setIsDashboardEditing: ft,
1648
+ setIsDashboardEditing: ht,
1649
1649
  setShowDashboardJSON: gt
1650
1650
  } = N((d) => d.actions), { setInitialDashboard: bt, clearSelectedDashboard: ze } = Ue(
1651
1651
  (d) => d.actions
1652
1652
  ), { resources: Ce } = wa(Ye.DASHBOARD), { data: He } = Na(), yr = ((Mt = He == null ? void 0 : He.preference) == null ? void 0 : Mt.defaultDashboardId) || null, { mutate: wr, isPending: Nr } = Sa(), { currentUser: Sr } = lt(), Dr = Da(Sr), T = se || De, xt = T ? {
1653
1653
  id: T.id,
1654
1654
  title: (o == null ? void 0 : o.title) || T.title || "Dashboard"
1655
- } : null, { handleAddNewFrame: kr } = ka(), [qe, je] = w(!1), [Cr, oe] = w(!1), [Ve, Ee] = w("close"), ie = Ca(Ye.DASHBOARD), [O, Le] = w(null), Er = async (d, M) => {
1655
+ } : null, { handleAddNewFrame: kr } = ka(), [je, qe] = w(!1), [Cr, oe] = w(!1), [Ve, Ee] = w("close"), ie = Ca(Ye.DASHBOARD), [O, Le] = w(null), Er = async (d, M) => {
1656
1656
  if (!(o != null && o.id)) {
1657
1657
  console.log("No dashboard ID found");
1658
1658
  return;
@@ -1710,9 +1710,9 @@ function ys() {
1710
1710
  ), vt = E && !A && de && ke, { setDashboard: yt } = N((d) => d.actions), wt = N(
1711
1711
  (d) => d.semanticExecutionPayload
1712
1712
  ), Lr = () => {
1713
- ft(!0);
1713
+ ht(!0);
1714
1714
  }, Qe = () => {
1715
- ft(!1), gt(!1), Le(null);
1715
+ ht(!1), gt(!1), Le(null);
1716
1716
  };
1717
1717
  Ge(() => {
1718
1718
  if (!E) {
@@ -1720,7 +1720,7 @@ function ys() {
1720
1720
  return;
1721
1721
  }
1722
1722
  O || !o || b || Le(
1723
- jt(
1723
+ qt(
1724
1724
  o,
1725
1725
  wt
1726
1726
  )
@@ -1738,7 +1738,7 @@ function ys() {
1738
1738
  300,
1739
1739
  1e3,
1740
1740
  Ze
1741
- ), St = Wa(() => Ie ? Ze(o) !== Ze(Ie) : !1, [o, Ie]), Dt = Nt || Ir, Me = qe || ie.isPending, Ar = () => {
1741
+ ), St = Wa(() => Ie ? Ze(o) !== Ze(Ie) : !1, [o, Ie]), Dt = Nt || Ir, Me = je || ie.isPending, Ar = () => {
1742
1742
  St() ? (Ee("close"), oe(!0)) : (Qe(), Ae());
1743
1743
  }, Mr = async () => {
1744
1744
  await We({
@@ -1765,9 +1765,9 @@ function ys() {
1765
1765
  if (!M)
1766
1766
  return;
1767
1767
  const F = (d == null ? void 0 : d.closeAfterSave) ?? U, Gr = (d == null ? void 0 : d.navigateHomeAfterSave) ?? !1;
1768
- q(F), F && oe(!1);
1768
+ j(F), F && oe(!1);
1769
1769
  const Br = st(M);
1770
- z(!0), ee(null), v([]), je(!0);
1770
+ z(!0), ee(null), v([]), qe(!0);
1771
1771
  const zr = {
1772
1772
  template: M
1773
1773
  };
@@ -1786,15 +1786,15 @@ function ys() {
1786
1786
  V
1787
1787
  ) : Re && Je.actions.clearPendingDashboardDraftMigration();
1788
1788
  }
1789
- je(!1), C.success("Dashboard saved!"), Le(
1790
- jt(
1789
+ qe(!1), C.success("Dashboard saved!"), Le(
1790
+ qt(
1791
1791
  Br,
1792
1792
  N.getState().semanticExecutionPayload
1793
1793
  )
1794
- ), z(!1), q(!1), F && (Qe(), Ae(), Gr && ze()), Ee("close");
1794
+ ), z(!1), j(!1), F && (Qe(), Ae(), Gr && ze()), Ee("close");
1795
1795
  },
1796
1796
  onError: (P) => {
1797
- je(!1), ee("Failed to save dashboard. Please try again.");
1797
+ qe(!1), ee("Failed to save dashboard. Please try again.");
1798
1798
  const V = P.details, Oe = Array.isArray(
1799
1799
  V == null ? void 0 : V.errors
1800
1800
  ) ? (V.errors || []).filter(
@@ -1835,12 +1835,12 @@ function ys() {
1835
1835
  dashboardId: o == null ? void 0 : o.id,
1836
1836
  currentLensName: g == null ? void 0 : g.name
1837
1837
  });
1838
- const Ct = n.orgUserId || n.tenantId && n.endUserId && n.endUserEmail, Ur = !!Ct && !!(e != null && e.accessToken) && !!(n != null && n.apiServiceUrl), Tr = l, j = (o == null ? void 0 : o.id) || null, Fr = as(
1838
+ const Ct = n.orgUserId || n.tenantId && n.endUserId && n.endUserEmail, Ur = !!Ct && !!(e != null && e.accessToken) && !!(n != null && n.apiServiceUrl), Tr = l, q = (o == null ? void 0 : o.id) || null, Fr = as(
1839
1839
  (Pt = n.config) == null ? void 0 : Pt.showBriefings,
1840
1840
  r
1841
- ), Pe = !!j && yr === j, $r = () => {
1842
- j && wr({
1843
- dashboardId: Pe ? null : j
1841
+ ), Pe = !!q && yr === q, $r = () => {
1842
+ q && wr({
1843
+ dashboardId: Pe ? null : q
1844
1844
  });
1845
1845
  };
1846
1846
  return /* @__PURE__ */ i(
@@ -1905,7 +1905,7 @@ function ys() {
1905
1905
  isPending: ie.isPending
1906
1906
  }
1907
1907
  ),
1908
- Ur && j && /* @__PURE__ */ t(Qr, { children: /* @__PURE__ */ i(Wr, { children: [
1908
+ Ur && q && /* @__PURE__ */ t(Qr, { children: /* @__PURE__ */ i(Wr, { children: [
1909
1909
  /* @__PURE__ */ t(Jr, { asChild: !0, children: /* @__PURE__ */ t(
1910
1910
  _,
1911
1911
  {
@@ -1940,21 +1940,21 @@ function ys() {
1940
1940
  {
1941
1941
  variant: "outline",
1942
1942
  size: "xs",
1943
- onClick: () => fe(!0),
1943
+ onClick: () => he(!0),
1944
1944
  children: [
1945
1945
  /* @__PURE__ */ t(Ia, { className: "h-3.5 w-3.5" }),
1946
1946
  "Share"
1947
1947
  ]
1948
1948
  }
1949
1949
  ),
1950
- !A && !E && l && j && Fr && /* @__PURE__ */ t(
1950
+ !A && !E && l && q && Fr && /* @__PURE__ */ t(
1951
1951
  rn,
1952
1952
  {
1953
- dashboardId: j,
1953
+ dashboardId: q,
1954
1954
  dashboardTitle: (o == null ? void 0 : o.title) || (T == null ? void 0 : T.title)
1955
1955
  }
1956
1956
  ),
1957
- !A && E && f.canUseFilters && l && /* @__PURE__ */ t(an, {}),
1957
+ !A && E && h.canUseFilters && l && /* @__PURE__ */ t(an, {}),
1958
1958
  E && !A && de && g && s && l && /* @__PURE__ */ i(
1959
1959
  _,
1960
1960
  {
@@ -2132,10 +2132,10 @@ function ys() {
2132
2132
  E && /* @__PURE__ */ i(
2133
2133
  $,
2134
2134
  {
2135
- onSelect: () => gt(!ht),
2135
+ onSelect: () => gt(!ft),
2136
2136
  children: [
2137
2137
  /* @__PURE__ */ t(un, { className: "h-3.5 w-3.5" }),
2138
- ht ? "Hide dashboard JSON" : "Show dashboard JSON"
2138
+ ft ? "Hide dashboard JSON" : "Show dashboard JSON"
2139
2139
  ]
2140
2140
  }
2141
2141
  ),
@@ -2160,7 +2160,7 @@ function ys() {
2160
2160
  {
2161
2161
  resource: xt,
2162
2162
  resourceType: Ye.DASHBOARD,
2163
- onClose: () => fe(!1)
2163
+ onClose: () => he(!1)
2164
2164
  }
2165
2165
  ),
2166
2166
  /* @__PURE__ */ t(
@@ -2190,12 +2190,12 @@ function ys() {
2190
2190
  {
2191
2191
  open: ye,
2192
2192
  onOpenChange: (d) => {
2193
- !d && qe && !Z || (z(d), d || (ee(null), v([]), q(!1)));
2193
+ !d && je && !Z || (z(d), d || (ee(null), v([]), j(!1)));
2194
2194
  },
2195
2195
  children: /* @__PURE__ */ i(za, { className: "max-w-sm", children: [
2196
2196
  /* @__PURE__ */ i(Ha, { children: [
2197
- /* @__PURE__ */ t(qa, { children: Z ? "Save failed" : "Saving dashboard" }),
2198
- /* @__PURE__ */ t(ja, { className: "pt-2", children: Z ? "We could not save the dashboard. Please try again." : "Please wait while we save your changes." }),
2197
+ /* @__PURE__ */ t(ja, { children: Z ? "Save failed" : "Saving dashboard" }),
2198
+ /* @__PURE__ */ t(qa, { className: "pt-2", children: Z ? "We could not save the dashboard. Please try again." : "Please wait while we save your changes." }),
2199
2199
  H.length > 0 && /* @__PURE__ */ i("div", { className: "space-y-1 rounded-md border border-destructive/20 bg-destructive/5 p-3 text-left", children: [
2200
2200
  /* @__PURE__ */ t("div", { className: "text-sm font-medium text-destructive", children: "What needs attention" }),
2201
2201
  /* @__PURE__ */ t("ul", { className: "list-disc space-y-1 pl-4 text-xs text-muted-foreground", children: H.slice(0, 5).map((d) => /* @__PURE__ */ t("li", { children: d }, d)) })
@@ -2206,7 +2206,7 @@ function ys() {
2206
2206
  Ka,
2207
2207
  {
2208
2208
  onClick: () => {
2209
- z(!1), ee(null), v([]), q(!1);
2209
+ z(!1), ee(null), v([]), j(!1);
2210
2210
  },
2211
2211
  className: "m-0",
2212
2212
  children: "Close"
@@ -2239,7 +2239,7 @@ function ys() {
2239
2239
  },
2240
2240
  onSave: Mr,
2241
2241
  onDiscard: Pr,
2242
- isSaving: qe,
2242
+ isSaving: je,
2243
2243
  saveLabel: "Save",
2244
2244
  discardLabel: "Discard"
2245
2245
  }
@@ -2259,10 +2259,10 @@ function ns({
2259
2259
  }) {
2260
2260
  if (!e || !a)
2261
2261
  return null;
2262
- const f = new URL("http://localhost:5173/print-document");
2263
- f.searchParams.set("token", e), n && f.searchParams.set("dashboardId", n), f.searchParams.set("selectedSheetId", a), u && f.searchParams.set("theme", u);
2262
+ const h = new URL("http://localhost:5173/print-document");
2263
+ h.searchParams.set("token", e), n && h.searchParams.set("dashboardId", n), h.searchParams.set("selectedSheetId", a), u && h.searchParams.set("theme", u);
2264
2264
  const l = new URL("http://127.0.0.1:3002/");
2265
- return l.searchParams.set("pdfMode", "document"), l.searchParams.set("pageSize", r || "letter"), l.searchParams.set("orientation", s || "portrait"), l.searchParams.set("url", f.toString()), l.toString();
2265
+ return l.searchParams.set("pdfMode", "document"), l.searchParams.set("pageSize", r || "letter"), l.searchParams.set("orientation", s || "portrait"), l.searchParams.set("url", h.toString()), l.toString();
2266
2266
  }
2267
2267
  export {
2268
2268
  ys as default