react-semaphor 0.1.537 → 0.1.539

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 (174) hide show
  1. package/dist/analytics-protocol/index.js +352 -341
  2. package/dist/assistant-context/index.js +10 -0
  3. package/dist/assistant-protocol/index.js +104 -0
  4. package/dist/brand-studio/index.js +35 -31
  5. package/dist/briefings/index.js +46 -45
  6. package/dist/chunks/_commonjsHelpers-BkfeUUK-.js +28 -0
  7. package/dist/chunks/add-to-dashboard-CxtTfISD.js +56 -0
  8. package/dist/chunks/aggregate-table-row-presentation-BjK9YfMI.js +979 -0
  9. package/dist/chunks/analytics-base-schemas-BFAoRlkU.js +472 -0
  10. package/dist/chunks/apply-dashboard-operations-C-iahGka.js +402 -0
  11. package/dist/chunks/assistant-chat-DgiSuFT4.js +8083 -0
  12. package/dist/chunks/availability-Bp5Gfu1I.js +44 -0
  13. package/dist/chunks/{bookmark-state-B-I9BDD0.js → bookmark-state-k7y5SNGf.js} +9 -9
  14. package/dist/chunks/{braces-8TRlDwDw.js → braces-o9UiRQes.js} +1 -1
  15. package/dist/chunks/calculated-field-identity-DcBS2NPP.js +2161 -0
  16. package/dist/chunks/calendar-day-equality-Bpl15IBo.js +487 -0
  17. package/dist/chunks/class-utils-Df1OVOT1.js +2315 -0
  18. package/dist/chunks/{field-dependencies-CpRUwr9J.js → common-types-CUf03Htv.js} +65 -58
  19. package/dist/chunks/context-HD9usB1P.js +349 -0
  20. package/dist/chunks/conversation-sQiWYUOb.js +16 -0
  21. package/dist/chunks/csv-utils-GUfKyT1J.js +56 -0
  22. package/dist/chunks/custom-visual-inputs-BrUOIwln.js +3288 -0
  23. package/dist/chunks/{dashboard-briefing-launcher-A2uVpHCp.js → dashboard-briefing-launcher-Bl3gCeBR.js} +580 -556
  24. package/dist/chunks/{dashboard-controls-DxTuVis_.js → dashboard-controls-0EX0HiJt.js} +683 -686
  25. package/dist/chunks/{common-types-g7yS12Cg.js → dashboard-filter-value-compatibility-D95O4nd7.js} +18 -24
  26. package/dist/chunks/dashboard-json-6X_2BDiL.js +69 -0
  27. package/dist/chunks/{dashboard-BPJo-Fnd.js → dashboard-y5BwcvzT.js} +1 -1
  28. package/dist/chunks/document-dashboard-inputs-BrYYlRVo.js +10678 -0
  29. package/dist/chunks/document-sheet-utils-C1eEldxs.js +1076 -0
  30. package/dist/chunks/{edit-dashboard-visual-ByV0OwSp.js → edit-dashboard-visual-Bzchfgga.js} +4744 -4746
  31. package/dist/chunks/editor-draft-sync-BN5qYHPF.js +15 -0
  32. package/dist/chunks/filter-value-text-BhWugPWE.js +163 -0
  33. package/dist/chunks/index-CqMiAkay.js +3164 -0
  34. package/dist/chunks/index-CuHybtft.js +51 -0
  35. package/dist/chunks/layout-grid-Bgzth8vd.js +16 -0
  36. package/dist/chunks/{matrix-analytical-definition-CgBTD6H8.js → matrix-analytical-definition-bcprSe4u.js} +1 -1
  37. package/dist/chunks/{matrix-card-CAdizkUl.js → matrix-card-CJn1hB5V.js} +13 -12
  38. package/dist/chunks/matrix-definition-DQDI2okF.js +206 -0
  39. package/dist/chunks/{matrix-formatter-DJCk8Znf.js → matrix-formatter-DQ8avoIQ.js} +648 -457
  40. package/dist/chunks/matrix-member-presentation-BNPSDKBG.js +105 -0
  41. package/dist/chunks/{matrix-operation-contract-BKupLHXL.js → matrix-operation-contract-B8PBF1Gd.js} +134 -133
  42. package/dist/chunks/{metric-comparison-BKHyvnAy.js → metric-comparison-CojWeLqx.js} +1 -1
  43. package/dist/chunks/{palette-Cp1hqZtm.js → palette-D10o_yYX.js} +1 -1
  44. package/dist/chunks/pivot-header-presentation-MkcKnjn3.js +42 -0
  45. package/dist/chunks/{pivot-result-identity-Bs4tLtLo.js → pivot-result-identity-D6hhcRXi.js} +1 -1
  46. package/dist/chunks/pivot-result-lifecycle-8qCDmpKc.js +804 -0
  47. package/dist/chunks/raw-temporal-D61lr48Y.js +1464 -0
  48. package/dist/chunks/{raw-temporal-contract-mLFS-9wk.js → raw-temporal-contract-C51YG48G.js} +1 -1
  49. package/dist/chunks/report-preferences-dialog-CWhSbc5_.js +1808 -0
  50. package/dist/chunks/{report-runtime-context-CG_I0PPW.js → report-runtime-context-B984Nq1E.js} +8 -7
  51. package/dist/chunks/save-CfJpQQ68.js +21 -0
  52. package/dist/chunks/saved-dashboard-context-Dqve2jlB.js +566 -0
  53. package/dist/chunks/{selection-reducer-CiDEtmAq.js → selection-reducer-vKIb_jS6.js} +2 -2
  54. package/dist/chunks/{semaphor-ready-indicator-CHu1L-lo.js → semaphor-ready-indicator-ldcwmLoY.js} +65803 -62954
  55. package/dist/chunks/{shelf-drop-preview-context-i-H6DFyU.js → shelf-drop-preview-context-BWxunXTq.js} +199 -196
  56. package/dist/chunks/{source-entity-resolution-C-oNyYMp.js → source-entity-resolution-CVA1a85c.js} +8 -8
  57. package/dist/chunks/switch-CvItuC1Q.js +8199 -0
  58. package/dist/chunks/{temporal-bucket-DlFuhCnT.js → temporal-bucket-D8JF7zKz.js} +86 -71
  59. package/dist/chunks/{temporal-bucket-contract-D2OuaVZ7.js → temporal-bucket-contract-DaOajRC7.js} +1 -1
  60. package/dist/chunks/{token-types-DtSJOUjh.js → token-types-bxUxXDX2.js} +1 -1
  61. package/dist/chunks/{upload-CAIpsti1.js → upload-BFX7apKV.js} +1 -1
  62. package/dist/chunks/{use-create-flow-overlay-state-Bj63WwHc.js → use-create-flow-overlay-state-RHgzVfcz.js} +331 -339
  63. package/dist/chunks/{validators-DMSH81OM.js → validators-Ej1DdCXa.js} +1050 -1510
  64. package/dist/chunks/visual-choice-JiJ-_3bi.js +204 -0
  65. package/dist/chunks/x-4f5U2XwU.js +100 -0
  66. package/dist/chunks/{zoned-wall-clock-1qlWCE20.js → zoned-wall-clock-MulfA26h.js} +2 -2
  67. package/dist/dashboard/index.js +2 -2
  68. package/dist/dashboard-authoring/index.js +823 -661
  69. package/dist/data-app-sdk/index.js +32 -30
  70. package/dist/data-app-sdk-adapters/index.js +23 -22
  71. package/dist/data-app-sdk-validation/index.js +23 -22
  72. package/dist/format-utils/index.js +173 -168
  73. package/dist/index.js +267 -258
  74. package/dist/layouts/index.js +236 -24
  75. package/dist/report-runtime-context/index.js +2 -2
  76. package/dist/style.css +1 -1
  77. package/dist/surfboard/index.js +2 -2
  78. package/dist/types/assistant-context.d.ts +2 -0
  79. package/dist/types/assistant-protocol.d.ts +2 -0
  80. package/dist/types/components/assistant/assistant-entry-points.d.ts +18 -0
  81. package/dist/types/components/assistant/assistant-provider.d.ts +19 -0
  82. package/dist/types/components/assistant/assistant-store.d.ts +52 -0
  83. package/dist/types/components/assistant/use-assistant.d.ts +38 -0
  84. package/dist/types/components/index.d.ts +5 -1
  85. package/dist/types/components/surfboard/filter/types.d.ts +5 -2
  86. package/dist/types/index.js +50 -51
  87. package/dist/types/lib/api/invalidate-token.d.ts +7 -0
  88. package/dist/types/lib/charts/cartesian-fields.d.ts +64 -0
  89. package/dist/types/lib/charts/types.d.ts +7 -0
  90. package/dist/types/lib/dashboard-inputs/dashboard-filter-mapping-storage-transition.d.ts +14 -2
  91. package/dist/types/lib/dashboard-inputs/dashboard-input-target-context.d.ts +5 -6
  92. package/dist/types/lib/dashboard-inputs/dashboard-input-values.d.ts +8 -3
  93. package/dist/types/lib/dashboard-inputs/resolve-dashboard-input-context.d.ts +11 -6
  94. package/dist/types/lib/dashboard-pagination/dashboard-card-pagination.d.ts +7 -0
  95. package/dist/types/lib/dashboard-viewer/compatibility-input-storage.d.ts +79 -0
  96. package/dist/types/lib/dashboard-viewer/viewer-state.d.ts +3 -2
  97. package/dist/types/lib/document/document-table-data-policy.d.ts +15 -0
  98. package/dist/types/lib/filter-values/filter-mode.d.ts +22 -0
  99. package/dist/types/lib/hooks/use-calendar-context.d.ts +5 -0
  100. package/dist/types/lib/hooks/use-filter-option-browse.d.ts +5 -0
  101. package/dist/types/lib/hooks/use-text-filter.d.ts +9 -0
  102. package/dist/types/lib/print/print-inputs.d.ts +4 -2
  103. package/dist/types/lib/query-context/build-card-query-context.d.ts +12 -4
  104. package/dist/types/lib/query-context/build-dashboard-execution-snapshot.d.ts +93 -0
  105. package/dist/types/lib/query-context/card-server-request.d.ts +72 -0
  106. package/dist/types/lib/query-context/compile-dashboard-card-filters.d.ts +7 -0
  107. package/dist/types/lib/query-context/describe-card-execution-snapshot.d.ts +56 -0
  108. package/dist/types/lib/query-context/document-section-card-query.d.ts +45 -0
  109. package/dist/types/lib/query-context/resolve-runtime-card-filters.d.ts +17 -2
  110. package/dist/types/lib/stores/dashboard-store.d.ts +34 -11
  111. package/dist/types/lib/stores/editor-store.d.ts +4 -2
  112. package/dist/types/lib/types/token-types.d.ts +11 -0
  113. package/dist/types/lib/utils/card-type-change.d.ts +30 -0
  114. package/dist/types/lib/utils/comparison-window-caption.d.ts +12 -0
  115. package/dist/types/lib/utils/filter-default-value-utils.d.ts +13 -2
  116. package/dist/types/shared/analytics-protocol/applied-constraints.d.ts +74 -0
  117. package/dist/types/shared/analytics-protocol/contracts.d.ts +3 -0
  118. package/dist/types/shared/analytics-protocol/filter-field-ownership.d.ts +43 -0
  119. package/dist/types/shared/analytics-protocol/index.d.ts +3 -0
  120. package/dist/types/shared/analytics-protocol/matrix-window-contract.d.ts +1 -1
  121. package/dist/types/shared/analytics-protocol/visual-choice.d.ts +75 -0
  122. package/dist/types/shared/assistant-context/index.d.ts +9 -0
  123. package/dist/types/shared/assistant-context/project-context.d.ts +55 -0
  124. package/dist/types/shared/assistant-context/saved-dashboard-context.d.ts +130 -0
  125. package/dist/types/shared/assistant-protocol/add-to-dashboard.d.ts +17 -0
  126. package/dist/types/shared/assistant-protocol/artifact.d.ts +63 -0
  127. package/dist/types/shared/assistant-protocol/availability.d.ts +39 -0
  128. package/dist/types/shared/assistant-protocol/context.d.ts +952 -0
  129. package/dist/types/shared/assistant-protocol/conversation.d.ts +38 -0
  130. package/dist/types/shared/assistant-protocol/index.d.ts +16 -0
  131. package/dist/types/shared/assistant-protocol/limits.d.ts +53 -0
  132. package/dist/types/shared/assistant-protocol/parts.d.ts +140 -0
  133. package/dist/types/shared/assistant-protocol/request.d.ts +77 -0
  134. package/dist/types/shared/assistant-protocol/sources.d.ts +27 -0
  135. package/dist/types/shared/assistant-protocol/token-config.d.ts +32 -0
  136. package/dist/types/shared/assistant-protocol/transcript.d.ts +40 -0
  137. package/dist/types/shared/dashboard-authoring/card-query-request.d.ts +112 -0
  138. package/dist/types/shared/dashboard-authoring/control-execution-contract.d.ts +1794 -0
  139. package/dist/types/shared/dashboard-authoring/index.d.ts +5 -0
  140. package/dist/types/shared/dashboard-authoring/new-card.d.ts +10 -0
  141. package/dist/types/shared/dashboard-authoring/operations/apply-dashboard-operations.d.ts +40 -0
  142. package/dist/types/shared/dashboard-authoring/resolved-primary-date-field-validation.d.ts +16 -0
  143. package/dist/types/shared/format-utils/filter-detail.d.ts +70 -0
  144. package/dist/types/shared/format-utils/filter-value-text.d.ts +15 -0
  145. package/dist/types/shared/format-utils/index.d.ts +3 -0
  146. package/dist/types/shared/format-utils/raw-temporal.d.ts +7 -0
  147. package/dist/types/shared/format-utils/temporal-bucket.d.ts +7 -0
  148. package/dist/types/shared/layouts/frame-layouts.d.ts +23 -0
  149. package/dist/types/shared/layouts/index.d.ts +1 -0
  150. package/package.json +12 -2
  151. package/dist/chunks/calculated-field-identity-BptYhyOP.js +0 -1326
  152. package/dist/chunks/calendar-day-equality-BRjN1S9h.js +0 -383
  153. package/dist/chunks/card-config-utils-BOM1dxCk.js +0 -1150
  154. package/dist/chunks/constants-DNWVy8Y3.js +0 -9
  155. package/dist/chunks/dashboard-json-B1dEQu98.js +0 -65
  156. package/dist/chunks/field-aggregations-CoLzYHeL.js +0 -1229
  157. package/dist/chunks/index-DTcTAGGM.js +0 -4101
  158. package/dist/chunks/matrix-continuation-C4sRcjZU.js +0 -72
  159. package/dist/chunks/matrix-control-sources-DTqcA2_L.js +0 -636
  160. package/dist/chunks/matrix-definition-D9iShKZI.js +0 -87
  161. package/dist/chunks/matrix-member-presentation-Ct8GuxHt.js +0 -209
  162. package/dist/chunks/numeric-presentation-CWu3gunq.js +0 -537
  163. package/dist/chunks/pivot-header-presentation-CHs2GFrM.js +0 -753
  164. package/dist/chunks/pivot-result-lifecycle-DQz_gjGu.js +0 -789
  165. package/dist/chunks/raw-temporal-iMXRK-Qz.js +0 -930
  166. package/dist/chunks/report-preferences-dialog-DXPjteCU.js +0 -1623
  167. package/dist/chunks/save-kO6cIaob.js +0 -34
  168. package/dist/chunks/semantic-format-DiqYeKwU.js +0 -192
  169. package/dist/chunks/switch-DO8a0EfJ.js +0 -25004
  170. package/dist/chunks/temporal-input-presentation-BD7YNUzu.js +0 -195
  171. package/dist/chunks/x-CXDkqdur.js +0 -149
  172. package/dist/types/lib/class-utils.d.ts +0 -2
  173. package/dist/types/lib/document/document-input-runtime.d.ts +0 -26
  174. package/dist/types/lib/utils.d.ts +0 -51
@@ -1,35 +1,40 @@
1
1
  import { jsx as t, jsxs as i, Fragment as $ } from "react/jsx-runtime";
2
- import { u as D, B as T, aP as Gr, aQ as Vr, aR as Xe, c as be, aO as C, aS as ge, aT as at, aU as Ht, L as Pe, m as jr, s as Hr, t as qr, v as zr, w as Kr, x as Qr, aV as Wr, aW as St, aX as Yr, P as Jr, a as Xr, b as Zr, aK as ea, a1 as kt, n as Ct, o as Dt, p as Et, q as It, I as ta, D as ra } from "./switch-DO8a0EfJ.js";
3
- import { bd as aa, be as na, bf as nt, bg as oa, bh as sa, bi as ia, bj as da, bk as la, bl as ca, aK as q, aI as xe, bm as ve, bn as ua, b8 as qt, b9 as zt, bb as Ze, bc as et, bo as Kt, av as ot, aE as ee, bp as ma, bq as ha, br as Qt, bs as pa, bt as Wt, ba as fa, bu as ba, bv as R, bw as ga, bx as At, by as xa, bz as va, bA as ya, bB as wa, ag as Na, aW as Sa, bC as ka, bD as Ca, bE as Da, f as Ea, u as Le, l as Ia, g as Qe, bF as Aa, bG as La, bH as Ma, bI as Oa, y as Pa, bJ as _a, bK as Ra, bL as Ua, aY as Ta, bM as $a, bN as Fa, bO as Ba, bP as Lt, bQ as Mt, bR as Ot, bS as Ga, bT as Va, bU as ja, bV as Ha, bW as Me, bX as qa, bY as za, bZ as We, b_ as Pt, k as Ka, b$ as Qa, c0 as Wa, c1 as Ya, c2 as Ja, c3 as Xa, c4 as Za, c5 as en, c6 as tn, c7 as _t } from "./semaphor-ready-indicator-CHu1L-lo.js";
4
- import { c as te, X as Yt, C as rn } from "./x-CXDkqdur.js";
2
+ import { by as Br, u as C, bz as Gr, bA as at, bB as Vr, bC as jr, bD as Hr, bE as qr, bF as zr, bG as Kr, aX as z, aV as ge, bH as xe, bI as Qr, bt as Vt, bu as jt, bw as Xe, bx as Ze, bJ as Ht, aI as nt, aR as ee, bK as Wr, bL as Yr, bM as qt, bN as Jr, bO as zt, bv as Xr, bP as Zr, bQ as _, bR as ea, bS as ta, bT as ra, at as aa, b6 as na, bU as oa, bV as sa, bW as ia, g as da, Z as Nt, f as Le, m as ca, h as Qe, bX as la, bY as ua, bZ as ma, b_ as ha, I as pa, b$ as fa, s as ba, c0 as ga, c1 as xa, b8 as va, c2 as ya, c3 as wa, c4 as St, c5 as kt, c6 as Ct, c7 as Na, c8 as Sa, c9 as ka, ca as Ca, cb as Me, cc as Da, cd as Ea, ce as We, cf as Ia, cg as Dt, l as Aa, ch as La, ci as Ma, cj as Oa, ck as Pa, cl as _a, cm as Ra, cn as Ua, co as Ta, cp as Et } from "./semaphor-ready-indicator-ldcwmLoY.js";
3
+ import { B as T, Q as $a, U as Fa, V as et, L as Pe, l as Ba, r as Ga, s as Va, t as ja, u as Ha, v as qa, P as za, a as Ka, b as Qa, m as It, n as At, o as Lt, p as Mt, I as Wa } from "./switch-CvItuC1Q.js";
4
+ import { c as te, X as Kt, C as Ya } from "./x-4f5U2XwU.js";
5
5
  import * as I from "react";
6
- import Jt, { useMemo as V, useState as S, useEffect as _e, useRef as Rt, useLayoutEffect as an } from "react";
7
- import { d as nn, c as on, u as sn, A as dn, a as ln, g as cn, V as un, N as mn, h as hn, U as pn } from "./dashboard-briefing-launcher-A2uVpHCp.js";
8
- import { I as Ut } from "./use-create-flow-overlay-state-Bj63WwHc.js";
9
- import "./card-config-utils-BOM1dxCk.js";
10
- import { createPortal as fn } from "react-dom";
11
- import "./validators-DMSH81OM.js";
12
- import "./matrix-operation-contract-BKupLHXL.js";
6
+ import Qt, { useMemo as j, useState as S, useEffect as _e, useRef as Ot, useLayoutEffect as Ja } from "react";
7
+ import { u as D } from "./custom-visual-inputs-BrUOIwln.js";
8
+ import "./index-CuHybtft.js";
9
+ import "./validators-Ej1DdCXa.js";
10
+ import "./matrix-operation-contract-B8PBF1Gd.js";
11
+ import "./analytics-base-schemas-BFAoRlkU.js";
13
12
  import "zod";
14
13
  import "../value-format-preferences/index.js";
15
- import { S as bn, C as gn } from "./selection-reducer-CiDEtmAq.js";
16
- import { k as Xt } from "./matrix-formatter-DJCk8Znf.js";
17
- import { I as tt } from "./calculated-field-identity-BptYhyOP.js";
18
- import { R as xn } from "./report-preferences-dialog-DXPjteCU.js";
19
- import { r as vn } from "./pivot-result-lifecycle-DQz_gjGu.js";
20
- import { u as yn } from "./use-debounced-dirty-check-BwAbnX_5.js";
21
- import { s as wn } from "./normalize-dashboard-for-dirty-check-Bk3VYv_q.js";
22
- import { k as Re, h as Tt } from "./bookmark-state-B-I9BDD0.js";
23
- import { S as Nn } from "./save-kO6cIaob.js";
24
- import { P as Sn } from "./palette-Cp1hqZtm.js";
25
- import { B as kn } from "./braces-8TRlDwDw.js";
14
+ import { c as be } from "./class-utils-Df1OVOT1.js";
15
+ import { d as Xa, c as Za, u as en, A as tn, a as rn, g as an, V as nn, N as on, i as sn, h as dn, U as cn } from "./dashboard-briefing-launcher-Bl3gCeBR.js";
16
+ import { I as ln } from "./use-create-flow-overlay-state-RHgzVfcz.js";
17
+ import { h as un, R as mn } from "./report-preferences-dialog-CWhSbc5_.js";
18
+ import { createPortal as hn } from "react-dom";
19
+ import { a5 as ve, a6 as ot, a7 as Wt, a8 as pn, a9 as Pt, aa as fn, ab as _t, ac as bn, ad as gn } from "./document-dashboard-inputs-BrYYlRVo.js";
20
+ import { S as xn, C as vn } from "./selection-reducer-vKIb_jS6.js";
21
+ import { n as Yt } from "./matrix-formatter-DQ8avoIQ.js";
22
+ import { c as tt } from "./apply-dashboard-operations-C-iahGka.js";
23
+ import { r as yn } from "./csv-utils-GUfKyT1J.js";
24
+ import { t as wn } from "./document-sheet-utils-C1eEldxs.js";
25
+ import { u as Nn } from "./use-debounced-dirty-check-BwAbnX_5.js";
26
+ import { s as Sn } from "./normalize-dashboard-for-dirty-check-Bk3VYv_q.js";
27
+ import { l as Re, h as Rt } from "./bookmark-state-k7y5SNGf.js";
28
+ import { S as kn } from "./save-CfJpQQ68.js";
29
+ import { P as Cn } from "./palette-D10o_yYX.js";
30
+ import { B as Dn } from "./braces-o9UiRQes.js";
26
31
  /**
27
32
  * @license lucide-react v0.453.0 - ISC
28
33
  *
29
34
  * This source code is licensed under the ISC license.
30
35
  * See the LICENSE file in the root directory of this source tree.
31
36
  */
32
- const Cn = te("Monitor", [
37
+ const En = te("Monitor", [
33
38
  ["rect", { width: "20", height: "14", x: "2", y: "3", rx: "2", key: "48i651" }],
34
39
  ["line", { x1: "8", x2: "16", y1: "21", y2: "21", key: "1svkeh" }],
35
40
  ["line", { x1: "12", x2: "12", y1: "17", y2: "21", key: "vw1qmm" }]
@@ -40,7 +45,7 @@ const Cn = te("Monitor", [
40
45
  * This source code is licensed under the ISC license.
41
46
  * See the LICENSE file in the root directory of this source tree.
42
47
  */
43
- const Dn = te("Moon", [
48
+ const In = te("Moon", [
44
49
  ["path", { d: "M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z", key: "a7tn18" }]
45
50
  ]);
46
51
  /**
@@ -49,7 +54,7 @@ const Dn = te("Moon", [
49
54
  * This source code is licensed under the ISC license.
50
55
  * See the LICENSE file in the root directory of this source tree.
51
56
  */
52
- const En = te("ShieldX", [
57
+ const An = te("ShieldX", [
53
58
  [
54
59
  "path",
55
60
  {
@@ -66,7 +71,7 @@ const En = te("ShieldX", [
66
71
  * This source code is licensed under the ISC license.
67
72
  * See the LICENSE file in the root directory of this source tree.
68
73
  */
69
- const In = te("Sun", [
74
+ const Ln = te("Sun", [
70
75
  ["circle", { cx: "12", cy: "12", r: "4", key: "4exip2" }],
71
76
  ["path", { d: "M12 2v2", key: "tus03m" }],
72
77
  ["path", { d: "M12 20v2", key: "1lh1kg" }],
@@ -83,7 +88,7 @@ const In = te("Sun", [
83
88
  * This source code is licensed under the ISC license.
84
89
  * See the LICENSE file in the root directory of this source tree.
85
90
  */
86
- const An = te("UserPlus", [
91
+ const Mn = te("UserPlus", [
87
92
  ["path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2", key: "1yyitq" }],
88
93
  ["circle", { cx: "9", cy: "7", r: "4", key: "nufk8" }],
89
94
  ["line", { x1: "19", x2: "19", y1: "8", y2: "14", key: "1bvyxn" }],
@@ -95,19 +100,136 @@ const An = te("UserPlus", [
95
100
  * This source code is licensed under the ISC license.
96
101
  * See the LICENSE file in the root directory of this source tree.
97
102
  */
98
- const Zt = te("UserRound", [
103
+ const Jt = te("UserRound", [
99
104
  ["circle", { cx: "12", cy: "8", r: "5", key: "1hypcn" }],
100
105
  ["path", { d: "M20 21a8 8 0 0 0-16 0", key: "rfgkzh" }]
101
- ]), Oe = ["light", "dark", "system"];
102
- function Ln() {
103
- const { theme: e, setTheme: n } = aa(), a = D(
106
+ ]);
107
+ var rt = { exports: {} }, Ye = {};
108
+ /**
109
+ * @license React
110
+ * use-sync-external-store-shim.production.js
111
+ *
112
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
113
+ *
114
+ * This source code is licensed under the MIT license found in the
115
+ * LICENSE file in the root directory of this source tree.
116
+ */
117
+ var Ut;
118
+ function On() {
119
+ if (Ut) return Ye;
120
+ Ut = 1;
121
+ var e = Qt;
122
+ function n(l, u) {
123
+ return l === u && (l !== 0 || 1 / l === 1 / u) || l !== l && u !== u;
124
+ }
125
+ var a = typeof Object.is == "function" ? Object.is : n, r = e.useState, o = e.useEffect, c = e.useLayoutEffect, m = e.useDebugValue;
126
+ function p(l, u) {
127
+ var s = u(), x = r({ inst: { value: s, getSnapshot: u } }), v = x[0].inst, w = x[1];
128
+ return c(
129
+ function() {
130
+ v.value = s, v.getSnapshot = u, b(v) && w({ inst: v });
131
+ },
132
+ [l, s, u]
133
+ ), o(
134
+ function() {
135
+ return b(v) && w({ inst: v }), l(function() {
136
+ b(v) && w({ inst: v });
137
+ });
138
+ },
139
+ [l]
140
+ ), m(s), s;
141
+ }
142
+ function b(l) {
143
+ var u = l.getSnapshot;
144
+ l = l.value;
145
+ try {
146
+ var s = u();
147
+ return !a(l, s);
148
+ } catch {
149
+ return !0;
150
+ }
151
+ }
152
+ function f(l, u) {
153
+ return u();
154
+ }
155
+ var g = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? f : p;
156
+ return Ye.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : g, Ye;
157
+ }
158
+ var Je = {};
159
+ /**
160
+ * @license React
161
+ * use-sync-external-store-shim.development.js
162
+ *
163
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
164
+ *
165
+ * This source code is licensed under the MIT license found in the
166
+ * LICENSE file in the root directory of this source tree.
167
+ */
168
+ var Tt;
169
+ function Pn() {
170
+ return Tt || (Tt = 1, process.env.NODE_ENV !== "production" && function() {
171
+ function e(s, x) {
172
+ return s === x && (s !== 0 || 1 / s === 1 / x) || s !== s && x !== x;
173
+ }
174
+ function n(s, x) {
175
+ g || o.startTransition === void 0 || (g = !0, console.error(
176
+ "You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
177
+ ));
178
+ var v = x();
179
+ if (!l) {
180
+ var w = x();
181
+ c(v, w) || (console.error(
182
+ "The result of getSnapshot should be cached to avoid an infinite loop"
183
+ ), l = !0);
184
+ }
185
+ w = m({
186
+ inst: { value: v, getSnapshot: x }
187
+ });
188
+ var h = w[0].inst, E = w[1];
189
+ return b(
190
+ function() {
191
+ h.value = v, h.getSnapshot = x, a(h) && E({ inst: h });
192
+ },
193
+ [s, v, x]
194
+ ), p(
195
+ function() {
196
+ return a(h) && E({ inst: h }), s(function() {
197
+ a(h) && E({ inst: h });
198
+ });
199
+ },
200
+ [s]
201
+ ), f(v), v;
202
+ }
203
+ function a(s) {
204
+ var x = s.getSnapshot;
205
+ s = s.value;
206
+ try {
207
+ var v = x();
208
+ return !c(s, v);
209
+ } catch {
210
+ return !0;
211
+ }
212
+ }
213
+ function r(s, x) {
214
+ return x();
215
+ }
216
+ typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
217
+ var o = Qt, c = typeof Object.is == "function" ? Object.is : e, m = o.useState, p = o.useEffect, b = o.useLayoutEffect, f = o.useDebugValue, g = !1, l = !1, u = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? r : n;
218
+ Je.useSyncExternalStore = o.useSyncExternalStore !== void 0 ? o.useSyncExternalStore : u, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
219
+ }()), Je;
220
+ }
221
+ process.env.NODE_ENV === "production" ? rt.exports = On() : rt.exports = Pn();
222
+ var _n = rt.exports;
223
+ const Oe = ["light", "dark", "system"];
224
+ function Rn() {
225
+ const { theme: e, setTheme: n } = Br(), a = C(
104
226
  (m) => m.actions.setDashboardTheme
105
227
  );
106
228
  function r() {
107
229
  const m = Oe.includes(e) ? e : "system", p = Oe[(Oe.indexOf(m) + 1) % Oe.length];
108
230
  n(p), a(p);
109
231
  }
110
- const o = e === "light" ? In : e === "dark" ? Dn : Cn, d = e === "light" ? "Theme: light (click for dark)" : e === "dark" ? "Theme: dark (click for system)" : "Theme: system (click for light)";
232
+ const o = e === "light" ? Ln : e === "dark" ? In : En, c = e === "light" ? "Theme: light (click for dark)" : e === "dark" ? "Theme: dark (click for system)" : "Theme: system (click for light)";
111
233
  return /* @__PURE__ */ t(
112
234
  T,
113
235
  {
@@ -116,71 +238,71 @@ function Ln() {
116
238
  size: "xs",
117
239
  className: "h-7 w-7 p-0 text-muted-foreground hover:text-foreground",
118
240
  onClick: r,
119
- "aria-label": d,
120
- title: d,
241
+ "aria-label": c,
242
+ title: c,
121
243
  children: /* @__PURE__ */ t(o, { className: "h-3.5 w-3.5", strokeWidth: 1.5 })
122
244
  }
123
245
  );
124
246
  }
125
- function Mn() {
126
- const { displayPreferences: e, shouldShowElement: n } = na(), { currentUser: a, userContext: r } = nt(), o = V(
127
- () => oa(a),
247
+ function Un() {
248
+ const { displayPreferences: e, shouldShowElement: n } = Gr(), { currentUser: a, userContext: r } = at(), o = j(
249
+ () => Vr(a),
128
250
  [a]
129
- ), d = V(() => (p) => o && o[p] !== void 0 && o[p] === !1 ? !1 : n(p), [o, n, e]), m = V(
251
+ ), c = j(() => (p) => o && o[p] !== void 0 && o[p] === !1 ? !1 : n(p), [o, n, e]), m = j(
130
252
  () => {
131
253
  var p, b, f, g, l;
132
254
  return {
133
- canEdit: ((p = r == null ? void 0 : r.permissions) == null ? void 0 : p.canEdit) ?? ca(a),
134
- canUseFilters: ((b = r == null ? void 0 : r.permissions) == null ? void 0 : b.canEdit) ?? la(a),
135
- canManageDashboards: ((f = r == null ? void 0 : r.permissions) == null ? void 0 : f.canCreateDashboard) ?? da(a),
136
- canCreateDashboards: ((g = r == null ? void 0 : r.permissions) == null ? void 0 : g.canCreateDashboard) ?? ia(a),
137
- canAccessVisuals: ((l = r == null ? void 0 : r.permissions) == null ? void 0 : l.canEdit) ?? sa(a)
255
+ canEdit: ((p = r == null ? void 0 : r.permissions) == null ? void 0 : p.canEdit) ?? Kr(a),
256
+ canUseFilters: ((b = r == null ? void 0 : r.permissions) == null ? void 0 : b.canEdit) ?? zr(a),
257
+ canManageDashboards: ((f = r == null ? void 0 : r.permissions) == null ? void 0 : f.canCreateDashboard) ?? qr(a),
258
+ canCreateDashboards: ((g = r == null ? void 0 : r.permissions) == null ? void 0 : g.canCreateDashboard) ?? Hr(a),
259
+ canAccessVisuals: ((l = r == null ? void 0 : r.permissions) == null ? void 0 : l.canEdit) ?? jr(a)
138
260
  };
139
261
  },
140
262
  [a, r]
141
263
  );
142
264
  return {
143
265
  displayPreferences: e,
144
- shouldShowElement: d,
266
+ shouldShowElement: c,
145
267
  permissions: m,
146
268
  currentUser: a
147
269
  };
148
270
  }
149
- function On(e, n = []) {
271
+ function Tn(e, n = []) {
150
272
  let a = [];
151
- function r(d, m) {
273
+ function r(c, m) {
152
274
  const p = I.createContext(m);
153
- p.displayName = d + "Context";
275
+ p.displayName = c + "Context";
154
276
  const b = a.length;
155
277
  a = [...a, m];
156
278
  const f = (l) => {
157
279
  var h;
158
- const { scope: c, children: s, ...x } = l, v = ((h = c == null ? void 0 : c[e]) == null ? void 0 : h[b]) || p, w = I.useMemo(() => x, Object.values(x));
280
+ const { scope: u, children: s, ...x } = l, v = ((h = u == null ? void 0 : u[e]) == null ? void 0 : h[b]) || p, w = I.useMemo(() => x, Object.values(x));
159
281
  return /* @__PURE__ */ t(v.Provider, { value: w, children: s });
160
282
  };
161
- f.displayName = d + "Provider";
162
- function g(l, c) {
283
+ f.displayName = c + "Provider";
284
+ function g(l, u) {
163
285
  var v;
164
- const s = ((v = c == null ? void 0 : c[e]) == null ? void 0 : v[b]) || p, x = I.useContext(s);
286
+ const s = ((v = u == null ? void 0 : u[e]) == null ? void 0 : v[b]) || p, x = I.useContext(s);
165
287
  if (x) return x;
166
288
  if (m !== void 0) return m;
167
- throw new Error(`\`${l}\` must be used within \`${d}\``);
289
+ throw new Error(`\`${l}\` must be used within \`${c}\``);
168
290
  }
169
291
  return [f, g];
170
292
  }
171
293
  const o = () => {
172
- const d = a.map((m) => I.createContext(m));
294
+ const c = a.map((m) => I.createContext(m));
173
295
  return function(p) {
174
- const b = (p == null ? void 0 : p[e]) || d;
296
+ const b = (p == null ? void 0 : p[e]) || c;
175
297
  return I.useMemo(
176
298
  () => ({ [`__scope${e}`]: { ...p, [e]: b } }),
177
299
  [p, b]
178
300
  );
179
301
  };
180
302
  };
181
- return o.scopeName = e, [r, Pn(o, ...n)];
303
+ return o.scopeName = e, [r, $n(o, ...n)];
182
304
  }
183
- function Pn(...e) {
305
+ function $n(...e) {
184
306
  const n = e[0];
185
307
  if (e.length === 1) return n;
186
308
  const a = () => {
@@ -188,9 +310,9 @@ function Pn(...e) {
188
310
  useScope: o(),
189
311
  scopeName: o.scopeName
190
312
  }));
191
- return function(d) {
313
+ return function(c) {
192
314
  const m = r.reduce((p, { useScope: b, scopeName: f }) => {
193
- const l = b(d)[`__scope${f}`];
315
+ const l = b(c)[`__scope${f}`];
194
316
  return { ...p, ...l };
195
317
  }, {});
196
318
  return I.useMemo(() => ({ [`__scope${n.scopeName}`]: m }), [m]);
@@ -198,7 +320,7 @@ function Pn(...e) {
198
320
  };
199
321
  return a.scopeName = n.scopeName, a;
200
322
  }
201
- var _n = [
323
+ var Fn = [
202
324
  "a",
203
325
  "button",
204
326
  "div",
@@ -216,201 +338,86 @@ var _n = [
216
338
  "span",
217
339
  "svg",
218
340
  "ul"
219
- ], st = _n.reduce((e, n) => {
220
- const a = Gr(`Primitive.${n}`), r = I.forwardRef((o, d) => {
341
+ ], st = Fn.reduce((e, n) => {
342
+ const a = $a(`Primitive.${n}`), r = I.forwardRef((o, c) => {
221
343
  const { asChild: m, ...p } = o, b = m ? a : n;
222
- return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ t(b, { ...p, ref: d });
344
+ return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ t(b, { ...p, ref: c });
223
345
  });
224
346
  return r.displayName = `Primitive.${n}`, { ...e, [n]: r };
225
- }, {}), rt = { exports: {} }, Ye = {};
226
- /**
227
- * @license React
228
- * use-sync-external-store-shim.production.js
229
- *
230
- * Copyright (c) Meta Platforms, Inc. and affiliates.
231
- *
232
- * This source code is licensed under the MIT license found in the
233
- * LICENSE file in the root directory of this source tree.
234
- */
235
- var $t;
236
- function Rn() {
237
- if ($t) return Ye;
238
- $t = 1;
239
- var e = Jt;
240
- function n(l, c) {
241
- return l === c && (l !== 0 || 1 / l === 1 / c) || l !== l && c !== c;
242
- }
243
- var a = typeof Object.is == "function" ? Object.is : n, r = e.useState, o = e.useEffect, d = e.useLayoutEffect, m = e.useDebugValue;
244
- function p(l, c) {
245
- var s = c(), x = r({ inst: { value: s, getSnapshot: c } }), v = x[0].inst, w = x[1];
246
- return d(
247
- function() {
248
- v.value = s, v.getSnapshot = c, b(v) && w({ inst: v });
249
- },
250
- [l, s, c]
251
- ), o(
252
- function() {
253
- return b(v) && w({ inst: v }), l(function() {
254
- b(v) && w({ inst: v });
255
- });
256
- },
257
- [l]
258
- ), m(s), s;
259
- }
260
- function b(l) {
261
- var c = l.getSnapshot;
262
- l = l.value;
263
- try {
264
- var s = c();
265
- return !a(l, s);
266
- } catch {
267
- return !0;
268
- }
269
- }
270
- function f(l, c) {
271
- return c();
272
- }
273
- var g = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? f : p;
274
- return Ye.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : g, Ye;
275
- }
276
- var Je = {};
277
- /**
278
- * @license React
279
- * use-sync-external-store-shim.development.js
280
- *
281
- * Copyright (c) Meta Platforms, Inc. and affiliates.
282
- *
283
- * This source code is licensed under the MIT license found in the
284
- * LICENSE file in the root directory of this source tree.
285
- */
286
- var Ft;
287
- function Un() {
288
- return Ft || (Ft = 1, process.env.NODE_ENV !== "production" && function() {
289
- function e(s, x) {
290
- return s === x && (s !== 0 || 1 / s === 1 / x) || s !== s && x !== x;
291
- }
292
- function n(s, x) {
293
- g || o.startTransition === void 0 || (g = !0, console.error(
294
- "You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
295
- ));
296
- var v = x();
297
- if (!l) {
298
- var w = x();
299
- d(v, w) || (console.error(
300
- "The result of getSnapshot should be cached to avoid an infinite loop"
301
- ), l = !0);
302
- }
303
- w = m({
304
- inst: { value: v, getSnapshot: x }
305
- });
306
- var h = w[0].inst, E = w[1];
307
- return b(
308
- function() {
309
- h.value = v, h.getSnapshot = x, a(h) && E({ inst: h });
310
- },
311
- [s, v, x]
312
- ), p(
313
- function() {
314
- return a(h) && E({ inst: h }), s(function() {
315
- a(h) && E({ inst: h });
316
- });
317
- },
318
- [s]
319
- ), f(v), v;
320
- }
321
- function a(s) {
322
- var x = s.getSnapshot;
323
- s = s.value;
324
- try {
325
- var v = x();
326
- return !d(s, v);
327
- } catch {
328
- return !0;
329
- }
330
- }
331
- function r(s, x) {
332
- return x();
333
- }
334
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
335
- var o = Jt, d = typeof Object.is == "function" ? Object.is : e, m = o.useState, p = o.useEffect, b = o.useLayoutEffect, f = o.useDebugValue, g = !1, l = !1, c = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? r : n;
336
- Je.useSyncExternalStore = o.useSyncExternalStore !== void 0 ? o.useSyncExternalStore : c, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
337
- }()), Je;
338
- }
339
- process.env.NODE_ENV === "production" ? rt.exports = Rn() : rt.exports = Un();
340
- var Tn = rt.exports;
341
- function $n() {
342
- return Tn.useSyncExternalStore(
343
- Fn,
347
+ }, {});
348
+ function Bn() {
349
+ return _n.useSyncExternalStore(
350
+ Gn,
344
351
  () => !0,
345
352
  () => !1
346
353
  );
347
354
  }
348
- function Fn() {
355
+ function Gn() {
349
356
  return () => {
350
357
  };
351
358
  }
352
- var it = "Avatar", [Bn] = On(it), [Gn, er] = Bn(it), tr = I.forwardRef(
359
+ var it = "Avatar", [Vn] = Tn(it), [jn, Xt] = Vn(it), Zt = I.forwardRef(
353
360
  (e, n) => {
354
- const { __scopeAvatar: a, ...r } = e, [o, d] = I.useState("idle");
361
+ const { __scopeAvatar: a, ...r } = e, [o, c] = I.useState("idle");
355
362
  return /* @__PURE__ */ t(
356
- Gn,
363
+ jn,
357
364
  {
358
365
  scope: a,
359
366
  imageLoadingStatus: o,
360
- onImageLoadingStatusChange: d,
367
+ onImageLoadingStatusChange: c,
361
368
  children: /* @__PURE__ */ t(st.span, { ...r, ref: n })
362
369
  }
363
370
  );
364
371
  }
365
372
  );
366
- tr.displayName = it;
367
- var rr = "AvatarImage", ar = I.forwardRef(
373
+ Zt.displayName = it;
374
+ var er = "AvatarImage", tr = I.forwardRef(
368
375
  (e, n) => {
369
376
  const { __scopeAvatar: a, src: r, onLoadingStatusChange: o = () => {
370
- }, ...d } = e, m = er(rr, a), p = Vn(r, d), b = Vr((f) => {
377
+ }, ...c } = e, m = Xt(er, a), p = Hn(r, c), b = Fa((f) => {
371
378
  o(f), m.onImageLoadingStatusChange(f);
372
379
  });
373
- return Xe(() => {
380
+ return et(() => {
374
381
  p !== "idle" && b(p);
375
- }, [p, b]), p === "loaded" ? /* @__PURE__ */ t(st.img, { ...d, ref: n, src: r }) : null;
382
+ }, [p, b]), p === "loaded" ? /* @__PURE__ */ t(st.img, { ...c, ref: n, src: r }) : null;
376
383
  }
377
384
  );
378
- ar.displayName = rr;
379
- var nr = "AvatarFallback", or = I.forwardRef(
385
+ tr.displayName = er;
386
+ var rr = "AvatarFallback", ar = I.forwardRef(
380
387
  (e, n) => {
381
- const { __scopeAvatar: a, delayMs: r, ...o } = e, d = er(nr, a), [m, p] = I.useState(r === void 0);
388
+ const { __scopeAvatar: a, delayMs: r, ...o } = e, c = Xt(rr, a), [m, p] = I.useState(r === void 0);
382
389
  return I.useEffect(() => {
383
390
  if (r !== void 0) {
384
391
  const b = window.setTimeout(() => p(!0), r);
385
392
  return () => window.clearTimeout(b);
386
393
  }
387
- }, [r]), m && d.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ t(st.span, { ...o, ref: n }) : null;
394
+ }, [r]), m && c.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ t(st.span, { ...o, ref: n }) : null;
388
395
  }
389
396
  );
390
- or.displayName = nr;
391
- function Bt(e, n) {
397
+ ar.displayName = rr;
398
+ function $t(e, n) {
392
399
  return e ? n ? (e.src !== n && (e.src = n), e.complete && e.naturalWidth > 0 ? "loaded" : "loading") : "error" : "idle";
393
400
  }
394
- function Vn(e, { referrerPolicy: n, crossOrigin: a }) {
395
- const r = $n(), o = I.useRef(null), d = r ? (o.current || (o.current = new window.Image()), o.current) : null, [m, p] = I.useState(
396
- () => Bt(d, e)
401
+ function Hn(e, { referrerPolicy: n, crossOrigin: a }) {
402
+ const r = Bn(), o = I.useRef(null), c = r ? (o.current || (o.current = new window.Image()), o.current) : null, [m, p] = I.useState(
403
+ () => $t(c, e)
397
404
  );
398
- return Xe(() => {
399
- p(Bt(d, e));
400
- }, [d, e]), Xe(() => {
405
+ return et(() => {
406
+ p($t(c, e));
407
+ }, [c, e]), et(() => {
401
408
  const b = (l) => () => {
402
409
  p(l);
403
410
  };
404
- if (!d) return;
411
+ if (!c) return;
405
412
  const f = b("loaded"), g = b("error");
406
- return d.addEventListener("load", f), d.addEventListener("error", g), n && (d.referrerPolicy = n), typeof a == "string" && (d.crossOrigin = a), () => {
407
- d.removeEventListener("load", f), d.removeEventListener("error", g);
413
+ return c.addEventListener("load", f), c.addEventListener("error", g), n && (c.referrerPolicy = n), typeof a == "string" && (c.crossOrigin = a), () => {
414
+ c.removeEventListener("load", f), c.removeEventListener("error", g);
408
415
  };
409
- }, [d, a, n]), m;
416
+ }, [c, a, n]), m;
410
417
  }
411
- var sr = tr, ir = ar, dr = or;
412
- const lr = I.forwardRef(({ className: e, ...n }, a) => /* @__PURE__ */ t(
413
- sr,
418
+ var nr = Zt, or = tr, sr = ar;
419
+ const ir = I.forwardRef(({ className: e, ...n }, a) => /* @__PURE__ */ t(
420
+ nr,
414
421
  {
415
422
  ref: a,
416
423
  className: be(
@@ -420,18 +427,18 @@ const lr = I.forwardRef(({ className: e, ...n }, a) => /* @__PURE__ */ t(
420
427
  ...n
421
428
  }
422
429
  ));
423
- lr.displayName = sr.displayName;
424
- const jn = I.forwardRef(({ className: e, ...n }, a) => /* @__PURE__ */ t(
425
- ir,
430
+ ir.displayName = nr.displayName;
431
+ const qn = I.forwardRef(({ className: e, ...n }, a) => /* @__PURE__ */ t(
432
+ or,
426
433
  {
427
434
  ref: a,
428
435
  className: be("aspect-square h-full w-full", e),
429
436
  ...n
430
437
  }
431
438
  ));
432
- jn.displayName = ir.displayName;
433
- const cr = I.forwardRef(({ className: e, ...n }, a) => /* @__PURE__ */ t(
434
- dr,
439
+ qn.displayName = or.displayName;
440
+ const dr = I.forwardRef(({ className: e, ...n }, a) => /* @__PURE__ */ t(
441
+ sr,
435
442
  {
436
443
  ref: a,
437
444
  className: be(
@@ -441,172 +448,172 @@ const cr = I.forwardRef(({ className: e, ...n }, a) => /* @__PURE__ */ t(
441
448
  ...n
442
449
  }
443
450
  ));
444
- cr.displayName = dr.displayName;
445
- const Hn = async (e, n, a) => {
451
+ dr.displayName = sr.displayName;
452
+ const zn = async (e, n, a) => {
446
453
  const r = `${e}/management/v1/groups`;
447
- return await Ht(r, n, a);
448
- }, qn = async (e, n, a, r) => {
454
+ return await Wt(r, n, a);
455
+ }, Kn = async (e, n, a, r) => {
449
456
  const o = `${e}/management/v1/groups/${a}`;
450
- return at(o, n, "PATCH", r);
451
- }, zn = async (e, n, a) => {
457
+ return ot(o, n, "PATCH", r);
458
+ }, Qn = async (e, n, a) => {
452
459
  const r = `${e}/management/v1/groups/${a}`;
453
- await at(r, n, "DELETE");
454
- }, Kn = async (e, n, a, r) => {
460
+ await ot(r, n, "DELETE");
461
+ }, Wn = async (e, n, a, r) => {
455
462
  const o = `${e}/management/v1/groups/${a}/members`;
456
- return await Ht(o, n, r);
457
- }, Qn = async (e, n, a, r) => {
463
+ return await Wt(o, n, r);
464
+ }, Yn = async (e, n, a, r) => {
458
465
  const o = `${e}/management/v1/groups/${a}/members`;
459
- await at(o, n, "DELETE", r);
466
+ await ot(o, n, "DELETE", r);
460
467
  };
461
- function Wn() {
462
- const { authToken: e, tokenProps: n } = q(), a = xe();
463
- return ve({
464
- mutationFn: (r) => Hn(n.apiServiceUrl, (e == null ? void 0 : e.accessToken) || "", r),
468
+ function Jn() {
469
+ const { authToken: e, tokenProps: n } = z(), a = ge();
470
+ return xe({
471
+ mutationFn: (r) => zn(n.apiServiceUrl, (e == null ? void 0 : e.accessToken) || "", r),
465
472
  onSuccess: () => {
466
- a.invalidateQueries({ queryKey: ["groups"] }), C.success("Group created successfully");
473
+ a.invalidateQueries({ queryKey: ["groups"] }), D.success("Group created successfully");
467
474
  },
468
475
  onError: (r) => {
469
- console.error("Failed to create group:", r), C.error("Failed to create group", {
470
- description: ge(r, "Failed to create group")
476
+ console.error("Failed to create group:", r), D.error("Failed to create group", {
477
+ description: ve(r, "Failed to create group")
471
478
  });
472
479
  }
473
480
  });
474
481
  }
475
- function Yn() {
476
- const { authToken: e, tokenProps: n } = q(), a = xe();
477
- return ve({
482
+ function Xn() {
483
+ const { authToken: e, tokenProps: n } = z(), a = ge();
484
+ return xe({
478
485
  mutationFn: ({
479
486
  groupId: r,
480
487
  data: o
481
- }) => qn(n.apiServiceUrl, (e == null ? void 0 : e.accessToken) || "", r, o),
488
+ }) => Kn(n.apiServiceUrl, (e == null ? void 0 : e.accessToken) || "", r, o),
482
489
  onSuccess: (r, o) => {
483
- a.invalidateQueries({ queryKey: ["group", o.groupId] }), a.invalidateQueries({ queryKey: ["groups"] }), C.success("Group updated successfully");
490
+ a.invalidateQueries({ queryKey: ["group", o.groupId] }), a.invalidateQueries({ queryKey: ["groups"] }), D.success("Group updated successfully");
484
491
  },
485
492
  onError: (r) => {
486
- console.error("Failed to update group:", r), C.error("Failed to update group", {
487
- description: ge(r, "Failed to update group")
493
+ console.error("Failed to update group:", r), D.error("Failed to update group", {
494
+ description: ve(r, "Failed to update group")
488
495
  });
489
496
  }
490
497
  });
491
498
  }
492
- function Jn() {
493
- const { authToken: e, tokenProps: n } = q(), a = xe();
494
- return ve({
495
- mutationFn: (r) => zn(n.apiServiceUrl, (e == null ? void 0 : e.accessToken) || "", r),
499
+ function Zn() {
500
+ const { authToken: e, tokenProps: n } = z(), a = ge();
501
+ return xe({
502
+ mutationFn: (r) => Qn(n.apiServiceUrl, (e == null ? void 0 : e.accessToken) || "", r),
496
503
  onSuccess: (r, o) => {
497
- a.invalidateQueries({ queryKey: ["groups"] }), a.removeQueries({ queryKey: ["group", o] }), C.success("Group deleted successfully");
504
+ a.invalidateQueries({ queryKey: ["groups"] }), a.removeQueries({ queryKey: ["group", o] }), D.success("Group deleted successfully");
498
505
  },
499
506
  onError: (r) => {
500
- console.error("Failed to delete group:", r), C.error("Failed to delete group", {
501
- description: ge(r, "Failed to delete group")
507
+ console.error("Failed to delete group:", r), D.error("Failed to delete group", {
508
+ description: ve(r, "Failed to delete group")
502
509
  });
503
510
  }
504
511
  });
505
512
  }
506
- function Xn() {
507
- const { authToken: e, tokenProps: n } = q(), a = xe();
508
- return ve({
513
+ function eo() {
514
+ const { authToken: e, tokenProps: n } = z(), a = ge();
515
+ return xe({
509
516
  mutationFn: ({
510
517
  groupId: r,
511
518
  data: o
512
- }) => Kn(n.apiServiceUrl, (e == null ? void 0 : e.accessToken) || "", r, o),
519
+ }) => Wn(n.apiServiceUrl, (e == null ? void 0 : e.accessToken) || "", r, o),
513
520
  onSuccess: (r, o) => {
514
521
  a.invalidateQueries({ queryKey: ["group", o.groupId] }), a.invalidateQueries({
515
522
  queryKey: ["group-members", o.groupId]
516
- }), a.invalidateQueries({ queryKey: ["groups"] }), C.success("Members added successfully");
523
+ }), a.invalidateQueries({ queryKey: ["groups"] }), D.success("Members added successfully");
517
524
  },
518
525
  onError: (r) => {
519
- console.error("Failed to add group members:", r), C.error("Failed to add members", {
520
- description: ge(r, "Failed to add members")
526
+ console.error("Failed to add group members:", r), D.error("Failed to add members", {
527
+ description: ve(r, "Failed to add members")
521
528
  });
522
529
  }
523
530
  });
524
531
  }
525
- function Zn() {
526
- const { authToken: e, tokenProps: n } = q(), a = xe();
527
- return ve({
532
+ function to() {
533
+ const { authToken: e, tokenProps: n } = z(), a = ge();
534
+ return xe({
528
535
  mutationFn: ({
529
536
  groupId: r,
530
537
  data: o
531
- }) => Qn(n.apiServiceUrl, (e == null ? void 0 : e.accessToken) || "", r, o),
538
+ }) => Yn(n.apiServiceUrl, (e == null ? void 0 : e.accessToken) || "", r, o),
532
539
  onSuccess: (r, o) => {
533
540
  a.invalidateQueries({ queryKey: ["group", o.groupId] }), a.invalidateQueries({
534
541
  queryKey: ["group-members", o.groupId]
535
- }), a.invalidateQueries({ queryKey: ["groups"] }), C.success("Members removed successfully");
542
+ }), a.invalidateQueries({ queryKey: ["groups"] }), D.success("Members removed successfully");
536
543
  },
537
544
  onError: (r) => {
538
- console.error("Failed to remove group members:", r), C.error("Failed to remove members", {
539
- description: ge(r, "Failed to remove members")
545
+ console.error("Failed to remove group members:", r), D.error("Failed to remove members", {
546
+ description: ve(r, "Failed to remove members")
540
547
  });
541
548
  }
542
549
  });
543
550
  }
544
- const eo = [];
545
- function to({
551
+ const ro = [];
552
+ function ao({
546
553
  open: e,
547
554
  onOpenChange: n
548
555
  }) {
549
556
  var E, A, L;
550
- const { tokenProps: a } = q(), { currentUser: r } = nt(), o = (r == null ? void 0 : r.type) === "tenant", d = a == null ? void 0 : a.tenantId, {
557
+ const { tokenProps: a } = z(), { currentUser: r } = at(), o = (r == null ? void 0 : r.type) === "tenant", c = a == null ? void 0 : a.tenantId, {
551
558
  groups: m,
552
559
  isLoading: p,
553
560
  error: b,
554
561
  refetch: f
555
- } = ua({
562
+ } = Qr({
556
563
  type: o ? "TENANT_GROUP" : "all",
557
- tenantId: o ? d : void 0,
564
+ tenantId: o ? c : void 0,
558
565
  includeMembers: !1
559
- }), g = b ? ur(b, "Unable to load groups.") : null, [l, c] = S({ kind: "list" }), [s, x] = S(null), v = Jn();
566
+ }), g = b ? cr(b, "Unable to load groups.") : null, [l, u] = S({ kind: "list" }), [s, x] = S(null), v = Zn();
560
567
  _e(() => {
561
- e || (c({ kind: "list" }), x(null));
568
+ e || (u({ kind: "list" }), x(null));
562
569
  }, [e]);
563
570
  const w = l.kind === "members" && m.find((N) => N.id === l.groupId) || null, h = async () => {
564
571
  if (s)
565
572
  try {
566
- await v.mutateAsync(s.id), x(null), c({ kind: "list" }), f();
573
+ await v.mutateAsync(s.id), x(null), u({ kind: "list" }), f();
567
574
  } catch {
568
575
  }
569
576
  };
570
- return /* @__PURE__ */ t(qt, { open: e, onOpenChange: n, children: /* @__PURE__ */ i(zt, { className: "flex max-h-[640px] w-[720px] max-w-[92vw] flex-col gap-0 overflow-hidden p-0", children: [
577
+ return /* @__PURE__ */ t(Vt, { open: e, onOpenChange: n, children: /* @__PURE__ */ i(jt, { className: "flex max-h-[640px] w-[720px] max-w-[92vw] flex-col gap-0 overflow-hidden p-0", children: [
571
578
  l.kind === "list" ? /* @__PURE__ */ i("div", { className: "shrink-0 border-b border-border px-5 pt-4 pb-3.5", children: [
572
- /* @__PURE__ */ t(Ze, { className: "text-[15px] font-semibold tracking-tight", children: "Group management" }),
573
- /* @__PURE__ */ t(et, { className: "mt-1 text-[12px] leading-[1.5] text-muted-foreground", children: "Organize people into groups for shared access." })
579
+ /* @__PURE__ */ t(Xe, { className: "text-[15px] font-semibold tracking-tight", children: "Group management" }),
580
+ /* @__PURE__ */ t(Ze, { className: "mt-1 text-[12px] leading-[1.5] text-muted-foreground", children: "Organize people into groups for shared access." })
574
581
  ] }) : l.kind === "create" ? /* @__PURE__ */ i("div", { className: "flex h-10 shrink-0 items-center gap-1.5 border-b border-border px-5", children: [
575
582
  /* @__PURE__ */ t(
576
583
  "button",
577
584
  {
578
585
  type: "button",
579
- onClick: () => c({ kind: "list" }),
586
+ onClick: () => u({ kind: "list" }),
580
587
  "aria-label": "Back",
581
588
  className: "-ml-1 flex h-6 w-6 items-center justify-center rounded-[3px] text-muted-foreground hover:bg-accent hover:text-foreground",
582
- children: /* @__PURE__ */ t(Kt, { className: "h-3.5 w-3.5" })
589
+ children: /* @__PURE__ */ t(Ht, { className: "h-3.5 w-3.5" })
583
590
  }
584
591
  ),
585
- /* @__PURE__ */ t(Ze, { className: "truncate text-[13px] font-medium", children: "New group" }),
586
- /* @__PURE__ */ t(et, { className: "sr-only", children: "Create a new group to organize members." })
592
+ /* @__PURE__ */ t(Xe, { className: "truncate text-[13px] font-medium", children: "New group" }),
593
+ /* @__PURE__ */ t(Ze, { className: "sr-only", children: "Create a new group to organize members." })
587
594
  ] }) : null,
588
595
  l.kind === "list" && /* @__PURE__ */ t(
589
- ro,
596
+ no,
590
597
  {
591
598
  groups: m,
592
599
  isLoading: p,
593
600
  errorMessage: g,
594
601
  onRetry: () => f(),
595
602
  currentUserId: r == null ? void 0 : r.id,
596
- onOpenGroup: (N) => c({ kind: "members", groupId: N }),
597
- onCreate: () => c({ kind: "create" }),
603
+ onOpenGroup: (N) => u({ kind: "members", groupId: N }),
604
+ onCreate: () => u({ kind: "create" }),
598
605
  onDeleteRequest: (N) => x(N)
599
606
  }
600
607
  ),
601
608
  l.kind === "members" && w && /* @__PURE__ */ t(
602
- oo,
609
+ io,
603
610
  {
604
611
  group: w,
605
612
  isTenantViewer: o,
606
613
  canEdit: ((E = w.permissions) == null ? void 0 : E.canEdit) ?? w.createdBy === (r == null ? void 0 : r.id),
607
614
  canDelete: ((A = w.permissions) == null ? void 0 : A.canDelete) ?? w.createdBy === (r == null ? void 0 : r.id),
608
615
  canManageMembers: ((L = w.permissions) == null ? void 0 : L.canManageMembers) ?? w.createdBy === (r == null ? void 0 : r.id),
609
- onBack: () => c({ kind: "list" }),
616
+ onBack: () => u({ kind: "list" }),
610
617
  onMembersChanged: f,
611
618
  onUpdated: f,
612
619
  onRequestDelete: () => x(w)
@@ -614,13 +621,13 @@ function to({
614
621
  w.id
615
622
  ),
616
623
  l.kind === "create" && /* @__PURE__ */ t(
617
- so,
624
+ co,
618
625
  {
619
626
  isTenantUser: o,
620
- tenantId: d,
621
- onCancel: () => c({ kind: "list" }),
627
+ tenantId: c,
628
+ onCancel: () => u({ kind: "list" }),
622
629
  onCreated: (N) => {
623
- f(), c({ kind: "members", groupId: N });
630
+ f(), u({ kind: "members", groupId: N });
624
631
  }
625
632
  }
626
633
  ),
@@ -650,7 +657,7 @@ function to({
650
657
  disabled: v.isPending,
651
658
  className: "inline-flex h-7 items-center gap-1.5 rounded-[5px] bg-rose-600 px-2.5 text-[12px] font-medium text-white hover:bg-rose-700 disabled:opacity-60",
652
659
  children: [
653
- v.isPending ? /* @__PURE__ */ t(Pe, { className: "h-3 w-3 animate-spin" }) : /* @__PURE__ */ t(ot, { className: "h-3 w-3" }),
660
+ v.isPending ? /* @__PURE__ */ t(Pe, { className: "h-3 w-3 animate-spin" }) : /* @__PURE__ */ t(nt, { className: "h-3 w-3" }),
654
661
  "Delete group"
655
662
  ]
656
663
  }
@@ -659,17 +666,17 @@ function to({
659
666
  ] })
660
667
  ] }) });
661
668
  }
662
- function ro({
669
+ function no({
663
670
  groups: e,
664
671
  isLoading: n,
665
672
  errorMessage: a,
666
673
  onRetry: r,
667
674
  currentUserId: o,
668
- onOpenGroup: d,
675
+ onOpenGroup: c,
669
676
  onCreate: m,
670
677
  onDeleteRequest: p
671
678
  }) {
672
- const [b, f] = S(""), g = V(
679
+ const [b, f] = S(""), g = j(
673
680
  () => e.filter(
674
681
  (l) => !b.trim() || l.name.toLowerCase().includes(b.toLowerCase()) || (l.description || "").toLowerCase().includes(b.toLowerCase())
675
682
  ),
@@ -678,7 +685,7 @@ function ro({
678
685
  return /* @__PURE__ */ i("div", { className: "flex flex-1 flex-col overflow-hidden", children: [
679
686
  /* @__PURE__ */ i("div", { className: "flex shrink-0 items-center gap-2 border-b border-border px-5 py-2.5", children: [
680
687
  /* @__PURE__ */ i("div", { className: "flex flex-1 items-center gap-2 rounded-[5px] border border-border bg-background px-2 focus-within:border-foreground/40", children: [
681
- /* @__PURE__ */ t(bn, { className: "h-3 w-3 text-muted-foreground" }),
688
+ /* @__PURE__ */ t(xn, { className: "h-3 w-3 text-muted-foreground" }),
682
689
  /* @__PURE__ */ t(
683
690
  "input",
684
691
  {
@@ -694,7 +701,7 @@ function ro({
694
701
  type: "button",
695
702
  onClick: () => f(""),
696
703
  className: "flex h-4 w-4 items-center justify-center rounded-[3px] text-muted-foreground hover:bg-accent hover:text-foreground",
697
- children: /* @__PURE__ */ t(Yt, { className: "h-2.5 w-2.5" })
704
+ children: /* @__PURE__ */ t(Kt, { className: "h-2.5 w-2.5" })
698
705
  }
699
706
  )
700
707
  ] }),
@@ -718,13 +725,13 @@ function ro({
718
725
  },
719
726
  l
720
727
  )) }) : a ? /* @__PURE__ */ t(
721
- mr,
728
+ lr,
722
729
  {
723
730
  title: "Can't load groups",
724
731
  message: a,
725
732
  onRetry: r
726
733
  }
727
- ) : g.length === 0 && e.length === 0 ? /* @__PURE__ */ t(no, { onCreate: m }) : g.length === 0 ? /* @__PURE__ */ i("div", { className: "flex h-full flex-col items-center justify-center gap-1 py-10 text-center", children: [
734
+ ) : g.length === 0 && e.length === 0 ? /* @__PURE__ */ t(so, { onCreate: m }) : g.length === 0 ? /* @__PURE__ */ i("div", { className: "flex h-full flex-col items-center justify-center gap-1 py-10 text-center", children: [
728
735
  /* @__PURE__ */ i("div", { className: "text-[12px] text-foreground", children: [
729
736
  'No groups match "',
730
737
  b,
@@ -732,13 +739,13 @@ function ro({
732
739
  ] }),
733
740
  /* @__PURE__ */ t("div", { className: "text-[11px] text-muted-foreground", children: "Try a different search." })
734
741
  ] }) : g.map((l) => {
735
- var c;
742
+ var u;
736
743
  return /* @__PURE__ */ t(
737
- ao,
744
+ oo,
738
745
  {
739
746
  group: l,
740
- canDelete: ((c = l.permissions) == null ? void 0 : c.canDelete) ?? l.createdBy === o,
741
- onClick: () => d(l.id),
747
+ canDelete: ((u = l.permissions) == null ? void 0 : u.canDelete) ?? l.createdBy === o,
748
+ onClick: () => c(l.id),
742
749
  onDelete: () => p(l)
743
750
  },
744
751
  l.id
@@ -746,7 +753,7 @@ function ro({
746
753
  }) })
747
754
  ] });
748
755
  }
749
- function ao({
756
+ function oo({
750
757
  group: e,
751
758
  canDelete: n,
752
759
  onClick: a,
@@ -754,7 +761,7 @@ function ao({
754
761
  }) {
755
762
  let o = "";
756
763
  try {
757
- o = Xt(new Date(e.createdAt), "MMM d, yyyy");
764
+ o = Yt(new Date(e.createdAt), "MMM d, yyyy");
758
765
  } catch {
759
766
  o = "";
760
767
  }
@@ -765,12 +772,12 @@ function ao({
765
772
  onClick: a,
766
773
  className: "group flex w-full items-center gap-3 border-b border-border/60 px-5 py-2.5 text-left hover:bg-accent/40",
767
774
  children: [
768
- /* @__PURE__ */ t("div", { className: "flex h-7 w-7 shrink-0 items-center justify-center rounded-[4px] border border-border bg-background text-muted-foreground", children: /* @__PURE__ */ t(pa, { className: "h-3.5 w-3.5" }) }),
775
+ /* @__PURE__ */ t("div", { className: "flex h-7 w-7 shrink-0 items-center justify-center rounded-[4px] border border-border bg-background text-muted-foreground", children: /* @__PURE__ */ t(Jr, { className: "h-3.5 w-3.5" }) }),
769
776
  /* @__PURE__ */ i("div", { className: "min-w-0 flex-1", children: [
770
777
  /* @__PURE__ */ t("div", { className: "truncate text-[13px] font-medium text-foreground", children: e.name }),
771
778
  /* @__PURE__ */ i("div", { className: "mt-0.5 flex items-center gap-2 text-[11px] text-muted-foreground", children: [
772
779
  /* @__PURE__ */ i("span", { className: "inline-flex items-center gap-1", children: [
773
- /* @__PURE__ */ t(Zt, { className: "h-2.5 w-2.5" }),
780
+ /* @__PURE__ */ t(Jt, { className: "h-2.5 w-2.5" }),
774
781
  e.memberCount,
775
782
  " member",
776
783
  e.memberCount === 1 ? "" : "s"
@@ -778,7 +785,7 @@ function ao({
778
785
  o && /* @__PURE__ */ i($, { children: [
779
786
  /* @__PURE__ */ t("span", { className: "text-border", children: "·" }),
780
787
  /* @__PURE__ */ i("span", { className: "inline-flex items-center gap-1", children: [
781
- /* @__PURE__ */ t(Wt, { className: "h-2.5 w-2.5" }),
788
+ /* @__PURE__ */ t(zt, { className: "h-2.5 w-2.5" }),
782
789
  o
783
790
  ] })
784
791
  ] }),
@@ -794,26 +801,26 @@ function ao({
794
801
  {
795
802
  role: "button",
796
803
  tabIndex: 0,
797
- onClick: (d) => {
798
- d.stopPropagation(), r();
804
+ onClick: (c) => {
805
+ c.stopPropagation(), r();
799
806
  },
800
- onKeyDown: (d) => {
801
- (d.key === "Enter" || d.key === " ") && (d.preventDefault(), d.stopPropagation(), r());
807
+ onKeyDown: (c) => {
808
+ (c.key === "Enter" || c.key === " ") && (c.preventDefault(), c.stopPropagation(), r());
802
809
  },
803
810
  "aria-label": `Delete ${e.name}`,
804
811
  className: "flex h-6 w-6 items-center justify-center rounded-[3px] text-muted-foreground hover:bg-accent hover:text-foreground",
805
- children: /* @__PURE__ */ t(ot, { className: "h-3 w-3" })
812
+ children: /* @__PURE__ */ t(nt, { className: "h-3 w-3" })
806
813
  }
807
814
  ),
808
- /* @__PURE__ */ t(gn, { className: "h-3.5 w-3.5 text-muted-foreground" })
815
+ /* @__PURE__ */ t(vn, { className: "h-3.5 w-3.5 text-muted-foreground" })
809
816
  ] })
810
817
  ]
811
818
  }
812
819
  );
813
820
  }
814
- function no({ onCreate: e }) {
821
+ function so({ onCreate: e }) {
815
822
  return /* @__PURE__ */ i("div", { className: "flex h-full flex-col items-center justify-center gap-2 py-12 text-center", children: [
816
- /* @__PURE__ */ t("div", { className: "flex h-9 w-9 items-center justify-center rounded-full border border-border bg-muted/40 text-muted-foreground", children: /* @__PURE__ */ t(Qt, { className: "h-4 w-4" }) }),
823
+ /* @__PURE__ */ t("div", { className: "flex h-9 w-9 items-center justify-center rounded-full border border-border bg-muted/40 text-muted-foreground", children: /* @__PURE__ */ t(qt, { className: "h-4 w-4" }) }),
817
824
  /* @__PURE__ */ t("div", { className: "text-[13px] font-medium text-foreground", children: "No groups yet" }),
818
825
  /* @__PURE__ */ t("div", { className: "max-w-[320px] text-[11.5px] leading-[1.55] text-muted-foreground", children: "Groups let you grant shared access to dashboards. Create one and add members." }),
819
826
  /* @__PURE__ */ i(
@@ -830,13 +837,13 @@ function no({ onCreate: e }) {
830
837
  )
831
838
  ] });
832
839
  }
833
- function oo({
840
+ function io({
834
841
  group: e,
835
842
  isTenantViewer: n,
836
843
  canEdit: a,
837
844
  canDelete: r,
838
845
  canManageMembers: o,
839
- onBack: d,
846
+ onBack: c,
840
847
  onMembersChanged: m,
841
848
  onUpdated: p,
842
849
  onRequestDelete: b
@@ -845,21 +852,21 @@ function oo({
845
852
  data: f,
846
853
  isLoading: g,
847
854
  error: l,
848
- refetch: c
849
- } = ma(e.id), s = (f == null ? void 0 : f.members) ?? eo, x = l ? ur(l, "Unable to load members for this group.") : null, v = e.type === "TENANT_GROUP" ? "tenant" : "organization", { users: w } = ha({
855
+ refetch: u
856
+ } = Wr(e.id), s = (f == null ? void 0 : f.members) ?? ro, x = l ? cr(l, "Unable to load members for this group.") : null, v = e.type === "TENANT_GROUP" ? "tenant" : "organization", { users: w } = Yr({
850
857
  type: v,
851
858
  tenantId: e.tenantId || void 0,
852
859
  active: !0,
853
860
  limit: 200
854
- }), h = V(
861
+ }), h = j(
855
862
  () => new Set(s.map((y) => y.userId)),
856
863
  [s]
857
- ), E = Xn(), A = Zn(), L = Yn(), [N, k] = S(!1), [re, ae] = S(e.name), [ye, z] = S(!1), [K, Q] = S(e.description || ""), [W, we] = S(""), [Ne, ne] = S(!1), oe = V(() => {
858
- const y = W.trim().toLowerCase();
864
+ ), E = eo(), A = to(), L = Xn(), [N, k] = S(!1), [re, ae] = S(e.name), [ye, K] = S(!1), [Q, W] = S(e.description || ""), [Y, we] = S(""), [Ne, ne] = S(!1), oe = j(() => {
865
+ const y = Y.trim().toLowerCase();
859
866
  return w.filter((U) => !h.has(U.id)).filter(
860
867
  (U) => !y || (U.name || "").toLowerCase().includes(y) || (U.email || "").toLowerCase().includes(y)
861
868
  ).slice(0, 50);
862
- }, [w, h, W]), Se = async () => {
869
+ }, [w, h, Y]), Se = async () => {
863
870
  const y = re.trim();
864
871
  if (k(!1), y.length >= 3 && y !== e.name)
865
872
  try {
@@ -870,8 +877,8 @@ function oo({
870
877
  } catch {
871
878
  }
872
879
  }, se = async () => {
873
- const y = K.trim();
874
- if (z(!1), y !== (e.description || ""))
880
+ const y = Q.trim();
881
+ if (K(!1), y !== (e.description || ""))
875
882
  try {
876
883
  await L.mutateAsync({
877
884
  groupId: e.id,
@@ -889,23 +896,23 @@ function oo({
889
896
  userIds: [y.id],
890
897
  userType: v === "tenant" ? "tenant" : "org"
891
898
  }
892
- }), c(), m();
899
+ }), u(), m();
893
900
  } catch {
894
901
  }
895
902
  }
896
- }, Y = async (y) => {
903
+ }, J = async (y) => {
897
904
  if (o)
898
905
  try {
899
906
  await A.mutateAsync({
900
907
  groupId: e.id,
901
908
  data: { userIds: [y] }
902
- }), c(), m();
909
+ }), u(), m();
903
910
  } catch {
904
911
  }
905
912
  };
906
913
  let F = "";
907
914
  try {
908
- F = Xt(new Date(e.createdAt), "MMM d, yyyy");
915
+ F = Yt(new Date(e.createdAt), "MMM d, yyyy");
909
916
  } catch {
910
917
  F = "";
911
918
  }
@@ -915,10 +922,10 @@ function oo({
915
922
  "button",
916
923
  {
917
924
  type: "button",
918
- onClick: d,
925
+ onClick: c,
919
926
  "aria-label": "Back",
920
927
  className: "-ml-1 flex h-6 w-6 items-center justify-center rounded-[3px] text-muted-foreground hover:bg-accent hover:text-foreground",
921
- children: /* @__PURE__ */ t(Kt, { className: "h-3.5 w-3.5" })
928
+ children: /* @__PURE__ */ t(Ht, { className: "h-3.5 w-3.5" })
922
929
  }
923
930
  ),
924
931
  N ? /* @__PURE__ */ t(
@@ -947,7 +954,7 @@ function oo({
947
954
  }
948
955
  ),
949
956
  /* @__PURE__ */ i("span", { className: "ml-1 inline-flex shrink-0 items-center gap-1 text-[10.5px] text-muted-foreground", children: [
950
- /* @__PURE__ */ t(Zt, { className: "h-2.5 w-2.5" }),
957
+ /* @__PURE__ */ t(Jt, { className: "h-2.5 w-2.5" }),
951
958
  s.length,
952
959
  " member",
953
960
  s.length === 1 ? "" : "s"
@@ -959,11 +966,11 @@ function oo({
959
966
  {
960
967
  autoFocus: !0,
961
968
  rows: 2,
962
- value: K,
963
- onChange: (y) => Q(y.target.value),
969
+ value: Q,
970
+ onChange: (y) => W(y.target.value),
964
971
  maxLength: 200,
965
972
  onKeyDown: (y) => {
966
- y.key === "Escape" && (Q(e.description || ""), z(!1)), y.key === "Enter" && (y.metaKey || y.ctrlKey) && se();
973
+ y.key === "Escape" && (W(e.description || ""), K(!1)), y.key === "Enter" && (y.metaKey || y.ctrlKey) && se();
967
974
  },
968
975
  placeholder: "What is this group for?",
969
976
  className: "block w-full resize-none rounded-[5px] border border-border bg-background px-2 py-1.5 text-[12px] text-foreground placeholder:text-muted-foreground focus:border-foreground/40 focus:outline-none"
@@ -971,7 +978,7 @@ function oo({
971
978
  ),
972
979
  /* @__PURE__ */ i("div", { className: "mt-1.5 flex items-center justify-between", children: [
973
980
  /* @__PURE__ */ i("span", { className: "text-[10.5px] text-muted-foreground", children: [
974
- K.length,
981
+ Q.length,
975
982
  "/200 · Esc to cancel · ⌘↩ to save"
976
983
  ] }),
977
984
  /* @__PURE__ */ i("div", { className: "flex items-center gap-1.5", children: [
@@ -980,7 +987,7 @@ function oo({
980
987
  {
981
988
  type: "button",
982
989
  onClick: () => {
983
- Q(e.description || ""), z(!1);
990
+ W(e.description || ""), K(!1);
984
991
  },
985
992
  className: "h-6 rounded-[5px] px-2 text-[11px] font-medium text-foreground/80 hover:bg-accent",
986
993
  children: "Cancel"
@@ -1002,7 +1009,7 @@ function oo({
1002
1009
  {
1003
1010
  type: "button",
1004
1011
  onClick: () => {
1005
- a && (Q(e.description || ""), z(!0));
1012
+ a && (W(e.description || ""), K(!0));
1006
1013
  },
1007
1014
  disabled: !a,
1008
1015
  title: a ? "Click to edit description" : void 0,
@@ -1017,9 +1024,9 @@ function oo({
1017
1024
  }
1018
1025
  ) }),
1019
1026
  o && /* @__PURE__ */ t(
1020
- io,
1027
+ lo,
1021
1028
  {
1022
- query: W,
1029
+ query: Y,
1023
1030
  setQuery: we,
1024
1031
  open: Ne,
1025
1032
  setOpen: ne,
@@ -1036,25 +1043,25 @@ function oo({
1036
1043
  },
1037
1044
  y
1038
1045
  )) }) : x ? /* @__PURE__ */ t(
1039
- mr,
1046
+ lr,
1040
1047
  {
1041
1048
  title: "Can't load members",
1042
1049
  message: x,
1043
- onRetry: () => c()
1050
+ onRetry: () => u()
1044
1051
  }
1045
1052
  ) : s.length === 0 ? /* @__PURE__ */ i("div", { className: "flex h-full flex-col items-center justify-center gap-1 py-10 text-center", children: [
1046
1053
  /* @__PURE__ */ t("div", { className: "text-[12px] text-foreground", children: "No members yet" }),
1047
1054
  /* @__PURE__ */ t("div", { className: "text-[11px] text-muted-foreground", children: o ? "Search above to add people to this group." : "This group does not have any members." })
1048
1055
  ] }) : s.map((y) => {
1049
- var U, j, ie, H, ke, de;
1056
+ var U, H, ie, q, ke, de;
1050
1057
  return /* @__PURE__ */ i(
1051
1058
  "div",
1052
1059
  {
1053
1060
  className: "group flex items-center gap-2 border-b border-border/60 px-5 py-2",
1054
1061
  children: [
1055
- /* @__PURE__ */ t(hr, { name: ((U = y.user) == null ? void 0 : U.name) || ((j = y.user) == null ? void 0 : j.email) || "?" }),
1062
+ /* @__PURE__ */ t(ur, { name: ((U = y.user) == null ? void 0 : U.name) || ((H = y.user) == null ? void 0 : H.email) || "?" }),
1056
1063
  /* @__PURE__ */ i("div", { className: "min-w-0 flex-1", children: [
1057
- /* @__PURE__ */ t("div", { className: "truncate text-[12.5px] font-medium text-foreground", children: ((ie = y.user) == null ? void 0 : ie.name) || ((H = y.user) == null ? void 0 : H.email) || "Unknown" }),
1064
+ /* @__PURE__ */ t("div", { className: "truncate text-[12.5px] font-medium text-foreground", children: ((ie = y.user) == null ? void 0 : ie.name) || ((q = y.user) == null ? void 0 : q.email) || "Unknown" }),
1058
1065
  ((ke = y.user) == null ? void 0 : ke.email) && y.user.name && /* @__PURE__ */ t("div", { className: "truncate text-[10.5px] text-muted-foreground", children: y.user.email })
1059
1066
  ] }),
1060
1067
  !n && /* @__PURE__ */ t("span", { className: "text-[10px] uppercase tracking-[0.06em] text-muted-foreground", children: y.userType }),
@@ -1062,11 +1069,11 @@ function oo({
1062
1069
  "button",
1063
1070
  {
1064
1071
  type: "button",
1065
- onClick: () => Y(y.userId),
1072
+ onClick: () => J(y.userId),
1066
1073
  disabled: !o || A.isPending,
1067
1074
  "aria-label": `Remove ${((de = y.user) == null ? void 0 : de.name) || "member"}`,
1068
1075
  className: "flex h-6 w-6 items-center justify-center rounded-[3px] text-muted-foreground opacity-0 transition-opacity hover:bg-accent hover:text-foreground group-hover:opacity-100 disabled:opacity-30",
1069
- children: /* @__PURE__ */ t(Yt, { className: "h-3 w-3" })
1076
+ children: /* @__PURE__ */ t(Kt, { className: "h-3 w-3" })
1070
1077
  }
1071
1078
  )
1072
1079
  ]
@@ -1081,20 +1088,20 @@ function oo({
1081
1088
  onClick: b,
1082
1089
  className: "inline-flex h-7 items-center gap-1.5 rounded-[5px] border border-rose-200 bg-background px-2.5 text-[12px] font-medium text-rose-600 hover:bg-rose-50 dark:border-rose-900/60 dark:text-rose-400 dark:hover:bg-rose-950/30",
1083
1090
  children: [
1084
- /* @__PURE__ */ t(ot, { className: "h-3 w-3" }),
1091
+ /* @__PURE__ */ t(nt, { className: "h-3 w-3" }),
1085
1092
  "Delete group"
1086
1093
  ]
1087
1094
  }
1088
1095
  ) })
1089
1096
  ] });
1090
1097
  }
1091
- function so({
1098
+ function co({
1092
1099
  isTenantUser: e,
1093
1100
  tenantId: n,
1094
1101
  onCancel: a,
1095
1102
  onCreated: r
1096
1103
  }) {
1097
- const [o, d] = S(""), [m, p] = S(""), [b, f] = S(null), g = Wn(), l = o.trim().length >= 3 && o.trim().length <= 50, c = async () => {
1104
+ const [o, c] = S(""), [m, p] = S(""), [b, f] = S(null), g = Jn(), l = o.trim().length >= 3 && o.trim().length <= 50, u = async () => {
1098
1105
  if (!l) return;
1099
1106
  f(null);
1100
1107
  const s = {
@@ -1112,13 +1119,13 @@ function so({
1112
1119
  };
1113
1120
  return /* @__PURE__ */ i("div", { className: "flex flex-1 flex-col overflow-hidden", children: [
1114
1121
  /* @__PURE__ */ i("div", { className: "flex-1 overflow-y-auto px-5 py-4", children: [
1115
- /* @__PURE__ */ t(Gt, { children: "Name" }),
1122
+ /* @__PURE__ */ t(Ft, { children: "Name" }),
1116
1123
  /* @__PURE__ */ t(
1117
1124
  "input",
1118
1125
  {
1119
1126
  autoFocus: !0,
1120
1127
  value: o,
1121
- onChange: (s) => d(s.target.value),
1128
+ onChange: (s) => c(s.target.value),
1122
1129
  placeholder: "Marketing leads, North America sales, …",
1123
1130
  maxLength: 50,
1124
1131
  className: "mt-1 block h-7 w-full rounded-[5px] border border-border bg-background px-2 text-[12px] text-foreground placeholder:text-muted-foreground focus:border-foreground/40 focus:outline-none"
@@ -1126,7 +1133,7 @@ function so({
1126
1133
  ),
1127
1134
  /* @__PURE__ */ t("div", { className: "mt-1 text-[10.5px] text-muted-foreground", children: "3–50 characters." }),
1128
1135
  /* @__PURE__ */ i("div", { className: "mt-4", children: [
1129
- /* @__PURE__ */ t(Gt, { children: "Description (optional)" }),
1136
+ /* @__PURE__ */ t(Ft, { children: "Description (optional)" }),
1130
1137
  /* @__PURE__ */ t(
1131
1138
  "textarea",
1132
1139
  {
@@ -1160,7 +1167,7 @@ function so({
1160
1167
  "button",
1161
1168
  {
1162
1169
  type: "button",
1163
- onClick: c,
1170
+ onClick: u,
1164
1171
  disabled: !l || g.isPending,
1165
1172
  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",
1166
1173
  children: g.isPending ? /* @__PURE__ */ i($, { children: [
@@ -1175,18 +1182,18 @@ function so({
1175
1182
  ] })
1176
1183
  ] });
1177
1184
  }
1178
- function io({
1185
+ function lo({
1179
1186
  query: e,
1180
1187
  setQuery: n,
1181
1188
  open: a,
1182
1189
  setOpen: r,
1183
1190
  candidates: o,
1184
- showKindChip: d,
1191
+ showKindChip: c,
1185
1192
  onAdd: m,
1186
1193
  busy: p
1187
1194
  }) {
1188
- const b = Rt(null), f = Rt(null), [g, l] = S(null);
1189
- an(() => {
1195
+ const b = Ot(null), f = Ot(null), [g, l] = S(null);
1196
+ Ja(() => {
1190
1197
  if (!a) {
1191
1198
  l(null);
1192
1199
  return;
@@ -1214,7 +1221,7 @@ function io({
1214
1221
  };
1215
1222
  return document.addEventListener("mousedown", s), () => document.removeEventListener("mousedown", s);
1216
1223
  }, [a, r]);
1217
- const c = a && o.length > 0 && g;
1224
+ const u = a && o.length > 0 && g;
1218
1225
  return /* @__PURE__ */ i("div", { className: "shrink-0 border-b border-border px-5 py-2.5", children: [
1219
1226
  /* @__PURE__ */ i(
1220
1227
  "div",
@@ -1222,7 +1229,7 @@ function io({
1222
1229
  ref: b,
1223
1230
  className: "flex items-center gap-2 rounded-[5px] border border-border bg-background px-2 focus-within:border-foreground/40",
1224
1231
  children: [
1225
- /* @__PURE__ */ t(An, { className: "h-3 w-3 text-muted-foreground" }),
1232
+ /* @__PURE__ */ t(Mn, { className: "h-3 w-3 text-muted-foreground" }),
1226
1233
  /* @__PURE__ */ t(
1227
1234
  "input",
1228
1235
  {
@@ -1239,7 +1246,7 @@ function io({
1239
1246
  ]
1240
1247
  }
1241
1248
  ),
1242
- c && typeof document < "u" && fn(
1249
+ u && typeof document < "u" && hn(
1243
1250
  /* @__PURE__ */ t(
1244
1251
  "div",
1245
1252
  {
@@ -1259,12 +1266,12 @@ function io({
1259
1266
  onClick: () => m(s),
1260
1267
  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",
1261
1268
  children: [
1262
- /* @__PURE__ */ t(hr, { name: s.name || s.email || "?" }),
1269
+ /* @__PURE__ */ t(ur, { name: s.name || s.email || "?" }),
1263
1270
  /* @__PURE__ */ i("div", { className: "min-w-0 flex-1", children: [
1264
1271
  /* @__PURE__ */ t("div", { className: "truncate text-[12px] font-medium text-foreground", children: s.name || s.email || "Unknown" }),
1265
1272
  s.email && s.name && /* @__PURE__ */ t("div", { className: "truncate text-[10.5px] text-muted-foreground", children: s.email })
1266
1273
  ] }),
1267
- d && s.type && /* @__PURE__ */ t("span", { className: "text-[10px] uppercase tracking-[0.06em] text-muted-foreground", children: s.type === "tenant" ? "tenant" : "org" })
1274
+ c && s.type && /* @__PURE__ */ t("span", { className: "text-[10px] uppercase tracking-[0.06em] text-muted-foreground", children: s.type === "tenant" ? "tenant" : "org" })
1268
1275
  ]
1269
1276
  },
1270
1277
  s.id
@@ -1275,7 +1282,7 @@ function io({
1275
1282
  )
1276
1283
  ] });
1277
1284
  }
1278
- function ur(e, n) {
1285
+ function cr(e, n) {
1279
1286
  if (!e) return n;
1280
1287
  if (e instanceof Error) {
1281
1288
  const a = e.message || "", r = a.match(/\{[\s\S]*"error"\s*:\s*"([^"]+)"[\s\S]*\}/);
@@ -1283,7 +1290,7 @@ function ur(e, n) {
1283
1290
  }
1284
1291
  return typeof e == "string" ? e : n;
1285
1292
  }
1286
- function mr({
1293
+ function lr({
1287
1294
  title: e,
1288
1295
  message: n,
1289
1296
  onRetry: a
@@ -1302,43 +1309,43 @@ function mr({
1302
1309
  )
1303
1310
  ] });
1304
1311
  }
1305
- function Gt({ children: e }) {
1312
+ function Ft({ children: e }) {
1306
1313
  return /* @__PURE__ */ t("label", { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: e });
1307
1314
  }
1308
- function hr({ name: e }) {
1315
+ function ur({ name: e }) {
1309
1316
  const n = e.split(" ").map((a) => a[0]).filter(Boolean).slice(0, 2).join("").toUpperCase();
1310
- return /* @__PURE__ */ t(lr, { className: "h-6 w-6 shrink-0", children: /* @__PURE__ */ t(cr, { className: "text-[9px] font-semibold", children: n || "?" }) });
1317
+ return /* @__PURE__ */ t(ir, { className: "h-6 w-6 shrink-0", children: /* @__PURE__ */ t(dr, { className: "text-[9px] font-semibold", children: n || "?" }) });
1311
1318
  }
1312
- const lo = "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground";
1313
- function co({
1319
+ const uo = "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground";
1320
+ function mo({
1314
1321
  open: e,
1315
1322
  onOpenChange: n
1316
1323
  }) {
1317
- const a = D(
1324
+ const a = C(
1318
1325
  (o) => {
1319
- var d, m;
1320
- return vn({
1321
- dashboardDefault: (m = (d = o.dashboard) == null ? void 0 : d.exportDefaults) == null ? void 0 : m.csvEncoding
1326
+ var c, m;
1327
+ return yn({
1328
+ dashboardDefault: (m = (c = o.dashboard) == null ? void 0 : c.exportDefaults) == null ? void 0 : m.csvEncoding
1322
1329
  });
1323
1330
  }
1324
- ), { setDashboardExportDefaults: r } = D(
1331
+ ), { setDashboardExportDefaults: r } = C(
1325
1332
  (o) => o.actions
1326
1333
  );
1327
- return /* @__PURE__ */ t(qt, { open: e, onOpenChange: n, children: /* @__PURE__ */ i(zt, { className: "rounded-control border-border/60 sm:max-w-[440px] sm:rounded-control", children: [
1328
- /* @__PURE__ */ i(fa, { children: [
1329
- /* @__PURE__ */ t(Ze, { className: "text-[15px]", children: "Download settings" }),
1330
- /* @__PURE__ */ t(et, { className: "text-[13px] leading-5", children: "Applies to every CSV downloaded or delivered from this dashboard. People can still change it for a single download." })
1334
+ return /* @__PURE__ */ t(Vt, { open: e, onOpenChange: n, children: /* @__PURE__ */ i(jt, { className: "rounded-control border-border/60 sm:max-w-[440px] sm:rounded-control", children: [
1335
+ /* @__PURE__ */ i(Xr, { children: [
1336
+ /* @__PURE__ */ t(Xe, { className: "text-[15px]", children: "Download settings" }),
1337
+ /* @__PURE__ */ t(Ze, { className: "text-[13px] leading-5", children: "Applies to every CSV downloaded or delivered from this dashboard. People can still change it for a single download." })
1331
1338
  ] }),
1332
1339
  /* @__PURE__ */ i("div", { className: "space-y-2", children: [
1333
- /* @__PURE__ */ t(jr, { htmlFor: "dashboard-csv-encoding", className: lo, children: "CSV encoding" }),
1340
+ /* @__PURE__ */ t(Ba, { htmlFor: "dashboard-csv-encoding", className: uo, children: "CSV encoding" }),
1334
1341
  /* @__PURE__ */ i(
1335
- Hr,
1342
+ Ga,
1336
1343
  {
1337
1344
  value: a,
1338
1345
  onValueChange: (o) => r({ csvEncoding: o }),
1339
1346
  children: [
1340
- /* @__PURE__ */ t(qr, { id: "dashboard-csv-encoding", size: "sm", children: /* @__PURE__ */ t(zr, {}) }),
1341
- /* @__PURE__ */ t(Kr, { children: ba.map((o) => /* @__PURE__ */ t(Qr, { value: o.value, children: o.label }, o.value)) })
1347
+ /* @__PURE__ */ t(Va, { id: "dashboard-csv-encoding", size: "sm", children: /* @__PURE__ */ t(ja, {}) }),
1348
+ /* @__PURE__ */ t(Ha, { children: Zr.map((o) => /* @__PURE__ */ t(qa, { value: o.value, children: o.label }, o.value)) })
1342
1349
  ]
1343
1350
  }
1344
1351
  )
@@ -1346,13 +1353,13 @@ function co({
1346
1353
  ] }) });
1347
1354
  }
1348
1355
  function pe(e, n, a) {
1349
- var d, m;
1356
+ var c, m;
1350
1357
  const r = (e.controls || []).find(
1351
1358
  (p) => p.id === a
1352
1359
  );
1353
1360
  if (r)
1354
1361
  return r.label;
1355
- const o = (m = (d = Re(e, n)) == null ? void 0 : d.controls) == null ? void 0 : m.find(
1362
+ const o = (m = (c = Re(e, n)) == null ? void 0 : c.controls) == null ? void 0 : m.find(
1356
1363
  (p) => p.id === a
1357
1364
  );
1358
1365
  return (o == null ? void 0 : o.label) || a;
@@ -1361,19 +1368,19 @@ function fe(e, n) {
1361
1368
  var a;
1362
1369
  return ((a = Re(e, n)) == null ? void 0 : a.title) || n;
1363
1370
  }
1364
- function uo(e) {
1371
+ function ho(e) {
1365
1372
  const { errors: n, dashboard: a } = e;
1366
1373
  if (!a)
1367
1374
  return n;
1368
1375
  const r = /* @__PURE__ */ new Map();
1369
1376
  for (const o of n) {
1370
- const d = o.match(
1377
+ const c = o.match(
1371
1378
  /^Card '(.+)' binding for control '(.+)' maps to missing metric '(.+)'\.$/
1372
1379
  );
1373
- if (d) {
1374
- const [, g, l] = d, c = `${g}:${l}:missing-metric`;
1375
- r.has(c) || r.set(
1376
- c,
1380
+ if (c) {
1381
+ const [, g, l] = c, u = `${g}:${l}:missing-metric`;
1382
+ r.has(u) || r.set(
1383
+ u,
1377
1384
  `"${fe(a, g)}" has an outdated "${pe(
1378
1385
  a,
1379
1386
  g,
@@ -1386,9 +1393,9 @@ function uo(e) {
1386
1393
  /^Card '(.+)' binding for control '(.+)' maps to missing group-by field '(.+)'\.$/
1387
1394
  );
1388
1395
  if (m) {
1389
- const [, g, l] = m, c = `${g}:${l}:missing-group-by`;
1390
- r.has(c) || r.set(
1391
- c,
1396
+ const [, g, l] = m, u = `${g}:${l}:missing-group-by`;
1397
+ r.has(u) || r.set(
1398
+ u,
1392
1399
  `"${fe(a, g)}" has an outdated "${pe(
1393
1400
  a,
1394
1401
  g,
@@ -1401,9 +1408,9 @@ function uo(e) {
1401
1408
  /^Card '(.+)' binding for control '(.+)' maps to an invalid metric target\.$/
1402
1409
  );
1403
1410
  if (p) {
1404
- const [, g, l] = p, c = `${g}:${l}:invalid-metric`;
1405
- r.has(c) || r.set(
1406
- c,
1411
+ const [, g, l] = p, u = `${g}:${l}:invalid-metric`;
1412
+ r.has(u) || r.set(
1413
+ u,
1407
1414
  `"${fe(a, g)}" has an invalid "${pe(
1408
1415
  a,
1409
1416
  g,
@@ -1416,9 +1423,9 @@ function uo(e) {
1416
1423
  /^Card '(.+)' binding for control '(.+)' maps to an invalid group-by target\.$/
1417
1424
  );
1418
1425
  if (b) {
1419
- const [, g, l] = b, c = `${g}:${l}:invalid-group-by`;
1420
- r.has(c) || r.set(
1421
- c,
1426
+ const [, g, l] = b, u = `${g}:${l}:invalid-group-by`;
1427
+ r.has(u) || r.set(
1428
+ u,
1422
1429
  `"${fe(a, g)}" has an invalid "${pe(
1423
1430
  a,
1424
1431
  g,
@@ -1431,9 +1438,9 @@ function uo(e) {
1431
1438
  /^Card '(.+)' binding for control '(.+)' requires at least one temporal group-by field\.$/
1432
1439
  );
1433
1440
  if (f) {
1434
- const [, g, l] = f, c = `${g}:${l}:missing-temporal-group-by`;
1435
- r.has(c) || r.set(
1436
- c,
1441
+ const [, g, l] = f, u = `${g}:${l}:missing-temporal-group-by`;
1442
+ r.has(u) || r.set(
1443
+ u,
1437
1444
  `"${fe(a, g)}" can no longer use "${pe(
1438
1445
  a,
1439
1446
  g,
@@ -1446,16 +1453,16 @@ function uo(e) {
1446
1453
  }
1447
1454
  return Array.from(r.values());
1448
1455
  }
1449
- function mo({
1456
+ function po({
1450
1457
  visible: e,
1451
1458
  onSelect: n
1452
1459
  }) {
1453
- return e ? /* @__PURE__ */ i(R, { onSelect: n, children: [
1454
- /* @__PURE__ */ t(ga, { className: "h-3.5 w-3.5" }),
1460
+ return e ? /* @__PURE__ */ i(_, { onSelect: n, children: [
1461
+ /* @__PURE__ */ t(ea, { className: "h-3.5 w-3.5" }),
1455
1462
  "Schedule email report"
1456
1463
  ] }) : null;
1457
1464
  }
1458
- function ho({
1465
+ function fo({
1459
1466
  scheduleReportVisible: e,
1460
1467
  analyticalBriefingVisible: n,
1461
1468
  onScheduleReport: a,
@@ -1463,64 +1470,64 @@ function ho({
1463
1470
  }) {
1464
1471
  return /* @__PURE__ */ i($, { children: [
1465
1472
  /* @__PURE__ */ t(
1466
- mo,
1473
+ po,
1467
1474
  {
1468
1475
  visible: e,
1469
1476
  onSelect: a
1470
1477
  }
1471
1478
  ),
1472
- n ? /* @__PURE__ */ i(R, { onSelect: r, children: [
1479
+ n ? /* @__PURE__ */ i(_, { onSelect: r, children: [
1473
1480
  /* @__PURE__ */ t(ee, { className: "h-3.5 w-3.5" }),
1474
1481
  "Create analytical briefing"
1475
1482
  ] }) : null
1476
1483
  ] });
1477
1484
  }
1478
- function po(e) {
1485
+ function bo(e) {
1479
1486
  var f, g, l;
1480
- const { saved: n, draft: a, usage: r } = e, o = [], d = Wr(n);
1481
- for (const [c, s] of Object.entries(r.inputs))
1482
- !s || !St(n, c) || St(a, c) || o.push({
1487
+ const { saved: n, draft: a, usage: r } = e, o = [], c = pn(n);
1488
+ for (const [u, s] of Object.entries(r.inputs))
1489
+ !s || !Pt(n, u) || Pt(a, u) || o.push({
1483
1490
  target: "input",
1484
- id: c,
1485
- label: Yr(n, d, c),
1491
+ id: u,
1492
+ label: fn(n, c, u),
1486
1493
  bookmarks: s,
1487
1494
  remembered: 0
1488
1495
  });
1489
- const m = new Set((a.sheets ?? []).map((c) => c.id));
1490
- for (const c of n.sheets ?? []) {
1491
- const s = r.sheets[c.id] ?? 0;
1492
- !s || m.has(c.id) || o.push({
1496
+ const m = new Set((a.sheets ?? []).map((u) => u.id));
1497
+ for (const u of n.sheets ?? []) {
1498
+ const s = r.sheets[u.id] ?? 0;
1499
+ !s || m.has(u.id) || o.push({
1493
1500
  target: "sheet",
1494
- id: c.id,
1495
- label: ((f = c.title) == null ? void 0 : f.trim()) || "Untitled sheet",
1501
+ id: u.id,
1502
+ label: ((f = u.title) == null ? void 0 : f.trim()) || "Untitled sheet",
1496
1503
  bookmarks: s,
1497
1504
  remembered: 0
1498
1505
  });
1499
1506
  }
1500
- const p = Tt(n), b = Tt(a);
1501
- for (const [c, s] of Object.entries(r.tables)) {
1502
- if (!p.has(c)) continue;
1503
- const x = Re(n, c), v = ((g = x == null ? void 0 : x.title) == null ? void 0 : g.trim()) || "Untitled table";
1504
- if (!b.has(c)) {
1507
+ const p = Rt(n), b = Rt(a);
1508
+ for (const [u, s] of Object.entries(r.tables)) {
1509
+ if (!p.has(u)) continue;
1510
+ const x = Re(n, u), v = ((g = x == null ? void 0 : x.title) == null ? void 0 : g.trim()) || "Untitled table";
1511
+ if (!b.has(u)) {
1505
1512
  o.push({
1506
1513
  target: "table",
1507
- id: c,
1514
+ id: u,
1508
1515
  label: v,
1509
1516
  bookmarks: s.bookmarks,
1510
1517
  remembered: s.remembered
1511
1518
  });
1512
1519
  continue;
1513
1520
  }
1514
- const w = x ? At(x) : void 0, h = Re(a, c), E = h ? At(h) : void 0;
1521
+ const w = x ? _t(x) : void 0, h = Re(a, u), E = h ? _t(h) : void 0;
1515
1522
  if (!(!x || !w || !E))
1516
1523
  for (const [A, L] of Object.entries(s.columns)) {
1517
- if (!(L.bookmarks || L.remembered) || xa(A) || !w.has(A) || E.has(A))
1524
+ if (!(L.bookmarks || L.remembered) || bn(A) || !w.has(A) || E.has(A))
1518
1525
  continue;
1519
- const N = va(x, A), k = ((l = N == null ? void 0 : N.label) == null ? void 0 : l.trim()) || (N == null ? void 0 : N.name);
1526
+ const N = gn(x, A), k = ((l = N == null ? void 0 : N.label) == null ? void 0 : l.trim()) || (N == null ? void 0 : N.name);
1520
1527
  o.push({
1521
1528
  target: "column",
1522
1529
  id: A,
1523
- cardId: c,
1530
+ cardId: u,
1524
1531
  label: k ? `${k} in ${v}` : `A column in ${v}`,
1525
1532
  bookmarks: L.bookmarks,
1526
1533
  remembered: L.remembered
@@ -1529,49 +1536,49 @@ function po(e) {
1529
1536
  }
1530
1537
  return o;
1531
1538
  }
1532
- const fo = "dashboard-bookmark-usage";
1533
- function bo(e) {
1539
+ const go = "dashboard-bookmark-usage";
1540
+ function xo(e) {
1534
1541
  var b;
1535
- const n = D((f) => f.viewerStateClient), a = (b = e.saved) == null ? void 0 : b.id, o = ya({
1542
+ const n = C((f) => f.viewerStateClient), a = (b = e.saved) == null ? void 0 : b.id, o = ta({
1536
1543
  // Keyed by the viewer, never by the client object (TanStack drops functions when hashing).
1537
- queryKey: [fo, (n == null ? void 0 : n.viewerKey) ?? null],
1544
+ queryKey: [go, (n == null ? void 0 : n.viewerKey) ?? null],
1538
1545
  queryFn: () => n.bookmarks.usage(),
1539
1546
  enabled: e.enabled && !!n && !!a,
1540
1547
  staleTime: 5 * 6e4,
1541
1548
  retry: !1
1542
- }).data, { saved: d, draft: m, enabled: p } = e;
1543
- return V(() => !p || !d || !o ? [] : !o.bookmarks && !Object.keys(o.tables).length ? [] : po({ saved: d, draft: m, usage: o }), [m, p, d, o]);
1549
+ }).data, { saved: c, draft: m, enabled: p } = e;
1550
+ return j(() => !p || !c || !o ? [] : !o.bookmarks && !Object.keys(o.tables).length ? [] : bo({ saved: c, draft: m, usage: o }), [m, p, c, o]);
1544
1551
  }
1545
- function Vt(e, n, a) {
1552
+ function Bt(e, n, a) {
1546
1553
  return `${e} ${e === 1 ? n : a}`;
1547
1554
  }
1548
- function go(e) {
1555
+ function vo(e) {
1549
1556
  const n = [
1550
- e.bookmarks ? Vt(e.bookmarks, "bookmark", "bookmarks") : null,
1551
- e.remembered ? Vt(e.remembered, "remembered layout", "remembered layouts") : null
1557
+ e.bookmarks ? Bt(e.bookmarks, "bookmark", "bookmarks") : null,
1558
+ e.remembered ? Bt(e.remembered, "remembered layout", "remembered layouts") : null
1552
1559
  ].filter(Boolean).join(", ");
1553
1560
  return e.target === "sheet" ? { name: `${e.label} sheet`, uses: n } : e.target === "table" ? { name: `${e.label} table`, uses: n } : { name: e.label, uses: n };
1554
1561
  }
1555
- function xo({
1562
+ function yo({
1556
1563
  saved: e,
1557
1564
  draft: n,
1558
1565
  enabled: a
1559
1566
  }) {
1560
- const r = bo({ saved: e, draft: n, enabled: a });
1561
- return r.length ? /* @__PURE__ */ i(Jr, { children: [
1562
- /* @__PURE__ */ t(Xr, { asChild: !0, children: /* @__PURE__ */ i(
1567
+ const r = xo({ saved: e, draft: n, enabled: a });
1568
+ return r.length ? /* @__PURE__ */ i(za, { children: [
1569
+ /* @__PURE__ */ t(Ka, { asChild: !0, children: /* @__PURE__ */ i(
1563
1570
  T,
1564
1571
  {
1565
1572
  variant: "ghost",
1566
1573
  size: "xs",
1567
1574
  className: "gap-1 text-muted-foreground hover:text-foreground",
1568
1575
  children: [
1569
- /* @__PURE__ */ t(wa, { className: "h-3.5 w-3.5", "aria-hidden": "true" }),
1576
+ /* @__PURE__ */ t(ra, { className: "h-3.5 w-3.5", "aria-hidden": "true" }),
1570
1577
  "Affects saved views"
1571
1578
  ]
1572
1579
  }
1573
1580
  ) }),
1574
- /* @__PURE__ */ i(Zr, { align: "end", className: "w-[320px] p-3 text-[12px]", children: [
1581
+ /* @__PURE__ */ i(Qa, { align: "end", className: "w-[320px] p-3 text-[12px]", children: [
1575
1582
  /* @__PURE__ */ t("p", { className: "text-foreground", children: "This edit removes parts of the dashboard that viewers saved. Their views still open, with a note about what no longer applies." }),
1576
1583
  /* @__PURE__ */ t(
1577
1584
  "ul",
@@ -1579,13 +1586,13 @@ function xo({
1579
1586
  "aria-label": "Affected saved views",
1580
1587
  className: "mt-2 grid gap-1 border-t border-border/60 pt-2",
1581
1588
  children: r.map((o) => {
1582
- const { name: d, uses: m } = go(o);
1589
+ const { name: c, uses: m } = vo(o);
1583
1590
  return /* @__PURE__ */ i(
1584
1591
  "li",
1585
1592
  {
1586
1593
  className: "flex items-baseline justify-between gap-3",
1587
1594
  children: [
1588
- /* @__PURE__ */ t("span", { className: "min-w-0 truncate text-foreground", children: d }),
1595
+ /* @__PURE__ */ t("span", { className: "min-w-0 truncate text-foreground", children: c }),
1589
1596
  /* @__PURE__ */ t("span", { className: "shrink-0 text-[11.5px] text-muted-foreground", children: m })
1590
1597
  ]
1591
1598
  },
@@ -1597,55 +1604,55 @@ function xo({
1597
1604
  ] })
1598
1605
  ] }) : null;
1599
1606
  }
1600
- function jt(e, n) {
1607
+ function Gt(e, n) {
1601
1608
  return {
1602
1609
  dashboard: tt(e),
1603
1610
  semanticExecutionPayload: tt(n)
1604
1611
  };
1605
1612
  }
1606
- function Ho() {
1607
- var xt, vt, yt, wt, Nt;
1608
- nn(), on();
1613
+ function Jo() {
1614
+ var gt, xt, vt, yt, wt;
1615
+ Xa(), Za();
1609
1616
  const {
1610
1617
  authToken: e,
1611
1618
  tokenProps: n,
1612
1619
  id: a,
1613
1620
  showBriefings: r
1614
- } = q(), o = Na(), { isLocalDev: d } = Sa(), {
1621
+ } = z(), o = aa(), { isLocalDev: c } = na(), {
1615
1622
  canEditDashboard: m,
1616
1623
  hasInspectionUser: p,
1617
1624
  inspectionMessage: b,
1618
1625
  isInspectionMode: f,
1619
1626
  isInspectionSurface: g
1620
- } = ka(), { openBrandStudioPreview: l } = Ca(), { permissions: c } = Mn(), s = Da(), { isLoading: x } = Ea(), v = D((u) => u.theme), w = D((u) => u.isDownloadingPdf), h = D((u) => u.dashboard), E = D((u) => u.selectedSheetId), A = (xt = h == null ? void 0 : h.sheets) == null ? void 0 : xt.find(
1621
- (u) => u.id === E
1622
- ), L = ea(A), N = L ? (vt = A == null ? void 0 : A.document) == null ? void 0 : vt.page : void 0, k = D(
1623
- (u) => u.isDashboardEditing
1624
- ), { setDashboardTitle: re } = D((u) => u.actions), [ae, ye] = S(!1), [z, K] = S(!1), [Q, W] = S(!1), [we, Ne] = S(!1), [ne, oe] = S(null), [Se, se] = S(!1), [Ue, Y] = S(!1), [F, y] = S(null), [U, j] = S([]), [ie, H] = S(!1), [ke, de] = S(!1), P = D((u) => u.isVisualEditing);
1625
- kt((u) => u.card);
1626
- const pr = Le(
1627
- (u) => u.selectedDashboard
1628
- ), fr = Le(
1629
- (u) => u.initialDashboard
1627
+ } = oa(), { openBrandStudioPreview: l } = sa(), { permissions: u } = Un(), s = ia(), { isLoading: x } = da(), v = C((d) => d.theme), w = C((d) => d.isDownloadingPdf), h = C((d) => d.dashboard), E = C((d) => d.selectedSheetId), A = (gt = h == null ? void 0 : h.sheets) == null ? void 0 : gt.find(
1628
+ (d) => d.id === E
1629
+ ), L = wn(A), N = L ? (xt = A == null ? void 0 : A.document) == null ? void 0 : xt.page : void 0, k = C(
1630
+ (d) => d.isDashboardEditing
1631
+ ), { setDashboardTitle: re } = C((d) => d.actions), [ae, ye] = S(!1), [K, Q] = S(!1), [W, Y] = S(!1), [we, Ne] = S(!1), [ne, oe] = S(null), [Se, se] = S(!1), [Ue, J] = S(!1), [F, y] = S(null), [U, H] = S([]), [ie, q] = S(!1), [ke, de] = S(!1), R = C((d) => d.isVisualEditing);
1632
+ Nt((d) => d.card);
1633
+ const mr = Le(
1634
+ (d) => d.selectedDashboard
1635
+ ), hr = Le(
1636
+ (d) => d.initialDashboard
1630
1637
  );
1631
- Le((u) => u.selectedVisual), D((u) => u.selectedFrameId), kt((u) => u.frame);
1632
- const dt = D(
1633
- (u) => u.showDashboardJSON
1638
+ Le((d) => d.selectedVisual), C((d) => d.selectedFrameId), Nt((d) => d.frame);
1639
+ const dt = C(
1640
+ (d) => d.showDashboardJSON
1634
1641
  );
1635
- D((u) => u.onSaveFunction);
1636
- const { setIsDashboardEditing: lt, setShowDashboardJSON: ct } = D(
1637
- (u) => u.actions
1642
+ C((d) => d.onSaveFunction);
1643
+ const { setIsDashboardEditing: ct, setShowDashboardJSON: lt } = C(
1644
+ (d) => d.actions
1638
1645
  ), { setInitialDashboard: ut, clearSelectedDashboard: Te } = Le(
1639
- (u) => u.actions
1640
- ), le = !!n.orgUserId || !!(n.tenantId && n.endUserId && n.endUserEmail), { resources: Ce } = Ia(Qe.DASHBOARD), { data: $e } = Aa(), br = ((yt = $e == null ? void 0 : $e.preference) == null ? void 0 : yt.defaultDashboardId) || null, { mutate: gr, isPending: xr } = La(), { currentUser: vr } = nt(), yr = Ma(vr), B = pr || fr, J = Oa({
1646
+ (d) => d.actions
1647
+ ), ce = !!n.orgUserId || !!(n.tenantId && n.endUserId && n.endUserEmail), { resources: Ce } = ca(Qe.DASHBOARD), { data: $e } = la(), pr = ((vt = $e == null ? void 0 : $e.preference) == null ? void 0 : vt.defaultDashboardId) || null, { mutate: fr, isPending: br } = ua(), { currentUser: gr } = at(), xr = ma(gr), B = mr || hr, V = ha({
1641
1648
  config: n.config,
1642
- canNavigateDashboardHub: le,
1643
- canShareDashboard: ((wt = B == null ? void 0 : B.permissions) == null ? void 0 : wt.canShare) === !0,
1644
- canManageGroups: yr
1649
+ canNavigateDashboardHub: ce,
1650
+ canShareDashboard: ((yt = B == null ? void 0 : B.permissions) == null ? void 0 : yt.canShare) === !0,
1651
+ canManageGroups: xr
1645
1652
  }), mt = B ? {
1646
1653
  id: B.id,
1647
1654
  title: (h == null ? void 0 : h.title) || B.title || "Dashboard"
1648
- } : null, { handleAddNewFrame: wr } = Pa(), [Fe, Be] = S(!1), [Nr, ce] = S(!1), [Ge, De] = S("close"), ue = _a(Qe.DASHBOARD), [M, me] = S(null), Sr = async (u, _) => {
1655
+ } : null, { handleAddNewFrame: vr } = pa(), [Fe, Be] = S(!1), [yr, le] = S(!1), [Ge, De] = S("close"), ue = fa(Qe.DASHBOARD), [M, me] = S(null), wr = async (d, P) => {
1649
1656
  if (!f) {
1650
1657
  if (!(h != null && h.id)) {
1651
1658
  console.log("No dashboard ID found");
@@ -1653,26 +1660,26 @@ function Ho() {
1653
1660
  }
1654
1661
  console.log("Updating dashboard title:", {
1655
1662
  dashboardId: h.id,
1656
- newTitle: u,
1657
- previousTitle: _
1663
+ newTitle: d,
1664
+ previousTitle: P
1658
1665
  }), ue.mutate(
1659
1666
  {
1660
1667
  resourceId: h.id,
1661
- data: { title: u }
1668
+ data: { title: d }
1662
1669
  },
1663
1670
  {
1664
1671
  onSuccess: () => {
1665
1672
  me(
1666
1673
  (O) => (O == null ? void 0 : O.dashboard.id) === h.id ? {
1667
1674
  ...O,
1668
- dashboard: { ...O.dashboard, title: u }
1675
+ dashboard: { ...O.dashboard, title: d }
1669
1676
  } : O
1670
- ), C.success("Dashboard title updated");
1677
+ ), D.success("Dashboard title updated");
1671
1678
  },
1672
1679
  onError: (O) => {
1673
- console.error("Failed to update dashboard title:", O), C.error("Failed to update dashboard title");
1674
- const Z = D.getState().dashboard;
1675
- (Z == null ? void 0 : Z.id) === h.id && Z.title === u && re(_);
1680
+ console.error("Failed to update dashboard title:", O), D.error("Failed to update dashboard title");
1681
+ const Z = C.getState().dashboard;
1682
+ (Z == null ? void 0 : Z.id) === h.id && Z.title === d && re(P);
1676
1683
  }
1677
1684
  }
1678
1685
  );
@@ -1680,17 +1687,17 @@ function Ho() {
1680
1687
  };
1681
1688
  _e(() => {
1682
1689
  if (Ce && Ce.length > 0) {
1683
- const u = h == null ? void 0 : h.id;
1684
- if (u) {
1685
- const _ = Ce.find(
1686
- (O) => O.id === u
1690
+ const d = h == null ? void 0 : h.id;
1691
+ if (d) {
1692
+ const P = Ce.find(
1693
+ (O) => O.id === d
1687
1694
  );
1688
- _ && ut(_);
1695
+ P && ut(P);
1689
1696
  }
1690
1697
  }
1691
1698
  }, [Ce, h == null ? void 0 : h.id, ut]);
1692
- const kr = n.orgUserId || n.tenantId, Ve = V(
1693
- () => vo({
1699
+ const Nr = n.orgUserId || n.tenantId, Ve = j(
1700
+ () => wo({
1694
1701
  accessToken: e == null ? void 0 : e.accessToken,
1695
1702
  dashboardId: (h == null ? void 0 : h.id) || a || n.dashboard_id,
1696
1703
  selectedSheetId: L ? E : void 0,
@@ -1709,149 +1716,149 @@ function Ho() {
1709
1716
  v,
1710
1717
  n.dashboard_id
1711
1718
  ]
1712
- ), je = k && !P && !f && kr && m, { setDashboard: He } = D((u) => u.actions), ht = D(
1713
- (u) => u.semanticExecutionPayload
1714
- ), Cr = () => {
1715
- lt(!0);
1719
+ ), je = k && !R && !f && Nr && m, { setDashboard: He } = C((d) => d.actions), Sr = C(
1720
+ (d) => d.semanticExecutionPayload
1721
+ ), kr = () => {
1722
+ ct(!0);
1716
1723
  }, Ee = () => {
1717
- lt(!1), ct(!1), me(null);
1724
+ ct(!1), lt(!1), me(null);
1718
1725
  };
1719
1726
  _e(() => {
1720
1727
  if (!k) {
1721
1728
  M && me(null);
1722
1729
  return;
1723
1730
  }
1724
- M || !h || x || me(
1725
- jt(
1726
- h,
1727
- ht
1728
- )
1731
+ if (M || !h || x)
1732
+ return;
1733
+ const d = ba(C.getState());
1734
+ me(
1735
+ Gt(d.dashboard, d.semanticExecutionPayload)
1729
1736
  );
1730
1737
  }, [
1731
1738
  h,
1732
1739
  M,
1733
1740
  k,
1734
1741
  x,
1735
- ht
1742
+ Sr
1736
1743
  ]);
1737
- const qe = (M == null ? void 0 : M.dashboard) ?? null, { isDirty: ze, isDirtyPending: Dr, resetDirty: he } = yn(
1744
+ const qe = (M == null ? void 0 : M.dashboard) ?? null, { isDirty: ze, isDirtyPending: Cr, resetDirty: he } = Nn(
1738
1745
  h,
1739
1746
  qe,
1740
1747
  300,
1741
1748
  1e3,
1742
- wn
1743
- ), pt = sn(
1749
+ Sn
1750
+ ), ht = en(
1744
1751
  qe,
1745
1752
  f,
1746
1753
  m
1747
- ), ft = ze || Dr, Ie = Fe || ue.isPending, Er = () => {
1754
+ ), pt = ze || Cr, Ie = Fe || ue.isPending, Dr = () => {
1748
1755
  if (f) {
1749
1756
  M && He(M.dashboard, {
1750
1757
  semanticExecutionPayload: M.semanticExecutionPayload
1751
1758
  }), Ee(), he();
1752
1759
  return;
1753
1760
  }
1754
- pt() ? (De("close"), ce(!0)) : (Ee(), he());
1755
- }, Ir = async () => {
1761
+ ht() ? (De("close"), le(!0)) : (Ee(), he());
1762
+ }, Er = async () => {
1756
1763
  await Ke({
1757
1764
  closeAfterSave: !0,
1758
1765
  navigateHomeAfterSave: Ge === "home"
1759
1766
  });
1760
- }, Ar = () => {
1761
- const u = Ge === "home" && !!le;
1767
+ }, Ir = () => {
1768
+ const d = Ge === "home" && !!ce;
1762
1769
  M && He(M.dashboard, {
1763
1770
  semanticExecutionPayload: M.semanticExecutionPayload
1764
- }), Ee(), u && Te(), De("close"), ce(!1), he();
1765
- }, Lr = () => {
1771
+ }), Ee(), d && Te(), De("close"), le(!1), he();
1772
+ }, Ar = () => {
1766
1773
  M && (He(M.dashboard, {
1767
1774
  semanticExecutionPayload: M.semanticExecutionPayload
1768
1775
  }), he());
1769
- }, Mr = () => {
1770
- if (le) {
1771
- if (k && pt()) {
1772
- De("home"), ce(!0);
1776
+ }, Lr = () => {
1777
+ if (ce) {
1778
+ if (k && ht()) {
1779
+ De("home"), le(!0);
1773
1780
  return;
1774
1781
  }
1775
1782
  Te();
1776
1783
  }
1777
1784
  };
1778
- async function Ke(u) {
1785
+ async function Ke(d) {
1779
1786
  if (f)
1780
1787
  return;
1781
- const _ = D.getState().dashboard;
1782
- if (!_)
1788
+ const P = C.getState().dashboard;
1789
+ if (!P)
1783
1790
  return;
1784
- const O = (u == null ? void 0 : u.closeAfterSave) ?? ie, Z = (u == null ? void 0 : u.navigateHomeAfterSave) ?? !1;
1785
- H(O), O && ce(!1);
1786
- const Ur = tt(_);
1787
- Y(!0), y(null), j([]), Be(!0);
1788
- const Tr = {
1789
- template: _
1791
+ const O = (d == null ? void 0 : d.closeAfterSave) ?? ie, Z = (d == null ? void 0 : d.navigateHomeAfterSave) ?? !1;
1792
+ q(O), O && le(!1);
1793
+ const Rr = tt(P);
1794
+ J(!0), y(null), H([]), Be(!0);
1795
+ const Ur = {
1796
+ template: P
1790
1797
  };
1791
1798
  ue.mutate(
1792
1799
  {
1793
- resourceId: _.id,
1794
- data: Tr
1800
+ resourceId: P.id,
1801
+ data: Ur
1795
1802
  },
1796
1803
  {
1797
1804
  onSuccess: () => {
1798
- Be(!1), C.success("Dashboard saved!"), me(
1799
- jt(
1800
- Ur,
1801
- D.getState().semanticExecutionPayload
1805
+ Be(!1), D.success("Dashboard saved!"), me(
1806
+ Gt(
1807
+ Rr,
1808
+ C.getState().semanticExecutionPayload
1802
1809
  )
1803
- ), Y(!1), H(!1), O && (Ee(), he(), Z && le && Te()), De("close");
1810
+ ), J(!1), q(!1), O && (Ee(), he(), Z && ce && Te()), De("close");
1804
1811
  },
1805
- onError: ($r) => {
1812
+ onError: (Tr) => {
1806
1813
  Be(!1), y("Failed to save dashboard. Please try again.");
1807
- const Ae = $r.details, Fr = Array.isArray(
1814
+ const Ae = Tr.details, $r = Array.isArray(
1808
1815
  Ae == null ? void 0 : Ae.errors
1809
1816
  ) ? (Ae.errors || []).filter(
1810
- (Br) => typeof Br == "string"
1817
+ (Fr) => typeof Fr == "string"
1811
1818
  ) : [];
1812
- j(
1813
- uo({
1814
- errors: Fr,
1815
- dashboard: _ || void 0
1819
+ H(
1820
+ ho({
1821
+ errors: $r,
1822
+ dashboard: P || void 0
1816
1823
  })
1817
- ), C.error("Failed to save dashboard");
1824
+ ), D.error("Failed to save dashboard");
1818
1825
  }
1819
1826
  }
1820
1827
  );
1821
1828
  }
1822
- const bt = h.title;
1829
+ const ft = h.title;
1823
1830
  ue.isPending && console.log("Title during update:", {
1824
- title: bt,
1831
+ title: ft,
1825
1832
  dashboardStateTitle: h.title,
1826
1833
  dashboardId: h == null ? void 0 : h.id
1827
1834
  });
1828
- const Or = le && !!(e != null && e.accessToken) && !!(n != null && n.apiServiceUrl), Pr = !f && J.showDashboardHub && Or, _r = !f && s && J.showDashboardHub, G = (h == null ? void 0 : h.id) || null, gt = Ra(
1829
- (Nt = n.config) == null ? void 0 : Nt.showBriefings,
1835
+ const Mr = ce && !!(e != null && e.accessToken) && !!(n != null && n.apiServiceUrl), Or = !f && V.showDashboardHub && Mr, Pr = !f && s && V.showDashboardHub, G = (h == null ? void 0 : h.id) || null, bt = ga(
1836
+ (wt = n.config) == null ? void 0 : wt.showBriefings,
1830
1837
  r
1831
- ), X = !!G && br === G, Rr = () => {
1832
- !G || f || gr({
1838
+ ), X = !!G && pr === G, _r = () => {
1839
+ !G || f || fr({
1833
1840
  dashboardId: X ? null : G
1834
1841
  });
1835
1842
  };
1836
- return !s && !P ? null : /* @__PURE__ */ i(
1843
+ return !s && !R ? null : /* @__PURE__ */ i(
1837
1844
  "div",
1838
1845
  {
1839
1846
  className: "flex min-h-11 shrink-0 items-center justify-between gap-2 overflow-x-auto border-b px-4 py-1.5",
1840
1847
  role: "dashboard-controls",
1841
1848
  children: [
1842
1849
  /* @__PURE__ */ i("div", { className: "flex items-center gap-2", children: [
1843
- _r && !P && /* @__PURE__ */ t(
1844
- Ut,
1850
+ Pr && !R && /* @__PURE__ */ t(
1851
+ ln,
1845
1852
  {
1846
1853
  "aria-label": "Dashboard Hub",
1847
1854
  tooltip: "Dashboard Hub",
1848
- onClick: Mr,
1855
+ onClick: Lr,
1849
1856
  className: "h-7 w-7 px-0",
1850
1857
  buttonProps: { size: "xs" },
1851
- children: /* @__PURE__ */ t(Ua, { className: "h-3.5 w-3.5" })
1858
+ children: /* @__PURE__ */ t(xa, { className: "h-3.5 w-3.5" })
1852
1859
  }
1853
1860
  ),
1854
- !P && s && (x ? /* @__PURE__ */ t(
1861
+ !R && s && (x ? /* @__PURE__ */ t(
1855
1862
  "div",
1856
1863
  {
1857
1864
  className: "h-4 w-28 animate-pulse rounded-md bg-muted/70",
@@ -1861,19 +1868,19 @@ function Ho() {
1861
1868
  }
1862
1869
  ) : /* @__PURE__ */ i($, { children: [
1863
1870
  /* @__PURE__ */ t(
1864
- Ta,
1871
+ va,
1865
1872
  {
1866
- value: bt || "Untitled Dashboard",
1867
- onSave: (u) => {
1873
+ value: ft || "Untitled Dashboard",
1874
+ onSave: (d) => {
1868
1875
  console.log("EditableText onSave called:", {
1869
- newTitle: u,
1876
+ newTitle: d,
1870
1877
  canEditDashboard: m,
1871
1878
  dashboardId: h == null ? void 0 : h.id
1872
1879
  });
1873
- const _ = (h == null ? void 0 : h.title) || "";
1874
- re(u), Sr(u, _);
1880
+ const P = (h == null ? void 0 : h.title) || "";
1881
+ re(d), wr(d, P);
1875
1882
  },
1876
- isEditable: $a({
1883
+ isEditable: ya({
1877
1884
  isDashboardEditing: k,
1878
1885
  canEditDashboard: m === !0 && !f
1879
1886
  }),
@@ -1883,7 +1890,7 @@ function Ho() {
1883
1890
  isPending: ue.isPending
1884
1891
  }
1885
1892
  ),
1886
- J.showDashboardHub && X && /* @__PURE__ */ t(
1893
+ V.showDashboardHub && X && /* @__PURE__ */ t(
1887
1894
  "span",
1888
1895
  {
1889
1896
  className: "shrink-0 rounded-[4px] border border-border/60 px-1.5 py-px text-[10px] font-medium uppercase tracking-[0.06em] text-muted-foreground",
@@ -1891,53 +1898,42 @@ function Ho() {
1891
1898
  children: "Default"
1892
1899
  }
1893
1900
  ),
1894
- Pr && G && /* @__PURE__ */ t(Ct, { children: /* @__PURE__ */ i(Dt, { children: [
1895
- /* @__PURE__ */ t(Et, { asChild: !0, children: /* @__PURE__ */ t(
1901
+ Or && G && /* @__PURE__ */ t(It, { children: /* @__PURE__ */ i(At, { children: [
1902
+ /* @__PURE__ */ t(Lt, { asChild: !0, children: /* @__PURE__ */ t(
1896
1903
  T,
1897
1904
  {
1898
1905
  variant: "ghost",
1899
1906
  size: "xs",
1900
- onClick: Rr,
1901
- disabled: xr || !(e != null && e.accessToken) || !(n != null && n.apiServiceUrl),
1907
+ onClick: _r,
1908
+ disabled: br || !(e != null && e.accessToken) || !(n != null && n.apiServiceUrl),
1902
1909
  className: be(
1903
1910
  "w-7 px-0",
1904
1911
  X ? "bg-primary/10 text-primary hover:bg-primary/15 hover:text-primary focus-visible:bg-primary/15" : "text-muted-foreground hover:text-foreground"
1905
1912
  ),
1906
1913
  "aria-pressed": X,
1907
1914
  "aria-label": X ? "Remove as default dashboard" : "Set as default dashboard",
1908
- children: /* @__PURE__ */ t(Fa, { className: "h-3.5 w-3.5" })
1915
+ children: /* @__PURE__ */ t(wa, { className: "h-3.5 w-3.5" })
1909
1916
  }
1910
1917
  ) }),
1911
- /* @__PURE__ */ t(It, { children: /* @__PURE__ */ t("p", { children: X ? "Remove as default dashboard" : "Set as default dashboard" }) })
1918
+ /* @__PURE__ */ t(Mt, { children: /* @__PURE__ */ t("p", { children: X ? "Remove as default dashboard" : "Set as default dashboard" }) })
1912
1919
  ] }) })
1913
1920
  ] }))
1914
1921
  ] }),
1915
1922
  /* @__PURE__ */ i("div", { className: "flex items-center gap-2", children: [
1916
- P && /* @__PURE__ */ i($, { children: [
1917
- /* @__PURE__ */ t(dn, {}),
1918
- /* @__PURE__ */ t(ln, {})
1923
+ R && /* @__PURE__ */ i($, { children: [
1924
+ /* @__PURE__ */ t(tn, {}),
1925
+ /* @__PURE__ */ t(rn, {})
1919
1926
  ] }),
1920
- !P && s && !f && J.showDashboardSharing && /* @__PURE__ */ i(
1921
- T,
1922
- {
1923
- variant: "outline",
1924
- size: "xs",
1925
- onClick: () => ye(!0),
1926
- children: [
1927
- /* @__PURE__ */ t(Ba, { className: "h-3.5 w-3.5" }),
1928
- "Share"
1929
- ]
1930
- }
1931
- ),
1932
- !P && k && !f && c.canUseFilters && s && /* @__PURE__ */ t(cn, {}),
1933
- k && !P && !f && s && !L && /* @__PURE__ */ i("div", { className: "inline-flex h-7 items-stretch overflow-hidden rounded-control border border-input bg-background", children: [
1927
+ s && !f && /* @__PURE__ */ t(un, {}),
1928
+ !R && k && !f && u.canUseFilters && s && /* @__PURE__ */ t(an, {}),
1929
+ k && !R && !f && s && !L && /* @__PURE__ */ i("div", { className: "inline-flex h-7 items-stretch overflow-hidden rounded-control border border-input bg-background", children: [
1934
1930
  /* @__PURE__ */ i(
1935
1931
  T,
1936
1932
  {
1937
1933
  variant: "ghost",
1938
1934
  size: "xs",
1939
1935
  disabled: !k,
1940
- onClick: () => void wr(),
1936
+ onClick: () => void vr(),
1941
1937
  className: "h-full rounded-none border-0 shadow-none hover:bg-accent",
1942
1938
  children: [
1943
1939
  /* @__PURE__ */ t(ee, { className: "h-3.5 w-3.5" }),
@@ -1945,8 +1941,8 @@ function Ho() {
1945
1941
  ]
1946
1942
  }
1947
1943
  ),
1948
- /* @__PURE__ */ i(Lt, { modal: !1, children: [
1949
- /* @__PURE__ */ t(Mt, { asChild: !0, children: /* @__PURE__ */ t(
1944
+ /* @__PURE__ */ i(St, { modal: !1, children: [
1945
+ /* @__PURE__ */ t(kt, { asChild: !0, children: /* @__PURE__ */ t(
1950
1946
  T,
1951
1947
  {
1952
1948
  variant: "ghost",
@@ -1954,15 +1950,15 @@ function Ho() {
1954
1950
  className: "h-full w-7 rounded-none border-0 border-l border-border/60 px-0 shadow-none hover:bg-accent",
1955
1951
  "aria-label": "Open visual options",
1956
1952
  disabled: !k,
1957
- children: /* @__PURE__ */ t(rn, { className: "h-3.5 w-3.5" })
1953
+ children: /* @__PURE__ */ t(Ya, { className: "h-3.5 w-3.5" })
1958
1954
  }
1959
1955
  ) }),
1960
1956
  /* @__PURE__ */ t(
1961
- Ot,
1957
+ Ct,
1962
1958
  {
1963
1959
  align: "end",
1964
1960
  className: "z-[60] w-48 rounded-[6px] border-border/60 p-1 shadow-sm",
1965
- children: /* @__PURE__ */ i(R, { onClick: () => de(!0), children: [
1961
+ children: /* @__PURE__ */ i(_, { onClick: () => de(!0), children: [
1966
1962
  /* @__PURE__ */ t(ee, { className: "h-3.5 w-3.5" }),
1967
1963
  "From library..."
1968
1964
  ] })
@@ -1970,33 +1966,33 @@ function Ho() {
1970
1966
  )
1971
1967
  ] }),
1972
1968
  /* @__PURE__ */ t(
1973
- un,
1969
+ nn,
1974
1970
  {
1975
1971
  open: ke,
1976
1972
  onOpenChange: de
1977
1973
  }
1978
1974
  )
1979
1975
  ] }),
1980
- !P && !k && (m || f) && (!g || !p || m !== void 0) && s && /* @__PURE__ */ i("div", { className: "inline-flex items-center gap-1", children: [
1981
- /* @__PURE__ */ i(T, { size: "xs", onClick: Cr, children: [
1982
- /* @__PURE__ */ t(Ga, { className: "h-3.5 w-3.5" }),
1976
+ !R && !k && (m || f) && (!g || !p || m !== void 0) && s && /* @__PURE__ */ i("div", { className: "inline-flex items-center gap-1", children: [
1977
+ /* @__PURE__ */ i(T, { size: "xs", onClick: kr, children: [
1978
+ /* @__PURE__ */ t(Na, { className: "h-3.5 w-3.5" }),
1983
1979
  f ? "Inspect" : "Edit"
1984
1980
  ] }),
1985
- b ? /* @__PURE__ */ t(Ct, { children: /* @__PURE__ */ i(Dt, { children: [
1986
- /* @__PURE__ */ t(Et, { asChild: !0, children: /* @__PURE__ */ t(
1981
+ b ? /* @__PURE__ */ t(It, { children: /* @__PURE__ */ i(At, { children: [
1982
+ /* @__PURE__ */ t(Lt, { asChild: !0, children: /* @__PURE__ */ t(
1987
1983
  "button",
1988
1984
  {
1989
1985
  type: "button",
1990
1986
  "aria-label": b,
1991
1987
  className: "inline-flex size-6 items-center justify-center rounded-control text-muted-foreground outline-none hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
1992
- children: /* @__PURE__ */ t(ta, { "aria-hidden": "true", className: "size-3.5" })
1988
+ children: /* @__PURE__ */ t(Wa, { "aria-hidden": "true", className: "size-3.5" })
1993
1989
  }
1994
1990
  ) }),
1995
- /* @__PURE__ */ t(It, { children: /* @__PURE__ */ t("p", { children: b }) })
1991
+ /* @__PURE__ */ t(Mt, { children: /* @__PURE__ */ t("p", { children: b }) })
1996
1992
  ] }) }) : null
1997
1993
  ] }),
1998
1994
  je && s && ze && /* @__PURE__ */ t(
1999
- xo,
1995
+ yo,
2000
1996
  {
2001
1997
  saved: qe,
2002
1998
  draft: h,
@@ -2008,10 +2004,10 @@ function Ho() {
2008
2004
  {
2009
2005
  variant: "outline",
2010
2006
  size: "xs",
2011
- onClick: Lr,
2007
+ onClick: Ar,
2012
2008
  disabled: Ie,
2013
2009
  children: [
2014
- /* @__PURE__ */ t(Va, { className: "h-3.5 w-3.5" }),
2010
+ /* @__PURE__ */ t(Sa, { className: "h-3.5 w-3.5" }),
2015
2011
  "Undo"
2016
2012
  ]
2017
2013
  }
@@ -2020,81 +2016,82 @@ function Ho() {
2020
2016
  T,
2021
2017
  {
2022
2018
  size: "xs",
2023
- className: be(!ft && "opacity-60"),
2024
- disabled: Ie || !ft,
2019
+ className: be(!pt && "opacity-60"),
2020
+ disabled: Ie || !pt,
2025
2021
  onClick: () => Ke(),
2026
2022
  children: [
2027
- Ie ? /* @__PURE__ */ t(Pe, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ t(Nn, { className: "h-3.5 w-3.5" }),
2023
+ Ie ? /* @__PURE__ */ t(Pe, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ t(kn, { className: "h-3.5 w-3.5" }),
2028
2024
  Ie ? "Saving..." : "Save"
2029
2025
  ]
2030
2026
  }
2031
2027
  ),
2032
- k && !P && s && /* @__PURE__ */ i(T, { variant: "outline", size: "xs", onClick: Er, children: [
2033
- /* @__PURE__ */ t(ja, { className: "h-3.5 w-3.5" }),
2028
+ k && !R && s && /* @__PURE__ */ i(T, { variant: "outline", size: "xs", onClick: Dr, children: [
2029
+ /* @__PURE__ */ t(ka, { className: "h-3.5 w-3.5" }),
2034
2030
  "Close"
2035
2031
  ] }),
2036
- !P && s && /* @__PURE__ */ t("div", { className: "ml-2 flex items-center", children: /* @__PURE__ */ t(mn, {}) }),
2037
- !P && d && /* @__PURE__ */ t(Ln, {}),
2038
- !P && s && !f && /* @__PURE__ */ i(Lt, { children: [
2039
- /* @__PURE__ */ t(Mt, { asChild: !0, children: /* @__PURE__ */ t(
2040
- Ut,
2032
+ !R && s && /* @__PURE__ */ t("div", { className: "ml-2 flex items-center", children: /* @__PURE__ */ t(on, {}) }),
2033
+ !R && c && /* @__PURE__ */ t(Rn, {}),
2034
+ !R && s && !f && /* @__PURE__ */ i(St, { children: [
2035
+ /* @__PURE__ */ t(kt, { asChild: !0, children: /* @__PURE__ */ t(
2036
+ T,
2041
2037
  {
2042
- tooltip: "More Options",
2038
+ variant: "ghost",
2039
+ size: "xs",
2043
2040
  className: "w-7 px-0 text-muted-foreground hover:text-foreground",
2044
- buttonProps: {
2045
- size: "xs",
2046
- variant: "ghost",
2047
- "aria-label": "More dashboard options"
2048
- },
2049
- children: /* @__PURE__ */ t(Ha, { className: "h-3.5 w-3.5" })
2041
+ "aria-label": "More dashboard options",
2042
+ children: /* @__PURE__ */ t(Ca, { className: "h-3.5 w-3.5" })
2050
2043
  }
2051
2044
  ) }),
2052
2045
  /* @__PURE__ */ i(
2053
- Ot,
2046
+ Ct,
2054
2047
  {
2055
2048
  align: "end",
2056
2049
  className: "w-56 rounded-control border border-border/60 p-1 shadow-sm",
2057
2050
  children: [
2058
2051
  /* @__PURE__ */ t(Me, { children: "Reports & briefings" }),
2059
2052
  /* @__PURE__ */ i(
2060
- R,
2053
+ _,
2061
2054
  {
2062
2055
  disabled: w,
2063
2056
  onSelect: () => se(!0),
2064
2057
  children: [
2065
- /* @__PURE__ */ t(qa, { className: "h-3.5 w-3.5" }),
2058
+ /* @__PURE__ */ t(Da, { className: "h-3.5 w-3.5" }),
2066
2059
  "Export"
2067
2060
  ]
2068
2061
  }
2069
2062
  ),
2070
2063
  /* @__PURE__ */ t(
2071
- ho,
2064
+ fo,
2072
2065
  {
2073
- scheduleReportVisible: !!(gt && o.surfaceVisible && G && !k),
2074
- analyticalBriefingVisible: !!(gt && o.surfaceVisible && G && !k),
2066
+ scheduleReportVisible: !!(bt && o.surfaceVisible && G && !k),
2067
+ analyticalBriefingVisible: !!(bt && o.surfaceVisible && G && !k),
2075
2068
  onScheduleReport: () => oe("scheduled_report"),
2076
2069
  onCreateAnalyticalBriefing: () => oe("analytical_briefing")
2077
2070
  }
2078
2071
  ),
2079
2072
  k && /* @__PURE__ */ i(
2080
- R,
2073
+ _,
2081
2074
  {
2082
2075
  onSelect: () => Ne(!0),
2083
2076
  children: [
2084
- /* @__PURE__ */ t(za, { className: "h-3.5 w-3.5" }),
2077
+ /* @__PURE__ */ t(Ea, { className: "h-3.5 w-3.5" }),
2085
2078
  "Download settings"
2086
2079
  ]
2087
2080
  }
2088
2081
  ),
2089
2082
  /* @__PURE__ */ t(We, {}),
2090
- J.showGroupManagement && /* @__PURE__ */ i($, { children: [
2083
+ (V.showDashboardSharing || V.showGroupManagement) && /* @__PURE__ */ i($, { children: [
2091
2084
  /* @__PURE__ */ t(Me, { children: "Access" }),
2092
- /* @__PURE__ */ i(
2093
- R,
2085
+ V.showDashboardSharing && /* @__PURE__ */ i(_, { onSelect: () => ye(!0), children: [
2086
+ /* @__PURE__ */ t(Ia, { className: "h-3.5 w-3.5" }),
2087
+ "Share"
2088
+ ] }),
2089
+ V.showGroupManagement && /* @__PURE__ */ i(
2090
+ _,
2094
2091
  {
2095
- onClick: () => K(!0),
2092
+ onClick: () => Q(!0),
2096
2093
  children: [
2097
- /* @__PURE__ */ t(Qt, { className: "h-3.5 w-3.5" }),
2094
+ /* @__PURE__ */ t(qt, { className: "h-3.5 w-3.5" }),
2098
2095
  "Manage Groups"
2099
2096
  ]
2100
2097
  }
@@ -2102,76 +2099,76 @@ function Ho() {
2102
2099
  /* @__PURE__ */ t(We, {})
2103
2100
  ] }),
2104
2101
  /* @__PURE__ */ t(Me, { children: "Preferences" }),
2105
- /* @__PURE__ */ i(R, { onClick: () => W(!0), children: [
2106
- /* @__PURE__ */ t(Wt, { className: "h-3.5 w-3.5" }),
2102
+ /* @__PURE__ */ i(_, { onClick: () => Y(!0), children: [
2103
+ /* @__PURE__ */ t(zt, { className: "h-3.5 w-3.5" }),
2107
2104
  "Report preferences"
2108
2105
  ] }),
2109
- d && s && /* @__PURE__ */ i($, { children: [
2106
+ c && s && /* @__PURE__ */ i($, { children: [
2110
2107
  /* @__PURE__ */ t(We, {}),
2111
2108
  /* @__PURE__ */ t(Me, { children: "Developer" }),
2112
2109
  /* @__PURE__ */ i(
2113
- R,
2110
+ _,
2114
2111
  {
2115
2112
  onSelect: () => {
2116
- var u;
2117
- e != null && e.accessToken && ((u = navigator == null ? void 0 : navigator.clipboard) != null && u.writeText ? navigator.clipboard.writeText(e.accessToken).then(
2118
- () => C.success("Token copied to clipboard")
2119
- ).catch(() => C.error("Unable to copy token")) : C.error("Clipboard not available"));
2113
+ var d;
2114
+ e != null && e.accessToken && ((d = navigator == null ? void 0 : navigator.clipboard) != null && d.writeText ? navigator.clipboard.writeText(e.accessToken).then(
2115
+ () => D.success("Token copied to clipboard")
2116
+ ).catch(() => D.error("Unable to copy token")) : D.error("Clipboard not available"));
2120
2117
  },
2121
2118
  children: [
2122
- /* @__PURE__ */ t(Pt, { className: "h-3.5 w-3.5" }),
2119
+ /* @__PURE__ */ t(Dt, { className: "h-3.5 w-3.5" }),
2123
2120
  "Copy token"
2124
2121
  ]
2125
2122
  }
2126
2123
  ),
2127
2124
  L && /* @__PURE__ */ i(
2128
- R,
2125
+ _,
2129
2126
  {
2130
2127
  disabled: !Ve,
2131
2128
  onSelect: () => {
2132
- var u;
2129
+ var d;
2133
2130
  if (!Ve) {
2134
- C.error(
2131
+ D.error(
2135
2132
  "Open a document sheet with a token to copy the local PDF URL"
2136
2133
  );
2137
2134
  return;
2138
2135
  }
2139
- (u = navigator == null ? void 0 : navigator.clipboard) != null && u.writeText ? navigator.clipboard.writeText(Ve).then(
2140
- () => C.success(
2136
+ (d = navigator == null ? void 0 : navigator.clipboard) != null && d.writeText ? navigator.clipboard.writeText(Ve).then(
2137
+ () => D.success(
2141
2138
  "Local document PDF URL copied to clipboard"
2142
2139
  )
2143
2140
  ).catch(
2144
- () => C.error(
2141
+ () => D.error(
2145
2142
  "Unable to copy local document PDF URL"
2146
2143
  )
2147
- ) : C.error("Clipboard not available");
2144
+ ) : D.error("Clipboard not available");
2148
2145
  },
2149
2146
  children: [
2150
- /* @__PURE__ */ t(Pt, { className: "h-3.5 w-3.5" }),
2147
+ /* @__PURE__ */ t(Dt, { className: "h-3.5 w-3.5" }),
2151
2148
  "Copy local document PDF URL"
2152
2149
  ]
2153
2150
  }
2154
2151
  ),
2155
2152
  /* @__PURE__ */ i(
2156
- R,
2153
+ _,
2157
2154
  {
2158
- onSelect: () => ra(n.apiServiceUrl),
2155
+ onSelect: () => sn(n.apiServiceUrl),
2159
2156
  children: [
2160
- /* @__PURE__ */ t(En, { className: "h-3.5 w-3.5" }),
2157
+ /* @__PURE__ */ t(An, { className: "h-3.5 w-3.5" }),
2161
2158
  "Invalidate token"
2162
2159
  ]
2163
2160
  }
2164
2161
  ),
2165
- /* @__PURE__ */ i(R, { onSelect: l, children: [
2166
- /* @__PURE__ */ t(Sn, { className: "h-3.5 w-3.5" }),
2162
+ /* @__PURE__ */ i(_, { onSelect: l, children: [
2163
+ /* @__PURE__ */ t(Cn, { className: "h-3.5 w-3.5" }),
2167
2164
  "Brand Studio"
2168
2165
  ] }),
2169
2166
  k && /* @__PURE__ */ i(
2170
- R,
2167
+ _,
2171
2168
  {
2172
- onSelect: () => ct(!dt),
2169
+ onSelect: () => lt(!dt),
2173
2170
  children: [
2174
- /* @__PURE__ */ t(kn, { className: "h-3.5 w-3.5" }),
2171
+ /* @__PURE__ */ t(Dn, { className: "h-3.5 w-3.5" }),
2175
2172
  dt ? "Hide dashboard JSON" : "Show dashboard JSON"
2176
2173
  ]
2177
2174
  }
@@ -2182,83 +2179,83 @@ function Ho() {
2182
2179
  )
2183
2180
  ] }),
2184
2181
  ae && mt && /* @__PURE__ */ t(
2185
- Ka,
2182
+ Aa,
2186
2183
  {
2187
2184
  resource: mt,
2188
2185
  resourceType: Qe.DASHBOARD,
2189
2186
  onClose: () => ye(!1)
2190
2187
  }
2191
2188
  ),
2192
- J.showGroupManagement && /* @__PURE__ */ t(
2193
- to,
2189
+ V.showGroupManagement && /* @__PURE__ */ t(
2190
+ ao,
2194
2191
  {
2195
- open: z,
2196
- onOpenChange: K
2192
+ open: K,
2193
+ onOpenChange: Q
2197
2194
  }
2198
2195
  ),
2199
2196
  /* @__PURE__ */ t(
2200
- xn,
2197
+ mn,
2201
2198
  {
2202
- open: Q,
2203
- onOpenChange: W
2199
+ open: W,
2200
+ onOpenChange: Y
2204
2201
  }
2205
2202
  ),
2206
2203
  /* @__PURE__ */ t(
2207
- co,
2204
+ mo,
2208
2205
  {
2209
2206
  open: we,
2210
2207
  onOpenChange: Ne
2211
2208
  }
2212
2209
  ),
2213
2210
  G && ne ? /* @__PURE__ */ t(
2214
- hn,
2211
+ dn,
2215
2212
  {
2216
2213
  dashboardId: G,
2217
2214
  dashboardTitle: (h == null ? void 0 : h.title) || (B == null ? void 0 : B.title),
2218
2215
  open: !0,
2219
- onOpenChange: (u) => {
2220
- u || oe(null);
2216
+ onOpenChange: (d) => {
2217
+ d || oe(null);
2221
2218
  },
2222
2219
  hideTrigger: !0,
2223
2220
  workflowIntent: ne
2224
2221
  }
2225
2222
  ) : null,
2226
2223
  s && /* @__PURE__ */ t(
2227
- Qa,
2224
+ La,
2228
2225
  {
2229
2226
  open: Se,
2230
2227
  onOpenChange: se
2231
2228
  }
2232
2229
  ),
2233
2230
  /* @__PURE__ */ t(
2234
- Wa,
2231
+ Ma,
2235
2232
  {
2236
2233
  open: Ue,
2237
- onOpenChange: (u) => {
2238
- !u && Fe && !F || (Y(u), u || (y(null), j([]), H(!1)));
2234
+ onOpenChange: (d) => {
2235
+ !d && Fe && !F || (J(d), d || (y(null), H([]), q(!1)));
2239
2236
  },
2240
- children: /* @__PURE__ */ i(Ya, { className: "max-w-sm", children: [
2241
- /* @__PURE__ */ i(Ja, { children: [
2242
- /* @__PURE__ */ t(Xa, { children: F ? "Save failed" : "Saving dashboard" }),
2243
- /* @__PURE__ */ t(Za, { className: "pt-2", children: F ? "We could not save the dashboard. Please try again." : "Please wait while we save your changes." }),
2237
+ children: /* @__PURE__ */ i(Oa, { className: "max-w-sm", children: [
2238
+ /* @__PURE__ */ i(Pa, { children: [
2239
+ /* @__PURE__ */ t(_a, { children: F ? "Save failed" : "Saving dashboard" }),
2240
+ /* @__PURE__ */ t(Ra, { className: "pt-2", children: F ? "We could not save the dashboard. Please try again." : "Please wait while we save your changes." }),
2244
2241
  U.length > 0 && /* @__PURE__ */ i("div", { className: "space-y-1 rounded-md border border-destructive/20 bg-destructive/5 p-3 text-left", children: [
2245
2242
  /* @__PURE__ */ t("div", { className: "text-sm font-medium text-destructive", children: "What needs attention" }),
2246
- /* @__PURE__ */ t("ul", { className: "list-disc space-y-1 pl-4 text-xs text-muted-foreground", children: U.slice(0, 5).map((u) => /* @__PURE__ */ t("li", { children: u }, u)) })
2243
+ /* @__PURE__ */ t("ul", { className: "list-disc space-y-1 pl-4 text-xs text-muted-foreground", children: U.slice(0, 5).map((d) => /* @__PURE__ */ t("li", { children: d }, d)) })
2247
2244
  ] })
2248
2245
  ] }),
2249
- /* @__PURE__ */ t(en, { className: "flex-col gap-2 sm:flex-row sm:justify-end", children: F ? /* @__PURE__ */ i($, { children: [
2246
+ /* @__PURE__ */ t(Ua, { className: "flex-col gap-2 sm:flex-row sm:justify-end", children: F ? /* @__PURE__ */ i($, { children: [
2250
2247
  /* @__PURE__ */ t(
2251
- tn,
2248
+ Ta,
2252
2249
  {
2253
2250
  onClick: () => {
2254
- Y(!1), y(null), j([]), H(!1);
2251
+ J(!1), y(null), H([]), q(!1);
2255
2252
  },
2256
2253
  className: "m-0",
2257
2254
  children: "Close"
2258
2255
  }
2259
2256
  ),
2260
2257
  /* @__PURE__ */ t(
2261
- _t,
2258
+ Et,
2262
2259
  {
2263
2260
  onClick: () => Ke({
2264
2261
  closeAfterSave: ie,
@@ -2268,7 +2265,7 @@ function Ho() {
2268
2265
  children: "Retry"
2269
2266
  }
2270
2267
  )
2271
- ] }) : /* @__PURE__ */ i(_t, { disabled: !0, className: "m-0 cursor-default", children: [
2268
+ ] }) : /* @__PURE__ */ i(Et, { disabled: !0, className: "m-0 cursor-default", children: [
2272
2269
  /* @__PURE__ */ t(Pe, { className: "mr-2 h-4 w-4 animate-spin" }),
2273
2270
  "Saving..."
2274
2271
  ] }) })
@@ -2276,14 +2273,14 @@ function Ho() {
2276
2273
  }
2277
2274
  ),
2278
2275
  /* @__PURE__ */ t(
2279
- pn,
2276
+ cn,
2280
2277
  {
2281
- open: Nr,
2282
- onOpenChange: (u) => {
2283
- ce(u);
2278
+ open: yr,
2279
+ onOpenChange: (d) => {
2280
+ le(d);
2284
2281
  },
2285
- onSave: Ir,
2286
- onDiscard: Ar,
2282
+ onSave: Er,
2283
+ onDiscard: Ir,
2287
2284
  isSaving: Fe,
2288
2285
  saveLabel: "Save",
2289
2286
  discardLabel: "Discard changes"
@@ -2294,21 +2291,21 @@ function Ho() {
2294
2291
  }
2295
2292
  );
2296
2293
  }
2297
- function vo({
2294
+ function wo({
2298
2295
  accessToken: e,
2299
2296
  dashboardId: n,
2300
2297
  selectedSheetId: a,
2301
2298
  pageSize: r,
2302
2299
  orientation: o,
2303
- theme: d
2300
+ theme: c
2304
2301
  }) {
2305
2302
  if (!e || !a)
2306
2303
  return null;
2307
2304
  const m = new URL("http://localhost:5173/print-document");
2308
- m.searchParams.set("token", e), n && m.searchParams.set("dashboardId", n), m.searchParams.set("selectedSheetId", a), d && m.searchParams.set("theme", d);
2305
+ m.searchParams.set("token", e), n && m.searchParams.set("dashboardId", n), m.searchParams.set("selectedSheetId", a), c && m.searchParams.set("theme", c);
2309
2306
  const p = new URL("http://127.0.0.1:3002/");
2310
2307
  return p.searchParams.set("pdfMode", "document"), p.searchParams.set("pageSize", r || "letter"), p.searchParams.set("orientation", o || "portrait"), p.searchParams.set("url", m.toString()), p.toString();
2311
2308
  }
2312
2309
  export {
2313
- Ho as default
2310
+ Jo as default
2314
2311
  };