react-semaphor 0.1.325 → 0.1.327
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.
- package/dist/analytics-protocol/index.cjs +1 -1
- package/dist/analytics-protocol/index.js +260 -226
- package/dist/brand-studio/index.cjs +2 -2
- package/dist/brand-studio/index.js +7 -6
- package/dist/chunks/{braces-ZjRH2Kl7.js → braces-B6qRDu1H.js} +1 -1
- package/dist/chunks/{braces-C7BeIXvM.js → braces-BGWZEnQJ.js} +1 -1
- package/dist/chunks/{calendar-preferences-dialog-DHhT6Sja.js → calendar-preferences-dialog-CjwbE_82.js} +6 -5
- package/dist/chunks/calendar-preferences-dialog-fkLUMJyR.js +1 -0
- package/dist/chunks/{chevrons-up-down-CA-XvN1o.js → chevrons-up-down-BpsogQvv.js} +1 -1
- package/dist/chunks/{chevrons-up-down-Cuilz9aY.js → chevrons-up-down-xG-bVFD9.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-DZiFMK8I.js → dashboard-briefing-launcher-Co57xBfS.js} +2 -2
- package/dist/chunks/{dashboard-briefing-launcher-BzIxRlzW.js → dashboard-briefing-launcher-Cy1nWZRW.js} +714 -719
- package/dist/chunks/{dashboard-controls-DVwsWny9.js → dashboard-controls-BWnVEFJq.js} +10 -9
- package/dist/chunks/{dashboard-controls-BX693lE0.js → dashboard-controls-C7rOGZO-.js} +1 -1
- package/dist/chunks/{dashboard-json-D15C_I9e.js → dashboard-json-BpRNSsF3.js} +7 -6
- package/dist/chunks/dashboard-json-DBPMknGo.js +1 -0
- package/dist/chunks/date-formatter-B4EBSe9C.js +1 -0
- package/dist/chunks/date-formatter-CzcPZx39.js +416 -0
- package/dist/chunks/edit-dashboard-visual-B2vkIKEa.js +178 -0
- package/dist/chunks/{edit-dashboard-visual-wQyJEcVH.js → edit-dashboard-visual-CYf26co_.js} +8243 -7784
- package/dist/chunks/index-BD90s-wf.js +1309 -0
- package/dist/chunks/index-BxM99sFL.js +1 -0
- package/dist/chunks/index-CuHybtft.js +51 -0
- package/dist/chunks/{index-CffvIaZO.js → index-DTlbYpxd.js} +29440 -28968
- package/dist/chunks/{palette-D96DOM7E.js → palette-CSF7IVJn.js} +1 -1
- package/dist/chunks/{palette-CanPG11m.js → palette-CWgEPBoG.js} +1 -1
- package/dist/chunks/{resource-management-panel-DlnrD0y-.js → resource-management-panel-D6nbfJY3.js} +1 -1
- package/dist/chunks/{resource-management-panel-CLoO2DL3.js → resource-management-panel-D893Onv8.js} +6 -5
- package/dist/chunks/{save-CqrBQKG6.js → save-CtQbSub2.js} +1 -1
- package/dist/chunks/{save-DxkSzUTZ.js → save-DRdFKF57.js} +1 -1
- package/dist/chunks/switch-DJJJD_g1.js +168 -0
- package/dist/chunks/{switch-Deo2Ltmj.js → switch-DKf6vHfP.js} +2222 -2228
- package/dist/chunks/{use-create-flow-overlay-state-DocFanjO.js → use-create-flow-overlay-state-C4LgoK8q.js} +1 -1
- package/dist/chunks/{use-create-flow-overlay-state-DsPoCfMu.js → use-create-flow-overlay-state-p21zs2p6.js} +29 -28
- package/dist/chunks/{use-visual-utils-BdO22fQZ.js → use-visual-utils-BKBua6o4.js} +2 -2
- package/dist/chunks/{use-visual-utils-DSbXQQD1.js → use-visual-utils-BqWm0QeW.js} +1 -1
- package/dist/chunks/validators-DDAweCzB.js +371 -0
- package/dist/chunks/validators-odlRJblR.js +2 -0
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/dashboard-authoring/index.cjs +3 -3
- package/dist/dashboard-authoring/index.js +919 -507
- package/dist/data-app-sdk/index.cjs +1 -0
- package/dist/data-app-sdk/index.js +512 -0
- package/dist/format-utils/index.cjs +4 -4
- package/dist/format-utils/index.js +22 -21
- package/dist/index.cjs +1 -1
- package/dist/index.js +141 -140
- package/dist/style.css +1 -1
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/analytics-protocol.d.ts +326 -2
- package/dist/types/dashboard-authoring.d.ts +102 -3
- package/dist/types/dashboard.d.ts +23 -3
- package/dist/types/data-app-sdk.d.ts +379 -0
- package/dist/types/format-utils.d.ts +25 -0
- package/dist/types/main.d.ts +182 -12
- package/dist/types/shared.d.ts +18 -2
- package/dist/types/surfboard.d.ts +23 -3
- package/dist/types/types.d.ts +38 -4
- package/package.json +6 -1
- package/dist/chunks/calendar-preferences-dialog-BxeROxyq.js +0 -1
- package/dist/chunks/dashboard-json-DxNEFM-p.js +0 -1
- package/dist/chunks/date-formatter-D9Bvw5Qk.js +0 -1
- package/dist/chunks/date-formatter-DyIOb6uC.js +0 -333
- package/dist/chunks/edit-dashboard-visual-90_qEgRc.js +0 -178
- package/dist/chunks/index-YTk9Hab2.js +0 -1303
- package/dist/chunks/switch-BXICAlvS.js +0 -168
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { jsx as t, jsxs as s, Fragment as ae } from "react/jsx-runtime";
|
|
2
|
-
import { c as Ie, L as yn, a1 as
|
|
3
|
-
import { b as ut, c as mt, d as ht, e as pt, f as ft, bb as
|
|
4
|
-
import { V as
|
|
5
|
-
import
|
|
6
|
-
import { u as
|
|
7
|
-
import
|
|
2
|
+
import { c as Ie, L as yn, a1 as ro, B as pe, f as ne, G as ct, u as H, E as bt, aJ as Dr, a9 as ha, g as Ke, e as He, H as pa, a as v, S as Tn, X as Ce, P as Fe, b as Ze, d as Xe, aK as ao, aL as so, aH as fa, aM as ga, a2 as Ge, a3 as Je, a4 as Qe, a5 as Ye, a6 as ue, Q as oo, aN as ba, aO as xa, $ as je, T as io, J as lo, K as Tr, aP as co } from "./switch-DKf6vHfP.js";
|
|
3
|
+
import { b as ut, c as mt, d as ht, e as pt, f as ft, bb as uo, n as ya, af as mo, ag as ho, au as va, bO as po, o as he, av as vn, x as fo, aM as Ln, aN as Rn, aP as Fn, aQ as ze, aU as Na, aH as Kt, bP as go, bQ as bo, a$ as Pn, b0 as Mn, b1 as Bn, b2 as On, b3 as Vn, b4 as $n, b5 as Un, u as Dt, _ as ot, a9 as _n, a5 as wa, a6 as jn, $ as Ca, a4 as xo, ab as yo, bJ as vo, bR as No, aJ as wo, a7 as Lr, w as Vt, a1 as Co, bS as ko, bT as So, bU as Ao, bV as Eo, bW as Io, bX as Do, bY as To, bZ as Lo, b_ as ka, b$ as Ro, c0 as Fo, c1 as Po, c2 as Mo, c3 as Bo, c4 as gt, c5 as Oo, bI as Sa, aw as Aa, c6 as Vo, c7 as $o, c8 as Uo, c9 as _o, ca as jo, cb as zo, cc as Ko, cd as Ea, ce as Ho, cf as qo, cg as Ia, ch as Da, ci as Ta, cj as Wo, ck as Go, b8 as La, bx as Jo, bu as Qo, cl as Yo, aV as Zo, cm as Ra, cn as Xo, co as ei, aW as Rr, cp as ti, cq as ni, cr as Nn, cs as ri, ct as ai, cu as Fa, cv as zn, cw as si, cx as oi, cy as ii, cz as Pa, cA as Tt, cB as Ma, ay as wn, b6 as Ba, cC as li, cD as di, ax as Cn, cE as ci, cF as Oa, cG as ui, cH as mi, cI as hi, cJ as pi, cK as fi, cL as gi, cM as bi, cN as xi } from "./index-DTlbYpxd.js";
|
|
4
|
+
import { V as yi, E as Fr, a as Pr, b as vi, c as Ni, L as wi, d as Ci, C as ki, u as Va, e as $a, f as Si, R as Ai, S as Ei } from "./use-create-flow-overlay-state-p21zs2p6.js";
|
|
5
|
+
import Ii, { useState as S, useContext as Di, useRef as Ee, useCallback as me, useEffect as ce, useMemo as V } from "react";
|
|
6
|
+
import { u as Ua } from "./use-visual-utils-BKBua6o4.js";
|
|
7
|
+
import "./index-CuHybtft.js";
|
|
8
|
+
import { l as Mr } from "./date-formatter-CzcPZx39.js";
|
|
8
9
|
import "./index-CJdxSyQq.js";
|
|
9
10
|
import "react-dom";
|
|
10
11
|
/**
|
|
@@ -13,7 +14,7 @@ import "react-dom";
|
|
|
13
14
|
* This source code is licensed under the ISC license.
|
|
14
15
|
* See the LICENSE file in the root directory of this source tree.
|
|
15
16
|
*/
|
|
16
|
-
const
|
|
17
|
+
const Ti = Ie("ArrowUpRight", [
|
|
17
18
|
["path", { d: "M7 7h10v10", key: "1tivn9" }],
|
|
18
19
|
["path", { d: "M7 17 17 7", key: "1vkiza" }]
|
|
19
20
|
]);
|
|
@@ -35,7 +36,7 @@ const Br = Ie("FileDown", [
|
|
|
35
36
|
* This source code is licensed under the ISC license.
|
|
36
37
|
* See the LICENSE file in the root directory of this source tree.
|
|
37
38
|
*/
|
|
38
|
-
const
|
|
39
|
+
const Li = Ie("FilterX", [
|
|
39
40
|
["path", { d: "M13.013 3H2l8 9.46V19l4 2v-8.54l.9-1.055", key: "1fi1da" }],
|
|
40
41
|
["path", { d: "m22 3-5 5", key: "12jva0" }],
|
|
41
42
|
["path", { d: "m17 3 5 5", key: "k36vhe" }]
|
|
@@ -46,7 +47,7 @@ const Ti = Ie("FilterX", [
|
|
|
46
47
|
* This source code is licensed under the ISC license.
|
|
47
48
|
* See the LICENSE file in the root directory of this source tree.
|
|
48
49
|
*/
|
|
49
|
-
const
|
|
50
|
+
const Ri = Ie("ListChecks", [
|
|
50
51
|
["path", { d: "m3 17 2 2 4-4", key: "1jhpwq" }],
|
|
51
52
|
["path", { d: "m3 7 2 2 4-4", key: "1obspn" }],
|
|
52
53
|
["path", { d: "M13 6h8", key: "15sg57" }],
|
|
@@ -59,7 +60,7 @@ const Li = Ie("ListChecks", [
|
|
|
59
60
|
* This source code is licensed under the ISC license.
|
|
60
61
|
* See the LICENSE file in the root directory of this source tree.
|
|
61
62
|
*/
|
|
62
|
-
const
|
|
63
|
+
const _a = Ie("Mail", [
|
|
63
64
|
["rect", { width: "20", height: "16", x: "2", y: "4", rx: "2", key: "18n3k1" }],
|
|
64
65
|
["path", { d: "m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7", key: "1ocrg3" }]
|
|
65
66
|
]);
|
|
@@ -78,7 +79,7 @@ const kn = Ie("MessageSquare", [
|
|
|
78
79
|
* This source code is licensed under the ISC license.
|
|
79
80
|
* See the LICENSE file in the root directory of this source tree.
|
|
80
81
|
*/
|
|
81
|
-
const
|
|
82
|
+
const Fi = Ie("Newspaper", [
|
|
82
83
|
[
|
|
83
84
|
"path",
|
|
84
85
|
{
|
|
@@ -96,7 +97,7 @@ const Ri = Ie("Newspaper", [
|
|
|
96
97
|
* This source code is licensed under the ISC license.
|
|
97
98
|
* See the LICENSE file in the root directory of this source tree.
|
|
98
99
|
*/
|
|
99
|
-
const
|
|
100
|
+
const ja = Ie("Pause", [
|
|
100
101
|
["rect", { x: "14", y: "4", width: "4", height: "16", rx: "1", key: "zuxfzm" }],
|
|
101
102
|
["rect", { x: "6", y: "4", width: "4", height: "16", rx: "1", key: "1okwgv" }]
|
|
102
103
|
]);
|
|
@@ -106,7 +107,7 @@ const za = Ie("Pause", [
|
|
|
106
107
|
* This source code is licensed under the ISC license.
|
|
107
108
|
* See the LICENSE file in the root directory of this source tree.
|
|
108
109
|
*/
|
|
109
|
-
const
|
|
110
|
+
const Pi = Ie("Undo2", [
|
|
110
111
|
["path", { d: "M9 14 4 9l5-5", key: "102s5s" }],
|
|
111
112
|
["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" }]
|
|
112
113
|
]);
|
|
@@ -116,7 +117,7 @@ const Fi = Ie("Undo2", [
|
|
|
116
117
|
* This source code is licensed under the ISC license.
|
|
117
118
|
* See the LICENSE file in the root directory of this source tree.
|
|
118
119
|
*/
|
|
119
|
-
const
|
|
120
|
+
const za = Ie("UsersRound", [
|
|
120
121
|
["path", { d: "M18 21a8 8 0 0 0-16 0", key: "3ypg7q" }],
|
|
121
122
|
["circle", { cx: "10", cy: "8", r: "5", key: "o932ke" }],
|
|
122
123
|
["path", { d: "M22 20c0-3.37-2-6.5-4-8a5 5 0 0 0-.45-8.3", key: "10s06x" }]
|
|
@@ -136,7 +137,7 @@ const Sn = Ie("Zap", [
|
|
|
136
137
|
}
|
|
137
138
|
]
|
|
138
139
|
]);
|
|
139
|
-
function
|
|
140
|
+
function Mi({
|
|
140
141
|
open: e,
|
|
141
142
|
onOpenChange: n,
|
|
142
143
|
isLibraryVisual: r,
|
|
@@ -148,7 +149,7 @@ function Pi({
|
|
|
148
149
|
const [c, d] = S(
|
|
149
150
|
r && a ? `Copy of ${a}` : a || ""
|
|
150
151
|
), [u, p] = S("");
|
|
151
|
-
|
|
152
|
+
Ii.useEffect(() => {
|
|
152
153
|
e && (d(
|
|
153
154
|
r && a ? `Copy of ${a}` : a || ""
|
|
154
155
|
), p(""));
|
|
@@ -184,7 +185,7 @@ function Pi({
|
|
|
184
185
|
/* @__PURE__ */ s(pt, { className: "flex items-center gap-2", children: [
|
|
185
186
|
/* @__PURE__ */ t("span", { children: "Save Visual As" }),
|
|
186
187
|
h.badgeType !== "local" && /* @__PURE__ */ t(
|
|
187
|
-
|
|
188
|
+
yi,
|
|
188
189
|
{
|
|
189
190
|
type: h.badgeType,
|
|
190
191
|
showLabel: !0,
|
|
@@ -198,7 +199,7 @@ function Pi({
|
|
|
198
199
|
/* @__PURE__ */ s("div", { className: "grid gap-2", children: [
|
|
199
200
|
/* @__PURE__ */ t(yn, { htmlFor: "name", children: "Name" }),
|
|
200
201
|
/* @__PURE__ */ t(
|
|
201
|
-
|
|
202
|
+
ro,
|
|
202
203
|
{
|
|
203
204
|
id: "name",
|
|
204
205
|
value: c,
|
|
@@ -211,7 +212,7 @@ function Pi({
|
|
|
211
212
|
/* @__PURE__ */ s("div", { className: "grid gap-2", children: [
|
|
212
213
|
/* @__PURE__ */ t(yn, { htmlFor: "description", children: "Description (optional)" }),
|
|
213
214
|
/* @__PURE__ */ t(
|
|
214
|
-
|
|
215
|
+
uo,
|
|
215
216
|
{
|
|
216
217
|
id: "description",
|
|
217
218
|
value: u,
|
|
@@ -240,19 +241,19 @@ function Pi({
|
|
|
240
241
|
] })
|
|
241
242
|
] }) });
|
|
242
243
|
}
|
|
243
|
-
function
|
|
244
|
-
const [e, n] = S(!1), [r, a] = S(!1), [o, i] = S(null), [l, c] = S(null), d = ct((
|
|
245
|
-
(
|
|
246
|
-
), { getUpdatedFrame: D } =
|
|
247
|
-
var
|
|
248
|
-
return ((
|
|
249
|
-
})(), $ =
|
|
250
|
-
|
|
244
|
+
function Bi() {
|
|
245
|
+
const [e, n] = S(!1), [r, a] = S(!1), [o, i] = S(null), [l, c] = S(null), d = ct((E) => E.frame), u = ct((E) => E.card), p = mo(), f = H((E) => E.selectedSheetId), h = H((E) => E.dashboard), b = H(
|
|
246
|
+
(E) => E.actions.setIsDashboardPanelOpen
|
|
247
|
+
), { getUpdatedFrame: D } = Ua(), { selectVisual: k } = ho(), { addFrame: N, setSelectedFrameId: g, setIsVisualEditing: L } = bt(), x = va(), C = !!(d != null && d.visualId), T = (() => {
|
|
248
|
+
var E, P;
|
|
249
|
+
return ((E = d == null ? void 0 : d.cards) == null ? void 0 : E.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
|
+
})(), $ = po((E) => {
|
|
251
|
+
E != null && E.id && (k(E), r && o && l && f && (async () => {
|
|
251
252
|
try {
|
|
252
253
|
const P = {
|
|
253
254
|
...o,
|
|
254
255
|
id: Dr(),
|
|
255
|
-
visualId:
|
|
256
|
+
visualId: E.id
|
|
256
257
|
// Link to the newly created library visual
|
|
257
258
|
};
|
|
258
259
|
N(f, P, {
|
|
@@ -272,7 +273,7 @@ function Mi() {
|
|
|
272
273
|
return {
|
|
273
274
|
saveAsDialogOpen: e,
|
|
274
275
|
setSaveAsDialogOpen: n,
|
|
275
|
-
handleSaveAs: async (
|
|
276
|
+
handleSaveAs: async (E) => {
|
|
276
277
|
if (!f) {
|
|
277
278
|
he.error("No sheet selected");
|
|
278
279
|
return;
|
|
@@ -286,13 +287,13 @@ function Mi() {
|
|
|
286
287
|
...P,
|
|
287
288
|
cards: P.cards.map((_) => ({
|
|
288
289
|
..._,
|
|
289
|
-
title:
|
|
290
|
+
title: E.name
|
|
290
291
|
// Use visual name as card title
|
|
291
292
|
}))
|
|
292
293
|
} : P;
|
|
293
|
-
if (
|
|
294
|
+
if (E.saveToLibrary) {
|
|
294
295
|
let _ = null;
|
|
295
|
-
if (
|
|
296
|
+
if (E.saveToCurrentDashboard)
|
|
296
297
|
try {
|
|
297
298
|
_ = await x(K, {
|
|
298
299
|
previousFrame: vn(h, K.id)
|
|
@@ -306,16 +307,16 @@ function Mi() {
|
|
|
306
307
|
);
|
|
307
308
|
return;
|
|
308
309
|
}
|
|
309
|
-
a(
|
|
310
|
+
a(E.saveToCurrentDashboard), i(K), c(_);
|
|
310
311
|
const O = {
|
|
311
|
-
title:
|
|
312
|
-
description:
|
|
312
|
+
title: E.name,
|
|
313
|
+
description: E.description,
|
|
313
314
|
frameObject: K,
|
|
314
315
|
// Card title synced for single-card frames
|
|
315
316
|
isPrivate: !1
|
|
316
317
|
};
|
|
317
318
|
$.mutate(O);
|
|
318
|
-
} else if (
|
|
319
|
+
} else if (E.saveToCurrentDashboard) {
|
|
319
320
|
const _ = {
|
|
320
321
|
...K,
|
|
321
322
|
// Card title already synced
|
|
@@ -343,15 +344,15 @@ function Mi() {
|
|
|
343
344
|
isSaving: $.isPending
|
|
344
345
|
};
|
|
345
346
|
}
|
|
346
|
-
function
|
|
347
|
-
const n = ct((B) => B.frame), r = ct((B) => B.editorContext), a =
|
|
347
|
+
function Ic(e = {}) {
|
|
348
|
+
const n = ct((B) => B.frame), r = ct((B) => B.editorContext), a = fo((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] = S(!1), [f, h] = S("both"), b = va(), D = (r == null ? void 0 : r.type) === "documentSection", k = !!(n != null && n.visualId || a != null && a.id), N = !!(n != null && n.visualId && o), g = k && !N, {
|
|
348
349
|
saveAsDialogOpen: L,
|
|
349
350
|
setSaveAsDialogOpen: x,
|
|
350
351
|
handleSaveAs: C,
|
|
351
352
|
isLibraryVisual: T,
|
|
352
353
|
currentVisualName: $,
|
|
353
354
|
isSaving: R
|
|
354
|
-
} =
|
|
355
|
+
} = Bi(), { getUpdatedFrame: E } = Ua();
|
|
355
356
|
if (D)
|
|
356
357
|
return /* @__PURE__ */ s(ae, { children: [
|
|
357
358
|
/* @__PURE__ */ t(Fr, { className: "rounded-control", variant: "default" }),
|
|
@@ -364,7 +365,7 @@ function Ec(e = {}) {
|
|
|
364
365
|
}
|
|
365
366
|
if (u) return;
|
|
366
367
|
p(!0);
|
|
367
|
-
const B =
|
|
368
|
+
const B = E(), K = ha(B);
|
|
368
369
|
if (K) {
|
|
369
370
|
p(!1), he.error(K);
|
|
370
371
|
return;
|
|
@@ -395,8 +396,8 @@ function Ec(e = {}) {
|
|
|
395
396
|
return /* @__PURE__ */ s(ae, { children: [
|
|
396
397
|
/* @__PURE__ */ s("div", { className: "inline-flex items-center overflow-hidden rounded-control", children: [
|
|
397
398
|
!k && /* @__PURE__ */ t(Fr, { className: "!rounded-none", variant: "default" }),
|
|
398
|
-
k && g && /* @__PURE__ */ t(
|
|
399
|
-
k && N && /* @__PURE__ */ t(
|
|
399
|
+
k && g && /* @__PURE__ */ t(vi, { className: "!rounded-none", variant: "default" }),
|
|
400
|
+
k && N && /* @__PURE__ */ t(Ni, { className: "!rounded-none" }),
|
|
400
401
|
/* @__PURE__ */ s(Ln, { modal: !1, children: [
|
|
401
402
|
/* @__PURE__ */ t(Rn, { asChild: !0, children: /* @__PURE__ */ t(
|
|
402
403
|
pe,
|
|
@@ -446,7 +447,7 @@ function Ec(e = {}) {
|
|
|
446
447
|
onClick: () => z("library"),
|
|
447
448
|
disabled: R,
|
|
448
449
|
children: [
|
|
449
|
-
/* @__PURE__ */ t(
|
|
450
|
+
/* @__PURE__ */ t(wi, { className: "h-3.5 w-3.5" }),
|
|
450
451
|
"Save as Library Visual"
|
|
451
452
|
]
|
|
452
453
|
}
|
|
@@ -457,7 +458,7 @@ function Ec(e = {}) {
|
|
|
457
458
|
onClick: () => z("both"),
|
|
458
459
|
disabled: R,
|
|
459
460
|
children: [
|
|
460
|
-
/* @__PURE__ */ t(
|
|
461
|
+
/* @__PURE__ */ t(Ci, { className: "h-3.5 w-3.5" }),
|
|
461
462
|
"Save Copy as Linked Visual"
|
|
462
463
|
]
|
|
463
464
|
}
|
|
@@ -469,7 +470,7 @@ function Ec(e = {}) {
|
|
|
469
470
|
] }),
|
|
470
471
|
/* @__PURE__ */ t(Pr, {}),
|
|
471
472
|
/* @__PURE__ */ t(
|
|
472
|
-
|
|
473
|
+
Mi,
|
|
473
474
|
{
|
|
474
475
|
open: L,
|
|
475
476
|
onOpenChange: (B) => {
|
|
@@ -484,11 +485,11 @@ function Ec(e = {}) {
|
|
|
484
485
|
)
|
|
485
486
|
] });
|
|
486
487
|
}
|
|
487
|
-
function
|
|
488
|
-
const n = ct((u) => u.isDevMode), r = H((u) => u.isVisualEditing), { setIsDevMode: a } = pa(), { config: o } =
|
|
488
|
+
function Dc({ className: e }) {
|
|
489
|
+
const n = ct((u) => u.isDevMode), r = H((u) => u.isVisualEditing), { setIsDevMode: a } = pa(), { config: o } = Di(go).tokenProps, i = (o == null ? void 0 : o.showAdvancedMode) !== !1;
|
|
489
490
|
if (!r || !i)
|
|
490
491
|
return null;
|
|
491
|
-
const l = n ? Tn :
|
|
492
|
+
const l = n ? Tn : bo, c = n ? "Drag & drop" : "SQL", d = n ? "Switch to drag-and-drop mode" : "Switch to SQL mode";
|
|
492
493
|
return /* @__PURE__ */ s(
|
|
493
494
|
"button",
|
|
494
495
|
{
|
|
@@ -507,7 +508,7 @@ function Ac({ className: e }) {
|
|
|
507
508
|
}
|
|
508
509
|
);
|
|
509
510
|
}
|
|
510
|
-
function
|
|
511
|
+
function Tc({
|
|
511
512
|
open: e,
|
|
512
513
|
onOpenChange: n,
|
|
513
514
|
onSave: r,
|
|
@@ -547,15 +548,15 @@ function Ic({
|
|
|
547
548
|
] })
|
|
548
549
|
] }) });
|
|
549
550
|
}
|
|
550
|
-
const
|
|
551
|
-
function
|
|
551
|
+
const Oi = 1e4, Vi = 15e3, $i = 3e4, Ui = 3e4, _i = 12e4, Or = 2 * 60 * 60 * 1e3;
|
|
552
|
+
function ji(e) {
|
|
552
553
|
const n = Date.now() - e.getTime();
|
|
553
|
-
return n <
|
|
554
|
+
return n < Ui ? Oi : n < _i ? Vi : $i;
|
|
554
555
|
}
|
|
555
|
-
function
|
|
556
|
+
function Lc() {
|
|
556
557
|
const { authToken: e, tokenProps: n } = Dt(), r = ot((h) => h.activeExports), [a, o] = S(
|
|
557
558
|
typeof document < "u" ? !document.hidden : !0
|
|
558
|
-
), i =
|
|
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 = me(() => {
|
|
559
560
|
const h = ot.getState().activeExports;
|
|
560
561
|
return Array.from(h.values()).filter(
|
|
561
562
|
(b) => _n(b.status)
|
|
@@ -639,7 +640,7 @@ function Dc() {
|
|
|
639
640
|
const x = L.reduce(
|
|
640
641
|
(T, $) => $.startedAt < T ? $.startedAt : T,
|
|
641
642
|
L[0].startedAt
|
|
642
|
-
), C =
|
|
643
|
+
), C = ji(x);
|
|
643
644
|
i.current && clearTimeout(i.current), i.current = setTimeout(() => {
|
|
644
645
|
var T;
|
|
645
646
|
(T = c.current) == null || T.call(c);
|
|
@@ -666,13 +667,13 @@ function Dc() {
|
|
|
666
667
|
inProgressCount: p().length
|
|
667
668
|
};
|
|
668
669
|
}
|
|
669
|
-
function
|
|
670
|
-
const { authToken: e, tokenProps: n } = Dt(), r = ot((c) => c.activeExports), { addExport: a } = Ca(), o =
|
|
670
|
+
function Rc() {
|
|
671
|
+
const { authToken: e, tokenProps: n } = Dt(), r = ot((c) => c.activeExports), { addExport: a } = Ca(), o = Ee(!1), i = n == null ? void 0 : n.apiServiceUrl, l = e == null ? void 0 : e.accessToken;
|
|
671
672
|
ce(() => {
|
|
672
673
|
if (o.current || !i || !l) return;
|
|
673
674
|
(async () => {
|
|
674
675
|
try {
|
|
675
|
-
const { exports: d } = await
|
|
676
|
+
const { exports: d } = await xo(i, l, {
|
|
676
677
|
status: ["pending", "processing", "chunking", "compacting", "completed", "failed"],
|
|
677
678
|
limit: 20
|
|
678
679
|
// Limit to recent exports
|
|
@@ -694,7 +695,7 @@ function Tc() {
|
|
|
694
695
|
id: u.id,
|
|
695
696
|
status: u.status,
|
|
696
697
|
progress: p,
|
|
697
|
-
title:
|
|
698
|
+
title: zi(u),
|
|
698
699
|
totalRows: u.totalRows,
|
|
699
700
|
totalChunks: u.totalChunks,
|
|
700
701
|
completedChunks: u.completedChunks,
|
|
@@ -715,12 +716,12 @@ function Tc() {
|
|
|
715
716
|
})();
|
|
716
717
|
}, [i, l, a, r]);
|
|
717
718
|
}
|
|
718
|
-
function
|
|
719
|
+
function zi(e) {
|
|
719
720
|
return e.title ? e.title : _n(
|
|
720
721
|
e.status
|
|
721
722
|
) ? "Export in progress..." : e.status === "completed" ? "Export completed" : e.status === "failed" ? "Export failed" : "Export";
|
|
722
723
|
}
|
|
723
|
-
function
|
|
724
|
+
function Ki({
|
|
724
725
|
export: e,
|
|
725
726
|
onRemove: n
|
|
726
727
|
}) {
|
|
@@ -731,9 +732,9 @@ function zi({
|
|
|
731
732
|
}, o = () => {
|
|
732
733
|
switch (e.status) {
|
|
733
734
|
case "completed":
|
|
734
|
-
return /* @__PURE__ */ t(
|
|
735
|
+
return /* @__PURE__ */ t(wo, { className: "mt-0.5 h-5 w-5 shrink-0 text-green-600" });
|
|
735
736
|
case "failed":
|
|
736
|
-
return /* @__PURE__ */ t(
|
|
737
|
+
return /* @__PURE__ */ t(ki, { className: "mt-0.5 h-5 w-5 shrink-0 text-destructive" });
|
|
737
738
|
default:
|
|
738
739
|
return /* @__PURE__ */ t(ne, { className: "text-foreground-muted mt-0.5 h-5 w-5 shrink-0 animate-spin" });
|
|
739
740
|
}
|
|
@@ -764,7 +765,7 @@ function zi({
|
|
|
764
765
|
] }),
|
|
765
766
|
e.fileSize && /* @__PURE__ */ s(ae, { children: [
|
|
766
767
|
/* @__PURE__ */ t("span", { children: "•" }),
|
|
767
|
-
/* @__PURE__ */ t("span", { children:
|
|
768
|
+
/* @__PURE__ */ t("span", { children: yo(e.fileSize) })
|
|
768
769
|
] })
|
|
769
770
|
] }),
|
|
770
771
|
i && /* @__PURE__ */ t("div", { className: "text-xs text-muted-foreground", children: l }),
|
|
@@ -794,14 +795,14 @@ function zi({
|
|
|
794
795
|
className: "h-8 bg-transparent",
|
|
795
796
|
onClick: r,
|
|
796
797
|
children: [
|
|
797
|
-
/* @__PURE__ */ t(
|
|
798
|
+
/* @__PURE__ */ t(vo, { className: "mr-1.5 h-3.5 w-3.5" }),
|
|
798
799
|
"Download"
|
|
799
800
|
]
|
|
800
801
|
}
|
|
801
802
|
)
|
|
802
803
|
] }),
|
|
803
804
|
i && /* @__PURE__ */ s("div", { children: [
|
|
804
|
-
/* @__PURE__ */ t(
|
|
805
|
+
/* @__PURE__ */ t(No, { value: e.progress, className: "h-1.5" }),
|
|
805
806
|
/* @__PURE__ */ s("span", { className: "mt-1 block text-xs text-muted-foreground", children: [
|
|
806
807
|
e.progress,
|
|
807
808
|
"% complete"
|
|
@@ -811,7 +812,7 @@ function zi({
|
|
|
811
812
|
] })
|
|
812
813
|
] });
|
|
813
814
|
}
|
|
814
|
-
function
|
|
815
|
+
function Hi() {
|
|
815
816
|
const { authToken: e, tokenProps: n } = Dt(), r = ot((k) => k.activeExports), { clearCompleted: a, removeExport: o, updateExport: i } = Ca(), [l, c] = S(!1), [d, u] = S(!1), p = Array.from(r.values()).sort(
|
|
816
817
|
(k, N) => N.startedAt.getTime() - k.startedAt.getTime()
|
|
817
818
|
), f = p.some(
|
|
@@ -941,7 +942,7 @@ function Ki() {
|
|
|
941
942
|
] })
|
|
942
943
|
] }),
|
|
943
944
|
/* @__PURE__ */ t("div", { className: "max-h-[350px] overflow-y-auto", children: /* @__PURE__ */ t("div", { className: "divide-y", children: p.map((k) => /* @__PURE__ */ t(
|
|
944
|
-
|
|
945
|
+
Ki,
|
|
945
946
|
{
|
|
946
947
|
export: k,
|
|
947
948
|
onRemove: D
|
|
@@ -950,10 +951,10 @@ function Ki() {
|
|
|
950
951
|
)) }) })
|
|
951
952
|
] });
|
|
952
953
|
}
|
|
953
|
-
function
|
|
954
|
+
function Fc({
|
|
954
955
|
variant: e
|
|
955
956
|
}) {
|
|
956
|
-
const n = ot((d) => d.activeExports), r =
|
|
957
|
+
const n = ot((d) => d.activeExports), r = Co(), a = n.size > 0, o = Array.from(n.values()).some(
|
|
957
958
|
(d) => d.status === "completed" || d.status === "failed"
|
|
958
959
|
), l = r > 0 ? r > 9 ? "9+" : String(r) : null;
|
|
959
960
|
return /* @__PURE__ */ s(Fe, { children: [
|
|
@@ -965,7 +966,7 @@ function Lc({
|
|
|
965
966
|
className: "relative w-7 px-0 text-muted-foreground hover:text-foreground",
|
|
966
967
|
"aria-label": "Export notifications",
|
|
967
968
|
children: [
|
|
968
|
-
/* @__PURE__ */ t(
|
|
969
|
+
/* @__PURE__ */ t(ko, { className: "h-3.5 w-3.5" }),
|
|
969
970
|
a && /* @__PURE__ */ t(
|
|
970
971
|
"span",
|
|
971
972
|
{
|
|
@@ -976,10 +977,10 @@ function Lc({
|
|
|
976
977
|
]
|
|
977
978
|
}
|
|
978
979
|
) }),
|
|
979
|
-
/* @__PURE__ */ t(Xe, { className: "w-80 p-0", align: "end", sideOffset: 8, children: /* @__PURE__ */ t(
|
|
980
|
+
/* @__PURE__ */ t(Xe, { className: "w-80 p-0", align: "end", sideOffset: 8, children: /* @__PURE__ */ t(Hi, {}) })
|
|
980
981
|
] });
|
|
981
982
|
}
|
|
982
|
-
function
|
|
983
|
+
function qi(e) {
|
|
983
984
|
if (e)
|
|
984
985
|
return {
|
|
985
986
|
renamed: e.type === "rename" ? { oldId: e.oldId, newId: e.newId } : void 0,
|
|
@@ -988,7 +989,7 @@ function Hi(e) {
|
|
|
988
989
|
affectedBindingControlIds: e.type === "add" || e.type === "update" ? e.affectedBindingControlIds : void 0
|
|
989
990
|
};
|
|
990
991
|
}
|
|
991
|
-
function
|
|
992
|
+
function Wi({
|
|
992
993
|
open: e,
|
|
993
994
|
onOpenChange: n,
|
|
994
995
|
trigger: r,
|
|
@@ -1002,7 +1003,7 @@ function qi({
|
|
|
1002
1003
|
preventPassiveDismissDuringCreate: u,
|
|
1003
1004
|
resolvedOpen: p,
|
|
1004
1005
|
setIsCreateFlowActive: f
|
|
1005
|
-
} =
|
|
1006
|
+
} = Va({
|
|
1006
1007
|
open: e,
|
|
1007
1008
|
onOpenChange: n,
|
|
1008
1009
|
initialCreateFlowActive: o === "create",
|
|
@@ -1013,16 +1014,16 @@ function qi({
|
|
|
1013
1014
|
// create and make consumers use `forceClose()` from a dedicated
|
|
1014
1015
|
// button.
|
|
1015
1016
|
dismissMode: a ? "passive" : "explicit-only"
|
|
1016
|
-
}), h = H((
|
|
1017
|
+
}), h = H((E) => E.dashboard), { setDashboardControlsModel: b } = bt(), { participants: D } = So(ao(h)), k = Array.from(
|
|
1017
1018
|
new Map(
|
|
1018
1019
|
D.flatMap(
|
|
1019
|
-
(
|
|
1020
|
+
(E) => E.fieldChoices.map((P) => {
|
|
1020
1021
|
var z;
|
|
1021
1022
|
return [
|
|
1022
1023
|
P.value,
|
|
1023
1024
|
{
|
|
1024
1025
|
option: P,
|
|
1025
|
-
target: (z =
|
|
1026
|
+
target: (z = E.fieldTargetMap) == null ? void 0 : z[P.value]
|
|
1026
1027
|
}
|
|
1027
1028
|
];
|
|
1028
1029
|
})
|
|
@@ -1031,26 +1032,26 @@ function qi({
|
|
|
1031
1032
|
), N = Array.from(
|
|
1032
1033
|
new Map(
|
|
1033
1034
|
D.flatMap(
|
|
1034
|
-
(
|
|
1035
|
+
(E) => E.metricChoices.map((P) => {
|
|
1035
1036
|
var z;
|
|
1036
1037
|
return [
|
|
1037
1038
|
P.value,
|
|
1038
1039
|
{
|
|
1039
1040
|
option: P,
|
|
1040
|
-
target: (z =
|
|
1041
|
+
target: (z = E.metricTargetMap) == null ? void 0 : z[P.value]
|
|
1041
1042
|
}
|
|
1042
1043
|
];
|
|
1043
1044
|
})
|
|
1044
1045
|
)
|
|
1045
1046
|
).values()
|
|
1046
|
-
), g =
|
|
1047
|
+
), g = so({
|
|
1047
1048
|
...h || {},
|
|
1048
1049
|
controls: []
|
|
1049
|
-
}), L = Ao(h), x = (
|
|
1050
|
+
}), L = Ao(h), x = (E, P, z) => {
|
|
1050
1051
|
b(
|
|
1051
|
-
|
|
1052
|
+
E,
|
|
1052
1053
|
P,
|
|
1053
|
-
|
|
1054
|
+
qi(z)
|
|
1054
1055
|
);
|
|
1055
1056
|
}, C = me(() => {
|
|
1056
1057
|
if (i) {
|
|
@@ -1059,13 +1060,13 @@ function qi({
|
|
|
1059
1060
|
}
|
|
1060
1061
|
f(!1);
|
|
1061
1062
|
}, [i, l, f]), T = /* @__PURE__ */ t(
|
|
1062
|
-
|
|
1063
|
+
$a,
|
|
1063
1064
|
{
|
|
1064
1065
|
scope: "dashboard",
|
|
1065
1066
|
controls: h.controls || [],
|
|
1066
1067
|
reservedControlIds: g,
|
|
1067
1068
|
defaultValues: h.defaultControlValues || {},
|
|
1068
|
-
usageByControlId:
|
|
1069
|
+
usageByControlId: Eo(h),
|
|
1069
1070
|
availableFieldChoices: k,
|
|
1070
1071
|
availableMetricChoices: N,
|
|
1071
1072
|
structuralParticipants: D,
|
|
@@ -1126,7 +1127,7 @@ function qi({
|
|
|
1126
1127
|
}
|
|
1127
1128
|
) });
|
|
1128
1129
|
}
|
|
1129
|
-
const
|
|
1130
|
+
const Gi = [
|
|
1130
1131
|
"enum",
|
|
1131
1132
|
"multi_enum",
|
|
1132
1133
|
"text",
|
|
@@ -1134,7 +1135,7 @@ const Wi = [
|
|
|
1134
1135
|
"boolean",
|
|
1135
1136
|
"date"
|
|
1136
1137
|
];
|
|
1137
|
-
function
|
|
1138
|
+
function Ji({
|
|
1138
1139
|
open: e,
|
|
1139
1140
|
onOpenChange: n,
|
|
1140
1141
|
initialMode: r = "manage"
|
|
@@ -1147,29 +1148,29 @@ function Gi({
|
|
|
1147
1148
|
preventPassiveDismissDuringCreate: c,
|
|
1148
1149
|
resolvedOpen: d,
|
|
1149
1150
|
setIsCreateFlowActive: u
|
|
1150
|
-
} =
|
|
1151
|
+
} = Va({
|
|
1151
1152
|
open: e,
|
|
1152
1153
|
onOpenChange: n,
|
|
1153
1154
|
initialCreateFlowActive: r === "create",
|
|
1154
1155
|
dismissMode: "explicit-only"
|
|
1155
|
-
}), p = H((
|
|
1156
|
-
(
|
|
1156
|
+
}), p = H((E) => E.dashboard), f = H((E) => E.selectedSheetId), { setDashboardInputs: h } = bt(), b = (R = p.sheets) == null ? void 0 : R.find(
|
|
1157
|
+
(E) => E.id === f
|
|
1157
1158
|
), D = (b == null ? void 0 : b.kind) === "document" && !!b.document, k = V(
|
|
1158
|
-
() => D && (b != null && b.document) ?
|
|
1159
|
+
() => D && (b != null && b.document) ? Io(p, b.id) : [],
|
|
1159
1160
|
[p, D, b == null ? void 0 : b.document, b == null ? void 0 : b.id]
|
|
1160
1161
|
), N = V(
|
|
1161
1162
|
() => k.filter(
|
|
1162
|
-
(
|
|
1163
|
+
(E) => E.kind === "control"
|
|
1163
1164
|
),
|
|
1164
1165
|
[k]
|
|
1165
1166
|
), g = V(
|
|
1166
|
-
() => N.map((
|
|
1167
|
+
() => N.map((E) => E.control),
|
|
1167
1168
|
[N]
|
|
1168
1169
|
), L = V(
|
|
1169
|
-
() =>
|
|
1170
|
+
() => Yi(g),
|
|
1170
1171
|
[g]
|
|
1171
1172
|
), x = V(
|
|
1172
|
-
() =>
|
|
1173
|
+
() => Qi(p),
|
|
1173
1174
|
[p]
|
|
1174
1175
|
), C = me(() => {
|
|
1175
1176
|
if (a) {
|
|
@@ -1178,13 +1179,13 @@ function Gi({
|
|
|
1178
1179
|
}
|
|
1179
1180
|
u(!1);
|
|
1180
1181
|
}, [a, o, u]), T = me(
|
|
1181
|
-
(
|
|
1182
|
+
(E, P, z) => {
|
|
1182
1183
|
!D || !(b != null && b.document) || h(
|
|
1183
|
-
|
|
1184
|
+
Xi({
|
|
1184
1185
|
allInputs: p.inputs || [],
|
|
1185
1186
|
documentSheetId: b.id,
|
|
1186
1187
|
currentDocumentInputs: k,
|
|
1187
|
-
nextControls:
|
|
1188
|
+
nextControls: E,
|
|
1188
1189
|
nextDefaultValues: P,
|
|
1189
1190
|
change: z
|
|
1190
1191
|
})
|
|
@@ -1216,7 +1217,7 @@ function Gi({
|
|
|
1216
1217
|
)
|
|
1217
1218
|
] }),
|
|
1218
1219
|
/* @__PURE__ */ t("div", { className: "min-h-0 overflow-y-auto pr-1", children: /* @__PURE__ */ t(
|
|
1219
|
-
|
|
1220
|
+
$a,
|
|
1220
1221
|
{
|
|
1221
1222
|
scope: "dashboard",
|
|
1222
1223
|
controls: g,
|
|
@@ -1227,7 +1228,7 @@ function Gi({
|
|
|
1227
1228
|
availableMetricChoices: [],
|
|
1228
1229
|
structuralParticipants: [],
|
|
1229
1230
|
structuralParticipantIdsByControlId: {},
|
|
1230
|
-
allowedControlTypes:
|
|
1231
|
+
allowedControlTypes: Gi,
|
|
1231
1232
|
initialCreateFlow: r === "create",
|
|
1232
1233
|
onCreateFlowActiveChange: u,
|
|
1233
1234
|
onCreateFlowComplete: C,
|
|
@@ -1239,22 +1240,22 @@ function Gi({
|
|
|
1239
1240
|
}
|
|
1240
1241
|
) });
|
|
1241
1242
|
}
|
|
1242
|
-
function
|
|
1243
|
+
function Qi(e) {
|
|
1243
1244
|
return (e.controls || []).map((n) => n.id);
|
|
1244
1245
|
}
|
|
1245
|
-
function
|
|
1246
|
+
function Yi(e) {
|
|
1246
1247
|
const n = {};
|
|
1247
1248
|
for (const r of e)
|
|
1248
1249
|
r.defaultValue !== void 0 && (n[r.id] = r.defaultValue);
|
|
1249
1250
|
return n;
|
|
1250
1251
|
}
|
|
1251
|
-
function
|
|
1252
|
+
function Zi(e, n) {
|
|
1252
1253
|
return n ? Object.prototype.hasOwnProperty.call(n, e.id) ? {
|
|
1253
1254
|
...e,
|
|
1254
1255
|
defaultValue: n[e.id]
|
|
1255
1256
|
} : e.defaultValue === void 0 ? e : { ...e, defaultValue: void 0 } : e.defaultValue === void 0 ? e : { ...e, defaultValue: void 0 };
|
|
1256
1257
|
}
|
|
1257
|
-
function
|
|
1258
|
+
function Xi({
|
|
1258
1259
|
allInputs: e,
|
|
1259
1260
|
documentSheetId: n,
|
|
1260
1261
|
currentDocumentInputs: r,
|
|
@@ -1265,7 +1266,7 @@ function Zi({
|
|
|
1265
1266
|
const l = new Map(
|
|
1266
1267
|
a.map((h) => [
|
|
1267
1268
|
h.id,
|
|
1268
|
-
|
|
1269
|
+
Zi(h, o)
|
|
1269
1270
|
])
|
|
1270
1271
|
), c = (i == null ? void 0 : i.type) === "rename" ? { oldId: i.oldId, newId: i.newId } : null, d = /* @__PURE__ */ new Set(), u = [];
|
|
1271
1272
|
for (const h of r) {
|
|
@@ -1277,7 +1278,7 @@ function Zi({
|
|
|
1277
1278
|
if (!b)
|
|
1278
1279
|
continue;
|
|
1279
1280
|
d.add(b.id);
|
|
1280
|
-
const D =
|
|
1281
|
+
const D = Do(
|
|
1281
1282
|
b.id,
|
|
1282
1283
|
[...e, ...u].filter(
|
|
1283
1284
|
(N) => N.id !== h.id
|
|
@@ -1293,7 +1294,7 @@ function Zi({
|
|
|
1293
1294
|
}
|
|
1294
1295
|
for (const h of l.values())
|
|
1295
1296
|
d.has(h.id) || u.push(
|
|
1296
|
-
|
|
1297
|
+
To({
|
|
1297
1298
|
control: h,
|
|
1298
1299
|
existingInputs: [...e, ...u],
|
|
1299
1300
|
sheetId: n
|
|
@@ -1306,7 +1307,7 @@ function Zi({
|
|
|
1306
1307
|
(h) => !p.has(h.id)
|
|
1307
1308
|
), ...u];
|
|
1308
1309
|
}
|
|
1309
|
-
function
|
|
1310
|
+
function el({
|
|
1310
1311
|
showFilters: e,
|
|
1311
1312
|
onShowFiltersChange: n,
|
|
1312
1313
|
pickerContent: r,
|
|
@@ -1318,7 +1319,7 @@ function Xi({
|
|
|
1318
1319
|
pickerContentClassName: d,
|
|
1319
1320
|
settingsContentClassName: u
|
|
1320
1321
|
}) {
|
|
1321
|
-
const p = o === "toolbar", [f, h] = S(!1), b =
|
|
1322
|
+
const p = o === "toolbar", [f, h] = S(!1), b = Lo("interactive");
|
|
1322
1323
|
return /* @__PURE__ */ s(
|
|
1323
1324
|
"div",
|
|
1324
1325
|
{
|
|
@@ -1342,7 +1343,7 @@ function Xi({
|
|
|
1342
1343
|
l
|
|
1343
1344
|
),
|
|
1344
1345
|
children: [
|
|
1345
|
-
e ? /* @__PURE__ */ t(
|
|
1346
|
+
e ? /* @__PURE__ */ t(Li, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ t(ka, { className: "h-3.5 w-3.5" }),
|
|
1346
1347
|
"Filter"
|
|
1347
1348
|
]
|
|
1348
1349
|
}
|
|
@@ -1393,8 +1394,8 @@ function Xi({
|
|
|
1393
1394
|
}
|
|
1394
1395
|
);
|
|
1395
1396
|
}
|
|
1396
|
-
function
|
|
1397
|
-
|
|
1397
|
+
function tl() {
|
|
1398
|
+
Si();
|
|
1398
1399
|
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 } = pa(), l = ct((d) => d.card.dataSource);
|
|
1399
1400
|
return ce(() => {
|
|
1400
1401
|
var u, p;
|
|
@@ -1411,36 +1412,30 @@ function el() {
|
|
|
1411
1412
|
hasEntities: !!(l != null && l.selectedEntities && l.selectedEntities.length > 0)
|
|
1412
1413
|
};
|
|
1413
1414
|
}
|
|
1414
|
-
function
|
|
1415
|
-
const e = H((
|
|
1416
|
-
(
|
|
1417
|
-
), r = H((
|
|
1415
|
+
function nl() {
|
|
1416
|
+
const e = H((d) => d.dashboard), n = H(
|
|
1417
|
+
(d) => d.semanticExecutionPayload
|
|
1418
|
+
), r = H((d) => d.actions.addFilter), { hasEntities: a } = tl(), { isLoading: o } = Ro(), i = V(
|
|
1418
1419
|
() => Fo(e, n),
|
|
1419
1420
|
[e, n]
|
|
1420
|
-
),
|
|
1421
|
+
), c = !Po(e.filters) && i.hasEligibleCards && !o;
|
|
1421
1422
|
return /* @__PURE__ */ s("div", { className: "flex h-[520px] w-[400px] flex-col", children: [
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
"
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
"
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
/* @__PURE__ */ t("span", { className: "text-[11px] leading-[1.4] text-muted-foreground", children: "One date range, applied across every date-aware card on the dashboard." })
|
|
1439
|
-
] })
|
|
1440
|
-
]
|
|
1441
|
-
}
|
|
1442
|
-
)
|
|
1443
|
-
] }),
|
|
1423
|
+
c && /* @__PURE__ */ t("div", { className: "border-b border-border/60 p-2", children: /* @__PURE__ */ s(
|
|
1424
|
+
"button",
|
|
1425
|
+
{
|
|
1426
|
+
type: "button",
|
|
1427
|
+
onClick: () => r(Bo()),
|
|
1428
|
+
title: `Applies to ${i.eligibleCardCount} of ${i.totalCardCount} date-aware cards`,
|
|
1429
|
+
className: "flex w-full items-start gap-2 rounded-[4px] px-2 py-1.5 text-left outline-none transition-colors hover:bg-muted/40 focus-visible:bg-muted/40 focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-border",
|
|
1430
|
+
children: [
|
|
1431
|
+
/* @__PURE__ */ t(Mo, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
|
|
1432
|
+
/* @__PURE__ */ s("span", { className: "flex min-w-0 flex-col", children: [
|
|
1433
|
+
/* @__PURE__ */ t("span", { className: "text-[12px] font-medium text-foreground", children: "Add global date filter" }),
|
|
1434
|
+
/* @__PURE__ */ t("span", { className: "text-[11px] leading-[1.4] text-muted-foreground", children: "One date range across all date-aware cards." })
|
|
1435
|
+
] })
|
|
1436
|
+
]
|
|
1437
|
+
}
|
|
1438
|
+
) }),
|
|
1444
1439
|
!a && /* @__PURE__ */ s("div", { className: "flex flex-1 flex-col items-center justify-center px-6 py-8 text-center", children: [
|
|
1445
1440
|
/* @__PURE__ */ t(gt, { className: "mb-3 h-10 w-10 text-muted-foreground/50" }),
|
|
1446
1441
|
/* @__PURE__ */ t("h3", { className: "mb-1 text-[13px] font-medium text-foreground", children: "No fields configured" }),
|
|
@@ -1450,7 +1445,7 @@ function tl() {
|
|
|
1450
1445
|
] });
|
|
1451
1446
|
}
|
|
1452
1447
|
const Vr = !1;
|
|
1453
|
-
function
|
|
1448
|
+
function rl({
|
|
1454
1449
|
onAddFilter: e,
|
|
1455
1450
|
onAddControl: n,
|
|
1456
1451
|
onManageControls: r,
|
|
@@ -1486,7 +1481,7 @@ function nl({
|
|
|
1486
1481
|
/* @__PURE__ */ t(
|
|
1487
1482
|
un,
|
|
1488
1483
|
{
|
|
1489
|
-
icon:
|
|
1484
|
+
icon: Sa,
|
|
1490
1485
|
label: "Manage controls",
|
|
1491
1486
|
onClick: () => {
|
|
1492
1487
|
r(), a();
|
|
@@ -1499,7 +1494,7 @@ function nl({
|
|
|
1499
1494
|
/* @__PURE__ */ t("p", { className: "px-1 text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Display" }),
|
|
1500
1495
|
Vr,
|
|
1501
1496
|
/* @__PURE__ */ t(
|
|
1502
|
-
|
|
1497
|
+
al,
|
|
1503
1498
|
{
|
|
1504
1499
|
id: "filter-display-wrap",
|
|
1505
1500
|
label: "Wrap to multiple lines",
|
|
@@ -1529,7 +1524,7 @@ function un({
|
|
|
1529
1524
|
}
|
|
1530
1525
|
);
|
|
1531
1526
|
}
|
|
1532
|
-
function
|
|
1527
|
+
function al({
|
|
1533
1528
|
id: e,
|
|
1534
1529
|
label: n,
|
|
1535
1530
|
checked: r,
|
|
@@ -1547,7 +1542,7 @@ function rl({
|
|
|
1547
1542
|
)
|
|
1548
1543
|
] });
|
|
1549
1544
|
}
|
|
1550
|
-
function
|
|
1545
|
+
function Pc({
|
|
1551
1546
|
size: e,
|
|
1552
1547
|
className: n,
|
|
1553
1548
|
primaryButtonClassName: r,
|
|
@@ -1586,13 +1581,13 @@ function Rc({
|
|
|
1586
1581
|
}, [g]);
|
|
1587
1582
|
return /* @__PURE__ */ s(ae, { children: [
|
|
1588
1583
|
/* @__PURE__ */ t(
|
|
1589
|
-
|
|
1584
|
+
el,
|
|
1590
1585
|
{
|
|
1591
1586
|
showFilters: N ? !1 : p,
|
|
1592
1587
|
onShowFiltersChange: L,
|
|
1593
|
-
pickerContent: /* @__PURE__ */ t(
|
|
1588
|
+
pickerContent: /* @__PURE__ */ t(nl, {}),
|
|
1594
1589
|
settingsContent: (R) => /* @__PURE__ */ t(
|
|
1595
|
-
|
|
1590
|
+
rl,
|
|
1596
1591
|
{
|
|
1597
1592
|
onAddFilter: x,
|
|
1598
1593
|
onAddControl: C,
|
|
@@ -1609,7 +1604,7 @@ function Rc({
|
|
|
1609
1604
|
}
|
|
1610
1605
|
),
|
|
1611
1606
|
l ? N ? /* @__PURE__ */ t(
|
|
1612
|
-
|
|
1607
|
+
Ji,
|
|
1613
1608
|
{
|
|
1614
1609
|
open: !0,
|
|
1615
1610
|
onOpenChange: (R) => {
|
|
@@ -1618,7 +1613,7 @@ function Rc({
|
|
|
1618
1613
|
initialMode: l
|
|
1619
1614
|
}
|
|
1620
1615
|
) : /* @__PURE__ */ t(
|
|
1621
|
-
|
|
1616
|
+
Wi,
|
|
1622
1617
|
{
|
|
1623
1618
|
open: !0,
|
|
1624
1619
|
onOpenChange: (R) => {
|
|
@@ -1635,7 +1630,7 @@ class Kn extends Error {
|
|
|
1635
1630
|
super(n), this.status = r, this.details = a, this.name = "BriefingsApiError";
|
|
1636
1631
|
}
|
|
1637
1632
|
}
|
|
1638
|
-
function
|
|
1633
|
+
function Ka(e, n) {
|
|
1639
1634
|
return `${e.replace(/\/$/, "")}${n}`;
|
|
1640
1635
|
}
|
|
1641
1636
|
function fe(e) {
|
|
@@ -1649,20 +1644,20 @@ function Ht(e) {
|
|
|
1649
1644
|
const r = n.toString();
|
|
1650
1645
|
return r ? `?${r}` : "";
|
|
1651
1646
|
}
|
|
1652
|
-
async function
|
|
1647
|
+
async function sl(e) {
|
|
1653
1648
|
if ((e.headers.get("content-type") ?? "").includes("application/json"))
|
|
1654
1649
|
return e.json().catch(() => ({}));
|
|
1655
1650
|
const r = await e.text().catch(() => "");
|
|
1656
1651
|
return r ? { error: r } : {};
|
|
1657
1652
|
}
|
|
1658
|
-
function
|
|
1653
|
+
function Ha(e) {
|
|
1659
1654
|
if (!e || typeof e != "object")
|
|
1660
1655
|
return null;
|
|
1661
1656
|
const n = e;
|
|
1662
1657
|
return typeof n.error == "string" ? n.error : null;
|
|
1663
1658
|
}
|
|
1664
1659
|
async function ge(e, n, r, a) {
|
|
1665
|
-
const o = await fetch(
|
|
1660
|
+
const o = await fetch(Ka(e, r), {
|
|
1666
1661
|
cache: (a == null ? void 0 : a.cache) ?? "no-store",
|
|
1667
1662
|
...a,
|
|
1668
1663
|
headers: {
|
|
@@ -1673,22 +1668,22 @@ async function ge(e, n, r, a) {
|
|
|
1673
1668
|
}), i = await o.json().catch(() => ({}));
|
|
1674
1669
|
if (!o.ok)
|
|
1675
1670
|
throw new Kn(
|
|
1676
|
-
|
|
1671
|
+
Ha(i) || "Briefings API request failed",
|
|
1677
1672
|
o.status,
|
|
1678
1673
|
i
|
|
1679
1674
|
);
|
|
1680
1675
|
return i;
|
|
1681
1676
|
}
|
|
1682
|
-
async function
|
|
1683
|
-
const o = await fetch(
|
|
1677
|
+
async function qa(e, n, r, a) {
|
|
1678
|
+
const o = await fetch(Ka(e, r), {
|
|
1684
1679
|
headers: {
|
|
1685
1680
|
Authorization: `Bearer ${n}`
|
|
1686
1681
|
}
|
|
1687
1682
|
});
|
|
1688
1683
|
if (!o.ok) {
|
|
1689
|
-
const i = await
|
|
1684
|
+
const i = await sl(o);
|
|
1690
1685
|
throw new Kn(
|
|
1691
|
-
|
|
1686
|
+
Ha(i) || "Briefing artifact request failed",
|
|
1692
1687
|
o.status,
|
|
1693
1688
|
i
|
|
1694
1689
|
);
|
|
@@ -1697,16 +1692,16 @@ async function Wa(e, n, r, a) {
|
|
|
1697
1692
|
kind: a,
|
|
1698
1693
|
content: await o.text(),
|
|
1699
1694
|
contentType: o.headers.get("content-type") ?? "text/plain",
|
|
1700
|
-
filename:
|
|
1695
|
+
filename: ol(o.headers.get("content-disposition"))
|
|
1701
1696
|
};
|
|
1702
1697
|
}
|
|
1703
|
-
function
|
|
1698
|
+
function ol(e) {
|
|
1704
1699
|
if (!e)
|
|
1705
1700
|
return;
|
|
1706
1701
|
const n = /filename="([^"]+)"/.exec(e);
|
|
1707
1702
|
return n == null ? void 0 : n[1];
|
|
1708
1703
|
}
|
|
1709
|
-
async function
|
|
1704
|
+
async function il(e, n, r) {
|
|
1710
1705
|
return ge(
|
|
1711
1706
|
e,
|
|
1712
1707
|
n,
|
|
@@ -1721,7 +1716,7 @@ async function ol(e, n, r) {
|
|
|
1721
1716
|
})}`
|
|
1722
1717
|
);
|
|
1723
1718
|
}
|
|
1724
|
-
async function
|
|
1719
|
+
async function Mc(e, n, r) {
|
|
1725
1720
|
return ge(
|
|
1726
1721
|
e,
|
|
1727
1722
|
n,
|
|
@@ -1730,14 +1725,14 @@ async function Fc(e, n, r) {
|
|
|
1730
1725
|
})}`
|
|
1731
1726
|
);
|
|
1732
1727
|
}
|
|
1733
|
-
async function
|
|
1728
|
+
async function Wa(e, n, r) {
|
|
1734
1729
|
return ge(
|
|
1735
1730
|
e,
|
|
1736
1731
|
n,
|
|
1737
1732
|
`/v1/briefings/${fe(r)}`
|
|
1738
1733
|
);
|
|
1739
1734
|
}
|
|
1740
|
-
async function
|
|
1735
|
+
async function ll(e, n, r) {
|
|
1741
1736
|
return ge(e, n, "/v1/briefings", {
|
|
1742
1737
|
method: "POST",
|
|
1743
1738
|
body: JSON.stringify(r)
|
|
@@ -1749,43 +1744,43 @@ async function Hn(e, n, r, a) {
|
|
|
1749
1744
|
body: JSON.stringify(a)
|
|
1750
1745
|
});
|
|
1751
1746
|
}
|
|
1752
|
-
async function
|
|
1747
|
+
async function Ga(e, n, r) {
|
|
1753
1748
|
return Hn(e, n, r, { status: "PAUSED" });
|
|
1754
1749
|
}
|
|
1755
|
-
async function
|
|
1750
|
+
async function Ja(e, n, r) {
|
|
1756
1751
|
return Hn(e, n, r, { status: "ACTIVE" });
|
|
1757
1752
|
}
|
|
1758
|
-
async function
|
|
1753
|
+
async function Qa(e, n, r) {
|
|
1759
1754
|
return ge(e, n, `/v1/briefings/${fe(r)}`, {
|
|
1760
1755
|
method: "DELETE"
|
|
1761
1756
|
});
|
|
1762
1757
|
}
|
|
1763
|
-
async function
|
|
1758
|
+
async function Ya(e, n, r, a) {
|
|
1764
1759
|
return ge(e, n, `/v1/briefings/${fe(r)}/runs`, {
|
|
1765
1760
|
method: "POST",
|
|
1766
1761
|
body: JSON.stringify(a)
|
|
1767
1762
|
});
|
|
1768
1763
|
}
|
|
1769
|
-
async function
|
|
1764
|
+
async function dl(e, n, r) {
|
|
1770
1765
|
return ge(e, n, "/v1/briefings/preview-plan", {
|
|
1771
1766
|
method: "POST",
|
|
1772
1767
|
body: JSON.stringify({ draft: r })
|
|
1773
1768
|
});
|
|
1774
1769
|
}
|
|
1775
|
-
async function
|
|
1770
|
+
async function cl(e, n, r) {
|
|
1776
1771
|
return ge(e, n, "/v1/briefings/preview-runs", {
|
|
1777
1772
|
method: "POST",
|
|
1778
1773
|
body: JSON.stringify(r)
|
|
1779
1774
|
});
|
|
1780
1775
|
}
|
|
1781
|
-
async function
|
|
1776
|
+
async function ul(e, n, r) {
|
|
1782
1777
|
return (await ge(
|
|
1783
1778
|
e,
|
|
1784
1779
|
n,
|
|
1785
1780
|
`/v1/briefings/preview-runs/${fe(r)}`
|
|
1786
1781
|
)).previewRun;
|
|
1787
1782
|
}
|
|
1788
|
-
async function
|
|
1783
|
+
async function Bc(e, n, r, a) {
|
|
1789
1784
|
return ge(
|
|
1790
1785
|
e,
|
|
1791
1786
|
n,
|
|
@@ -1796,14 +1791,14 @@ async function Pc(e, n, r, a) {
|
|
|
1796
1791
|
})}`
|
|
1797
1792
|
);
|
|
1798
1793
|
}
|
|
1799
|
-
async function
|
|
1794
|
+
async function Za(e, n, r, a) {
|
|
1800
1795
|
return (await ge(
|
|
1801
1796
|
e,
|
|
1802
1797
|
n,
|
|
1803
1798
|
`/v1/briefings/${fe(r)}/runs/${fe(a)}`
|
|
1804
1799
|
)).run;
|
|
1805
1800
|
}
|
|
1806
|
-
async function
|
|
1801
|
+
async function ml(e, n, r, a) {
|
|
1807
1802
|
return ge(
|
|
1808
1803
|
e,
|
|
1809
1804
|
n,
|
|
@@ -1814,7 +1809,7 @@ async function ul(e, n, r, a) {
|
|
|
1814
1809
|
}
|
|
1815
1810
|
);
|
|
1816
1811
|
}
|
|
1817
|
-
async function
|
|
1812
|
+
async function hl(e, n, r, a) {
|
|
1818
1813
|
return ge(
|
|
1819
1814
|
e,
|
|
1820
1815
|
n,
|
|
@@ -1824,23 +1819,23 @@ async function ml(e, n, r, a) {
|
|
|
1824
1819
|
}
|
|
1825
1820
|
);
|
|
1826
1821
|
}
|
|
1827
|
-
async function
|
|
1828
|
-
return
|
|
1822
|
+
async function Oc(e, n, r, a, o) {
|
|
1823
|
+
return qa(
|
|
1829
1824
|
e,
|
|
1830
1825
|
n,
|
|
1831
1826
|
`/v1/briefings/${fe(r)}/runs/${fe(a)}/artifact${Ht({ kind: o })}`,
|
|
1832
1827
|
o
|
|
1833
1828
|
);
|
|
1834
1829
|
}
|
|
1835
|
-
async function
|
|
1836
|
-
return
|
|
1830
|
+
async function Vc(e, n, r, a) {
|
|
1831
|
+
return qa(
|
|
1837
1832
|
e,
|
|
1838
1833
|
n,
|
|
1839
1834
|
`/v1/briefings/${fe(r)}/runs/${fe(a)}/evidence`,
|
|
1840
1835
|
"evidence"
|
|
1841
1836
|
);
|
|
1842
1837
|
}
|
|
1843
|
-
async function
|
|
1838
|
+
async function pl(e, n, r) {
|
|
1844
1839
|
var o;
|
|
1845
1840
|
const a = await ge(e, n, "/v1/ai/generate", {
|
|
1846
1841
|
method: "POST",
|
|
@@ -1857,12 +1852,12 @@ async function hl(e, n, r) {
|
|
|
1857
1852
|
);
|
|
1858
1853
|
return a.result.polished;
|
|
1859
1854
|
}
|
|
1860
|
-
const
|
|
1855
|
+
const fl = {
|
|
1861
1856
|
pageSize: "letter",
|
|
1862
1857
|
orientation: "portrait",
|
|
1863
1858
|
includeFilters: !0,
|
|
1864
1859
|
includeTimestamp: !0
|
|
1865
|
-
},
|
|
1860
|
+
}, gl = {
|
|
1866
1861
|
delimiter: ",",
|
|
1867
1862
|
includeHeaders: !0,
|
|
1868
1863
|
useFormattedValues: !0
|
|
@@ -1900,7 +1895,7 @@ function qn(e) {
|
|
|
1900
1895
|
return "Dashboard card";
|
|
1901
1896
|
}
|
|
1902
1897
|
}
|
|
1903
|
-
function
|
|
1898
|
+
function bl(e) {
|
|
1904
1899
|
var n;
|
|
1905
1900
|
switch (e.type) {
|
|
1906
1901
|
case "dashboard":
|
|
@@ -1915,7 +1910,7 @@ function gl(e) {
|
|
|
1915
1910
|
return e.format === "csv" ? "Card data CSV" : "Card render";
|
|
1916
1911
|
}
|
|
1917
1912
|
}
|
|
1918
|
-
function
|
|
1913
|
+
function Xa(e) {
|
|
1919
1914
|
var n;
|
|
1920
1915
|
switch (e.type) {
|
|
1921
1916
|
case "dashboard":
|
|
@@ -1926,18 +1921,18 @@ function es(e) {
|
|
|
1926
1921
|
return ["pdf", "png"];
|
|
1927
1922
|
case "card": {
|
|
1928
1923
|
const r = (n = e.settings) == null ? void 0 : n.cardType;
|
|
1929
|
-
return
|
|
1924
|
+
return rs(r);
|
|
1930
1925
|
}
|
|
1931
1926
|
}
|
|
1932
1927
|
}
|
|
1933
|
-
function
|
|
1934
|
-
return
|
|
1928
|
+
function xl(e, n) {
|
|
1929
|
+
return Xa(e).includes(n) ? {
|
|
1935
1930
|
...Pe(e),
|
|
1936
1931
|
format: n,
|
|
1937
|
-
settings:
|
|
1932
|
+
settings: ns(e.settings, n)
|
|
1938
1933
|
} : Pe(e);
|
|
1939
1934
|
}
|
|
1940
|
-
function
|
|
1935
|
+
function yl(e, n) {
|
|
1941
1936
|
const r = {
|
|
1942
1937
|
...e.settings,
|
|
1943
1938
|
...n
|
|
@@ -1947,7 +1942,7 @@ function xl(e, n) {
|
|
|
1947
1942
|
settings: r
|
|
1948
1943
|
};
|
|
1949
1944
|
}
|
|
1950
|
-
function
|
|
1945
|
+
function es(e) {
|
|
1951
1946
|
var l, c;
|
|
1952
1947
|
if (e.source.type !== "dashboard")
|
|
1953
1948
|
return [];
|
|
@@ -1987,10 +1982,10 @@ function ts(e) {
|
|
|
1987
1982
|
defaultFormat: "pdf"
|
|
1988
1983
|
});
|
|
1989
1984
|
if (i)
|
|
1990
|
-
for (const d of
|
|
1985
|
+
for (const d of as(i)) {
|
|
1991
1986
|
if (d.card.type === "text")
|
|
1992
1987
|
continue;
|
|
1993
|
-
const u =
|
|
1988
|
+
const u = rs(d.card.type);
|
|
1994
1989
|
a.push({
|
|
1995
1990
|
key: `card:${n}:${d.card.id}`,
|
|
1996
1991
|
kind: "card",
|
|
@@ -2010,8 +2005,8 @@ function ts(e) {
|
|
|
2010
2005
|
}
|
|
2011
2006
|
return a;
|
|
2012
2007
|
}
|
|
2013
|
-
function
|
|
2014
|
-
const { option: n } = e, r = e.format ?? n.defaultFormat, a =
|
|
2008
|
+
function An(e) {
|
|
2009
|
+
const { option: n } = e, r = e.format ?? n.defaultFormat, a = vl({
|
|
2015
2010
|
option: n,
|
|
2016
2011
|
format: r,
|
|
2017
2012
|
runtime: e.runtime
|
|
@@ -2055,21 +2050,21 @@ function En(e) {
|
|
|
2055
2050
|
}
|
|
2056
2051
|
}
|
|
2057
2052
|
function Ur(e) {
|
|
2058
|
-
const n =
|
|
2059
|
-
return o ? [
|
|
2053
|
+
const n = es(e), r = n.find((i) => i.kind === "dashboard_sheet"), o = n.find((i) => i.kind === "dashboard") ?? r;
|
|
2054
|
+
return o ? [An({ option: o, runtime: e.runtime })] : [];
|
|
2060
2055
|
}
|
|
2061
|
-
function
|
|
2056
|
+
function vl(e) {
|
|
2062
2057
|
const n = {
|
|
2063
|
-
...
|
|
2058
|
+
...ns(void 0, e.format)
|
|
2064
2059
|
}, r = e.runtime;
|
|
2065
|
-
return r != null && r.theme && (n.theme = r.theme), e.option.kind === "dashboard" && (n.sheetSelection = "all"), e.option.kind === "dashboard_sheet" && (n.sheetSelection = "current", n.currentSheetId = e.option.sheetId, n.currentSheetName = e.option.title.replace(/\sPDF$/, "")), e.option.kind === "document_sheet" && (n.currentSheetId = e.option.sheetId, n.currentSheetName = e.option.title.replace(/\sPDF$/, "")), e.option.kind === "card" && (n.selectedSheetId = e.option.sheetId, n.cardType = e.option.cardType, e.option.cardControlDefinitions && (n.cardControlDefinitions = te(e.option.cardControlDefinitions)), e.option.controlBindings && (n.controlBindings = te(e.option.controlBindings)), e.option.tablePreferences && (n.tablePreferences = te(e.option.tablePreferences))),
|
|
2060
|
+
return r != null && r.theme && (n.theme = r.theme), e.option.kind === "dashboard" && (n.sheetSelection = "all"), e.option.kind === "dashboard_sheet" && (n.sheetSelection = "current", n.currentSheetId = e.option.sheetId, n.currentSheetName = e.option.title.replace(/\sPDF$/, "")), e.option.kind === "document_sheet" && (n.currentSheetId = e.option.sheetId, n.currentSheetName = e.option.title.replace(/\sPDF$/, "")), e.option.kind === "card" && (n.selectedSheetId = e.option.sheetId, n.cardType = e.option.cardType, e.option.cardControlDefinitions && (n.cardControlDefinitions = te(e.option.cardControlDefinitions)), e.option.controlBindings && (n.controlBindings = te(e.option.controlBindings)), e.option.tablePreferences && (n.tablePreferences = te(e.option.tablePreferences))), Nl({ settings: n, option: e.option, runtime: r }), n.includeFilters !== !1 && (n.filterLine = Al(n.filterValues)), n;
|
|
2066
2061
|
}
|
|
2067
|
-
function
|
|
2062
|
+
function Nl(e) {
|
|
2068
2063
|
const { settings: n, option: r, runtime: a } = e;
|
|
2069
2064
|
if (!a)
|
|
2070
2065
|
return;
|
|
2071
2066
|
if (r.kind === "card") {
|
|
2072
|
-
|
|
2067
|
+
wl({ settings: n, option: r, runtime: a });
|
|
2073
2068
|
return;
|
|
2074
2069
|
}
|
|
2075
2070
|
const o = r.kind === "dashboard" ? "all" : "current", i = r.kind === "dashboard" ? a.selectedSheetId : r.sheetId, l = _o({
|
|
@@ -2081,7 +2076,7 @@ function vl(e) {
|
|
|
2081
2076
|
cardControlValuesMap: a.cardControlValuesMap
|
|
2082
2077
|
});
|
|
2083
2078
|
n.sheetFilterValues = te(l.filterValues), n.filterValues = te(l.filterValues), n.controlValues = te(l.controlValues), a.controlDefinitions && (n.controlDefinitions = te(a.controlDefinitions));
|
|
2084
|
-
const c =
|
|
2079
|
+
const c = Cl({
|
|
2085
2080
|
option: r,
|
|
2086
2081
|
runtime: a,
|
|
2087
2082
|
selectedSheetId: r.kind === "dashboard" && o === "all" ? void 0 : i,
|
|
@@ -2091,7 +2086,7 @@ function vl(e) {
|
|
|
2091
2086
|
c
|
|
2092
2087
|
));
|
|
2093
2088
|
}
|
|
2094
|
-
function
|
|
2089
|
+
function wl(e) {
|
|
2095
2090
|
var u, p, f;
|
|
2096
2091
|
const { settings: n, option: r, runtime: a } = e, o = r.cardId, i = zo(
|
|
2097
2092
|
a.filters,
|
|
@@ -2130,7 +2125,7 @@ function Nl(e) {
|
|
|
2130
2125
|
...a.controlValues || {},
|
|
2131
2126
|
...((f = a.cardControlValuesMap) == null ? void 0 : f[o]) || {}
|
|
2132
2127
|
}, a.controlDefinitions && (n.controlDefinitions = te(a.controlDefinitions)));
|
|
2133
|
-
const d =
|
|
2128
|
+
const d = kl({
|
|
2134
2129
|
option: r,
|
|
2135
2130
|
runtime: a,
|
|
2136
2131
|
filterValues: n.filterValues,
|
|
@@ -2141,14 +2136,14 @@ function Nl(e) {
|
|
|
2141
2136
|
d
|
|
2142
2137
|
));
|
|
2143
2138
|
}
|
|
2144
|
-
function
|
|
2139
|
+
function Cl(e) {
|
|
2145
2140
|
var c;
|
|
2146
2141
|
const { option: n, runtime: r } = e, a = r.dashboard;
|
|
2147
2142
|
if (!((c = a == null ? void 0 : a.inputs) != null && c.length))
|
|
2148
2143
|
return;
|
|
2149
|
-
const o = (/* @__PURE__ */ new Date()).toISOString(), i =
|
|
2144
|
+
const o = (/* @__PURE__ */ new Date()).toISOString(), i = ts();
|
|
2150
2145
|
if (n.kind === "document_sheet" && n.sheetId)
|
|
2151
|
-
return
|
|
2146
|
+
return Ea({
|
|
2152
2147
|
dashboard: a,
|
|
2153
2148
|
sheetId: n.sheetId,
|
|
2154
2149
|
sheetKind: "document",
|
|
@@ -2181,12 +2176,12 @@ function wl(e) {
|
|
|
2181
2176
|
timezone: i
|
|
2182
2177
|
}).snapshot;
|
|
2183
2178
|
}
|
|
2184
|
-
function
|
|
2179
|
+
function kl(e) {
|
|
2185
2180
|
var c;
|
|
2186
2181
|
const { option: n, runtime: r } = e, a = r.dashboard;
|
|
2187
2182
|
if (!((c = a == null ? void 0 : a.inputs) != null && c.length) || !n.cardId)
|
|
2188
2183
|
return;
|
|
2189
|
-
const o =
|
|
2184
|
+
const o = Sl(a, n.sheetId, n.cardId), i = e.inlineFilterValues !== void 0 ? {
|
|
2190
2185
|
...r.inlineFilterValuesMap || {},
|
|
2191
2186
|
[n.cardId]: e.inlineFilterValues
|
|
2192
2187
|
} : r.inlineFilterValuesMap, l = e.filterValues !== void 0 ? qo({
|
|
@@ -2197,7 +2192,7 @@ function Cl(e) {
|
|
|
2197
2192
|
cardId: n.cardId,
|
|
2198
2193
|
sheetKind: "dashboard"
|
|
2199
2194
|
}) : r.dashboardInputValues;
|
|
2200
|
-
return
|
|
2195
|
+
return Ea({
|
|
2201
2196
|
dashboard: a,
|
|
2202
2197
|
sheetId: (o == null ? void 0 : o.sheet.id) || n.sheetId,
|
|
2203
2198
|
card: (o == null ? void 0 : o.card) || null,
|
|
@@ -2211,20 +2206,20 @@ function Cl(e) {
|
|
|
2211
2206
|
cardControlValuesMap: r.cardControlValuesMap
|
|
2212
2207
|
},
|
|
2213
2208
|
generatedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
2214
|
-
timezone:
|
|
2209
|
+
timezone: ts()
|
|
2215
2210
|
}).snapshot;
|
|
2216
2211
|
}
|
|
2217
|
-
function
|
|
2212
|
+
function Sl(e, n, r) {
|
|
2218
2213
|
const a = e.sheets || [], o = n ? a.filter((i) => i.id === n) : a;
|
|
2219
2214
|
for (const i of o)
|
|
2220
|
-
for (const l of
|
|
2215
|
+
for (const l of as(i))
|
|
2221
2216
|
if (l.card.id === r)
|
|
2222
2217
|
return { sheet: i, card: l.card };
|
|
2223
2218
|
}
|
|
2224
|
-
function
|
|
2219
|
+
function ts() {
|
|
2225
2220
|
return typeof Intl < "u" ? Intl.DateTimeFormat().resolvedOptions().timeZone : void 0;
|
|
2226
2221
|
}
|
|
2227
|
-
function
|
|
2222
|
+
function Al(e) {
|
|
2228
2223
|
if (!Array.isArray(e))
|
|
2229
2224
|
return "";
|
|
2230
2225
|
const n = e.filter(
|
|
@@ -2232,15 +2227,15 @@ function Sl(e) {
|
|
|
2232
2227
|
);
|
|
2233
2228
|
return jo(n);
|
|
2234
2229
|
}
|
|
2235
|
-
function
|
|
2236
|
-
return n === "csv" ? { ...
|
|
2230
|
+
function ns(e, n) {
|
|
2231
|
+
return n === "csv" ? { ...gl, ...e } : { ...fl, ...e };
|
|
2237
2232
|
}
|
|
2238
|
-
function
|
|
2233
|
+
function rs(e) {
|
|
2239
2234
|
return e ? Uo(e).filter(
|
|
2240
2235
|
(n) => n !== "png"
|
|
2241
2236
|
) : ["pdf"];
|
|
2242
2237
|
}
|
|
2243
|
-
function
|
|
2238
|
+
function as(e) {
|
|
2244
2239
|
const n = [], r = /* @__PURE__ */ new Set(), a = (o, i) => {
|
|
2245
2240
|
!(o != null && o.id) || r.has(o.id) || (r.add(o.id), n.push({ card: o, frame: i }));
|
|
2246
2241
|
};
|
|
@@ -2263,7 +2258,7 @@ function hn(e) {
|
|
|
2263
2258
|
function te(e) {
|
|
2264
2259
|
return typeof structuredClone == "function" ? structuredClone(e) : JSON.parse(JSON.stringify(e));
|
|
2265
2260
|
}
|
|
2266
|
-
const
|
|
2261
|
+
const ss = ["markdown"], El = {
|
|
2267
2262
|
name: "",
|
|
2268
2263
|
description: "",
|
|
2269
2264
|
instruction: "",
|
|
@@ -2271,7 +2266,7 @@ const os = ["markdown"], El = {
|
|
|
2271
2266
|
body: { type: "generated_analysis", instruction: "" },
|
|
2272
2267
|
attachments: [],
|
|
2273
2268
|
output: {
|
|
2274
|
-
artifactFormats: [...
|
|
2269
|
+
artifactFormats: [...ss],
|
|
2275
2270
|
includeEvidence: !0,
|
|
2276
2271
|
includeSql: !0
|
|
2277
2272
|
},
|
|
@@ -2290,11 +2285,11 @@ const os = ["markdown"], El = {
|
|
|
2290
2285
|
},
|
|
2291
2286
|
limits: {}
|
|
2292
2287
|
};
|
|
2293
|
-
function
|
|
2288
|
+
function os(e) {
|
|
2294
2289
|
const n = e.trim();
|
|
2295
2290
|
return n.length > 0 ? n : void 0;
|
|
2296
2291
|
}
|
|
2297
|
-
function
|
|
2292
|
+
function Il(e) {
|
|
2298
2293
|
return {
|
|
2299
2294
|
...e,
|
|
2300
2295
|
source: { ...e.source },
|
|
@@ -2314,16 +2309,16 @@ function Al(e) {
|
|
|
2314
2309
|
limits: { ...e.limits }
|
|
2315
2310
|
};
|
|
2316
2311
|
}
|
|
2317
|
-
function
|
|
2312
|
+
function Dl(e) {
|
|
2318
2313
|
return e.type === "generated_analysis" ? e.instruction : e.type === "custom_message" ? e.message : "";
|
|
2319
2314
|
}
|
|
2320
|
-
function
|
|
2315
|
+
function is(e, n) {
|
|
2321
2316
|
return e.type === "custom_message" ? { type: "custom_message", message: n } : e.type === "none" ? { type: "none" } : { type: "generated_analysis", instruction: n };
|
|
2322
2317
|
}
|
|
2323
2318
|
function Wn(e) {
|
|
2324
|
-
return
|
|
2319
|
+
return is(e.body, e.instruction.trim());
|
|
2325
2320
|
}
|
|
2326
|
-
function
|
|
2321
|
+
function ls(e) {
|
|
2327
2322
|
return {
|
|
2328
2323
|
artifactFormats: [...e.artifactFormats],
|
|
2329
2324
|
includeEvidence: e.includeEvidence,
|
|
@@ -2333,29 +2328,29 @@ function ds(e) {
|
|
|
2333
2328
|
...e.format ? { format: e.format } : {}
|
|
2334
2329
|
};
|
|
2335
2330
|
}
|
|
2336
|
-
function
|
|
2331
|
+
function ds(e) {
|
|
2337
2332
|
const n = {};
|
|
2338
2333
|
return e.maxToolCalls !== void 0 && (n.maxToolCalls = e.maxToolCalls), e.maxRows !== void 0 && (n.maxRows = e.maxRows), e.timeoutMs !== void 0 && (n.timeoutMs = e.timeoutMs), Object.keys(n).length > 0 ? n : void 0;
|
|
2339
2334
|
}
|
|
2340
|
-
function
|
|
2335
|
+
function cs(e, n) {
|
|
2341
2336
|
if (!e)
|
|
2342
2337
|
return;
|
|
2343
2338
|
const r = n.reduce((a, o) => (e[o] !== void 0 && (a[o] = e[o]), a), {});
|
|
2344
2339
|
return Object.keys(r).length > 0 ? r : void 0;
|
|
2345
2340
|
}
|
|
2346
|
-
function
|
|
2341
|
+
function us(e) {
|
|
2347
2342
|
return e.recipients.length === 0 && e.channels.length === 0 ? null : {
|
|
2348
2343
|
recipients: e.recipients.map((n) => ({ ...n })),
|
|
2349
2344
|
channels: [...e.channels],
|
|
2350
|
-
channelConfigs:
|
|
2345
|
+
channelConfigs: cs(
|
|
2351
2346
|
e.channelConfigs,
|
|
2352
2347
|
e.channels
|
|
2353
2348
|
)
|
|
2354
2349
|
};
|
|
2355
2350
|
}
|
|
2356
|
-
function
|
|
2351
|
+
function Tl(e) {
|
|
2357
2352
|
return {
|
|
2358
|
-
artifactFormats: e != null && e.artifactFormats && e.artifactFormats.length > 0 ? [...e.artifactFormats] : [...
|
|
2353
|
+
artifactFormats: e != null && e.artifactFormats && e.artifactFormats.length > 0 ? [...e.artifactFormats] : [...ss],
|
|
2359
2354
|
includeEvidence: (e == null ? void 0 : e.includeEvidence) ?? !0,
|
|
2360
2355
|
includeSql: (e == null ? void 0 : e.includeSql) ?? !0,
|
|
2361
2356
|
audience: e == null ? void 0 : e.audience,
|
|
@@ -2363,46 +2358,46 @@ function Dl(e) {
|
|
|
2363
2358
|
format: e == null ? void 0 : e.format
|
|
2364
2359
|
};
|
|
2365
2360
|
}
|
|
2366
|
-
function
|
|
2361
|
+
function Ll(e) {
|
|
2367
2362
|
return e.body.type === "generated_analysis" ? e.body.instruction : e.body.type === "custom_message" ? e.body.message : "";
|
|
2368
2363
|
}
|
|
2369
|
-
function
|
|
2364
|
+
function Rl(e) {
|
|
2370
2365
|
return {
|
|
2371
2366
|
enabled: !0,
|
|
2372
2367
|
recipients: (e == null ? void 0 : e.recipients.map((n) => ({ ...n }))) ?? [],
|
|
2373
2368
|
channels: e != null && e.channels ? [...e.channels] : [],
|
|
2374
2369
|
subject: "",
|
|
2375
2370
|
message: "",
|
|
2376
|
-
channelConfigs:
|
|
2371
|
+
channelConfigs: cs(
|
|
2377
2372
|
e == null ? void 0 : e.channelConfigs,
|
|
2378
2373
|
(e == null ? void 0 : e.channels) ?? []
|
|
2379
2374
|
)
|
|
2380
2375
|
};
|
|
2381
2376
|
}
|
|
2382
|
-
function
|
|
2377
|
+
function Fl(e, n, r) {
|
|
2383
2378
|
return e === void 0 || Number.isInteger(e) && e >= n && e <= r;
|
|
2384
2379
|
}
|
|
2385
|
-
function
|
|
2380
|
+
function Pl(e) {
|
|
2386
2381
|
const n = e.trim();
|
|
2387
2382
|
return n.includes("@") && n.includes(".") && !n.includes(" ");
|
|
2388
2383
|
}
|
|
2389
2384
|
function pn(e, n, r, a, o) {
|
|
2390
|
-
|
|
2385
|
+
Fl(r, a, o) || e.push({
|
|
2391
2386
|
field: `limits.${n}`,
|
|
2392
2387
|
message: `${n} must be an integer between ${a} and ${o}`
|
|
2393
2388
|
});
|
|
2394
2389
|
}
|
|
2395
|
-
function
|
|
2396
|
-
return
|
|
2390
|
+
function Ml(e) {
|
|
2391
|
+
return En(El, e ?? {});
|
|
2397
2392
|
}
|
|
2398
|
-
function
|
|
2393
|
+
function En(e, n) {
|
|
2399
2394
|
var l, c, d, u;
|
|
2400
|
-
const r = n.instruction ?? (n.body ?
|
|
2395
|
+
const r = n.instruction ?? (n.body ? Dl(n.body) : e.instruction), a = is(
|
|
2401
2396
|
n.body ? { ...n.body } : { ...e.body },
|
|
2402
2397
|
r
|
|
2403
2398
|
), o = (l = n.delivery) != null && l.channels ? [...n.delivery.channels] : [...e.delivery.channels], i = ((c = n.delivery) == null ? void 0 : c.channelConfigs) ?? e.delivery.channelConfigs;
|
|
2404
2399
|
return {
|
|
2405
|
-
...
|
|
2400
|
+
...Il(e),
|
|
2406
2401
|
...n,
|
|
2407
2402
|
instruction: r,
|
|
2408
2403
|
source: n.source ? { ...n.source } : { ...e.source },
|
|
@@ -2430,53 +2425,53 @@ function An(e, n) {
|
|
|
2430
2425
|
}
|
|
2431
2426
|
};
|
|
2432
2427
|
}
|
|
2433
|
-
function
|
|
2428
|
+
function At(e) {
|
|
2434
2429
|
return {
|
|
2435
2430
|
name: e.name,
|
|
2436
2431
|
description: e.description ?? "",
|
|
2437
|
-
instruction:
|
|
2432
|
+
instruction: Ll(e),
|
|
2438
2433
|
source: { ...e.source },
|
|
2439
2434
|
body: { ...e.body },
|
|
2440
2435
|
attachments: e.attachments.map(Pe),
|
|
2441
|
-
output:
|
|
2436
|
+
output: Tl(e.presentation),
|
|
2442
2437
|
schedule: {
|
|
2443
2438
|
enabled: !!e.scheduleExpr,
|
|
2444
2439
|
scheduleExpr: e.scheduleExpr ?? "",
|
|
2445
2440
|
timezone: e.timezone || "UTC",
|
|
2446
2441
|
status: e.status === "PAUSED" || e.status === "DISABLED" ? e.status : "ACTIVE"
|
|
2447
2442
|
},
|
|
2448
|
-
delivery:
|
|
2443
|
+
delivery: Rl(e.deliveryConfig),
|
|
2449
2444
|
limits: e.limits ? { ...e.limits } : {}
|
|
2450
2445
|
};
|
|
2451
2446
|
}
|
|
2452
2447
|
function _r(e) {
|
|
2453
2448
|
return {
|
|
2454
2449
|
name: e.name.trim(),
|
|
2455
|
-
description:
|
|
2450
|
+
description: os(e.description) ?? null,
|
|
2456
2451
|
status: e.schedule.status,
|
|
2457
2452
|
scheduleExpr: e.schedule.enabled ? e.schedule.scheduleExpr.trim() : null,
|
|
2458
2453
|
timezone: e.schedule.timezone.trim() || "UTC",
|
|
2459
2454
|
source: { ...e.source },
|
|
2460
2455
|
body: Wn(e),
|
|
2461
2456
|
attachments: e.attachments.map(Pe),
|
|
2462
|
-
presentation:
|
|
2463
|
-
limits:
|
|
2464
|
-
deliveryConfig:
|
|
2457
|
+
presentation: ls(e.output),
|
|
2458
|
+
limits: ds(e.limits),
|
|
2459
|
+
deliveryConfig: us(e.delivery)
|
|
2465
2460
|
};
|
|
2466
2461
|
}
|
|
2467
|
-
function
|
|
2462
|
+
function Bl(e) {
|
|
2468
2463
|
return {
|
|
2469
2464
|
name: e.name.trim(),
|
|
2470
|
-
description:
|
|
2465
|
+
description: os(e.description) ?? null,
|
|
2471
2466
|
status: e.schedule.status,
|
|
2472
2467
|
scheduleExpr: e.schedule.enabled ? e.schedule.scheduleExpr.trim() : null,
|
|
2473
2468
|
timezone: e.schedule.timezone.trim() || "UTC",
|
|
2474
2469
|
source: { ...e.source },
|
|
2475
2470
|
body: Wn(e),
|
|
2476
2471
|
attachments: e.attachments.map(Pe),
|
|
2477
|
-
presentation:
|
|
2478
|
-
limits:
|
|
2479
|
-
deliveryConfig:
|
|
2472
|
+
presentation: ls(e.output),
|
|
2473
|
+
limits: ds(e.limits),
|
|
2474
|
+
deliveryConfig: us(e.delivery)
|
|
2480
2475
|
};
|
|
2481
2476
|
}
|
|
2482
2477
|
function jr(e) {
|
|
@@ -2504,7 +2499,7 @@ function jr(e) {
|
|
|
2504
2499
|
field: "delivery.channels",
|
|
2505
2500
|
message: "Choose at least one delivery channel or remove recipients"
|
|
2506
2501
|
}), e.delivery.recipients.forEach((u, p) => {
|
|
2507
|
-
u.type === "email" && !
|
|
2502
|
+
u.type === "email" && !Pl(u.address) && n.push({
|
|
2508
2503
|
field: `delivery.recipients.${p}.address`,
|
|
2509
2504
|
message: "Email recipient address is invalid"
|
|
2510
2505
|
});
|
|
@@ -2529,15 +2524,15 @@ function jr(e) {
|
|
|
2529
2524
|
};
|
|
2530
2525
|
}
|
|
2531
2526
|
const It = "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground";
|
|
2532
|
-
function
|
|
2527
|
+
function Ol({
|
|
2533
2528
|
attachment: e,
|
|
2534
2529
|
open: n,
|
|
2535
2530
|
onOpenChange: r,
|
|
2536
2531
|
onChange: a,
|
|
2537
2532
|
children: o
|
|
2538
2533
|
}) {
|
|
2539
|
-
const i =
|
|
2540
|
-
a(
|
|
2534
|
+
const i = Xa(e), l = e.settings || {}, c = e.format === "csv", d = (u) => {
|
|
2535
|
+
a(yl(e, u));
|
|
2541
2536
|
};
|
|
2542
2537
|
return /* @__PURE__ */ s(Fe, { open: n, onOpenChange: r, children: [
|
|
2543
2538
|
/* @__PURE__ */ t(Ze, { asChild: !0, children: o }),
|
|
@@ -2559,7 +2554,7 @@ function Bl({
|
|
|
2559
2554
|
{
|
|
2560
2555
|
value: e.format,
|
|
2561
2556
|
onValueChange: (u) => a(
|
|
2562
|
-
|
|
2557
|
+
xl(
|
|
2563
2558
|
e,
|
|
2564
2559
|
u
|
|
2565
2560
|
)
|
|
@@ -2571,13 +2566,13 @@ function Bl({
|
|
|
2571
2566
|
}
|
|
2572
2567
|
)
|
|
2573
2568
|
] }) : null,
|
|
2574
|
-
c ? /* @__PURE__ */ t(
|
|
2569
|
+
c ? /* @__PURE__ */ t($l, { settings: l, onChange: d }) : /* @__PURE__ */ t(Vl, { settings: l, onChange: d })
|
|
2575
2570
|
]
|
|
2576
2571
|
}
|
|
2577
2572
|
)
|
|
2578
2573
|
] });
|
|
2579
2574
|
}
|
|
2580
|
-
function
|
|
2575
|
+
function Vl({
|
|
2581
2576
|
settings: e,
|
|
2582
2577
|
onChange: n
|
|
2583
2578
|
}) {
|
|
@@ -2645,7 +2640,7 @@ function Ol({
|
|
|
2645
2640
|
] })
|
|
2646
2641
|
] });
|
|
2647
2642
|
}
|
|
2648
|
-
function
|
|
2643
|
+
function $l({
|
|
2649
2644
|
settings: e,
|
|
2650
2645
|
onChange: n
|
|
2651
2646
|
}) {
|
|
@@ -2706,7 +2701,7 @@ function $t({
|
|
|
2706
2701
|
/* @__PURE__ */ t("span", { children: e })
|
|
2707
2702
|
] });
|
|
2708
2703
|
}
|
|
2709
|
-
function
|
|
2704
|
+
function Ul({
|
|
2710
2705
|
attachments: e,
|
|
2711
2706
|
onChange: n,
|
|
2712
2707
|
onAdd: r,
|
|
@@ -2723,13 +2718,13 @@ function $l({
|
|
|
2723
2718
|
"aria-label": o ? "Attach files" : "Add another attachment",
|
|
2724
2719
|
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",
|
|
2725
2720
|
children: [
|
|
2726
|
-
/* @__PURE__ */ t(
|
|
2721
|
+
/* @__PURE__ */ t(Ia, { className: "h-3 w-3" }),
|
|
2727
2722
|
o ? "Attach" : null
|
|
2728
2723
|
]
|
|
2729
2724
|
}
|
|
2730
2725
|
),
|
|
2731
2726
|
e.map((i, l) => /* @__PURE__ */ t(
|
|
2732
|
-
|
|
2727
|
+
_l,
|
|
2733
2728
|
{
|
|
2734
2729
|
attachment: i,
|
|
2735
2730
|
disabled: a,
|
|
@@ -2756,13 +2751,13 @@ function $l({
|
|
|
2756
2751
|
)
|
|
2757
2752
|
] });
|
|
2758
2753
|
}
|
|
2759
|
-
function
|
|
2754
|
+
function _l({
|
|
2760
2755
|
attachment: e,
|
|
2761
2756
|
disabled: n,
|
|
2762
2757
|
onUpdate: r,
|
|
2763
2758
|
onRemove: a
|
|
2764
2759
|
}) {
|
|
2765
|
-
const [o, i] = S(!1), l = qn(e), c =
|
|
2760
|
+
const [o, i] = S(!1), l = qn(e), c = bl(e), d = e.format.toUpperCase();
|
|
2766
2761
|
return /* @__PURE__ */ s(
|
|
2767
2762
|
"span",
|
|
2768
2763
|
{
|
|
@@ -2773,7 +2768,7 @@ function Ul({
|
|
|
2773
2768
|
title: c ? `${l} · ${c}` : l,
|
|
2774
2769
|
children: [
|
|
2775
2770
|
/* @__PURE__ */ t(
|
|
2776
|
-
|
|
2771
|
+
Ol,
|
|
2777
2772
|
{
|
|
2778
2773
|
attachment: e,
|
|
2779
2774
|
open: o,
|
|
@@ -2787,7 +2782,7 @@ function Ul({
|
|
|
2787
2782
|
className: "inline-flex max-w-[180px] items-center gap-1 disabled:opacity-50",
|
|
2788
2783
|
children: [
|
|
2789
2784
|
/* @__PURE__ */ t(
|
|
2790
|
-
|
|
2785
|
+
jl,
|
|
2791
2786
|
{
|
|
2792
2787
|
format: e.format,
|
|
2793
2788
|
className: "h-3 w-3 shrink-0 text-muted-foreground/70"
|
|
@@ -2815,14 +2810,14 @@ function Ul({
|
|
|
2815
2810
|
}
|
|
2816
2811
|
);
|
|
2817
2812
|
}
|
|
2818
|
-
function
|
|
2813
|
+
function jl({
|
|
2819
2814
|
format: e,
|
|
2820
2815
|
className: n
|
|
2821
2816
|
}) {
|
|
2822
|
-
return /* @__PURE__ */ t(e === "csv" ?
|
|
2817
|
+
return /* @__PURE__ */ t(e === "csv" ? Da : Ta, { className: v(n) });
|
|
2823
2818
|
}
|
|
2824
|
-
const
|
|
2825
|
-
function
|
|
2819
|
+
const zl = "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground";
|
|
2820
|
+
function Kl({
|
|
2826
2821
|
open: e,
|
|
2827
2822
|
onOpenChange: n,
|
|
2828
2823
|
source: r,
|
|
@@ -2833,16 +2828,16 @@ function zl({
|
|
|
2833
2828
|
onSubmit: c
|
|
2834
2829
|
}) {
|
|
2835
2830
|
const d = V(
|
|
2836
|
-
() =>
|
|
2831
|
+
() => es({ source: r, dashboard: a, selectedSheetId: o }),
|
|
2837
2832
|
[r, a, o]
|
|
2838
2833
|
), [u, p] = S([]);
|
|
2839
2834
|
ce(() => {
|
|
2840
2835
|
if (!e) return;
|
|
2841
2836
|
const T = [];
|
|
2842
2837
|
for (const $ of l) {
|
|
2843
|
-
const R = $r($),
|
|
2838
|
+
const R = $r($), E = d.find(
|
|
2844
2839
|
(P) => P.formats.some((z) => {
|
|
2845
|
-
const B =
|
|
2840
|
+
const B = An({
|
|
2846
2841
|
option: P,
|
|
2847
2842
|
format: z,
|
|
2848
2843
|
runtime: i
|
|
@@ -2850,9 +2845,9 @@ function zl({
|
|
|
2850
2845
|
return $r(B) === R;
|
|
2851
2846
|
})
|
|
2852
2847
|
);
|
|
2853
|
-
|
|
2854
|
-
optionKey:
|
|
2855
|
-
format: $.format ??
|
|
2848
|
+
E && T.push({
|
|
2849
|
+
optionKey: E.key,
|
|
2850
|
+
format: $.format ?? E.defaultFormat
|
|
2856
2851
|
});
|
|
2857
2852
|
}
|
|
2858
2853
|
p(T);
|
|
@@ -2869,14 +2864,14 @@ function zl({
|
|
|
2869
2864
|
p((R) => R.some((P) => P.optionKey === T) ? R.filter((P) => P.optionKey !== T) : [...R, { optionKey: T, format: $ }]);
|
|
2870
2865
|
}, D = (T, $) => {
|
|
2871
2866
|
p(
|
|
2872
|
-
(R) => R.map((
|
|
2867
|
+
(R) => R.map((E) => E.optionKey === T ? { ...E, format: $ } : E)
|
|
2873
2868
|
);
|
|
2874
2869
|
}, k = () => {
|
|
2875
2870
|
const T = [];
|
|
2876
2871
|
for (const $ of u) {
|
|
2877
|
-
const R = d.find((
|
|
2872
|
+
const R = d.find((E) => E.key === $.optionKey);
|
|
2878
2873
|
R && T.push(
|
|
2879
|
-
|
|
2874
|
+
An({
|
|
2880
2875
|
option: R,
|
|
2881
2876
|
format: $.format,
|
|
2882
2877
|
runtime: i
|
|
@@ -2973,7 +2968,7 @@ function fn({
|
|
|
2973
2968
|
emptyText: l
|
|
2974
2969
|
}) {
|
|
2975
2970
|
return /* @__PURE__ */ s("section", { children: [
|
|
2976
|
-
/* @__PURE__ */ t("div", { className: v(
|
|
2971
|
+
/* @__PURE__ */ t("div", { className: v(zl, "mb-2"), children: e }),
|
|
2977
2972
|
n.length === 0 ? /* @__PURE__ */ t("div", { className: "rounded-card border border-dashed border-border px-3 py-2 text-[12px] text-muted-foreground", children: l || "Nothing available." }) : /* @__PURE__ */ t("div", { className: "divide-y divide-border rounded-card border border-border", children: n.map((c) => {
|
|
2978
2973
|
const d = r.has(c.key), u = a[c.key] ?? c.defaultFormat;
|
|
2979
2974
|
return /* @__PURE__ */ s(
|
|
@@ -2992,9 +2987,9 @@ function fn({
|
|
|
2992
2987
|
onClick: () => o(c.key, c.defaultFormat),
|
|
2993
2988
|
className: "flex min-w-0 flex-1 items-start gap-2 text-left",
|
|
2994
2989
|
children: [
|
|
2995
|
-
/* @__PURE__ */ t(
|
|
2990
|
+
/* @__PURE__ */ t(Hl, { selected: d }),
|
|
2996
2991
|
/* @__PURE__ */ t(
|
|
2997
|
-
|
|
2992
|
+
ql,
|
|
2998
2993
|
{
|
|
2999
2994
|
kind: c.kind,
|
|
3000
2995
|
format: u,
|
|
@@ -3036,7 +3031,7 @@ function fn({
|
|
|
3036
3031
|
}) })
|
|
3037
3032
|
] });
|
|
3038
3033
|
}
|
|
3039
|
-
function
|
|
3034
|
+
function Hl({ selected: e }) {
|
|
3040
3035
|
return /* @__PURE__ */ t(
|
|
3041
3036
|
"span",
|
|
3042
3037
|
{
|
|
@@ -3049,15 +3044,15 @@ function Kl({ selected: e }) {
|
|
|
3049
3044
|
}
|
|
3050
3045
|
);
|
|
3051
3046
|
}
|
|
3052
|
-
function
|
|
3047
|
+
function ql({
|
|
3053
3048
|
kind: e,
|
|
3054
3049
|
format: n,
|
|
3055
3050
|
cardType: r,
|
|
3056
3051
|
className: a
|
|
3057
3052
|
}) {
|
|
3058
|
-
return /* @__PURE__ */ t(n === "csv" ?
|
|
3053
|
+
return /* @__PURE__ */ t(n === "csv" ? Da : e === "dashboard" ? Wo : e === "card" ? r === "table" || r === "aggregateTable" || r === "pivotTable" || r === "detailTable" ? Ai : oo : Ta, { className: a });
|
|
3059
3054
|
}
|
|
3060
|
-
const
|
|
3055
|
+
const Wl = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Gl = 250;
|
|
3061
3056
|
function kt(e) {
|
|
3062
3057
|
switch (e.type) {
|
|
3063
3058
|
case "email":
|
|
@@ -3070,10 +3065,10 @@ function kt(e) {
|
|
|
3070
3065
|
return `group:${e.groupId}`;
|
|
3071
3066
|
}
|
|
3072
3067
|
}
|
|
3073
|
-
function
|
|
3068
|
+
function Jl(e) {
|
|
3074
3069
|
return e.type === "user" ? e.userId : e.type === "tenant_user" ? e.tenantUserId : null;
|
|
3075
3070
|
}
|
|
3076
|
-
function
|
|
3071
|
+
function Ql(e) {
|
|
3077
3072
|
return e.type === "group" ? e.groupId : null;
|
|
3078
3073
|
}
|
|
3079
3074
|
function St(e) {
|
|
@@ -3106,17 +3101,17 @@ function Hr({
|
|
|
3106
3101
|
prefix: o,
|
|
3107
3102
|
placeholder: i
|
|
3108
3103
|
}) {
|
|
3109
|
-
const l =
|
|
3104
|
+
const l = Ee(null), [c, d] = S(!1), [u, p] = S(""), [f, h] = S(0), [b, D] = S(
|
|
3110
3105
|
() => /* @__PURE__ */ new Map()
|
|
3111
3106
|
), [k, N] = S(
|
|
3112
3107
|
() => /* @__PURE__ */ new Map()
|
|
3113
|
-
), [g, L] = S("people"), x = Go(u,
|
|
3108
|
+
), [g, L] = S("people"), x = Go(u, Gl), { currentUser: C } = La(), T = (C == null ? void 0 : C.type) === "tenant", { users: $, isLoading: R } = Jo({
|
|
3114
3109
|
search: x,
|
|
3115
3110
|
active: !0,
|
|
3116
3111
|
type: T ? "tenant" : "all",
|
|
3117
3112
|
tenantId: T ? C.tenantId : void 0,
|
|
3118
3113
|
limit: 25
|
|
3119
|
-
}), { groups:
|
|
3114
|
+
}), { groups: E, isLoading: P } = Qo({
|
|
3120
3115
|
search: x,
|
|
3121
3116
|
type: T ? "TENANT_GROUP" : "all",
|
|
3122
3117
|
tenantId: T ? C.tenantId : void 0,
|
|
@@ -3126,49 +3121,49 @@ function Hr({
|
|
|
3126
3121
|
[e]
|
|
3127
3122
|
), B = V(
|
|
3128
3123
|
() => new Set(
|
|
3129
|
-
e.map(
|
|
3124
|
+
e.map(Jl).filter((A) => !!A)
|
|
3130
3125
|
),
|
|
3131
3126
|
[e]
|
|
3132
3127
|
), K = V(
|
|
3133
3128
|
() => new Set(
|
|
3134
|
-
e.map(
|
|
3129
|
+
e.map(Ql).filter((A) => !!A)
|
|
3135
3130
|
),
|
|
3136
3131
|
[e]
|
|
3137
3132
|
), _ = V(() => {
|
|
3138
|
-
const
|
|
3133
|
+
const A = new Map(b);
|
|
3139
3134
|
return $.forEach((M) => {
|
|
3140
|
-
|
|
3141
|
-
}), C != null && C.id &&
|
|
3135
|
+
A.set(M.id, zr(M));
|
|
3136
|
+
}), C != null && C.id && A.set(C.id, {
|
|
3142
3137
|
kind: "user",
|
|
3143
3138
|
id: C.id,
|
|
3144
3139
|
name: C.name || C.email || "User",
|
|
3145
3140
|
email: C.email || "",
|
|
3146
3141
|
type: C.type
|
|
3147
|
-
}),
|
|
3142
|
+
}), A;
|
|
3148
3143
|
}, [b, $, C]), O = V(() => {
|
|
3149
|
-
const
|
|
3144
|
+
const A = /* @__PURE__ */ new Set();
|
|
3150
3145
|
return e.forEach((M) => {
|
|
3151
3146
|
var we;
|
|
3152
3147
|
if (M.type === "email") {
|
|
3153
3148
|
const lt = St(M.address);
|
|
3154
|
-
lt &&
|
|
3149
|
+
lt && A.add(lt);
|
|
3155
3150
|
return;
|
|
3156
3151
|
}
|
|
3157
3152
|
if (M.type === "group")
|
|
3158
3153
|
return;
|
|
3159
3154
|
const oe = M.type === "tenant_user" ? M.tenantUserId : M.userId, be = St((we = _.get(oe)) == null ? void 0 : we.email);
|
|
3160
|
-
be &&
|
|
3161
|
-
}),
|
|
3155
|
+
be && A.add(be);
|
|
3156
|
+
}), A;
|
|
3162
3157
|
}, [_, e]), J = V(() => {
|
|
3163
|
-
const
|
|
3164
|
-
return
|
|
3165
|
-
|
|
3166
|
-
}),
|
|
3167
|
-
}, [k,
|
|
3168
|
-
() => $.filter((
|
|
3169
|
-
if (B.has(
|
|
3170
|
-
const M = St(
|
|
3171
|
-
return M && O.has(M) ? !1 : T ?
|
|
3158
|
+
const A = new Map(k);
|
|
3159
|
+
return E.forEach((M) => {
|
|
3160
|
+
A.set(M.id, Kr(M));
|
|
3161
|
+
}), A;
|
|
3162
|
+
}, [k, E]), I = V(
|
|
3163
|
+
() => $.filter((A) => {
|
|
3164
|
+
if (B.has(A.id)) return !1;
|
|
3165
|
+
const M = St(A.email);
|
|
3166
|
+
return M && O.has(M) ? !1 : T ? A.type === "tenant" && A.tenantId === (C == null ? void 0 : C.tenantId) : !0;
|
|
3172
3167
|
}).map(zr),
|
|
3173
3168
|
[
|
|
3174
3169
|
$,
|
|
@@ -3178,14 +3173,14 @@ function Hr({
|
|
|
3178
3173
|
C == null ? void 0 : C.tenantId
|
|
3179
3174
|
]
|
|
3180
3175
|
), ve = V(
|
|
3181
|
-
() => I.filter((
|
|
3176
|
+
() => I.filter((A) => A.type === "organization"),
|
|
3182
3177
|
[I]
|
|
3183
3178
|
), w = V(
|
|
3184
|
-
() => I.filter((
|
|
3179
|
+
() => I.filter((A) => A.type === "tenant"),
|
|
3185
3180
|
[I]
|
|
3186
3181
|
), q = V(
|
|
3187
|
-
() =>
|
|
3188
|
-
[
|
|
3182
|
+
() => E.filter((A) => K.has(A.id) ? !1 : (C == null ? void 0 : C.type) === "tenant" ? A.type === "TENANT_GROUP" && A.tenantId === C.tenantId : !0).map(Kr),
|
|
3183
|
+
[E, K, C == null ? void 0 : C.type, C == null ? void 0 : C.tenantId]
|
|
3189
3184
|
), se = V(
|
|
3190
3185
|
() => T ? [
|
|
3191
3186
|
{
|
|
@@ -3232,28 +3227,28 @@ function Hr({
|
|
|
3232
3227
|
), ke = V(
|
|
3233
3228
|
() => [...X, ...De],
|
|
3234
3229
|
[X, De]
|
|
3235
|
-
), Te = ke.length === 0 ? 0 : Math.min(f, ke.length - 1), U = u.trim(), et =
|
|
3236
|
-
z.has(kt(
|
|
3237
|
-
}, Se = (
|
|
3238
|
-
n(e.filter((M) => kt(M) !==
|
|
3230
|
+
), Te = ke.length === 0 ? 0 : Math.min(f, ke.length - 1), U = u.trim(), et = Wl.test(U), Me = St(U), Le = Me ? O.has(Me) : !1, tt = R || P, W = (A) => {
|
|
3231
|
+
z.has(kt(A)) || (n([...e, A]), p(""), h(0));
|
|
3232
|
+
}, Se = (A) => {
|
|
3233
|
+
n(e.filter((M) => kt(M) !== A));
|
|
3239
3234
|
}, qe = () => {
|
|
3240
3235
|
!et || Le || W({ type: "email", address: U });
|
|
3241
|
-
}, j = (
|
|
3242
|
-
const M = St(
|
|
3236
|
+
}, j = (A) => {
|
|
3237
|
+
const M = St(A.email);
|
|
3243
3238
|
M && O.has(M) || (D((oe) => {
|
|
3244
3239
|
const be = new Map(oe);
|
|
3245
|
-
return be.set(
|
|
3240
|
+
return be.set(A.id, A), be;
|
|
3246
3241
|
}), W(
|
|
3247
|
-
|
|
3242
|
+
A.type === "tenant" ? { type: "tenant_user", tenantUserId: A.id } : { type: "user", userId: A.id }
|
|
3248
3243
|
));
|
|
3249
|
-
}, ee = (
|
|
3244
|
+
}, ee = (A) => {
|
|
3250
3245
|
N((M) => {
|
|
3251
3246
|
const oe = new Map(M);
|
|
3252
|
-
return oe.set(
|
|
3253
|
-
}), W({ type: "group", groupId:
|
|
3254
|
-
}, xt = (
|
|
3255
|
-
if (
|
|
3256
|
-
if (
|
|
3247
|
+
return oe.set(A.id, A), oe;
|
|
3248
|
+
}), W({ type: "group", groupId: A.id });
|
|
3249
|
+
}, xt = (A) => {
|
|
3250
|
+
if (A.key === "Enter") {
|
|
3251
|
+
if (A.preventDefault(), et && !Le) {
|
|
3257
3252
|
qe();
|
|
3258
3253
|
return;
|
|
3259
3254
|
}
|
|
@@ -3266,37 +3261,37 @@ function Hr({
|
|
|
3266
3261
|
ee(M);
|
|
3267
3262
|
return;
|
|
3268
3263
|
}
|
|
3269
|
-
} else if (
|
|
3270
|
-
|
|
3264
|
+
} else if (A.key === "ArrowDown")
|
|
3265
|
+
A.preventDefault(), h(
|
|
3271
3266
|
(M) => Math.min(M + 1, Math.max(ke.length - 1, 0))
|
|
3272
3267
|
);
|
|
3273
|
-
else if (
|
|
3274
|
-
|
|
3275
|
-
else if (
|
|
3268
|
+
else if (A.key === "ArrowUp")
|
|
3269
|
+
A.preventDefault(), h((M) => Math.max(M - 1, 0));
|
|
3270
|
+
else if (A.key === "Escape")
|
|
3276
3271
|
d(!1);
|
|
3277
|
-
else if (
|
|
3272
|
+
else if (A.key === "Backspace" && u.length === 0) {
|
|
3278
3273
|
const M = e[e.length - 1];
|
|
3279
3274
|
M && Se(kt(M));
|
|
3280
3275
|
}
|
|
3281
|
-
}, Yn = e.map((
|
|
3282
|
-
const M = kt(
|
|
3283
|
-
if (
|
|
3276
|
+
}, Yn = e.map((A) => {
|
|
3277
|
+
const M = kt(A);
|
|
3278
|
+
if (A.type === "email")
|
|
3284
3279
|
return {
|
|
3285
3280
|
key: M,
|
|
3286
|
-
label:
|
|
3281
|
+
label: A.name || A.address,
|
|
3287
3282
|
icon: /* @__PURE__ */ t(Yo, { className: "h-3 w-3" }),
|
|
3288
3283
|
onRemove: () => Se(M)
|
|
3289
3284
|
};
|
|
3290
|
-
if (
|
|
3291
|
-
const we = J.get(
|
|
3285
|
+
if (A.type === "group") {
|
|
3286
|
+
const we = J.get(A.groupId);
|
|
3292
3287
|
return {
|
|
3293
3288
|
key: M,
|
|
3294
3289
|
label: (we == null ? void 0 : we.name) || "Group",
|
|
3295
|
-
icon: /* @__PURE__ */ t(
|
|
3290
|
+
icon: /* @__PURE__ */ t(za, { className: "h-3 w-3" }),
|
|
3296
3291
|
onRemove: () => Se(M)
|
|
3297
3292
|
};
|
|
3298
3293
|
}
|
|
3299
|
-
const oe =
|
|
3294
|
+
const oe = A.type === "tenant_user" ? A.tenantUserId : A.userId, be = _.get(oe);
|
|
3300
3295
|
return {
|
|
3301
3296
|
key: M,
|
|
3302
3297
|
label: (be == null ? void 0 : be.name) || (be == null ? void 0 : be.email) || "User",
|
|
@@ -3314,19 +3309,19 @@ function Hr({
|
|
|
3314
3309
|
a && "cursor-not-allowed opacity-60"
|
|
3315
3310
|
),
|
|
3316
3311
|
onClick: () => {
|
|
3317
|
-
var
|
|
3318
|
-
a || ((
|
|
3312
|
+
var A;
|
|
3313
|
+
a || ((A = l.current) == null || A.focus(), d(!0));
|
|
3319
3314
|
},
|
|
3320
3315
|
children: [
|
|
3321
3316
|
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,
|
|
3322
|
-
Yn.map((
|
|
3323
|
-
|
|
3317
|
+
Yn.map((A) => /* @__PURE__ */ t(
|
|
3318
|
+
Yl,
|
|
3324
3319
|
{
|
|
3325
|
-
icon:
|
|
3326
|
-
label:
|
|
3327
|
-
onRemove:
|
|
3320
|
+
icon: A.icon,
|
|
3321
|
+
label: A.label,
|
|
3322
|
+
onRemove: A.onRemove
|
|
3328
3323
|
},
|
|
3329
|
-
|
|
3324
|
+
A.key
|
|
3330
3325
|
)),
|
|
3331
3326
|
/* @__PURE__ */ t(
|
|
3332
3327
|
"input",
|
|
@@ -3336,8 +3331,8 @@ function Hr({
|
|
|
3336
3331
|
value: u,
|
|
3337
3332
|
disabled: a,
|
|
3338
3333
|
placeholder: i ?? (e.length > 0 ? "Add more..." : "Add people, emails, or groups"),
|
|
3339
|
-
onChange: (
|
|
3340
|
-
p(
|
|
3334
|
+
onChange: (A) => {
|
|
3335
|
+
p(A.target.value), h(0), d(!0);
|
|
3341
3336
|
},
|
|
3342
3337
|
onFocus: () => d(!0),
|
|
3343
3338
|
onKeyDown: xt
|
|
@@ -3351,13 +3346,13 @@ function Hr({
|
|
|
3351
3346
|
{
|
|
3352
3347
|
align: "start",
|
|
3353
3348
|
sideOffset: 8,
|
|
3354
|
-
onOpenAutoFocus: (
|
|
3349
|
+
onOpenAutoFocus: (A) => A.preventDefault(),
|
|
3355
3350
|
className: v(
|
|
3356
3351
|
"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",
|
|
3357
3352
|
"max-h-[min(320px,var(--radix-popover-content-available-height))] overflow-y-auto"
|
|
3358
3353
|
),
|
|
3359
3354
|
children: /* @__PURE__ */ t(
|
|
3360
|
-
|
|
3355
|
+
Zl,
|
|
3361
3356
|
{
|
|
3362
3357
|
activeIndex: Te,
|
|
3363
3358
|
activeFilter: g,
|
|
@@ -3366,8 +3361,8 @@ function Hr({
|
|
|
3366
3361
|
groupSuggestions: De,
|
|
3367
3362
|
loading: tt,
|
|
3368
3363
|
onAddEmail: qe,
|
|
3369
|
-
onFilterChange: (
|
|
3370
|
-
L(
|
|
3364
|
+
onFilterChange: (A) => {
|
|
3365
|
+
L(A), h(0);
|
|
3371
3366
|
},
|
|
3372
3367
|
onGroupClick: ee,
|
|
3373
3368
|
onUserClick: j,
|
|
@@ -3382,7 +3377,7 @@ function Hr({
|
|
|
3382
3377
|
)
|
|
3383
3378
|
] }) });
|
|
3384
3379
|
}
|
|
3385
|
-
function
|
|
3380
|
+
function Yl({
|
|
3386
3381
|
icon: e,
|
|
3387
3382
|
label: n,
|
|
3388
3383
|
onRemove: r
|
|
@@ -3404,7 +3399,7 @@ function Ql({
|
|
|
3404
3399
|
)
|
|
3405
3400
|
] });
|
|
3406
3401
|
}
|
|
3407
|
-
function
|
|
3402
|
+
function Zl({
|
|
3408
3403
|
activeIndex: e,
|
|
3409
3404
|
activeFilter: n,
|
|
3410
3405
|
emailAlreadyAdded: r,
|
|
@@ -3475,7 +3470,7 @@ function Yl({
|
|
|
3475
3470
|
Wr,
|
|
3476
3471
|
{
|
|
3477
3472
|
active: g === e,
|
|
3478
|
-
avatar: /* @__PURE__ */ t("div", { className: "flex h-6 w-6 shrink-0 items-center justify-center rounded-control border border-border bg-muted text-muted-foreground", children: /* @__PURE__ */ t(
|
|
3473
|
+
avatar: /* @__PURE__ */ t("div", { className: "flex h-6 w-6 shrink-0 items-center justify-center rounded-control border border-border bg-muted text-muted-foreground", children: /* @__PURE__ */ t(za, { className: "h-3 w-3" }) }),
|
|
3479
3474
|
detail: N.memberCount !== void 0 ? `${N.memberCount} member${N.memberCount === 1 ? "" : "s"}` : N.description ?? void 0,
|
|
3480
3475
|
tag: N.type === "ORG_GROUP" ? "Org group" : "Tenant group",
|
|
3481
3476
|
viewerType: D,
|
|
@@ -3492,7 +3487,7 @@ function Yl({
|
|
|
3492
3487
|
onClick: l,
|
|
3493
3488
|
className: "flex w-full items-center gap-2 rounded-control px-2 py-1.5 text-left hover:bg-muted",
|
|
3494
3489
|
children: [
|
|
3495
|
-
/* @__PURE__ */ t(
|
|
3490
|
+
/* @__PURE__ */ t(_a, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
|
|
3496
3491
|
/* @__PURE__ */ s("div", { className: "min-w-0", children: [
|
|
3497
3492
|
/* @__PURE__ */ s("div", { className: "text-[13px] text-foreground", children: [
|
|
3498
3493
|
"Send to ",
|
|
@@ -3562,7 +3557,7 @@ function In({
|
|
|
3562
3557
|
onError: c,
|
|
3563
3558
|
onTimeout: d
|
|
3564
3559
|
}) {
|
|
3565
|
-
const [u, p] = S(null), [f, h] = S("idle"), b =
|
|
3560
|
+
const [u, p] = S(null), [f, h] = S("idle"), b = Ee(null), D = Ee({
|
|
3566
3561
|
fetchRun: o,
|
|
3567
3562
|
onRun: i,
|
|
3568
3563
|
onTerminalRun: l,
|
|
@@ -3605,10 +3600,10 @@ function In({
|
|
|
3605
3600
|
}
|
|
3606
3601
|
let x = !1, C = !1, T = null;
|
|
3607
3602
|
const $ = Date.now(), R = async () => {
|
|
3608
|
-
var
|
|
3603
|
+
var E, P, z, B, K, _;
|
|
3609
3604
|
if (!(x || C)) {
|
|
3610
3605
|
if (Date.now() - $ > a) {
|
|
3611
|
-
p((O) => O === u ? null : O), h("timed_out"), (P = (
|
|
3606
|
+
p((O) => O === u ? null : O), h("timed_out"), (P = (E = D.current).onTimeout) == null || P.call(E, u);
|
|
3612
3607
|
return;
|
|
3613
3608
|
}
|
|
3614
3609
|
C = !0;
|
|
@@ -3684,7 +3679,7 @@ function Gr({
|
|
|
3684
3679
|
] })
|
|
3685
3680
|
] });
|
|
3686
3681
|
}
|
|
3687
|
-
function
|
|
3682
|
+
function Xl({
|
|
3688
3683
|
includeEvidence: e,
|
|
3689
3684
|
includeSql: n,
|
|
3690
3685
|
includeHtml: r,
|
|
@@ -3701,7 +3696,7 @@ function Zl({
|
|
|
3701
3696
|
className: "inline-flex h-7 items-center gap-1.5 rounded-control px-2 text-[12px] text-muted-foreground hover:bg-muted hover:text-foreground",
|
|
3702
3697
|
"aria-label": "Output options",
|
|
3703
3698
|
children: [
|
|
3704
|
-
/* @__PURE__ */ t(
|
|
3699
|
+
/* @__PURE__ */ t(Ra, { className: "h-3 w-3" }),
|
|
3705
3700
|
"Output options",
|
|
3706
3701
|
/* @__PURE__ */ s("span", { className: "font-mono text-[11px] tabular-nums text-muted-foreground", children: [
|
|
3707
3702
|
"· ",
|
|
@@ -3846,7 +3841,7 @@ Format:
|
|
|
3846
3841
|
- Headline (≤ 12 words)
|
|
3847
3842
|
- Three bullets max
|
|
3848
3843
|
- Link to the full dashboard`;
|
|
3849
|
-
function
|
|
3844
|
+
function ed(e, n, r) {
|
|
3850
3845
|
const a = e.includes("markdown") ? e.filter((o) => o !== n) : ["markdown"];
|
|
3851
3846
|
return r ? Array.from(/* @__PURE__ */ new Set([...a, n])) : a;
|
|
3852
3847
|
}
|
|
@@ -3940,8 +3935,8 @@ const Bt = [
|
|
|
3940
3935
|
}
|
|
3941
3936
|
})
|
|
3942
3937
|
}
|
|
3943
|
-
], Z = "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground",
|
|
3944
|
-
function
|
|
3938
|
+
], Z = "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", Et = "inline-flex h-7 items-center gap-1.5 rounded-control px-2 text-[12px] text-muted-foreground hover:bg-muted hover:text-foreground disabled:opacity-50", _e = "inline-flex h-7 items-center gap-1.5 rounded-control border border-border bg-background px-2.5 text-[12px] text-foreground hover:bg-muted disabled:opacity-50", Xr = "inline-flex h-7 items-center gap-1.5 rounded-control bg-primary px-3 text-[12px] font-medium text-primary-foreground hover:bg-primary/90 disabled:opacity-50";
|
|
3939
|
+
function td({
|
|
3945
3940
|
scheduleExpr: e,
|
|
3946
3941
|
timezone: n,
|
|
3947
3942
|
onScheduleChange: r
|
|
@@ -3963,7 +3958,7 @@ function ed({
|
|
|
3963
3958
|
f({ ...a, hour: g, minute: L });
|
|
3964
3959
|
}, D = (g) => {
|
|
3965
3960
|
f({ ...a, weekdays: g });
|
|
3966
|
-
}, k = `${String(a.hour).padStart(2, "0")}:${String(a.minute).padStart(2, "0")}`, N = V(() =>
|
|
3961
|
+
}, k = `${String(a.hour).padStart(2, "0")}:${String(a.minute).padStart(2, "0")}`, N = V(() => nd(), []);
|
|
3967
3962
|
return /* @__PURE__ */ s("div", { className: "space-y-2", children: [
|
|
3968
3963
|
/* @__PURE__ */ s("div", { className: "flex items-center justify-between gap-3", children: [
|
|
3969
3964
|
/* @__PURE__ */ t("span", { className: Z, children: "When" }),
|
|
@@ -4013,9 +4008,9 @@ function ed({
|
|
|
4013
4008
|
{
|
|
4014
4009
|
type: "button",
|
|
4015
4010
|
"aria-expanded": u,
|
|
4016
|
-
className: v(
|
|
4011
|
+
className: v(Et, "h-6 px-1.5 text-[11px]"),
|
|
4017
4012
|
children: [
|
|
4018
|
-
/* @__PURE__ */ t(
|
|
4013
|
+
/* @__PURE__ */ t(Ra, { className: "h-3 w-3" }),
|
|
4019
4014
|
"More options",
|
|
4020
4015
|
/* @__PURE__ */ t(
|
|
4021
4016
|
Ke,
|
|
@@ -4079,7 +4074,7 @@ function ed({
|
|
|
4079
4074
|
/* @__PURE__ */ t(ti, { className: "h-3 w-3 shrink-0 text-muted-foreground/70" }),
|
|
4080
4075
|
/* @__PURE__ */ t(Qe, {})
|
|
4081
4076
|
] }) }),
|
|
4082
|
-
/* @__PURE__ */ t(Ye, { className: "max-h-[280px]", children: ni.map((g) => /* @__PURE__ */ t(ue, { value: g, children:
|
|
4077
|
+
/* @__PURE__ */ t(Ye, { className: "max-h-[280px]", children: ni.map((g) => /* @__PURE__ */ t(ue, { value: g, children: rd(g) }, g)) })
|
|
4083
4078
|
]
|
|
4084
4079
|
}
|
|
4085
4080
|
)
|
|
@@ -4129,7 +4124,7 @@ function ed({
|
|
|
4129
4124
|
] }) })
|
|
4130
4125
|
] });
|
|
4131
4126
|
}
|
|
4132
|
-
function
|
|
4127
|
+
function nd() {
|
|
4133
4128
|
const e = [];
|
|
4134
4129
|
for (let n = 0; n < 24; n += 1)
|
|
4135
4130
|
for (const r of [0, 30]) {
|
|
@@ -4138,7 +4133,7 @@ function td() {
|
|
|
4138
4133
|
}
|
|
4139
4134
|
return e;
|
|
4140
4135
|
}
|
|
4141
|
-
function
|
|
4136
|
+
function rd(e) {
|
|
4142
4137
|
return !e || e === "UTC" ? "UTC" : {
|
|
4143
4138
|
"America/New_York": "Eastern Time (ET)",
|
|
4144
4139
|
"America/Chicago": "Central Time (CT)",
|
|
@@ -4155,11 +4150,11 @@ function jt() {
|
|
|
4155
4150
|
const e = /* @__PURE__ */ new Date();
|
|
4156
4151
|
return e.setHours(0, 0, 0, 0), e;
|
|
4157
4152
|
}
|
|
4158
|
-
function
|
|
4153
|
+
function ad(e, n) {
|
|
4159
4154
|
return e.getFullYear() === n.getFullYear() && e.getMonth() === n.getMonth() && e.getDate() === n.getDate();
|
|
4160
4155
|
}
|
|
4161
4156
|
function ea(e) {
|
|
4162
|
-
return
|
|
4157
|
+
return ad(e, jt()) ? "Today" : e.toLocaleDateString(void 0, {
|
|
4163
4158
|
month: "short",
|
|
4164
4159
|
day: "numeric",
|
|
4165
4160
|
year: "numeric"
|
|
@@ -4242,13 +4237,13 @@ function na({
|
|
|
4242
4237
|
)
|
|
4243
4238
|
] });
|
|
4244
4239
|
}
|
|
4245
|
-
function
|
|
4240
|
+
function sd({
|
|
4246
4241
|
source: e,
|
|
4247
4242
|
resolvedSourceContext: n,
|
|
4248
4243
|
sourceDetail: r,
|
|
4249
4244
|
onChange: a
|
|
4250
4245
|
}) {
|
|
4251
|
-
const [o, i] = S(!1), l =
|
|
4246
|
+
const [o, i] = S(!1), l = Ee(null), c = n.source.type === "dashboard" ? n.source : null, d = c !== null;
|
|
4252
4247
|
ce(() => {
|
|
4253
4248
|
if (!o) return;
|
|
4254
4249
|
const N = (g) => {
|
|
@@ -4378,7 +4373,7 @@ function ra({
|
|
|
4378
4373
|
}
|
|
4379
4374
|
);
|
|
4380
4375
|
}
|
|
4381
|
-
function
|
|
4376
|
+
function od({
|
|
4382
4377
|
channels: e,
|
|
4383
4378
|
selectedChannelId: n,
|
|
4384
4379
|
onChange: r,
|
|
@@ -4388,7 +4383,7 @@ function sd({
|
|
|
4388
4383
|
disabled: l,
|
|
4389
4384
|
className: c
|
|
4390
4385
|
}) {
|
|
4391
|
-
const d =
|
|
4386
|
+
const d = Ee(null), [u, p] = S(!1), [f, h] = S(""), b = V(
|
|
4392
4387
|
() => e.find((g) => g.id === n) ?? null,
|
|
4393
4388
|
[e, n]
|
|
4394
4389
|
), D = V(() => {
|
|
@@ -4445,7 +4440,7 @@ function sd({
|
|
|
4445
4440
|
}
|
|
4446
4441
|
),
|
|
4447
4442
|
b ? /* @__PURE__ */ t(
|
|
4448
|
-
|
|
4443
|
+
id,
|
|
4449
4444
|
{
|
|
4450
4445
|
channel: b,
|
|
4451
4446
|
onRemove: () => {
|
|
@@ -4495,7 +4490,7 @@ function sd({
|
|
|
4495
4490
|
L ? "bg-muted text-foreground" : "text-foreground/85 hover:bg-muted/60"
|
|
4496
4491
|
),
|
|
4497
4492
|
children: [
|
|
4498
|
-
g.isPrivate ? /* @__PURE__ */ t(
|
|
4493
|
+
g.isPrivate ? /* @__PURE__ */ t(Fa, { className: "h-3 w-3 shrink-0 text-muted-foreground" }) : /* @__PURE__ */ t(zn, { className: "h-3 w-3 shrink-0 text-muted-foreground" }),
|
|
4499
4494
|
/* @__PURE__ */ t("span", { className: "truncate", children: g.name }),
|
|
4500
4495
|
typeof g.memberCount == "number" ? /* @__PURE__ */ s("span", { className: "ml-auto text-[11px] text-muted-foreground", children: [
|
|
4501
4496
|
g.memberCount,
|
|
@@ -4509,12 +4504,12 @@ function sd({
|
|
|
4509
4504
|
)
|
|
4510
4505
|
] }) });
|
|
4511
4506
|
}
|
|
4512
|
-
function
|
|
4507
|
+
function id({
|
|
4513
4508
|
channel: e,
|
|
4514
4509
|
onRemove: n
|
|
4515
4510
|
}) {
|
|
4516
4511
|
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: [
|
|
4517
|
-
/* @__PURE__ */ t("span", { className: "shrink-0 text-muted-foreground", children: e.isPrivate ? /* @__PURE__ */ t(
|
|
4512
|
+
/* @__PURE__ */ t("span", { className: "shrink-0 text-muted-foreground", children: e.isPrivate ? /* @__PURE__ */ t(Fa, { className: "h-3 w-3" }) : /* @__PURE__ */ t(zn, { className: "h-3 w-3" }) }),
|
|
4518
4513
|
/* @__PURE__ */ t("span", { className: "min-w-0 truncate text-foreground", children: e.name }),
|
|
4519
4514
|
typeof e.memberCount == "number" ? /* @__PURE__ */ s("span", { className: "shrink-0 text-muted-foreground", children: [
|
|
4520
4515
|
"· ",
|
|
@@ -4535,8 +4530,8 @@ function od({
|
|
|
4535
4530
|
)
|
|
4536
4531
|
] });
|
|
4537
4532
|
}
|
|
4538
|
-
const
|
|
4539
|
-
function
|
|
4533
|
+
const ms = Ut, it = _t;
|
|
4534
|
+
function ld(e) {
|
|
4540
4535
|
var a, o;
|
|
4541
4536
|
const n = (a = e == null ? void 0 : e.email) == null ? void 0 : a.trim();
|
|
4542
4537
|
if (!n)
|
|
@@ -4548,7 +4543,7 @@ function id(e) {
|
|
|
4548
4543
|
...r && r !== n ? { name: r } : {}
|
|
4549
4544
|
};
|
|
4550
4545
|
}
|
|
4551
|
-
function
|
|
4546
|
+
function hs(e) {
|
|
4552
4547
|
const n = V(
|
|
4553
4548
|
() => e ? new Date(e).getTime() : null,
|
|
4554
4549
|
[e]
|
|
@@ -4567,7 +4562,7 @@ function Gn(e) {
|
|
|
4567
4562
|
function ie(e) {
|
|
4568
4563
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
4569
4564
|
}
|
|
4570
|
-
function
|
|
4565
|
+
function dd(e) {
|
|
4571
4566
|
if (!ie(e)) return null;
|
|
4572
4567
|
const n = typeof e.subject == "string" ? e.subject : null, r = typeof e.body == "string" ? e.body : null, a = Array.isArray(e.recipients) ? e.recipients.flatMap((l) => !ie(l) || typeof l.label != "string" ? [] : [
|
|
4573
4568
|
{
|
|
@@ -4597,7 +4592,7 @@ function ld(e) {
|
|
|
4597
4592
|
...typeof e.attachmentNotice == "string" ? { attachmentNotice: e.attachmentNotice } : {}
|
|
4598
4593
|
};
|
|
4599
4594
|
}
|
|
4600
|
-
function
|
|
4595
|
+
function cd(e) {
|
|
4601
4596
|
if (!ie(e)) return null;
|
|
4602
4597
|
const n = typeof e.channel == "string" ? e.channel : null, r = typeof e.text == "string" ? e.text : null, a = Array.isArray(e.blocks) ? e.blocks.filter(ie) : null;
|
|
4603
4598
|
if (!n || !r || !a) return null;
|
|
@@ -4615,7 +4610,7 @@ function dd(e) {
|
|
|
4615
4610
|
...o ? { thread: o } : {}
|
|
4616
4611
|
};
|
|
4617
4612
|
}
|
|
4618
|
-
function
|
|
4613
|
+
function ud(e) {
|
|
4619
4614
|
if (!ie(e)) return null;
|
|
4620
4615
|
if (e.type === "email") {
|
|
4621
4616
|
const n = typeof e.address == "string" ? e.address : null;
|
|
@@ -4655,13 +4650,13 @@ function cd(e) {
|
|
|
4655
4650
|
}
|
|
4656
4651
|
return null;
|
|
4657
4652
|
}
|
|
4658
|
-
function
|
|
4653
|
+
function ps(e) {
|
|
4659
4654
|
if (!ie(e.result)) return null;
|
|
4660
4655
|
const n = ie(e.result.deliveryReadiness) ? e.result.deliveryReadiness : null, r = n && ie(n.intent) ? n.intent : null, a = ie(e.result.deliveryPackage) ? e.result.deliveryPackage : null, o = ie(e.result.deliveryResult) ? e.result.deliveryResult : null, i = ie(e.result.package) ? e.result.package : null, l = typeof (a == null ? void 0 : a.subject) == "string" && a.subject || typeof (n == null ? void 0 : n.subject) == "string" && n.subject || typeof (r == null ? void 0 : r.subject) == "string" && r.subject || typeof e.result.title == "string" && e.result.title || "Briefing email", c = typeof (a == null ? void 0 : a.bodyMarkdown) == "string" && a.bodyMarkdown || typeof (r == null ? void 0 : r.body) == "string" && r.body || typeof e.result.summary == "string" && e.result.summary || "", d = typeof (a == null ? void 0 : a.bodyHtml) == "string" && a.bodyHtml.trim() ? a.bodyHtml : null;
|
|
4661
4656
|
if (!c)
|
|
4662
4657
|
return null;
|
|
4663
4658
|
const u = Array.isArray(r == null ? void 0 : r.recipients) ? r.recipients.flatMap((h) => {
|
|
4664
|
-
const b =
|
|
4659
|
+
const b = ud(h);
|
|
4665
4660
|
return b ? [b] : [];
|
|
4666
4661
|
}) : [], p = Array.isArray(r == null ? void 0 : r.channels) ? r.channels.filter((h) => typeof h == "string") : typeof (o == null ? void 0 : o.channel) == "string" ? [o.channel] : [], f = Array.isArray(i == null ? void 0 : i.attachments) ? i.attachments.flatMap((h) => ie(h) ? typeof h.label == "string" ? [h.label] : typeof h.title == "string" ? [h.title] : typeof h.filename == "string" ? [h.filename] : [] : []) : [];
|
|
4667
4662
|
return {
|
|
@@ -4673,7 +4668,7 @@ function fs(e) {
|
|
|
4673
4668
|
attachments: f
|
|
4674
4669
|
};
|
|
4675
4670
|
}
|
|
4676
|
-
function
|
|
4671
|
+
function fs({
|
|
4677
4672
|
html: e,
|
|
4678
4673
|
title: n = "Briefing HTML artifact",
|
|
4679
4674
|
className: r
|
|
@@ -4738,7 +4733,7 @@ function aa(e, n) {
|
|
|
4738
4733
|
message: typeof r.message == "string" ? r.message : ""
|
|
4739
4734
|
};
|
|
4740
4735
|
}
|
|
4741
|
-
function
|
|
4736
|
+
function md(e) {
|
|
4742
4737
|
return e.status === "SUCCESS" ? "Complete" : e.status === "FAILED" ? "Failed" : e.status === "RUNNING" ? "Running" : "Queued";
|
|
4743
4738
|
}
|
|
4744
4739
|
function Jn(e) {
|
|
@@ -4786,7 +4781,7 @@ function Jn(e) {
|
|
|
4786
4781
|
message: typeof a.message == "string" ? a.message : ""
|
|
4787
4782
|
};
|
|
4788
4783
|
}
|
|
4789
|
-
function
|
|
4784
|
+
function hd(e) {
|
|
4790
4785
|
var n, r, a, o;
|
|
4791
4786
|
if (e.channel === "BRIEFING" || e.channels) {
|
|
4792
4787
|
const i = (r = (n = e.channels) == null ? void 0 : n.email) == null ? void 0 : r.status, l = (o = (a = e.channels) == null ? void 0 : a.slack) == null ? void 0 : o.status;
|
|
@@ -4807,19 +4802,19 @@ function md(e) {
|
|
|
4807
4802
|
}
|
|
4808
4803
|
return e.status === "SENT" ? e.channel === "SLACK" ? "Slack sent" : e.sentCount === 1 ? "Email sent" : `${e.sentCount} emails sent` : e.status === "FAILED" ? e.channel === "SLACK" ? "Slack failed" : e.failedCount === 1 ? "Email failed" : `${e.failedCount || e.attemptedCount || 0} emails failed` : e.status === "NOT_CONFIGURED" ? "Email not configured" : e.message || "Email delivery skipped";
|
|
4809
4804
|
}
|
|
4810
|
-
function
|
|
4805
|
+
function pd(e) {
|
|
4811
4806
|
return e.status === "SENT" ? Y.success.surface : e.status === "FAILED" || e.status === "PARTIAL" ? Y.danger.surface : Y.warning.surface;
|
|
4812
4807
|
}
|
|
4813
|
-
function
|
|
4808
|
+
function gs(e) {
|
|
4814
4809
|
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" });
|
|
4815
4810
|
}
|
|
4816
|
-
const
|
|
4811
|
+
const fd = [
|
|
4817
4812
|
{ pattern: /^plan preview/i, label: "Plan preview" },
|
|
4818
4813
|
{ pattern: /^analysis preview/i, label: "Analysis preview" }
|
|
4819
4814
|
];
|
|
4820
|
-
function
|
|
4815
|
+
function gd(e) {
|
|
4821
4816
|
const n = e.runtime.split(/;\s*/).map((o) => o.trim()).filter(Boolean), r = e.toolCalls.split(/;\s*/).map((o) => o.trim()).filter(Boolean), a = [];
|
|
4822
|
-
for (const { pattern: o, label: i } of
|
|
4817
|
+
for (const { pattern: o, label: i } of fd) {
|
|
4823
4818
|
const l = sa(
|
|
4824
4819
|
n.find((d) => o.test(d))
|
|
4825
4820
|
), c = sa(
|
|
@@ -4836,7 +4831,7 @@ function sa(e) {
|
|
|
4836
4831
|
).replace(/[.;]\s*$/, "").trim() || null;
|
|
4837
4832
|
}
|
|
4838
4833
|
const oa = 3;
|
|
4839
|
-
function
|
|
4834
|
+
function bd({
|
|
4840
4835
|
previewPlan: e,
|
|
4841
4836
|
previewRun: n,
|
|
4842
4837
|
scopeLabel: r
|
|
@@ -4849,7 +4844,7 @@ function gd({
|
|
|
4849
4844
|
Re,
|
|
4850
4845
|
{
|
|
4851
4846
|
field: "Datasets",
|
|
4852
|
-
value: /* @__PURE__ */ t(
|
|
4847
|
+
value: /* @__PURE__ */ t(Md, { plan: e })
|
|
4853
4848
|
}
|
|
4854
4849
|
),
|
|
4855
4850
|
/* @__PURE__ */ t(
|
|
@@ -4883,11 +4878,11 @@ function gd({
|
|
|
4883
4878
|
)
|
|
4884
4879
|
] })
|
|
4885
4880
|
] }),
|
|
4886
|
-
e.scope.grounding ? /* @__PURE__ */ t(
|
|
4881
|
+
e.scope.grounding ? /* @__PURE__ */ t(xd, { plan: e }) : null,
|
|
4887
4882
|
/* @__PURE__ */ s("div", { children: [
|
|
4888
4883
|
/* @__PURE__ */ t("div", { className: v(Z, "mb-2"), children: "What I'll do" }),
|
|
4889
4884
|
/* @__PURE__ */ t("ol", { className: "space-y-3", children: e.steps.map((a) => /* @__PURE__ */ t(
|
|
4890
|
-
|
|
4885
|
+
Bd,
|
|
4891
4886
|
{
|
|
4892
4887
|
order: a.order,
|
|
4893
4888
|
title: a.title,
|
|
@@ -4910,7 +4905,7 @@ function gd({
|
|
|
4910
4905
|
/* @__PURE__ */ t("div", { className: Z, children: "Estimate" }),
|
|
4911
4906
|
(() => {
|
|
4912
4907
|
var l;
|
|
4913
|
-
const o =
|
|
4908
|
+
const o = gd(e.estimate).find(
|
|
4914
4909
|
(c) => c.label.toLowerCase().includes("analysis")
|
|
4915
4910
|
), i = (o == null ? void 0 : o.duration) ?? ((l = e.estimate.runtime) == null ? void 0 : l.trim()) ?? null;
|
|
4916
4911
|
return /* @__PURE__ */ t("div", { className: "mt-1 text-[12px] tabular-nums text-foreground/80", children: i ?? "—" });
|
|
@@ -4921,10 +4916,10 @@ function gd({
|
|
|
4921
4916
|
/* @__PURE__ */ t(je, { className: "mt-0.5 h-3 w-3 shrink-0" }),
|
|
4922
4917
|
/* @__PURE__ */ t("ul", { className: "space-y-0.5", children: e.ambiguities.map((a) => /* @__PURE__ */ t("li", { children: a }, a)) })
|
|
4923
4918
|
] }) }) : null,
|
|
4924
|
-
n && !it(n.status) ? /* @__PURE__ */ t(
|
|
4919
|
+
n && !it(n.status) ? /* @__PURE__ */ t(bs, { run: n, labelPrefix: "Preview" }) : null
|
|
4925
4920
|
] });
|
|
4926
4921
|
}
|
|
4927
|
-
function
|
|
4922
|
+
function xd({ plan: e }) {
|
|
4928
4923
|
const n = e.scope.grounding;
|
|
4929
4924
|
if (!n)
|
|
4930
4925
|
return null;
|
|
@@ -4947,13 +4942,13 @@ function bd({ plan: e }) {
|
|
|
4947
4942
|
] })
|
|
4948
4943
|
] });
|
|
4949
4944
|
}
|
|
4950
|
-
function
|
|
4945
|
+
function bs({
|
|
4951
4946
|
run: e,
|
|
4952
4947
|
labelPrefix: n
|
|
4953
4948
|
}) {
|
|
4954
4949
|
const r = e.progress ?? null, a = r ? (r.recentEvents ?? []).filter(
|
|
4955
4950
|
(d) => d.label !== r.label || d.updatedAt !== r.updatedAt
|
|
4956
|
-
).slice(-4).reverse() : [], o = it(e.status), i = r ? zt(r.label) : `${n ? `${n} ` : ""}${
|
|
4951
|
+
).slice(-4).reverse() : [], o = it(e.status), i = r ? zt(r.label) : `${n ? `${n} ` : ""}${md(e)}`, l = Ns(e), c = r != null && r.updatedAt ? new Date(r.updatedAt).toLocaleTimeString([], {
|
|
4957
4952
|
hour: "numeric",
|
|
4958
4953
|
minute: "2-digit",
|
|
4959
4954
|
second: "2-digit"
|
|
@@ -4967,7 +4962,7 @@ function xs({
|
|
|
4967
4962
|
/* @__PURE__ */ s("div", { className: "flex items-start justify-between gap-3", children: [
|
|
4968
4963
|
/* @__PURE__ */ s("div", { className: "min-w-0", children: [
|
|
4969
4964
|
/* @__PURE__ */ s("div", { className: "flex items-center gap-2 text-[12px] text-foreground", children: [
|
|
4970
|
-
o ? /* @__PURE__ */ t(ne, { className: "h-3 w-3 animate-spin text-muted-foreground" }) :
|
|
4965
|
+
o ? /* @__PURE__ */ t(ne, { className: "h-3 w-3 animate-spin text-muted-foreground" }) : gs(e),
|
|
4971
4966
|
/* @__PURE__ */ t("span", { className: "font-medium", children: i })
|
|
4972
4967
|
] }),
|
|
4973
4968
|
r != null && r.detail && e.status !== "FAILED" ? /* @__PURE__ */ t("p", { className: "mt-1 text-[11px] leading-[1.5] text-muted-foreground", children: r.detail }) : null
|
|
@@ -4982,7 +4977,7 @@ function xs({
|
|
|
4982
4977
|
className: "flex items-start gap-2 text-[11px] leading-[1.45] text-muted-foreground",
|
|
4983
4978
|
children: [
|
|
4984
4979
|
/* @__PURE__ */ t(He, { className: "mt-0.5 h-3 w-3 shrink-0 text-border" }),
|
|
4985
|
-
/* @__PURE__ */ t("span", { children:
|
|
4980
|
+
/* @__PURE__ */ t("span", { children: vs(d.label) })
|
|
4986
4981
|
]
|
|
4987
4982
|
},
|
|
4988
4983
|
`${d.updatedAt}-${d.label}-${u}`
|
|
@@ -4993,7 +4988,7 @@ function xs({
|
|
|
4993
4988
|
}
|
|
4994
4989
|
);
|
|
4995
4990
|
}
|
|
4996
|
-
function
|
|
4991
|
+
function xs({
|
|
4997
4992
|
run: e,
|
|
4998
4993
|
onRetryRun: n,
|
|
4999
4994
|
retryDisabled: r,
|
|
@@ -5001,7 +4996,7 @@ function ys({
|
|
|
5001
4996
|
onDeleteRun: o,
|
|
5002
4997
|
deletePending: i
|
|
5003
4998
|
}) {
|
|
5004
|
-
const [l, c] = S(!1), [d, u] = S(!1), p =
|
|
4999
|
+
const [l, c] = S(!1), [d, u] = S(!1), p = ys(
|
|
5005
5000
|
e.completedAt ?? e.startedAt ?? e.scheduledFor
|
|
5006
5001
|
), h = (e.error ? /cancel/i.test(e.error) : !1) ? "Run cancelled" : "Run failed";
|
|
5007
5002
|
return /* @__PURE__ */ s(
|
|
@@ -5060,7 +5055,7 @@ function ys({
|
|
|
5060
5055
|
type: "button",
|
|
5061
5056
|
className: "inline-flex h-7 w-7 items-center justify-center rounded-control text-muted-foreground hover:bg-muted hover:text-foreground",
|
|
5062
5057
|
"aria-label": "More run actions",
|
|
5063
|
-
children: /* @__PURE__ */ t(
|
|
5058
|
+
children: /* @__PURE__ */ t(Ma, { className: "h-3.5 w-3.5" })
|
|
5064
5059
|
}
|
|
5065
5060
|
) }),
|
|
5066
5061
|
/* @__PURE__ */ t(Fn, { align: "end", className: "z-[60] w-44", children: /* @__PURE__ */ s(
|
|
@@ -5094,7 +5089,7 @@ function ys({
|
|
|
5094
5089
|
/* @__PURE__ */ s($n, { children: [
|
|
5095
5090
|
/* @__PURE__ */ t(Un, { disabled: i, children: "Cancel" }),
|
|
5096
5091
|
/* @__PURE__ */ s(
|
|
5097
|
-
|
|
5092
|
+
Ba,
|
|
5098
5093
|
{
|
|
5099
5094
|
disabled: i,
|
|
5100
5095
|
onClick: (b) => {
|
|
@@ -5115,20 +5110,20 @@ function ys({
|
|
|
5115
5110
|
}
|
|
5116
5111
|
);
|
|
5117
5112
|
}
|
|
5118
|
-
function
|
|
5113
|
+
function yd({ run: e }) {
|
|
5119
5114
|
const n = Jn(e);
|
|
5120
|
-
return !
|
|
5115
|
+
return !ms(e.status) || !n || n.status === "SKIPPED" ? null : /* @__PURE__ */ s(
|
|
5121
5116
|
"div",
|
|
5122
5117
|
{
|
|
5123
5118
|
className: v(
|
|
5124
5119
|
"rounded-card border px-3 py-2 text-[12px]",
|
|
5125
|
-
|
|
5120
|
+
pd(n)
|
|
5126
5121
|
),
|
|
5127
5122
|
"aria-label": "Email delivery status",
|
|
5128
5123
|
children: [
|
|
5129
5124
|
/* @__PURE__ */ s("div", { className: "flex items-center gap-2 font-medium", children: [
|
|
5130
5125
|
/* @__PURE__ */ t(Ei, { className: "h-3.5 w-3.5 shrink-0" }),
|
|
5131
|
-
/* @__PURE__ */ t("span", { children:
|
|
5126
|
+
/* @__PURE__ */ t("span", { children: hd(n) })
|
|
5132
5127
|
] }),
|
|
5133
5128
|
n.message ? /* @__PURE__ */ t("p", { className: "mt-1 text-[11px] leading-[1.5] opacity-80", children: n.message }) : null,
|
|
5134
5129
|
/* @__PURE__ */ s("p", { className: "mt-1 text-[11px] leading-[1.5] opacity-70", children: [
|
|
@@ -5139,7 +5134,7 @@ function xd({ run: e }) {
|
|
|
5139
5134
|
}
|
|
5140
5135
|
);
|
|
5141
5136
|
}
|
|
5142
|
-
function
|
|
5137
|
+
function ys(e) {
|
|
5143
5138
|
if (!e)
|
|
5144
5139
|
return null;
|
|
5145
5140
|
const n = new Date(e);
|
|
@@ -5150,11 +5145,11 @@ function vs(e) {
|
|
|
5150
5145
|
minute: "2-digit"
|
|
5151
5146
|
});
|
|
5152
5147
|
}
|
|
5153
|
-
function
|
|
5148
|
+
function vd(e) {
|
|
5154
5149
|
const n = Jn(e);
|
|
5155
5150
|
return e.status === "FAILED" ? (n == null ? void 0 : n.status) === "FAILED" ? "Last email failed" : "Last run failed" : (n == null ? void 0 : n.channel) === "BRIEFING" || n != null && n.channels ? n.status === "SENT" ? "Last delivery sent" : n.status === "FAILED" || n.status === "PARTIAL" ? "Last delivery failed" : "Last delivery completed" : (n == null ? void 0 : n.status) === "SENT" ? n.channel === "SLACK" ? "Last Slack sent" : n.sentCount === 1 ? "Last email sent" : "Last emails sent" : (n == null ? void 0 : n.status) === "FAILED" ? "Last email failed" : "Last run completed";
|
|
5156
5151
|
}
|
|
5157
|
-
function
|
|
5152
|
+
function Nd({
|
|
5158
5153
|
run: e,
|
|
5159
5154
|
onViewOutput: n,
|
|
5160
5155
|
onDeleteRun: r,
|
|
@@ -5163,12 +5158,12 @@ function vd({
|
|
|
5163
5158
|
retryDisabledReason: i,
|
|
5164
5159
|
deletePending: l
|
|
5165
5160
|
}) {
|
|
5166
|
-
const c = Jn(e), d =
|
|
5161
|
+
const c = Jn(e), d = ys(
|
|
5167
5162
|
e.completedAt ?? e.startedAt ?? e.scheduledFor
|
|
5168
5163
|
);
|
|
5169
5164
|
if (e.status === "FAILED" || (c == null ? void 0 : c.status) === "FAILED")
|
|
5170
5165
|
return /* @__PURE__ */ t(
|
|
5171
|
-
|
|
5166
|
+
xs,
|
|
5172
5167
|
{
|
|
5173
5168
|
run: e,
|
|
5174
5169
|
onRetryRun: a,
|
|
@@ -5200,8 +5195,8 @@ function vd({
|
|
|
5200
5195
|
Y.success.label
|
|
5201
5196
|
),
|
|
5202
5197
|
children: [
|
|
5203
|
-
|
|
5204
|
-
/* @__PURE__ */ t("span", { children:
|
|
5198
|
+
gs(e),
|
|
5199
|
+
/* @__PURE__ */ t("span", { children: vd(e) }),
|
|
5205
5200
|
d ? /* @__PURE__ */ t("span", { className: "font-normal text-muted-foreground", children: d }) : null
|
|
5206
5201
|
]
|
|
5207
5202
|
}
|
|
@@ -5215,7 +5210,7 @@ function vd({
|
|
|
5215
5210
|
className: _e,
|
|
5216
5211
|
onClick: n,
|
|
5217
5212
|
children: [
|
|
5218
|
-
/* @__PURE__ */ t(
|
|
5213
|
+
/* @__PURE__ */ t(Pa, { className: "h-3 w-3" }),
|
|
5219
5214
|
"View output"
|
|
5220
5215
|
]
|
|
5221
5216
|
}
|
|
@@ -5227,7 +5222,7 @@ function vd({
|
|
|
5227
5222
|
function zt(e) {
|
|
5228
5223
|
return e.replace(/\s+(started|completed)$/i, "");
|
|
5229
5224
|
}
|
|
5230
|
-
function
|
|
5225
|
+
function vs(e) {
|
|
5231
5226
|
const n = /^(.*)\s+(started|completed)$/i.exec(e.trim());
|
|
5232
5227
|
if (!n)
|
|
5233
5228
|
return e;
|
|
@@ -5236,7 +5231,7 @@ function Ns(e) {
|
|
|
5236
5231
|
}
|
|
5237
5232
|
const ia = 4;
|
|
5238
5233
|
function la({ run: e }) {
|
|
5239
|
-
const n = e.progress ?? null, r = n ?
|
|
5234
|
+
const n = e.progress ?? null, r = n ? wd(n.recentEvents ?? [], n.label).slice(-ia).reverse() : [], a = n != null && n.detail && n.detail !== n.label ? n.detail : null, o = Ns(e), i = [...r];
|
|
5240
5235
|
for (; i.length < ia; )
|
|
5241
5236
|
i.push(null);
|
|
5242
5237
|
return /* @__PURE__ */ s("div", { className: "border-b border-border bg-muted/60 px-4 py-3", children: [
|
|
@@ -5249,7 +5244,7 @@ function la({ run: e }) {
|
|
|
5249
5244
|
className: "flex items-start gap-2 text-[11px] leading-[1.45] text-muted-foreground",
|
|
5250
5245
|
children: l ? /* @__PURE__ */ s(ae, { children: [
|
|
5251
5246
|
/* @__PURE__ */ t(He, { className: "mt-0.5 h-3 w-3 shrink-0 text-border" }),
|
|
5252
|
-
/* @__PURE__ */ t("span", { children:
|
|
5247
|
+
/* @__PURE__ */ t("span", { children: vs(l.label) })
|
|
5253
5248
|
] }) : /* @__PURE__ */ s(ae, { children: [
|
|
5254
5249
|
/* @__PURE__ */ t("span", { className: "mt-1.5 inline-block h-px w-3 shrink-0 bg-border" }),
|
|
5255
5250
|
/* @__PURE__ */ t("span", { className: "text-border", children: "·" })
|
|
@@ -5269,7 +5264,7 @@ function la({ run: e }) {
|
|
|
5269
5264
|
o.length > 0 ? /* @__PURE__ */ t("p", { className: "mt-2 text-[11px] leading-[1.55] text-muted-foreground", children: o.join(" ") }) : null
|
|
5270
5265
|
] });
|
|
5271
5266
|
}
|
|
5272
|
-
function
|
|
5267
|
+
function wd(e, n) {
|
|
5273
5268
|
const r = n ? n.replace(/\s+(started|completed)$/i, "").trim().toLowerCase() : null, a = r ? e.filter((c) => c.label.replace(/\s+(started|completed)$/i, "").trim().toLowerCase() !== r) : e.slice(), o = /* @__PURE__ */ new Set();
|
|
5274
5269
|
for (const c of a) {
|
|
5275
5270
|
const d = /^(.*)\s+completed$/i.exec(c.label.trim());
|
|
@@ -5286,7 +5281,7 @@ function Nd(e, n) {
|
|
|
5286
5281
|
l.set(c.label.trim().toLowerCase(), c);
|
|
5287
5282
|
return Array.from(l.values());
|
|
5288
5283
|
}
|
|
5289
|
-
function
|
|
5284
|
+
function Cd() {
|
|
5290
5285
|
return /* @__PURE__ */ t(
|
|
5291
5286
|
"div",
|
|
5292
5287
|
{
|
|
@@ -5304,12 +5299,12 @@ function wd() {
|
|
|
5304
5299
|
}
|
|
5305
5300
|
);
|
|
5306
5301
|
}
|
|
5307
|
-
function
|
|
5302
|
+
function kd({
|
|
5308
5303
|
run: e,
|
|
5309
5304
|
onExpand: n
|
|
5310
5305
|
}) {
|
|
5311
5306
|
var o;
|
|
5312
|
-
const r =
|
|
5307
|
+
const r = hs(e.startedAt), a = (o = e.progress) != null && o.label ? zt(e.progress.label) : "Briefing running";
|
|
5313
5308
|
return /* @__PURE__ */ s("div", { className: "fixed bottom-4 right-4 z-50 w-[320px] overflow-hidden rounded-card border border-border bg-background shadow-md", children: [
|
|
5314
5309
|
/* @__PURE__ */ s(
|
|
5315
5310
|
"button",
|
|
@@ -5331,7 +5326,7 @@ function Cd({
|
|
|
5331
5326
|
/* @__PURE__ */ t("div", { className: "border-t border-border/60 bg-muted px-3 py-1.5", children: /* @__PURE__ */ t("p", { className: "text-[11px] text-muted-foreground", children: "We'll notify you when it's ready" }) })
|
|
5332
5327
|
] });
|
|
5333
5328
|
}
|
|
5334
|
-
function
|
|
5329
|
+
function Sd({
|
|
5335
5330
|
title: e,
|
|
5336
5331
|
durationSeconds: n,
|
|
5337
5332
|
status: r,
|
|
@@ -5399,10 +5394,10 @@ function kd({
|
|
|
5399
5394
|
}
|
|
5400
5395
|
);
|
|
5401
5396
|
}
|
|
5402
|
-
function
|
|
5397
|
+
function Ad({
|
|
5403
5398
|
run: e
|
|
5404
5399
|
}) {
|
|
5405
|
-
const n =
|
|
5400
|
+
const n = hs(e == null ? void 0 : e.startedAt);
|
|
5406
5401
|
return n === null ? null : /* @__PURE__ */ s("span", { className: "font-mono text-[11px] tabular-nums text-muted-foreground", children: [
|
|
5407
5402
|
"· ",
|
|
5408
5403
|
Gn(n)
|
|
@@ -5432,7 +5427,7 @@ function Ed({
|
|
|
5432
5427
|
children: /* @__PURE__ */ s("div", { className: "flex items-center gap-2 px-4 py-2 text-[12px]", children: [
|
|
5433
5428
|
/* @__PURE__ */ t(ne, { className: "h-3 w-3 shrink-0 animate-spin text-muted-foreground" }),
|
|
5434
5429
|
/* @__PURE__ */ t("span", { className: "min-w-0 truncate font-medium text-foreground", children: u }),
|
|
5435
|
-
/* @__PURE__ */ t(
|
|
5430
|
+
/* @__PURE__ */ t(Ad, { run: b }),
|
|
5436
5431
|
h ? /* @__PURE__ */ s(ae, { children: [
|
|
5437
5432
|
/* @__PURE__ */ t("span", { className: "shrink-0 text-border", children: "·" }),
|
|
5438
5433
|
/* @__PURE__ */ t("span", { className: "min-w-0 truncate text-muted-foreground", children: p })
|
|
@@ -5489,17 +5484,17 @@ function Ed({
|
|
|
5489
5484
|
}
|
|
5490
5485
|
);
|
|
5491
5486
|
}
|
|
5492
|
-
function
|
|
5487
|
+
function Ns(e) {
|
|
5493
5488
|
if (!e.result || typeof e.result != "object" || Array.isArray(e.result))
|
|
5494
5489
|
return [];
|
|
5495
5490
|
const n = e.result.warnings;
|
|
5496
5491
|
return Array.isArray(n) ? n.filter((r) => typeof r == "string") : [];
|
|
5497
5492
|
}
|
|
5498
|
-
function
|
|
5493
|
+
function Id(e) {
|
|
5499
5494
|
var n, r;
|
|
5500
5495
|
return ((r = (n = e.result) == null ? void 0 : n.limits) == null ? void 0 : r.previewKind) === "email_package";
|
|
5501
5496
|
}
|
|
5502
|
-
function
|
|
5497
|
+
function ws({
|
|
5503
5498
|
children: e,
|
|
5504
5499
|
muted: n
|
|
5505
5500
|
}) {
|
|
@@ -5514,7 +5509,7 @@ function Cs({
|
|
|
5514
5509
|
}
|
|
5515
5510
|
);
|
|
5516
5511
|
}
|
|
5517
|
-
function
|
|
5512
|
+
function Dd({
|
|
5518
5513
|
recipient: e
|
|
5519
5514
|
}) {
|
|
5520
5515
|
const [n, r] = S(!1), a = e.previewMembers ?? [];
|
|
@@ -5554,12 +5549,12 @@ function Id({
|
|
|
5554
5549
|
" members"
|
|
5555
5550
|
] }) : null
|
|
5556
5551
|
] }) : null
|
|
5557
|
-
] }) : /* @__PURE__ */ s(
|
|
5552
|
+
] }) : /* @__PURE__ */ s(ws, { children: [
|
|
5558
5553
|
/* @__PURE__ */ t("span", { className: "min-w-0 truncate", children: e.label }),
|
|
5559
5554
|
e.detail ? /* @__PURE__ */ t("span", { className: "ml-1.5 min-w-0 truncate text-muted-foreground", children: e.detail }) : null
|
|
5560
5555
|
] });
|
|
5561
5556
|
}
|
|
5562
|
-
function
|
|
5557
|
+
function Cs({
|
|
5563
5558
|
markdown: e,
|
|
5564
5559
|
className: n
|
|
5565
5560
|
}) {
|
|
@@ -5627,7 +5622,7 @@ function Qn({
|
|
|
5627
5622
|
/* @__PURE__ */ s("div", { className: "mt-1 flex flex-wrap items-center gap-x-1.5 gap-y-1 text-[11px] text-muted-foreground", children: [
|
|
5628
5623
|
/* @__PURE__ */ t("span", { className: "text-muted-foreground/70", children: "To" }),
|
|
5629
5624
|
e.recipients.length > 0 ? e.recipients.map((l, c) => /* @__PURE__ */ t(
|
|
5630
|
-
|
|
5625
|
+
Dd,
|
|
5631
5626
|
{
|
|
5632
5627
|
recipient: l
|
|
5633
5628
|
},
|
|
@@ -5644,11 +5639,11 @@ function Qn({
|
|
|
5644
5639
|
] }),
|
|
5645
5640
|
o || n ? /* @__PURE__ */ s("div", { className: "flex shrink-0 items-center gap-2", children: [
|
|
5646
5641
|
o ? /* @__PURE__ */ t(
|
|
5647
|
-
|
|
5642
|
+
io,
|
|
5648
5643
|
{
|
|
5649
5644
|
value: r,
|
|
5650
5645
|
onValueChange: (l) => a(l === "html" ? "html" : "rendered"),
|
|
5651
|
-
children: /* @__PURE__ */ s(
|
|
5646
|
+
children: /* @__PURE__ */ s(lo, { size: "xs", children: [
|
|
5652
5647
|
/* @__PURE__ */ t(Tr, { value: "rendered", children: "Rendered" }),
|
|
5653
5648
|
/* @__PURE__ */ t(Tr, { value: "html", children: "HTML" })
|
|
5654
5649
|
] })
|
|
@@ -5667,17 +5662,17 @@ function Qn({
|
|
|
5667
5662
|
] }) : null
|
|
5668
5663
|
] }),
|
|
5669
5664
|
r === "html" && o ? /* @__PURE__ */ t(
|
|
5670
|
-
|
|
5665
|
+
fs,
|
|
5671
5666
|
{
|
|
5672
5667
|
html: e.bodyHtml ?? "",
|
|
5673
5668
|
title: "Briefing email HTML preview",
|
|
5674
5669
|
className: "h-[620px] rounded-none border-0"
|
|
5675
5670
|
}
|
|
5676
|
-
) : /* @__PURE__ */ t(
|
|
5671
|
+
) : /* @__PURE__ */ t(Cs, { markdown: e.body, className: "px-4 py-3.5" }),
|
|
5677
5672
|
e.attachments.length > 0 || e.attachmentNotice ? /* @__PURE__ */ s("footer", { className: "border-t border-border/60 px-4 py-2", children: [
|
|
5678
5673
|
e.attachments.length > 0 ? /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center gap-1.5 text-[11px] text-muted-foreground", children: [
|
|
5679
5674
|
/* @__PURE__ */ t("span", { children: "Attached:" }),
|
|
5680
|
-
e.attachments.map((l) => /* @__PURE__ */ t(
|
|
5675
|
+
e.attachments.map((l) => /* @__PURE__ */ t(ws, { children: l }, l))
|
|
5681
5676
|
] }) : null,
|
|
5682
5677
|
e.attachmentNotice ? /* @__PURE__ */ s("div", { className: "mt-2 flex items-start gap-1.5 rounded-card border border-border bg-muted px-2.5 py-1.5 text-[11px] leading-[1.45] text-muted-foreground", children: [
|
|
5683
5678
|
/* @__PURE__ */ t(je, { className: "mt-0.5 h-3 w-3 shrink-0" }),
|
|
@@ -5691,17 +5686,17 @@ function dt(e) {
|
|
|
5691
5686
|
const n = e.text;
|
|
5692
5687
|
return typeof n == "string" ? n : null;
|
|
5693
5688
|
}
|
|
5694
|
-
function
|
|
5689
|
+
function Td(e) {
|
|
5695
5690
|
return e.type === "header" || e.type === "section" ? dt(e.text) : e.type === "context" && Array.isArray(e.elements) && e.elements.map((r) => ie(r) ? dt(r) : null).filter((r) => !!r).join(" · ") || null;
|
|
5696
5691
|
}
|
|
5697
|
-
function
|
|
5692
|
+
function Ld(e) {
|
|
5698
5693
|
return e.flatMap((n) => n.type !== "actions" || !Array.isArray(n.elements) ? [] : n.elements.flatMap((r) => {
|
|
5699
5694
|
if (!ie(r)) return [];
|
|
5700
5695
|
const a = dt(r.text);
|
|
5701
5696
|
return a ? [a] : [];
|
|
5702
5697
|
}));
|
|
5703
5698
|
}
|
|
5704
|
-
function
|
|
5699
|
+
function Rd(e) {
|
|
5705
5700
|
const n = {
|
|
5706
5701
|
header: null,
|
|
5707
5702
|
context: null,
|
|
@@ -5738,27 +5733,27 @@ function bn({ size: e = 6 }) {
|
|
|
5738
5733
|
}
|
|
5739
5734
|
);
|
|
5740
5735
|
}
|
|
5741
|
-
function
|
|
5736
|
+
function Fd({ channel: e }) {
|
|
5742
5737
|
const r = /^[CDG][A-Z0-9]{6,}$/.test(e) ? e : e.startsWith("#") ? e.slice(1) : e;
|
|
5743
5738
|
return /* @__PURE__ */ s("span", { className: "inline-flex items-center gap-1 text-[11px] text-muted-foreground", children: [
|
|
5744
5739
|
/* @__PURE__ */ t(zn, { className: "h-3 w-3" }),
|
|
5745
5740
|
/* @__PURE__ */ t("span", { className: "truncate", children: r })
|
|
5746
5741
|
] });
|
|
5747
5742
|
}
|
|
5748
|
-
function
|
|
5743
|
+
function Pd({
|
|
5749
5744
|
preview: e,
|
|
5750
5745
|
onExpand: n,
|
|
5751
5746
|
trustLine: r,
|
|
5752
5747
|
reactions: a
|
|
5753
5748
|
}) {
|
|
5754
|
-
const o =
|
|
5749
|
+
const o = Rd(e.blocks), i = o.header ? dt(o.header.text) : null, l = o.context ? Td(o.context) : null, c = o.sections.map((f) => dt(f.text)).filter((f) => !!f), d = o.actions ? Ld([o.actions]) : [], [u, p] = S(!0);
|
|
5755
5750
|
return /* @__PURE__ */ s("article", { className: "overflow-hidden rounded-card border border-border bg-background", children: [
|
|
5756
5751
|
/* @__PURE__ */ s("header", { className: "flex items-center justify-between gap-3 border-b border-border/60 px-4 py-3", children: [
|
|
5757
5752
|
/* @__PURE__ */ s("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
5758
5753
|
/* @__PURE__ */ t(kn, { className: "h-4 w-4 shrink-0 text-muted-foreground" }),
|
|
5759
5754
|
/* @__PURE__ */ s("div", { className: "min-w-0", children: [
|
|
5760
5755
|
/* @__PURE__ */ t("h3", { className: "truncate text-[13px] font-semibold leading-5 text-foreground", children: "Slack message preview" }),
|
|
5761
|
-
/* @__PURE__ */ t("div", { className: "mt-0.5", children: /* @__PURE__ */ t(
|
|
5756
|
+
/* @__PURE__ */ t("div", { className: "mt-0.5", children: /* @__PURE__ */ t(Fd, { channel: e.channel }) })
|
|
5762
5757
|
] })
|
|
5763
5758
|
] }),
|
|
5764
5759
|
n ? /* @__PURE__ */ t(
|
|
@@ -5863,7 +5858,7 @@ function Re({
|
|
|
5863
5858
|
}
|
|
5864
5859
|
);
|
|
5865
5860
|
}
|
|
5866
|
-
function
|
|
5861
|
+
function Md({ plan: e }) {
|
|
5867
5862
|
const n = e.scope.datasets;
|
|
5868
5863
|
return n.length ? /* @__PURE__ */ t("div", { className: "flex flex-wrap gap-1.5", children: n.map((r) => /* @__PURE__ */ s(
|
|
5869
5864
|
"span",
|
|
@@ -5880,7 +5875,7 @@ function Pd({ plan: e }) {
|
|
|
5880
5875
|
/* @__PURE__ */ t("span", { children: "No reachable datasets discovered during plan preview. Choose a dashboard, domain, metric, or more specific business question before running." })
|
|
5881
5876
|
] });
|
|
5882
5877
|
}
|
|
5883
|
-
function
|
|
5878
|
+
function Bd({
|
|
5884
5879
|
order: e,
|
|
5885
5880
|
title: n,
|
|
5886
5881
|
detail: r,
|
|
@@ -5953,7 +5948,7 @@ function da({
|
|
|
5953
5948
|
fullWidth: r
|
|
5954
5949
|
}) {
|
|
5955
5950
|
var u, p, f, h, b;
|
|
5956
|
-
const a = e.result, o = (u = a == null ? void 0 : a.artifactPreview) == null ? void 0 : u.markdown, i = (p = a == null ? void 0 : a.artifactPreview) == null ? void 0 : p.html, l =
|
|
5951
|
+
const a = e.result, o = (u = a == null ? void 0 : a.artifactPreview) == null ? void 0 : u.markdown, i = (p = a == null ? void 0 : a.artifactPreview) == null ? void 0 : p.html, l = Id(e), c = l ? dd((f = a == null ? void 0 : a.limits) == null ? void 0 : f.emailPreview) : null, d = ((h = a == null ? void 0 : a.limits) == null ? void 0 : h.previewKind) === "slack_message" ? cd(a.limits.slackPreview) : null;
|
|
5957
5952
|
return /* @__PURE__ */ s(
|
|
5958
5953
|
"div",
|
|
5959
5954
|
{
|
|
@@ -5974,7 +5969,7 @@ function da({
|
|
|
5974
5969
|
{
|
|
5975
5970
|
type: "button",
|
|
5976
5971
|
onClick: n,
|
|
5977
|
-
className: v(
|
|
5972
|
+
className: v(Et, "h-6 px-1.5 text-[11px]"),
|
|
5978
5973
|
"aria-label": "Expand preview to a larger view",
|
|
5979
5974
|
children: [
|
|
5980
5975
|
/* @__PURE__ */ t(Tt, { className: "h-3 w-3" }),
|
|
@@ -5991,7 +5986,7 @@ function da({
|
|
|
5991
5986
|
] }) : null
|
|
5992
5987
|
] }),
|
|
5993
5988
|
c ? /* @__PURE__ */ t(Qn, { preview: c, onExpand: n }) : d ? /* @__PURE__ */ t(
|
|
5994
|
-
|
|
5989
|
+
Pd,
|
|
5995
5990
|
{
|
|
5996
5991
|
preview: d,
|
|
5997
5992
|
onExpand: n,
|
|
@@ -6004,10 +5999,10 @@ function da({
|
|
|
6004
5999
|
"rounded-card border border-border px-4 py-3",
|
|
6005
6000
|
l && "bg-background "
|
|
6006
6001
|
),
|
|
6007
|
-
children: /* @__PURE__ */ t(
|
|
6002
|
+
children: /* @__PURE__ */ t(Cs, { markdown: o })
|
|
6008
6003
|
}
|
|
6009
6004
|
) : i ? /* @__PURE__ */ t(
|
|
6010
|
-
|
|
6005
|
+
fs,
|
|
6011
6006
|
{
|
|
6012
6007
|
html: i,
|
|
6013
6008
|
title: "Briefing preview HTML artifact",
|
|
@@ -6031,10 +6026,10 @@ function ca({
|
|
|
6031
6026
|
retryDisabledReason: i,
|
|
6032
6027
|
deletePending: l
|
|
6033
6028
|
}) {
|
|
6034
|
-
const c =
|
|
6029
|
+
const c = ps(e), d = e.status === "FAILED";
|
|
6035
6030
|
return /* @__PURE__ */ s("div", { className: "space-y-4", "aria-label": "Briefing run result", children: [
|
|
6036
6031
|
d ? /* @__PURE__ */ t(
|
|
6037
|
-
|
|
6032
|
+
xs,
|
|
6038
6033
|
{
|
|
6039
6034
|
run: e,
|
|
6040
6035
|
onRetryRun: a,
|
|
@@ -6052,11 +6047,11 @@ function ca({
|
|
|
6052
6047
|
/* @__PURE__ */ t("div", { className: Z, children: "Briefing" }),
|
|
6053
6048
|
/* @__PURE__ */ t("article", { className: "mt-2 rounded-card border border-border px-4 py-3 text-[13px] leading-[1.55] text-foreground", children: e.result.summary })
|
|
6054
6049
|
] }) : null,
|
|
6055
|
-
/* @__PURE__ */ t(
|
|
6056
|
-
/* @__PURE__ */ t(
|
|
6050
|
+
/* @__PURE__ */ t(yd, { run: e }),
|
|
6051
|
+
/* @__PURE__ */ t(bs, { run: e, labelPrefix: "Run" })
|
|
6057
6052
|
] });
|
|
6058
6053
|
}
|
|
6059
|
-
function
|
|
6054
|
+
function Od({
|
|
6060
6055
|
previewRun: e,
|
|
6061
6056
|
isStale: n,
|
|
6062
6057
|
onViewOutput: r
|
|
@@ -6079,7 +6074,7 @@ function Bd({
|
|
|
6079
6074
|
className: _e,
|
|
6080
6075
|
onClick: r,
|
|
6081
6076
|
children: [
|
|
6082
|
-
/* @__PURE__ */ t(
|
|
6077
|
+
/* @__PURE__ */ t(Pa, { className: "h-3 w-3" }),
|
|
6083
6078
|
"View output"
|
|
6084
6079
|
]
|
|
6085
6080
|
}
|
|
@@ -6089,36 +6084,36 @@ function Bd({
|
|
|
6089
6084
|
function Ot(e, n) {
|
|
6090
6085
|
return e.includes(n) ? e : [...e, n];
|
|
6091
6086
|
}
|
|
6092
|
-
function
|
|
6087
|
+
function Vd(e, n) {
|
|
6093
6088
|
const r = e.filter((a) => a !== n);
|
|
6094
6089
|
return r.length > 0 ? r : [n];
|
|
6095
6090
|
}
|
|
6096
|
-
const
|
|
6097
|
-
createBriefing:
|
|
6091
|
+
const $d = {
|
|
6092
|
+
createBriefing: ll,
|
|
6098
6093
|
updateBriefing: Hn,
|
|
6099
|
-
pauseBriefing:
|
|
6100
|
-
resumeBriefing:
|
|
6101
|
-
deleteBriefing:
|
|
6102
|
-
getBriefing:
|
|
6103
|
-
runBriefingNow:
|
|
6104
|
-
getBriefingRun:
|
|
6105
|
-
cancelBriefingRun:
|
|
6106
|
-
deleteBriefingRun:
|
|
6107
|
-
previewBriefingPlan:
|
|
6108
|
-
runBriefingPreview:
|
|
6109
|
-
getBriefingPreviewRun:
|
|
6110
|
-
polishBriefingText:
|
|
6111
|
-
}, ua = 2e3,
|
|
6112
|
-
function
|
|
6094
|
+
pauseBriefing: Ga,
|
|
6095
|
+
resumeBriefing: Ja,
|
|
6096
|
+
deleteBriefing: Qa,
|
|
6097
|
+
getBriefing: Wa,
|
|
6098
|
+
runBriefingNow: Ya,
|
|
6099
|
+
getBriefingRun: Za,
|
|
6100
|
+
cancelBriefingRun: ml,
|
|
6101
|
+
deleteBriefingRun: hl,
|
|
6102
|
+
previewBriefingPlan: dl,
|
|
6103
|
+
runBriefingPreview: cl,
|
|
6104
|
+
getBriefingPreviewRun: ul,
|
|
6105
|
+
polishBriefingText: pl
|
|
6106
|
+
}, ua = 2e3, Ud = 10 * 6e4, _d = 20 * 6e4;
|
|
6107
|
+
function jd() {
|
|
6113
6108
|
return typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : `briefing-run-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
|
|
6114
6109
|
}
|
|
6115
|
-
function
|
|
6110
|
+
function Ae(e) {
|
|
6116
6111
|
return e instanceof Error && e.message ? e.message : "Something went wrong. Please try again.";
|
|
6117
6112
|
}
|
|
6118
|
-
function
|
|
6113
|
+
function zd(e, n) {
|
|
6119
6114
|
return `${e.replace(/\/$/, "")}${n}`;
|
|
6120
6115
|
}
|
|
6121
|
-
function
|
|
6116
|
+
function Kd(e, n) {
|
|
6122
6117
|
if (!e) return n;
|
|
6123
6118
|
try {
|
|
6124
6119
|
return new URL(n, new URL(e).origin).toString();
|
|
@@ -6127,7 +6122,7 @@ function zd(e, n) {
|
|
|
6127
6122
|
}
|
|
6128
6123
|
}
|
|
6129
6124
|
async function xn(e, n, r, a) {
|
|
6130
|
-
const o = await fetch(
|
|
6125
|
+
const o = await fetch(zd(e, r), {
|
|
6131
6126
|
cache: "no-store",
|
|
6132
6127
|
...a,
|
|
6133
6128
|
headers: {
|
|
@@ -6141,7 +6136,7 @@ async function xn(e, n, r, a) {
|
|
|
6141
6136
|
}
|
|
6142
6137
|
return i;
|
|
6143
6138
|
}
|
|
6144
|
-
function
|
|
6139
|
+
function ks(e, n) {
|
|
6145
6140
|
return n || (e != null && e.source ? {
|
|
6146
6141
|
source: e.source,
|
|
6147
6142
|
label: e.source.type === "dashboard" ? "This dashboard" : "This project"
|
|
@@ -6152,12 +6147,12 @@ function Ss(e, n) {
|
|
|
6152
6147
|
}
|
|
6153
6148
|
function ma(e) {
|
|
6154
6149
|
if (e.briefing)
|
|
6155
|
-
return
|
|
6156
|
-
const n =
|
|
6150
|
+
return At(e.briefing);
|
|
6151
|
+
const n = ks(
|
|
6157
6152
|
e.briefing,
|
|
6158
6153
|
e.sourceContext
|
|
6159
6154
|
);
|
|
6160
|
-
return
|
|
6155
|
+
return Ml({
|
|
6161
6156
|
source: n.source,
|
|
6162
6157
|
name: n.source.type === "dashboard" ? "Dashboard Briefing" : "Project Briefing",
|
|
6163
6158
|
instruction: Dn,
|
|
@@ -6169,10 +6164,10 @@ function ma(e) {
|
|
|
6169
6164
|
} : {}
|
|
6170
6165
|
});
|
|
6171
6166
|
}
|
|
6172
|
-
function
|
|
6167
|
+
function Hd(e) {
|
|
6173
6168
|
return e === "PAUSED" || e === "DISABLED" ? "bg-muted text-muted-foreground" : "bg-primary/10 text-primary";
|
|
6174
6169
|
}
|
|
6175
|
-
function
|
|
6170
|
+
function qd({
|
|
6176
6171
|
apiServiceUrl: e,
|
|
6177
6172
|
token: n,
|
|
6178
6173
|
briefing: r,
|
|
@@ -6180,7 +6175,7 @@ function Hd({
|
|
|
6180
6175
|
title: o = "Briefing",
|
|
6181
6176
|
className: i,
|
|
6182
6177
|
client: l,
|
|
6183
|
-
generateRequestId: c =
|
|
6178
|
+
generateRequestId: c = jd,
|
|
6184
6179
|
onSaved: d,
|
|
6185
6180
|
onDeleted: u,
|
|
6186
6181
|
onRunStarted: p,
|
|
@@ -6188,20 +6183,20 @@ function Hd({
|
|
|
6188
6183
|
onBack: h,
|
|
6189
6184
|
onMinimizeRun: b
|
|
6190
6185
|
}) {
|
|
6191
|
-
var Nr, wr, Cr, kr, Sr,
|
|
6192
|
-
const { authToken: D, tokenProps: k } = Dt(), { currentUser: N } =
|
|
6186
|
+
var Nr, wr, Cr, kr, Sr, Ar, Er;
|
|
6187
|
+
const { authToken: D, tokenProps: k } = Dt(), { currentUser: N } = La(), g = H((m) => m.dashboard), L = H((m) => m.theme), x = H((m) => m.selectedSheetId), C = H((m) => m.filterValues), T = H((m) => m.controlValues), $ = H(
|
|
6193
6188
|
(m) => m.semanticExecutionPayload
|
|
6194
6189
|
), R = H(
|
|
6195
6190
|
(m) => m.cardControlValuesMap
|
|
6196
|
-
),
|
|
6191
|
+
), E = H(
|
|
6197
6192
|
(m) => m.inlineFilterValuesMap
|
|
6198
6193
|
), P = H(
|
|
6199
6194
|
(m) => m.dashboardInputValues
|
|
6200
|
-
), z =
|
|
6201
|
-
() =>
|
|
6195
|
+
), z = co((m) => m.interactionStates), B = e ?? (k == null ? void 0 : k.apiServiceUrl), K = n ?? (D == null ? void 0 : D.accessToken), _ = V(() => ({ ...$d, ...l }), [l]), O = V(
|
|
6196
|
+
() => ks(r, a),
|
|
6202
6197
|
[r, a]
|
|
6203
6198
|
), J = V(
|
|
6204
|
-
() =>
|
|
6199
|
+
() => ld(N),
|
|
6205
6200
|
[N]
|
|
6206
6201
|
), [I, ve] = S(
|
|
6207
6202
|
r ?? null
|
|
@@ -6213,16 +6208,16 @@ function Hd({
|
|
|
6213
6208
|
})
|
|
6214
6209
|
), [se, X] = S(null), [De, ke] = S([]), [Te, U] = S(null), [et, Me] = S(null), [Le, tt] = S(
|
|
6215
6210
|
null
|
|
6216
|
-
), [W, Se] = S(null), [qe, j] = S(0), [ee, xt] = S(null), [Yn,
|
|
6211
|
+
), [W, Se] = S(null), [qe, j] = S(0), [ee, xt] = S(null), [Yn, A] = S(!1), [M, oe] = S("edit"), [be, we] = S(0), [lt, Es] = S(!1), [Is, qt] = S("EMAIL"), [Ds, Wt] = S(!1), [Zn, Gt] = S(null), [Ts, Jt] = S(!1), [le, Ls] = S(
|
|
6217
6212
|
null
|
|
6218
|
-
), [Qt, Xn] = S([]), [Lt, er] = S(!1), [tr, nr] = S(null), [
|
|
6213
|
+
), [Qt, Xn] = S([]), [Lt, er] = S(!1), [tr, nr] = S(null), [Rs, Fs] = S(0), [nt, Rt] = S(null), [Ps, Yt] = S(!1), [Zt, rr] = S(!1), [ar, sr] = S(null), [yt, Xt] = S(null);
|
|
6219
6214
|
ce(() => {
|
|
6220
6215
|
if (!yt) return;
|
|
6221
6216
|
const m = window.setTimeout(() => Xt(null), 12e3);
|
|
6222
6217
|
return () => window.clearTimeout(m);
|
|
6223
6218
|
}, [yt]);
|
|
6224
|
-
const or =
|
|
6225
|
-
activeRunId:
|
|
6219
|
+
const or = Ee(void 0), {
|
|
6220
|
+
activeRunId: Ms,
|
|
6226
6221
|
resetTerminalRun: ir,
|
|
6227
6222
|
startRun: en,
|
|
6228
6223
|
stop: tn
|
|
@@ -6230,7 +6225,7 @@ function Hd({
|
|
|
6230
6225
|
apiServiceUrl: B,
|
|
6231
6226
|
token: K,
|
|
6232
6227
|
intervalMs: ua,
|
|
6233
|
-
timeoutMs:
|
|
6228
|
+
timeoutMs: _d,
|
|
6234
6229
|
fetchRun: ({ apiServiceUrl: m, token: y, runId: F }) => {
|
|
6235
6230
|
if (!(I != null && I.id))
|
|
6236
6231
|
throw new Error("Missing saved Briefing id for run polling.");
|
|
@@ -6248,7 +6243,7 @@ function Hd({
|
|
|
6248
6243
|
oe("result"), U(null);
|
|
6249
6244
|
},
|
|
6250
6245
|
onError: (m) => {
|
|
6251
|
-
U(`Unable to refresh briefing run status: ${
|
|
6246
|
+
U(`Unable to refresh briefing run status: ${Ae(m)}`);
|
|
6252
6247
|
},
|
|
6253
6248
|
onTimeout: () => {
|
|
6254
6249
|
U(
|
|
@@ -6256,14 +6251,14 @@ function Hd({
|
|
|
6256
6251
|
);
|
|
6257
6252
|
}
|
|
6258
6253
|
}), {
|
|
6259
|
-
activeRunId:
|
|
6260
|
-
startRun:
|
|
6254
|
+
activeRunId: Bs,
|
|
6255
|
+
startRun: Os,
|
|
6261
6256
|
stop: lr
|
|
6262
6257
|
} = In({
|
|
6263
6258
|
apiServiceUrl: B,
|
|
6264
6259
|
token: K,
|
|
6265
6260
|
intervalMs: ua,
|
|
6266
|
-
timeoutMs:
|
|
6261
|
+
timeoutMs: Ud,
|
|
6267
6262
|
fetchRun: ({ apiServiceUrl: m, token: y, runId: F }) => _.getBriefingPreviewRun(
|
|
6268
6263
|
m,
|
|
6269
6264
|
y,
|
|
@@ -6276,7 +6271,7 @@ function Hd({
|
|
|
6276
6271
|
m.status === "FAILED" ? U(m.error || "Briefing preview failed.") : (U(null), oe("result"));
|
|
6277
6272
|
},
|
|
6278
6273
|
onError: (m) => {
|
|
6279
|
-
U(`Unable to refresh briefing preview status: ${
|
|
6274
|
+
U(`Unable to refresh briefing preview status: ${Ae(m)}`);
|
|
6280
6275
|
},
|
|
6281
6276
|
onTimeout: (m) => {
|
|
6282
6277
|
Se(
|
|
@@ -6288,18 +6283,18 @@ function Hd({
|
|
|
6288
6283
|
} : y
|
|
6289
6284
|
), U("Briefing preview status refresh timed out.");
|
|
6290
6285
|
}
|
|
6291
|
-
}), de = !!(I != null && I.id), nn = (I == null ? void 0 : I.status) === "PAUSED" || w.schedule.status === "PAUSED",
|
|
6286
|
+
}), de = !!(I != null && I.id), nn = (I == null ? void 0 : I.status) === "PAUSED" || w.schedule.status === "PAUSED", Vs = de && !!(I != null && I.scheduleExpr || w.schedule.enabled), rt = et ?? (I == null ? void 0 : I.latestRun) ?? null, xe = rt && it(rt.status) && Ms === rt.id ? rt : null, Ne = rt && ms(rt.status) ? rt : null, ye = M === "result" && ((W == null ? void 0 : W.status) === "SUCCESS" || Ne) ? "result" : M === "plan" && Le ? "plan" : "edit", $s = O.detail ?? (w.source.type === "dashboard" ? (
|
|
6292
6287
|
// Prefer the dashboard's actual title from the store; never expose
|
|
6293
6288
|
// the raw ID to end users.
|
|
6294
6289
|
(g == null ? void 0 : g.title) ?? null
|
|
6295
|
-
) : "All project data available to this token"), dr = (I == null ? void 0 : I.status) ?? w.schedule.status, rn = W !== null && it(W.status) &&
|
|
6290
|
+
) : "All project data available to this token"), dr = (I == null ? void 0 : I.status) ?? w.schedule.status, rn = W !== null && it(W.status) && Bs === W.id || xe !== null, We = se !== null || rn, Us = ye === "edit" && Ne !== null && !rn, an = (W == null ? void 0 : W.status) === "SUCCESS" && W.result ? W : null, _s = an !== null && ee !== null && ee !== qe, vt = Zn === "preview" ? W : null, Be = Zn === "saved" ? Ne : null, Nt = Be ? ps(Be) : null, js = ((Nr = vt == null ? void 0 : vt.result) == null ? void 0 : Nr.title) ?? (Nt == null ? void 0 : Nt.subject) ?? (ie(Be == null ? void 0 : Be.result) && typeof Be.result.title == "string" ? Be.result.title : null) ?? (I == null ? void 0 : I.name) ?? "Briefing preview", Ft = V(
|
|
6296
6291
|
() => ({
|
|
6297
6292
|
dashboard: g,
|
|
6298
6293
|
theme: L || "light",
|
|
6299
6294
|
filters: g == null ? void 0 : g.filters,
|
|
6300
6295
|
selectedSheetId: x,
|
|
6301
6296
|
filterValues: C,
|
|
6302
|
-
inlineFilterValuesMap:
|
|
6297
|
+
inlineFilterValuesMap: E,
|
|
6303
6298
|
controlValues: T,
|
|
6304
6299
|
controlDefinitions: (g == null ? void 0 : g.controls) || [],
|
|
6305
6300
|
dashboardControls: (g == null ? void 0 : g.controls) || [],
|
|
@@ -6315,7 +6310,7 @@ function Hd({
|
|
|
6315
6310
|
P,
|
|
6316
6311
|
C,
|
|
6317
6312
|
z,
|
|
6318
|
-
|
|
6313
|
+
E,
|
|
6319
6314
|
$,
|
|
6320
6315
|
x,
|
|
6321
6316
|
L
|
|
@@ -6334,12 +6329,12 @@ function Hd({
|
|
|
6334
6329
|
if (!r) {
|
|
6335
6330
|
const Ir = Bt.findIndex(
|
|
6336
6331
|
(Ue) => Ue.label === "Business review" && (!Ue.available || Ue.available(y.source))
|
|
6337
|
-
),
|
|
6332
|
+
), no = Bt.findIndex(
|
|
6338
6333
|
(Ue) => !Ue.available || Ue.available(y.source)
|
|
6339
|
-
), cn = Ir !== -1 ? Ir :
|
|
6334
|
+
), cn = Ir !== -1 ? Ir : no;
|
|
6340
6335
|
if (cn !== -1) {
|
|
6341
6336
|
const Ue = Bt[cn];
|
|
6342
|
-
y =
|
|
6337
|
+
y = En(
|
|
6343
6338
|
y,
|
|
6344
6339
|
Ue.draft(y.source, {
|
|
6345
6340
|
attachments: Ue.seedsDashboardAttachment ? Ur({
|
|
@@ -6371,7 +6366,7 @@ function Hd({
|
|
|
6371
6366
|
(m) => m.id === cr
|
|
6372
6367
|
), Pt = (G == null ? void 0 : G.threadMentions) ?? [], ur = Pt.length > 0, mr = JSON.stringify({
|
|
6373
6368
|
recipients: Pt
|
|
6374
|
-
}), Mt = Oe && !sn ? "SLACK" : sn && !Oe ? "EMAIL" :
|
|
6369
|
+
}), Mt = Oe && !sn ? "SLACK" : sn && !Oe ? "EMAIL" : Is, on = Mt === "EMAIL" ? "SLACK" : "EMAIL";
|
|
6375
6370
|
ce(() => {
|
|
6376
6371
|
if (!B || !K || !Oe)
|
|
6377
6372
|
return;
|
|
@@ -6392,9 +6387,9 @@ function Hd({
|
|
|
6392
6387
|
throw y;
|
|
6393
6388
|
})
|
|
6394
6389
|
]).then(([y, F]) => {
|
|
6395
|
-
m || (
|
|
6390
|
+
m || (Ls(y), Xn(F.channels));
|
|
6396
6391
|
}).catch((y) => {
|
|
6397
|
-
m || (nr(
|
|
6392
|
+
m || (nr(Ae(y)), Xn([]));
|
|
6398
6393
|
}).finally(() => {
|
|
6399
6394
|
m || er(!1);
|
|
6400
6395
|
}), () => {
|
|
@@ -6404,7 +6399,7 @@ function Hd({
|
|
|
6404
6399
|
Oe,
|
|
6405
6400
|
B,
|
|
6406
6401
|
K,
|
|
6407
|
-
|
|
6402
|
+
Rs
|
|
6408
6403
|
]), ce(() => {
|
|
6409
6404
|
if (!B || !K || !Oe) {
|
|
6410
6405
|
Rt(null);
|
|
@@ -6440,8 +6435,8 @@ function Hd({
|
|
|
6440
6435
|
mr
|
|
6441
6436
|
]);
|
|
6442
6437
|
const re = (m) => {
|
|
6443
|
-
q((y) =>
|
|
6444
|
-
}, $e = () => !B || !K ? (U("Missing Semaphor API credentials."), null) : { apiServiceUrl: B, token: K },
|
|
6438
|
+
q((y) => En(y, m)), ke([]), U(null), I != null && I.id || (tt(null), j((y) => y + 1), oe("edit"));
|
|
6439
|
+
}, $e = () => !B || !K ? (U("Missing Semaphor API credentials."), null) : { apiServiceUrl: B, token: K }, zs = async (m) => {
|
|
6445
6440
|
const y = jr(w);
|
|
6446
6441
|
if (ke(y.issues), U(null), !y.valid)
|
|
6447
6442
|
return null;
|
|
@@ -6454,19 +6449,19 @@ function Hd({
|
|
|
6454
6449
|
F.apiServiceUrl,
|
|
6455
6450
|
F.token,
|
|
6456
6451
|
I.id,
|
|
6457
|
-
|
|
6452
|
+
Bl(w)
|
|
6458
6453
|
) : await _.createBriefing(
|
|
6459
6454
|
F.apiServiceUrl,
|
|
6460
6455
|
F.token,
|
|
6461
6456
|
_r(w)
|
|
6462
6457
|
);
|
|
6463
|
-
return ve(Q.briefing), q(
|
|
6458
|
+
return ve(Q.briefing), q(At(Q.briefing)), d == null || d(Q.briefing), Q.briefing;
|
|
6464
6459
|
} catch (Q) {
|
|
6465
|
-
return U(
|
|
6460
|
+
return U(Ae(Q)), null;
|
|
6466
6461
|
} finally {
|
|
6467
6462
|
m != null && m.pendingAction && X(null);
|
|
6468
6463
|
}
|
|
6469
|
-
},
|
|
6464
|
+
}, Ks = async () => zs({ pendingAction: "save" }), hr = () => {
|
|
6470
6465
|
const m = jr(w);
|
|
6471
6466
|
return ke(m.issues), U(null), m.valid ? _r(w) : null;
|
|
6472
6467
|
}, pr = async (m) => {
|
|
@@ -6485,11 +6480,11 @@ function Hd({
|
|
|
6485
6480
|
);
|
|
6486
6481
|
return tt(Q.plan), m != null && m.silent || oe("plan"), Q.plan;
|
|
6487
6482
|
} catch (Q) {
|
|
6488
|
-
return U(
|
|
6483
|
+
return U(Ae(Q)), null;
|
|
6489
6484
|
} finally {
|
|
6490
6485
|
X(null);
|
|
6491
6486
|
}
|
|
6492
|
-
},
|
|
6487
|
+
}, Hs = async () => {
|
|
6493
6488
|
const m = $e();
|
|
6494
6489
|
if (!m)
|
|
6495
6490
|
return;
|
|
@@ -6509,9 +6504,9 @@ function Hd({
|
|
|
6509
6504
|
requestId: c()
|
|
6510
6505
|
}
|
|
6511
6506
|
);
|
|
6512
|
-
xt(qe),
|
|
6507
|
+
xt(qe), Os(Q.previewRun);
|
|
6513
6508
|
} catch (F) {
|
|
6514
|
-
U(
|
|
6509
|
+
U(Ae(F));
|
|
6515
6510
|
} finally {
|
|
6516
6511
|
X(null);
|
|
6517
6512
|
}
|
|
@@ -6519,7 +6514,7 @@ function Hd({
|
|
|
6519
6514
|
const m = $e();
|
|
6520
6515
|
if (m) {
|
|
6521
6516
|
if (!(I != null && I.id)) {
|
|
6522
|
-
await
|
|
6517
|
+
await Hs();
|
|
6523
6518
|
return;
|
|
6524
6519
|
}
|
|
6525
6520
|
if (at) {
|
|
@@ -6536,7 +6531,7 @@ function Hd({
|
|
|
6536
6531
|
);
|
|
6537
6532
|
en(y.run), p == null || p(y);
|
|
6538
6533
|
} catch (y) {
|
|
6539
|
-
U(
|
|
6534
|
+
U(Ae(y));
|
|
6540
6535
|
} finally {
|
|
6541
6536
|
X(null);
|
|
6542
6537
|
}
|
|
@@ -6552,8 +6547,8 @@ function Hd({
|
|
|
6552
6547
|
m.token,
|
|
6553
6548
|
I.id
|
|
6554
6549
|
);
|
|
6555
|
-
return ve(y.briefing), q(
|
|
6556
|
-
},
|
|
6550
|
+
return ve(y.briefing), q(At(y.briefing)), d == null || d(y.briefing), y.briefing;
|
|
6551
|
+
}, qs = async () => {
|
|
6557
6552
|
if (!(I != null && I.id) || !(xe != null && xe.id))
|
|
6558
6553
|
return;
|
|
6559
6554
|
const m = $e();
|
|
@@ -6568,17 +6563,17 @@ function Hd({
|
|
|
6568
6563
|
);
|
|
6569
6564
|
tn(), Me(y.run), oe("result"), await fr().catch(() => null);
|
|
6570
6565
|
} catch (y) {
|
|
6571
|
-
U(
|
|
6566
|
+
U(Ae(y));
|
|
6572
6567
|
} finally {
|
|
6573
6568
|
X(null);
|
|
6574
6569
|
}
|
|
6575
6570
|
}
|
|
6576
|
-
},
|
|
6571
|
+
}, Ws = () => {
|
|
6577
6572
|
!I || !xe || b == null || b({
|
|
6578
6573
|
briefing: { ...I, latestRun: xe },
|
|
6579
6574
|
run: xe
|
|
6580
6575
|
});
|
|
6581
|
-
},
|
|
6576
|
+
}, Gs = async () => {
|
|
6582
6577
|
if (!w.instruction.trim())
|
|
6583
6578
|
return;
|
|
6584
6579
|
const y = $e();
|
|
@@ -6592,12 +6587,12 @@ function Hd({
|
|
|
6592
6587
|
), Q = w.instruction;
|
|
6593
6588
|
re({ instruction: F }), Xt({ previousText: Q });
|
|
6594
6589
|
} catch (F) {
|
|
6595
|
-
sr(
|
|
6590
|
+
sr(Ae(F));
|
|
6596
6591
|
} finally {
|
|
6597
6592
|
rr(!1);
|
|
6598
6593
|
}
|
|
6599
6594
|
}
|
|
6600
|
-
},
|
|
6595
|
+
}, Js = () => {
|
|
6601
6596
|
yt && (re({ instruction: yt.previousText }), Xt(null));
|
|
6602
6597
|
}, gr = async (m) => {
|
|
6603
6598
|
if (!(I != null && I.id))
|
|
@@ -6615,12 +6610,12 @@ function Hd({
|
|
|
6615
6610
|
const F = await fr().catch(() => null), Q = (F == null ? void 0 : F.latestRun) ?? null;
|
|
6616
6611
|
Me(Q), Q || oe("edit");
|
|
6617
6612
|
} catch (F) {
|
|
6618
|
-
U(
|
|
6613
|
+
U(Ae(F));
|
|
6619
6614
|
} finally {
|
|
6620
6615
|
X(null);
|
|
6621
6616
|
}
|
|
6622
6617
|
}
|
|
6623
|
-
},
|
|
6618
|
+
}, Qs = async (m) => {
|
|
6624
6619
|
if (!(I != null && I.id))
|
|
6625
6620
|
return;
|
|
6626
6621
|
const y = $e();
|
|
@@ -6636,16 +6631,16 @@ function Hd({
|
|
|
6636
6631
|
y.token,
|
|
6637
6632
|
I.id
|
|
6638
6633
|
);
|
|
6639
|
-
ve(F.briefing), q(
|
|
6634
|
+
ve(F.briefing), q(At(F.briefing)), d == null || d(F.briefing);
|
|
6640
6635
|
} catch (F) {
|
|
6641
|
-
U(
|
|
6636
|
+
U(Ae(F));
|
|
6642
6637
|
} finally {
|
|
6643
6638
|
X(null);
|
|
6644
6639
|
}
|
|
6645
6640
|
}
|
|
6646
|
-
},
|
|
6641
|
+
}, Ys = w.instruction.split(`
|
|
6647
6642
|
`).map((m) => m.trim()).find((m) => m.length > 0), br = V(
|
|
6648
|
-
() => I ?
|
|
6643
|
+
() => I ? At(I) : null,
|
|
6649
6644
|
[I]
|
|
6650
6645
|
), at = !!br && JSON.stringify(w) !== JSON.stringify(br), st = w.body.type === "custom_message", dn = st ? "Note" : "Analysis", Ct = st ? "Email body" : "What should this briefing investigate?", xr = st ? "Write the email body that recipients will see." : "Describe the outcome in business terms. Mention what to watch, when to bother the team, and what to include in the briefing.", yr = st ? "Plain note — sent as-is in the email body. No analysis is generated for this preset." : "Write this like instructions to an analyst — what to watch, when to bother the team, and what to include in the briefing.", vr = (m) => {
|
|
6651
6646
|
var y, F;
|
|
@@ -6676,11 +6671,11 @@ function Hd({
|
|
|
6676
6671
|
}
|
|
6677
6672
|
}
|
|
6678
6673
|
});
|
|
6679
|
-
},
|
|
6674
|
+
}, Zs = () => {
|
|
6680
6675
|
if (wt) {
|
|
6681
6676
|
re({
|
|
6682
6677
|
delivery: {
|
|
6683
|
-
channels:
|
|
6678
|
+
channels: Vd(
|
|
6684
6679
|
w.delivery.channels,
|
|
6685
6680
|
on
|
|
6686
6681
|
)
|
|
@@ -6689,7 +6684,7 @@ function Hd({
|
|
|
6689
6684
|
return;
|
|
6690
6685
|
}
|
|
6691
6686
|
vr(on);
|
|
6692
|
-
},
|
|
6687
|
+
}, Xs = (m) => {
|
|
6693
6688
|
var F;
|
|
6694
6689
|
const y = Qt.find((Q) => Q.id === m);
|
|
6695
6690
|
qt("SLACK"), re({
|
|
@@ -6716,7 +6711,7 @@ function Hd({
|
|
|
6716
6711
|
}
|
|
6717
6712
|
}
|
|
6718
6713
|
});
|
|
6719
|
-
},
|
|
6714
|
+
}, eo = (m) => {
|
|
6720
6715
|
var y, F;
|
|
6721
6716
|
qt("SLACK"), re({
|
|
6722
6717
|
delivery: {
|
|
@@ -6738,7 +6733,7 @@ function Hd({
|
|
|
6738
6733
|
}
|
|
6739
6734
|
}
|
|
6740
6735
|
});
|
|
6741
|
-
},
|
|
6736
|
+
}, to = V(() => {
|
|
6742
6737
|
const m = w.schedule.enabled ? w.schedule.scheduleExpr || "Scheduled" : "On demand", y = w.delivery.recipients.length, F = y === 0 ? "No email recipients" : `${y} email recipient${y === 1 ? "" : "s"}`, Q = Ve ? `#${Ve.name}` : "Slack channel";
|
|
6743
6738
|
return wt ? `${m} · ${F} · ${Q}` : Oe ? `${m} · ${Ve ? `#${Ve.name}` : "Slack channel"}` : `${m} · ${F}`;
|
|
6744
6739
|
}, [
|
|
@@ -6780,7 +6775,7 @@ function Hd({
|
|
|
6780
6775
|
{
|
|
6781
6776
|
className: v(
|
|
6782
6777
|
"inline-flex items-center rounded-control px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-[0.06em]",
|
|
6783
|
-
|
|
6778
|
+
Hd(dr)
|
|
6784
6779
|
),
|
|
6785
6780
|
children: dr
|
|
6786
6781
|
}
|
|
@@ -6805,8 +6800,8 @@ function Hd({
|
|
|
6805
6800
|
className: "flex w-full items-center justify-between gap-2 border-b border-border px-4 py-2.5 text-left transition-colors hover:bg-muted/60",
|
|
6806
6801
|
children: [
|
|
6807
6802
|
/* @__PURE__ */ s("div", { className: "min-w-0 flex-1", children: [
|
|
6808
|
-
/* @__PURE__ */ t("div", { className: "truncate text-[12px] text-foreground/80", children:
|
|
6809
|
-
/* @__PURE__ */ t("div", { className: "mt-0.5 truncate text-[10px] text-muted-foreground", children:
|
|
6803
|
+
/* @__PURE__ */ t("div", { className: "truncate text-[12px] text-foreground/80", children: Ys || w.name || "Untitled briefing" }),
|
|
6804
|
+
/* @__PURE__ */ t("div", { className: "mt-0.5 truncate text-[10px] text-muted-foreground", children: to })
|
|
6810
6805
|
] }),
|
|
6811
6806
|
/* @__PURE__ */ s("span", { className: "inline-flex items-center gap-1 text-[11px] text-muted-foreground hover:text-foreground", children: [
|
|
6812
6807
|
"Edit brief",
|
|
@@ -6815,7 +6810,7 @@ function Hd({
|
|
|
6815
6810
|
]
|
|
6816
6811
|
}
|
|
6817
6812
|
) : null,
|
|
6818
|
-
xe ? /* @__PURE__ */ t(
|
|
6813
|
+
xe ? /* @__PURE__ */ t(Cd, {}) : null,
|
|
6819
6814
|
/* @__PURE__ */ t(
|
|
6820
6815
|
Ed,
|
|
6821
6816
|
{
|
|
@@ -6823,9 +6818,9 @@ function Hd({
|
|
|
6823
6818
|
previewRun: W,
|
|
6824
6819
|
savedActiveRun: xe,
|
|
6825
6820
|
detailsVisible: lt,
|
|
6826
|
-
onShowDetails: () =>
|
|
6827
|
-
onCancelSavedRun: xe ?
|
|
6828
|
-
onMinimizeRun: xe && b ?
|
|
6821
|
+
onShowDetails: () => Es((m) => !m),
|
|
6822
|
+
onCancelSavedRun: xe ? qs : void 0,
|
|
6823
|
+
onMinimizeRun: xe && b ? Ws : void 0
|
|
6829
6824
|
}
|
|
6830
6825
|
),
|
|
6831
6826
|
lt && W && it(W.status) ? /* @__PURE__ */ t(la, { run: W }) : lt && xe ? /* @__PURE__ */ t(la, { run: xe }) : null,
|
|
@@ -6859,15 +6854,15 @@ function Hd({
|
|
|
6859
6854
|
)) })
|
|
6860
6855
|
] }),
|
|
6861
6856
|
an ? /* @__PURE__ */ t(
|
|
6862
|
-
|
|
6857
|
+
Od,
|
|
6863
6858
|
{
|
|
6864
6859
|
previewRun: an,
|
|
6865
|
-
isStale:
|
|
6860
|
+
isStale: _s,
|
|
6866
6861
|
onViewOutput: () => oe("result")
|
|
6867
6862
|
}
|
|
6868
6863
|
) : null,
|
|
6869
|
-
|
|
6870
|
-
|
|
6864
|
+
Us && Ne ? /* @__PURE__ */ t(
|
|
6865
|
+
Nd,
|
|
6871
6866
|
{
|
|
6872
6867
|
run: Ne,
|
|
6873
6868
|
onViewOutput: () => oe("result"),
|
|
@@ -6937,7 +6932,7 @@ function Hd({
|
|
|
6937
6932
|
className: "inline-flex h-7 items-center gap-1.5 rounded-control px-2 text-[12px] text-muted-foreground hover:bg-muted hover:text-foreground disabled:opacity-50",
|
|
6938
6933
|
"aria-label": "Attach files",
|
|
6939
6934
|
children: [
|
|
6940
|
-
/* @__PURE__ */ t(
|
|
6935
|
+
/* @__PURE__ */ t(Ia, { className: "h-3 w-3" }),
|
|
6941
6936
|
"Attach"
|
|
6942
6937
|
]
|
|
6943
6938
|
}
|
|
@@ -6945,7 +6940,7 @@ function Hd({
|
|
|
6945
6940
|
/* @__PURE__ */ t("span", { className: "text-border", children: "·" })
|
|
6946
6941
|
] }) : null,
|
|
6947
6942
|
/* @__PURE__ */ t(
|
|
6948
|
-
|
|
6943
|
+
Xl,
|
|
6949
6944
|
{
|
|
6950
6945
|
includeEvidence: w.output.includeEvidence,
|
|
6951
6946
|
includeSql: w.output.includeSql,
|
|
@@ -6953,7 +6948,7 @@ function Hd({
|
|
|
6953
6948
|
onChange: (m, y) => {
|
|
6954
6949
|
re(m === "evidence" ? { output: { includeEvidence: y } } : m === "sql" ? { output: { includeSql: y } } : {
|
|
6955
6950
|
output: {
|
|
6956
|
-
artifactFormats:
|
|
6951
|
+
artifactFormats: ed(
|
|
6957
6952
|
w.output.artifactFormats,
|
|
6958
6953
|
"html",
|
|
6959
6954
|
y
|
|
@@ -6968,7 +6963,7 @@ function Hd({
|
|
|
6968
6963
|
/* @__PURE__ */ t(
|
|
6969
6964
|
ut,
|
|
6970
6965
|
{
|
|
6971
|
-
open:
|
|
6966
|
+
open: Ps,
|
|
6972
6967
|
onOpenChange: Yt,
|
|
6973
6968
|
children: /* @__PURE__ */ s(mt, { className: "flex h-[80vh] max-h-[800px] w-[92vw] max-w-[860px] flex-col gap-0 p-0", children: [
|
|
6974
6969
|
/* @__PURE__ */ s(ht, { className: "border-b border-border/60 px-5 py-3", children: [
|
|
@@ -7004,10 +6999,10 @@ function Hd({
|
|
|
7004
6999
|
"button",
|
|
7005
7000
|
{
|
|
7006
7001
|
type: "button",
|
|
7007
|
-
onClick:
|
|
7002
|
+
onClick: Js,
|
|
7008
7003
|
className: "inline-flex h-7 items-center gap-1.5 rounded-control px-2 text-foreground/80 hover:bg-muted hover:text-foreground",
|
|
7009
7004
|
children: [
|
|
7010
|
-
/* @__PURE__ */ t(
|
|
7005
|
+
/* @__PURE__ */ t(Pi, { className: "h-3 w-3" }),
|
|
7011
7006
|
"Revert polish"
|
|
7012
7007
|
]
|
|
7013
7008
|
}
|
|
@@ -7016,12 +7011,12 @@ function Hd({
|
|
|
7016
7011
|
"button",
|
|
7017
7012
|
{
|
|
7018
7013
|
type: "button",
|
|
7019
|
-
onClick:
|
|
7014
|
+
onClick: Gs,
|
|
7020
7015
|
disabled: Zt || !w.instruction.trim() || !B || !K,
|
|
7021
7016
|
title: "Fix typos, grammar, and minor wording without changing your meaning",
|
|
7022
7017
|
className: _e,
|
|
7023
7018
|
children: [
|
|
7024
|
-
Zt ? /* @__PURE__ */ t(ne, { className: "h-3 w-3 animate-spin" }) : /* @__PURE__ */ t(
|
|
7019
|
+
Zt ? /* @__PURE__ */ t(ne, { className: "h-3 w-3 animate-spin" }) : /* @__PURE__ */ t(ci, { className: "h-3 w-3" }),
|
|
7025
7020
|
Zt ? "Polishing…" : "Polish"
|
|
7026
7021
|
]
|
|
7027
7022
|
}
|
|
@@ -7041,7 +7036,7 @@ function Hd({
|
|
|
7041
7036
|
),
|
|
7042
7037
|
w.source.type === "dashboard" ? /* @__PURE__ */ s("div", { children: [
|
|
7043
7038
|
w.attachments.length > 0 ? /* @__PURE__ */ t(
|
|
7044
|
-
|
|
7039
|
+
Ul,
|
|
7045
7040
|
{
|
|
7046
7041
|
attachments: w.attachments,
|
|
7047
7042
|
disabled: We,
|
|
@@ -7052,9 +7047,9 @@ function Hd({
|
|
|
7052
7047
|
}
|
|
7053
7048
|
) : null,
|
|
7054
7049
|
/* @__PURE__ */ t(
|
|
7055
|
-
|
|
7050
|
+
Kl,
|
|
7056
7051
|
{
|
|
7057
|
-
open:
|
|
7052
|
+
open: Ts,
|
|
7058
7053
|
onOpenChange: Jt,
|
|
7059
7054
|
source: w.source,
|
|
7060
7055
|
dashboard: g,
|
|
@@ -7090,9 +7085,9 @@ function Hd({
|
|
|
7090
7085
|
)
|
|
7091
7086
|
] }),
|
|
7092
7087
|
w.schedule.enabled ? /* @__PURE__ */ t("div", { className: "mt-3 pl-6", children: /* @__PURE__ */ t(
|
|
7093
|
-
|
|
7088
|
+
td,
|
|
7094
7089
|
{
|
|
7095
|
-
scheduleExpr: w.schedule.scheduleExpr || Nn(
|
|
7090
|
+
scheduleExpr: w.schedule.scheduleExpr || Nn(mi),
|
|
7096
7091
|
timezone: w.schedule.timezone || "UTC",
|
|
7097
7092
|
onScheduleChange: (m) => re({
|
|
7098
7093
|
schedule: {
|
|
@@ -7120,7 +7115,7 @@ function Hd({
|
|
|
7120
7115
|
Mt === m && y && "ring-1 ring-foreground/20"
|
|
7121
7116
|
),
|
|
7122
7117
|
children: [
|
|
7123
|
-
m === "EMAIL" ? /* @__PURE__ */ t(
|
|
7118
|
+
m === "EMAIL" ? /* @__PURE__ */ t(_a, { className: "h-3 w-3" }) : /* @__PURE__ */ t(kn, { className: "h-3 w-3" }),
|
|
7124
7119
|
m === "EMAIL" ? "Email" : "Slack"
|
|
7125
7120
|
]
|
|
7126
7121
|
},
|
|
@@ -7131,9 +7126,9 @@ function Hd({
|
|
|
7131
7126
|
"button",
|
|
7132
7127
|
{
|
|
7133
7128
|
type: "button",
|
|
7134
|
-
onClick:
|
|
7129
|
+
onClick: Zs,
|
|
7135
7130
|
className: v(
|
|
7136
|
-
|
|
7131
|
+
Et,
|
|
7137
7132
|
"h-6 px-1.5 text-[11px]"
|
|
7138
7133
|
),
|
|
7139
7134
|
children: [
|
|
@@ -7163,11 +7158,11 @@ function Hd({
|
|
|
7163
7158
|
] })
|
|
7164
7159
|
) : le != null && le.installed ? /* @__PURE__ */ s("div", { className: "space-y-2", children: [
|
|
7165
7160
|
/* @__PURE__ */ t(
|
|
7166
|
-
|
|
7161
|
+
od,
|
|
7167
7162
|
{
|
|
7168
7163
|
channels: Qt,
|
|
7169
7164
|
selectedChannelId: cr,
|
|
7170
|
-
onChange:
|
|
7165
|
+
onChange: Xs,
|
|
7171
7166
|
destinationKind: "channel",
|
|
7172
7167
|
onDestinationKindChange: () => {
|
|
7173
7168
|
},
|
|
@@ -7178,7 +7173,7 @@ function Hd({
|
|
|
7178
7173
|
Hr,
|
|
7179
7174
|
{
|
|
7180
7175
|
value: Pt,
|
|
7181
|
-
onChange:
|
|
7176
|
+
onChange: eo,
|
|
7182
7177
|
prefix: "Thread @",
|
|
7183
7178
|
placeholder: Pt.length > 0 ? "Add more…" : "Mention people in the thread reply"
|
|
7184
7179
|
}
|
|
@@ -7208,7 +7203,7 @@ function Hd({
|
|
|
7208
7203
|
"aria-hidden": !0
|
|
7209
7204
|
}
|
|
7210
7205
|
),
|
|
7211
|
-
/* @__PURE__ */ t("span", { children: ((
|
|
7206
|
+
/* @__PURE__ */ t("span", { children: ((Er = le == null ? void 0 : le.workspace) == null ? void 0 : Er.teamName) ?? "Slack" }),
|
|
7212
7207
|
Ve ? /* @__PURE__ */ s(ae, { children: [
|
|
7213
7208
|
/* @__PURE__ */ t("span", { className: "text-border", children: "·" }),
|
|
7214
7209
|
/* @__PURE__ */ t("span", { children: Ve.isMember ? `Bot in #${Ve.name}` : `Can post to #${Ve.name}` })
|
|
@@ -7224,7 +7219,7 @@ function Hd({
|
|
|
7224
7219
|
/* @__PURE__ */ t("div", { className: "text-[12.5px] font-medium text-foreground", children: "Slack is not connected" }),
|
|
7225
7220
|
/* @__PURE__ */ t("p", { className: "mx-auto max-w-[320px] text-[11.5px] leading-[1.5] text-muted-foreground", children: (Sr = le == null ? void 0 : le.capabilities) != null && Sr.canConfigure ? "Connect the Slack workspace to choose channels the bot can post in." : "Ask an admin to connect Slack before this briefing can post to a channel." }),
|
|
7226
7221
|
/* @__PURE__ */ s("div", { className: "mt-1 flex items-center justify-center gap-2", children: [
|
|
7227
|
-
(
|
|
7222
|
+
(Ar = le == null ? void 0 : le.capabilities) != null && Ar.canConfigure ? (
|
|
7228
7223
|
/* Route to the admin integrations page rather than
|
|
7229
7224
|
starting OAuth inline. Setup includes channel
|
|
7230
7225
|
allowlist + identity-link management; that surface
|
|
@@ -7234,7 +7229,7 @@ function Hd({
|
|
|
7234
7229
|
/* @__PURE__ */ t(
|
|
7235
7230
|
"a",
|
|
7236
7231
|
{
|
|
7237
|
-
href:
|
|
7232
|
+
href: Kd(
|
|
7238
7233
|
B,
|
|
7239
7234
|
"/admin/integrations/slack"
|
|
7240
7235
|
),
|
|
@@ -7249,7 +7244,7 @@ function Hd({
|
|
|
7249
7244
|
"button",
|
|
7250
7245
|
{
|
|
7251
7246
|
type: "button",
|
|
7252
|
-
onClick: () =>
|
|
7247
|
+
onClick: () => Fs((m) => m + 1),
|
|
7253
7248
|
disabled: Lt,
|
|
7254
7249
|
className: _e,
|
|
7255
7250
|
children: [
|
|
@@ -7265,11 +7260,11 @@ function Hd({
|
|
|
7265
7260
|
st ? null : /* @__PURE__ */ s("div", { children: [
|
|
7266
7261
|
/* @__PURE__ */ t("div", { className: v(Z, "mb-2"), children: "Scope" }),
|
|
7267
7262
|
/* @__PURE__ */ t(
|
|
7268
|
-
|
|
7263
|
+
sd,
|
|
7269
7264
|
{
|
|
7270
7265
|
source: w.source,
|
|
7271
7266
|
resolvedSourceContext: O,
|
|
7272
|
-
sourceDetail:
|
|
7267
|
+
sourceDetail: $s,
|
|
7273
7268
|
onChange: (m) => re({ source: m })
|
|
7274
7269
|
}
|
|
7275
7270
|
)
|
|
@@ -7284,7 +7279,7 @@ function Hd({
|
|
|
7284
7279
|
] })
|
|
7285
7280
|
] })
|
|
7286
7281
|
] }) : ye === "plan" && Le ? /* @__PURE__ */ t(
|
|
7287
|
-
|
|
7282
|
+
bd,
|
|
7288
7283
|
{
|
|
7289
7284
|
previewPlan: Le,
|
|
7290
7285
|
previewRun: W && W.status !== "SUCCESS" ? W : null,
|
|
@@ -7349,15 +7344,15 @@ function Hd({
|
|
|
7349
7344
|
) : null
|
|
7350
7345
|
] }) : null,
|
|
7351
7346
|
/* @__PURE__ */ t("footer", { className: "sticky bottom-0 border-t border-border bg-background px-4 py-3", children: /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center justify-between gap-2", children: [
|
|
7352
|
-
/* @__PURE__ */ t("div", { className: "flex items-center gap-1.5", children: de &&
|
|
7347
|
+
/* @__PURE__ */ t("div", { className: "flex items-center gap-1.5", children: de && Vs ? /* @__PURE__ */ s(
|
|
7353
7348
|
"button",
|
|
7354
7349
|
{
|
|
7355
7350
|
type: "button",
|
|
7356
7351
|
className: _e,
|
|
7357
7352
|
disabled: We,
|
|
7358
|
-
onClick: () =>
|
|
7353
|
+
onClick: () => Qs(nn ? "ACTIVE" : "PAUSED"),
|
|
7359
7354
|
children: [
|
|
7360
|
-
se === "pause" || se === "resume" ? /* @__PURE__ */ t(ne, { className: "h-3 w-3 animate-spin" }) : nn ? /* @__PURE__ */ t(
|
|
7355
|
+
se === "pause" || se === "resume" ? /* @__PURE__ */ t(ne, { className: "h-3 w-3 animate-spin" }) : nn ? /* @__PURE__ */ t(Oa, { className: "h-3 w-3" }) : /* @__PURE__ */ t(ja, { className: "h-3 w-3" }),
|
|
7361
7356
|
nn ? "Resume" : "Pause"
|
|
7362
7357
|
]
|
|
7363
7358
|
}
|
|
@@ -7365,14 +7360,14 @@ function Hd({
|
|
|
7365
7360
|
"button",
|
|
7366
7361
|
{
|
|
7367
7362
|
type: "button",
|
|
7368
|
-
className:
|
|
7363
|
+
className: Et,
|
|
7369
7364
|
onClick: () => oe("edit"),
|
|
7370
7365
|
children: [
|
|
7371
7366
|
/* @__PURE__ */ t(Cn, { className: "h-3 w-3 rotate-180" }),
|
|
7372
7367
|
ye === "result" ? "Edit brief" : "Tweak brief"
|
|
7373
7368
|
]
|
|
7374
7369
|
}
|
|
7375
|
-
) : !de && f && !h ? /* @__PURE__ */ t("button", { type: "button", className:
|
|
7370
|
+
) : !de && f && !h ? /* @__PURE__ */ t("button", { type: "button", className: Et, onClick: f, children: "Discard" }) : null }),
|
|
7376
7371
|
/* @__PURE__ */ s("div", { className: "flex items-center gap-1.5", children: [
|
|
7377
7372
|
!de && ye === "edit" && !st ? /* @__PURE__ */ s(
|
|
7378
7373
|
"button",
|
|
@@ -7384,7 +7379,7 @@ function Hd({
|
|
|
7384
7379
|
pr();
|
|
7385
7380
|
},
|
|
7386
7381
|
children: [
|
|
7387
|
-
se === "plan" ? /* @__PURE__ */ t(ne, { className: "h-3 w-3 animate-spin" }) : /* @__PURE__ */ t(
|
|
7382
|
+
se === "plan" ? /* @__PURE__ */ t(ne, { className: "h-3 w-3 animate-spin" }) : /* @__PURE__ */ t(Ri, { className: "h-3 w-3" }),
|
|
7388
7383
|
"Preview plan"
|
|
7389
7384
|
]
|
|
7390
7385
|
}
|
|
@@ -7398,7 +7393,7 @@ function Hd({
|
|
|
7398
7393
|
onClick: ln,
|
|
7399
7394
|
title: de && at ? "Save your changes before running — Run now uses the saved briefing." : void 0,
|
|
7400
7395
|
children: [
|
|
7401
|
-
se === "run" || se === "preview" || rn ? /* @__PURE__ */ t(ne, { className: "h-3 w-3 animate-spin" }) : ye === "result" ? /* @__PURE__ */ t(Vt, { className: "h-3 w-3" }) : ye === "plan" ? /* @__PURE__ */ t(Sn, { className: "h-3 w-3" }) : de ? /* @__PURE__ */ t(
|
|
7396
|
+
se === "run" || se === "preview" || rn ? /* @__PURE__ */ t(ne, { className: "h-3 w-3 animate-spin" }) : ye === "result" ? /* @__PURE__ */ t(Vt, { className: "h-3 w-3" }) : ye === "plan" ? /* @__PURE__ */ t(Sn, { className: "h-3 w-3" }) : de ? /* @__PURE__ */ t(ui, { className: "h-3 w-3" }) : /* @__PURE__ */ t(Sn, { className: "h-3 w-3" }),
|
|
7402
7397
|
de ? "Run now" : ye === "plan" ? "Run plan" : ye === "result" ? "Run again" : "Show preview"
|
|
7403
7398
|
]
|
|
7404
7399
|
}
|
|
@@ -7409,7 +7404,7 @@ function Hd({
|
|
|
7409
7404
|
type: "button",
|
|
7410
7405
|
className: de ? _e : Xr,
|
|
7411
7406
|
disabled: We,
|
|
7412
|
-
onClick:
|
|
7407
|
+
onClick: Ks,
|
|
7413
7408
|
children: [
|
|
7414
7409
|
se === "save" ? /* @__PURE__ */ t(ne, { className: "h-3 w-3 animate-spin" }) : /* @__PURE__ */ t(He, { className: "h-3 w-3" }),
|
|
7415
7410
|
de ? "Save changes" : "Create briefing"
|
|
@@ -7421,13 +7416,13 @@ function Hd({
|
|
|
7421
7416
|
/* @__PURE__ */ t(
|
|
7422
7417
|
ut,
|
|
7423
7418
|
{
|
|
7424
|
-
open:
|
|
7419
|
+
open: Ds,
|
|
7425
7420
|
onOpenChange: (m) => {
|
|
7426
7421
|
Wt(m), m || Gt(null);
|
|
7427
7422
|
},
|
|
7428
7423
|
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: [
|
|
7429
7424
|
/* @__PURE__ */ s(ht, { className: "border-b border-border px-6 py-3 text-left", children: [
|
|
7430
|
-
/* @__PURE__ */ t(pt, { className: "truncate text-[14px] font-semibold leading-5", children:
|
|
7425
|
+
/* @__PURE__ */ t(pt, { className: "truncate text-[14px] font-semibold leading-5", children: js }),
|
|
7431
7426
|
/* @__PURE__ */ t(ft, { className: "text-[12px] text-muted-foreground", children: "Full briefing render" })
|
|
7432
7427
|
] }),
|
|
7433
7428
|
/* @__PURE__ */ t("div", { className: "flex-1 overflow-y-auto px-6 py-5", children: vt ? /* @__PURE__ */ t(da, { previewRun: vt, fullWidth: !0 }) : Nt ? /* @__PURE__ */ t(Qn, { preview: Nt }) : Be ? /* @__PURE__ */ t(ca, { run: Be }) : null })
|
|
@@ -7438,7 +7433,7 @@ function Hd({
|
|
|
7438
7433
|
}
|
|
7439
7434
|
);
|
|
7440
7435
|
}
|
|
7441
|
-
function
|
|
7436
|
+
function Wd({
|
|
7442
7437
|
disabled: e,
|
|
7443
7438
|
briefingCount: n,
|
|
7444
7439
|
className: r,
|
|
@@ -7456,39 +7451,39 @@ function qd({
|
|
|
7456
7451
|
onClick: a,
|
|
7457
7452
|
"aria-label": "Briefings",
|
|
7458
7453
|
children: [
|
|
7459
|
-
/* @__PURE__ */ t(
|
|
7454
|
+
/* @__PURE__ */ t(Fi, { className: "h-3.5 w-3.5" }),
|
|
7460
7455
|
"Briefings",
|
|
7461
7456
|
o ? /* @__PURE__ */ t("span", { className: "ml-0.5 rounded-control bg-muted px-1 text-[10px] tabular-nums text-foreground/70", children: n }) : null
|
|
7462
7457
|
]
|
|
7463
7458
|
}
|
|
7464
7459
|
);
|
|
7465
7460
|
}
|
|
7466
|
-
const
|
|
7467
|
-
listBriefings:
|
|
7468
|
-
getBriefing:
|
|
7469
|
-
pauseBriefing:
|
|
7470
|
-
resumeBriefing:
|
|
7471
|
-
deleteBriefing:
|
|
7472
|
-
runBriefingNow:
|
|
7473
|
-
},
|
|
7474
|
-
function
|
|
7461
|
+
const Gd = {
|
|
7462
|
+
listBriefings: il,
|
|
7463
|
+
getBriefing: Wa,
|
|
7464
|
+
pauseBriefing: Ga,
|
|
7465
|
+
resumeBriefing: Ja,
|
|
7466
|
+
deleteBriefing: Qa,
|
|
7467
|
+
runBriefingNow: Ya
|
|
7468
|
+
}, Jd = "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", Qd = "inline-flex h-7 items-center gap-1.5 rounded-control px-2 text-[12px] text-muted-foreground hover:bg-muted hover:text-foreground disabled:opacity-50", Ss = "inline-flex h-7 items-center gap-1.5 rounded-control bg-primary px-3 text-[12px] font-medium text-primary-foreground hover:bg-primary/90 disabled:opacity-50";
|
|
7469
|
+
function Yd(e) {
|
|
7475
7470
|
return (e == null ? void 0 : e.trim()) || "This dashboard";
|
|
7476
7471
|
}
|
|
7477
|
-
function
|
|
7472
|
+
function Zd(e) {
|
|
7478
7473
|
return e === "This dashboard" ? "Watch this dashboard" : `Watch ${e}`;
|
|
7479
7474
|
}
|
|
7480
|
-
function
|
|
7475
|
+
function Xd(e, n) {
|
|
7481
7476
|
return e.source.type === "dashboard" && e.source.dashboardId === n;
|
|
7482
7477
|
}
|
|
7483
|
-
function
|
|
7478
|
+
function ec(e) {
|
|
7484
7479
|
return e === "dashboard" ? "This dashboard" : "Project";
|
|
7485
7480
|
}
|
|
7486
|
-
function
|
|
7481
|
+
function tc(e, n, r) {
|
|
7487
7482
|
return n === "dashboard" ? e.filter(
|
|
7488
|
-
(a) =>
|
|
7483
|
+
(a) => Xd(a, r)
|
|
7489
7484
|
) : e;
|
|
7490
7485
|
}
|
|
7491
|
-
async function
|
|
7486
|
+
async function nc({
|
|
7492
7487
|
apiClient: e,
|
|
7493
7488
|
apiServiceUrl: n,
|
|
7494
7489
|
token: r
|
|
@@ -7507,7 +7502,7 @@ async function tc({
|
|
|
7507
7502
|
}
|
|
7508
7503
|
return o;
|
|
7509
7504
|
}
|
|
7510
|
-
function
|
|
7505
|
+
function rc(e) {
|
|
7511
7506
|
if (!e) return "Never";
|
|
7512
7507
|
const n = new Date(e);
|
|
7513
7508
|
if (Number.isNaN(n.getTime())) return "Unknown";
|
|
@@ -7521,10 +7516,10 @@ function nc(e) {
|
|
|
7521
7516
|
const l = Math.round(i / 7);
|
|
7522
7517
|
return l < 5 ? `${l}w ago` : `${Math.round(i / 30)}mo ago`;
|
|
7523
7518
|
}
|
|
7524
|
-
function
|
|
7519
|
+
function ac(e) {
|
|
7525
7520
|
return e.scheduleExpr ? e.scheduleExpr : "On demand";
|
|
7526
7521
|
}
|
|
7527
|
-
function
|
|
7522
|
+
function sc(e) {
|
|
7528
7523
|
if (e.lastRunStatus) {
|
|
7529
7524
|
const n = e.lastRunStatus.toString().toUpperCase();
|
|
7530
7525
|
return n === "SUCCESS" ? "Last run completed." : n === "FAILED" ? "Last run failed." : `Last run ${e.lastRunStatus.toString().toLowerCase()}`;
|
|
@@ -7534,10 +7529,10 @@ function ac(e) {
|
|
|
7534
7529
|
function As(e) {
|
|
7535
7530
|
return e.hasActiveRun ? "Running" : e.lastRunStatus ? `Last run ${e.lastRunStatus.toString().toLowerCase()}` : "Idle";
|
|
7536
7531
|
}
|
|
7537
|
-
function
|
|
7532
|
+
function oc(e) {
|
|
7538
7533
|
return e.source.type === "dashboard" ? "This dashboard" : "Project";
|
|
7539
7534
|
}
|
|
7540
|
-
function
|
|
7535
|
+
function ic({
|
|
7541
7536
|
activeView: e,
|
|
7542
7537
|
onChange: n
|
|
7543
7538
|
}) {
|
|
@@ -7560,7 +7555,7 @@ function oc({
|
|
|
7560
7555
|
"h-6 rounded-[3px] px-2 text-[11px] transition-colors",
|
|
7561
7556
|
a ? "bg-background font-medium text-foreground shadow-sm" : "text-muted-foreground hover:text-foreground"
|
|
7562
7557
|
),
|
|
7563
|
-
children:
|
|
7558
|
+
children: ec(r)
|
|
7564
7559
|
},
|
|
7565
7560
|
r
|
|
7566
7561
|
);
|
|
@@ -7568,7 +7563,7 @@ function oc({
|
|
|
7568
7563
|
}
|
|
7569
7564
|
);
|
|
7570
7565
|
}
|
|
7571
|
-
function
|
|
7566
|
+
function lc({
|
|
7572
7567
|
briefings: e,
|
|
7573
7568
|
dashboardLabel: n,
|
|
7574
7569
|
sourceView: r,
|
|
@@ -7594,7 +7589,7 @@ function ic({
|
|
|
7594
7589
|
children: [
|
|
7595
7590
|
/* @__PURE__ */ s("header", { className: "flex items-start justify-between gap-3 border-b border-border px-4 py-3", children: [
|
|
7596
7591
|
/* @__PURE__ */ s("div", { className: "min-w-0", children: [
|
|
7597
|
-
/* @__PURE__ */ t("div", { className:
|
|
7592
|
+
/* @__PURE__ */ t("div", { className: Jd, children: "Briefings" }),
|
|
7598
7593
|
/* @__PURE__ */ t("h2", { className: "mt-0.5 truncate text-[14px] font-semibold leading-5", children: r === "dashboard" ? n : "Project briefings" })
|
|
7599
7594
|
] }),
|
|
7600
7595
|
/* @__PURE__ */ t(
|
|
@@ -7611,7 +7606,7 @@ function ic({
|
|
|
7611
7606
|
/* @__PURE__ */ s("div", { className: "flex items-center justify-between gap-3 border-b border-border px-4 py-2", children: [
|
|
7612
7607
|
/* @__PURE__ */ s("div", { className: "flex min-w-0 items-center gap-3", children: [
|
|
7613
7608
|
/* @__PURE__ */ t(
|
|
7614
|
-
|
|
7609
|
+
ic,
|
|
7615
7610
|
{
|
|
7616
7611
|
activeView: r,
|
|
7617
7612
|
onChange: i
|
|
@@ -7637,7 +7632,7 @@ function ic({
|
|
|
7637
7632
|
// case without crowding the toolbar.
|
|
7638
7633
|
/* @__PURE__ */ t(ne, { className: "h-3.5 w-3.5 animate-spin text-muted-foreground" })
|
|
7639
7634
|
) : null,
|
|
7640
|
-
k > 0 ? /* @__PURE__ */ s("button", { onClick: d, className:
|
|
7635
|
+
k > 0 ? /* @__PURE__ */ s("button", { onClick: d, className: Ss, children: [
|
|
7641
7636
|
/* @__PURE__ */ t(Kt, { className: "h-3 w-3" }),
|
|
7642
7637
|
"New briefing"
|
|
7643
7638
|
] }) : null
|
|
@@ -7651,9 +7646,9 @@ function ic({
|
|
|
7651
7646
|
] }) : null,
|
|
7652
7647
|
/* @__PURE__ */ s("div", { className: "flex-1 overflow-y-auto", children: [
|
|
7653
7648
|
a ? /* @__PURE__ */ t("div", { className: "m-4 rounded-card border border-destructive/30 bg-destructive/10 px-3 py-2 text-[12px] text-destructive", children: a }) : null,
|
|
7654
|
-
!o && e.length === 0 && !a ? /* @__PURE__ */ t(
|
|
7649
|
+
!o && e.length === 0 && !a ? /* @__PURE__ */ t(dc, { onNew: d }) : null,
|
|
7655
7650
|
e.map((x) => /* @__PURE__ */ t(
|
|
7656
|
-
|
|
7651
|
+
uc,
|
|
7657
7652
|
{
|
|
7658
7653
|
briefing: x,
|
|
7659
7654
|
isOpening: h === x.id,
|
|
@@ -7670,10 +7665,10 @@ function ic({
|
|
|
7670
7665
|
"a",
|
|
7671
7666
|
{
|
|
7672
7667
|
href: D,
|
|
7673
|
-
className: v(
|
|
7668
|
+
className: v(Qd, "h-6 px-1 text-[11px]"),
|
|
7674
7669
|
children: [
|
|
7675
7670
|
"Manage all briefings",
|
|
7676
|
-
/* @__PURE__ */ t(
|
|
7671
|
+
/* @__PURE__ */ t(Ti, { className: "h-3 w-3" })
|
|
7677
7672
|
]
|
|
7678
7673
|
}
|
|
7679
7674
|
) }) : null
|
|
@@ -7681,18 +7676,18 @@ function ic({
|
|
|
7681
7676
|
}
|
|
7682
7677
|
);
|
|
7683
7678
|
}
|
|
7684
|
-
function
|
|
7679
|
+
function dc({ onNew: e }) {
|
|
7685
7680
|
return /* @__PURE__ */ s("div", { className: "flex h-full flex-col items-center justify-center px-8 py-12 text-center", children: [
|
|
7686
|
-
/* @__PURE__ */ t(
|
|
7681
|
+
/* @__PURE__ */ t(cc, { className: "mb-5 h-[88px] w-[112px] text-border" }),
|
|
7687
7682
|
/* @__PURE__ */ t("div", { className: "text-[13px] font-medium text-foreground", children: "Have an analyst brief your team" }),
|
|
7688
7683
|
/* @__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." }),
|
|
7689
|
-
/* @__PURE__ */ s("button", { onClick: e, className: v(
|
|
7684
|
+
/* @__PURE__ */ s("button", { onClick: e, className: v(Ss, "mt-4"), children: [
|
|
7690
7685
|
/* @__PURE__ */ t(Kt, { className: "h-3 w-3" }),
|
|
7691
7686
|
"New briefing"
|
|
7692
7687
|
] })
|
|
7693
7688
|
] });
|
|
7694
7689
|
}
|
|
7695
|
-
function
|
|
7690
|
+
function cc({ className: e }) {
|
|
7696
7691
|
return /* @__PURE__ */ s(
|
|
7697
7692
|
"svg",
|
|
7698
7693
|
{
|
|
@@ -7869,7 +7864,7 @@ function dc({ className: e }) {
|
|
|
7869
7864
|
}
|
|
7870
7865
|
);
|
|
7871
7866
|
}
|
|
7872
|
-
function
|
|
7867
|
+
function uc({
|
|
7873
7868
|
briefing: e,
|
|
7874
7869
|
isOpening: n,
|
|
7875
7870
|
isBusy: r,
|
|
@@ -7878,7 +7873,7 @@ function cc({
|
|
|
7878
7873
|
onTogglePause: i,
|
|
7879
7874
|
onDelete: l
|
|
7880
7875
|
}) {
|
|
7881
|
-
const c = e.status === "PAUSED", d = e.hasActiveRun, u =
|
|
7876
|
+
const c = e.status === "PAUSED", d = e.hasActiveRun, u = sc(e), p = rc(e.lastRunAt), f = e.lastRunStatus, h = f === "SUCCESS" ? Y.success.dot : f === "FAILED" ? Y.danger.dot : f ? Y.warning.dot : Y.neutral.dot;
|
|
7882
7877
|
return /* @__PURE__ */ s(
|
|
7883
7878
|
"div",
|
|
7884
7879
|
{
|
|
@@ -7903,10 +7898,10 @@ function cc({
|
|
|
7903
7898
|
c ? /* @__PURE__ */ t("span", { className: "shrink-0 text-[11px] text-muted-foreground", children: "· Paused" }) : null
|
|
7904
7899
|
] }),
|
|
7905
7900
|
/* @__PURE__ */ s("div", { className: "mt-1 flex flex-wrap items-center gap-x-1.5 text-[11px] text-muted-foreground", children: [
|
|
7906
|
-
/* @__PURE__ */ t("span", { children:
|
|
7901
|
+
/* @__PURE__ */ t("span", { children: oc(e) }),
|
|
7907
7902
|
/* @__PURE__ */ t("span", { className: "text-border", children: "·" }),
|
|
7908
|
-
/* @__PURE__ */ t(
|
|
7909
|
-
/* @__PURE__ */ t("span", { className: "truncate", children:
|
|
7903
|
+
/* @__PURE__ */ t(xi, { className: "h-3 w-3" }),
|
|
7904
|
+
/* @__PURE__ */ t("span", { className: "truncate", children: ac(e) }),
|
|
7910
7905
|
e.lastRunAt ? /* @__PURE__ */ s(ae, { children: [
|
|
7911
7906
|
/* @__PURE__ */ t("span", { className: "text-border", children: "·" }),
|
|
7912
7907
|
/* @__PURE__ */ s("span", { children: [
|
|
@@ -7938,12 +7933,12 @@ function cc({
|
|
|
7938
7933
|
onClick: (b) => b.stopPropagation(),
|
|
7939
7934
|
className: "inline-flex h-6 w-6 items-center justify-center rounded-control text-muted-foreground/70 opacity-60 hover:bg-muted hover:text-foreground/80 focus-visible:opacity-100 group-hover:opacity-100",
|
|
7940
7935
|
"aria-label": "Briefing actions",
|
|
7941
|
-
children: /* @__PURE__ */ t(
|
|
7936
|
+
children: /* @__PURE__ */ t(Ma, { className: "h-3.5 w-3.5" })
|
|
7942
7937
|
}
|
|
7943
7938
|
) }),
|
|
7944
7939
|
/* @__PURE__ */ s(Fn, { align: "end", className: "w-44", children: [
|
|
7945
7940
|
/* @__PURE__ */ s(ze, { onClick: a, children: [
|
|
7946
|
-
/* @__PURE__ */ t(
|
|
7941
|
+
/* @__PURE__ */ t(Sa, { className: "h-3.5 w-3.5" }),
|
|
7947
7942
|
"Edit briefing"
|
|
7948
7943
|
] }),
|
|
7949
7944
|
/* @__PURE__ */ s(
|
|
@@ -7965,10 +7960,10 @@ function cc({
|
|
|
7965
7960
|
b.preventDefault(), i();
|
|
7966
7961
|
},
|
|
7967
7962
|
children: c ? /* @__PURE__ */ s(ae, { children: [
|
|
7968
|
-
/* @__PURE__ */ t(
|
|
7963
|
+
/* @__PURE__ */ t(Oa, { className: "h-3.5 w-3.5" }),
|
|
7969
7964
|
"Resume"
|
|
7970
7965
|
] }) : /* @__PURE__ */ s(ae, { children: [
|
|
7971
|
-
/* @__PURE__ */ t(
|
|
7966
|
+
/* @__PURE__ */ t(ja, { className: "h-3.5 w-3.5" }),
|
|
7972
7967
|
"Pause"
|
|
7973
7968
|
] })
|
|
7974
7969
|
}
|
|
@@ -7993,8 +7988,8 @@ function cc({
|
|
|
7993
7988
|
}
|
|
7994
7989
|
);
|
|
7995
7990
|
}
|
|
7996
|
-
const
|
|
7997
|
-
function
|
|
7991
|
+
const mc = 2e3, hc = 20 * 6e4;
|
|
7992
|
+
function pc({
|
|
7998
7993
|
briefingId: e,
|
|
7999
7994
|
initialRun: n,
|
|
8000
7995
|
apiServiceUrl: r,
|
|
@@ -8006,13 +8001,13 @@ function hc({
|
|
|
8006
8001
|
const [c, d] = S(n), { startRun: u } = In({
|
|
8007
8002
|
apiServiceUrl: r,
|
|
8008
8003
|
token: a,
|
|
8009
|
-
intervalMs:
|
|
8010
|
-
timeoutMs:
|
|
8004
|
+
intervalMs: mc,
|
|
8005
|
+
timeoutMs: hc,
|
|
8011
8006
|
fetchRun: ({
|
|
8012
8007
|
apiServiceUrl: f,
|
|
8013
8008
|
token: h,
|
|
8014
8009
|
runId: b
|
|
8015
|
-
}) =>
|
|
8010
|
+
}) => Za(f, h, e, b),
|
|
8016
8011
|
onRun: (f) => {
|
|
8017
8012
|
d(f);
|
|
8018
8013
|
},
|
|
@@ -8022,12 +8017,12 @@ function hc({
|
|
|
8022
8017
|
onTimeout: () => {
|
|
8023
8018
|
i();
|
|
8024
8019
|
}
|
|
8025
|
-
}), p =
|
|
8020
|
+
}), p = Ee(!1);
|
|
8026
8021
|
return ce(() => {
|
|
8027
8022
|
p.current || (p.current = !0, _t(n.status) ? u(n) : Ut(n.status) && o(n));
|
|
8028
|
-
}, [n, o, u]), /* @__PURE__ */ t(
|
|
8023
|
+
}, [n, o, u]), /* @__PURE__ */ t(kd, { run: c, onExpand: l });
|
|
8029
8024
|
}
|
|
8030
|
-
function
|
|
8025
|
+
function $c({
|
|
8031
8026
|
dashboardId: e,
|
|
8032
8027
|
dashboardTitle: n,
|
|
8033
8028
|
apiServiceUrl: r,
|
|
@@ -8039,17 +8034,17 @@ function Oc({
|
|
|
8039
8034
|
}) {
|
|
8040
8035
|
const { authToken: d, tokenProps: u } = Dt(), [p, f] = S(!1), [h, b] = S("list"), [D, k] = S("dashboard"), [N, g] = S(
|
|
8041
8036
|
[]
|
|
8042
|
-
), [L, x] = S(null), [C, T] = S(!1), [$, R] = S(null), [
|
|
8037
|
+
), [L, x] = S(null), [C, T] = S(!1), [$, R] = S(null), [E, P] = S(null), [z, B] = S(
|
|
8043
8038
|
null
|
|
8044
8039
|
), [K, _] = S(null), [O, J] = S(
|
|
8045
8040
|
null
|
|
8046
|
-
), [I, ve] = S(null), w = r ?? (u == null ? void 0 : u.apiServiceUrl), q = a ?? (d == null ? void 0 : d.accessToken), se = V(() => ({ ...
|
|
8047
|
-
() =>
|
|
8041
|
+
), [I, ve] = S(null), w = r ?? (u == null ? void 0 : u.apiServiceUrl), q = a ?? (d == null ? void 0 : d.accessToken), se = V(() => ({ ...Gd, ...c }), [c]), X = Yd(n), De = V(
|
|
8042
|
+
() => tc(N, D, e),
|
|
8048
8043
|
[e, N, D]
|
|
8049
8044
|
), ke = V(() => D === "dashboard" ? {
|
|
8050
8045
|
source: { type: "dashboard", dashboardId: e },
|
|
8051
8046
|
label: X,
|
|
8052
|
-
detail:
|
|
8047
|
+
detail: Zd(X)
|
|
8053
8048
|
} : {
|
|
8054
8049
|
source: { type: "project" },
|
|
8055
8050
|
label: "This project",
|
|
@@ -8059,7 +8054,7 @@ function Oc({
|
|
|
8059
8054
|
T(!0), _(null);
|
|
8060
8055
|
try {
|
|
8061
8056
|
g(
|
|
8062
|
-
await
|
|
8057
|
+
await nc({
|
|
8063
8058
|
apiClient: se,
|
|
8064
8059
|
apiServiceUrl: w,
|
|
8065
8060
|
token: q
|
|
@@ -8107,7 +8102,7 @@ function Oc({
|
|
|
8107
8102
|
w,
|
|
8108
8103
|
q,
|
|
8109
8104
|
j.id,
|
|
8110
|
-
{ requestId:
|
|
8105
|
+
{ requestId: fc() }
|
|
8111
8106
|
), U();
|
|
8112
8107
|
} catch (ee) {
|
|
8113
8108
|
he.error(
|
|
@@ -8159,9 +8154,9 @@ function Oc({
|
|
|
8159
8154
|
P(null);
|
|
8160
8155
|
}
|
|
8161
8156
|
}, qe = De.length;
|
|
8162
|
-
return /* @__PURE__ */ s(
|
|
8157
|
+
return /* @__PURE__ */ s(hi, { open: p, onOpenChange: f, children: [
|
|
8163
8158
|
/* @__PURE__ */ t(
|
|
8164
|
-
|
|
8159
|
+
Wd,
|
|
8165
8160
|
{
|
|
8166
8161
|
disabled: o || !Te,
|
|
8167
8162
|
briefingCount: qe,
|
|
@@ -8170,18 +8165,18 @@ function Oc({
|
|
|
8170
8165
|
}
|
|
8171
8166
|
),
|
|
8172
8167
|
/* @__PURE__ */ s(
|
|
8173
|
-
|
|
8168
|
+
pi,
|
|
8174
8169
|
{
|
|
8175
8170
|
side: "right",
|
|
8176
8171
|
hideClose: !0,
|
|
8177
8172
|
className: "flex h-full w-full flex-col overflow-hidden p-0 sm:max-w-[560px]",
|
|
8178
8173
|
children: [
|
|
8179
|
-
/* @__PURE__ */ s(
|
|
8180
|
-
/* @__PURE__ */ t(
|
|
8181
|
-
/* @__PURE__ */ t(
|
|
8174
|
+
/* @__PURE__ */ s(fi, { className: "sr-only", children: [
|
|
8175
|
+
/* @__PURE__ */ t(gi, { children: "Briefings" }),
|
|
8176
|
+
/* @__PURE__ */ t(bi, { children: "Manage briefings for this dashboard." })
|
|
8182
8177
|
] }),
|
|
8183
8178
|
h === "list" ? /* @__PURE__ */ t(
|
|
8184
|
-
|
|
8179
|
+
lc,
|
|
8185
8180
|
{
|
|
8186
8181
|
briefings: De,
|
|
8187
8182
|
dashboardLabel: X,
|
|
@@ -8202,11 +8197,11 @@ function Oc({
|
|
|
8202
8197
|
},
|
|
8203
8198
|
onDelete: (j) => B(j),
|
|
8204
8199
|
selectingId: $,
|
|
8205
|
-
busyId:
|
|
8200
|
+
busyId: E,
|
|
8206
8201
|
manageBriefingsHref: l
|
|
8207
8202
|
}
|
|
8208
8203
|
) : /* @__PURE__ */ t(
|
|
8209
|
-
|
|
8204
|
+
qd,
|
|
8210
8205
|
{
|
|
8211
8206
|
apiServiceUrl: w,
|
|
8212
8207
|
token: q,
|
|
@@ -8233,7 +8228,7 @@ function Oc({
|
|
|
8233
8228
|
}
|
|
8234
8229
|
),
|
|
8235
8230
|
O && w && q ? /* @__PURE__ */ t(
|
|
8236
|
-
|
|
8231
|
+
pc,
|
|
8237
8232
|
{
|
|
8238
8233
|
briefingId: O.briefing.id,
|
|
8239
8234
|
initialRun: O.run,
|
|
@@ -8254,7 +8249,7 @@ function Oc({
|
|
|
8254
8249
|
}
|
|
8255
8250
|
) : null,
|
|
8256
8251
|
I ? /* @__PURE__ */ t("div", { className: "fixed bottom-4 right-4 z-50 w-[360px]", children: /* @__PURE__ */ t(
|
|
8257
|
-
|
|
8252
|
+
Sd,
|
|
8258
8253
|
{
|
|
8259
8254
|
title: I.run.status === "SUCCESS" ? `${I.briefing.name} is ready` : `${I.briefing.name} run failed`,
|
|
8260
8255
|
durationSeconds: I.run.startedAt && I.run.completedAt ? Math.max(
|
|
@@ -8289,7 +8284,7 @@ function Oc({
|
|
|
8289
8284
|
/* @__PURE__ */ s($n, { children: [
|
|
8290
8285
|
/* @__PURE__ */ t(Un, { children: "Cancel" }),
|
|
8291
8286
|
/* @__PURE__ */ t(
|
|
8292
|
-
|
|
8287
|
+
Ba,
|
|
8293
8288
|
{
|
|
8294
8289
|
className: "bg-destructive/90 hover:bg-destructive",
|
|
8295
8290
|
onClick: Se,
|
|
@@ -8302,51 +8297,51 @@ function Oc({
|
|
|
8302
8297
|
)
|
|
8303
8298
|
] });
|
|
8304
8299
|
}
|
|
8305
|
-
function
|
|
8300
|
+
function fc() {
|
|
8306
8301
|
return typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : `briefing-run-now-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
|
|
8307
8302
|
}
|
|
8308
8303
|
export {
|
|
8309
|
-
|
|
8304
|
+
Dc as A,
|
|
8310
8305
|
Kn as B,
|
|
8311
|
-
|
|
8312
|
-
|
|
8313
|
-
|
|
8314
|
-
|
|
8306
|
+
En as C,
|
|
8307
|
+
Wi as D,
|
|
8308
|
+
Hi as E,
|
|
8309
|
+
At as F,
|
|
8315
8310
|
_r as G,
|
|
8316
|
-
|
|
8311
|
+
Bl as H,
|
|
8317
8312
|
jr as I,
|
|
8318
|
-
|
|
8319
|
-
|
|
8320
|
-
|
|
8321
|
-
|
|
8322
|
-
|
|
8323
|
-
|
|
8324
|
-
|
|
8325
|
-
|
|
8326
|
-
|
|
8327
|
-
|
|
8328
|
-
|
|
8329
|
-
|
|
8330
|
-
|
|
8331
|
-
|
|
8332
|
-
|
|
8333
|
-
|
|
8313
|
+
qd as J,
|
|
8314
|
+
$c as K,
|
|
8315
|
+
za as L,
|
|
8316
|
+
Pi as M,
|
|
8317
|
+
Fc as N,
|
|
8318
|
+
Tc as U,
|
|
8319
|
+
Ic as V,
|
|
8320
|
+
Wd as W,
|
|
8321
|
+
Ki as a,
|
|
8322
|
+
Rc as b,
|
|
8323
|
+
Ji as c,
|
|
8324
|
+
el as d,
|
|
8325
|
+
Pc as e,
|
|
8326
|
+
Mc as f,
|
|
8327
|
+
Wa as g,
|
|
8328
|
+
ll as h,
|
|
8334
8329
|
Hn as i,
|
|
8335
|
-
|
|
8336
|
-
|
|
8337
|
-
|
|
8338
|
-
|
|
8339
|
-
|
|
8340
|
-
|
|
8341
|
-
|
|
8342
|
-
|
|
8343
|
-
|
|
8344
|
-
|
|
8345
|
-
|
|
8346
|
-
|
|
8347
|
-
|
|
8348
|
-
|
|
8349
|
-
|
|
8350
|
-
|
|
8351
|
-
|
|
8330
|
+
Qa as j,
|
|
8331
|
+
Ya as k,
|
|
8332
|
+
il as l,
|
|
8333
|
+
dl as m,
|
|
8334
|
+
cl as n,
|
|
8335
|
+
ul as o,
|
|
8336
|
+
Ga as p,
|
|
8337
|
+
Bc as q,
|
|
8338
|
+
Ja as r,
|
|
8339
|
+
Za as s,
|
|
8340
|
+
ml as t,
|
|
8341
|
+
Lc as u,
|
|
8342
|
+
hl as v,
|
|
8343
|
+
Oc as w,
|
|
8344
|
+
Vc as x,
|
|
8345
|
+
pl as y,
|
|
8346
|
+
Ml as z
|
|
8352
8347
|
};
|