react-semaphor 0.1.375 → 0.1.376

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 (49) hide show
  1. package/dist/brand-studio/index.cjs +2 -7
  2. package/dist/brand-studio/index.js +94 -106
  3. package/dist/chunks/{calendar-preferences-dialog-DXgi7q5u.js → calendar-preferences-dialog-B6fsethx.js} +3 -3
  4. package/dist/chunks/{calendar-preferences-dialog-CsRzDpDs.js → calendar-preferences-dialog-Dh1b0ytN.js} +1 -1
  5. package/dist/chunks/{chevrons-up-down-CnCSGY02.js → chevrons-up-down-D2fZD4N_.js} +1 -1
  6. package/dist/chunks/{chevrons-up-down-DSvLu4Ye.js → chevrons-up-down-lahj6tQy.js} +1 -1
  7. package/dist/chunks/{dashboard-briefing-launcher-Jwbmrcl_.js → dashboard-briefing-launcher-BKCRO7Qw.js} +597 -589
  8. package/dist/chunks/{dashboard-briefing-launcher-C-G6vQTL.js → dashboard-briefing-launcher-Gv1cwT0I.js} +13 -8
  9. package/dist/chunks/dashboard-controls-BDJZarV7.js +52 -0
  10. package/dist/chunks/dashboard-controls-CchLBVDv.js +3037 -0
  11. package/dist/chunks/{dashboard-json-Cl1O3uh0.js → dashboard-json-QT0T2ad_.js} +2 -2
  12. package/dist/chunks/{dashboard-json-CvPhMpbM.js → dashboard-json-ZhIEMXN0.js} +1 -1
  13. package/dist/chunks/edit-dashboard-visual-DNzPgXMh.js +178 -0
  14. package/dist/chunks/{edit-dashboard-visual-B_0sbc43.js → edit-dashboard-visual-kNoMQRmH.js} +4413 -4330
  15. package/dist/chunks/{index-BIks0ktd.js → index-CPpqPJba.js} +186 -181
  16. package/dist/chunks/{index-BSkBy5cH.js → index-DX_0OcRv.js} +22824 -22664
  17. package/dist/chunks/layout-grid-BOTLt36V.js +36 -0
  18. package/dist/chunks/layout-grid-CS6BSCJF.js +11 -0
  19. package/dist/chunks/{palette-D-f4-82S.js → palette-2HWSR5wb.js} +1 -1
  20. package/dist/chunks/{palette-DUGktM-M.js → palette-BcHHAmOU.js} +1 -1
  21. package/dist/chunks/{save-kkBEBeLg.js → save-B-YfAPhu.js} +1 -1
  22. package/dist/chunks/{save-D3YYinDz.js → save-MoF1T13_.js} +1 -1
  23. package/dist/chunks/switch-CmHP5dT7.js +168 -0
  24. package/dist/chunks/{switch-Dkx2qEOr.js → switch-DmE_MY3L.js} +2001 -1982
  25. package/dist/chunks/use-create-flow-overlay-state-BLPQgGuz.js +21 -0
  26. package/dist/chunks/use-create-flow-overlay-state-D_Ntx-_C.js +1967 -0
  27. package/dist/dashboard/index.cjs +1 -1
  28. package/dist/dashboard/index.js +1 -1
  29. package/dist/data-app-builder/index.cjs +18 -13
  30. package/dist/data-app-builder/index.js +141 -131
  31. package/dist/index.cjs +1 -1
  32. package/dist/index.js +61 -63
  33. package/dist/style.css +1 -1
  34. package/dist/surfboard/index.cjs +1 -1
  35. package/dist/surfboard/index.js +2 -2
  36. package/dist/types/main.d.ts +1 -12
  37. package/package.json +1 -1
  38. package/dist/chunks/braces-C3-w6xDL.js +0 -6
  39. package/dist/chunks/braces-C8QqW4wu.js +0 -23
  40. package/dist/chunks/dashboard-controls-DzGGNQxv.js +0 -2269
  41. package/dist/chunks/dashboard-controls-p7VKzWSb.js +0 -57
  42. package/dist/chunks/edit-dashboard-visual-CSrdS10O.js +0 -178
  43. package/dist/chunks/resource-management-panel-IHbUOh2g.js +0 -6
  44. package/dist/chunks/resource-management-panel-tFjbtgPw.js +0 -1018
  45. package/dist/chunks/switch-fIkmwzUt.js +0 -168
  46. package/dist/chunks/use-create-flow-overlay-state-D-yGZTR3.js +0 -1647
  47. package/dist/chunks/use-create-flow-overlay-state-DbaUD5xc.js +0 -26
  48. package/dist/chunks/use-visual-utils-B5hwU_av.js +0 -1
  49. package/dist/chunks/use-visual-utils-Dj82r7DA.js +0 -340
@@ -1,9 +1,8 @@
1
1
  import { jsx as t, jsxs as s, Fragment as se } from "react/jsx-runtime";
2
- import { c as Ie, L as wn, a1 as io, B as ge, f as ne, G as ct, u as K, E as bt, aJ as Fr, a9 as ba, g as ze, e as He, H as xa, a as v, S as Fn, X as Ce, P as Re, b as tt, d as nt, aK as lo, aL as co, aH as ya, aM as va, a2 as Qe, a3 as Ye, a4 as Xe, a5 as Ze, a6 as he, Q as uo, aN as Na, aO as wa, $ as et, T as mo, J as ho, K as Pr, aP as po } from "./switch-Dkx2qEOr.js";
3
- import { b as ut, c as mt, d as ht, e as pt, f as ft, br as fo, n as Ca, ag as go, ah as bo, aV as ka, b$ as xo, o as fe, aW as Cn, x as yo, b9 as Pn, ba as Mn, bc as Bn, bd as je, bg as Sa, ay as Ht, al as vo, aF as No, ao as On, ar as Vn, as as $n, at as Un, au as _n, av as jn, aw as zn, u as It, $ as ot, aa as Hn, a6 as Aa, a7 as Kn, a0 as Ea, a5 as wo, ac as Co, bW as ko, c0 as So, b6 as Ao, a8 as Mr, w as Vt, a2 as Eo, c1 as Io, c2 as Do, c3 as To, c4 as Lo, c5 as Ro, c6 as Fo, c7 as Po, c8 as Mo, c9 as Ia, ca as Bo, cb as Oo, cc as Vo, cd as $o, ce as Uo, aH as gt, cf as _o, bV as Da, aX as Ta, cg as jo, ch as zo, ci as Ho, cj as Ko, ck as qo, cl as Wo, cm as Go, cn as La, co as Jo, cp as Qo, cq as Ra, cr as Fa, cs as Pa, ct as Yo, cu as Xo, bo as Ma, bL as Zo, bI as ei, cv as ti, bh as ni, aE as Ba, cw as ri, cx as ai, bi as Br, cy as si, cz as oi, cA as kn, cB as ii, cC as li, cD as Oa, cE as qn, cF as di, cG as ci, cH as ui, cI as Va, cJ as Dt, cK as $a, aY as Sn, ax as Ua, cL as mi, cM as hi, aG as An, cN as pi, cO as _a, az as fi, cP as gi, cQ as bi, cR as xi, cS as yi, cT as vi, cU as Ni, cV as wi } from "./index-BSkBy5cH.js";
4
- import { V as Ci, E as Or, a as Vr, b as ki, c as Si, L as Ai, d as Ei, C as Ii, u as ja, e as za, f as Di, R as Ti, S as Li } from "./use-create-flow-overlay-state-D-yGZTR3.js";
5
- import Ri, { useState as A, useContext as Fi, useRef as Ee, useCallback as pe, useEffect as ue, useMemo as O } from "react";
6
- import { u as Ha } from "./use-visual-utils-Dj82r7DA.js";
2
+ import { c as ke, L as wn, a0 as io, B as ge, f as ne, G as ct, u as H, E as bt, aI as Fr, a9 as ba, g as ze, e as qe, H as xa, a as v, S as Fn, X as Ce, P as Re, b as tt, d as nt, aJ as lo, aK as co, aG as ya, aL as va, a1 as Qe, a2 as Ye, a3 as Xe, a4 as Ze, a5 as he, O as uo, aM as Na, aN as wa, _ as et, T as mo, I as ho, J as Pr, aO as po } from "./switch-DmE_MY3L.js";
3
+ import { b as ut, c as mt, d as ht, e as pt, f as ft, bX as fo, n as Ca, aM as go, aN as bo, aU as ka, bY as xo, o as fe, aV as Cn, x as yo, bB as Pn, bC as Mn, bE as Bn, bF as je, b9 as Sa, aq as qt, ad as vo, aw as No, ag as On, aj as Vn, ak as $n, al as Un, am as _n, an as jn, ao as zn, u as It, $ as ot, aa as qn, a6 as Aa, a7 as Hn, a0 as Ea, a5 as wo, ac as Co, bS as ko, bZ as So, b5 as Ao, a8 as Mr, w as Vt, a2 as Eo, b_ as Io, b$ as Do, c0 as To, c1 as Lo, c2 as Ro, c3 as Fo, c4 as Po, c5 as Mo, c6 as Ia, c7 as Bo, c8 as Oo, c9 as Vo, ca as $o, cb as Uo, ay as gt, cc as _o, bQ as Da, aW as Ta, cd as jo, ce as zo, cf as qo, cg as Ho, ch as Ko, ci as Wo, cj as Go, ck as La, cl as Jo, cm as Qo, cn as Ra, co as Fa, cp as Pa, cq as Yo, cr as Xo, bf as Ma, bq as Zo, bn as ei, cs as ti, bG as ni, av as Ba, ct as ri, cu as ai, bs as Br, cv as si, cw as oi, cx as kn, cy as ii, cz as li, cA as Oa, cB as Kn, cC as di, cD as ci, cE as ui, cF as Va, cG as Dt, bD as $a, aX as Sn, ap as Ua, cH as mi, cI as hi, ax as An, cJ as pi, cK as _a, ar as fi, cL as gi, cM as bi, cN as xi, cO as yi, cP as vi, cQ as Ni, cR as wi } from "./index-DX_0OcRv.js";
4
+ import { V as Ci, u as ja, E as Or, a as Vr, b as ki, c as Si, L as Ai, d as Ei, e as za, C as qa, f as Ii, R as Di, S as Ti } from "./use-create-flow-overlay-state-D_Ntx-_C.js";
5
+ import Li, { useState as E, useContext as Ri, useRef as Ie, useCallback as pe, useEffect as ue, useMemo as O } from "react";
7
6
  import "./index-CuHybtft.js";
8
7
  import { l as $r } from "./date-formatter-CzcPZx39.js";
9
8
  import "./index-CJdxSyQq.js";
@@ -14,7 +13,7 @@ import "react-dom";
14
13
  * This source code is licensed under the ISC license.
15
14
  * See the LICENSE file in the root directory of this source tree.
16
15
  */
17
- const Pi = Ie("ArrowUpRight", [
16
+ const Fi = ke("ArrowUpRight", [
18
17
  ["path", { d: "M7 7h10v10", key: "1tivn9" }],
19
18
  ["path", { d: "M7 17 17 7", key: "1vkiza" }]
20
19
  ]);
@@ -24,7 +23,18 @@ const Pi = Ie("ArrowUpRight", [
24
23
  * This source code is licensed under the ISC license.
25
24
  * See the LICENSE file in the root directory of this source tree.
26
25
  */
27
- const Ur = Ie("FileDown", [
26
+ const Pi = ke("CircleX", [
27
+ ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
28
+ ["path", { d: "m15 9-6 6", key: "1uzhvr" }],
29
+ ["path", { d: "m9 9 6 6", key: "z0biqf" }]
30
+ ]);
31
+ /**
32
+ * @license lucide-react v0.453.0 - ISC
33
+ *
34
+ * This source code is licensed under the ISC license.
35
+ * See the LICENSE file in the root directory of this source tree.
36
+ */
37
+ const Ur = ke("FileDown", [
28
38
  ["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
29
39
  ["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
30
40
  ["path", { d: "M12 18v-6", key: "17g6i2" }],
@@ -36,7 +46,7 @@ const Ur = Ie("FileDown", [
36
46
  * This source code is licensed under the ISC license.
37
47
  * See the LICENSE file in the root directory of this source tree.
38
48
  */
39
- const Mi = Ie("FilterX", [
49
+ const Mi = ke("FilterX", [
40
50
  ["path", { d: "M13.013 3H2l8 9.46V19l4 2v-8.54l.9-1.055", key: "1fi1da" }],
41
51
  ["path", { d: "m22 3-5 5", key: "12jva0" }],
42
52
  ["path", { d: "m17 3 5 5", key: "k36vhe" }]
@@ -47,7 +57,7 @@ const Mi = Ie("FilterX", [
47
57
  * This source code is licensed under the ISC license.
48
58
  * See the LICENSE file in the root directory of this source tree.
49
59
  */
50
- const Bi = Ie("ListChecks", [
60
+ const Bi = ke("ListChecks", [
51
61
  ["path", { d: "m3 17 2 2 4-4", key: "1jhpwq" }],
52
62
  ["path", { d: "m3 7 2 2 4-4", key: "1obspn" }],
53
63
  ["path", { d: "M13 6h8", key: "15sg57" }],
@@ -60,7 +70,7 @@ const Bi = Ie("ListChecks", [
60
70
  * This source code is licensed under the ISC license.
61
71
  * See the LICENSE file in the root directory of this source tree.
62
72
  */
63
- const Ka = Ie("Mail", [
73
+ const Ha = ke("Mail", [
64
74
  ["rect", { width: "20", height: "16", x: "2", y: "4", rx: "2", key: "18n3k1" }],
65
75
  ["path", { d: "m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7", key: "1ocrg3" }]
66
76
  ]);
@@ -70,7 +80,7 @@ const Ka = Ie("Mail", [
70
80
  * This source code is licensed under the ISC license.
71
81
  * See the LICENSE file in the root directory of this source tree.
72
82
  */
73
- const En = Ie("MessageSquare", [
83
+ const En = ke("MessageSquare", [
74
84
  ["path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z", key: "1lielz" }]
75
85
  ]);
76
86
  /**
@@ -79,7 +89,7 @@ const En = Ie("MessageSquare", [
79
89
  * This source code is licensed under the ISC license.
80
90
  * See the LICENSE file in the root directory of this source tree.
81
91
  */
82
- const Oi = Ie("Newspaper", [
92
+ const Oi = ke("Newspaper", [
83
93
  [
84
94
  "path",
85
95
  {
@@ -97,7 +107,7 @@ const Oi = Ie("Newspaper", [
97
107
  * This source code is licensed under the ISC license.
98
108
  * See the LICENSE file in the root directory of this source tree.
99
109
  */
100
- const qa = Ie("Pause", [
110
+ const Ka = ke("Pause", [
101
111
  ["rect", { x: "14", y: "4", width: "4", height: "16", rx: "1", key: "zuxfzm" }],
102
112
  ["rect", { x: "6", y: "4", width: "4", height: "16", rx: "1", key: "1okwgv" }]
103
113
  ]);
@@ -107,7 +117,7 @@ const qa = Ie("Pause", [
107
117
  * This source code is licensed under the ISC license.
108
118
  * See the LICENSE file in the root directory of this source tree.
109
119
  */
110
- const Vi = Ie("Undo2", [
120
+ const Vi = ke("Undo2", [
111
121
  ["path", { d: "M9 14 4 9l5-5", key: "102s5s" }],
112
122
  ["path", { d: "M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11", key: "f3b9sd" }]
113
123
  ]);
@@ -117,7 +127,7 @@ const Vi = Ie("Undo2", [
117
127
  * This source code is licensed under the ISC license.
118
128
  * See the LICENSE file in the root directory of this source tree.
119
129
  */
120
- const Wa = Ie("UsersRound", [
130
+ const Wa = ke("UsersRound", [
121
131
  ["path", { d: "M18 21a8 8 0 0 0-16 0", key: "3ypg7q" }],
122
132
  ["circle", { cx: "10", cy: "8", r: "5", key: "o932ke" }],
123
133
  ["path", { d: "M22 20c0-3.37-2-6.5-4-8a5 5 0 0 0-.45-8.3", key: "10s06x" }]
@@ -128,7 +138,7 @@ const Wa = Ie("UsersRound", [
128
138
  * This source code is licensed under the ISC license.
129
139
  * See the LICENSE file in the root directory of this source tree.
130
140
  */
131
- const In = Ie("Zap", [
141
+ const In = ke("Zap", [
132
142
  [
133
143
  "path",
134
144
  {
@@ -146,10 +156,10 @@ function $i({
146
156
  destinationMode: i = "both",
147
157
  onConfirm: l
148
158
  }) {
149
- const [c, d] = A(
159
+ const [c, d] = E(
150
160
  r && a ? `Copy of ${a}` : a || ""
151
- ), [u, p] = A("");
152
- Ri.useEffect(() => {
161
+ ), [u, p] = E("");
162
+ Li.useEffect(() => {
153
163
  e && (d(
154
164
  r && a ? `Copy of ${a}` : a || ""
155
165
  ), p(""));
@@ -242,162 +252,160 @@ function $i({
242
252
  ] }) });
243
253
  }
244
254
  function Ui() {
245
- const [e, n] = A(!1), [r, a] = A(!1), [o, i] = A(null), [l, c] = A(null), d = ct((I) => I.frame), u = ct((I) => I.card), p = go(), f = K((I) => I.selectedSheetId), h = K((I) => I.dashboard), g = K(
246
- (I) => I.actions.setIsDashboardPanelOpen
247
- ), { getUpdatedFrame: D } = Ha(), { selectVisual: S } = bo(), { addFrame: N, setSelectedFrameId: b, setIsVisualEditing: C } = bt(), x = ka(), w = !!(d != null && d.visualId), T = (() => {
248
- var I, P;
249
- return ((I = d == null ? void 0 : d.cards) == null ? void 0 : I.length) === 1 && ((P = d.cards[0]) != null && P.title) ? d.cards[0].title : p != null && p.title ? p.title : (u == null ? void 0 : u.title) || "Untitled Visual";
250
- })(), V = xo((I) => {
251
- I != null && I.id && (S(I), r && o && l && f && (async () => {
255
+ const [e, n] = E(!1), [r, a] = E(!1), [o, i] = E(null), [l, c] = E(null), d = ct((S) => S.frame), u = ct((S) => S.card), p = go(), f = H((S) => S.selectedSheetId), h = H((S) => S.dashboard), { getUpdatedFrame: g } = ja(), { selectVisual: D } = bo(), { addFrame: A, setSelectedFrameId: N, setIsVisualEditing: b } = bt(), C = ka(), x = !!(d != null && d.visualId), w = (() => {
256
+ var S, R;
257
+ return ((S = d == null ? void 0 : d.cards) == null ? void 0 : S.length) === 1 && ((R = d.cards[0]) != null && R.title) ? d.cards[0].title : p != null && p.title ? p.title : (u == null ? void 0 : u.title) || "Untitled Visual";
258
+ })(), T = xo((S) => {
259
+ S != null && S.id && (D(S), r && o && l && f && (async () => {
252
260
  try {
253
- const P = {
261
+ const R = {
254
262
  ...o,
255
263
  id: Fr(),
256
- visualId: I.id
264
+ visualId: S.id
257
265
  // Link to the newly created library visual
258
266
  };
259
- N(f, P, {
267
+ A(f, R, {
260
268
  position: "end",
261
269
  semanticExecutionPayload: l
262
- }), b(P.id), a(!1), i(null), c(null), C(!1);
263
- } catch (P) {
270
+ }), N(R.id), a(!1), i(null), c(null), b(!1);
271
+ } catch (R) {
264
272
  console.error(
265
273
  "Failed to promote semantic metadata for saved visual:",
266
- P
274
+ R
267
275
  ), fe.error(
268
- P instanceof Error ? P.message : "Failed to prepare semantic metadata for the saved visual"
276
+ R instanceof Error ? R.message : "Failed to prepare semantic metadata for the saved visual"
269
277
  );
270
278
  }
271
- })(), g(!0), n(!1));
279
+ })(), n(!1));
272
280
  });
273
281
  return {
274
282
  saveAsDialogOpen: e,
275
283
  setSaveAsDialogOpen: n,
276
- handleSaveAs: async (I) => {
284
+ handleSaveAs: async (S) => {
277
285
  if (!f) {
278
286
  fe.error("No sheet selected");
279
287
  return;
280
288
  }
281
- const P = D(), j = ba(P);
282
- if (j) {
283
- fe.error(j);
289
+ const R = g(), U = ba(R);
290
+ if (U) {
291
+ fe.error(U);
284
292
  return;
285
293
  }
286
- const z = P.cards.length === 1 ? {
287
- ...P,
288
- cards: P.cards.map((U) => ({
289
- ...U,
290
- title: I.name
294
+ const B = R.cards.length === 1 ? {
295
+ ...R,
296
+ cards: R.cards.map((j) => ({
297
+ ...j,
298
+ title: S.name
291
299
  // Use visual name as card title
292
300
  }))
293
- } : P;
294
- if (I.saveToLibrary) {
295
- let U = null;
296
- if (I.saveToCurrentDashboard)
301
+ } : R;
302
+ if (S.saveToLibrary) {
303
+ let j = null;
304
+ if (S.saveToCurrentDashboard)
297
305
  try {
298
- U = await x(z, {
299
- previousFrame: Cn(h, z.id)
306
+ j = await C(B, {
307
+ previousFrame: Cn(h, B.id)
300
308
  });
301
- } catch (H) {
309
+ } catch (M) {
302
310
  console.error(
303
311
  "Failed to prepare semantic metadata before saving visual:",
304
- H
312
+ M
305
313
  ), fe.error(
306
- H instanceof Error ? H.message : "Failed to prepare semantic metadata for the saved visual"
314
+ M instanceof Error ? M.message : "Failed to prepare semantic metadata for the saved visual"
307
315
  );
308
316
  return;
309
317
  }
310
- a(I.saveToCurrentDashboard), i(z), c(U);
311
- const M = {
312
- title: I.name,
313
- description: I.description,
314
- frameObject: z,
318
+ a(S.saveToCurrentDashboard), i(B), c(j);
319
+ const _ = {
320
+ title: S.name,
321
+ description: S.description,
322
+ frameObject: B,
315
323
  // Card title synced for single-card frames
316
324
  isPrivate: !1
317
325
  };
318
- V.mutate(M);
319
- } else if (I.saveToCurrentDashboard) {
320
- const U = {
321
- ...z,
326
+ T.mutate(_);
327
+ } else if (S.saveToCurrentDashboard) {
328
+ const j = {
329
+ ...B,
322
330
  // Card title already synced
323
331
  id: Fr(),
324
332
  visualId: void 0
325
333
  // Explicitly no visualId for local visuals
326
334
  };
327
335
  try {
328
- const M = await x(z, {
329
- previousFrame: Cn(h, z.id)
336
+ const _ = await C(B, {
337
+ previousFrame: Cn(h, B.id)
330
338
  });
331
- N(f, U, {
339
+ A(f, j, {
332
340
  position: "end",
333
- semanticExecutionPayload: M
334
- }), b(U.id), fe.success("Visual saved to dashboard"), n(!1), C(!1);
335
- } catch (M) {
336
- console.error("Failed to save visual to dashboard:", M), fe.error(
337
- M instanceof Error ? M.message : "Failed to prepare semantic metadata for the visual"
341
+ semanticExecutionPayload: _
342
+ }), N(j.id), fe.success("Visual saved to dashboard"), n(!1), b(!1);
343
+ } catch (_) {
344
+ console.error("Failed to save visual to dashboard:", _), fe.error(
345
+ _ instanceof Error ? _.message : "Failed to prepare semantic metadata for the visual"
338
346
  );
339
347
  }
340
348
  }
341
349
  },
342
- isLibraryVisual: w,
343
- currentVisualName: T,
344
- isSaving: V.isPending
350
+ isLibraryVisual: x,
351
+ currentVisualName: w,
352
+ isSaving: T.isPending
345
353
  };
346
354
  }
347
- function Rc(e = {}) {
348
- const n = ct((_) => _.frame), r = ct((_) => _.editorContext), a = yo((_) => _.selectedVisual), o = K((_) => _.selectedFrameId), i = K((_) => _.selectedSheetId), l = K((_) => _.dashboard), { setIsVisualEditing: c, updateFrame: d } = bt(), [u, p] = A(!1), [f, h] = A("both"), g = ka(), D = (r == null ? void 0 : r.type) === "documentSection", S = !!(n != null && n.visualId || a != null && a.id), N = !!(n != null && n.visualId && o), b = S && !N, {
355
+ function Lc(e = {}) {
356
+ const n = ct((B) => B.frame), r = ct((B) => B.editorContext), a = yo((B) => B.selectedVisual), o = H((B) => B.selectedFrameId), i = H((B) => B.selectedSheetId), l = H((B) => B.dashboard), { setIsVisualEditing: c, updateFrame: d } = bt(), [u, p] = E(!1), [f, h] = E("both"), g = ka(), D = (r == null ? void 0 : r.type) === "documentSection", A = !!(n != null && n.visualId || a != null && a.id), N = !!(n != null && n.visualId && o), b = A && !N, {
349
357
  saveAsDialogOpen: C,
350
358
  setSaveAsDialogOpen: x,
351
359
  handleSaveAs: w,
352
360
  isLibraryVisual: T,
353
- currentVisualName: V,
354
- isSaving: R
355
- } = Ui(), { getUpdatedFrame: I } = Ha();
361
+ currentVisualName: $,
362
+ isSaving: S
363
+ } = Ui(), { getUpdatedFrame: R } = ja();
356
364
  if (D)
357
365
  return /* @__PURE__ */ s(se, { children: [
358
366
  /* @__PURE__ */ t(Or, { className: "rounded-control", variant: "default" }),
359
367
  /* @__PURE__ */ t(Vr, {})
360
368
  ] });
361
- const P = async () => {
369
+ const U = async () => {
362
370
  if (!i) {
363
371
  fe.error("No sheet selected");
364
372
  return;
365
373
  }
366
374
  if (u) return;
367
375
  p(!0);
368
- const _ = I(), z = ba(_);
369
- if (z) {
370
- p(!1), fe.error(z);
376
+ const B = R(), j = ba(B);
377
+ if (j) {
378
+ p(!1), fe.error(j);
371
379
  return;
372
380
  }
373
- const U = {
374
- ..._,
381
+ const _ = {
382
+ ...B,
375
383
  visualId: void 0
376
- }, M = Cn(l, U.id);
384
+ }, M = Cn(l, _.id);
377
385
  try {
378
- const H = await g(U, {
386
+ const W = await g(_, {
379
387
  previousFrame: M
380
388
  });
381
- d(i, U, {
382
- semanticExecutionPayload: H
389
+ d(i, _, {
390
+ semanticExecutionPayload: W
383
391
  });
384
- } catch (H) {
385
- console.error("Failed to apply local semantic metadata:", H), p(!1), fe.error(
386
- H instanceof Error ? H.message : "Failed to prepare semantic metadata for this visual"
392
+ } catch (W) {
393
+ console.error("Failed to apply local semantic metadata:", W), p(!1), fe.error(
394
+ W instanceof Error ? W.message : "Failed to prepare semantic metadata for this visual"
387
395
  );
388
396
  return;
389
397
  }
390
398
  setTimeout(() => {
391
399
  p(!1), fe.success("Changes applied. Visual is now local to this dashboard"), c(!1);
392
400
  }, 300);
393
- }, j = (_) => {
394
- h(_), x(!0);
401
+ }, z = (B) => {
402
+ h(B), x(!0);
395
403
  };
396
404
  return /* @__PURE__ */ s(se, { children: [
397
405
  /* @__PURE__ */ s("div", { className: "inline-flex items-center overflow-hidden rounded-control", children: [
398
- !S && /* @__PURE__ */ t(Or, { className: "!rounded-none", variant: "default" }),
399
- S && b && /* @__PURE__ */ t(ki, { className: "!rounded-none", variant: "default" }),
400
- S && N && /* @__PURE__ */ t(Si, { className: "!rounded-none" }),
406
+ !A && /* @__PURE__ */ t(Or, { className: "!rounded-none", variant: "default" }),
407
+ A && b && /* @__PURE__ */ t(ki, { className: "!rounded-none", variant: "default" }),
408
+ A && N && /* @__PURE__ */ t(Si, { className: "!rounded-none" }),
401
409
  /* @__PURE__ */ s(Pn, { modal: !1, children: [
402
410
  /* @__PURE__ */ t(Mn, { asChild: !0, children: /* @__PURE__ */ t(
403
411
  ge,
@@ -406,7 +414,7 @@ function Rc(e = {}) {
406
414
  size: "xs",
407
415
  className: "w-7 !rounded-none border-l border-primary-foreground/20 px-0",
408
416
  "aria-label": "Open visual save options",
409
- disabled: R || u,
417
+ disabled: S || u,
410
418
  children: /* @__PURE__ */ t(ze, { className: "h-3.5 w-3.5" })
411
419
  }
412
420
  ) }),
@@ -420,10 +428,10 @@ function Rc(e = {}) {
420
428
  /* @__PURE__ */ s(
421
429
  je,
422
430
  {
423
- onClick: P,
431
+ onClick: U,
424
432
  disabled: u,
425
433
  children: [
426
- /* @__PURE__ */ t(He, { className: "h-3.5 w-3.5" }),
434
+ /* @__PURE__ */ t(qe, { className: "h-3.5 w-3.5" }),
427
435
  u ? "Applying..." : "Apply Locally"
428
436
  ]
429
437
  }
@@ -433,10 +441,10 @@ function Rc(e = {}) {
433
441
  /* @__PURE__ */ s(
434
442
  je,
435
443
  {
436
- onClick: () => j("local"),
437
- disabled: R,
444
+ onClick: () => z("local"),
445
+ disabled: S,
438
446
  children: [
439
- /* @__PURE__ */ t(Ht, { className: "h-3.5 w-3.5" }),
447
+ /* @__PURE__ */ t(qt, { className: "h-3.5 w-3.5" }),
440
448
  "Add to Dashboard (Local)"
441
449
  ]
442
450
  }
@@ -444,8 +452,8 @@ function Rc(e = {}) {
444
452
  /* @__PURE__ */ s(
445
453
  je,
446
454
  {
447
- onClick: () => j("library"),
448
- disabled: R,
455
+ onClick: () => z("library"),
456
+ disabled: S,
449
457
  children: [
450
458
  /* @__PURE__ */ t(Ai, { className: "h-3.5 w-3.5" }),
451
459
  "Save as Library Visual"
@@ -455,8 +463,8 @@ function Rc(e = {}) {
455
463
  /* @__PURE__ */ s(
456
464
  je,
457
465
  {
458
- onClick: () => j("both"),
459
- disabled: R,
466
+ onClick: () => z("both"),
467
+ disabled: S,
460
468
  children: [
461
469
  /* @__PURE__ */ t(Ei, { className: "h-3.5 w-3.5" }),
462
470
  "Save Copy as Linked Visual"
@@ -473,20 +481,20 @@ function Rc(e = {}) {
473
481
  $i,
474
482
  {
475
483
  open: C,
476
- onOpenChange: (_) => {
477
- R || x(_);
484
+ onOpenChange: (B) => {
485
+ S || x(B);
478
486
  },
479
487
  isLibraryVisual: T,
480
- currentVisualName: V,
481
- isSaving: R,
488
+ currentVisualName: $,
489
+ isSaving: S,
482
490
  destinationMode: f,
483
491
  onConfirm: w
484
492
  }
485
493
  )
486
494
  ] });
487
495
  }
488
- function Fc({ className: e }) {
489
- const n = ct((u) => u.isDevMode), r = K((u) => u.isVisualEditing), { setIsDevMode: a } = xa(), { config: o } = Fi(vo).tokenProps, i = (o == null ? void 0 : o.showAdvancedMode) !== !1;
496
+ function Rc({ className: e }) {
497
+ const n = ct((u) => u.isDevMode), r = H((u) => u.isVisualEditing), { setIsDevMode: a } = xa(), { config: o } = Ri(vo).tokenProps, i = (o == null ? void 0 : o.showAdvancedMode) !== !1;
490
498
  if (!r || !i)
491
499
  return null;
492
500
  const l = n ? Fn : No, c = n ? "Drag & drop" : "SQL", d = n ? "Switch to drag-and-drop mode" : "Switch to SQL mode";
@@ -508,7 +516,7 @@ function Fc({ className: e }) {
508
516
  }
509
517
  );
510
518
  }
511
- function Pc({
519
+ function Fc({
512
520
  open: e,
513
521
  onOpenChange: n,
514
522
  onSave: r,
@@ -548,18 +556,18 @@ function Pc({
548
556
  ] })
549
557
  ] }) });
550
558
  }
551
- const _i = 1e4, ji = 15e3, zi = 3e4, Hi = 3e4, Ki = 12e4, _r = 2 * 60 * 60 * 1e3;
552
- function qi(e) {
559
+ const _i = 1e4, ji = 15e3, zi = 3e4, qi = 3e4, Hi = 12e4, _r = 2 * 60 * 60 * 1e3;
560
+ function Ki(e) {
553
561
  const n = Date.now() - e.getTime();
554
- return n < Hi ? _i : n < Ki ? ji : zi;
562
+ return n < qi ? _i : n < Hi ? ji : zi;
555
563
  }
556
- function Mc() {
557
- const { authToken: e, tokenProps: n } = It(), r = ot((h) => h.activeExports), [a, o] = A(
564
+ function Pc() {
565
+ const { authToken: e, tokenProps: n } = It(), r = ot((h) => h.activeExports), [a, o] = E(
558
566
  typeof document < "u" ? !document.hidden : !0
559
- ), i = Ee(null), l = Ee(!1), c = Ee(void 0), d = n == null ? void 0 : n.apiServiceUrl, u = e == null ? void 0 : e.accessToken, p = pe(() => {
567
+ ), i = Ie(null), l = Ie(!1), c = Ie(void 0), d = n == null ? void 0 : n.apiServiceUrl, u = e == null ? void 0 : e.accessToken, p = pe(() => {
560
568
  const h = ot.getState().activeExports;
561
569
  return Array.from(h.values()).filter(
562
- (g) => Hn(g.status)
570
+ (g) => qn(g.status)
563
571
  );
564
572
  }, []);
565
573
  ue(() => {
@@ -593,25 +601,25 @@ function Mc() {
593
601
  lastUpdatedAt: /* @__PURE__ */ new Date()
594
602
  });
595
603
  }
596
- const S = h.filter(
604
+ const A = h.filter(
597
605
  (x) => g - x.startedAt.getTime() <= _r
598
606
  );
599
- if (S.length === 0) {
607
+ if (A.length === 0) {
600
608
  l.current = !1;
601
609
  return;
602
610
  }
603
611
  const N = await Promise.allSettled(
604
- S.map(async (x) => {
612
+ A.map(async (x) => {
605
613
  try {
606
614
  const w = await Aa(d, u, x.id);
607
615
  let T;
608
616
  if (w.status === "completed")
609
617
  try {
610
- T = await Kn(d, u, x.id);
611
- } catch (V) {
618
+ T = await Hn(d, u, x.id);
619
+ } catch ($) {
612
620
  console.error(
613
621
  `[useExportPolling] Failed to get download URL for ${x.id}:`,
614
- V
622
+ $
615
623
  );
616
624
  }
617
625
  return {
@@ -638,9 +646,9 @@ function Mc() {
638
646
  const C = p();
639
647
  if (C.length > 0 && !document.hidden) {
640
648
  const x = C.reduce(
641
- (T, V) => V.startedAt < T ? V.startedAt : T,
649
+ (T, $) => $.startedAt < T ? $.startedAt : T,
642
650
  C[0].startedAt
643
- ), w = qi(x);
651
+ ), w = Ki(x);
644
652
  i.current && clearTimeout(i.current), i.current = setTimeout(() => {
645
653
  var T;
646
654
  (T = c.current) == null || T.call(c);
@@ -667,8 +675,8 @@ function Mc() {
667
675
  inProgressCount: p().length
668
676
  };
669
677
  }
670
- function Bc() {
671
- const { authToken: e, tokenProps: n } = It(), r = ot((c) => c.activeExports), { addExport: a } = Ea(), o = Ee(!1), i = n == null ? void 0 : n.apiServiceUrl, l = e == null ? void 0 : e.accessToken;
678
+ function Mc() {
679
+ const { authToken: e, tokenProps: n } = It(), r = ot((c) => c.activeExports), { addExport: a } = Ea(), o = Ie(!1), i = n == null ? void 0 : n.apiServiceUrl, l = e == null ? void 0 : e.accessToken;
672
680
  ue(() => {
673
681
  if (o.current || !i || !l) return;
674
682
  (async () => {
@@ -684,7 +692,7 @@ function Bc() {
684
692
  let f;
685
693
  if (u.status === "completed")
686
694
  try {
687
- f = await Kn(i, l, u.id);
695
+ f = await Hn(i, l, u.id);
688
696
  } catch (g) {
689
697
  console.error(
690
698
  `[useExportRecovery] Failed to get download URL for ${u.id}:`,
@@ -717,7 +725,7 @@ function Bc() {
717
725
  }, [i, l, a, r]);
718
726
  }
719
727
  function Wi(e) {
720
- return e.title ? e.title : Hn(
728
+ return e.title ? e.title : qn(
721
729
  e.status
722
730
  ) ? "Export in progress..." : e.status === "completed" ? "Export completed" : e.status === "failed" ? "Export failed" : "Export";
723
731
  }
@@ -734,11 +742,11 @@ function Gi({
734
742
  case "completed":
735
743
  return /* @__PURE__ */ t(Ao, { className: "mt-0.5 h-5 w-5 shrink-0 text-green-600" });
736
744
  case "failed":
737
- return /* @__PURE__ */ t(Ii, { className: "mt-0.5 h-5 w-5 shrink-0 text-destructive" });
745
+ return /* @__PURE__ */ t(Pi, { className: "mt-0.5 h-5 w-5 shrink-0 text-destructive" });
738
746
  default:
739
747
  return /* @__PURE__ */ t(ne, { className: "text-foreground-muted mt-0.5 h-5 w-5 shrink-0 animate-spin" });
740
748
  }
741
- }, i = Hn(e.status), l = (() => {
749
+ }, i = qn(e.status), l = (() => {
742
750
  switch (e.status) {
743
751
  case "pending":
744
752
  return "Queued...";
@@ -813,25 +821,25 @@ function Gi({
813
821
  ] });
814
822
  }
815
823
  function Ji() {
816
- const { authToken: e, tokenProps: n } = It(), r = ot((S) => S.activeExports), { clearCompleted: a, removeExport: o, updateExport: i } = Ea(), [l, c] = A(!1), [d, u] = A(!1), p = Array.from(r.values()).sort(
817
- (S, N) => N.startedAt.getTime() - S.startedAt.getTime()
824
+ const { authToken: e, tokenProps: n } = It(), r = ot((A) => A.activeExports), { clearCompleted: a, removeExport: o, updateExport: i } = Ea(), [l, c] = E(!1), [d, u] = E(!1), p = Array.from(r.values()).sort(
825
+ (A, N) => N.startedAt.getTime() - A.startedAt.getTime()
818
826
  ), f = p.some(
819
- (S) => S.status === "completed" || S.status === "failed"
827
+ (A) => A.status === "completed" || A.status === "failed"
820
828
  ), h = pe(async () => {
821
- const S = n == null ? void 0 : n.apiServiceUrl, N = e == null ? void 0 : e.accessToken;
822
- if (!(!S || !N)) {
829
+ const A = n == null ? void 0 : n.apiServiceUrl, N = e == null ? void 0 : e.accessToken;
830
+ if (!(!A || !N)) {
823
831
  c(!0);
824
832
  try {
825
833
  const b = Array.from(r.values());
826
834
  await Promise.all(
827
835
  b.map(async (C) => {
828
836
  try {
829
- const x = await Aa(S, N, C.id);
837
+ const x = await Aa(A, N, C.id);
830
838
  let w;
831
839
  if (x.status === "completed")
832
840
  try {
833
- w = await Kn(
834
- S,
841
+ w = await Hn(
842
+ A,
835
843
  N,
836
844
  C.id
837
845
  );
@@ -863,8 +871,8 @@ function Ji() {
863
871
  n == null ? void 0 : n.apiServiceUrl,
864
872
  i
865
873
  ]), g = pe(async () => {
866
- const S = n == null ? void 0 : n.apiServiceUrl, N = e == null ? void 0 : e.accessToken;
867
- if (!S || !N) {
874
+ const A = n == null ? void 0 : n.apiServiceUrl, N = e == null ? void 0 : e.accessToken;
875
+ if (!A || !N) {
868
876
  a();
869
877
  return;
870
878
  }
@@ -873,7 +881,7 @@ function Ji() {
873
881
  const b = p.filter(
874
882
  (x) => x.status === "completed" || x.status === "failed"
875
883
  ), C = await Promise.allSettled(
876
- b.map(async (x) => (await Mr(S, N, x.id), x.id))
884
+ b.map(async (x) => (await Mr(A, N, x.id), x.id))
877
885
  );
878
886
  for (const x of C)
879
887
  x.status === "fulfilled" ? o(x.value) : console.error("Failed to delete export:", x.reason);
@@ -887,16 +895,16 @@ function Ji() {
887
895
  a,
888
896
  o
889
897
  ]), D = pe(
890
- async (S) => {
898
+ async (A) => {
891
899
  const N = n == null ? void 0 : n.apiServiceUrl, b = e == null ? void 0 : e.accessToken;
892
900
  if (N && b)
893
901
  try {
894
- await Mr(N, b, S), o(S);
902
+ await Mr(N, b, A), o(A);
895
903
  return;
896
904
  } catch (C) {
897
- console.error(`Failed to cancel export ${S}:`, C);
905
+ console.error(`Failed to cancel export ${A}:`, C);
898
906
  }
899
- o(S);
907
+ o(A);
900
908
  },
901
909
  [n == null ? void 0 : n.apiServiceUrl, e == null ? void 0 : e.accessToken, o]
902
910
  );
@@ -941,17 +949,17 @@ function Ji() {
941
949
  )
942
950
  ] })
943
951
  ] }),
944
- /* @__PURE__ */ t("div", { className: "max-h-[350px] overflow-y-auto", children: /* @__PURE__ */ t("div", { className: "divide-y", children: p.map((S) => /* @__PURE__ */ t(
952
+ /* @__PURE__ */ t("div", { className: "max-h-[350px] overflow-y-auto", children: /* @__PURE__ */ t("div", { className: "divide-y", children: p.map((A) => /* @__PURE__ */ t(
945
953
  Gi,
946
954
  {
947
- export: S,
955
+ export: A,
948
956
  onRemove: D
949
957
  },
950
- S.id
958
+ A.id
951
959
  )) }) })
952
960
  ] });
953
961
  }
954
- function Oc({
962
+ function Bc({
955
963
  variant: e
956
964
  }) {
957
965
  const n = ot((d) => d.activeExports), r = Eo(), a = n.size > 0, o = Array.from(n.values()).some(
@@ -1003,7 +1011,7 @@ function Yi({
1003
1011
  preventPassiveDismissDuringCreate: u,
1004
1012
  resolvedOpen: p,
1005
1013
  setIsCreateFlowActive: f
1006
- } = ja({
1014
+ } = za({
1007
1015
  open: e,
1008
1016
  onOpenChange: n,
1009
1017
  initialCreateFlowActive: o === "create",
@@ -1014,16 +1022,16 @@ function Yi({
1014
1022
  // create and make consumers use `forceClose()` from a dedicated
1015
1023
  // button.
1016
1024
  dismissMode: a ? "passive" : "explicit-only"
1017
- }), h = K((I) => I.dashboard), { setDashboardControlsModel: g } = bt(), { participants: D } = Do(lo(h)), S = Array.from(
1025
+ }), h = H((R) => R.dashboard), { setDashboardControlsModel: g } = bt(), { participants: D } = Do(lo(h)), A = Array.from(
1018
1026
  new Map(
1019
1027
  D.flatMap(
1020
- (I) => I.fieldChoices.map((P) => {
1021
- var j;
1028
+ (R) => R.fieldChoices.map((U) => {
1029
+ var z;
1022
1030
  return [
1023
- P.value,
1031
+ U.value,
1024
1032
  {
1025
- option: P,
1026
- target: (j = I.fieldTargetMap) == null ? void 0 : j[P.value]
1033
+ option: U,
1034
+ target: (z = R.fieldTargetMap) == null ? void 0 : z[U.value]
1027
1035
  }
1028
1036
  ];
1029
1037
  })
@@ -1032,13 +1040,13 @@ function Yi({
1032
1040
  ), N = Array.from(
1033
1041
  new Map(
1034
1042
  D.flatMap(
1035
- (I) => I.metricChoices.map((P) => {
1036
- var j;
1043
+ (R) => R.metricChoices.map((U) => {
1044
+ var z;
1037
1045
  return [
1038
- P.value,
1046
+ U.value,
1039
1047
  {
1040
- option: P,
1041
- target: (j = I.metricTargetMap) == null ? void 0 : j[P.value]
1048
+ option: U,
1049
+ target: (z = R.metricTargetMap) == null ? void 0 : z[U.value]
1042
1050
  }
1043
1051
  ];
1044
1052
  })
@@ -1047,11 +1055,11 @@ function Yi({
1047
1055
  ), b = co({
1048
1056
  ...h || {},
1049
1057
  controls: []
1050
- }), C = To(h), x = (I, P, j) => {
1058
+ }), C = To(h), x = (R, U, z) => {
1051
1059
  g(
1052
- I,
1053
- P,
1054
- Qi(j)
1060
+ R,
1061
+ U,
1062
+ Qi(z)
1055
1063
  );
1056
1064
  }, w = pe(() => {
1057
1065
  if (i) {
@@ -1060,14 +1068,14 @@ function Yi({
1060
1068
  }
1061
1069
  f(!1);
1062
1070
  }, [i, l, f]), T = /* @__PURE__ */ t(
1063
- za,
1071
+ qa,
1064
1072
  {
1065
1073
  scope: "dashboard",
1066
1074
  controls: h.controls || [],
1067
1075
  reservedControlIds: b,
1068
1076
  defaultValues: h.defaultControlValues || {},
1069
1077
  usageByControlId: Lo(h),
1070
- availableFieldChoices: S,
1078
+ availableFieldChoices: A,
1071
1079
  availableMetricChoices: N,
1072
1080
  structuralParticipants: D,
1073
1081
  structuralParticipantIdsByControlId: C,
@@ -1077,7 +1085,7 @@ function Yi({
1077
1085
  onChange: x,
1078
1086
  emptyMessage: "No dashboard controls yet."
1079
1087
  }
1080
- ), V = d ? "Add dashboard control" : "Dashboard Controls", R = /* @__PURE__ */ s(se, { children: [
1088
+ ), $ = d ? "Add dashboard control" : "Dashboard Controls", S = /* @__PURE__ */ s(se, { children: [
1081
1089
  /* @__PURE__ */ s("div", { className: "space-y-1", children: [
1082
1090
  /* @__PURE__ */ t("h4", { className: "text-sm font-medium", children: "Dashboard Controls" }),
1083
1091
  /* @__PURE__ */ t("p", { className: "text-xs text-muted-foreground", children: "Add shared controls viewers can use across the dashboard. Each card can decide how to respond to the same control." })
@@ -1096,7 +1104,7 @@ function Yi({
1096
1104
  align: "end",
1097
1105
  onEscapeKeyDown: u,
1098
1106
  onPointerDownOutside: u,
1099
- children: R
1107
+ children: S
1100
1108
  }
1101
1109
  )
1102
1110
  ] }) : /* @__PURE__ */ t(ut, { open: p, onOpenChange: c, children: /* @__PURE__ */ s(
@@ -1111,7 +1119,7 @@ function Yi({
1111
1119
  {
1112
1120
  className: d ? "space-y-0" : void 0,
1113
1121
  children: [
1114
- /* @__PURE__ */ t(pt, { className: "text-[15px]", children: V }),
1122
+ /* @__PURE__ */ t(pt, { className: "text-[15px]", children: $ }),
1115
1123
  /* @__PURE__ */ t(
1116
1124
  ft,
1117
1125
  {
@@ -1140,7 +1148,7 @@ function Zi({
1140
1148
  onOpenChange: n,
1141
1149
  initialMode: r = "manage"
1142
1150
  }) {
1143
- var R;
1151
+ var S;
1144
1152
  const a = r === "create", {
1145
1153
  forceClose: o,
1146
1154
  handleOpenChange: i,
@@ -1148,23 +1156,23 @@ function Zi({
1148
1156
  preventPassiveDismissDuringCreate: c,
1149
1157
  resolvedOpen: d,
1150
1158
  setIsCreateFlowActive: u
1151
- } = ja({
1159
+ } = za({
1152
1160
  open: e,
1153
1161
  onOpenChange: n,
1154
1162
  initialCreateFlowActive: r === "create",
1155
1163
  dismissMode: "explicit-only"
1156
- }), p = K((I) => I.dashboard), f = K((I) => I.selectedSheetId), { setDashboardInputs: h } = bt(), g = (R = p.sheets) == null ? void 0 : R.find(
1157
- (I) => I.id === f
1158
- ), D = (g == null ? void 0 : g.kind) === "document" && !!g.document, S = O(
1164
+ }), p = H((R) => R.dashboard), f = H((R) => R.selectedSheetId), { setDashboardInputs: h } = bt(), g = (S = p.sheets) == null ? void 0 : S.find(
1165
+ (R) => R.id === f
1166
+ ), D = (g == null ? void 0 : g.kind) === "document" && !!g.document, A = O(
1159
1167
  () => D && (g != null && g.document) ? Ro(p, g.id) : [],
1160
1168
  [p, D, g == null ? void 0 : g.document, g == null ? void 0 : g.id]
1161
1169
  ), N = O(
1162
- () => S.filter(
1163
- (I) => I.kind === "control"
1170
+ () => A.filter(
1171
+ (R) => R.kind === "control"
1164
1172
  ),
1165
- [S]
1173
+ [A]
1166
1174
  ), b = O(
1167
- () => N.map((I) => I.control),
1175
+ () => N.map((R) => R.control),
1168
1176
  [N]
1169
1177
  ), C = O(
1170
1178
  () => tl(b),
@@ -1179,21 +1187,21 @@ function Zi({
1179
1187
  }
1180
1188
  u(!1);
1181
1189
  }, [a, o, u]), T = pe(
1182
- (I, P, j) => {
1190
+ (R, U, z) => {
1183
1191
  !D || !(g != null && g.document) || h(
1184
1192
  rl({
1185
1193
  allInputs: p.inputs || [],
1186
1194
  documentSheetId: g.id,
1187
- currentDocumentInputs: S,
1188
- nextControls: I,
1189
- nextDefaultValues: P,
1190
- change: j
1195
+ currentDocumentInputs: A,
1196
+ nextControls: R,
1197
+ nextDefaultValues: U,
1198
+ change: z
1191
1199
  })
1192
1200
  );
1193
1201
  },
1194
1202
  [
1195
1203
  p.inputs,
1196
- S,
1204
+ A,
1197
1205
  D,
1198
1206
  g,
1199
1207
  h
@@ -1217,7 +1225,7 @@ function Zi({
1217
1225
  )
1218
1226
  ] }),
1219
1227
  /* @__PURE__ */ t("div", { className: "min-h-0 overflow-y-auto pr-1", children: /* @__PURE__ */ t(
1220
- za,
1228
+ qa,
1221
1229
  {
1222
1230
  scope: "dashboard",
1223
1231
  controls: b,
@@ -1283,13 +1291,13 @@ function rl({
1283
1291
  [...e, ...u].filter(
1284
1292
  (N) => N.id !== h.id
1285
1293
  )
1286
- ), S = g.id === D ? g : { ...g, id: D };
1294
+ ), A = g.id === D ? g : { ...g, id: D };
1287
1295
  u.push({
1288
1296
  ...h,
1289
- label: S.label,
1297
+ label: A.label,
1290
1298
  variableName: D,
1291
- requiredAtExecution: S.requiredAtExecution,
1292
- control: S
1299
+ requiredAtExecution: A.requiredAtExecution,
1300
+ control: A
1293
1301
  });
1294
1302
  }
1295
1303
  for (const h of l.values())
@@ -1319,7 +1327,7 @@ function al({
1319
1327
  pickerContentClassName: d,
1320
1328
  settingsContentClassName: u
1321
1329
  }) {
1322
- const p = o === "toolbar", [f, h] = A(!1), g = Mo("interactive");
1330
+ const p = o === "toolbar", [f, h] = E(!1), g = Mo("interactive");
1323
1331
  return /* @__PURE__ */ s(
1324
1332
  "div",
1325
1333
  {
@@ -1395,8 +1403,8 @@ function al({
1395
1403
  );
1396
1404
  }
1397
1405
  function sl() {
1398
- Di();
1399
- const e = K((d) => d.selectedSheetId), n = K((d) => d.selectedFrameId), r = K((d) => d.dashboard), a = K((d) => d.actions.getSelectedFrame), { setSelectedFrameId: o } = bt(), { setCard: i } = xa(), l = ct((d) => d.card.dataSource);
1406
+ Ii();
1407
+ const e = H((d) => d.selectedSheetId), n = H((d) => d.selectedFrameId), r = H((d) => d.dashboard), a = H((d) => d.actions.getSelectedFrame), { setSelectedFrameId: o } = bt(), { setCard: i } = xa(), l = ct((d) => d.card.dataSource);
1400
1408
  return ue(() => {
1401
1409
  var u, p;
1402
1410
  let d = a();
@@ -1413,9 +1421,9 @@ function sl() {
1413
1421
  };
1414
1422
  }
1415
1423
  function ol() {
1416
- const e = K((d) => d.dashboard), n = K(
1424
+ const e = H((d) => d.dashboard), n = H(
1417
1425
  (d) => d.semanticExecutionPayload
1418
- ), r = K((d) => d.actions.addFilter), { hasEntities: a } = sl(), { isLoading: o } = Bo(), i = O(
1426
+ ), r = H((d) => d.actions.addFilter), { hasEntities: a } = sl(), { isLoading: o } = Bo(), i = O(
1419
1427
  () => Oo(e, n),
1420
1428
  [e, n]
1421
1429
  ), c = !Vo(e.filters) && i.hasEligibleCards && !o;
@@ -1451,7 +1459,7 @@ function il({
1451
1459
  onManageControls: r,
1452
1460
  onDismiss: a
1453
1461
  }) {
1454
- const o = K(
1462
+ const o = H(
1455
1463
  (c) => c.dashboard.filterLayout
1456
1464
  ), { setFilterLayout: i } = bt();
1457
1465
  o != null && o.displayMode;
@@ -1542,7 +1550,7 @@ function ll({
1542
1550
  )
1543
1551
  ] });
1544
1552
  }
1545
- function Vc({
1553
+ function Oc({
1546
1554
  size: e,
1547
1555
  className: n,
1548
1556
  primaryButtonClassName: r,
@@ -1550,20 +1558,20 @@ function Vc({
1550
1558
  pickerContentClassName: o,
1551
1559
  settingsContentClassName: i
1552
1560
  }) {
1553
- var V;
1554
- const [l, c] = A(null), d = K((R) => R.dashboard), u = K((R) => R.selectedSheetId), p = K((R) => R.showFilters), f = jo((R) => R.setPanelOpen), h = K((R) => R.actions), { setDocumentInspectorTab: g, setShowFilters: D } = h, S = (V = d.sheets) == null ? void 0 : V.find(
1555
- (R) => R.id === u
1556
- ), N = ya(S), b = pe((R) => {
1561
+ var $;
1562
+ const [l, c] = E(null), d = H((S) => S.dashboard), u = H((S) => S.selectedSheetId), p = H((S) => S.showFilters), f = jo((S) => S.setPanelOpen), h = H((S) => S.actions), { setDocumentInspectorTab: g, setShowFilters: D } = h, A = ($ = d.sheets) == null ? void 0 : $.find(
1563
+ (S) => S.id === u
1564
+ ), N = ya(A), b = pe((S) => {
1557
1565
  window.setTimeout(() => {
1558
- c(R);
1566
+ c(S);
1559
1567
  }, 0);
1560
1568
  }, []), C = pe(
1561
- (R) => {
1569
+ (S) => {
1562
1570
  if (N && u) {
1563
- R && g(u, "inputs");
1571
+ S && g(u, "inputs");
1564
1572
  return;
1565
1573
  }
1566
- R && f("dashboard", !1), D(R);
1574
+ S && f("dashboard", !1), D(S);
1567
1575
  },
1568
1576
  [
1569
1577
  N,
@@ -1586,13 +1594,13 @@ function Vc({
1586
1594
  showFilters: N ? !1 : p,
1587
1595
  onShowFiltersChange: C,
1588
1596
  pickerContent: /* @__PURE__ */ t(ol, {}),
1589
- settingsContent: (R) => /* @__PURE__ */ t(
1597
+ settingsContent: (S) => /* @__PURE__ */ t(
1590
1598
  il,
1591
1599
  {
1592
1600
  onAddFilter: x,
1593
1601
  onAddControl: w,
1594
1602
  onManageControls: T,
1595
- onDismiss: R
1603
+ onDismiss: S
1596
1604
  }
1597
1605
  ),
1598
1606
  size: e,
@@ -1607,8 +1615,8 @@ function Vc({
1607
1615
  Zi,
1608
1616
  {
1609
1617
  open: !0,
1610
- onOpenChange: (R) => {
1611
- R || c(null);
1618
+ onOpenChange: (S) => {
1619
+ S || c(null);
1612
1620
  },
1613
1621
  initialMode: l
1614
1622
  }
@@ -1616,8 +1624,8 @@ function Vc({
1616
1624
  Yi,
1617
1625
  {
1618
1626
  open: !0,
1619
- onOpenChange: (R) => {
1620
- R || c(null);
1627
+ onOpenChange: (S) => {
1628
+ S || c(null);
1621
1629
  },
1622
1630
  showTrigger: !1,
1623
1631
  initialMode: l
@@ -1636,7 +1644,7 @@ function Ga(e, n) {
1636
1644
  function be(e) {
1637
1645
  return encodeURIComponent(e);
1638
1646
  }
1639
- function Kt(e) {
1647
+ function Ht(e) {
1640
1648
  const n = new URLSearchParams();
1641
1649
  Object.entries(e).forEach(([a, o]) => {
1642
1650
  o !== void 0 && o !== "" && n.set(a, String(o));
@@ -1705,7 +1713,7 @@ async function ul(e, n, r) {
1705
1713
  return ye(
1706
1714
  e,
1707
1715
  n,
1708
- `/v1/briefings${Kt({
1716
+ `/v1/briefings${Ht({
1709
1717
  scope: r == null ? void 0 : r.scope,
1710
1718
  tenantId: r == null ? void 0 : r.tenantId,
1711
1719
  tenantUserId: r == null ? void 0 : r.tenantUserId,
@@ -1716,11 +1724,11 @@ async function ul(e, n, r) {
1716
1724
  })}`
1717
1725
  );
1718
1726
  }
1719
- async function $c(e, n, r) {
1727
+ async function Vc(e, n, r) {
1720
1728
  return ye(
1721
1729
  e,
1722
1730
  n,
1723
- `/v1/briefings/tenant-summaries${Kt({
1731
+ `/v1/briefings/tenant-summaries${Ht({
1724
1732
  status: r == null ? void 0 : r.status
1725
1733
  })}`
1726
1734
  );
@@ -1780,11 +1788,11 @@ async function fl(e, n, r) {
1780
1788
  `/v1/briefings/preview-runs/${be(r)}`
1781
1789
  )).previewRun;
1782
1790
  }
1783
- async function Uc(e, n, r, a) {
1791
+ async function $c(e, n, r, a) {
1784
1792
  return ye(
1785
1793
  e,
1786
1794
  n,
1787
- `/v1/briefings/${be(r)}/runs${Kt({
1795
+ `/v1/briefings/${be(r)}/runs${Ht({
1788
1796
  status: a == null ? void 0 : a.status,
1789
1797
  cursor: a == null ? void 0 : a.cursor,
1790
1798
  limit: a == null ? void 0 : a.limit
@@ -1819,15 +1827,15 @@ async function bl(e, n, r, a) {
1819
1827
  }
1820
1828
  );
1821
1829
  }
1822
- async function _c(e, n, r, a, o) {
1830
+ async function Uc(e, n, r, a, o) {
1823
1831
  return Qa(
1824
1832
  e,
1825
1833
  n,
1826
- `/v1/briefings/${be(r)}/runs/${be(a)}/artifact${Kt({ kind: o })}`,
1834
+ `/v1/briefings/${be(r)}/runs/${be(a)}/artifact${Ht({ kind: o })}`,
1827
1835
  o
1828
1836
  );
1829
1837
  }
1830
- async function jc(e, n, r, a) {
1838
+ async function _c(e, n, r, a) {
1831
1839
  return Qa(
1832
1840
  e,
1833
1841
  n,
@@ -2049,7 +2057,7 @@ function Dn(e) {
2049
2057
  };
2050
2058
  }
2051
2059
  }
2052
- function Hr(e) {
2060
+ function qr(e) {
2053
2061
  const n = as(e), r = n.find((i) => i.kind === "dashboard_sheet"), o = n.find((i) => i.kind === "dashboard") ?? r;
2054
2062
  return o ? [Dn({ option: o, runtime: e.runtime })] : [];
2055
2063
  }
@@ -2067,7 +2075,7 @@ function Sl(e) {
2067
2075
  Al({ settings: n, option: r, runtime: a });
2068
2076
  return;
2069
2077
  }
2070
- const o = r.kind === "dashboard" ? "all" : "current", i = r.kind === "dashboard" ? a.selectedSheetId : r.sheetId, l = Ko({
2078
+ const o = r.kind === "dashboard" ? "all" : "current", i = r.kind === "dashboard" ? a.selectedSheetId : r.sheetId, l = Ho({
2071
2079
  dashboard: a.dashboard || void 0,
2072
2080
  filterValues: a.filterValues,
2073
2081
  selectedSheetId: i,
@@ -2225,13 +2233,13 @@ function Tl(e) {
2225
2233
  const n = e.filter(
2226
2234
  (r) => !!r && typeof r == "object" && typeof r.name == "string"
2227
2235
  );
2228
- return qo(n);
2236
+ return Ko(n);
2229
2237
  }
2230
2238
  function os(e, n) {
2231
2239
  return n === "csv" ? { ...vl, ...e } : { ...yl, ...e };
2232
2240
  }
2233
2241
  function is(e) {
2234
- return e ? Ho(e).filter(
2242
+ return e ? qo(e).filter(
2235
2243
  (n) => n !== "png"
2236
2244
  ) : ["pdf"];
2237
2245
  }
@@ -2444,7 +2452,7 @@ function St(e) {
2444
2452
  limits: e.limits ? { ...e.limits } : {}
2445
2453
  };
2446
2454
  }
2447
- function Kr(e) {
2455
+ function Hr(e) {
2448
2456
  return {
2449
2457
  name: e.name.trim(),
2450
2458
  description: cs(e.description) ?? null,
@@ -2474,7 +2482,7 @@ function Ul(e) {
2474
2482
  deliveryConfig: fs(e.delivery)
2475
2483
  };
2476
2484
  }
2477
- function qr(e) {
2485
+ function Kr(e) {
2478
2486
  var a, o, i, l, c;
2479
2487
  const n = [];
2480
2488
  e.name.trim() || n.push({ field: "name", message: "Name is required" });
@@ -2701,7 +2709,7 @@ function $t({
2701
2709
  /* @__PURE__ */ t("span", { children: e })
2702
2710
  ] });
2703
2711
  }
2704
- function Hl({
2712
+ function ql({
2705
2713
  attachments: e,
2706
2714
  onChange: n,
2707
2715
  onAdd: r,
@@ -2724,7 +2732,7 @@ function Hl({
2724
2732
  }
2725
2733
  ),
2726
2734
  e.map((i, l) => /* @__PURE__ */ t(
2727
- Kl,
2735
+ Hl,
2728
2736
  {
2729
2737
  attachment: i,
2730
2738
  disabled: a,
@@ -2744,20 +2752,20 @@ function Hl({
2744
2752
  onClick: r,
2745
2753
  className: "inline-flex h-6 items-center gap-1 rounded-control px-1.5 text-[11px] text-muted-foreground hover:bg-muted hover:text-foreground disabled:opacity-50",
2746
2754
  children: [
2747
- /* @__PURE__ */ t(Ht, { className: "h-3 w-3" }),
2755
+ /* @__PURE__ */ t(qt, { className: "h-3 w-3" }),
2748
2756
  "Add"
2749
2757
  ]
2750
2758
  }
2751
2759
  )
2752
2760
  ] });
2753
2761
  }
2754
- function Kl({
2762
+ function Hl({
2755
2763
  attachment: e,
2756
2764
  disabled: n,
2757
2765
  onUpdate: r,
2758
2766
  onRemove: a
2759
2767
  }) {
2760
- const [o, i] = A(!1), l = Jn(e), c = Nl(e), d = e.format.toUpperCase();
2768
+ const [o, i] = E(!1), l = Jn(e), c = Nl(e), d = e.format.toUpperCase();
2761
2769
  return /* @__PURE__ */ s(
2762
2770
  "span",
2763
2771
  {
@@ -2782,7 +2790,7 @@ function Kl({
2782
2790
  className: "inline-flex max-w-[180px] items-center gap-1 disabled:opacity-50",
2783
2791
  children: [
2784
2792
  /* @__PURE__ */ t(
2785
- ql,
2793
+ Kl,
2786
2794
  {
2787
2795
  format: e.format,
2788
2796
  className: "h-3 w-3 shrink-0 text-muted-foreground/70"
@@ -2810,7 +2818,7 @@ function Kl({
2810
2818
  }
2811
2819
  );
2812
2820
  }
2813
- function ql({
2821
+ function Kl({
2814
2822
  format: e,
2815
2823
  className: n
2816
2824
  }) {
@@ -2830,24 +2838,24 @@ function Gl({
2830
2838
  const d = O(
2831
2839
  () => as({ source: r, dashboard: a, selectedSheetId: o }),
2832
2840
  [r, a, o]
2833
- ), [u, p] = A([]);
2841
+ ), [u, p] = E([]);
2834
2842
  ue(() => {
2835
2843
  if (!e) return;
2836
2844
  const T = [];
2837
- for (const V of l) {
2838
- const R = zr(V), I = d.find(
2839
- (P) => P.formats.some((j) => {
2840
- const _ = Dn({
2841
- option: P,
2842
- format: j,
2845
+ for (const $ of l) {
2846
+ const S = zr($), R = d.find(
2847
+ (U) => U.formats.some((z) => {
2848
+ const B = Dn({
2849
+ option: U,
2850
+ format: z,
2843
2851
  runtime: i
2844
2852
  });
2845
- return zr(_) === R;
2853
+ return zr(B) === S;
2846
2854
  })
2847
2855
  );
2848
- I && T.push({
2849
- optionKey: I.key,
2850
- format: V.format ?? I.defaultFormat
2856
+ R && T.push({
2857
+ optionKey: R.key,
2858
+ format: $.format ?? R.defaultFormat
2851
2859
  });
2852
2860
  }
2853
2861
  p(T);
@@ -2857,23 +2865,23 @@ function Gl({
2857
2865
  [u]
2858
2866
  ), h = O(() => {
2859
2867
  const T = {};
2860
- for (const V of u)
2861
- T[V.optionKey] = V.format;
2868
+ for (const $ of u)
2869
+ T[$.optionKey] = $.format;
2862
2870
  return T;
2863
- }, [u]), g = (T, V) => {
2864
- p((R) => R.some((P) => P.optionKey === T) ? R.filter((P) => P.optionKey !== T) : [...R, { optionKey: T, format: V }]);
2865
- }, D = (T, V) => {
2871
+ }, [u]), g = (T, $) => {
2872
+ p((S) => S.some((U) => U.optionKey === T) ? S.filter((U) => U.optionKey !== T) : [...S, { optionKey: T, format: $ }]);
2873
+ }, D = (T, $) => {
2866
2874
  p(
2867
- (R) => R.map((I) => I.optionKey === T ? { ...I, format: V } : I)
2875
+ (S) => S.map((R) => R.optionKey === T ? { ...R, format: $ } : R)
2868
2876
  );
2869
- }, S = () => {
2877
+ }, A = () => {
2870
2878
  const T = [];
2871
- for (const V of u) {
2872
- const R = d.find((I) => I.key === V.optionKey);
2873
- R && T.push(
2879
+ for (const $ of u) {
2880
+ const S = d.find((R) => R.key === $.optionKey);
2881
+ S && T.push(
2874
2882
  Dn({
2875
- option: R,
2876
- format: V.format,
2883
+ option: S,
2884
+ format: $.format,
2877
2885
  runtime: i
2878
2886
  })
2879
2887
  );
@@ -2947,7 +2955,7 @@ function Gl({
2947
2955
  {
2948
2956
  type: "button",
2949
2957
  size: "xs",
2950
- onClick: S,
2958
+ onClick: A,
2951
2959
  disabled: r.type !== "dashboard",
2952
2960
  children: w > 0 ? `Add ${w} ${w === 1 ? "attachment" : "attachments"}` : "Done"
2953
2961
  }
@@ -3040,7 +3048,7 @@ function Jl({ selected: e }) {
3040
3048
  "mt-0.5 flex h-3.5 w-3.5 shrink-0 items-center justify-center rounded-control border transition-colors",
3041
3049
  e ? "border-primary bg-primary" : "border-border "
3042
3050
  ),
3043
- children: e ? /* @__PURE__ */ t(He, { className: "h-2.5 w-2.5 text-primary-foreground", strokeWidth: 3 }) : null
3051
+ children: e ? /* @__PURE__ */ t(qe, { className: "h-2.5 w-2.5 text-primary-foreground", strokeWidth: 3 }) : null
3044
3052
  }
3045
3053
  );
3046
3054
  }
@@ -3050,7 +3058,7 @@ function Ql({
3050
3058
  cardType: r,
3051
3059
  className: a
3052
3060
  }) {
3053
- return /* @__PURE__ */ t(n === "csv" ? Fa : e === "dashboard" ? Yo : e === "card" ? r === "table" || r === "aggregateTable" || r === "pivotTable" || r === "detailTable" ? Ti : uo : Pa, { className: a });
3061
+ return /* @__PURE__ */ t(n === "csv" ? Fa : e === "dashboard" ? Yo : e === "card" ? r === "table" || r === "aggregateTable" || r === "pivotTable" || r === "detailTable" ? Di : uo : Pa, { className: a });
3054
3062
  }
3055
3063
  const Yl = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xl = 250;
3056
3064
  function Ct(e) {
@@ -3101,86 +3109,86 @@ function Jr({
3101
3109
  prefix: o,
3102
3110
  placeholder: i
3103
3111
  }) {
3104
- const l = Ee(null), [c, d] = A(!1), [u, p] = A(""), [f, h] = A(0), [g, D] = A(
3112
+ const l = Ie(null), [c, d] = E(!1), [u, p] = E(""), [f, h] = E(0), [g, D] = E(
3105
3113
  () => /* @__PURE__ */ new Map()
3106
- ), [S, N] = A(
3114
+ ), [A, N] = E(
3107
3115
  () => /* @__PURE__ */ new Map()
3108
- ), [b, C] = A("people"), x = Xo(u, Xl), { currentUser: w } = Ma(), T = (w == null ? void 0 : w.type) === "tenant", { users: V, isLoading: R } = Zo({
3116
+ ), [b, C] = E("people"), x = Xo(u, Xl), { currentUser: w } = Ma(), T = (w == null ? void 0 : w.type) === "tenant", { users: $, isLoading: S } = Zo({
3109
3117
  search: x,
3110
3118
  active: !0,
3111
3119
  type: T ? "tenant" : "all",
3112
3120
  tenantId: T ? w.tenantId : void 0,
3113
3121
  limit: 25
3114
- }), { groups: I, isLoading: P } = ei({
3122
+ }), { groups: R, isLoading: U } = ei({
3115
3123
  search: x,
3116
3124
  type: T ? "TENANT_GROUP" : "all",
3117
3125
  tenantId: T ? w.tenantId : void 0,
3118
3126
  limit: 25
3119
- }), j = O(
3127
+ }), z = O(
3120
3128
  () => new Set(e.map(Ct)),
3121
3129
  [e]
3122
- ), _ = O(
3130
+ ), B = O(
3123
3131
  () => new Set(
3124
- e.map(Zl).filter((E) => !!E)
3132
+ e.map(Zl).filter((I) => !!I)
3125
3133
  ),
3126
3134
  [e]
3127
- ), z = O(
3135
+ ), j = O(
3128
3136
  () => new Set(
3129
- e.map(ed).filter((E) => !!E)
3137
+ e.map(ed).filter((I) => !!I)
3130
3138
  ),
3131
3139
  [e]
3132
- ), U = O(() => {
3133
- const E = new Map(g);
3134
- return V.forEach((B) => {
3135
- E.set(B.id, Wr(B));
3136
- }), w != null && w.id && E.set(w.id, {
3140
+ ), _ = O(() => {
3141
+ const I = new Map(g);
3142
+ return $.forEach((P) => {
3143
+ I.set(P.id, Wr(P));
3144
+ }), w != null && w.id && I.set(w.id, {
3137
3145
  kind: "user",
3138
3146
  id: w.id,
3139
3147
  name: w.name || w.email || "User",
3140
3148
  email: w.email || "",
3141
3149
  type: w.type
3142
- }), E;
3143
- }, [g, V, w]), M = O(() => {
3144
- const E = /* @__PURE__ */ new Set();
3145
- return e.forEach((B) => {
3146
- var qe;
3147
- if (B.type === "email") {
3148
- const We = kt(B.address);
3149
- We && E.add(We);
3150
+ }), I;
3151
+ }, [g, $, w]), M = O(() => {
3152
+ const I = /* @__PURE__ */ new Set();
3153
+ return e.forEach((P) => {
3154
+ var Ke;
3155
+ if (P.type === "email") {
3156
+ const We = kt(P.address);
3157
+ We && I.add(We);
3150
3158
  return;
3151
3159
  }
3152
- if (B.type === "group")
3160
+ if (P.type === "group")
3153
3161
  return;
3154
- const Se = B.type === "tenant_user" ? B.tenantUserId : B.userId, X = kt((qe = U.get(Se)) == null ? void 0 : qe.email);
3155
- X && E.add(X);
3156
- }), E;
3157
- }, [U, e]), H = O(() => {
3158
- const E = new Map(S);
3159
- return I.forEach((B) => {
3160
- E.set(B.id, Gr(B));
3161
- }), E;
3162
- }, [S, I]), le = O(
3163
- () => V.filter((E) => {
3164
- if (_.has(E.id)) return !1;
3165
- const B = kt(E.email);
3166
- return B && M.has(B) ? !1 : T ? E.type === "tenant" && E.tenantId === (w == null ? void 0 : w.tenantId) : !0;
3162
+ const Ae = P.type === "tenant_user" ? P.tenantUserId : P.userId, X = kt((Ke = _.get(Ae)) == null ? void 0 : Ke.email);
3163
+ X && I.add(X);
3164
+ }), I;
3165
+ }, [_, e]), W = O(() => {
3166
+ const I = new Map(A);
3167
+ return R.forEach((P) => {
3168
+ I.set(P.id, Gr(P));
3169
+ }), I;
3170
+ }, [A, R]), le = O(
3171
+ () => $.filter((I) => {
3172
+ if (B.has(I.id)) return !1;
3173
+ const P = kt(I.email);
3174
+ return P && M.has(P) ? !1 : T ? I.type === "tenant" && I.tenantId === (w == null ? void 0 : w.tenantId) : !0;
3167
3175
  }).map(Wr),
3168
3176
  [
3169
- V,
3170
- _,
3177
+ $,
3178
+ B,
3171
3179
  M,
3172
3180
  T,
3173
3181
  w == null ? void 0 : w.tenantId
3174
3182
  ]
3175
3183
  ), L = O(
3176
- () => le.filter((E) => E.type === "organization"),
3184
+ () => le.filter((I) => I.type === "organization"),
3177
3185
  [le]
3178
3186
  ), G = O(
3179
- () => le.filter((E) => E.type === "tenant"),
3187
+ () => le.filter((I) => I.type === "tenant"),
3180
3188
  [le]
3181
3189
  ), k = O(
3182
- () => I.filter((E) => z.has(E.id) ? !1 : (w == null ? void 0 : w.type) === "tenant" ? E.type === "TENANT_GROUP" && E.tenantId === w.tenantId : !0).map(Gr),
3183
- [I, z, w == null ? void 0 : w.type, w == null ? void 0 : w.tenantId]
3190
+ () => R.filter((I) => j.has(I.id) ? !1 : (w == null ? void 0 : w.type) === "tenant" ? I.type === "TENANT_GROUP" && I.tenantId === w.tenantId : !0).map(Gr),
3191
+ [R, j, w == null ? void 0 : w.type, w == null ? void 0 : w.tenantId]
3184
3192
  ), xe = O(
3185
3193
  () => T ? [
3186
3194
  {
@@ -3224,79 +3232,79 @@ function Jr({
3224
3232
  ]), re = O(
3225
3233
  () => b === "groups" ? k : [],
3226
3234
  [b, k]
3227
- ), ke = O(
3235
+ ), Se = O(
3228
3236
  () => [...de, ...re],
3229
3237
  [de, re]
3230
- ), De = ke.length === 0 ? 0 : Math.min(f, ke.length - 1), me = u.trim(), q = Yl.test(me), lt = kt(me), Te = lt ? M.has(lt) : !1, Ke = R || P, Pe = (E) => {
3231
- j.has(Ct(E)) || (n([...e, E]), p(""), h(0));
3232
- }, W = (E) => {
3233
- n(e.filter((B) => Ct(B) !== E));
3238
+ ), De = Se.length === 0 ? 0 : Math.min(f, Se.length - 1), me = u.trim(), q = Yl.test(me), lt = kt(me), Te = lt ? M.has(lt) : !1, He = S || U, Pe = (I) => {
3239
+ z.has(Ct(I)) || (n([...e, I]), p(""), h(0));
3240
+ }, K = (I) => {
3241
+ n(e.filter((P) => Ct(P) !== I));
3234
3242
  }, Me = () => {
3235
3243
  !q || Te || Pe({ type: "email", address: me });
3236
- }, $ = (E) => {
3237
- const B = kt(E.email);
3238
- B && M.has(B) || (D((Se) => {
3239
- const X = new Map(Se);
3240
- return X.set(E.id, E), X;
3244
+ }, V = (I) => {
3245
+ const P = kt(I.email);
3246
+ P && M.has(P) || (D((Ae) => {
3247
+ const X = new Map(Ae);
3248
+ return X.set(I.id, I), X;
3241
3249
  }), Pe(
3242
- E.type === "tenant" ? { type: "tenant_user", tenantUserId: E.id } : { type: "user", userId: E.id }
3250
+ I.type === "tenant" ? { type: "tenant_user", tenantUserId: I.id } : { type: "user", userId: I.id }
3243
3251
  ));
3244
- }, ee = (E) => {
3245
- N((B) => {
3246
- const Se = new Map(B);
3247
- return Se.set(E.id, E), Se;
3248
- }), Pe({ type: "group", groupId: E.id });
3249
- }, Tt = (E) => {
3250
- if (E.key === "Enter") {
3251
- if (E.preventDefault(), q && !Te) {
3252
+ }, ee = (I) => {
3253
+ N((P) => {
3254
+ const Ae = new Map(P);
3255
+ return Ae.set(I.id, I), Ae;
3256
+ }), Pe({ type: "group", groupId: I.id });
3257
+ }, Tt = (I) => {
3258
+ if (I.key === "Enter") {
3259
+ if (I.preventDefault(), q && !Te) {
3252
3260
  Me();
3253
3261
  return;
3254
3262
  }
3255
- const B = ke[De];
3256
- if ((B == null ? void 0 : B.kind) === "user") {
3257
- $(B);
3263
+ const P = Se[De];
3264
+ if ((P == null ? void 0 : P.kind) === "user") {
3265
+ V(P);
3258
3266
  return;
3259
3267
  }
3260
- if ((B == null ? void 0 : B.kind) === "group") {
3261
- ee(B);
3268
+ if ((P == null ? void 0 : P.kind) === "group") {
3269
+ ee(P);
3262
3270
  return;
3263
3271
  }
3264
- } else if (E.key === "ArrowDown")
3265
- E.preventDefault(), h(
3266
- (B) => Math.min(B + 1, Math.max(ke.length - 1, 0))
3272
+ } else if (I.key === "ArrowDown")
3273
+ I.preventDefault(), h(
3274
+ (P) => Math.min(P + 1, Math.max(Se.length - 1, 0))
3267
3275
  );
3268
- else if (E.key === "ArrowUp")
3269
- E.preventDefault(), h((B) => Math.max(B - 1, 0));
3270
- else if (E.key === "Escape")
3276
+ else if (I.key === "ArrowUp")
3277
+ I.preventDefault(), h((P) => Math.max(P - 1, 0));
3278
+ else if (I.key === "Escape")
3271
3279
  d(!1);
3272
- else if (E.key === "Backspace" && u.length === 0) {
3273
- const B = e[e.length - 1];
3274
- B && W(Ct(B));
3280
+ else if (I.key === "Backspace" && u.length === 0) {
3281
+ const P = e[e.length - 1];
3282
+ P && K(Ct(P));
3275
3283
  }
3276
- }, xt = e.map((E) => {
3277
- const B = Ct(E);
3278
- if (E.type === "email")
3284
+ }, xt = e.map((I) => {
3285
+ const P = Ct(I);
3286
+ if (I.type === "email")
3279
3287
  return {
3280
- key: B,
3281
- label: E.name || E.address,
3288
+ key: P,
3289
+ label: I.name || I.address,
3282
3290
  icon: /* @__PURE__ */ t(ti, { className: "h-3 w-3" }),
3283
- onRemove: () => W(B)
3291
+ onRemove: () => K(P)
3284
3292
  };
3285
- if (E.type === "group") {
3286
- const qe = H.get(E.groupId);
3293
+ if (I.type === "group") {
3294
+ const Ke = W.get(I.groupId);
3287
3295
  return {
3288
- key: B,
3289
- label: (qe == null ? void 0 : qe.name) || "Group",
3296
+ key: P,
3297
+ label: (Ke == null ? void 0 : Ke.name) || "Group",
3290
3298
  icon: /* @__PURE__ */ t(Wa, { className: "h-3 w-3" }),
3291
- onRemove: () => W(B)
3299
+ onRemove: () => K(P)
3292
3300
  };
3293
3301
  }
3294
- const Se = E.type === "tenant_user" ? E.tenantUserId : E.userId, X = U.get(Se);
3302
+ const Ae = I.type === "tenant_user" ? I.tenantUserId : I.userId, X = _.get(Ae);
3295
3303
  return {
3296
- key: B,
3304
+ key: P,
3297
3305
  label: (X == null ? void 0 : X.name) || (X == null ? void 0 : X.email) || "User",
3298
3306
  icon: /* @__PURE__ */ t(ni, { className: "h-3 w-3" }),
3299
- onRemove: () => W(B)
3307
+ onRemove: () => K(P)
3300
3308
  };
3301
3309
  });
3302
3310
  return /* @__PURE__ */ t("div", { className: v("relative", r), children: /* @__PURE__ */ s(Re, { open: c && !a, onOpenChange: d, children: [
@@ -3309,19 +3317,19 @@ function Jr({
3309
3317
  a && "cursor-not-allowed opacity-60"
3310
3318
  ),
3311
3319
  onClick: () => {
3312
- var E;
3313
- a || ((E = l.current) == null || E.focus(), d(!0));
3320
+ var I;
3321
+ a || ((I = l.current) == null || I.focus(), d(!0));
3314
3322
  },
3315
3323
  children: [
3316
3324
  o ? /* @__PURE__ */ t("span", { className: "inline-flex shrink-0 items-center text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: o }) : null,
3317
- xt.map((E) => /* @__PURE__ */ t(
3325
+ xt.map((I) => /* @__PURE__ */ t(
3318
3326
  td,
3319
3327
  {
3320
- icon: E.icon,
3321
- label: E.label,
3322
- onRemove: E.onRemove
3328
+ icon: I.icon,
3329
+ label: I.label,
3330
+ onRemove: I.onRemove
3323
3331
  },
3324
- E.key
3332
+ I.key
3325
3333
  )),
3326
3334
  /* @__PURE__ */ t(
3327
3335
  "input",
@@ -3331,8 +3339,8 @@ function Jr({
3331
3339
  value: u,
3332
3340
  disabled: a,
3333
3341
  placeholder: i ?? (e.length > 0 ? "Add more..." : "Add people, emails, or groups"),
3334
- onChange: (E) => {
3335
- p(E.target.value), h(0), d(!0);
3342
+ onChange: (I) => {
3343
+ p(I.target.value), h(0), d(!0);
3336
3344
  },
3337
3345
  onFocus: () => d(!0),
3338
3346
  onKeyDown: Tt
@@ -3346,7 +3354,7 @@ function Jr({
3346
3354
  {
3347
3355
  align: "start",
3348
3356
  sideOffset: 8,
3349
- onOpenAutoFocus: (E) => E.preventDefault(),
3357
+ onOpenAutoFocus: (I) => I.preventDefault(),
3350
3358
  className: v(
3351
3359
  "z-[60] w-[var(--radix-popover-trigger-width)] min-w-[360px] rounded-card border border-border bg-background p-0 text-foreground shadow-md outline-none",
3352
3360
  "max-h-[min(320px,var(--radix-popover-content-available-height))] overflow-y-auto"
@@ -3359,14 +3367,14 @@ function Jr({
3359
3367
  emailAlreadyAdded: Te,
3360
3368
  filters: xe,
3361
3369
  groupSuggestions: re,
3362
- loading: Ke,
3370
+ loading: He,
3363
3371
  onAddEmail: Me,
3364
- onFilterChange: (E) => {
3365
- C(E), h(0);
3372
+ onFilterChange: (I) => {
3373
+ C(I), h(0);
3366
3374
  },
3367
3375
  onGroupClick: ee,
3368
- onUserClick: $,
3369
- orderedSuggestions: ke,
3376
+ onUserClick: V,
3377
+ orderedSuggestions: Se,
3370
3378
  query: me,
3371
3379
  queryIsEmail: q,
3372
3380
  userSuggestions: de,
@@ -3416,7 +3424,7 @@ function nd({
3416
3424
  userSuggestions: g,
3417
3425
  viewerType: D
3418
3426
  }) {
3419
- const S = !i && p.length === 0 && !(h && !r);
3427
+ const A = !i && p.length === 0 && !(h && !r);
3420
3428
  return /* @__PURE__ */ s("div", { className: "py-1 text-[13px]", children: [
3421
3429
  /* @__PURE__ */ t("div", { className: "flex items-center gap-1 border-b border-border/60 px-2 pb-1", children: a.map((N) => /* @__PURE__ */ s(
3422
3430
  "button",
@@ -3487,7 +3495,7 @@ function nd({
3487
3495
  onClick: l,
3488
3496
  className: "flex w-full items-center gap-2 rounded-control px-2 py-1.5 text-left hover:bg-muted",
3489
3497
  children: [
3490
- /* @__PURE__ */ t(Ka, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
3498
+ /* @__PURE__ */ t(Ha, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
3491
3499
  /* @__PURE__ */ s("div", { className: "min-w-0", children: [
3492
3500
  /* @__PURE__ */ s("div", { className: "text-[13px] text-foreground", children: [
3493
3501
  "Send to ",
@@ -3499,7 +3507,7 @@ function nd({
3499
3507
  ]
3500
3508
  }
3501
3509
  ) }) : null,
3502
- S ? /* @__PURE__ */ t("div", { className: "px-2.5 py-6 text-center text-[12px] text-muted-foreground", children: f ? "No people or groups match. Enter a valid email to add an external recipient." : "Pick a category above or type to search people, groups, or external emails." }) : null
3510
+ A ? /* @__PURE__ */ t("div", { className: "px-2.5 py-6 text-center text-[12px] text-muted-foreground", children: f ? "No people or groups match. Enter a valid email to add an external recipient." : "Pick a category above or type to search people, groups, or external emails." }) : null
3503
3511
  ] });
3504
3512
  }
3505
3513
  function Qr({
@@ -3557,7 +3565,7 @@ function Ln({
3557
3565
  onError: c,
3558
3566
  onTimeout: d
3559
3567
  }) {
3560
- const [u, p] = A(null), [f, h] = A("idle"), g = Ee(null), D = Ee({
3568
+ const [u, p] = E(null), [f, h] = E("idle"), g = Ie(null), D = Ie({
3561
3569
  fetchRun: o,
3562
3570
  onRun: i,
3563
3571
  onTerminalRun: l,
@@ -3573,7 +3581,7 @@ function Ln({
3573
3581
  onTimeout: d
3574
3582
  };
3575
3583
  }, [o, c, i, l, d]);
3576
- const S = pe(() => {
3584
+ const A = pe(() => {
3577
3585
  p(null), h("idle");
3578
3586
  }, []), N = pe(() => {
3579
3587
  g.current = null;
@@ -3599,11 +3607,11 @@ function Ln({
3599
3607
  return;
3600
3608
  }
3601
3609
  let x = !1, w = !1, T = null;
3602
- const V = Date.now(), R = async () => {
3603
- var I, P, j, _, z, U;
3610
+ const $ = Date.now(), S = async () => {
3611
+ var R, U, z, B, j, _;
3604
3612
  if (!(x || w)) {
3605
- if (Date.now() - V > a) {
3606
- p((M) => M === u ? null : M), h("timed_out"), (P = (I = D.current).onTimeout) == null || P.call(I, u);
3613
+ if (Date.now() - $ > a) {
3614
+ p((M) => M === u ? null : M), h("timed_out"), (U = (R = D.current).onTimeout) == null || U.call(R, u);
3607
3615
  return;
3608
3616
  }
3609
3617
  w = !0;
@@ -3616,22 +3624,22 @@ function Ln({
3616
3624
  if (x)
3617
3625
  return;
3618
3626
  if (D.current.onRun(M), Ut(M.status)) {
3619
- g.current = M.id, p((H) => H === M.id ? null : H), h("terminal"), (_ = (j = D.current).onTerminalRun) == null || _.call(j, M);
3627
+ g.current = M.id, p((W) => W === M.id ? null : W), h("terminal"), (B = (z = D.current).onTerminalRun) == null || B.call(z, M);
3620
3628
  return;
3621
3629
  }
3622
3630
  if (!_t(M.status)) {
3623
- p((H) => H === M.id ? null : H), h("idle");
3631
+ p((W) => W === M.id ? null : W), h("idle");
3624
3632
  return;
3625
3633
  }
3626
- T = window.setTimeout(R, r);
3634
+ T = window.setTimeout(S, r);
3627
3635
  } catch (M) {
3628
- x || (h("error"), (U = (z = D.current).onError) == null || U.call(z, M));
3636
+ x || (h("error"), (_ = (j = D.current).onError) == null || _.call(j, M));
3629
3637
  } finally {
3630
3638
  w = !1;
3631
3639
  }
3632
3640
  }
3633
3641
  };
3634
- return h("polling"), R(), () => {
3642
+ return h("polling"), S(), () => {
3635
3643
  x = !0, T && window.clearTimeout(T);
3636
3644
  };
3637
3645
  }, [u, e, r, a, n]), {
@@ -3641,7 +3649,7 @@ function Ln({
3641
3649
  startRun: b,
3642
3650
  startRunId: C,
3643
3651
  status: f,
3644
- stop: S
3652
+ stop: A
3645
3653
  };
3646
3654
  }
3647
3655
  function Xr({
@@ -3777,7 +3785,7 @@ function xn({
3777
3785
  r ? "border-primary bg-primary" : "border-border"
3778
3786
  ),
3779
3787
  children: r ? /* @__PURE__ */ t(
3780
- He,
3788
+ qe,
3781
3789
  {
3782
3790
  className: "h-2 w-2 text-primary-foreground",
3783
3791
  strokeWidth: 3.5
@@ -3941,12 +3949,12 @@ function sd({
3941
3949
  timezone: n,
3942
3950
  onScheduleChange: r
3943
3951
  }) {
3944
- const a = O(() => ri(e), [e]), [o, i] = A(() => jt()), [l, c] = A(null), d = ai(
3952
+ const a = O(() => ri(e), [e]), [o, i] = E(() => jt()), [l, c] = E(null), d = ai(
3945
3953
  a,
3946
3954
  n,
3947
3955
  aa(o),
3948
3956
  l ? sa(l) : null
3949
- ), [u, p] = A(!1), f = (b) => {
3957
+ ), [u, p] = E(!1), f = (b) => {
3950
3958
  r({
3951
3959
  scheduleExpr: kn(b),
3952
3960
  timezone: n
@@ -3958,7 +3966,7 @@ function sd({
3958
3966
  f({ ...a, hour: b, minute: C });
3959
3967
  }, D = (b) => {
3960
3968
  f({ ...a, weekdays: b });
3961
- }, S = `${String(a.hour).padStart(2, "0")}:${String(a.minute).padStart(2, "0")}`, N = O(() => od(), []);
3969
+ }, A = `${String(a.hour).padStart(2, "0")}:${String(a.minute).padStart(2, "0")}`, N = O(() => od(), []);
3962
3970
  return /* @__PURE__ */ s("div", { className: "space-y-2", children: [
3963
3971
  /* @__PURE__ */ s("div", { className: "flex items-center justify-between gap-3", children: [
3964
3972
  /* @__PURE__ */ t("span", { className: Z, children: "When" }),
@@ -3989,7 +3997,7 @@ function sd({
3989
3997
  /* @__PURE__ */ s(
3990
3998
  Qe,
3991
3999
  {
3992
- value: S,
4000
+ value: A,
3993
4001
  onValueChange: (b) => {
3994
4002
  const [C, x] = b.split(":").map((w) => parseInt(w, 10));
3995
4003
  g(C, x);
@@ -4189,7 +4197,7 @@ function oa({
4189
4197
  onChange: l,
4190
4198
  renderLabel: c
4191
4199
  }) {
4192
- const [d, u] = A(!1), p = c(e), f = !e;
4200
+ const [d, u] = E(!1), p = c(e), f = !e;
4193
4201
  return /* @__PURE__ */ s(Re, { open: d, onOpenChange: u, children: [
4194
4202
  /* @__PURE__ */ t(tt, { asChild: !0, children: /* @__PURE__ */ s(
4195
4203
  "button",
@@ -4255,7 +4263,7 @@ function dd({
4255
4263
  sourceDetail: r,
4256
4264
  onChange: a
4257
4265
  }) {
4258
- const [o, i] = A(!1), l = Ee(null), c = n.source.type === "dashboard" ? n.source : null, d = c !== null;
4266
+ const [o, i] = E(!1), l = Ie(null), c = n.source.type === "dashboard" ? n.source : null, d = c !== null;
4259
4267
  ue(() => {
4260
4268
  if (!o) return;
4261
4269
  const N = (b) => {
@@ -4264,7 +4272,7 @@ function dd({
4264
4272
  };
4265
4273
  return document.addEventListener("mousedown", N), () => document.removeEventListener("mousedown", N);
4266
4274
  }, [o]);
4267
- const u = e.type === "project", p = n.source.type === "dashboard" ? n.label ?? "This dashboard" : "This dashboard", f = n.source.type === "dashboard" ? n.detail ?? r ?? null : r, h = "This project", g = "Use any data in this project.", D = u ? h : p, S = u ? g : f;
4275
+ const u = e.type === "project", p = n.source.type === "dashboard" ? n.label ?? "This dashboard" : "This dashboard", f = n.source.type === "dashboard" ? n.detail ?? r ?? null : r, h = "This project", g = "Use any data in this project.", D = u ? h : p, A = u ? g : f;
4268
4276
  return d ? /* @__PURE__ */ s("div", { className: "relative", children: [
4269
4277
  /* @__PURE__ */ s(
4270
4278
  "button",
@@ -4278,9 +4286,9 @@ function dd({
4278
4286
  /* @__PURE__ */ s("div", { className: "flex min-w-0 items-center gap-2 text-[12px]", children: [
4279
4287
  /* @__PURE__ */ t(gt, { className: "h-3 w-3 shrink-0 text-muted-foreground/70" }),
4280
4288
  /* @__PURE__ */ t("span", { className: "text-foreground", children: D }),
4281
- S ? /* @__PURE__ */ s(se, { children: [
4289
+ A ? /* @__PURE__ */ s(se, { children: [
4282
4290
  /* @__PURE__ */ t("span", { className: "text-muted-foreground/70", "aria-hidden": !0, children: "·" }),
4283
- /* @__PURE__ */ t("span", { className: "truncate text-muted-foreground/70", children: S })
4291
+ /* @__PURE__ */ t("span", { className: "truncate text-muted-foreground/70", children: A })
4284
4292
  ] }) : null
4285
4293
  ] }),
4286
4294
  /* @__PURE__ */ s("span", { className: "inline-flex shrink-0 items-center gap-1 text-[11px] text-muted-foreground group-hover:text-foreground", children: [
@@ -4338,7 +4346,7 @@ function dd({
4338
4346
  /* @__PURE__ */ t(gt, { className: "h-3 w-3 text-muted-foreground/70" }),
4339
4347
  /* @__PURE__ */ t("span", { className: "text-foreground", children: D })
4340
4348
  ] }),
4341
- S ? /* @__PURE__ */ t("div", { className: "mt-0.5 pl-5 text-[11px] text-muted-foreground", children: S }) : null
4349
+ A ? /* @__PURE__ */ t("div", { className: "mt-0.5 pl-5 text-[11px] text-muted-foreground", children: A }) : null
4342
4350
  ] });
4343
4351
  }
4344
4352
  function ia({
@@ -4395,13 +4403,13 @@ function cd({
4395
4403
  disabled: l,
4396
4404
  className: c
4397
4405
  }) {
4398
- const d = Ee(null), [u, p] = A(!1), [f, h] = A(""), g = O(
4406
+ const d = Ie(null), [u, p] = E(!1), [f, h] = E(""), g = O(
4399
4407
  () => e.find((b) => b.id === n) ?? null,
4400
4408
  [e, n]
4401
4409
  ), D = O(() => {
4402
4410
  const b = f.trim().toLowerCase();
4403
4411
  return b ? e.filter((C) => C.name.toLowerCase().includes(b)) : e;
4404
- }, [e, f]), S = a === "dm", N = l || S;
4412
+ }, [e, f]), A = a === "dm", N = l || A;
4405
4413
  return /* @__PURE__ */ t("div", { className: v("relative", c), children: /* @__PURE__ */ s(Re, { open: u && !N, onOpenChange: p, children: [
4406
4414
  /* @__PURE__ */ t(Na, { asChild: !0, children: /* @__PURE__ */ s(
4407
4415
  "div",
@@ -4468,7 +4476,7 @@ function cd({
4468
4476
  className: "h-6 min-w-[140px] flex-1 bg-transparent text-[12px] text-foreground outline-none placeholder:text-muted-foreground/70 disabled:cursor-not-allowed",
4469
4477
  value: f,
4470
4478
  disabled: N,
4471
- placeholder: S ? "DM delivery coming in V2" : g ? "Change channel…" : i ? "Loading channels…" : "Search channels…",
4479
+ placeholder: A ? "DM delivery coming in V2" : g ? "Change channel…" : i ? "Loading channels…" : "Search channels…",
4472
4480
  onChange: (b) => {
4473
4481
  h(b.target.value), p(!0);
4474
4482
  },
@@ -4502,7 +4510,7 @@ function cd({
4502
4510
  C ? "bg-muted text-foreground" : "text-foreground/85 hover:bg-muted/60"
4503
4511
  ),
4504
4512
  children: [
4505
- b.isPrivate ? /* @__PURE__ */ t(Oa, { className: "h-3 w-3 shrink-0 text-muted-foreground" }) : /* @__PURE__ */ t(qn, { className: "h-3 w-3 shrink-0 text-muted-foreground" }),
4513
+ b.isPrivate ? /* @__PURE__ */ t(Oa, { className: "h-3 w-3 shrink-0 text-muted-foreground" }) : /* @__PURE__ */ t(Kn, { className: "h-3 w-3 shrink-0 text-muted-foreground" }),
4506
4514
  /* @__PURE__ */ t("span", { className: "truncate", children: b.name }),
4507
4515
  typeof b.memberCount == "number" ? /* @__PURE__ */ s("span", { className: "ml-auto text-[11px] text-muted-foreground", children: [
4508
4516
  b.memberCount,
@@ -4521,7 +4529,7 @@ function ud({
4521
4529
  onRemove: n
4522
4530
  }) {
4523
4531
  return /* @__PURE__ */ s("span", { className: "inline-flex h-6 max-w-full items-center gap-1.5 rounded-control border border-border bg-muted pl-1.5 pr-1 text-[12px]", children: [
4524
- /* @__PURE__ */ t("span", { className: "shrink-0 text-muted-foreground", children: e.isPrivate ? /* @__PURE__ */ t(Oa, { className: "h-3 w-3" }) : /* @__PURE__ */ t(qn, { className: "h-3 w-3" }) }),
4532
+ /* @__PURE__ */ t("span", { className: "shrink-0 text-muted-foreground", children: e.isPrivate ? /* @__PURE__ */ t(Oa, { className: "h-3 w-3" }) : /* @__PURE__ */ t(Kn, { className: "h-3 w-3" }) }),
4525
4533
  /* @__PURE__ */ t("span", { className: "min-w-0 truncate text-foreground", children: e.name }),
4526
4534
  typeof e.memberCount == "number" ? /* @__PURE__ */ s("span", { className: "shrink-0 text-muted-foreground", children: [
4527
4535
  "· ",
@@ -4559,7 +4567,7 @@ function bs(e) {
4559
4567
  const n = O(
4560
4568
  () => e ? new Date(e).getTime() : null,
4561
4569
  [e]
4562
- ), [r, a] = A(() => Date.now());
4570
+ ), [r, a] = E(() => Date.now());
4563
4571
  return ue(() => {
4564
4572
  if (n === null) return;
4565
4573
  a(Date.now());
@@ -4818,7 +4826,7 @@ function xd(e) {
4818
4826
  return e.status === "SENT" ? Y.success.surface : e.status === "FAILED" || e.status === "PARTIAL" ? Y.danger.surface : Y.warning.surface;
4819
4827
  }
4820
4828
  function vs(e) {
4821
- return e.status === "SUCCESS" ? /* @__PURE__ */ t(He, { className: v("h-3 w-3", Y.success.icon) }) : e.status === "FAILED" ? /* @__PURE__ */ t(Ce, { className: v("h-3 w-3", Y.danger.icon) }) : e.status === "RUNNING" ? /* @__PURE__ */ t(ne, { className: "h-3 w-3 animate-spin text-muted-foreground" }) : /* @__PURE__ */ t("span", { className: "inline-block h-1.5 w-1.5 rounded-full bg-muted-foreground/70" });
4829
+ return e.status === "SUCCESS" ? /* @__PURE__ */ t(qe, { className: v("h-3 w-3", Y.success.icon) }) : e.status === "FAILED" ? /* @__PURE__ */ t(Ce, { className: v("h-3 w-3", Y.danger.icon) }) : e.status === "RUNNING" ? /* @__PURE__ */ t(ne, { className: "h-3 w-3 animate-spin text-muted-foreground" }) : /* @__PURE__ */ t("span", { className: "inline-block h-1.5 w-1.5 rounded-full bg-muted-foreground/70" });
4822
4830
  }
4823
4831
  const yd = [
4824
4832
  { pattern: /^plan preview/i, label: "Plan preview" },
@@ -4988,7 +4996,7 @@ function Ns({
4988
4996
  {
4989
4997
  className: "flex items-start gap-2 text-[11px] leading-[1.45] text-muted-foreground",
4990
4998
  children: [
4991
- /* @__PURE__ */ t(He, { className: "mt-0.5 h-3 w-3 shrink-0 text-border" }),
4999
+ /* @__PURE__ */ t(qe, { className: "mt-0.5 h-3 w-3 shrink-0 text-border" }),
4992
5000
  /* @__PURE__ */ t("span", { children: ks(d.label) })
4993
5001
  ]
4994
5002
  },
@@ -5008,7 +5016,7 @@ function ws({
5008
5016
  onDeleteRun: o,
5009
5017
  deletePending: i
5010
5018
  }) {
5011
- const [l, c] = A(!1), [d, u] = A(!1), p = Cs(
5019
+ const [l, c] = E(!1), [d, u] = E(!1), p = Cs(
5012
5020
  e.completedAt ?? e.startedAt ?? e.scheduledFor
5013
5021
  ), h = (e.error ? /cancel/i.test(e.error) : !1) ? "Run cancelled" : "Run failed";
5014
5022
  return /* @__PURE__ */ s(
@@ -5134,7 +5142,7 @@ function Cd({ run: e }) {
5134
5142
  "aria-label": "Email delivery status",
5135
5143
  children: [
5136
5144
  /* @__PURE__ */ s("div", { className: "flex items-center gap-2 font-medium", children: [
5137
- /* @__PURE__ */ t(Li, { className: "h-3.5 w-3.5 shrink-0" }),
5145
+ /* @__PURE__ */ t(Ti, { className: "h-3.5 w-3.5 shrink-0" }),
5138
5146
  /* @__PURE__ */ t("span", { children: bd(n) })
5139
5147
  ] }),
5140
5148
  n.message ? /* @__PURE__ */ t("p", { className: "mt-1 text-[11px] leading-[1.5] opacity-80", children: n.message }) : null,
@@ -5255,7 +5263,7 @@ function ma({ run: e }) {
5255
5263
  {
5256
5264
  className: "flex items-start gap-2 text-[11px] leading-[1.45] text-muted-foreground",
5257
5265
  children: l ? /* @__PURE__ */ s(se, { children: [
5258
- /* @__PURE__ */ t(He, { className: "mt-0.5 h-3 w-3 shrink-0 text-border" }),
5266
+ /* @__PURE__ */ t(qe, { className: "mt-0.5 h-3 w-3 shrink-0 text-border" }),
5259
5267
  /* @__PURE__ */ t("span", { children: ks(l.label) })
5260
5268
  ] }) : /* @__PURE__ */ s(se, { children: [
5261
5269
  /* @__PURE__ */ t("span", { className: "mt-1.5 inline-block h-px w-3 shrink-0 bg-border" }),
@@ -5363,7 +5371,7 @@ function Dd({
5363
5371
  i ? Y.success.iconBg : Y.danger.iconBg
5364
5372
  ),
5365
5373
  children: i ? /* @__PURE__ */ t(
5366
- He,
5374
+ qe,
5367
5375
  {
5368
5376
  className: v(
5369
5377
  "h-3 w-3",
@@ -5424,10 +5432,10 @@ function Ld({
5424
5432
  onMinimizeRun: i,
5425
5433
  detailsVisible: l
5426
5434
  }) {
5427
- var S, N, b, C;
5435
+ var A, N, b, C;
5428
5436
  const c = n && it(n.status) ? n : null, d = r;
5429
5437
  let u = null, p = null, f = !1;
5430
- if (e === "plan" ? (u = "Reviewing your brief", p = "Reading the brief and planning the analysis…") : e === "preview" ? (u = "Starting preview run", p = "Starting the preview…") : e === "run" ? (u = "Starting briefing run", p = "Preparing the run…") : c ? (u = (S = c.progress) != null && S.label ? zt(c.progress.label) : "Running preview", p = ((N = c.progress) == null ? void 0 : N.detail) ?? null, f = !!c.progress) : d && (u = (b = d.progress) != null && b.label ? zt(d.progress.label) : "Running", p = ((C = d.progress) == null ? void 0 : C.detail) ?? null, f = !!d.progress), !u)
5438
+ if (e === "plan" ? (u = "Reviewing your brief", p = "Reading the brief and planning the analysis…") : e === "preview" ? (u = "Starting preview run", p = "Starting the preview…") : e === "run" ? (u = "Starting briefing run", p = "Preparing the run…") : c ? (u = (A = c.progress) != null && A.label ? zt(c.progress.label) : "Running preview", p = ((N = c.progress) == null ? void 0 : N.detail) ?? null, f = !!c.progress) : d && (u = (b = d.progress) != null && b.label ? zt(d.progress.label) : "Running", p = ((C = d.progress) == null ? void 0 : C.detail) ?? null, f = !!d.progress), !u)
5431
5439
  return null;
5432
5440
  const h = !l && p, g = d ?? c, D = !!(d && i) && e !== "cancelRun";
5433
5441
  return /* @__PURE__ */ t(
@@ -5524,7 +5532,7 @@ function As({
5524
5532
  function Fd({
5525
5533
  recipient: e
5526
5534
  }) {
5527
- const [n, r] = A(!1), a = e.previewMembers ?? [];
5535
+ const [n, r] = E(!1), a = e.previewMembers ?? [];
5528
5536
  return e.type === "group" && a.length > 0 ? /* @__PURE__ */ s("div", { className: "relative inline-flex", children: [
5529
5537
  /* @__PURE__ */ s(
5530
5538
  "button",
@@ -5626,7 +5634,7 @@ function Zn({
5626
5634
  onExpand: n
5627
5635
  }) {
5628
5636
  var i;
5629
- const [r, a] = A("rendered"), o = !!((i = e.bodyHtml) != null && i.trim());
5637
+ const [r, a] = E("rendered"), o = !!((i = e.bodyHtml) != null && i.trim());
5630
5638
  return /* @__PURE__ */ s("article", { className: "overflow-hidden rounded-card border border-border bg-background", children: [
5631
5639
  /* @__PURE__ */ s("header", { className: "flex items-start justify-between gap-3 border-b border-border/60 px-4 py-3", children: [
5632
5640
  /* @__PURE__ */ s("div", { className: "min-w-0 flex-1", children: [
@@ -5748,7 +5756,7 @@ function vn({ size: e = 6 }) {
5748
5756
  function Od({ channel: e }) {
5749
5757
  const r = /^[CDG][A-Z0-9]{6,}$/.test(e) ? e : e.startsWith("#") ? e.slice(1) : e;
5750
5758
  return /* @__PURE__ */ s("span", { className: "inline-flex items-center gap-1 text-[11px] text-muted-foreground", children: [
5751
- /* @__PURE__ */ t(qn, { className: "h-3 w-3" }),
5759
+ /* @__PURE__ */ t(Kn, { className: "h-3 w-3" }),
5752
5760
  /* @__PURE__ */ t("span", { className: "truncate", children: r })
5753
5761
  ] });
5754
5762
  }
@@ -5758,7 +5766,7 @@ function Vd({
5758
5766
  trustLine: r,
5759
5767
  reactions: a
5760
5768
  }) {
5761
- const o = Bd(e.blocks), i = o.header ? dt(o.header.text) : null, l = o.context ? Pd(o.context) : null, c = o.sections.map((f) => dt(f.text)).filter((f) => !!f), d = o.actions ? Md([o.actions]) : [], [u, p] = A(!0);
5769
+ const o = Bd(e.blocks), i = o.header ? dt(o.header.text) : null, l = o.context ? Pd(o.context) : null, c = o.sections.map((f) => dt(f.text)).filter((f) => !!f), d = o.actions ? Md([o.actions]) : [], [u, p] = E(!0);
5762
5770
  return /* @__PURE__ */ s("article", { className: "overflow-hidden rounded-card border border-border bg-background", children: [
5763
5771
  /* @__PURE__ */ s("header", { className: "flex items-center justify-between gap-3 border-b border-border/60 px-4 py-3", children: [
5764
5772
  /* @__PURE__ */ s("div", { className: "flex min-w-0 items-center gap-2", children: [
@@ -5893,7 +5901,7 @@ function Ud({
5893
5901
  detail: r,
5894
5902
  optional: a
5895
5903
  }) {
5896
- const [o, i] = A(!1);
5904
+ const [o, i] = E(!1);
5897
5905
  return /* @__PURE__ */ s("li", { className: "flex items-start gap-3", children: [
5898
5906
  /* @__PURE__ */ t(
5899
5907
  "span",
@@ -6073,7 +6081,7 @@ function _d({
6073
6081
  return /* @__PURE__ */ t("div", { className: v("rounded-card border px-3 py-2", Y.success.surface), children: /* @__PURE__ */ s("div", { className: "flex items-start justify-between gap-3", children: [
6074
6082
  /* @__PURE__ */ s("div", { className: "min-w-0", children: [
6075
6083
  /* @__PURE__ */ s("div", { className: v("flex items-center gap-1.5 text-[11px] font-medium", Y.success.label), children: [
6076
- /* @__PURE__ */ t(He, { className: "h-3 w-3 shrink-0" }),
6084
+ /* @__PURE__ */ t(qe, { className: "h-3 w-3 shrink-0" }),
6077
6085
  /* @__PURE__ */ t("span", { children: "Preview output available" })
6078
6086
  ] }),
6079
6087
  /* @__PURE__ */ t("div", { className: "mt-1 truncate text-[12px] text-foreground/80", children: a }),
@@ -6115,11 +6123,11 @@ const zd = {
6115
6123
  runBriefingPreview: pl,
6116
6124
  getBriefingPreviewRun: fl,
6117
6125
  polishBriefingText: xl
6118
- }, fa = 2e3, Hd = 10 * 6e4, Kd = 20 * 6e4;
6119
- function qd() {
6126
+ }, fa = 2e3, qd = 10 * 6e4, Hd = 20 * 6e4;
6127
+ function Kd() {
6120
6128
  return typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : `briefing-run-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
6121
6129
  }
6122
- function Ae(e) {
6130
+ function Ee(e) {
6123
6131
  return e instanceof Error && e.message ? e.message : "Something went wrong. Please try again.";
6124
6132
  }
6125
6133
  function Wd(e, n) {
@@ -6187,7 +6195,7 @@ function Qd({
6187
6195
  title: o = "Briefing",
6188
6196
  className: i,
6189
6197
  client: l,
6190
- generateRequestId: c = qd,
6198
+ generateRequestId: c = Kd,
6191
6199
  onSaved: d,
6192
6200
  onDeleted: u,
6193
6201
  onRunStarted: p,
@@ -6196,48 +6204,48 @@ function Qd({
6196
6204
  onMinimizeRun: g
6197
6205
  }) {
6198
6206
  var Cr, kr, Sr, Ar, Er, Ir, Dr, Tr, Lr;
6199
- const { authToken: D, tokenProps: S } = It(), N = ((kr = (Cr = S.config) == null ? void 0 : Cr.projectFeatures) == null ? void 0 : kr.features.aiWritingHelpers) !== !1, { currentUser: b } = Ma(), C = K((m) => m.dashboard), x = K((m) => m.theme), w = K((m) => m.selectedSheetId), T = K((m) => m.filterValues), V = K((m) => m.controlValues), R = K(
6207
+ const { authToken: D, tokenProps: A } = It(), N = ((kr = (Cr = A.config) == null ? void 0 : Cr.projectFeatures) == null ? void 0 : kr.features.aiWritingHelpers) !== !1, { currentUser: b } = Ma(), C = H((m) => m.dashboard), x = H((m) => m.theme), w = H((m) => m.selectedSheetId), T = H((m) => m.filterValues), $ = H((m) => m.controlValues), S = H(
6200
6208
  (m) => m.semanticExecutionPayload
6201
- ), I = K(
6209
+ ), R = H(
6202
6210
  (m) => m.cardControlValuesMap
6203
- ), P = K(
6211
+ ), U = H(
6204
6212
  (m) => m.inlineFilterValuesMap
6205
- ), j = K(
6213
+ ), z = H(
6206
6214
  (m) => m.dashboardInputValues
6207
- ), _ = po((m) => m.interactionStates), z = e ?? (S == null ? void 0 : S.apiServiceUrl), U = n ?? (D == null ? void 0 : D.accessToken), M = O(() => ({ ...zd, ...l }), [l]), H = O(
6215
+ ), B = po((m) => m.interactionStates), j = e ?? (A == null ? void 0 : A.apiServiceUrl), _ = n ?? (D == null ? void 0 : D.accessToken), M = O(() => ({ ...zd, ...l }), [l]), W = O(
6208
6216
  () => Is(r, a),
6209
6217
  [r, a]
6210
6218
  ), le = O(
6211
6219
  () => md(b),
6212
6220
  [b]
6213
- ), [L, G] = A(
6221
+ ), [L, G] = E(
6214
6222
  r ?? null
6215
- ), [k, xe] = A(
6223
+ ), [k, xe] = E(
6216
6224
  () => ga({
6217
6225
  briefing: r,
6218
- sourceContext: H,
6226
+ sourceContext: W,
6219
6227
  defaultRecipient: le
6220
6228
  })
6221
- ), [de, re] = A(null), [ke, De] = A([]), [me, q] = A(null), [lt, Te] = A(null), [Ke, Pe] = A(
6229
+ ), [de, re] = E(null), [Se, De] = E([]), [me, q] = E(null), [lt, Te] = E(null), [He, Pe] = E(
6222
6230
  null
6223
- ), [W, Me] = A(null), [$, ee] = A(0), [Tt, xt] = A(null), [E, B] = A(!1), [Se, X] = A("edit"), [qe, We] = A(0), [qt, Ls] = A(!1), [Rs, Wt] = A("EMAIL"), [Fs, Gt] = A(!1), [er, Jt] = A(null), [Ps, Qt] = A(!1), [ce, Ms] = A(
6231
+ ), [K, Me] = E(null), [V, ee] = E(0), [Tt, xt] = E(null), [I, P] = E(!1), [Ae, X] = E("edit"), [Ke, We] = E(0), [Kt, Ls] = E(!1), [Rs, Wt] = E("EMAIL"), [Fs, Gt] = E(!1), [er, Jt] = E(null), [Ps, Qt] = E(!1), [ce, Ms] = E(
6224
6232
  null
6225
- ), [Yt, tr] = A([]), [Lt, nr] = A(!1), [rr, ar] = A(null), [Bs, Os] = A(0), [rt, Rt] = A(null), [Vs, Xt] = A(!1), [Zt, sr] = A(!1), [or, ir] = A(null), [yt, en] = A(null);
6233
+ ), [Yt, tr] = E([]), [Lt, nr] = E(!1), [rr, ar] = E(null), [Bs, Os] = E(0), [rt, Rt] = E(null), [Vs, Xt] = E(!1), [Zt, sr] = E(!1), [or, ir] = E(null), [yt, en] = E(null);
6226
6234
  ue(() => {
6227
6235
  if (!yt) return;
6228
6236
  const m = window.setTimeout(() => en(null), 12e3);
6229
6237
  return () => window.clearTimeout(m);
6230
6238
  }, [yt]);
6231
- const lr = Ee(void 0), {
6239
+ const lr = Ie(void 0), {
6232
6240
  activeRunId: $s,
6233
6241
  resetTerminalRun: dr,
6234
6242
  startRun: tn,
6235
6243
  stop: nn
6236
6244
  } = Ln({
6237
- apiServiceUrl: z,
6238
- token: U,
6245
+ apiServiceUrl: j,
6246
+ token: _,
6239
6247
  intervalMs: fa,
6240
- timeoutMs: Kd,
6248
+ timeoutMs: Hd,
6241
6249
  fetchRun: ({ apiServiceUrl: m, token: y, runId: F }) => {
6242
6250
  if (!(L != null && L.id))
6243
6251
  throw new Error("Missing saved Briefing id for run polling.");
@@ -6255,7 +6263,7 @@ function Qd({
6255
6263
  X("result"), q(null);
6256
6264
  },
6257
6265
  onError: (m) => {
6258
- q(`Unable to refresh briefing run status: ${Ae(m)}`);
6266
+ q(`Unable to refresh briefing run status: ${Ee(m)}`);
6259
6267
  },
6260
6268
  onTimeout: () => {
6261
6269
  q(
@@ -6267,23 +6275,23 @@ function Qd({
6267
6275
  startRun: _s,
6268
6276
  stop: cr
6269
6277
  } = Ln({
6270
- apiServiceUrl: z,
6271
- token: U,
6278
+ apiServiceUrl: j,
6279
+ token: _,
6272
6280
  intervalMs: fa,
6273
- timeoutMs: Hd,
6281
+ timeoutMs: qd,
6274
6282
  fetchRun: ({ apiServiceUrl: m, token: y, runId: F }) => M.getBriefingPreviewRun(
6275
6283
  m,
6276
6284
  y,
6277
6285
  F
6278
6286
  ),
6279
6287
  onRun: (m) => {
6280
- Me(m), m.status === "SUCCESS" && xt((y) => y ?? $);
6288
+ Me(m), m.status === "SUCCESS" && xt((y) => y ?? V);
6281
6289
  },
6282
6290
  onTerminalRun: (m) => {
6283
6291
  m.status === "FAILED" ? q(m.error || "Briefing preview failed.") : (q(null), X("result"));
6284
6292
  },
6285
6293
  onError: (m) => {
6286
- q(`Unable to refresh briefing preview status: ${Ae(m)}`);
6294
+ q(`Unable to refresh briefing preview status: ${Ee(m)}`);
6287
6295
  },
6288
6296
  onTimeout: (m) => {
6289
6297
  Me(
@@ -6295,35 +6303,35 @@ function Qd({
6295
6303
  } : y
6296
6304
  ), q("Briefing preview status refresh timed out.");
6297
6305
  }
6298
- }), oe = !!(L != null && L.id), rn = (L == null ? void 0 : L.status) === "PAUSED" || k.schedule.status === "PAUSED", js = oe && !!(L != null && L.scheduleExpr || k.schedule.enabled), at = lt ?? (L == null ? void 0 : L.latestRun) ?? null, ve = at && it(at.status) && $s === at.id ? at : null, we = at && gs(at.status) ? at : null, Ne = Se === "result" && ((W == null ? void 0 : W.status) === "SUCCESS" || we) ? "result" : Se === "plan" && Ke ? "plan" : "edit", zs = H.detail ?? (k.source.type === "dashboard" ? (
6306
+ }), oe = !!(L != null && L.id), rn = (L == null ? void 0 : L.status) === "PAUSED" || k.schedule.status === "PAUSED", js = oe && !!(L != null && L.scheduleExpr || k.schedule.enabled), at = lt ?? (L == null ? void 0 : L.latestRun) ?? null, ve = at && it(at.status) && $s === at.id ? at : null, we = at && gs(at.status) ? at : null, Ne = Ae === "result" && ((K == null ? void 0 : K.status) === "SUCCESS" || we) ? "result" : Ae === "plan" && He ? "plan" : "edit", zs = W.detail ?? (k.source.type === "dashboard" ? (
6299
6307
  // Prefer the dashboard's actual title from the store; never expose
6300
6308
  // the raw ID to end users.
6301
6309
  (C == null ? void 0 : C.title) ?? null
6302
- ) : "All project data available to this token"), ur = (L == null ? void 0 : L.status) ?? k.schedule.status, an = W !== null && it(W.status) && Us === W.id || ve !== null, Ge = de !== null || an, Hs = Ne === "edit" && we !== null && !an, sn = (W == null ? void 0 : W.status) === "SUCCESS" && W.result ? W : null, Ks = sn !== null && Tt !== null && Tt !== $, vt = er === "preview" ? W : null, Be = er === "saved" ? we : null, Nt = Be ? xs(Be) : null, qs = ((Sr = vt == null ? void 0 : vt.result) == null ? void 0 : Sr.title) ?? (Nt == null ? void 0 : Nt.subject) ?? (ie(Be == null ? void 0 : Be.result) && typeof Be.result.title == "string" ? Be.result.title : null) ?? (L == null ? void 0 : L.name) ?? "Briefing preview", Ft = O(
6310
+ ) : "All project data available to this token"), ur = (L == null ? void 0 : L.status) ?? k.schedule.status, an = K !== null && it(K.status) && Us === K.id || ve !== null, Ge = de !== null || an, qs = Ne === "edit" && we !== null && !an, sn = (K == null ? void 0 : K.status) === "SUCCESS" && K.result ? K : null, Hs = sn !== null && Tt !== null && Tt !== V, vt = er === "preview" ? K : null, Be = er === "saved" ? we : null, Nt = Be ? xs(Be) : null, Ks = ((Sr = vt == null ? void 0 : vt.result) == null ? void 0 : Sr.title) ?? (Nt == null ? void 0 : Nt.subject) ?? (ie(Be == null ? void 0 : Be.result) && typeof Be.result.title == "string" ? Be.result.title : null) ?? (L == null ? void 0 : L.name) ?? "Briefing preview", Ft = O(
6303
6311
  () => ({
6304
6312
  dashboard: C,
6305
6313
  theme: x || "light",
6306
6314
  filters: C == null ? void 0 : C.filters,
6307
6315
  selectedSheetId: w,
6308
6316
  filterValues: T,
6309
- inlineFilterValuesMap: P,
6310
- controlValues: V,
6317
+ inlineFilterValuesMap: U,
6318
+ controlValues: $,
6311
6319
  controlDefinitions: (C == null ? void 0 : C.controls) || [],
6312
6320
  dashboardControls: (C == null ? void 0 : C.controls) || [],
6313
- cardControlValuesMap: I,
6314
- dashboardInputValues: j,
6315
- semanticExecutionPayload: R,
6316
- interactionStates: _
6321
+ cardControlValuesMap: R,
6322
+ dashboardInputValues: z,
6323
+ semanticExecutionPayload: S,
6324
+ interactionStates: B
6317
6325
  }),
6318
6326
  [
6319
- I,
6320
- V,
6327
+ R,
6328
+ $,
6321
6329
  C,
6322
- j,
6330
+ z,
6323
6331
  T,
6324
- _,
6325
- P,
6326
- R,
6332
+ B,
6333
+ U,
6334
+ S,
6327
6335
  w,
6328
6336
  x
6329
6337
  ]
@@ -6335,7 +6343,7 @@ function Qd({
6335
6343
  lr.current = m, dr(), nn(), cr(), G(r ?? null);
6336
6344
  let y = ga({
6337
6345
  briefing: r,
6338
- sourceContext: H,
6346
+ sourceContext: W,
6339
6347
  defaultRecipient: le
6340
6348
  }), F = null;
6341
6349
  if (!r) {
@@ -6349,7 +6357,7 @@ function Qd({
6349
6357
  y = Tn(
6350
6358
  y,
6351
6359
  Ue.draft(y.source, {
6352
- attachments: Ue.seedsDashboardAttachment ? Hr({
6360
+ attachments: Ue.seedsDashboardAttachment ? qr({
6353
6361
  source: y.source,
6354
6362
  dashboard: C,
6355
6363
  selectedSheetId: w,
@@ -6368,7 +6376,7 @@ function Qd({
6368
6376
  C,
6369
6377
  le,
6370
6378
  dr,
6371
- H,
6379
+ W,
6372
6380
  w,
6373
6381
  tn,
6374
6382
  cr,
@@ -6380,18 +6388,18 @@ function Qd({
6380
6388
  recipients: Mt
6381
6389
  }), ln = Oe && !on ? "SLACK" : on && !Oe ? "EMAIL" : Rs, dn = ln === "EMAIL" ? "SLACK" : "EMAIL";
6382
6390
  ue(() => {
6383
- if (!z || !U || !Oe)
6391
+ if (!j || !_ || !Oe)
6384
6392
  return;
6385
6393
  let m = !1;
6386
6394
  return nr(!0), ar(null), Promise.all([
6387
6395
  Nn(
6388
- z,
6389
- U,
6396
+ j,
6397
+ _,
6390
6398
  "/v1/integrations/SLACK/status"
6391
6399
  ),
6392
6400
  Nn(
6393
- z,
6394
- U,
6401
+ j,
6402
+ _,
6395
6403
  "/v1/integrations/slack/channels"
6396
6404
  ).catch((y) => {
6397
6405
  if (y instanceof Error && /not configured/i.test(y.message))
@@ -6401,7 +6409,7 @@ function Qd({
6401
6409
  ]).then(([y, F]) => {
6402
6410
  m || (Ms(y), tr(F.channels));
6403
6411
  }).catch((y) => {
6404
- m || (ar(Ae(y)), tr([]));
6412
+ m || (ar(Ee(y)), tr([]));
6405
6413
  }).finally(() => {
6406
6414
  m || nr(!1);
6407
6415
  }), () => {
@@ -6409,11 +6417,11 @@ function Qd({
6409
6417
  };
6410
6418
  }, [
6411
6419
  Oe,
6412
- z,
6413
- U,
6420
+ j,
6421
+ _,
6414
6422
  Bs
6415
6423
  ]), ue(() => {
6416
- if (!z || !U || !Oe) {
6424
+ if (!j || !_ || !Oe) {
6417
6425
  Rt(null);
6418
6426
  return;
6419
6427
  }
@@ -6423,8 +6431,8 @@ function Qd({
6423
6431
  }
6424
6432
  let m = !1;
6425
6433
  return Nn(
6426
- z,
6427
- U,
6434
+ j,
6435
+ _,
6428
6436
  "/v1/integrations/slack/mention-status",
6429
6437
  {
6430
6438
  method: "POST",
@@ -6441,15 +6449,15 @@ function Qd({
6441
6449
  }, [
6442
6450
  Oe,
6443
6451
  hr,
6444
- z,
6445
- U,
6452
+ j,
6453
+ _,
6446
6454
  ce == null ? void 0 : ce.installed,
6447
6455
  pr
6448
6456
  ]);
6449
6457
  const ae = (m) => {
6450
6458
  xe((y) => Tn(y, m)), De([]), q(null), L != null && L.id || (Pe(null), ee((y) => y + 1), X("edit"));
6451
- }, $e = () => !z || !U ? (q("Missing Semaphor API credentials."), null) : { apiServiceUrl: z, token: U }, Ws = async (m) => {
6452
- const y = qr(k);
6459
+ }, $e = () => !j || !_ ? (q("Missing Semaphor API credentials."), null) : { apiServiceUrl: j, token: _ }, Ws = async (m) => {
6460
+ const y = Kr(k);
6453
6461
  if (De(y.issues), q(null), !y.valid)
6454
6462
  return null;
6455
6463
  const F = $e();
@@ -6465,17 +6473,17 @@ function Qd({
6465
6473
  ) : await M.createBriefing(
6466
6474
  F.apiServiceUrl,
6467
6475
  F.token,
6468
- Kr(k)
6476
+ Hr(k)
6469
6477
  );
6470
6478
  return G(Q.briefing), xe(St(Q.briefing)), d == null || d(Q.briefing), Q.briefing;
6471
6479
  } catch (Q) {
6472
- return q(Ae(Q)), null;
6480
+ return q(Ee(Q)), null;
6473
6481
  } finally {
6474
6482
  m != null && m.pendingAction && re(null);
6475
6483
  }
6476
6484
  }, Gs = async () => Ws({ pendingAction: "save" }), fr = () => {
6477
- const m = qr(k);
6478
- return De(m.issues), q(null), m.valid ? Kr(k) : null;
6485
+ const m = Kr(k);
6486
+ return De(m.issues), q(null), m.valid ? Hr(k) : null;
6479
6487
  }, gr = async (m) => {
6480
6488
  const y = $e();
6481
6489
  if (!y)
@@ -6492,7 +6500,7 @@ function Qd({
6492
6500
  );
6493
6501
  return Pe(Q.plan), m != null && m.silent || X("plan"), Q.plan;
6494
6502
  } catch (Q) {
6495
- return q(Ae(Q)), null;
6503
+ return q(Ee(Q)), null;
6496
6504
  } finally {
6497
6505
  re(null);
6498
6506
  }
@@ -6503,7 +6511,7 @@ function Qd({
6503
6511
  const y = fr();
6504
6512
  if (y)
6505
6513
  try {
6506
- const F = Ke ?? await gr({ silent: !0 });
6514
+ const F = He ?? await gr({ silent: !0 });
6507
6515
  if (!F)
6508
6516
  return;
6509
6517
  re("preview");
@@ -6516,9 +6524,9 @@ function Qd({
6516
6524
  requestId: c()
6517
6525
  }
6518
6526
  );
6519
- xt($), _s(Q.previewRun);
6527
+ xt(V), _s(Q.previewRun);
6520
6528
  } catch (F) {
6521
- q(Ae(F));
6529
+ q(Ee(F));
6522
6530
  } finally {
6523
6531
  re(null);
6524
6532
  }
@@ -6543,7 +6551,7 @@ function Qd({
6543
6551
  );
6544
6552
  tn(y.run), p == null || p(y);
6545
6553
  } catch (y) {
6546
- q(Ae(y));
6554
+ q(Ee(y));
6547
6555
  } finally {
6548
6556
  re(null);
6549
6557
  }
@@ -6575,7 +6583,7 @@ function Qd({
6575
6583
  );
6576
6584
  nn(), Te(y.run), X("result"), await br().catch(() => null);
6577
6585
  } catch (y) {
6578
- q(Ae(y));
6586
+ q(Ee(y));
6579
6587
  } finally {
6580
6588
  re(null);
6581
6589
  }
@@ -6599,7 +6607,7 @@ function Qd({
6599
6607
  ), Q = k.instruction;
6600
6608
  ae({ instruction: F }), en({ previousText: Q });
6601
6609
  } catch (F) {
6602
- ir(Ae(F));
6610
+ ir(Ee(F));
6603
6611
  } finally {
6604
6612
  sr(!1);
6605
6613
  }
@@ -6622,7 +6630,7 @@ function Qd({
6622
6630
  const F = await br().catch(() => null), Q = (F == null ? void 0 : F.latestRun) ?? null;
6623
6631
  Te(Q), Q || X("edit");
6624
6632
  } catch (F) {
6625
- q(Ae(F));
6633
+ q(Ee(F));
6626
6634
  } finally {
6627
6635
  re(null);
6628
6636
  }
@@ -6645,7 +6653,7 @@ function Qd({
6645
6653
  );
6646
6654
  G(F.briefing), xe(St(F.briefing)), d == null || d(F.briefing);
6647
6655
  } catch (F) {
6648
- q(Ae(F));
6656
+ q(Ee(F));
6649
6657
  } finally {
6650
6658
  re(null);
6651
6659
  }
@@ -6827,15 +6835,15 @@ function Qd({
6827
6835
  Ld,
6828
6836
  {
6829
6837
  pendingAction: de,
6830
- previewRun: W,
6838
+ previewRun: K,
6831
6839
  savedActiveRun: ve,
6832
- detailsVisible: qt,
6840
+ detailsVisible: Kt,
6833
6841
  onShowDetails: () => Ls((m) => !m),
6834
6842
  onCancelSavedRun: ve ? Qs : void 0,
6835
6843
  onMinimizeRun: ve && g ? Ys : void 0
6836
6844
  }
6837
6845
  ),
6838
- qt && W && it(W.status) ? /* @__PURE__ */ t(ma, { run: W }) : qt && ve ? /* @__PURE__ */ t(ma, { run: ve }) : null,
6846
+ Kt && K && it(K.status) ? /* @__PURE__ */ t(ma, { run: K }) : Kt && ve ? /* @__PURE__ */ t(ma, { run: ve }) : null,
6839
6847
  /* @__PURE__ */ t("div", { className: "flex-1 space-y-5 overflow-y-auto px-4 py-4", children: Ne === "edit" ? /* @__PURE__ */ s(se, { children: [
6840
6848
  oe ? null : /* @__PURE__ */ s("div", { children: [
6841
6849
  /* @__PURE__ */ t("div", { className: v(Z, "mb-2"), children: "Start from" }),
@@ -6846,7 +6854,7 @@ function Qd({
6846
6854
  onClick: () => {
6847
6855
  We(y), ae(
6848
6856
  m.draft(k.source, {
6849
- attachments: m.seedsDashboardAttachment ? Hr({
6857
+ attachments: m.seedsDashboardAttachment ? qr({
6850
6858
  source: k.source,
6851
6859
  dashboard: C,
6852
6860
  selectedSheetId: w,
@@ -6857,7 +6865,7 @@ function Qd({
6857
6865
  },
6858
6866
  className: v(
6859
6867
  "inline-flex h-6 items-center rounded-control border px-2 text-[11px] transition-colors",
6860
- qe === y ? "border-primary bg-primary text-primary-foreground" : "border-border bg-background text-muted-foreground hover:bg-muted hover:text-foreground"
6868
+ Ke === y ? "border-primary bg-primary text-primary-foreground" : "border-border bg-background text-muted-foreground hover:bg-muted hover:text-foreground"
6861
6869
  ),
6862
6870
  "aria-label": `${m.label} preset — ${m.description}`,
6863
6871
  children: m.label
@@ -6869,11 +6877,11 @@ function Qd({
6869
6877
  _d,
6870
6878
  {
6871
6879
  previewRun: sn,
6872
- isStale: Ks,
6880
+ isStale: Hs,
6873
6881
  onViewOutput: () => X("result")
6874
6882
  }
6875
6883
  ) : null,
6876
- Hs && we ? /* @__PURE__ */ t(
6884
+ qs && we ? /* @__PURE__ */ t(
6877
6885
  Sd,
6878
6886
  {
6879
6887
  run: we,
@@ -7024,7 +7032,7 @@ function Qd({
7024
7032
  {
7025
7033
  type: "button",
7026
7034
  onClick: Xs,
7027
- disabled: Zt || !k.instruction.trim() || !z || !U,
7035
+ disabled: Zt || !k.instruction.trim() || !j || !_,
7028
7036
  title: "Fix typos, grammar, and minor wording without changing your meaning",
7029
7037
  className: _e,
7030
7038
  children: [
@@ -7048,7 +7056,7 @@ function Qd({
7048
7056
  ),
7049
7057
  k.source.type === "dashboard" ? /* @__PURE__ */ s("div", { children: [
7050
7058
  k.attachments.length > 0 ? /* @__PURE__ */ t(
7051
- Hl,
7059
+ ql,
7052
7060
  {
7053
7061
  attachments: k.attachments,
7054
7062
  disabled: Ge,
@@ -7127,7 +7135,7 @@ function Qd({
7127
7135
  ln === m && y && "ring-1 ring-foreground/20"
7128
7136
  ),
7129
7137
  children: [
7130
- m === "EMAIL" ? /* @__PURE__ */ t(Ka, { className: "h-3 w-3" }) : /* @__PURE__ */ t(En, { className: "h-3 w-3" }),
7138
+ m === "EMAIL" ? /* @__PURE__ */ t(Ha, { className: "h-3 w-3" }) : /* @__PURE__ */ t(En, { className: "h-3 w-3" }),
7131
7139
  m === "EMAIL" ? "Email" : "Slack"
7132
7140
  ]
7133
7141
  },
@@ -7242,7 +7250,7 @@ function Qd({
7242
7250
  "a",
7243
7251
  {
7244
7252
  href: Gd(
7245
- z,
7253
+ j,
7246
7254
  "/admin/integrations/slack"
7247
7255
  ),
7248
7256
  target: "_blank",
@@ -7275,23 +7283,23 @@ function Qd({
7275
7283
  dd,
7276
7284
  {
7277
7285
  source: k.source,
7278
- resolvedSourceContext: H,
7286
+ resolvedSourceContext: W,
7279
7287
  sourceDetail: zs,
7280
7288
  onChange: (m) => ae({ source: m })
7281
7289
  }
7282
7290
  )
7283
7291
  ] })
7284
- ] }) : Ne === "plan" && Ke ? /* @__PURE__ */ t(
7292
+ ] }) : Ne === "plan" && He ? /* @__PURE__ */ t(
7285
7293
  Nd,
7286
7294
  {
7287
- previewPlan: Ke,
7288
- previewRun: W && W.status !== "SUCCESS" ? W : null,
7289
- scopeLabel: H.source.type === "dashboard" ? (C == null ? void 0 : C.title) ?? H.label : H.label
7295
+ previewPlan: He,
7296
+ previewRun: K && K.status !== "SUCCESS" ? K : null,
7297
+ scopeLabel: W.source.type === "dashboard" ? (C == null ? void 0 : C.title) ?? W.label : W.label
7290
7298
  }
7291
- ) : Ne === "result" && W ? /* @__PURE__ */ t(
7299
+ ) : Ne === "result" && K ? /* @__PURE__ */ t(
7292
7300
  ha,
7293
7301
  {
7294
- previewRun: W,
7302
+ previewRun: K,
7295
7303
  onExpand: () => {
7296
7304
  Jt("preview"), Gt(!0);
7297
7305
  }
@@ -7312,8 +7320,8 @@ function Qd({
7312
7320
  deletePending: de === "deleteRun"
7313
7321
  }
7314
7322
  ) : null }),
7315
- ke.length > 0 || me ? /* @__PURE__ */ s("div", { className: "shrink-0 space-y-2 border-t border-destructive/30 bg-destructive/10 px-4 py-2.5", children: [
7316
- ke.length > 0 ? /* @__PURE__ */ s(
7323
+ Se.length > 0 || me ? /* @__PURE__ */ s("div", { className: "shrink-0 space-y-2 border-t border-destructive/30 bg-destructive/10 px-4 py-2.5", children: [
7324
+ Se.length > 0 ? /* @__PURE__ */ s(
7317
7325
  "div",
7318
7326
  {
7319
7327
  role: "alert",
@@ -7323,7 +7331,7 @@ function Qd({
7323
7331
  /* @__PURE__ */ t(et, { className: "h-3 w-3" }),
7324
7332
  "Fix these before saving:"
7325
7333
  ] }),
7326
- /* @__PURE__ */ t("ul", { className: "space-y-0.5 pl-4", children: ke.map((m) => /* @__PURE__ */ t(
7334
+ /* @__PURE__ */ t("ul", { className: "space-y-0.5 pl-4", children: Se.map((m) => /* @__PURE__ */ t(
7327
7335
  "li",
7328
7336
  {
7329
7337
  className: "list-disc marker:text-destructive/60",
@@ -7355,7 +7363,7 @@ function Qd({
7355
7363
  disabled: Ge,
7356
7364
  onClick: () => eo(rn ? "ACTIVE" : "PAUSED"),
7357
7365
  children: [
7358
- de === "pause" || de === "resume" ? /* @__PURE__ */ t(ne, { className: "h-3 w-3 animate-spin" }) : rn ? /* @__PURE__ */ t(_a, { className: "h-3 w-3" }) : /* @__PURE__ */ t(qa, { className: "h-3 w-3" }),
7366
+ de === "pause" || de === "resume" ? /* @__PURE__ */ t(ne, { className: "h-3 w-3 animate-spin" }) : rn ? /* @__PURE__ */ t(_a, { className: "h-3 w-3" }) : /* @__PURE__ */ t(Ka, { className: "h-3 w-3" }),
7359
7367
  rn ? "Resume" : "Pause"
7360
7368
  ]
7361
7369
  }
@@ -7409,7 +7417,7 @@ function Qd({
7409
7417
  disabled: Ge,
7410
7418
  onClick: Gs,
7411
7419
  children: [
7412
- de === "save" ? /* @__PURE__ */ t(ne, { className: "h-3 w-3 animate-spin" }) : /* @__PURE__ */ t(He, { className: "h-3 w-3" }),
7420
+ de === "save" ? /* @__PURE__ */ t(ne, { className: "h-3 w-3 animate-spin" }) : /* @__PURE__ */ t(qe, { className: "h-3 w-3" }),
7413
7421
  oe ? "Save changes" : "Create briefing"
7414
7422
  ]
7415
7423
  }
@@ -7425,7 +7433,7 @@ function Qd({
7425
7433
  },
7426
7434
  children: /* @__PURE__ */ s(mt, { className: "flex max-h-[90vh] w-[min(960px,calc(100vw-32px))] max-w-none flex-col gap-0 overflow-hidden p-0", children: [
7427
7435
  /* @__PURE__ */ s(ht, { className: "border-b border-border px-6 py-3 text-left", children: [
7428
- /* @__PURE__ */ t(pt, { className: "truncate text-[14px] font-semibold leading-5", children: qs }),
7436
+ /* @__PURE__ */ t(pt, { className: "truncate text-[14px] font-semibold leading-5", children: Ks }),
7429
7437
  /* @__PURE__ */ t(ft, { className: "text-[12px] text-muted-foreground", children: "Full briefing render" })
7430
7438
  ] }),
7431
7439
  /* @__PURE__ */ t("div", { className: "flex-1 overflow-y-auto px-6 py-5", children: vt ? /* @__PURE__ */ t(ha, { previewRun: vt, fullWidth: !0 }) : Nt ? /* @__PURE__ */ t(Zn, { preview: Nt }) : Be ? /* @__PURE__ */ t(pa, { run: Be }) : null })
@@ -7583,7 +7591,7 @@ function mc({
7583
7591
  busyId: g,
7584
7592
  manageBriefingsHref: D
7585
7593
  }) {
7586
- const S = e.length, N = e.filter((x) => x.status === "ACTIVE").length, b = e.find((x) => x.hasActiveRun) ?? null;
7594
+ const A = e.length, N = e.filter((x) => x.status === "ACTIVE").length, b = e.find((x) => x.hasActiveRun) ?? null;
7587
7595
  return /* @__PURE__ */ s(
7588
7596
  "section",
7589
7597
  {
@@ -7615,9 +7623,9 @@ function mc({
7615
7623
  onChange: i
7616
7624
  }
7617
7625
  ),
7618
- /* @__PURE__ */ t("div", { className: "flex min-w-0 items-center gap-1.5 text-[11px] text-muted-foreground", children: o && S === 0 ? /* @__PURE__ */ t("span", { children: "Loading briefings…" }) : S === 0 ? /* @__PURE__ */ t("span", { children: "No briefings yet" }) : /* @__PURE__ */ s(se, { children: [
7626
+ /* @__PURE__ */ t("div", { className: "flex min-w-0 items-center gap-1.5 text-[11px] text-muted-foreground", children: o && A === 0 ? /* @__PURE__ */ t("span", { children: "Loading briefings…" }) : A === 0 ? /* @__PURE__ */ t("span", { children: "No briefings yet" }) : /* @__PURE__ */ s(se, { children: [
7619
7627
  /* @__PURE__ */ s("span", { className: "font-medium text-foreground/80", children: [
7620
- S,
7628
+ A,
7621
7629
  " watching"
7622
7630
  ] }),
7623
7631
  /* @__PURE__ */ t("span", { className: "text-border", children: "·" }),
@@ -7635,8 +7643,8 @@ function mc({
7635
7643
  // case without crowding the toolbar.
7636
7644
  /* @__PURE__ */ t(ne, { className: "h-3.5 w-3.5 animate-spin text-muted-foreground" })
7637
7645
  ) : null,
7638
- S > 0 ? /* @__PURE__ */ s("button", { onClick: d, className: Ds, children: [
7639
- /* @__PURE__ */ t(Ht, { className: "h-3 w-3" }),
7646
+ A > 0 ? /* @__PURE__ */ s("button", { onClick: d, className: Ds, children: [
7647
+ /* @__PURE__ */ t(qt, { className: "h-3 w-3" }),
7640
7648
  "New briefing"
7641
7649
  ] }) : null
7642
7650
  ] })
@@ -7671,7 +7679,7 @@ function mc({
7671
7679
  className: v(ec, "h-6 px-1 text-[11px]"),
7672
7680
  children: [
7673
7681
  "Manage all briefings",
7674
- /* @__PURE__ */ t(Pi, { className: "h-3 w-3" })
7682
+ /* @__PURE__ */ t(Fi, { className: "h-3 w-3" })
7675
7683
  ]
7676
7684
  }
7677
7685
  ) }) : null
@@ -7685,7 +7693,7 @@ function hc({ onNew: e }) {
7685
7693
  /* @__PURE__ */ t("div", { className: "text-[13px] font-medium text-foreground", children: "Have an analyst brief your team" }),
7686
7694
  /* @__PURE__ */ t("p", { className: "mt-1.5 max-w-[320px] text-[12px] leading-5 text-muted-foreground", children: "Describe what to watch. An analyst digs into this dashboard and the data behind it, then briefs your team on the cadence you choose." }),
7687
7695
  /* @__PURE__ */ s("button", { onClick: e, className: v(Ds, "mt-4"), children: [
7688
- /* @__PURE__ */ t(Ht, { className: "h-3 w-3" }),
7696
+ /* @__PURE__ */ t(qt, { className: "h-3 w-3" }),
7689
7697
  "New briefing"
7690
7698
  ] })
7691
7699
  ] });
@@ -7966,7 +7974,7 @@ function fc({
7966
7974
  /* @__PURE__ */ t(_a, { className: "h-3.5 w-3.5" }),
7967
7975
  "Resume"
7968
7976
  ] }) : /* @__PURE__ */ s(se, { children: [
7969
- /* @__PURE__ */ t(qa, { className: "h-3.5 w-3.5" }),
7977
+ /* @__PURE__ */ t(Ka, { className: "h-3.5 w-3.5" }),
7970
7978
  "Pause"
7971
7979
  ] })
7972
7980
  }
@@ -8001,7 +8009,7 @@ function xc({
8001
8009
  onTimeout: i,
8002
8010
  onExpand: l
8003
8011
  }) {
8004
- const [c, d] = A(n), { startRun: u } = Ln({
8012
+ const [c, d] = E(n), { startRun: u } = Ln({
8005
8013
  apiServiceUrl: r,
8006
8014
  token: a,
8007
8015
  intervalMs: gc,
@@ -8020,12 +8028,12 @@ function xc({
8020
8028
  onTimeout: () => {
8021
8029
  i();
8022
8030
  }
8023
- }), p = Ee(!1);
8031
+ }), p = Ie(!1);
8024
8032
  return ue(() => {
8025
8033
  p.current || (p.current = !0, _t(n.status) ? u(n) : Ut(n.status) && o(n));
8026
8034
  }, [n, o, u]), /* @__PURE__ */ t(Id, { run: c, onExpand: l });
8027
8035
  }
8028
- function zc({
8036
+ function jc({
8029
8037
  dashboardId: e,
8030
8038
  dashboardTitle: n,
8031
8039
  apiServiceUrl: r,
@@ -8035,16 +8043,16 @@ function zc({
8035
8043
  manageBriefingsHref: l,
8036
8044
  client: c
8037
8045
  }) {
8038
- const { authToken: d, tokenProps: u } = It(), [p, f] = A(!1), [h, g] = A("list"), [D, S] = A("dashboard"), [N, b] = A(
8046
+ const { authToken: d, tokenProps: u } = It(), [p, f] = E(!1), [h, g] = E("list"), [D, A] = E("dashboard"), [N, b] = E(
8039
8047
  []
8040
- ), [C, x] = A(null), [w, T] = A(!1), [V, R] = A(null), [I, P] = A(null), [j, _] = A(
8048
+ ), [C, x] = E(null), [w, T] = E(!1), [$, S] = E(null), [R, U] = E(null), [z, B] = E(
8041
8049
  null
8042
- ), [z, U] = A(null), [M, H] = A(
8050
+ ), [j, _] = E(null), [M, W] = E(
8043
8051
  null
8044
- ), [le, L] = A(null), G = r ?? (u == null ? void 0 : u.apiServiceUrl), k = a ?? (d == null ? void 0 : d.accessToken), xe = O(() => ({ ...Xd, ...c }), [c]), de = tc(n), re = O(
8052
+ ), [le, L] = E(null), G = r ?? (u == null ? void 0 : u.apiServiceUrl), k = a ?? (d == null ? void 0 : d.accessToken), xe = O(() => ({ ...Xd, ...c }), [c]), de = tc(n), re = O(
8045
8053
  () => sc(N, D, e),
8046
8054
  [e, N, D]
8047
- ), ke = O(() => D === "dashboard" ? {
8055
+ ), Se = O(() => D === "dashboard" ? {
8048
8056
  source: { type: "dashboard", dashboardId: e },
8049
8057
  label: de,
8050
8058
  detail: nc(de)
@@ -8054,7 +8062,7 @@ function zc({
8054
8062
  detail: "Use any data in this project."
8055
8063
  }, [e, de, D]), De = !!(G && k), me = pe(async () => {
8056
8064
  if (!(!G || !k)) {
8057
- T(!0), U(null);
8065
+ T(!0), _(null);
8058
8066
  try {
8059
8067
  b(
8060
8068
  await oc({
@@ -8063,9 +8071,9 @@ function zc({
8063
8071
  token: k
8064
8072
  })
8065
8073
  );
8066
- } catch ($) {
8067
- U(
8068
- $ instanceof Error ? $.message : "Could not load briefings."
8074
+ } catch (V) {
8075
+ _(
8076
+ V instanceof Error ? V.message : "Could not load briefings."
8069
8077
  );
8070
8078
  } finally {
8071
8079
  T(!1);
@@ -8076,35 +8084,35 @@ function zc({
8076
8084
  !p || h !== "list" || !De || me();
8077
8085
  }, [De, me, p, h]);
8078
8086
  const q = () => {
8079
- x(null), S("dashboard"), g("list"), f(!0);
8087
+ x(null), A("dashboard"), g("list"), f(!0);
8080
8088
  }, lt = () => {
8081
8089
  x(null), g("author");
8082
- }, Te = async ($) => {
8090
+ }, Te = async (V) => {
8083
8091
  if (!(!G || !k)) {
8084
- R($), U(null);
8092
+ S(V), _(null);
8085
8093
  try {
8086
8094
  const ee = await xe.getBriefing(
8087
8095
  G,
8088
8096
  k,
8089
- $
8097
+ V
8090
8098
  );
8091
8099
  x(ee.briefing), g("author");
8092
8100
  } catch (ee) {
8093
- U(
8101
+ _(
8094
8102
  ee instanceof Error ? ee.message : "Could not open briefing."
8095
8103
  );
8096
8104
  } finally {
8097
- R(null);
8105
+ S(null);
8098
8106
  }
8099
8107
  }
8100
- }, Ke = async ($) => {
8108
+ }, He = async (V) => {
8101
8109
  if (!(!G || !k)) {
8102
- P($.id);
8110
+ U(V.id);
8103
8111
  try {
8104
8112
  await xe.runBriefingNow(
8105
8113
  G,
8106
8114
  k,
8107
- $.id,
8115
+ V.id,
8108
8116
  { requestId: yc() }
8109
8117
  ), me();
8110
8118
  } catch (ee) {
@@ -8112,21 +8120,21 @@ function zc({
8112
8120
  ee instanceof Error ? ee.message : "Could not start the run."
8113
8121
  );
8114
8122
  } finally {
8115
- P(null);
8123
+ U(null);
8116
8124
  }
8117
8125
  }
8118
- }, Pe = async ($) => {
8126
+ }, Pe = async (V) => {
8119
8127
  if (!(!G || !k)) {
8120
- P($.id);
8128
+ U(V.id);
8121
8129
  try {
8122
- const ee = $.status === "PAUSED" ? await xe.resumeBriefing(
8130
+ const ee = V.status === "PAUSED" ? await xe.resumeBriefing(
8123
8131
  G,
8124
8132
  k,
8125
- $.id
8133
+ V.id
8126
8134
  ) : await xe.pauseBriefing(
8127
8135
  G,
8128
8136
  k,
8129
- $.id
8137
+ V.id
8130
8138
  );
8131
8139
  fe.success(
8132
8140
  ee.briefing.status === "PAUSED" ? "Briefing paused" : "Briefing resumed"
@@ -8136,25 +8144,25 @@ function zc({
8136
8144
  ee instanceof Error ? ee.message : "Could not update the briefing status."
8137
8145
  );
8138
8146
  } finally {
8139
- P(null);
8147
+ U(null);
8140
8148
  }
8141
8149
  }
8142
- }, W = async () => {
8143
- if (!j || !G || !k) return;
8144
- const $ = j;
8145
- P($.id);
8150
+ }, K = async () => {
8151
+ if (!z || !G || !k) return;
8152
+ const V = z;
8153
+ U(V.id);
8146
8154
  try {
8147
8155
  await xe.deleteBriefing(
8148
8156
  G,
8149
8157
  k,
8150
- $.id
8151
- ), fe.success("Briefing deleted"), _(null), me();
8158
+ V.id
8159
+ ), fe.success("Briefing deleted"), B(null), me();
8152
8160
  } catch (ee) {
8153
8161
  fe.error(
8154
8162
  ee instanceof Error ? ee.message : "Could not delete the briefing."
8155
8163
  );
8156
8164
  } finally {
8157
- P(null);
8165
+ U(null);
8158
8166
  }
8159
8167
  }, Me = re.length;
8160
8168
  return /* @__PURE__ */ s(bi, { open: p, onOpenChange: f, children: [
@@ -8184,23 +8192,23 @@ function zc({
8184
8192
  briefings: re,
8185
8193
  dashboardLabel: de,
8186
8194
  sourceView: D,
8187
- error: z,
8195
+ error: j,
8188
8196
  loading: w,
8189
- onSourceViewChange: S,
8197
+ onSourceViewChange: A,
8190
8198
  onClose: () => f(!1),
8191
- onEdit: ($) => {
8192
- Te($);
8199
+ onEdit: (V) => {
8200
+ Te(V);
8193
8201
  },
8194
8202
  onNew: lt,
8195
- onRunNow: ($) => {
8196
- Ke($);
8203
+ onRunNow: (V) => {
8204
+ He(V);
8197
8205
  },
8198
- onTogglePause: ($) => {
8199
- Pe($);
8206
+ onTogglePause: (V) => {
8207
+ Pe(V);
8200
8208
  },
8201
- onDelete: ($) => _($),
8202
- selectingId: V,
8203
- busyId: I,
8209
+ onDelete: (V) => B(V),
8210
+ selectingId: $,
8211
+ busyId: R,
8204
8212
  manageBriefingsHref: l
8205
8213
  }
8206
8214
  ) : /* @__PURE__ */ t(
@@ -8209,7 +8217,7 @@ function zc({
8209
8217
  apiServiceUrl: G,
8210
8218
  token: k,
8211
8219
  briefing: C,
8212
- sourceContext: C ? void 0 : ke,
8220
+ sourceContext: C ? void 0 : Se,
8213
8221
  title: C ? "Edit briefing" : "Create briefing",
8214
8222
  className: "h-full min-h-0 max-w-none border-0 shadow-none",
8215
8223
  onBack: () => g("list"),
@@ -8219,11 +8227,11 @@ function zc({
8219
8227
  },
8220
8228
  onRunStarted: () => {
8221
8229
  },
8222
- onSaved: ($) => {
8223
- x($), me();
8230
+ onSaved: (V) => {
8231
+ x(V), me();
8224
8232
  },
8225
- onMinimizeRun: ({ briefing: $, run: ee }) => {
8226
- H({ briefing: $, run: ee }), f(!1);
8233
+ onMinimizeRun: ({ briefing: V, run: ee }) => {
8234
+ W({ briefing: V, run: ee }), f(!1);
8227
8235
  }
8228
8236
  }
8229
8237
  )
@@ -8237,17 +8245,17 @@ function zc({
8237
8245
  initialRun: M.run,
8238
8246
  apiServiceUrl: G,
8239
8247
  token: k,
8240
- onTerminal: ($) => {
8248
+ onTerminal: (V) => {
8241
8249
  L({
8242
8250
  briefing: M.briefing,
8243
- run: $
8244
- }), H(null), me();
8251
+ run: V
8252
+ }), W(null), me();
8245
8253
  },
8246
8254
  onTimeout: () => {
8247
- H(null), me();
8255
+ W(null), me();
8248
8256
  },
8249
8257
  onExpand: () => {
8250
- x(M.briefing), g("author"), H(null), f(!0);
8258
+ x(M.briefing), g("author"), W(null), f(!0);
8251
8259
  }
8252
8260
  }
8253
8261
  ) : null,
@@ -8271,16 +8279,16 @@ function zc({
8271
8279
  /* @__PURE__ */ t(
8272
8280
  On,
8273
8281
  {
8274
- open: !!j,
8275
- onOpenChange: ($) => {
8276
- $ || _(null);
8282
+ open: !!z,
8283
+ onOpenChange: (V) => {
8284
+ V || B(null);
8277
8285
  },
8278
8286
  children: /* @__PURE__ */ s(Vn, { children: [
8279
8287
  /* @__PURE__ */ s($n, { children: [
8280
8288
  /* @__PURE__ */ t(Un, { children: "Delete briefing?" }),
8281
8289
  /* @__PURE__ */ s(_n, { children: [
8282
8290
  "This permanently deletes ",
8283
- /* @__PURE__ */ t("strong", { children: j == null ? void 0 : j.name }),
8291
+ /* @__PURE__ */ t("strong", { children: z == null ? void 0 : z.name }),
8284
8292
  ". Recipients will stop receiving it."
8285
8293
  ] })
8286
8294
  ] }),
@@ -8290,7 +8298,7 @@ function zc({
8290
8298
  Ua,
8291
8299
  {
8292
8300
  className: "bg-destructive/90 hover:bg-destructive",
8293
- onClick: W,
8301
+ onClick: K,
8294
8302
  children: "Delete briefing"
8295
8303
  }
8296
8304
  )
@@ -8304,29 +8312,29 @@ function yc() {
8304
8312
  return typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : `briefing-run-now-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
8305
8313
  }
8306
8314
  export {
8307
- Fc as A,
8315
+ Rc as A,
8308
8316
  Wn as B,
8309
8317
  Tn as C,
8310
8318
  Yi as D,
8311
8319
  Ji as E,
8312
8320
  St as F,
8313
- Kr as G,
8321
+ Hr as G,
8314
8322
  Ul as H,
8315
- qr as I,
8323
+ Kr as I,
8316
8324
  Qd as J,
8317
- zc as K,
8325
+ jc as K,
8318
8326
  Wa as L,
8319
8327
  Vi as M,
8320
- Oc as N,
8321
- Pc as U,
8322
- Rc as V,
8328
+ Bc as N,
8329
+ Fc as U,
8330
+ Lc as V,
8323
8331
  Yd as W,
8324
8332
  Gi as a,
8325
- Bc as b,
8333
+ Mc as b,
8326
8334
  Zi as c,
8327
8335
  al as d,
8328
- Vc as e,
8329
- $c as f,
8336
+ Oc as e,
8337
+ Vc as f,
8330
8338
  Ya as g,
8331
8339
  ml as h,
8332
8340
  Gn as i,
@@ -8337,14 +8345,14 @@ export {
8337
8345
  pl as n,
8338
8346
  fl as o,
8339
8347
  Xa as p,
8340
- Uc as q,
8348
+ $c as q,
8341
8349
  Za as r,
8342
8350
  ns as s,
8343
8351
  gl as t,
8344
- Mc as u,
8352
+ Pc as u,
8345
8353
  bl as v,
8346
- _c as w,
8347
- jc as x,
8354
+ Uc as w,
8355
+ _c as x,
8348
8356
  xl as y,
8349
8357
  $l as z
8350
8358
  };