@feedmepos/mf-report 5.33.3 → 5.34.1-beta.0
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/{App-BgRqim5d.js → App-BdSGNJ3L.js} +114 -113
- package/dist/{DateRangeSelect-XyU5XG5c.js → DateRangeSelect-Cre6UJLD.js} +67 -67
- package/dist/{Default.vue_vue_type_script_setup_true_lang-CC7fE3F8.js → Default.vue_vue_type_script_setup_true_lang-CvM5oewZ.js} +3 -3
- package/dist/DigestListView-BuB4JOlT.js +876 -0
- package/dist/{DigestReaderView-DSNoAESE.js → DigestReaderView-DdpTY1Ax.js} +63 -63
- package/dist/{DynamicWidget.vue_vue_type_script_setup_true_lang-CsDiXGUk.js → DynamicWidget.vue_vue_type_script_setup_true_lang-4qBcakJs.js} +733 -733
- package/dist/{GlobalFilterSelect.vue_vue_type_script_setup_true_lang-D7Rsh-uY.js → GlobalFilterSelect.vue_vue_type_script_setup_true_lang-BL3kxHFR.js} +526 -526
- package/dist/{InsightView-CF8mQJha.js → InsightView-CZOStmyJ.js} +88 -88
- package/dist/{Integration-QMdYwTwW.js → Integration-BC-DWRpD.js} +1983 -1967
- package/dist/{Integrations-Dbx1ScOv.js → Integrations-ibKrdipe.js} +10 -10
- package/dist/{Layout-CgiplBHM.js → Layout-D0W7xdty.js} +3 -3
- package/dist/{LocationSelect.vue_vue_type_script_setup_true_lang-zW8JA7j3.js → LocationSelect.vue_vue_type_script_setup_true_lang-CJCSJkT_.js} +306 -306
- package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-B0q9V1x8.js → MenuTab.vue_vue_type_script_setup_true_lang-DnPC8AcN.js} +6 -6
- package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-BVWZ8vTw.js → NavigationTab.vue_vue_type_script_setup_true_lang-CKaMBQka.js} +12784 -11760
- package/dist/{OverviewView-BbZ8WkLb.js → OverviewView-AOwgvPBq.js} +7 -7
- package/dist/{Report-BYi0pPZs.js → Report-Bs5sy1OF.js} +12 -12
- package/dist/{ReportCanvasView-CfFtVomc.js → ReportCanvasView-CYai96pI.js} +426 -426
- package/dist/{ReportEditor-BLEkGUVR.js → ReportEditor-BbsLe4B7.js} +32 -32
- package/dist/{ReportView-TG78Krm2.js → ReportView-B5Fqspyn.js} +13 -13
- package/dist/{ReportViewRoute-BUADf4Cr.js → ReportViewRoute-D2wI79x9.js} +5 -5
- package/dist/SelectComponent.vue_vue_type_script_setup_true_lang-Cxx-TQz9.js +137 -0
- package/dist/{Setting-Curkhv9_.js → Setting-DdYXi5qR.js} +6 -6
- package/dist/{Template-BN_ds698.js → Template-YEa1E6oz.js} +80 -80
- package/dist/{TileEditor-Cfb0uXGr.js → TileEditor-CnmEhIab.js} +1566 -1566
- package/dist/{TilePageStack.vue_vue_type_script_setup_true_lang-1FKwWbpC.js → TilePageStack.vue_vue_type_script_setup_true_lang-CqWXV57r.js} +82 -82
- package/dist/{TransitionFade-D0_ZoB-O.js → TransitionFade-BmItOXFf.js} +170 -170
- package/dist/{XeroRedirect-CuTrP62C.js → XeroRedirect-D4sHbZe7.js} +3 -3
- package/dist/_plugin-vue_export-helper-Bx7s49ra.js +2828 -0
- package/dist/{app-LKjvcmXa.js → app-BmNusIzI.js} +5688 -13890
- package/dist/app.js +1 -1
- package/dist/assets/{formatChartData.worker-DvK7K5ca.js → formatChartData.worker-Cpgnh20a.js} +62 -62
- package/dist/assets/{processTableData.worker-C3l4iUXL.js → processTableData.worker-B7I6PElJ.js} +64 -64
- package/dist/{chart-BywXiz4O.js → chart-DU0N9V2o.js} +7 -4
- package/dist/currency-DAk-bsf8.js +12 -0
- package/dist/index-6T_rmIM_.js +24722 -0
- package/dist/{report-Ci2ElGpp.js → report-NKl3Yb5J.js} +23 -23
- package/dist/style.css +1 -1
- package/dist/{useDigestFont-BxXC7U3d.js → useDigestFont-Bxq6g3WO.js} +80 -80
- package/dist/{useReportCanvasPanel-BjmRiMSh.js → useReportCanvasPanel-BN-Gq7Uj.js} +975 -976
- package/dist/{useRestaurantPermission-DX52YBfA.js → useRestaurantPermission-D8b3oI0-.js} +2 -2
- package/package.json +11 -11
- package/dist/DigestListView-Bqp4LA1w.js +0 -876
- package/dist/SelectComponent.vue_vue_type_script_setup_true_lang-DW7Dk7iQ.js +0 -137
- package/dist/_plugin-vue_export-helper-C6QDExPN.js +0 -2718
- package/dist/currency-DFN_8rRJ.js +0 -12
- package/dist/index-xdTpLFHc.js +0 -25511
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
import { ref as
|
|
1
|
+
import { ref as E, shallowRef as Dt, getCurrentScope as Ct, onScopeDispose as Et, watch as se, onMounted as Le, onBeforeUnmount as Pe, defineComponent as $e, computed as D, resolveComponent as Oe, openBlock as d, createElementBlock as m, Fragment as fe, renderList as me, createElementVNode as C, createVNode as ee, toDisplayString as w, unref as b, createCommentVNode as L, createTextVNode as Ce, createBlock as ve, nextTick as ke, normalizeClass as et, h as ce, useModel as rt, withCtx as Ue, mergeProps as ot, mergeModels as it } from "vue";
|
|
2
2
|
import { storeToRefs as ze } from "pinia";
|
|
3
3
|
import { detectLocale as Bt } from "@feedmepos/mf-common";
|
|
4
|
-
import { w as oe, F as ie, u as De, a as qt, a5 as Vt, a6 as Ft, a7 as Ut, a8 as Ht, A as Wt, a9 as Gt, aa as Yt, ab as Xt, ac as Kt, ad as Jt, ae as Qt } from "./app-
|
|
5
|
-
import { c as Zt } from "./currency-
|
|
4
|
+
import { w as oe, F as ie, u as De, a as qt, a5 as Vt, a6 as Ft, a7 as Ut, a8 as Ht, A as Wt, a9 as Gt, aa as Yt, ab as Xt, ac as Kt, ad as Jt, ae as Qt } from "./app-BmNusIzI.js";
|
|
5
|
+
import { c as Zt } from "./currency-DAk-bsf8.js";
|
|
6
6
|
import { l as st } from "./report-canvas-libs-CNx4fuqd.js";
|
|
7
|
-
import { u as Be, _ as Tt } from "./_plugin-vue_export-helper-
|
|
8
|
-
import { v as lt } from "./report-
|
|
9
|
-
function ye(
|
|
10
|
-
const { businessId:
|
|
11
|
-
if (!
|
|
12
|
-
return `/${
|
|
7
|
+
import { u as Be, _ as Tt } from "./_plugin-vue_export-helper-Bx7s49ra.js";
|
|
8
|
+
import { v as lt } from "./report-NKl3Yb5J.js";
|
|
9
|
+
function ye(e) {
|
|
10
|
+
const { businessId: t } = ze(De());
|
|
11
|
+
if (!t.value) throw new Error("Business Id is not defined");
|
|
12
|
+
return `/${t.value}/report-canvas/${e}`;
|
|
13
13
|
}
|
|
14
|
-
const
|
|
15
|
-
const
|
|
14
|
+
const Jr = (e) => {
|
|
15
|
+
const t = {
|
|
16
16
|
fetchType: ie.Get,
|
|
17
|
-
url: ye(
|
|
17
|
+
url: ye(e)
|
|
18
18
|
};
|
|
19
|
-
return oe.fetch(
|
|
20
|
-
}, en = (
|
|
19
|
+
return oe.fetch(t);
|
|
20
|
+
}, en = (e, t, n, r, a, i) => {
|
|
21
21
|
const v = {
|
|
22
22
|
fetchType: ie.Post,
|
|
23
|
-
url: `${ye(
|
|
23
|
+
url: `${ye(e)}/query/${t}`,
|
|
24
24
|
// a draft-only query id does not exist on the published copy, so the state travels with it
|
|
25
|
-
data: { params: n, timezone:
|
|
25
|
+
data: { params: n, timezone: r, state: a },
|
|
26
26
|
requestConfig: { signal: i }
|
|
27
27
|
};
|
|
28
28
|
return oe.fetch(v);
|
|
29
|
-
},
|
|
29
|
+
}, Qr = (e, t, n, r) => {
|
|
30
30
|
const a = {
|
|
31
31
|
fetchType: ie.Post,
|
|
32
|
-
url: `${ye(
|
|
33
|
-
data: { ...n, state:
|
|
32
|
+
url: `${ye(e)}/section/${t}/ack`,
|
|
33
|
+
data: { ...n, state: r }
|
|
34
34
|
};
|
|
35
35
|
return oe.fetch(a);
|
|
36
|
-
},
|
|
36
|
+
}, Zr = (e) => oe.fetch({
|
|
37
37
|
fetchType: ie.Post,
|
|
38
|
-
url: `${ye(
|
|
38
|
+
url: `${ye(e)}/publish`,
|
|
39
39
|
data: {}
|
|
40
|
-
}), eo = (
|
|
40
|
+
}), eo = (e) => oe.fetch({
|
|
41
41
|
fetchType: ie.Delete,
|
|
42
|
-
url: `${ye(
|
|
43
|
-
}), to = (
|
|
42
|
+
url: `${ye(e)}/draft`
|
|
43
|
+
}), to = (e, t) => oe.fetch({
|
|
44
44
|
fetchType: ie.Post,
|
|
45
|
-
url: `${ye(
|
|
46
|
-
data: { turnId:
|
|
47
|
-
}), no = (
|
|
45
|
+
url: `${ye(e)}/draft/undo`,
|
|
46
|
+
data: { turnId: t }
|
|
47
|
+
}), no = (e) => oe.fetch({
|
|
48
48
|
fetchType: ie.Get,
|
|
49
|
-
url: `${ye(
|
|
50
|
-
}),
|
|
49
|
+
url: `${ye(e)}/versions`
|
|
50
|
+
}), ao = (e, t) => oe.fetch({
|
|
51
51
|
fetchType: ie.Post,
|
|
52
|
-
url: `${ye(
|
|
53
|
-
data: { versionId:
|
|
54
|
-
}), tn = ["@from", "@to", "@locationIds", "@timezone"], He = ["@from", "@to", "@locationIds"], nn = ["@timezone"],
|
|
55
|
-
function sn(
|
|
56
|
-
if (!(!(
|
|
57
|
-
return Math.min(Math.max(
|
|
52
|
+
url: `${ye(e)}/restore`,
|
|
53
|
+
data: { versionId: t }
|
|
54
|
+
}), tn = ["@from", "@to", "@locationIds", "@timezone"], He = ["@from", "@to", "@locationIds"], nn = ["@timezone"], an = ["@locationIds"], rn = 1, on = 1500;
|
|
55
|
+
function sn(e) {
|
|
56
|
+
if (!(!(e instanceof Wt) || e.status !== 429))
|
|
57
|
+
return Math.min(Math.max(e.retryAfterMs ?? on, 500), 5e3);
|
|
58
58
|
}
|
|
59
59
|
const ft = {
|
|
60
60
|
"en-US": Ht,
|
|
@@ -62,41 +62,41 @@ const ft = {
|
|
|
62
62
|
"zh-CN": Ft,
|
|
63
63
|
"zh-Hant": Vt
|
|
64
64
|
};
|
|
65
|
-
function ln(
|
|
65
|
+
function ln(e) {
|
|
66
66
|
var a, i;
|
|
67
|
-
const
|
|
67
|
+
const t = ft[e] ?? ft["en-US"], n = {}, r = (v, k) => {
|
|
68
68
|
for (const [_, u] of Object.entries(v ?? {}))
|
|
69
|
-
typeof u == "string" ? n[`${k}${_}`] = u : u && typeof u == "object" &&
|
|
69
|
+
typeof u == "string" ? n[`${k}${_}`] = u : u && typeof u == "object" && r(u, `${k}${_}.`);
|
|
70
70
|
};
|
|
71
|
-
return
|
|
71
|
+
return r(((i = (a = t == null ? void 0 : t.reportV5) == null ? void 0 : a.reportCanvas) == null ? void 0 : i.frame) ?? {}, ""), n;
|
|
72
72
|
}
|
|
73
|
-
function dt(
|
|
74
|
-
return
|
|
73
|
+
function dt(e) {
|
|
74
|
+
return e == null ? !0 : Array.isArray(e) ? e.length === 0 : e === "";
|
|
75
75
|
}
|
|
76
|
-
function
|
|
77
|
-
const n =
|
|
78
|
-
let
|
|
76
|
+
function ro(e, t = {}) {
|
|
77
|
+
const n = t.frozen, r = qt(), { dateRange: a, selectedLocationIds: i, locations: v, timezone: k } = ze(r), { country: _ } = ze(De()), u = E({}), $ = E([]), N = E({}), A = Dt({}), R = E(), T = E([]), B = [], P = [], z = { ids: "[]", date: "" };
|
|
78
|
+
let M = !1;
|
|
79
79
|
const V = {}, Y = {};
|
|
80
80
|
Ct() && Et(() => Object.values(Y).forEach((h) => h.abort()));
|
|
81
81
|
const X = {};
|
|
82
82
|
function Z(h) {
|
|
83
|
-
|
|
83
|
+
B.push(h);
|
|
84
84
|
}
|
|
85
|
-
function
|
|
86
|
-
|
|
85
|
+
function c(h) {
|
|
86
|
+
P.push(h);
|
|
87
87
|
}
|
|
88
88
|
function y(h) {
|
|
89
|
-
A.value = { ...A.value, [h.queryId]: h },
|
|
89
|
+
A.value = { ...A.value, [h.queryId]: h }, B.forEach((I) => I(h));
|
|
90
90
|
}
|
|
91
91
|
function g(h) {
|
|
92
92
|
const I = {};
|
|
93
|
-
for (const
|
|
94
|
-
I[
|
|
93
|
+
for (const O of h.params)
|
|
94
|
+
I[O.name] = O.default ?? null;
|
|
95
95
|
if (n) {
|
|
96
|
-
u.value = I,
|
|
96
|
+
u.value = I, N.value = {};
|
|
97
97
|
return;
|
|
98
98
|
}
|
|
99
|
-
I["@from"] = a.value.startDate ?? null, I["@to"] = a.value.endDate ?? null, I["@timezone"] = k.value, I["@locationIds"] = [...i.value], u.value = I,
|
|
99
|
+
I["@from"] = a.value.startDate ?? null, I["@to"] = a.value.endDate ?? null, I["@timezone"] = k.value, I["@locationIds"] = [...i.value], u.value = I, N.value = {}, K();
|
|
100
100
|
}
|
|
101
101
|
function U() {
|
|
102
102
|
return v.value.map((h) => h.id);
|
|
@@ -105,9 +105,9 @@ function ao(t, e = {}) {
|
|
|
105
105
|
return { startDate: a.value.startDate, endDate: a.value.endDate };
|
|
106
106
|
}
|
|
107
107
|
function K() {
|
|
108
|
-
|
|
108
|
+
z.ids = JSON.stringify([...i.value]), z.date = JSON.stringify(q());
|
|
109
109
|
}
|
|
110
|
-
function
|
|
110
|
+
function ae() {
|
|
111
111
|
if (n) return;
|
|
112
112
|
const h = u.value["@from"], I = u.value["@to"];
|
|
113
113
|
if (typeof h == "string" || typeof I == "string") {
|
|
@@ -117,24 +117,24 @@ function ao(t, e = {}) {
|
|
|
117
117
|
};
|
|
118
118
|
JSON.stringify(F) !== JSON.stringify(q()) && (a.value = F);
|
|
119
119
|
}
|
|
120
|
-
const
|
|
121
|
-
if (Array.isArray(
|
|
122
|
-
const F =
|
|
120
|
+
const O = u.value["@locationIds"];
|
|
121
|
+
if (Array.isArray(O)) {
|
|
122
|
+
const F = O.map(String);
|
|
123
123
|
JSON.stringify(F) !== JSON.stringify(i.value) && (i.value = F);
|
|
124
124
|
}
|
|
125
125
|
K();
|
|
126
126
|
}
|
|
127
|
-
function
|
|
128
|
-
const h = [...i.value], I = {},
|
|
129
|
-
JSON.stringify(q()) !==
|
|
127
|
+
function re() {
|
|
128
|
+
const h = [...i.value], I = {}, O = { ...N.value };
|
|
129
|
+
JSON.stringify(q()) !== z.date && (I["@from"] = a.value.startDate ?? null, I["@to"] = a.value.endDate ?? null), JSON.stringify(h) !== z.ids ? (I["@locationIds"] = h, delete O["@locationIds"]) : O["@locationIds"] === "all" && (I["@locationIds"] = U()), Object.keys(I).length && de(I, O);
|
|
130
130
|
}
|
|
131
131
|
function te() {
|
|
132
132
|
n || se([a, i, v], () => {
|
|
133
|
-
|
|
133
|
+
M && re();
|
|
134
134
|
});
|
|
135
135
|
}
|
|
136
136
|
function xe() {
|
|
137
|
-
return { values: u.value, decls:
|
|
137
|
+
return { values: u.value, decls: $.value, intent: N.value };
|
|
138
138
|
}
|
|
139
139
|
function ue() {
|
|
140
140
|
const h = Bt() || "en-US";
|
|
@@ -151,12 +151,12 @@ function ao(t, e = {}) {
|
|
|
151
151
|
};
|
|
152
152
|
}
|
|
153
153
|
function we(h, I) {
|
|
154
|
-
return JSON.stringify(h.dependsOn.map((
|
|
154
|
+
return JSON.stringify(h.dependsOn.map((O) => I[O] ?? null));
|
|
155
155
|
}
|
|
156
156
|
function ne(h, I) {
|
|
157
|
-
return h.lazy ? h.dependsOn.some((
|
|
158
|
-
const F =
|
|
159
|
-
return ((F == null ? void 0 : F.default) ?? null) === null && dt(I[
|
|
157
|
+
return h.lazy ? h.dependsOn.some((O) => {
|
|
158
|
+
const F = $.value.find((J) => J.name === O);
|
|
159
|
+
return ((F == null ? void 0 : F.default) ?? null) === null && dt(I[O] ?? null);
|
|
160
160
|
}) : !1;
|
|
161
161
|
}
|
|
162
162
|
function _e(h) {
|
|
@@ -164,11 +164,11 @@ function ao(t, e = {}) {
|
|
|
164
164
|
}
|
|
165
165
|
async function pe(h, I) {
|
|
166
166
|
var J, H;
|
|
167
|
-
const
|
|
168
|
-
if (V[h.id] =
|
|
169
|
-
const
|
|
167
|
+
const O = (V[h.id] ?? 0) + 1;
|
|
168
|
+
if (V[h.id] = O, n) {
|
|
169
|
+
const o = n[h.id];
|
|
170
170
|
y(
|
|
171
|
-
|
|
171
|
+
o ? { queryId: h.id, runId: O, status: "ok", rows: o.rows, truncated: o.truncated } : { queryId: h.id, runId: O, status: "error", rows: [], truncated: !1, error: `no saved rows for ${h.id}` }
|
|
172
172
|
);
|
|
173
173
|
return;
|
|
174
174
|
}
|
|
@@ -176,25 +176,25 @@ function ao(t, e = {}) {
|
|
|
176
176
|
const F = new AbortController();
|
|
177
177
|
Y[h.id] = F, y({
|
|
178
178
|
queryId: h.id,
|
|
179
|
-
runId:
|
|
179
|
+
runId: O,
|
|
180
180
|
status: "loading",
|
|
181
181
|
rows: ((H = A.value[h.id]) == null ? void 0 : H.rows) ?? [],
|
|
182
182
|
truncated: !1
|
|
183
183
|
});
|
|
184
|
-
for (let
|
|
184
|
+
for (let o = 0; ; o++)
|
|
185
185
|
try {
|
|
186
186
|
const p = await en(
|
|
187
|
-
|
|
187
|
+
e,
|
|
188
188
|
h.id,
|
|
189
189
|
I,
|
|
190
190
|
k.value,
|
|
191
|
-
|
|
191
|
+
R.value,
|
|
192
192
|
F.signal
|
|
193
193
|
);
|
|
194
|
-
if (Y[h.id] === F && delete Y[h.id], V[h.id] !==
|
|
194
|
+
if (Y[h.id] === F && delete Y[h.id], V[h.id] !== O) return;
|
|
195
195
|
y({
|
|
196
196
|
queryId: h.id,
|
|
197
|
-
runId:
|
|
197
|
+
runId: O,
|
|
198
198
|
status: "ok",
|
|
199
199
|
rows: p.rows ?? [],
|
|
200
200
|
truncated: !!p.truncated,
|
|
@@ -202,15 +202,15 @@ function ao(t, e = {}) {
|
|
|
202
202
|
});
|
|
203
203
|
return;
|
|
204
204
|
} catch (p) {
|
|
205
|
-
if (F.signal.aborted || V[h.id] !==
|
|
205
|
+
if (F.signal.aborted || V[h.id] !== O) return;
|
|
206
206
|
const G = sn(p);
|
|
207
|
-
if (G !== void 0 &&
|
|
208
|
-
if (await new Promise((W) => setTimeout(W, G)), V[h.id] !==
|
|
207
|
+
if (G !== void 0 && o < rn) {
|
|
208
|
+
if (await new Promise((W) => setTimeout(W, G)), V[h.id] !== O) return;
|
|
209
209
|
continue;
|
|
210
210
|
}
|
|
211
211
|
y({
|
|
212
212
|
queryId: h.id,
|
|
213
|
-
runId:
|
|
213
|
+
runId: O,
|
|
214
214
|
status: "error",
|
|
215
215
|
rows: [],
|
|
216
216
|
truncated: !1,
|
|
@@ -221,13 +221,13 @@ function ao(t, e = {}) {
|
|
|
221
221
|
}
|
|
222
222
|
function he(h = {}) {
|
|
223
223
|
var F, J, H;
|
|
224
|
-
const I = { ...u.value },
|
|
225
|
-
for (const
|
|
226
|
-
const p =
|
|
227
|
-
if (ne(
|
|
228
|
-
delete X[
|
|
229
|
-
queryId:
|
|
230
|
-
runId: V[
|
|
224
|
+
const I = { ...u.value }, O = !_e(I);
|
|
225
|
+
for (const o of T.value) {
|
|
226
|
+
const p = O && o.dependsOn.some((W) => He.includes(W));
|
|
227
|
+
if (ne(o, I)) {
|
|
228
|
+
delete X[o.id], ((F = A.value[o.id]) == null ? void 0 : F.status) !== "idle" && y({
|
|
229
|
+
queryId: o.id,
|
|
230
|
+
runId: V[o.id] ?? 0,
|
|
231
231
|
status: "idle",
|
|
232
232
|
rows: [],
|
|
233
233
|
truncated: !1
|
|
@@ -235,59 +235,59 @@ function ao(t, e = {}) {
|
|
|
235
235
|
continue;
|
|
236
236
|
}
|
|
237
237
|
if (p) {
|
|
238
|
-
((J = A.value[
|
|
239
|
-
queryId:
|
|
240
|
-
runId: V[
|
|
238
|
+
((J = A.value[o.id]) == null ? void 0 : J.status) !== "loading" && y({
|
|
239
|
+
queryId: o.id,
|
|
240
|
+
runId: V[o.id] ?? 0,
|
|
241
241
|
status: "loading",
|
|
242
|
-
rows: ((H = A.value[
|
|
242
|
+
rows: ((H = A.value[o.id]) == null ? void 0 : H.rows) ?? [],
|
|
243
243
|
truncated: !1
|
|
244
244
|
});
|
|
245
245
|
continue;
|
|
246
246
|
}
|
|
247
|
-
const G = we(
|
|
248
|
-
!h.force && X[
|
|
247
|
+
const G = we(o, I);
|
|
248
|
+
!h.force && X[o.id] === G || (X[o.id] = G, pe(o, I));
|
|
249
249
|
}
|
|
250
250
|
}
|
|
251
251
|
function de(h, I) {
|
|
252
|
-
const
|
|
252
|
+
const O = { ...u.value }, F = { ...N.value };
|
|
253
253
|
let J = !1;
|
|
254
|
-
for (const [H,
|
|
255
|
-
if (!(H in
|
|
256
|
-
const p =
|
|
257
|
-
F[H] !== p && (p ? F[H] = p : delete F[H], J = !0), JSON.stringify(
|
|
254
|
+
for (const [H, o] of Object.entries(h)) {
|
|
255
|
+
if (!(H in O) || nn.includes(H)) continue;
|
|
256
|
+
const p = an.includes(H) ? I == null ? void 0 : I[H] : void 0;
|
|
257
|
+
F[H] !== p && (p ? F[H] = p : delete F[H], J = !0), JSON.stringify(O[H] ?? null) !== JSON.stringify(o ?? null) && (O[H] = o, J = !0);
|
|
258
258
|
}
|
|
259
|
-
return J ? (u.value =
|
|
259
|
+
return J ? (u.value = O, N.value = F, Object.keys(h).some((H) => He.includes(H)) && ae(), he(), P.forEach((H) => H()), !0) : !1;
|
|
260
260
|
}
|
|
261
261
|
function Te(h) {
|
|
262
|
-
|
|
262
|
+
R.value = h.state, T.value = h.queries, $.value = h.params, A.value = {};
|
|
263
263
|
for (const I of Object.keys(V)) delete V[I];
|
|
264
264
|
for (const I of Object.keys(X)) delete X[I];
|
|
265
|
-
g(h),
|
|
265
|
+
g(h), M = !0, he();
|
|
266
266
|
}
|
|
267
267
|
function Ie(h, I = []) {
|
|
268
|
-
|
|
269
|
-
const
|
|
270
|
-
for (const
|
|
271
|
-
F[
|
|
268
|
+
R.value = h.state, T.value = h.queries, $.value = h.params;
|
|
269
|
+
const O = JSON.stringify(u.value), F = {};
|
|
270
|
+
for (const o of h.params)
|
|
271
|
+
F[o.name] = o.name in u.value ? u.value[o.name] : o.default ?? null;
|
|
272
272
|
u.value = F;
|
|
273
|
-
const J = new Set(h.queries.map((
|
|
274
|
-
for (const
|
|
275
|
-
for (const
|
|
276
|
-
const H = Object.keys(A.value).filter((
|
|
273
|
+
const J = new Set(h.queries.map((o) => o.id));
|
|
274
|
+
for (const o of Object.keys(V)) J.has(o) || delete V[o];
|
|
275
|
+
for (const o of Object.keys(X)) J.has(o) || delete X[o];
|
|
276
|
+
const H = Object.keys(A.value).filter((o) => !J.has(o));
|
|
277
277
|
if (H.length) {
|
|
278
|
-
const
|
|
279
|
-
for (const p of H) delete
|
|
280
|
-
A.value =
|
|
278
|
+
const o = { ...A.value };
|
|
279
|
+
for (const p of H) delete o[p];
|
|
280
|
+
A.value = o;
|
|
281
281
|
}
|
|
282
|
-
for (const
|
|
283
|
-
return he(), JSON.stringify(u.value) !==
|
|
282
|
+
for (const o of I) delete X[o];
|
|
283
|
+
return he(), JSON.stringify(u.value) !== O;
|
|
284
284
|
}
|
|
285
285
|
return {
|
|
286
286
|
params: u,
|
|
287
|
-
intent:
|
|
287
|
+
intent: N,
|
|
288
288
|
results: A,
|
|
289
|
-
queries:
|
|
290
|
-
state:
|
|
289
|
+
queries: T,
|
|
290
|
+
state: R,
|
|
291
291
|
paramState: xe,
|
|
292
292
|
env: ue,
|
|
293
293
|
load: Te,
|
|
@@ -296,28 +296,28 @@ function ao(t, e = {}) {
|
|
|
296
296
|
run: he,
|
|
297
297
|
setParams: de,
|
|
298
298
|
onResult: Z,
|
|
299
|
-
onParamsChanged:
|
|
299
|
+
onParamsChanged: c,
|
|
300
300
|
RESERVED: tn
|
|
301
301
|
};
|
|
302
302
|
}
|
|
303
303
|
const fn = `:root{--fm-palette-brand-fm-100:#fff3e6;--fm-palette-brand-fm-200:#ff9455;--fm-palette-brand-fm-300:#ff7823;--fm-palette-brand-fm-400:#b25300;--fm-palette-brand-fm-500:#6b3100;--fm-palette-aqua-100:#b7e2ff;--fm-palette-aqua-300:#3ab0ff;--fm-palette-aqua-500:#0a5384;--fm-palette-berry-100:#fee4dc;--fm-palette-berry-300:#e94850;--fm-palette-berry-500:#5f090a;--fm-palette-blossom-100:#fff7fc;--fm-palette-blossom-300:#ffc4c3;--fm-palette-blossom-500:#8c146a;--fm-palette-lime-100:#f4fde6;--fm-palette-lime-300:#aeef4b;--fm-palette-lime-500:#306a01;--fm-palette-mustard-100:#fef5ea;--fm-palette-mustard-300:#ffc746;--fm-palette-mustard-500:#903e1f;--fm-palette-stone-100:#f6f8fc;--fm-palette-stone-300:#b2b3b6;--fm-palette-stone-500:#2e2e2e;--fm-palette-grape-100:#eddfff;--fm-palette-grape-300:#8f61e8;--fm-palette-grape-500:#512191;--fm-palette-neurastone-0:#fff;--fm-palette-neurastone-100:#f6f6f8;--fm-palette-neurastone-200:#f0f0f0;--fm-palette-neurastone-300:#b2b3b6;--fm-palette-neurastone-400:#6b6c70;--fm-palette-neurastone-500:#4b4b4b;--fm-palette-neurastone-600:#2e2e2e;--fm-palette-neurastone-700:#262628;--fm-palette-neurastone-800:#1c1c1e;--fm-palette-neurastone-900:#121212;--fm-palette-blue-100:#e6f2ff;--fm-palette-blue-200:#66afff;--fm-palette-blue-300:#007aff;--fm-palette-blue-400:#004999;--fm-palette-blue-500:#002c5c;--fm-palette-orange-100:#fff4e6;--fm-palette-orange-200:#ffbf66;--fm-palette-orange-300:#ff9500;--fm-palette-orange-400:#995900;--fm-palette-orange-500:#5c3500;--fm-palette-green-100:#ebf9ee;--fm-palette-green-200:#85dd9b;--fm-palette-green-300:#34c759;--fm-palette-green-400:#1f7735;--fm-palette-green-500:#134720;--fm-palette-red-100:#ffebea;--fm-palette-red-200:#ff8983;--fm-palette-red-300:#ff3b30;--fm-palette-red-400:#99231d;--fm-palette-red-500:#5c1511;--fm-palette-overlay-black-alpha-4:#1212120a;--fm-palette-overlay-black-alpha-8:#12121214;--fm-palette-overlay-black-alpha-12:#1212121f;--fm-palette-overlay-black-alpha-16:#12121229;--fm-palette-overlay-black-alpha-24:#1212123d;--fm-palette-overlay-black-alpha-32:#12121252;--fm-palette-overlay-black-alpha-48:#1212127a;--fm-palette-overlay-black-alpha-64:#121212a3;--fm-palette-overlay-black-alpha-72:#121212b8;--fm-palette-overlay-black-alpha-80:#121212cc;--fm-palette-overlay-white-alpha-4:#ffffff0a;--fm-palette-overlay-white-alpha-8:#ffffff14;--fm-palette-overlay-white-alpha-12:#ffffff1f;--fm-palette-overlay-white-alpha-16:#ffffff29;--fm-palette-overlay-white-alpha-24:#ffffff3d;--fm-palette-overlay-white-alpha-32:#ffffff52;--fm-palette-overlay-white-alpha-48:#ffffff7a;--fm-palette-overlay-white-alpha-64:#ffffffa3;--fm-palette-overlay-white-alpha-72:#ffffffb8;--fm-palette-overlay-white-alpha-80:#fffc;--fm-spacing-0:0;--fm-spacing-1:1px;--fm-spacing-2:2px;--fm-spacing-4:4px;--fm-spacing-6:6px;--fm-spacing-8:8px;--fm-spacing-10:10px;--fm-spacing-12:12px;--fm-spacing-14:14px;--fm-spacing-16:16px;--fm-spacing-18:18px;--fm-spacing-20:20px;--fm-spacing-24:24px;--fm-spacing-28:28px;--fm-spacing-32:32px;--fm-spacing-40:40px;--fm-spacing-48:48px;--fm-spacing-56:56px;--fm-spacing-64:64px;--fm-spacing-72:72px;--fm-spacing-80:80px;--fm-spacing-88:88px;--fm-spacing-96:96px;--fm-spacing-104:104px;--fm-spacing-112:112px;--fm-spacing-120:120px;--fm-spacing-128:128px;--fm-spacing-160:160px;--fm-spacing-192:192px;--fm-radius-none:0;--fm-radius-xs:4px;--fm-radius-sm:8px;--fm-radius-md:12px;--fm-radius-lg:16px;--fm-radius-xl:24px;--fm-radius-2xl:32px;--fm-radius-3xl:64px;--fm-radius-full:99999px;--fm-border-width-none:0;--fm-border-width-hairline:.5px;--fm-border-width-thin:1px;--fm-border-width-regular:1.5px;--fm-border-width-medium:2px;--fm-border-width-thick:4px;--fm-opacity-0:0;--fm-opacity-8:.08;--fm-opacity-12:.12;--fm-opacity-16:.16;--fm-opacity-24:.24;--fm-opacity-32:.32;--fm-opacity-40:.4;--fm-opacity-48:.48;--fm-opacity-56:.56;--fm-opacity-64:.64;--fm-opacity-80:.8;--fm-opacity-100:1;--fm-shadow-blur-none:0;--fm-shadow-blur-xs:2px;--fm-shadow-blur-sm:4px;--fm-shadow-blur-md:6px;--fm-shadow-blur-lg:10px;--fm-shadow-blur-xl:16px;--fm-shadow-blur-2xl:24px;--fm-blur-sm:8px;--fm-blur-md:16px;--fm-blur-lg:24px;--fm-blur-xl:40px;--fm-z-index-base:0;--fm-z-index-raised:100;--fm-z-index-dropdown:200;--fm-z-index-sticky:300;--fm-z-index-overlay:400;--fm-z-index-modal:500;--fm-z-index-toast:600;--fm-z-index-tooltip:700;--fm-duration-instant:0s;--fm-duration-fast:.1s;--fm-duration-normal:.2s;--fm-duration-slow:.3s;--fm-duration-slower:.5s;--fm-easing-standard:cubic-bezier(.4, 0, .2, 1);--fm-easing-decelerate:cubic-bezier(0, 0, .2, 1);--fm-easing-accelerate:cubic-bezier(.4, 0, 1, 1);--fm-easing-spring:cubic-bezier(.34, 1.56, .64, 1);--fm-shadow-color:#1c1c1e;--fm-breakpoint-sm:0;--fm-breakpoint-md:768px;--fm-breakpoint-lg:1024px;--fm-breakpoint-xl:1440px;--fm-breakpoint-xxl:1920px}:root,[data-fm-theme=light]{--fm-bg-canvas:#f6f6f8;--fm-bg-default:#fff;--fm-bg-subtle:#f6f6f8;--fm-bg-muted:#f0f0f0;--fm-bg-elevated:#fff;--fm-bg-inverse:#1c1c1e;--fm-bg-brand:#fff3e6;--fm-bg-success:#ebf9ee;--fm-bg-warning:#fff4e6;--fm-bg-error:#ffebea;--fm-bg-info:#e6f2ff;--fm-surface-default:#fff;--fm-surface-sunken:#f0f0f0;--fm-surface-inset:#b2b3b6;--fm-surface-raised:#fff;--fm-surface-floating:#fff;--fm-text-primary:#1c1c1e;--fm-text-secondary:#4b4b4b;--fm-text-muted:#6b6c70;--fm-text-disabled:#b2b3b6;--fm-text-inverse:#fff;--fm-text-on-inset:#fff;--fm-text-link:#007aff;--fm-text-brand:#ff7823;--fm-text-success:#1f7735;--fm-text-warning:#995900;--fm-text-error:#99231d;--fm-icon-primary:#1c1c1e;--fm-icon-secondary:#4b4b4b;--fm-icon-muted:#6b6c70;--fm-icon-disabled:#b2b3b6;--fm-icon-inverse:#fff;--fm-icon-link:#007aff;--fm-icon-brand:#ff7823;--fm-icon-success:#1f7735;--fm-icon-warning:#995900;--fm-icon-error:#99231d;--fm-icon-info:#004999;--fm-icon-on-brand:#b25300;--fm-icon-on-success:#1f7735;--fm-icon-on-warning:#995900;--fm-icon-on-error:#99231d;--fm-icon-on-info:#004999;--fm-text-info:#004999;--fm-border-default:#f0f0f0;--fm-border-subtle:#f6f6f8;--fm-border-medium:#b2b3b6;--fm-border-strong:#6b6c70;--fm-border-inverse:#fff;--fm-border-brand:#ff7823;--fm-border-success:#1f7735;--fm-border-warning:#995900;--fm-border-error:#99231d;--fm-border-info:#004999;--fm-overlay-scrim-1:#12121252;--fm-overlay-scrim-2:#1212127a;--fm-overlay-scrim-3:#121212a3;--fm-overlay-scrim-4:#121212b8;--fm-action-primary-bg:#ff7823;--fm-feature-aqua-bg:#b7e2ff;--fm-feature-aqua-accent:#3ab0ff;--fm-feature-aqua-fg:#0a5384;--fm-feature-berry-bg:#fee4dc;--fm-feature-berry-accent:#e94850;--fm-feature-berry-fg:#5f090a;--fm-feature-blossom-bg:#fff7fc;--fm-feature-blossom-accent:#ffc4c3;--fm-feature-blossom-fg:#8c146a;--fm-feature-lime-bg:#f4fde6;--fm-feature-lime-accent:#aeef4b;--fm-feature-lime-fg:#306a01;--fm-feature-mustard-bg:#fef5ea;--fm-feature-mustard-accent:#ffc746;--fm-feature-mustard-fg:#903e1f;--fm-feature-stone-bg:#f6f8fc;--fm-feature-stone-accent:#b2b3b6;--fm-feature-stone-fg:#2e2e2e;--fm-feature-grape-bg:#eddfff;--fm-feature-grape-accent:#8f61e8;--fm-feature-grape-fg:#512191;--fm-state-subtle:#1212120a;--fm-state-hover:#12121214;--fm-state-pressed:#1212121f;--fm-state-selected:#12121229;--fm-state-dragged:#1212123d;--fm-action-primary-bg-hover:#b25300;--fm-action-primary-bg-subtle:#fff3e6;--fm-action-primary-fg:#1c1c1e;--fm-action-secondary-bg:#fff;--fm-action-secondary-bg-hover:#f6f6f8;--fm-action-secondary-fg:#1c1c1e;--fm-action-ghost-bg-hover:#f6f6f8;--fm-action-ghost-bg-active:#f0f0f0;--fm-action-danger-bg:#ff3b30;--fm-action-danger-bg-hover:#99231d;--fm-action-danger-bg-subtle:#ffebea;--fm-action-danger-fg:#1c1c1e;--fm-action-disabled-bg:#f0f0f0;--fm-action-disabled-fg:#6b6c70;--fm-text-on-brand:#b25300;--fm-text-on-success:#1f7735;--fm-text-on-warning:#995900;--fm-text-on-error:#99231d;--fm-text-on-info:#004999;--fm-badge-bg-aqua:#b7e2ff;--fm-badge-text-on-aqua:#0a5384;--fm-badge-icon-on-aqua:#0a5384;--fm-badge-border-aqua:#0a5384;--fm-badge-bg-berry:#fee4dc;--fm-badge-bg-blossom:#fff7fc;--fm-badge-bg-lime:#f4fde6;--fm-badge-bg-mustard:#fef5ea;--fm-badge-bg-stone:#f6f8fc;--fm-badge-bg-grape:#eddfff;--fm-badge-border-blossom:#8c146a;--fm-badge-text-on-blossom:#8c146a;--fm-badge-icon-on-blossom:#8c146a;--fm-badge-border-berry:#5f090a;--fm-badge-text-on-berry:#5f090a;--fm-badge-icon-on-berry:#5f090a;--fm-badge-border-lime:#306a01;--fm-badge-text-on-lime:#306a01;--fm-badge-icon-on-lime:#306a01;--fm-badge-border-mustard:#903e1f;--fm-badge-text-on-mustard:#903e1f;--fm-badge-icon-on-mustard:#903e1f;--fm-badge-border-stone:#2e2e2e;--fm-badge-text-on-stone:#2e2e2e;--fm-badge-icon-on-stone:#2e2e2e;--fm-badge-border-grape:#512191;--fm-badge-text-on-grape:#512191;--fm-badge-icon-on-grape:#512191;--fm-badge-bg-brand:#fff3e6;--fm-badge-border-brand:#ff7823;--fm-badge-text-on-brand:#ff7823;--fm-badge-icon-on-brand:#ff7823}[data-fm-theme=dark]{--fm-bg-canvas:#121212;--fm-bg-default:#1c1c1e;--fm-bg-subtle:#262628;--fm-bg-muted:#2e2e2e;--fm-bg-elevated:#262628;--fm-bg-inverse:#fff;--fm-bg-brand:#b25300;--fm-bg-success:#1f7735;--fm-bg-warning:#995900;--fm-bg-error:#99231d;--fm-bg-info:#004999;--fm-surface-default:#262628;--fm-surface-sunken:#121212;--fm-surface-inset:#1c1c1e;--fm-surface-raised:#2e2e2e;--fm-surface-floating:#4b4b4b;--fm-text-primary:#fff;--fm-text-secondary:#b2b3b6;--fm-text-muted:#6b6c70;--fm-text-disabled:#4b4b4b;--fm-text-inverse:#1c1c1e;--fm-text-on-inset:#fff;--fm-text-link:#66afff;--fm-text-brand:#fff3e6;--fm-text-success:#85dd9b;--fm-text-warning:#ffbf66;--fm-text-error:#ff8983;--fm-icon-primary:#fff;--fm-icon-secondary:#b2b3b6;--fm-icon-muted:#6b6c70;--fm-icon-disabled:#4b4b4b;--fm-icon-inverse:#1c1c1e;--fm-icon-link:#66afff;--fm-icon-brand:#fff3e6;--fm-icon-success:#85dd9b;--fm-icon-warning:#ffbf66;--fm-icon-error:#ff8983;--fm-icon-info:#66afff;--fm-icon-on-brand:#fff3e6;--fm-icon-on-success:#ebf9ee;--fm-icon-on-warning:#fff4e6;--fm-icon-on-error:#ffebea;--fm-icon-on-info:#e6f2ff;--fm-text-info:#66afff;--fm-border-default:#2e2e2e;--fm-border-subtle:#262628;--fm-border-medium:#b2b3b6;--fm-border-strong:#f6f6f8;--fm-border-inverse:#1c1c1e;--fm-border-brand:#fff3e6;--fm-border-success:#85dd9b;--fm-border-warning:#ffbf66;--fm-border-error:#ff8983;--fm-border-info:#66afff;--fm-overlay-scrim-1:#1212127a;--fm-overlay-scrim-2:#121212a3;--fm-overlay-scrim-3:#121212b8;--fm-overlay-scrim-4:#121212cc;--fm-action-primary-bg:#ff7823;--fm-feature-aqua-bg:#0a5384;--fm-feature-aqua-accent:#3ab0ff;--fm-feature-aqua-fg:#b7e2ff;--fm-feature-berry-bg:#5f090a;--fm-feature-berry-accent:#e94850;--fm-feature-berry-fg:#fee4dc;--fm-feature-blossom-bg:#8c146a;--fm-feature-blossom-accent:#ffc4c3;--fm-feature-blossom-fg:#fff7fc;--fm-feature-lime-bg:#306a01;--fm-feature-lime-accent:#aeef4b;--fm-feature-lime-fg:#f4fde6;--fm-feature-mustard-bg:#903e1f;--fm-feature-mustard-accent:#ffc746;--fm-feature-mustard-fg:#fef5ea;--fm-feature-stone-bg:#2e2e2e;--fm-feature-stone-accent:#b2b3b6;--fm-feature-stone-fg:#f6f8fc;--fm-feature-grape-bg:#512191;--fm-feature-grape-accent:#8f61e8;--fm-feature-grape-fg:#eddfff;--fm-state-subtle:#ffffff0a;--fm-state-hover:#ffffff14;--fm-state-pressed:#ffffff1f;--fm-state-selected:#ffffff29;--fm-state-dragged:#ffffff3d;--fm-action-primary-bg-hover:#b25300;--fm-action-primary-bg-subtle:#6b3100;--fm-action-primary-fg:#1c1c1e;--fm-action-secondary-bg:#262628;--fm-action-secondary-bg-hover:#2e2e2e;--fm-action-secondary-fg:#fff;--fm-action-ghost-bg-hover:#262628;--fm-action-ghost-bg-active:#2e2e2e;--fm-action-danger-bg:#ff3b30;--fm-action-danger-bg-hover:#99231d;--fm-action-danger-bg-subtle:#5c1511;--fm-action-danger-fg:#1c1c1e;--fm-action-disabled-bg:#2e2e2e;--fm-action-disabled-fg:#6b6c70;--fm-text-on-brand:#fff3e6;--fm-text-on-success:#ebf9ee;--fm-text-on-warning:#fff4e6;--fm-text-on-error:#ffebea;--fm-text-on-info:#e6f2ff;--fm-badge-bg-aqua:#0a5384;--fm-badge-text-on-aqua:#b7e2ff;--fm-badge-icon-on-aqua:#b7e2ff;--fm-badge-border-aqua:#3ab0ff;--fm-badge-bg-berry:#5f090a;--fm-badge-bg-blossom:#8c146a;--fm-badge-bg-lime:#306a01;--fm-badge-bg-mustard:#903e1f;--fm-badge-bg-stone:#2e2e2e;--fm-badge-bg-grape:#512191;--fm-badge-border-blossom:#ffc4c3;--fm-badge-text-on-blossom:#fff7fc;--fm-badge-icon-on-blossom:#fff7fc;--fm-badge-border-berry:#e94850;--fm-badge-text-on-berry:#fee4dc;--fm-badge-icon-on-berry:#fee4dc;--fm-badge-border-lime:#aeef4b;--fm-badge-text-on-lime:#f4fde6;--fm-badge-icon-on-lime:#f4fde6;--fm-badge-border-mustard:#ffc746;--fm-badge-text-on-mustard:#fef5ea;--fm-badge-icon-on-mustard:#fef5ea;--fm-badge-border-stone:#b2b3b6;--fm-badge-text-on-stone:#f6f8fc;--fm-badge-icon-on-stone:#f6f8fc;--fm-badge-border-grape:#8f61e8;--fm-badge-text-on-grape:#eddfff;--fm-badge-icon-on-grape:#eddfff;--fm-badge-bg-brand:#6b3100;--fm-badge-border-brand:#ff7823;--fm-badge-text-on-brand:#fff3e6;--fm-badge-icon-on-brand:#fff3e6}:root{--fm-font-size-8:8px;--fm-font-size-10:10px;--fm-font-size-12:12px;--fm-font-size-14:14px;--fm-font-size-16:16px;--fm-font-size-18:18px;--fm-font-size-22:22px;--fm-font-size-26:26px;--fm-font-size-32:32px;--fm-font-size-36:36px;--fm-font-size-48:48px;--fm-font-size-60:60px;--fm-font-size-72:72px;--fm-font-family-heading:"Cabinet Grotesk";--fm-font-family-body:"Inter";--fm-font-weight-regular:400;--fm-font-weight-medium:500;--fm-font-weight-semi-bold:600;--fm-font-weight-extra-bold:800;--fm-font-weight-black:900;--fm-line-height-8:12px;--fm-line-height-10:14px;--fm-line-height-12:16px;--fm-line-height-14:20px;--fm-line-height-16:24px;--fm-line-height-18:26px;--fm-line-height-22:30px;--fm-line-height-26:36px;--fm-line-height-32:40px;--fm-line-height-36:44px;--fm-line-height-48:56px;--fm-line-height-60:72px;--fm-line-height-72:80px}:root:lang(zh),[lang=zh]{--fm-font-family-heading:"Noto Sans SC";--fm-font-family-body:"Noto Sans SC";--fm-font-weight-regular:400;--fm-font-weight-medium:500;--fm-font-weight-semi-bold:600;--fm-font-weight-extra-bold:800;--fm-font-weight-black:900;--fm-line-height-8:12px;--fm-line-height-10:14px;--fm-line-height-12:18px;--fm-line-height-14:20px;--fm-line-height-16:26px;--fm-line-height-18:26px;--fm-line-height-22:30px;--fm-line-height-26:36px;--fm-line-height-32:44px;--fm-line-height-36:46px;--fm-line-height-48:60px;--fm-line-height-60:76px;--fm-line-height-72:90px}:root:lang(th),[lang=th]{--fm-font-family-heading:"Noto Sans Thai";--fm-font-family-body:"Noto Sans Thai";--fm-font-weight-regular:400;--fm-font-weight-medium:500;--fm-font-weight-semi-bold:600;--fm-font-weight-extra-bold:800;--fm-font-weight-black:900;--fm-line-height-8:14px;--fm-line-height-10:16px;--fm-line-height-12:20px;--fm-line-height-14:24px;--fm-line-height-16:28px;--fm-line-height-18:28px;--fm-line-height-22:32px;--fm-line-height-26:38px;--fm-line-height-32:46px;--fm-line-height-36:50px;--fm-line-height-48:64px;--fm-line-height-60:80px;--fm-line-height-72:96px}.fm-text-display-xl{letter-spacing:.015em;font-family:Cabinet Grotesk,sans-serif;font-size:72px;font-weight:900;line-height:80px}.fm-text-display-lg{letter-spacing:.015em;font-family:Cabinet Grotesk,sans-serif;font-size:60px;font-weight:900;line-height:72px}.fm-text-display-md{letter-spacing:.015em;font-family:Cabinet Grotesk,sans-serif;font-size:48px;font-weight:900;line-height:56px}.fm-text-display-sm{letter-spacing:.015em;font-family:Cabinet Grotesk,sans-serif;font-size:36px;font-weight:900;line-height:44px}.fm-text-title-xl{letter-spacing:.01em;font-family:Cabinet Grotesk,sans-serif;font-size:32px;font-weight:800;line-height:40px}.fm-text-title-lg{letter-spacing:.01em;font-family:Cabinet Grotesk,sans-serif;font-size:26px;font-weight:800;line-height:36px}.fm-text-title-md{letter-spacing:.01em;font-family:Cabinet Grotesk,sans-serif;font-size:22px;font-weight:800;line-height:30px}.fm-text-title-sm{letter-spacing:.01em;font-family:Cabinet Grotesk,sans-serif;font-size:18px;font-weight:800;line-height:26px}.fm-text-body-lg-600{letter-spacing:.0025em;font-family:Inter,sans-serif;font-size:16px;font-weight:600;line-height:24px}.fm-text-body-md-600{letter-spacing:.01em;font-family:Inter,sans-serif;font-size:14px;font-weight:600;line-height:20px}.fm-text-body-sm-600{letter-spacing:.02em;font-family:Inter,sans-serif;font-size:12px;font-weight:600;line-height:16px}.fm-text-body-xs-600{letter-spacing:.02em;font-family:Inter,sans-serif;font-size:10px;font-weight:600;line-height:14px}.fm-text-body-overline-xs-600{letter-spacing:.1em;font-family:Inter,sans-serif;font-size:10px;font-weight:600;line-height:14px}.fm-text-body-overline-2xs-600{letter-spacing:.1em;font-family:Inter,sans-serif;font-size:8px;font-weight:600;line-height:12px}.fm-text-body-lg-500{letter-spacing:.0025em;font-family:Inter,sans-serif;font-size:16px;font-weight:500;line-height:24px}.fm-text-body-md-500{letter-spacing:.01em;font-family:Inter,sans-serif;font-size:14px;font-weight:500;line-height:20px}.fm-text-body-sm-500{letter-spacing:.02em;font-family:Inter,sans-serif;font-size:12px;font-weight:500;line-height:16px}.fm-text-body-xs-500{letter-spacing:.02em;font-family:Inter,sans-serif;font-size:10px;font-weight:500;line-height:14px}.fm-text-body-lg-400{letter-spacing:.0025em;font-family:Inter,sans-serif;font-size:16px;font-weight:400;line-height:24px}.fm-text-body-md-400{letter-spacing:.01em;font-family:Inter,sans-serif;font-size:14px;font-weight:400;line-height:20px}.fm-text-body-sm-400{letter-spacing:.02em;font-family:Inter,sans-serif;font-size:12px;font-weight:400;line-height:16px}.fm-text-body-xs-400{letter-spacing:.02em;font-family:Inter,sans-serif;font-size:10px;font-weight:400;line-height:14px}:root{--fm-shadow-light-xs:0 1px 2px 0 #1c1c1e0a;--fm-shadow-light-sm:0 2px 4px 0 #1c1c1e0f;--fm-shadow-light-md:0 4px 6px 0 #1c1c1e14;--fm-shadow-light-lg:0 6px 10px 0 #1c1c1e1a;--fm-shadow-light-xl:0 8px 16px 0 #1c1c1e1f;--fm-shadow-light-2xl:0 12px 24px 0 #1c1c1e24;--fm-shadow-light-top-sm:0 -2px 4px 0 #1c1c1e0f;--fm-shadow-light-top-md:0 -4px 6px 0 #1c1c1e14;--fm-shadow-light-side-left-md:-4px 0 6px 0 #1c1c1e14;--fm-shadow-light-side-right-md:4px 0 6px 0 #1c1c1e14;--fm-shadow-light-text-sm:0 1px 1px 0 #1c1c1e0d;--fm-shadow-light-text-md:0 1px 2px 0 #1c1c1e1a;--fm-shadow-light-text-lg:0 2px 4px 0 #1c1c1e26;--fm-shadow-light-text-xl:0 3px 6px 0 #1c1c1e33;--fm-shadow-dark-xs:0 1px 2px 0 #ffffff0a;--fm-shadow-dark-sm:0 2px 4px 0 #ffffff0f;--fm-shadow-dark-md:0 4px 6px 0 #ffffff14;--fm-shadow-dark-lg:0 6px 10px 0 #ffffff1a;--fm-shadow-dark-xl:0 8px 16px 0 #ffffff1f;--fm-shadow-dark-2xl:0 12px 24px 0 #ffffff24;--fm-shadow-dark-top-sm:0 -2px 4px 0 #ffffff0f;--fm-shadow-dark-top-md:0 -4px 6px 0 #ffffff14;--fm-shadow-dark-side-left-md:-4px 0 6px 0 #ffffff14;--fm-shadow-dark-side-right-md:4px 0 6px 0 #ffffff14;--fm-shadow-dark-text-sm:0 1px 1px 0 #ffffff0d;--fm-shadow-dark-text-md:0 1px 2px 0 #ffffff1a;--fm-shadow-dark-text-lg:0 2px 4px 0 #ffffff26;--fm-shadow-dark-text-xl:0 3px 6px 0 #fff3;--fm-outer-shadow-light-brand:0 0 0 4px #ff782352;--fm-outer-shadow-light-error:0 0 0 4px #ff3b3052;--fm-outer-shadow-dark-brand:0 0 0 4px #ff782366;--fm-outer-shadow-dark-error:0 0 0 4px #ff3b3066;--fm-inner-shadow-light-sm:inset 0 1px 2px 0 #1c1c1e0f;--fm-inner-shadow-light-md:inset 0 2px 4px 0 #1c1c1e1a;--fm-inner-shadow-light-brand:0 2px 4px 0 #1c1c1e14, inset 0 0 0 1.25px #1c1c1e1f;--fm-inner-shadow-dark-sm:inset 0 1px 2px 0 #ffffff0f;--fm-inner-shadow-dark-md:inset 0 2px 4px 0 #ffffff1a;--fm-inner-shadow-dark-brand:0 2px 4px 0 #ffffff14, inset 0 0 0 1.25px #ffffff1f;--fm-blur-sm:8px;--fm-blur-md:16px;--fm-blur-lg:24px;--fm-blur-xl:40px}:root,[data-fm-theme=light]{--fm-shadow-xs:var(--fm-shadow-light-xs);--fm-shadow-sm:var(--fm-shadow-light-sm);--fm-shadow-md:var(--fm-shadow-light-md);--fm-shadow-lg:var(--fm-shadow-light-lg);--fm-shadow-xl:var(--fm-shadow-light-xl);--fm-shadow-2xl:var(--fm-shadow-light-2xl);--fm-shadow-top-sm:var(--fm-shadow-light-top-sm);--fm-shadow-top-md:var(--fm-shadow-light-top-md);--fm-shadow-side-left-md:var(--fm-shadow-light-side-left-md);--fm-shadow-side-right-md:var(--fm-shadow-light-side-right-md);--fm-shadow-text-sm:var(--fm-shadow-light-text-sm);--fm-shadow-text-md:var(--fm-shadow-light-text-md);--fm-shadow-text-lg:var(--fm-shadow-light-text-lg);--fm-shadow-text-xl:var(--fm-shadow-light-text-xl);--fm-outer-shadow-brand:var(--fm-outer-shadow-light-brand);--fm-outer-shadow-error:var(--fm-outer-shadow-light-error);--fm-inner-shadow-sm:var(--fm-inner-shadow-light-sm);--fm-inner-shadow-md:var(--fm-inner-shadow-light-md);--fm-inner-shadow-brand:var(--fm-inner-shadow-light-brand)}[data-fm-theme=dark]{--fm-shadow-xs:var(--fm-shadow-dark-xs);--fm-shadow-sm:var(--fm-shadow-dark-sm);--fm-shadow-md:var(--fm-shadow-dark-md);--fm-shadow-lg:var(--fm-shadow-dark-lg);--fm-shadow-xl:var(--fm-shadow-dark-xl);--fm-shadow-2xl:var(--fm-shadow-dark-2xl);--fm-shadow-top-sm:var(--fm-shadow-dark-top-sm);--fm-shadow-top-md:var(--fm-shadow-dark-top-md);--fm-shadow-side-left-md:var(--fm-shadow-dark-side-left-md);--fm-shadow-side-right-md:var(--fm-shadow-dark-side-right-md);--fm-shadow-text-sm:var(--fm-shadow-dark-text-sm);--fm-shadow-text-md:var(--fm-shadow-dark-text-md);--fm-shadow-text-lg:var(--fm-shadow-dark-text-lg);--fm-shadow-text-xl:var(--fm-shadow-dark-text-xl);--fm-outer-shadow-brand:var(--fm-outer-shadow-dark-brand);--fm-outer-shadow-error:var(--fm-outer-shadow-dark-error);--fm-inner-shadow-sm:var(--fm-inner-shadow-dark-sm);--fm-inner-shadow-md:var(--fm-inner-shadow-dark-md);--fm-inner-shadow-brand:var(--fm-inner-shadow-dark-brand)}[data-fm-theme]{color:var(--fm-text-primary)}.fm-icon{width:var(--fm-icon-size,24px);height:var(--fm-icon-size,24px);font-size:var(--fm-icon-size,24px);vertical-align:middle;-webkit-user-select:none;user-select:none;flex:none;justify-content:center;align-items:center;line-height:1;display:inline-flex}.fm-icon__svg{fill:none;width:100%;height:100%;display:block}.fm-icon--rounded,.fm-icon--outlined{text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;font-feature-settings:"liga";-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:antialiased;text-rendering:optimizelegibility;direction:ltr;font-style:normal;font-weight:400}.fm-icon--rounded{font-family:Material Symbols Filled}.fm-icon--outlined{font-family:Material Symbols Outlined}.fm-alert{--fm-alert-surface:var(--fm-bg-inverse);--fm-alert-fg:var(--fm-text-inverse);--fm-alert-icon:var(--fm-icon-inverse);--fm-alert-progress:var(--fm-bg-default);--fm-alert-pad-x:var(--fm-spacing-16);--fm-alert-pad-y:var(--fm-spacing-12);box-sizing:border-box;border-radius:var(--fm-radius-lg);background-color:var(--fm-alert-surface);color:var(--fm-alert-fg);box-shadow:var(--fm-shadow-sm);flex-direction:column;display:flex;overflow:hidden}@media (width>=768px){.fm-alert{--fm-alert-pad-x:var(--fm-spacing-24);--fm-alert-pad-y:var(--fm-spacing-16)}}.fm-alert__body{align-items:center;gap:var(--fm-spacing-12);padding:var(--fm-alert-pad-y) var(--fm-alert-pad-x);display:flex}.fm-alert__icon{--fm-icon-size:32px;width:32px;height:32px;color:var(--fm-alert-icon);flex:none;justify-content:center;align-items:center;display:inline-flex}.fm-alert__danger-mark{width:var(--fm-spacing-24);height:var(--fm-spacing-24);border-radius:var(--fm-radius-full);background-color:var(--fm-alert-icon);justify-content:center;align-items:center;display:inline-flex}.fm-alert__danger-bar{width:var(--fm-spacing-12);height:var(--fm-border-width-medium);border-radius:var(--fm-radius-full);background-color:var(--fm-icon-inverse)}.fm-alert__text{flex-direction:column;flex:auto;min-width:0;display:flex}.fm-alert__close{--fm-icon-size:var(--fm-spacing-20);width:var(--fm-spacing-40);height:var(--fm-spacing-40);border-radius:var(--fm-radius-sm);color:var(--fm-alert-fg);cursor:pointer;background:0 0;border:none;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex}.fm-alert__progress{border-radius:var(--fm-radius-full);background-color:var(--fm-alert-progress);height:2px}.fm-alert__progress--animated{transform-origin:0;animation:fm-alert-drain var(--fm-alert-duration,3s) linear forwards}@keyframes fm-alert-drain{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.fm-alert--info{--fm-alert-surface:var(--fm-bg-info);--fm-alert-fg:var(--fm-text-on-info);--fm-alert-icon:var(--fm-icon-on-info);--fm-alert-progress:var(--fm-icon-on-info)}.fm-alert--success{--fm-alert-surface:var(--fm-bg-success);--fm-alert-fg:var(--fm-text-on-success);--fm-alert-icon:var(--fm-icon-on-success);--fm-alert-progress:var(--fm-icon-on-success)}.fm-alert--warning{--fm-alert-surface:var(--fm-bg-warning);--fm-alert-fg:var(--fm-text-on-warning);--fm-alert-icon:var(--fm-icon-on-warning);--fm-alert-progress:var(--fm-icon-on-warning)}.fm-alert--danger{--fm-alert-surface:var(--fm-bg-error);--fm-alert-fg:var(--fm-text-on-error);--fm-alert-icon:var(--fm-icon-on-error);--fm-alert-progress:var(--fm-icon-on-error)}.fm-badge{--fm-badge-gap:var(--fm-spacing-2);justify-content:center;align-items:center;gap:var(--fm-badge-gap);box-sizing:border-box;border-radius:var(--fm-radius-xs);background-color:var(--fm-badge-surface);color:var(--fm-badge-fg);padding:var(--fm-badge-pad-y) var(--fm-badge-pad-x);-webkit-user-select:none;user-select:none;display:inline-flex}.fm-badge__label{text-overflow:ellipsis;white-space:nowrap;text-align:center;min-width:0;overflow:hidden}.fm-badge__icon{color:var(--fm-badge-icon,var(--fm-badge-fg));flex:none;display:inline-flex}.fm-badge--sm{--fm-badge-pad-x:var(--fm-spacing-4);--fm-badge-pad-y:var(--fm-spacing-2);--fm-badge-count-size:16px}.fm-badge--md{--fm-badge-pad-x:var(--fm-spacing-6);--fm-badge-pad-y:var(--fm-spacing-4);--fm-badge-count-size:24px}.fm-badge--lg{--fm-badge-pad-x:var(--fm-spacing-8);--fm-badge-pad-y:var(--fm-spacing-4);--fm-badge-count-size:32px}.fm-badge--filled{--fm-badge-surface:var(--fm-badge-bg)}.fm-badge--outlined{--fm-badge-surface:transparent;box-shadow:inset 0 0 0 var(--fm-border-width-thin) var(--fm-badge-border)}.fm-badge--count{--fm-badge-surface:var(--fm-action-primary-bg-subtle);--fm-badge-fg:var(--fm-text-brand);width:var(--fm-badge-count-size);height:var(--fm-badge-count-size);border-radius:calc(var(--fm-badge-count-size) / 2);padding:0}.fm-badge__count{line-height:1}.fm-badge--count-overflow{width:auto;min-width:var(--fm-badge-count-size);padding:0 calc(var(--fm-badge-count-size) * .375)}.fm-badge--brand{--fm-badge-bg:var(--fm-badge-bg-brand);--fm-badge-fg:var(--fm-badge-text-on-brand);--fm-badge-icon:var(--fm-badge-icon-on-brand);--fm-badge-border:var(--fm-badge-border-brand)}.fm-badge--info{--fm-badge-bg:var(--fm-bg-info);--fm-badge-fg:var(--fm-text-on-info);--fm-badge-icon:var(--fm-text-on-info);--fm-badge-border:var(--fm-border-info)}.fm-badge--success{--fm-badge-bg:var(--fm-bg-success);--fm-badge-fg:var(--fm-text-on-success);--fm-badge-icon:var(--fm-text-on-success);--fm-badge-border:var(--fm-border-success)}.fm-badge--warning{--fm-badge-bg:var(--fm-bg-warning);--fm-badge-fg:var(--fm-text-on-warning);--fm-badge-icon:var(--fm-text-on-warning);--fm-badge-border:var(--fm-border-warning)}.fm-badge--error{--fm-badge-bg:var(--fm-bg-error);--fm-badge-fg:var(--fm-text-on-error);--fm-badge-icon:var(--fm-text-on-error);--fm-badge-border:var(--fm-border-error)}.fm-badge--aqua{--fm-badge-bg:var(--fm-badge-bg-aqua);--fm-badge-fg:var(--fm-badge-text-on-aqua);--fm-badge-icon:var(--fm-badge-icon-on-aqua);--fm-badge-border:var(--fm-badge-border-aqua)}.fm-badge--berry{--fm-badge-bg:var(--fm-badge-bg-berry);--fm-badge-fg:var(--fm-badge-text-on-berry);--fm-badge-icon:var(--fm-badge-icon-on-berry);--fm-badge-border:var(--fm-badge-border-berry)}.fm-badge--blossom{--fm-badge-bg:var(--fm-badge-bg-blossom);--fm-badge-fg:var(--fm-badge-text-on-blossom);--fm-badge-icon:var(--fm-badge-icon-on-blossom);--fm-badge-border:var(--fm-badge-border-blossom)}.fm-badge--lime{--fm-badge-bg:var(--fm-badge-bg-lime);--fm-badge-fg:var(--fm-badge-text-on-lime);--fm-badge-icon:var(--fm-badge-icon-on-lime);--fm-badge-border:var(--fm-badge-border-lime)}.fm-badge--mustard{--fm-badge-bg:var(--fm-badge-bg-mustard);--fm-badge-fg:var(--fm-badge-text-on-mustard);--fm-badge-icon:var(--fm-badge-icon-on-mustard);--fm-badge-border:var(--fm-badge-border-mustard)}.fm-badge--stone{--fm-badge-bg:var(--fm-badge-bg-stone);--fm-badge-fg:var(--fm-badge-text-on-stone);--fm-badge-icon:var(--fm-badge-icon-on-stone);--fm-badge-border:var(--fm-badge-border-stone)}.fm-badge--grape{--fm-badge-bg:var(--fm-badge-bg-grape);--fm-badge-fg:var(--fm-badge-text-on-grape);--fm-badge-icon:var(--fm-badge-icon-on-grape);--fm-badge-border:var(--fm-badge-border-grape)}.fm-badge-anchor{align-items:center;gap:var(--fm-spacing-8);-webkit-user-select:none;user-select:none;display:inline-flex;position:relative}.fm-badge--overlay{--fm-badge-surface:var(--fm-text-primary);--fm-badge-fg:var(--fm-text-inverse);border-radius:var(--fm-radius-full);padding:0}.fm-badge--overlay-pinned{position:absolute;top:-2px;right:-4px}.fm-badge--overlay:not(.fm-badge--dot){min-width:16px;height:16px;padding:0 var(--fm-spacing-4)}.fm-badge--dot{width:6px;min-width:0;height:6px;padding:0}.fm-badge--overlay-pinned.fm-badge--dot{top:0;right:0}.fm-badge--v1-info{--fm-badge-surface:var(--fm-feature-aqua-accent);--fm-badge-fg:var(--fm-text-inverse)}.fm-badge--v1-success{--fm-badge-surface:var(--fm-feature-lime-accent);--fm-badge-fg:var(--fm-text-inverse)}.fm-badge--v1-warning{--fm-badge-surface:var(--fm-feature-mustard-accent);--fm-badge-fg:var(--fm-text-primary)}.fm-badge--v1-critical{--fm-badge-surface:var(--fm-feature-berry-accent);--fm-badge-fg:var(--fm-text-inverse)}.fm-badge--v1-neutral{--fm-badge-surface:var(--fm-text-primary);--fm-badge-fg:var(--fm-text-inverse)}.fm-badge--v1-numeric{--fm-badge-surface:var(--fm-text-error);--fm-badge-fg:var(--fm-text-inverse)}.fm-button{--fm-button-height:44px;--fm-button-padding-x:var(--fm-spacing-16);--fm-button-gap:var(--fm-spacing-8);--fm-button-icon-size:var(--fm-spacing-20);--fm-button-radius:var(--fm-radius-sm);--fm-button-border-width:var(--fm-border-width-none);--fm-button-border-color:transparent;--fm-button-bg:transparent;--fm-button-bg-hover:var(--fm-button-bg);--fm-button-bg-active:var(--fm-button-bg-hover);--fm-button-fg:var(--fm-text-primary);--fm-button-effects:0 0 #0000;--fm-button-effects-pressed:var(--fm-button-effects);--fm-button-glow:0 0 #0000;--fm-button-focus-ring:0 0 #0000;box-sizing:border-box;justify-content:center;align-items:center;gap:var(--fm-button-gap);height:var(--fm-button-height);padding:0 var(--fm-button-padding-x);border:var(--fm-button-border-width) solid var(--fm-button-border-color);border-radius:var(--fm-button-radius);background-color:var(--fm-button-bg);color:var(--fm-button-fg);box-shadow:var(--fm-button-focus-ring), var(--fm-button-effects);font-family:var(--fm-font-family-body), sans-serif;font-size:var(--fm-font-size-14);font-weight:var(--fm-font-weight-semi-bold);line-height:var(--fm-line-height-14);letter-spacing:.01em;text-align:center;cursor:pointer;-webkit-user-select:none;user-select:none;appearance:none;-webkit-tap-highlight-color:transparent;background-image:none;text-decoration:none;display:inline-flex}.fm-button:focus{outline:none}.fm-button--xs{--fm-button-height:32px}.fm-button--sm{--fm-button-height:40px}.fm-button--md{--fm-button-height:44px}.fm-button--lg{--fm-button-height:52px}@media (width>=768px){.fm-button--xs{--fm-button-height:28px}.fm-button--sm{--fm-button-height:36px}.fm-button--md{--fm-button-height:40px}.fm-button--lg{--fm-button-height:48px}.fm-button:not(.fm-button--xs){font-size:var(--fm-font-size-16);line-height:var(--fm-line-height-16);letter-spacing:.0025em}}@media (width>=1024px){.fm-button--xs{--fm-button-height:24px}.fm-button--sm{--fm-button-height:32px}.fm-button--md{--fm-button-height:36px}.fm-button--lg{--fm-button-height:44px}}.fm-button--primary{--fm-button-bg:var(--fm-action-primary-bg);--fm-button-bg-hover:var(--fm-action-primary-bg-hover);--fm-button-fg:var(--fm-text-inverse);--fm-button-effects:var(--fm-inner-shadow-brand);--fm-button-glow:var(--fm-outer-shadow-brand)}.fm-button--secondary{--fm-button-bg:var(--fm-action-secondary-bg);--fm-button-bg-hover:var(--fm-action-secondary-bg-hover);--fm-button-fg:var(--fm-text-primary);--fm-button-effects:var(--fm-inner-shadow-brand);--fm-button-effects-pressed:0 0 #0000;--fm-button-glow:var(--fm-outer-shadow-brand)}.fm-button--danger{--fm-button-bg:var(--fm-action-danger-bg);--fm-button-bg-hover:var(--fm-action-danger-bg-hover);--fm-button-fg:var(--fm-text-inverse);--fm-button-effects:var(--fm-inner-shadow-brand);--fm-button-glow:var(--fm-outer-shadow-error)}.fm-button--ghost{--fm-button-bg:transparent;--fm-button-bg-hover:var(--fm-action-ghost-bg-hover);--fm-button-bg-active:var(--fm-action-ghost-bg-active);--fm-button-fg:var(--fm-text-primary);--fm-button-glow:var(--fm-outer-shadow-brand)}.fm-button--legacy-plain{--fm-button-fg:var(--fm-text-brand)}.fm-button--legacy-fab{--fm-button-height:var(--fm-spacing-56);--fm-button-radius:var(--fm-radius-full);min-width:var(--fm-spacing-56);padding:0 var(--fm-spacing-16)}.fm-button:enabled:hover{background-color:var(--fm-button-bg-hover)}.fm-button:enabled:focus-visible{background-color:var(--fm-button-bg-hover);box-shadow:var(--fm-button-focus-ring), var(--fm-button-effects), var(--fm-button-glow)}.fm-button--secondary:enabled:focus-visible{--fm-button-focus-ring:inset 0 0 0 1px var(--fm-border-brand)}.fm-button:enabled:active{background-color:var(--fm-button-bg-active);background-image:linear-gradient(var(--fm-state-pressed), var(--fm-state-pressed));box-shadow:var(--fm-button-focus-ring), var(--fm-button-effects-pressed), var(--fm-button-glow)}.fm-button--ghost:enabled:active{background-image:none}.fm-button:disabled{--fm-button-bg:var(--fm-action-disabled-bg);--fm-button-fg:var(--fm-text-disabled);cursor:not-allowed}.fm-button--ghost:disabled{--fm-button-bg:transparent}.fm-button--loading{pointer-events:none}.fm-button__labels{display:contents}.fm-button__label,.fm-button__sub-label{overflow-wrap:anywhere;min-width:0}.fm-button__icon{width:var(--fm-button-icon-size);height:var(--fm-button-icon-size);flex:none;justify-content:center;align-items:center;display:inline-flex}.fm-button__icon>svg{width:100%;height:100%}.fm-button__icon--legacy{width:var(--fm-spacing-24);height:var(--fm-spacing-24)}@font-face{font-family:Material Symbols Outlined;font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/materialsymbolsoutlined/v232/kJF1BvYX7BgnkSrUwT8OhrdQw4oELdPIeeII9v6oDMzByHX9rA6RzaxHMPdY43zj-jCxv3fzvRNU22ZXGJpEpjC_1v-p_4MrImHCIJIZrDCvHOelbd5zrDAt.woff)format("woff");font-display:block}@font-face{font-family:Material Symbols Filled;font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/materialsymbolsoutlined/v232/kJF1BvYX7BgnkSrUwT8OhrdQw4oELdPIeeII9v6oDMzByHX9rA6RzazHD_dY43zj-jCxv3fzvRNU22ZXGJpEpjC_1v-p_4MrImHCIJIZrDCvHOelbd5zrDAt.woff)format("woff");font-display:block}.fm-button__legacy-icon{font-size:var(--fm-spacing-24);letter-spacing:normal;text-transform:none;white-space:nowrap;word-wrap:normal;-webkit-user-select:none;user-select:none;-webkit-font-smoothing:antialiased;text-rendering:optimizelegibility;font-feature-settings:"liga";-moz-osx-font-smoothing:grayscale;direction:ltr;font-style:normal;font-weight:400;line-height:1;display:inline-block}.fm-button__legacy-icon--outline{font-family:Material Symbols Outlined,sans-serif}.fm-button__legacy-icon--filled{font-family:Material Symbols Filled,sans-serif}.fm-button--icon-only{width:var(--fm-button-height);padding:0}.fm-button--layout-dotted,.fm-button--layout-spaced{width:100%}.fm-button--layout-dotted .fm-button__labels,.fm-button--layout-spaced .fm-button__labels{flex:auto;justify-content:space-between;align-items:center;min-width:0;display:flex}.fm-button__dot{background-color:#ffffff52;border-radius:50%;flex:none;width:4px;height:4px}.fm-button__spinner{--fm-button-spinner-size:18px;box-sizing:border-box;width:var(--fm-button-spinner-size);height:var(--fm-button-spinner-size);animation:fm-button-spin var(--fm-duration-slower,.6s) linear infinite;border:2px solid;border-top-color:#0000;border-radius:50%;flex:none}.fm-button--lg .fm-button__spinner{--fm-button-spinner-size:20px}.fm-button--md .fm-button__spinner{--fm-button-spinner-size:18px}.fm-button--sm .fm-button__spinner,.fm-button--xs .fm-button__spinner{--fm-button-spinner-size:16px}@keyframes fm-button-spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion:reduce){.fm-button__spinner{animation-duration:2s}}.fm-checkbox{--fm-checkbox-size:24px;--fm-checkbox-surface:var(--fm-action-secondary-bg);--fm-checkbox-border:var(--fm-border-default);--fm-checkbox-glyph:var(--fm-icon-inverse);--fm-checkbox-glow:0 0 #0000;cursor:pointer;color:var(--fm-text-primary);align-items:center;gap:12px;display:inline-flex}.fm-checkbox--disabled{cursor:not-allowed}.fm-checkbox__box{box-sizing:border-box;width:var(--fm-checkbox-size);height:var(--fm-checkbox-size);border-radius:var(--fm-radius-sm);background-color:var(--fm-checkbox-surface);box-shadow:inset 0 0 0 var(--fm-border-width-thin) var(--fm-checkbox-border), var(--fm-shadow-xs);flex:none;justify-content:center;align-items:center;display:inline-flex;position:relative}.fm-checkbox__input{opacity:0;cursor:inherit;margin:0;position:absolute;inset:0}.fm-checkbox__glyph{--fm-icon-size:calc(var(--fm-checkbox-size) * 5 / 6);color:var(--fm-checkbox-glyph);pointer-events:none;position:relative}.fm-checkbox__labels{gap:var(--fm-spacing-4);flex-direction:column;min-width:0;display:inline-flex}.fm-checkbox__sublabel{color:var(--fm-text-secondary)}.fm-checkbox--sm{--fm-checkbox-size:24px}.fm-checkbox--md{--fm-checkbox-size:28px}.fm-checkbox--lg{--fm-checkbox-size:32px}@media (width>=1024px){.fm-checkbox--sm{--fm-checkbox-size:20px}.fm-checkbox--md{--fm-checkbox-size:24px}.fm-checkbox--lg{--fm-checkbox-size:28px}}.fm-checkbox:hover:not(.fm-checkbox--disabled):not(.fm-checkbox--selected){--fm-checkbox-border:var(--fm-border-medium)}.fm-checkbox--pressed:not(.fm-checkbox--disabled):not(.fm-checkbox--selected){--fm-checkbox-border:var(--fm-border-strong)}.fm-checkbox--error:not(.fm-checkbox--disabled){--fm-checkbox-surface:var(--fm-action-danger-bg-subtle);--fm-checkbox-border:var(--fm-border-error);--fm-checkbox-glyph:var(--fm-icon-error)}.fm-checkbox--error.fm-checkbox--pressed:not(.fm-checkbox--selected):not(.fm-checkbox--disabled){--fm-checkbox-glow:var(--fm-outer-shadow-error)}.fm-checkbox--selected:not(.fm-checkbox--disabled){--fm-checkbox-surface:var(--fm-action-primary-bg);--fm-checkbox-border:transparent;--fm-checkbox-glyph:var(--fm-icon-inverse)}.fm-checkbox--selected.fm-checkbox--pressed:not(.fm-checkbox--disabled){--fm-checkbox-surface:var(--fm-action-primary-bg-hover)}.fm-checkbox--selected.fm-checkbox--error:not(.fm-checkbox--disabled){--fm-checkbox-surface:var(--fm-action-danger-bg-subtle);--fm-checkbox-glyph:var(--fm-icon-error)}.fm-checkbox--selected.fm-checkbox--error.fm-checkbox--pressed:not(.fm-checkbox--disabled){--fm-checkbox-surface:var(--fm-action-danger-bg-hover);--fm-checkbox-glyph:var(--fm-icon-inverse)}.fm-checkbox:has(.fm-checkbox__input:focus-visible):not(.fm-checkbox--disabled){--fm-checkbox-surface:var(--fm-action-secondary-bg);--fm-checkbox-border:var(--fm-border-brand);--fm-checkbox-glyph:var(--fm-action-primary-bg);--fm-checkbox-glow:var(--fm-outer-shadow-brand)}.fm-checkbox--error:has(.fm-checkbox__input:focus-visible):not(.fm-checkbox--disabled){--fm-checkbox-surface:var(--fm-action-danger-bg-subtle);--fm-checkbox-border:var(--fm-border-error);--fm-checkbox-glyph:var(--fm-icon-error);--fm-checkbox-glow:var(--fm-outer-shadow-error)}.fm-checkbox--disabled{--fm-checkbox-surface:var(--fm-action-disabled-bg);--fm-checkbox-border:var(--fm-border-default);--fm-checkbox-glyph:var(--fm-icon-disabled)}.fm-checkbox--error.fm-checkbox--pressed:not(.fm-checkbox--selected) .fm-checkbox__box{box-shadow:inset 0 0 0 var(--fm-border-width-thin) var(--fm-checkbox-border), var(--fm-checkbox-glow)}.fm-checkbox:has(.fm-checkbox__input:focus-visible) .fm-checkbox__box{box-shadow:inset 0 0 0 var(--fm-border-width-thin) var(--fm-checkbox-border), var(--fm-checkbox-glow)}.fm-chip{--fm-chip-height:36px;--fm-chip-surface:var(--fm-surface-default);--fm-chip-overlay:transparent;--fm-chip-border:var(--fm-border-default);--fm-chip-border-width:var(--fm-border-width-thin);--fm-chip-fg:var(--fm-text-primary);--fm-chip-icon:var(--fm-icon-primary);--fm-chip-accent:var(--fm-icon-brand);--fm-chip-glow:0 0 #0000;justify-content:center;align-items:center;gap:var(--fm-spacing-4);box-sizing:border-box;height:var(--fm-chip-height);padding:0 var(--fm-spacing-12);border-radius:var(--fm-radius-sm);background-color:var(--fm-chip-surface);background-image:linear-gradient(var(--fm-chip-overlay), var(--fm-chip-overlay));color:var(--fm-chip-fg);cursor:pointer;box-shadow:inset 0 0 0 var(--fm-chip-border-width) var(--fm-chip-border), var(--fm-shadow-xs);border:none;display:inline-flex}.fm-chip:disabled{cursor:not-allowed}.fm-chip__label{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.fm-chip__icon{--fm-icon-size:var(--fm-spacing-20);color:var(--fm-chip-icon);flex:none;display:inline-flex}.fm-chip__indicator-slot{width:var(--fm-spacing-20);height:var(--fm-spacing-20);flex:none;justify-content:center;align-items:center;display:inline-flex}.fm-chip__indicator{width:var(--fm-spacing-12);height:var(--fm-spacing-12);border-radius:var(--fm-radius-full);background-color:var(--fm-chip-accent)}.fm-chip__count{box-sizing:border-box;min-width:var(--fm-spacing-20);height:var(--fm-spacing-20);padding:0 var(--fm-spacing-4);border-radius:var(--fm-radius-full);background-color:var(--fm-chip-accent);color:var(--fm-text-inverse);flex:none;justify-content:center;align-items:center;display:inline-flex}.fm-chip__remove{--fm-icon-size:var(--fm-spacing-16);color:var(--fm-chip-icon);cursor:pointer;flex:none;display:inline-flex}.fm-chip:hover:not(:disabled){--fm-chip-overlay:var(--fm-state-hover)}.fm-chip--pressed:not(:disabled){--fm-chip-overlay:var(--fm-state-pressed)}.fm-chip:hover:not(:disabled):not(.fm-chip--selected),.fm-chip--pressed:not(:disabled):not(.fm-chip--selected){--fm-chip-border:var(--fm-border-medium)}.fm-chip--selected:not(:disabled){--fm-chip-border:var(--fm-border-brand);--fm-chip-border-width:var(--fm-border-width-regular)}.fm-chip:disabled{--fm-chip-surface:var(--fm-surface-sunken);--fm-chip-overlay:transparent;--fm-chip-border:var(--fm-border-medium);--fm-chip-fg:var(--fm-text-disabled);--fm-chip-icon:var(--fm-icon-disabled);--fm-chip-accent:var(--fm-border-medium)}.fm-chip:focus-visible{--fm-chip-border:var(--fm-border-brand);--fm-chip-border-width:var(--fm-border-width-regular);--fm-chip-glow:var(--fm-outer-shadow-brand);box-shadow:inset 0 0 0 var(--fm-chip-border-width) var(--fm-chip-border), var(--fm-chip-glow);outline:none}.fm-chip--compact{--fm-chip-height:22px;padding:0 var(--fm-spacing-8)}.fm-chip--v1-plain{--fm-chip-surface:var(--fm-bg-subtle);--fm-chip-border:transparent}.fm-chip--v1-plain.fm-chip--v1-selected{--fm-chip-surface:var(--fm-text-primary);--fm-chip-fg:var(--fm-text-inverse);--fm-chip-icon:var(--fm-text-inverse)}.fm-chip--v1-neutral{--fm-chip-surface:var(--fm-text-primary);--fm-chip-fg:var(--fm-text-inverse);--fm-chip-icon:var(--fm-text-inverse);--fm-chip-border:transparent}.fm-chip--v1-info{--fm-chip-surface:var(--fm-feature-aqua-accent);--fm-chip-fg:var(--fm-text-inverse);--fm-chip-icon:var(--fm-text-inverse);--fm-chip-border:transparent}.fm-chip--v1-success{--fm-chip-surface:var(--fm-feature-lime-accent);--fm-chip-fg:var(--fm-text-inverse);--fm-chip-icon:var(--fm-text-inverse);--fm-chip-border:transparent}.fm-chip--v1-critical{--fm-chip-surface:var(--fm-feature-berry-accent);--fm-chip-fg:var(--fm-text-inverse);--fm-chip-icon:var(--fm-text-inverse);--fm-chip-border:transparent}.fm-chip--v1-warning{--fm-chip-surface:var(--fm-feature-mustard-accent);--fm-chip-fg:var(--fm-text-primary);--fm-chip-icon:var(--fm-text-primary);--fm-chip-border:transparent}.fm-radio{--fm-radio-size:24px;--fm-radio-ring-width:var(--fm-border-width-thin);--fm-radio-surface:var(--fm-action-secondary-bg);--fm-radio-ring:var(--fm-border-default);--fm-radio-dot:var(--fm-action-primary-bg);--fm-radio-glow:0 0 #0000;align-items:center;gap:var(--fm-spacing-16);cursor:pointer;color:var(--fm-text-primary);display:inline-flex}.fm-radio--disabled{cursor:not-allowed}.fm-radio__circle{box-sizing:border-box;width:var(--fm-radio-size);height:var(--fm-radio-size);border-radius:var(--fm-radius-full);background-color:var(--fm-radio-surface);box-shadow:inset 0 0 0 var(--fm-radio-ring-width) var(--fm-radio-ring), var(--fm-shadow-xs);flex:none;justify-content:center;align-items:center;display:inline-flex;position:relative}.fm-radio__input{opacity:0;cursor:inherit;margin:0;position:absolute;inset:0}.fm-radio__dot{width:calc(var(--fm-radio-size) * 10 / 24);height:calc(var(--fm-radio-size) * 10 / 24);border-radius:var(--fm-radius-full);background-color:var(--fm-radio-dot);pointer-events:none}.fm-radio__labels{gap:var(--fm-spacing-4);flex-direction:column;min-width:0;display:inline-flex}.fm-radio__sublabel{color:var(--fm-text-secondary)}.fm-radio--sm{--fm-radio-size:24px;--fm-radio-selected-ring:1px}.fm-radio--md{--fm-radio-size:28px;--fm-radio-selected-ring:1.5px}.fm-radio--lg{--fm-radio-size:32px;--fm-radio-selected-ring:2.5px}@media (width>=1024px){.fm-radio--sm{--fm-radio-size:20px;--fm-radio-selected-ring:1px}.fm-radio--md{--fm-radio-size:24px;--fm-radio-selected-ring:1px}.fm-radio--lg{--fm-radio-size:28px;--fm-radio-selected-ring:1.5px}}.fm-radio--selected:not(.fm-radio--disabled){--fm-radio-ring:var(--fm-border-brand);--fm-radio-ring-width:var(--fm-radio-selected-ring)}.fm-radio:hover:not(.fm-radio--disabled):not(.fm-radio--selected){--fm-radio-ring:var(--fm-border-medium)}.fm-radio--pressed:not(.fm-radio--disabled):not(.fm-radio--selected){--fm-radio-ring:var(--fm-border-strong)}.fm-radio--selected.fm-radio--pressed:not(.fm-radio--disabled){--fm-radio-surface:var(--fm-action-primary-bg-hover);--fm-radio-ring:transparent;--fm-radio-dot:#fff9}.fm-radio--error:not(.fm-radio--disabled){--fm-radio-surface:var(--fm-action-danger-bg-subtle);--fm-radio-ring:var(--fm-border-error);--fm-radio-dot:var(--fm-border-error)}.fm-radio--error.fm-radio--selected.fm-radio--pressed:not(.fm-radio--disabled){--fm-radio-surface:var(--fm-action-danger-bg-hover);--fm-radio-ring:transparent;--fm-radio-dot:#fff9}.fm-radio:has(.fm-radio__input:focus-visible):not(.fm-radio--disabled){--fm-radio-surface:var(--fm-action-secondary-bg);--fm-radio-ring:var(--fm-border-brand);--fm-radio-glow:var(--fm-outer-shadow-brand)}.fm-radio--error:has(.fm-radio__input:focus-visible):not(.fm-radio--disabled){--fm-radio-surface:var(--fm-action-danger-bg-subtle);--fm-radio-ring:var(--fm-border-error);--fm-radio-glow:var(--fm-outer-shadow-error)}.fm-radio--disabled{--fm-radio-surface:var(--fm-action-disabled-bg);--fm-radio-ring:transparent;--fm-radio-dot:var(--fm-icon-disabled)}.fm-radio:has(.fm-radio__input:focus-visible) .fm-radio__circle{box-shadow:inset 0 0 0 var(--fm-radio-ring-width) var(--fm-radio-ring), var(--fm-radio-glow)}.fm-radio-group{gap:var(--fm-spacing-8);flex-direction:column;display:flex}.fm-radio-group__label{color:var(--fm-text-primary)}.fm-radio-group__items{gap:var(--fm-spacing-8);flex-direction:column;display:flex}.fm-radio-group--inline>.fm-radio-group__items{align-items:center;gap:var(--fm-spacing-16);flex-direction:row}.fm-search-bar{--fm-search-height:44px;--fm-search-surface:var(--fm-surface-raised);--fm-search-border:var(--fm-border-default);--fm-search-fg:var(--fm-text-primary);--fm-search-placeholder:var(--fm-text-muted);--fm-search-icon:var(--fm-icon-primary);--fm-search-glow:0 0 #0000;--fm-search-shadow:var(--fm-shadow-text-sm);align-items:center;gap:var(--fm-spacing-12);box-sizing:border-box;width:100%;height:var(--fm-search-height);padding:0 var(--fm-spacing-8);border-radius:var(--fm-radius-md);background-color:var(--fm-search-surface);box-shadow:inset 0 0 0 var(--fm-border-width-thin) var(--fm-search-border), var(--fm-search-shadow), var(--fm-search-glow);display:flex}.fm-search-bar__leading{--fm-icon-size:var(--fm-spacing-16);color:var(--fm-search-icon);flex:none;align-items:center;display:inline-flex}.fm-search-bar__control{min-width:0;height:20px;color:var(--fm-search-fg);appearance:none;background:0 0;border:none;outline:none;flex:auto;margin:0;padding:0}.fm-search-bar__control::placeholder{color:var(--fm-search-placeholder);opacity:1}.fm-search-bar__control::-webkit-search-cancel-button{appearance:none;display:none}.fm-search-bar__control::-webkit-search-decoration{appearance:none;display:none}.fm-search-bar__clear{--fm-icon-size:var(--fm-spacing-20);width:var(--fm-spacing-20);height:var(--fm-spacing-20);color:var(--fm-icon-muted);cursor:pointer;background:0 0;border:none;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex}.fm-search-bar--sm{--fm-search-height:40px}.fm-search-bar--md{--fm-search-height:44px}.fm-search-bar--lg{--fm-search-height:52px}@media (width>=768px){.fm-search-bar--sm{--fm-search-height:36px}.fm-search-bar--md{--fm-search-height:40px}.fm-search-bar--lg{--fm-search-height:48px}}@media (width>=1024px){.fm-search-bar--sm{--fm-search-height:32px}.fm-search-bar--md{--fm-search-height:36px}.fm-search-bar--lg{--fm-search-height:44px}}.fm-search-bar:not(.fm-search-bar--disabled):hover{--fm-search-border:var(--fm-border-medium)}.fm-search-bar:not(.fm-search-bar--disabled):focus-within{--fm-search-border:var(--fm-border-brand);--fm-search-shadow:0 0 #0000;--fm-search-glow:var(--fm-outer-shadow-brand)}.fm-search-bar--error,.fm-search-bar--error:hover,.fm-search-bar--error:focus-within{--fm-search-border:var(--fm-border-error);--fm-search-fg:var(--fm-text-error);--fm-search-placeholder:var(--fm-text-error);--fm-search-icon:var(--fm-icon-error);--fm-search-shadow:0 0 #0000;--fm-search-glow:var(--fm-outer-shadow-error)}.fm-search-bar--disabled{--fm-search-surface:var(--fm-surface-sunken);--fm-search-border:var(--fm-border-default);--fm-search-fg:var(--fm-text-disabled);--fm-search-placeholder:var(--fm-text-disabled);--fm-search-icon:var(--fm-icon-disabled);--fm-search-shadow:0 0 #0000}.fm-search-bar--disabled .fm-search-bar__control{cursor:not-allowed}.fm-switch{--fm-switch-track-w:52px;--fm-switch-track-h:28px;--fm-switch-inset:2px;--fm-switch-thumb:calc(var(--fm-switch-track-h) - var(--fm-switch-inset) * 2);--fm-switch-travel:calc(var(--fm-switch-track-w) - var(--fm-switch-thumb) - var(--fm-switch-inset) * 2);--fm-switch-surface:var(--fm-action-disabled-bg);--fm-switch-thumb-color:var(--fm-border-medium);--fm-switch-icon:var(--fm-action-disabled-fg);--fm-switch-glow:0 0 #0000;align-items:center;gap:var(--fm-spacing-8);cursor:pointer;color:var(--fm-text-primary);display:inline-flex}.fm-switch--label-right{flex-direction:row-reverse}.fm-switch--disabled{cursor:not-allowed;opacity:.32}.fm-switch__track{box-sizing:border-box;width:var(--fm-switch-track-w);height:var(--fm-switch-track-h);border-radius:var(--fm-radius-full);background-color:var(--fm-switch-surface);box-shadow:var(--fm-shadow-sm);flex:none;display:inline-block;position:relative}.fm-switch__input{opacity:0;cursor:inherit;margin:0;position:absolute;inset:0}.fm-switch__thumb{top:var(--fm-switch-inset);left:var(--fm-switch-inset);width:var(--fm-switch-thumb);height:var(--fm-switch-thumb);border-radius:var(--fm-radius-full);background-color:var(--fm-switch-thumb-color);box-shadow:var(--fm-shadow-sm);transition:transform var(--fm-duration-fast,.15s) ease-in-out;pointer-events:none;justify-content:center;align-items:center;display:flex;position:absolute}.fm-switch__thumb-icon{--fm-icon-size:max(8px, calc(var(--fm-switch-thumb) - 8px));color:var(--fm-switch-icon)}.fm-switch__labels{gap:var(--fm-spacing-4);flex-direction:column;min-width:0;display:inline-flex}.fm-switch__sublabel{color:var(--fm-text-secondary)}.fm-switch--sm{--fm-switch-track-w:40px;--fm-switch-track-h:22px}.fm-switch--md{--fm-switch-track-w:52px;--fm-switch-track-h:28px}.fm-switch--lg{--fm-switch-track-w:60px;--fm-switch-track-h:32px}@media (width>=768px){.fm-switch--sm{--fm-switch-track-w:44px;--fm-switch-track-h:24px}}@media (width>=1024px){.fm-switch--sm{--fm-switch-track-w:32px;--fm-switch-track-h:18px}.fm-switch--md{--fm-switch-track-w:44px;--fm-switch-track-h:24px}.fm-switch--lg{--fm-switch-track-w:52px;--fm-switch-track-h:28px}}.fm-switch--on{--fm-switch-surface:var(--fm-action-primary-bg);--fm-switch-thumb-color:var(--fm-surface-raised);--fm-switch-icon:var(--fm-action-primary-bg)}.fm-switch--on .fm-switch__thumb{transform:translateX(var(--fm-switch-travel))}.fm-switch--on.fm-switch--pressed{--fm-switch-surface:var(--fm-action-primary-bg-hover)}.fm-switch--pressed:not(.fm-switch--on){--fm-switch-surface:var(--fm-action-disabled-fg)}.fm-switch:not(.fm-switch--on):has(.fm-switch__thumb-icon){--fm-switch-thumb-color:var(--fm-surface-raised)}.fm-switch:has(.fm-switch__input:focus-visible):not(.fm-switch--disabled){--fm-switch-glow:var(--fm-outer-shadow-brand)}.fm-switch:has(.fm-switch__input:focus-visible) .fm-switch__track{box-shadow:var(--fm-switch-glow)}.fm-field{--fm-field-pad-x:var(--fm-spacing-8);--fm-field-pad-y:var(--fm-spacing-12);--fm-field-radius:var(--fm-radius-md);--fm-field-surface:var(--fm-surface-raised);--fm-field-border:var(--fm-border-default);--fm-field-fg:var(--fm-text-primary);--fm-field-placeholder:var(--fm-text-muted);--fm-field-affix:var(--fm-icon-secondary);--fm-field-label:var(--fm-text-primary);--fm-field-helper:var(--fm-text-secondary);--fm-field-glow:0 0 #0000;--fm-field-shadow:var(--fm-shadow-xs);gap:var(--fm-spacing-4);flex-direction:column;width:100%;display:flex}.fm-field__label{align-items:baseline;gap:var(--fm-spacing-4);color:var(--fm-field-label);display:flex}.fm-field__mark{color:var(--fm-text-error)}.fm-field__box{align-items:center;gap:var(--fm-spacing-4);box-sizing:border-box;width:100%;padding:var(--fm-field-pad-y) var(--fm-field-pad-x);border-radius:var(--fm-field-radius);background-color:var(--fm-field-surface);box-shadow:inset 0 0 0 var(--fm-border-width-thin) var(--fm-field-border), var(--fm-field-shadow), var(--fm-field-glow);display:flex}.fm-field__control{min-width:0;height:20px;color:var(--fm-field-fg);background:0 0;border:none;outline:none;flex:auto;margin:0;padding:0}.fm-field__control::placeholder{color:var(--fm-field-placeholder);opacity:1}.fm-field__affix{--fm-icon-size:var(--fm-spacing-20);color:var(--fm-field-affix);flex:none;align-items:center;display:inline-flex}.fm-field__footer{justify-content:space-between;gap:var(--fm-spacing-8);color:var(--fm-field-helper);display:flex}.fm-field__counter{margin-left:auto}.fm-field--single.fm-field--sm{--fm-field-pad-y:var(--fm-spacing-10)}.fm-field--single.fm-field--md{--fm-field-pad-y:var(--fm-spacing-12)}.fm-field--single.fm-field--lg{--fm-field-pad-y:var(--fm-spacing-16);--fm-field-radius:var(--fm-radius-lg)}.fm-field--multiline{--fm-field-pad-x:var(--fm-spacing-8);--fm-field-pad-y:var(--fm-spacing-8);--fm-field-radius:var(--fm-radius-md);--fm-field-height:128px}.fm-field--multiline>.fm-field__box{height:var(--fm-field-height);align-items:stretch}.fm-field--multiline .fm-field__control{resize:none;height:100%}.fm-field--multiline .fm-field__box{align-items:stretch}.fm-field--multiline.fm-field--sm{--fm-field-height:96px}.fm-field--multiline.fm-field--md{--fm-field-height:128px}.fm-field--multiline.fm-field--lg{--fm-field-height:160px}@media (width>=768px){.fm-field--multiline.fm-field--sm{--fm-field-height:128px}.fm-field--multiline.fm-field--md{--fm-field-height:160px}.fm-field--multiline.fm-field--lg{--fm-field-height:192px}}@media (width>=1024px){.fm-field--multiline.fm-field--sm{--fm-field-height:164px}.fm-field--multiline.fm-field--md{--fm-field-height:196px}.fm-field--multiline.fm-field--lg{--fm-field-height:228px}}.fm-field:not(.fm-field--disabled)>.fm-field__box:hover{--fm-field-border:var(--fm-border-medium)}.fm-field:not(.fm-field--disabled)>.fm-field__box:focus-within{--fm-field-border:var(--fm-border-brand);--fm-field-shadow:0 0 #0000;--fm-field-glow:var(--fm-outer-shadow-brand)}.fm-field--error:not(.fm-field--disabled){--fm-field-fg:var(--fm-text-error);--fm-field-placeholder:var(--fm-text-error);--fm-field-affix:var(--fm-text-error);--fm-field-label:var(--fm-text-error);--fm-field-helper:var(--fm-text-error)}.fm-field--error:not(.fm-field--disabled)>.fm-field__box,.fm-field--error:not(.fm-field--disabled)>.fm-field__box:hover,.fm-field--error:not(.fm-field--disabled)>.fm-field__box:focus-within{--fm-field-border:var(--fm-border-error);--fm-field-shadow:0 0 #0000;--fm-field-glow:var(--fm-outer-shadow-error)}.fm-field--multiline.fm-field--error:not(.fm-field--disabled)>.fm-field__box,.fm-field--multiline.fm-field--error:not(.fm-field--disabled)>.fm-field__box:hover,.fm-field--multiline.fm-field--error:not(.fm-field--disabled)>.fm-field__box:focus-within{--fm-field-border:var(--fm-border-warning)}.fm-field--disabled{--fm-field-surface:var(--fm-surface-sunken);--fm-field-border:var(--fm-border-default);--fm-field-fg:var(--fm-text-disabled);--fm-field-placeholder:var(--fm-text-disabled);--fm-field-affix:var(--fm-icon-disabled);--fm-field-label:var(--fm-text-disabled);--fm-field-helper:var(--fm-text-disabled)}.fm-field--disabled .fm-field__control{cursor:not-allowed}
|
|
304
304
|
/*$vite$:1*/`, Ot = /url\(\s*(['"]?)\s*([^)'"]*?)\s*\1\s*\)/gi, dn = /@font-face\s*\{[^}]*\}/gi;
|
|
305
|
-
function zt(
|
|
306
|
-
return /^(data:|blob:|#)/i.test(
|
|
305
|
+
function zt(e) {
|
|
306
|
+
return /^(data:|blob:|#)/i.test(e);
|
|
307
307
|
}
|
|
308
|
-
function cn(
|
|
309
|
-
for (const
|
|
310
|
-
if (!zt(
|
|
308
|
+
function cn(e) {
|
|
309
|
+
for (const t of e.matchAll(Ot))
|
|
310
|
+
if (!zt(t[2])) return !0;
|
|
311
311
|
return !1;
|
|
312
312
|
}
|
|
313
|
-
function mn(
|
|
313
|
+
function mn(e) {
|
|
314
314
|
var n;
|
|
315
|
-
return `@font-face ${((n = /font-family\s*:\s*([^;}]+)/i.exec(
|
|
315
|
+
return `@font-face ${((n = /font-family\s*:\s*([^;}]+)/i.exec(e)) == null ? void 0 : n[1].trim()) || "(unnamed)"}`;
|
|
316
316
|
}
|
|
317
|
-
function un(
|
|
318
|
-
const
|
|
319
|
-
let n =
|
|
320
|
-
return n = n.replace(Ot, (
|
|
317
|
+
function un(e) {
|
|
318
|
+
const t = [];
|
|
319
|
+
let n = e.replace(dn, (r) => cn(r) ? (t.push(mn(r)), "") : r);
|
|
320
|
+
return n = n.replace(Ot, (r, a, i) => zt(i) ? r : (t.push(`url(${i})`), "url(about:invalid)")), { css: n, stripped: t };
|
|
321
321
|
}
|
|
322
322
|
const We = "/* __FM_UI_LIBRARY_V2_STYLES__ */", pn = [
|
|
323
323
|
"--fm-text-primary",
|
|
@@ -325,16 +325,16 @@ const We = "/* __FM_UI_LIBRARY_V2_STYLES__ */", pn = [
|
|
|
325
325
|
"--fm-border-default",
|
|
326
326
|
"--fm-action-primary-bg"
|
|
327
327
|
];
|
|
328
|
-
function hn(
|
|
329
|
-
if (!
|
|
328
|
+
function hn(e, t) {
|
|
329
|
+
if (!e.includes(We))
|
|
330
330
|
throw new Error("report canvas frame is missing the UI library style placeholder");
|
|
331
|
-
const { css: n, stripped:
|
|
331
|
+
const { css: n, stripped: r } = un(t), a = pn.filter((v) => !n.includes(v));
|
|
332
332
|
if (a.length)
|
|
333
333
|
throw new Error(`the UI library stylesheet defines none of ${a.join(", ")}`);
|
|
334
|
-
const i =
|
|
334
|
+
const i = e.replace(We, () => n);
|
|
335
335
|
if (i.includes(We))
|
|
336
336
|
throw new Error("the frame declares the UI library style placeholder more than once");
|
|
337
|
-
return { html: i, stripped:
|
|
337
|
+
return { html: i, stripped: r };
|
|
338
338
|
}
|
|
339
339
|
const gn = `<meta charset="utf-8" />
|
|
340
340
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
@@ -3203,144 +3203,144 @@ const gn = `<meta charset="utf-8" />
|
|
|
3203
3203
|
})()
|
|
3204
3204
|
<\/script>
|
|
3205
3205
|
`, oo = hn(gn, fn).html, ct = 8e3;
|
|
3206
|
-
function mt(
|
|
3207
|
-
const
|
|
3208
|
-
if (!
|
|
3206
|
+
function mt(e) {
|
|
3207
|
+
const t = e;
|
|
3208
|
+
if (!t || typeof t != "object") return;
|
|
3209
3209
|
const n = (a) => Number.isSafeInteger(a) && a >= 0 && a <= 1e4;
|
|
3210
|
-
if (!n(
|
|
3211
|
-
const
|
|
3210
|
+
if (!n(t.datasetIndex) || !n(t.index)) return;
|
|
3211
|
+
const r = t.value;
|
|
3212
3212
|
return {
|
|
3213
|
-
datasetIndex:
|
|
3214
|
-
index:
|
|
3215
|
-
...typeof
|
|
3216
|
-
...typeof
|
|
3217
|
-
...
|
|
3213
|
+
datasetIndex: t.datasetIndex,
|
|
3214
|
+
index: t.index,
|
|
3215
|
+
...typeof t.label == "string" ? { label: t.label.slice(0, 120) } : {},
|
|
3216
|
+
...typeof t.series == "string" ? { series: t.series.slice(0, 120) } : {},
|
|
3217
|
+
...r === null || typeof r == "number" && Number.isFinite(r) ? { value: r } : typeof r == "string" ? { value: r.slice(0, 64) } : {}
|
|
3218
3218
|
};
|
|
3219
3219
|
}
|
|
3220
|
-
function Nt(
|
|
3221
|
-
const
|
|
3222
|
-
if (!
|
|
3223
|
-
const n = Array.isArray(
|
|
3220
|
+
function Nt(e) {
|
|
3221
|
+
const t = e;
|
|
3222
|
+
if (!t || typeof t != "object" || typeof t.tag != "string") return;
|
|
3223
|
+
const n = Array.isArray(t.path) ? t.path.filter((i) => Number.isSafeInteger(i) && i >= 0).slice(0, 32) : [], r = mt(t.datum), a = Array.isArray(t.points) ? t.points.slice(0, 64).map(mt).filter((i) => !!i) : [];
|
|
3224
3224
|
return {
|
|
3225
|
-
tag:
|
|
3226
|
-
...typeof
|
|
3225
|
+
tag: t.tag.slice(0, 32),
|
|
3226
|
+
...typeof t.part == "string" ? { part: t.part.slice(0, 128) } : {},
|
|
3227
3227
|
path: n,
|
|
3228
|
-
...typeof
|
|
3229
|
-
...typeof
|
|
3230
|
-
...
|
|
3228
|
+
...typeof t.text == "string" ? { text: t.text.slice(0, 300) } : {},
|
|
3229
|
+
...typeof t.snippet == "string" ? { snippet: t.snippet.slice(0, 600) } : {},
|
|
3230
|
+
...r ? { datum: r } : {},
|
|
3231
3231
|
...a.length ? { points: a } : {}
|
|
3232
3232
|
};
|
|
3233
3233
|
}
|
|
3234
|
-
function bn(
|
|
3235
|
-
const
|
|
3236
|
-
if (!
|
|
3237
|
-
const [n,
|
|
3238
|
-
return v(n) && v(
|
|
3234
|
+
function bn(e) {
|
|
3235
|
+
const t = e;
|
|
3236
|
+
if (!t || typeof t != "object") return;
|
|
3237
|
+
const [n, r, a, i] = [t.left, t.top, t.width, t.height], v = (k) => typeof k == "number" && Number.isFinite(k);
|
|
3238
|
+
return v(n) && v(r) && v(a) && v(i) && a > 0 && i > 0 ? { left: n, top: r, width: a, height: i } : void 0;
|
|
3239
3239
|
}
|
|
3240
|
-
function ut(
|
|
3241
|
-
if (typeof
|
|
3242
|
-
const
|
|
3240
|
+
function ut(e) {
|
|
3241
|
+
if (typeof e.sectionId != "string" || !Number.isSafeInteger(e.version)) return;
|
|
3242
|
+
const t = Nt(e.element), n = bn(e.area);
|
|
3243
3243
|
return {
|
|
3244
|
-
sectionId:
|
|
3245
|
-
version:
|
|
3246
|
-
label: String(
|
|
3247
|
-
elementText: String(
|
|
3248
|
-
elementTag: String(
|
|
3249
|
-
...
|
|
3244
|
+
sectionId: e.sectionId,
|
|
3245
|
+
version: e.version,
|
|
3246
|
+
label: String(e.label ?? "").slice(0, 120),
|
|
3247
|
+
elementText: String(e.elementText ?? "").slice(0, 300),
|
|
3248
|
+
elementTag: String(e.elementTag ?? "").slice(0, 32),
|
|
3249
|
+
...t ? { element: t } : {},
|
|
3250
3250
|
...n ? { area: n } : {}
|
|
3251
3251
|
};
|
|
3252
3252
|
}
|
|
3253
|
-
function io(
|
|
3254
|
-
const n =
|
|
3255
|
-
let
|
|
3253
|
+
function io(e, t) {
|
|
3254
|
+
const n = E(!1);
|
|
3255
|
+
let r = null;
|
|
3256
3256
|
const a = /* @__PURE__ */ new Map();
|
|
3257
3257
|
let i;
|
|
3258
3258
|
const v = /* @__PURE__ */ new Map();
|
|
3259
3259
|
function k() {
|
|
3260
|
-
var
|
|
3261
|
-
return ((
|
|
3260
|
+
var c;
|
|
3261
|
+
return ((c = e.value) == null ? void 0 : c.contentWindow) ?? null;
|
|
3262
3262
|
}
|
|
3263
|
-
function _(
|
|
3263
|
+
function _(c) {
|
|
3264
3264
|
var y;
|
|
3265
|
-
(y = k()) == null || y.postMessage(JSON.parse(JSON.stringify(
|
|
3265
|
+
(y = k()) == null || y.postMessage(JSON.parse(JSON.stringify(c)), "*");
|
|
3266
3266
|
}
|
|
3267
|
-
function u(
|
|
3268
|
-
var U, q, K,
|
|
3267
|
+
function u(c) {
|
|
3268
|
+
var U, q, K, ae;
|
|
3269
3269
|
const y = k();
|
|
3270
|
-
if (!y ||
|
|
3271
|
-
const g =
|
|
3270
|
+
if (!y || c.source !== y) return;
|
|
3271
|
+
const g = c.data;
|
|
3272
3272
|
if (!(!g || typeof g != "object"))
|
|
3273
3273
|
switch (g.type) {
|
|
3274
3274
|
case "ready":
|
|
3275
3275
|
if (n.value) return;
|
|
3276
|
-
i = g.nonce, n.value = !0,
|
|
3276
|
+
i = g.nonce, n.value = !0, r == null || r(), r = null, V();
|
|
3277
3277
|
break;
|
|
3278
3278
|
case "sectionSelected": {
|
|
3279
3279
|
if (!i || g.nonce !== i) return;
|
|
3280
|
-
const
|
|
3281
|
-
if (!
|
|
3282
|
-
const { area: te, ...xe } =
|
|
3283
|
-
(U =
|
|
3280
|
+
const re = ut(g);
|
|
3281
|
+
if (!re) return;
|
|
3282
|
+
const { area: te, ...xe } = re, ue = Array.isArray(g.widen) ? g.widen.slice(0, 4).map(Nt).filter((we) => !!we) : [];
|
|
3283
|
+
(U = t.onSelectSection) == null || U.call(t, xe, ue);
|
|
3284
3284
|
break;
|
|
3285
3285
|
}
|
|
3286
3286
|
case "areaSelected": {
|
|
3287
3287
|
if (!i || g.nonce !== i || !Array.isArray(g.picks)) return;
|
|
3288
|
-
const
|
|
3289
|
-
|
|
3288
|
+
const re = g.picks.slice(0, 64).map((te) => te && typeof te == "object" ? ut(te) : void 0).filter((te) => !!te);
|
|
3289
|
+
re.length && ((q = t.onSelectArea) == null || q.call(t, re));
|
|
3290
3290
|
break;
|
|
3291
3291
|
}
|
|
3292
3292
|
case "selectionCancelled":
|
|
3293
|
-
i && g.nonce === i && ((K =
|
|
3293
|
+
i && g.nonce === i && ((K = t.onCancelSelection) == null || K.call(t));
|
|
3294
3294
|
break;
|
|
3295
3295
|
case "setParams":
|
|
3296
|
-
|
|
3296
|
+
t.onSetParams(g.values ?? {}, g.intent);
|
|
3297
3297
|
break;
|
|
3298
3298
|
case "openLink":
|
|
3299
|
-
typeof g.href == "string" && ((
|
|
3299
|
+
typeof g.href == "string" && ((ae = t.onOpenLink) == null || ae.call(t, g.href));
|
|
3300
3300
|
break;
|
|
3301
3301
|
case "rendered":
|
|
3302
|
-
if (
|
|
3303
|
-
A(g.sectionId, g.version),
|
|
3302
|
+
if (!$(g)) return;
|
|
3303
|
+
A(g.sectionId, g.version), t.onSectionRendered(
|
|
3304
3304
|
g.sectionId,
|
|
3305
3305
|
g.version,
|
|
3306
3306
|
String(g.label ?? "").slice(0, 120)
|
|
3307
3307
|
);
|
|
3308
3308
|
break;
|
|
3309
3309
|
case "error":
|
|
3310
|
-
if (
|
|
3311
|
-
A(g.sectionId, g.version),
|
|
3310
|
+
if (!$(g)) return;
|
|
3311
|
+
A(g.sectionId, g.version), t.onSectionError(g.sectionId, g.version, g.message);
|
|
3312
3312
|
break;
|
|
3313
3313
|
case "layout":
|
|
3314
|
-
if (
|
|
3315
|
-
|
|
3314
|
+
if (!$(g)) return;
|
|
3315
|
+
t.onSectionLayout(
|
|
3316
3316
|
g.sectionId,
|
|
3317
3317
|
g.version,
|
|
3318
|
-
(Array.isArray(g.warnings) ? g.warnings : []).slice(0, 12).map((
|
|
3318
|
+
(Array.isArray(g.warnings) ? g.warnings : []).slice(0, 12).map((re) => String(re).slice(0, 200))
|
|
3319
3319
|
);
|
|
3320
3320
|
break;
|
|
3321
3321
|
}
|
|
3322
3322
|
}
|
|
3323
|
-
function
|
|
3324
|
-
return !i ||
|
|
3323
|
+
function $(c) {
|
|
3324
|
+
return !i || c.nonce === i ? !0 : (console.warn("[report-canvas] dropped a render outcome without the shell nonce"), !1);
|
|
3325
3325
|
}
|
|
3326
|
-
function
|
|
3327
|
-
return `${
|
|
3326
|
+
function N(c, y) {
|
|
3327
|
+
return `${c}@${y}`;
|
|
3328
3328
|
}
|
|
3329
|
-
function A(
|
|
3329
|
+
function A(c, y) {
|
|
3330
3330
|
if (y === void 0) return;
|
|
3331
|
-
const g =
|
|
3331
|
+
const g = N(c, y), U = v.get(g);
|
|
3332
3332
|
U !== void 0 && (clearTimeout(U), v.delete(g));
|
|
3333
3333
|
}
|
|
3334
|
-
function
|
|
3335
|
-
v.forEach((
|
|
3334
|
+
function R() {
|
|
3335
|
+
v.forEach((c) => clearTimeout(c)), v.clear();
|
|
3336
3336
|
}
|
|
3337
|
-
function
|
|
3338
|
-
for (const y of
|
|
3339
|
-
const g =
|
|
3337
|
+
function T(c) {
|
|
3338
|
+
for (const y of c) {
|
|
3339
|
+
const g = N(y.id, y.version);
|
|
3340
3340
|
v.has(g) || v.set(
|
|
3341
3341
|
g,
|
|
3342
3342
|
setTimeout(() => {
|
|
3343
|
-
v.delete(g),
|
|
3343
|
+
v.delete(g), t.onSectionError(
|
|
3344
3344
|
y.id,
|
|
3345
3345
|
y.version,
|
|
3346
3346
|
`the section did not report a render within ${ct}ms`
|
|
@@ -3349,77 +3349,77 @@ function io(t, e) {
|
|
|
3349
3349
|
);
|
|
3350
3350
|
}
|
|
3351
3351
|
}
|
|
3352
|
-
async function
|
|
3353
|
-
const U = await st(
|
|
3352
|
+
async function B(c, y, g) {
|
|
3353
|
+
const U = await st(c.flatMap((K) => K.libs ?? [])), q = () => {
|
|
3354
3354
|
_({
|
|
3355
3355
|
type: "init",
|
|
3356
|
-
sections:
|
|
3356
|
+
sections: c,
|
|
3357
3357
|
params: y.values,
|
|
3358
3358
|
paramDecls: y.decls,
|
|
3359
3359
|
intent: y.intent,
|
|
3360
3360
|
libs: U,
|
|
3361
3361
|
env: g
|
|
3362
|
-
}),
|
|
3362
|
+
}), R(), T(c);
|
|
3363
3363
|
};
|
|
3364
|
-
n.value ? q() :
|
|
3364
|
+
n.value ? q() : r = q;
|
|
3365
3365
|
}
|
|
3366
|
-
async function
|
|
3367
|
-
const y = await st(
|
|
3368
|
-
_({ type: "sections", sections:
|
|
3366
|
+
async function P(c) {
|
|
3367
|
+
const y = await st(c.flatMap((g) => g.libs ?? []));
|
|
3368
|
+
_({ type: "sections", sections: c, libs: y }), T(c);
|
|
3369
3369
|
}
|
|
3370
|
-
function
|
|
3370
|
+
function z(c) {
|
|
3371
3371
|
_({
|
|
3372
3372
|
type: "params",
|
|
3373
|
-
values:
|
|
3374
|
-
paramDecls:
|
|
3375
|
-
intent:
|
|
3373
|
+
values: c.values,
|
|
3374
|
+
paramDecls: c.decls,
|
|
3375
|
+
intent: c.intent
|
|
3376
3376
|
});
|
|
3377
3377
|
}
|
|
3378
|
-
function
|
|
3379
|
-
_({ type: "env", env:
|
|
3378
|
+
function M(c) {
|
|
3379
|
+
_({ type: "env", env: c });
|
|
3380
3380
|
}
|
|
3381
3381
|
function V() {
|
|
3382
|
-
const
|
|
3383
|
-
a.clear(),
|
|
3382
|
+
const c = [...a.values()];
|
|
3383
|
+
a.clear(), c.forEach(Y);
|
|
3384
3384
|
}
|
|
3385
|
-
function Y(
|
|
3385
|
+
function Y(c) {
|
|
3386
3386
|
_({
|
|
3387
3387
|
type: "rows",
|
|
3388
|
-
queryId:
|
|
3389
|
-
runId:
|
|
3390
|
-
rows:
|
|
3391
|
-
status:
|
|
3392
|
-
truncated:
|
|
3393
|
-
total:
|
|
3394
|
-
error:
|
|
3388
|
+
queryId: c.queryId,
|
|
3389
|
+
runId: c.runId,
|
|
3390
|
+
rows: c.rows,
|
|
3391
|
+
status: c.status,
|
|
3392
|
+
truncated: c.truncated,
|
|
3393
|
+
total: c.total,
|
|
3394
|
+
error: c.error
|
|
3395
3395
|
});
|
|
3396
3396
|
}
|
|
3397
|
-
function X(
|
|
3397
|
+
function X(c) {
|
|
3398
3398
|
if (!n.value) {
|
|
3399
|
-
a.set(
|
|
3399
|
+
a.set(c.queryId, c);
|
|
3400
3400
|
return;
|
|
3401
3401
|
}
|
|
3402
|
-
Y(
|
|
3402
|
+
Y(c);
|
|
3403
3403
|
}
|
|
3404
3404
|
Le(() => window.addEventListener("message", u)), Pe(() => {
|
|
3405
|
-
window.removeEventListener("message", u),
|
|
3405
|
+
window.removeEventListener("message", u), R();
|
|
3406
3406
|
});
|
|
3407
3407
|
function Z() {
|
|
3408
|
-
n.value = !1,
|
|
3408
|
+
n.value = !1, r = null, i = void 0, a.clear(), R();
|
|
3409
3409
|
}
|
|
3410
3410
|
return {
|
|
3411
3411
|
/** `multiple`: a click adds a part and picking goes on, and a drag draws an area. */
|
|
3412
|
-
setCommentMode: (
|
|
3412
|
+
setCommentMode: (c, y, g = !1) => _({
|
|
3413
3413
|
type: "commentMode",
|
|
3414
|
-
enabled:
|
|
3414
|
+
enabled: c,
|
|
3415
3415
|
multiple: g,
|
|
3416
3416
|
picks: (Array.isArray(y) ? y : y ? [y] : []).map((U) => {
|
|
3417
|
-
var q, K,
|
|
3417
|
+
var q, K, ae;
|
|
3418
3418
|
return {
|
|
3419
3419
|
sectionId: U.sectionId,
|
|
3420
3420
|
part: (q = U.element) == null ? void 0 : q.part,
|
|
3421
3421
|
path: ((K = U.element) == null ? void 0 : K.path) ?? [],
|
|
3422
|
-
datum: ((
|
|
3422
|
+
datum: ((ae = U.element) == null ? void 0 : ae.datum) && {
|
|
3423
3423
|
datasetIndex: U.element.datum.datasetIndex,
|
|
3424
3424
|
index: U.element.datum.index
|
|
3425
3425
|
},
|
|
@@ -3428,47 +3428,47 @@ function io(t, e) {
|
|
|
3428
3428
|
})
|
|
3429
3429
|
}),
|
|
3430
3430
|
ready: n,
|
|
3431
|
-
init:
|
|
3432
|
-
swapSections:
|
|
3433
|
-
pushParams:
|
|
3434
|
-
pushEnv:
|
|
3431
|
+
init: B,
|
|
3432
|
+
swapSections: P,
|
|
3433
|
+
pushParams: z,
|
|
3434
|
+
pushEnv: M,
|
|
3435
3435
|
pushRows: X,
|
|
3436
3436
|
reset: Z
|
|
3437
3437
|
};
|
|
3438
3438
|
}
|
|
3439
3439
|
const vn = /^(?:https?:\/\/|mailto:)[^\s]+$/i, Ge = /`([^`]+)`|(!?)\[([^\]]*)\]\(([^)\s]*)\)|\*\*([\s\S]+?)\*\*|\*([^*\n]+)\*/g;
|
|
3440
|
-
function Ye(
|
|
3441
|
-
if (!
|
|
3442
|
-
const n =
|
|
3443
|
-
(n == null ? void 0 : n.type) === "text" ? n.text +=
|
|
3440
|
+
function Ye(e, t) {
|
|
3441
|
+
if (!t) return;
|
|
3442
|
+
const n = e[e.length - 1];
|
|
3443
|
+
(n == null ? void 0 : n.type) === "text" ? n.text += t : e.push({ type: "text", text: t });
|
|
3444
3444
|
}
|
|
3445
|
-
function Xe(
|
|
3446
|
-
const
|
|
3445
|
+
function Xe(e) {
|
|
3446
|
+
const t = [];
|
|
3447
3447
|
let n = 0;
|
|
3448
3448
|
Ge.lastIndex = 0;
|
|
3449
|
-
for (let
|
|
3450
|
-
Ye(
|
|
3451
|
-
const [, a, i, v, k, _, u] =
|
|
3452
|
-
a !== void 0 ?
|
|
3449
|
+
for (let r = Ge.exec(e); r; r = Ge.exec(e)) {
|
|
3450
|
+
Ye(t, e.slice(n, r.index)), n = r.index + r[0].length;
|
|
3451
|
+
const [, a, i, v, k, _, u] = r;
|
|
3452
|
+
a !== void 0 ? t.push({ type: "code", text: a }) : v !== void 0 ? !i && vn.test(k) ? t.push({ type: "link", text: v || k, href: k }) : Ye(t, r[0]) : _ !== void 0 ? t.push({ type: "strong", text: _ }) : u !== void 0 && t.push({ type: "em", text: u });
|
|
3453
3453
|
}
|
|
3454
|
-
return Ye(
|
|
3454
|
+
return Ye(t, e.slice(n)), t;
|
|
3455
3455
|
}
|
|
3456
3456
|
const yn = /^\s*```/, xn = /^\s{0,3}(#{1,6})\s+(.*)$/, wn = /^\s*[-*+]\s+(.*)$/, kn = /^\s*\d{1,3}[.)]\s+(.*)$/;
|
|
3457
|
-
function pt(
|
|
3458
|
-
const
|
|
3459
|
-
let
|
|
3457
|
+
function pt(e) {
|
|
3458
|
+
const t = [], n = String(e ?? "").split(/\r?\n/);
|
|
3459
|
+
let r = [], a = null, i = null;
|
|
3460
3460
|
function v() {
|
|
3461
|
-
|
|
3461
|
+
r.length && (t.push({ type: "p", inline: Xe(r.join(" ")) }), r = []);
|
|
3462
3462
|
}
|
|
3463
3463
|
function k() {
|
|
3464
|
-
a && (
|
|
3464
|
+
a && (t.push({ type: "list", ordered: a.ordered, items: a.items }), a = null);
|
|
3465
3465
|
}
|
|
3466
3466
|
function _() {
|
|
3467
3467
|
v(), k();
|
|
3468
3468
|
}
|
|
3469
3469
|
for (const u of n) {
|
|
3470
3470
|
if (yn.test(u)) {
|
|
3471
|
-
i ? (
|
|
3471
|
+
i ? (t.push({ type: "pre", text: i.join(`
|
|
3472
3472
|
`) }), i = null) : (_(), i = []);
|
|
3473
3473
|
continue;
|
|
3474
3474
|
}
|
|
@@ -3476,26 +3476,26 @@ function pt(t) {
|
|
|
3476
3476
|
i.push(u);
|
|
3477
3477
|
continue;
|
|
3478
3478
|
}
|
|
3479
|
-
const
|
|
3479
|
+
const $ = xn.exec(u), N = wn.exec(u), A = kn.exec(u);
|
|
3480
3480
|
if (!u.trim())
|
|
3481
3481
|
_();
|
|
3482
|
-
else if (
|
|
3483
|
-
_(),
|
|
3484
|
-
else if (
|
|
3482
|
+
else if ($)
|
|
3483
|
+
_(), t.push({ type: "p", inline: Xe($[2]), heading: !0 });
|
|
3484
|
+
else if (N || A) {
|
|
3485
3485
|
v();
|
|
3486
|
-
const
|
|
3487
|
-
(!a || a.ordered !==
|
|
3486
|
+
const R = !N;
|
|
3487
|
+
(!a || a.ordered !== R) && (k(), a = { ordered: R, items: [] }), a.items.push(Xe((N ?? A)[1]));
|
|
3488
3488
|
} else
|
|
3489
|
-
k(),
|
|
3489
|
+
k(), r.push(u.trim());
|
|
3490
3490
|
}
|
|
3491
|
-
return i != null && i.length &&
|
|
3492
|
-
`) }), _(),
|
|
3491
|
+
return i != null && i.length && t.push({ type: "pre", text: i.join(`
|
|
3492
|
+
`) }), _(), t;
|
|
3493
3493
|
}
|
|
3494
|
-
function _n(
|
|
3495
|
-
const n = String(
|
|
3496
|
-
if (n.length <=
|
|
3497
|
-
const
|
|
3498
|
-
return `${(a >
|
|
3494
|
+
function _n(e, t) {
|
|
3495
|
+
const n = String(e ?? "").trim();
|
|
3496
|
+
if (n.length <= t) return n;
|
|
3497
|
+
const r = n.slice(0, t), a = r.lastIndexOf(" ");
|
|
3498
|
+
return `${(a > t * 0.6 ? r.slice(0, a) : r).trimEnd()}…`;
|
|
3499
3499
|
}
|
|
3500
3500
|
const ht = 600, je = [
|
|
3501
3501
|
"reviewing",
|
|
@@ -3553,102 +3553,102 @@ const ht = 600, je = [
|
|
|
3553
3553
|
"step",
|
|
3554
3554
|
"answer"
|
|
3555
3555
|
]);
|
|
3556
|
-
function Rt(
|
|
3557
|
-
return
|
|
3556
|
+
function Rt(e) {
|
|
3557
|
+
return e && In[e] || "working";
|
|
3558
3558
|
}
|
|
3559
|
-
function gt(
|
|
3560
|
-
const n = je.indexOf(
|
|
3561
|
-
return n < 0 ||
|
|
3559
|
+
function gt(e, t) {
|
|
3560
|
+
const n = je.indexOf(t);
|
|
3561
|
+
return n < 0 || e && je.indexOf(e) >= n ? e : t;
|
|
3562
3562
|
}
|
|
3563
|
-
function An(
|
|
3564
|
-
const
|
|
3565
|
-
return je.filter((n) =>
|
|
3563
|
+
function An(e) {
|
|
3564
|
+
const t = new Set(e.map(Rt));
|
|
3565
|
+
return je.filter((n) => t.has(n));
|
|
3566
3566
|
}
|
|
3567
|
-
function Mt(
|
|
3567
|
+
function Mt(e) {
|
|
3568
3568
|
var n;
|
|
3569
|
-
const
|
|
3570
|
-
for (const
|
|
3571
|
-
const a = (n =
|
|
3572
|
-
if (
|
|
3569
|
+
const t = [];
|
|
3570
|
+
for (const r of e) {
|
|
3571
|
+
const a = (n = r.data) == null ? void 0 : n.step;
|
|
3572
|
+
if (r.type !== "data-step" || typeof a != "string") continue;
|
|
3573
3573
|
const i = je.find((v) => v === a);
|
|
3574
|
-
i && !
|
|
3574
|
+
i && !t.includes(i) && t.push(i);
|
|
3575
3575
|
}
|
|
3576
|
-
return
|
|
3576
|
+
return t;
|
|
3577
3577
|
}
|
|
3578
|
-
function Cn(
|
|
3579
|
-
return
|
|
3578
|
+
function Cn(e) {
|
|
3579
|
+
return e ? e.steps.length ? e.steps : An(e.signals) : [];
|
|
3580
3580
|
}
|
|
3581
|
-
function En(
|
|
3582
|
-
return Mt((
|
|
3581
|
+
function En(e) {
|
|
3582
|
+
return Mt((e == null ? void 0 : e.parts) ?? []).pop() ?? null;
|
|
3583
3583
|
}
|
|
3584
|
-
function Ke(
|
|
3585
|
-
return
|
|
3584
|
+
function Ke(e) {
|
|
3585
|
+
return e.filter((t) => t.type === "text").map((t) => String(t.text ?? "").trim()).filter(Boolean).join(`
|
|
3586
3586
|
|
|
3587
3587
|
`);
|
|
3588
3588
|
}
|
|
3589
|
-
function Tn(
|
|
3590
|
-
const
|
|
3591
|
-
for (const n of
|
|
3592
|
-
const
|
|
3593
|
-
|
|
3589
|
+
function Tn(e) {
|
|
3590
|
+
const t = [];
|
|
3591
|
+
for (const n of e) {
|
|
3592
|
+
const r = n.type.startsWith("tool-") || n.type.startsWith("data-") ? n.type.slice(5) : "";
|
|
3593
|
+
r && !Sn.has(r) && t.push(r);
|
|
3594
3594
|
}
|
|
3595
|
-
return
|
|
3595
|
+
return t;
|
|
3596
3596
|
}
|
|
3597
|
-
function On(
|
|
3598
|
-
var
|
|
3599
|
-
const
|
|
3597
|
+
function On(e) {
|
|
3598
|
+
var r;
|
|
3599
|
+
const t = e.find((a) => a.type === "data-turn_stats"), n = (r = t == null ? void 0 : t.data) == null ? void 0 : r.ms;
|
|
3600
3600
|
return typeof n == "number" && n >= 0 ? n : void 0;
|
|
3601
3601
|
}
|
|
3602
|
-
function zn(
|
|
3603
|
-
const
|
|
3604
|
-
return
|
|
3602
|
+
function zn(e) {
|
|
3603
|
+
const t = Math.max(0, Math.floor(e / 1e3));
|
|
3604
|
+
return t < 60 ? `${t}s` : `${Math.floor(t / 60)}m ${String(t % 60).padStart(2, "0")}s`;
|
|
3605
3605
|
}
|
|
3606
|
-
function Nn(
|
|
3607
|
-
const
|
|
3608
|
-
return
|
|
3606
|
+
function Nn(e) {
|
|
3607
|
+
const t = e / 1e3;
|
|
3608
|
+
return t < 60 ? `${t.toFixed(1)}s` : `${Math.floor(t / 60)}m ${String(Math.round(t % 60)).padStart(2, "0")}s`;
|
|
3609
3609
|
}
|
|
3610
|
-
function Rn(
|
|
3611
|
-
return
|
|
3610
|
+
function Rn(e) {
|
|
3611
|
+
return e === "too_costly" || e === "timeout" ? "tooLarge" : e === "deadline" ? "outOfTime" : "ours";
|
|
3612
3612
|
}
|
|
3613
|
-
function Mn(
|
|
3613
|
+
function Mn(e) {
|
|
3614
3614
|
var n;
|
|
3615
|
-
const
|
|
3616
|
-
if (
|
|
3615
|
+
const t = (n = e.find((r) => r.type === "data-turn_failed")) == null ? void 0 : n.data;
|
|
3616
|
+
if (t)
|
|
3617
3617
|
return {
|
|
3618
|
-
code: typeof
|
|
3619
|
-
...typeof
|
|
3618
|
+
code: typeof t.code == "string" ? t.code : "unknown",
|
|
3619
|
+
...typeof t.ref == "string" ? { ref: t.ref } : {}
|
|
3620
3620
|
};
|
|
3621
3621
|
}
|
|
3622
|
-
function Ln(
|
|
3623
|
-
return
|
|
3622
|
+
function Ln(e) {
|
|
3623
|
+
return e.filter((t) => t.type === "data-edit-target").map((t) => t.data);
|
|
3624
3624
|
}
|
|
3625
|
-
function Pn(
|
|
3626
|
-
const
|
|
3627
|
-
for (const n of
|
|
3628
|
-
n.type === "step-start" ?
|
|
3629
|
-
return
|
|
3625
|
+
function Pn(e) {
|
|
3626
|
+
const t = [[]];
|
|
3627
|
+
for (const n of e)
|
|
3628
|
+
n.type === "step-start" ? t.push([]) : t[t.length - 1].push(n);
|
|
3629
|
+
return t.filter((n) => n.length > 0);
|
|
3630
3630
|
}
|
|
3631
|
-
function bt(
|
|
3632
|
-
return
|
|
3631
|
+
function bt(e) {
|
|
3632
|
+
return e.some((t) => t.type.startsWith("tool-"));
|
|
3633
3633
|
}
|
|
3634
|
-
function jn(
|
|
3634
|
+
function jn(e) {
|
|
3635
3635
|
var n;
|
|
3636
|
-
const
|
|
3637
|
-
return typeof (
|
|
3636
|
+
const t = (n = e.find((r) => r.type === "data-answer")) == null ? void 0 : n.data;
|
|
3637
|
+
return typeof (t == null ? void 0 : t.outcome) == "string" ? t.outcome : void 0;
|
|
3638
3638
|
}
|
|
3639
|
-
function $n(
|
|
3640
|
-
var
|
|
3639
|
+
function $n(e, t = {}) {
|
|
3640
|
+
var r, a;
|
|
3641
3641
|
const n = [];
|
|
3642
|
-
for (const i of
|
|
3642
|
+
for (const i of e ?? []) {
|
|
3643
3643
|
const v = i.parts ?? [], k = Tn(v), _ = Ln(v);
|
|
3644
3644
|
if (i.role === "user") {
|
|
3645
|
-
const
|
|
3645
|
+
const z = Ke(v);
|
|
3646
3646
|
n.push({
|
|
3647
3647
|
id: i.id,
|
|
3648
3648
|
turnId: i.turnId ?? i.id,
|
|
3649
3649
|
role: "user",
|
|
3650
3650
|
targets: _,
|
|
3651
|
-
answer:
|
|
3651
|
+
answer: z,
|
|
3652
3652
|
blocks: [],
|
|
3653
3653
|
preview: null,
|
|
3654
3654
|
signals: [],
|
|
@@ -3658,30 +3658,30 @@ function $n(t, e = {}) {
|
|
|
3658
3658
|
});
|
|
3659
3659
|
continue;
|
|
3660
3660
|
}
|
|
3661
|
-
const u = !!
|
|
3661
|
+
const u = !!t.streamingId && i.id === t.streamingId;
|
|
3662
3662
|
if (i.inProgress && !u) continue;
|
|
3663
|
-
const
|
|
3664
|
-
let
|
|
3663
|
+
const $ = Pn(v), N = $[$.length - 1] ?? [], A = $.some(bt), R = A && !v.some((z) => z.type === "step-start");
|
|
3664
|
+
let T = "";
|
|
3665
3665
|
if (!u) {
|
|
3666
|
-
!A ||
|
|
3667
|
-
const
|
|
3668
|
-
|
|
3666
|
+
!A || R ? T = Ke(v) : bt(N) || (T = Ke(N));
|
|
3667
|
+
const z = T ? void 0 : jn(v);
|
|
3668
|
+
z && (T = ((r = t.outcomes) == null ? void 0 : r[z]) ?? "");
|
|
3669
3669
|
}
|
|
3670
|
-
const
|
|
3671
|
-
!
|
|
3670
|
+
const B = !!T && (R || T.length > ht), P = u ? void 0 : Mn(v);
|
|
3671
|
+
!T && !k.length && !u || n.push({
|
|
3672
3672
|
id: i.id,
|
|
3673
3673
|
turnId: i.turnId ?? i.id,
|
|
3674
3674
|
role: "assistant",
|
|
3675
3675
|
targets: _,
|
|
3676
|
-
answer:
|
|
3677
|
-
blocks:
|
|
3678
|
-
preview:
|
|
3676
|
+
answer: T,
|
|
3677
|
+
blocks: T ? pt(T) : [],
|
|
3678
|
+
preview: B ? pt(_n(T, ht)) : null,
|
|
3679
3679
|
signals: k,
|
|
3680
3680
|
steps: Mt(v),
|
|
3681
3681
|
pending: u,
|
|
3682
|
-
noSummary: !u && !
|
|
3682
|
+
noSummary: !u && !T && A,
|
|
3683
3683
|
ms: u ? void 0 : On(v) ?? ((a = i.stats) == null ? void 0 : a.ms),
|
|
3684
|
-
...
|
|
3684
|
+
...P ? { failure: P } : {}
|
|
3685
3685
|
});
|
|
3686
3686
|
}
|
|
3687
3687
|
return n;
|
|
@@ -3720,26 +3720,26 @@ const Dn = {
|
|
|
3720
3720
|
key: 3,
|
|
3721
3721
|
"data-testid": "report-canvas-failed",
|
|
3722
3722
|
class: "flex flex-col gap-4"
|
|
3723
|
-
},
|
|
3723
|
+
}, ea = { class: "min-w-0 grow" }, ta = { class: "fm-typo-en-body-sm-600 truncate" }, na = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, aa = ["onClick"], ra = ["onClick"], oa = {
|
|
3724
3724
|
key: 4,
|
|
3725
3725
|
class: "fm-typo-en-body-sm-400 text-fm-color-typo-error"
|
|
3726
|
-
},
|
|
3726
|
+
}, ia = { key: 5 }, sa = ["aria-expanded"], la = {
|
|
3727
3727
|
key: 0,
|
|
3728
3728
|
"data-testid": "report-canvas-details",
|
|
3729
3729
|
class: "mt-4 flex flex-col gap-4"
|
|
3730
|
-
},
|
|
3730
|
+
}, fa = { class: "flex w-16 shrink-0 justify-center text-fm-color-system-success-300" }, da = ["title"], ca = {
|
|
3731
3731
|
class: "flex w-16 shrink-0 justify-center",
|
|
3732
3732
|
"aria-hidden": "true"
|
|
3733
|
-
},
|
|
3733
|
+
}, ma = {
|
|
3734
3734
|
key: 2,
|
|
3735
3735
|
class: "h-12 w-12 animate-spin rounded-full border-2 border-fm-color-neutral-gray-200 border-t-fm-color-primary motion-reduce:animate-none"
|
|
3736
|
-
},
|
|
3736
|
+
}, ua = { class: "min-w-0 grow truncate" }, pa = {
|
|
3737
3737
|
key: 0,
|
|
3738
3738
|
class: "shrink-0 text-fm-color-typo-error"
|
|
3739
|
-
},
|
|
3739
|
+
}, ha = {
|
|
3740
3740
|
key: 1,
|
|
3741
3741
|
class: "sr-only"
|
|
3742
|
-
},
|
|
3742
|
+
}, ga = /* @__PURE__ */ $e({
|
|
3743
3743
|
__name: "ReportCanvasActivity",
|
|
3744
3744
|
props: {
|
|
3745
3745
|
active: { type: Boolean },
|
|
@@ -3753,175 +3753,175 @@ const Dn = {
|
|
|
3753
3753
|
retryError: {}
|
|
3754
3754
|
},
|
|
3755
3755
|
emits: ["retry", "askBuilder", "checkStatus"],
|
|
3756
|
-
setup(
|
|
3757
|
-
const n =
|
|
3758
|
-
var
|
|
3759
|
-
return ((
|
|
3760
|
-
}), v =
|
|
3761
|
-
var
|
|
3762
|
-
return !!((
|
|
3763
|
-
}), u =
|
|
3764
|
-
const
|
|
3765
|
-
return
|
|
3766
|
-
}),
|
|
3767
|
-
let
|
|
3756
|
+
setup(e, { emit: t }) {
|
|
3757
|
+
const n = e, r = t, { t: a } = Be(), i = D(() => {
|
|
3758
|
+
var B;
|
|
3759
|
+
return ((B = n.run) == null ? void 0 : B.sections) ?? [];
|
|
3760
|
+
}), v = D(() => i.value.filter((B) => B.status === "ok").length), k = D(() => i.value.filter((B) => B.status === "error")), _ = D(() => {
|
|
3761
|
+
var B;
|
|
3762
|
+
return !!((B = n.run) != null && B.runId) && n.run.status !== "running";
|
|
3763
|
+
}), u = D(() => {
|
|
3764
|
+
const B = n.phases.indexOf(n.phase);
|
|
3765
|
+
return B >= 0 ? n.phases.slice(0, B) : n.phases;
|
|
3766
|
+
}), $ = E(Date.now());
|
|
3767
|
+
let N;
|
|
3768
3768
|
se(
|
|
3769
3769
|
() => n.active && n.startedAt != null,
|
|
3770
|
-
(
|
|
3771
|
-
window.clearInterval(
|
|
3772
|
-
|
|
3770
|
+
(B) => {
|
|
3771
|
+
window.clearInterval(N), N = void 0, B && ($.value = Date.now(), N = window.setInterval(() => {
|
|
3772
|
+
$.value = Date.now();
|
|
3773
3773
|
}, 1e3));
|
|
3774
3774
|
},
|
|
3775
3775
|
{ immediate: !0 }
|
|
3776
|
-
), Pe(() => window.clearInterval(
|
|
3777
|
-
const A =
|
|
3778
|
-
() => n.active && n.startedAt != null ? zn(
|
|
3779
|
-
),
|
|
3776
|
+
), Pe(() => window.clearInterval(N));
|
|
3777
|
+
const A = D(
|
|
3778
|
+
() => n.active && n.startedAt != null ? zn($.value - n.startedAt) : ""
|
|
3779
|
+
), R = E(!1), T = D(
|
|
3780
3780
|
() => i.value.length > 0 || !n.active && n.phases.length > 0
|
|
3781
3781
|
);
|
|
3782
|
-
return (
|
|
3783
|
-
const
|
|
3784
|
-
return
|
|
3785
|
-
|
|
3786
|
-
(
|
|
3787
|
-
key:
|
|
3782
|
+
return (B, P) => {
|
|
3783
|
+
const z = Oe("FmIcon");
|
|
3784
|
+
return e.active || e.interrupted || e.stale || e.retryError || k.value.length || T.value ? (d(), m("div", Dn, [
|
|
3785
|
+
e.active ? (d(), m("ol", Bn, [
|
|
3786
|
+
(d(!0), m(fe, null, me(u.value, (M) => (d(), m("li", {
|
|
3787
|
+
key: M,
|
|
3788
3788
|
"data-testid": "report-canvas-step-done",
|
|
3789
3789
|
class: "fm-typo-en-body-sm-400 flex items-center gap-8 text-fm-color-typo-secondary"
|
|
3790
3790
|
}, [
|
|
3791
3791
|
C("span", qn, [
|
|
3792
|
-
ee(
|
|
3792
|
+
ee(z, {
|
|
3793
3793
|
name: "check",
|
|
3794
3794
|
size: "sm"
|
|
3795
3795
|
})
|
|
3796
3796
|
]),
|
|
3797
|
-
C("span", Vn, w(b(a)(`reportV5.reportAi.chat.phaseDone.${
|
|
3797
|
+
C("span", Vn, w(b(a)(`reportV5.reportAi.chat.phaseDone.${M}`)), 1)
|
|
3798
3798
|
]))), 128)),
|
|
3799
3799
|
C("li", Fn, [
|
|
3800
|
-
|
|
3800
|
+
P[2] || (P[2] = C("span", { class: "flex h-[21px] w-16 shrink-0 items-center justify-center" }, [
|
|
3801
3801
|
C("span", { class: "h-12 w-12 animate-spin rounded-full border-2 border-fm-color-neutral-gray-200 border-t-fm-color-primary motion-reduce:animate-none" })
|
|
3802
3802
|
], -1)),
|
|
3803
3803
|
C("div", Un, [
|
|
3804
3804
|
C("div", Hn, [
|
|
3805
|
-
C("p", Wn, w(b(a)(`reportV5.reportAi.chat.phase.${
|
|
3806
|
-
A.value ? (
|
|
3805
|
+
C("p", Wn, w(b(a)(`reportV5.reportAi.chat.phase.${e.phase}`)), 1),
|
|
3806
|
+
A.value ? (d(), m("span", Gn, w(A.value), 1)) : L("", !0)
|
|
3807
3807
|
]),
|
|
3808
|
-
i.value.length ? (
|
|
3809
|
-
|
|
3808
|
+
i.value.length ? (d(), m("p", Yn, w(b(a)("reportV5.reportAi.build.prepared", { done: v.value, total: i.value.length })), 1)) : L("", !0),
|
|
3809
|
+
e.slow ? (d(), m("p", Xn, w(b(a)("reportV5.reportAi.build.slow")) + " " + w(b(a)("reportV5.reportAi.build.safeToLeave")), 1)) : L("", !0)
|
|
3810
3810
|
])
|
|
3811
3811
|
])
|
|
3812
|
-
])) :
|
|
3813
|
-
|
|
3814
|
-
|
|
3812
|
+
])) : L("", !0),
|
|
3813
|
+
e.interrupted ? (d(), m("p", Kn, w(b(a)("reportV5.reportAi.build.interrupted")), 1)) : L("", !0),
|
|
3814
|
+
e.stale ? (d(), m("div", Jn, [
|
|
3815
3815
|
C("p", Qn, w(b(a)("reportV5.reportAi.build.stalled")), 1),
|
|
3816
3816
|
C("button", {
|
|
3817
3817
|
class: "fm-typo-en-body-sm-600 text-fm-color-typo-secondary underline",
|
|
3818
|
-
onClick:
|
|
3818
|
+
onClick: P[0] || (P[0] = (M) => r("checkStatus"))
|
|
3819
3819
|
}, w(b(a)("reportV5.reportAi.build.checkStatus")), 1)
|
|
3820
|
-
])) :
|
|
3821
|
-
k.value.length ? (
|
|
3822
|
-
(
|
|
3823
|
-
key:
|
|
3820
|
+
])) : L("", !0),
|
|
3821
|
+
k.value.length ? (d(), m("ul", Zn, [
|
|
3822
|
+
(d(!0), m(fe, null, me(k.value, (M) => (d(), m("li", {
|
|
3823
|
+
key: M.id,
|
|
3824
3824
|
class: "flex items-start gap-8"
|
|
3825
3825
|
}, [
|
|
3826
|
-
C("div",
|
|
3827
|
-
C("p",
|
|
3828
|
-
C("p",
|
|
3829
|
-
|
|
3826
|
+
C("div", ea, [
|
|
3827
|
+
C("p", ta, w(M.title), 1),
|
|
3828
|
+
C("p", na, w(b(a)(
|
|
3829
|
+
M.retries ? "reportV5.reportAi.build.retriedWidget" : "reportV5.reportAi.build.failedWidget"
|
|
3830
3830
|
)), 1)
|
|
3831
3831
|
]),
|
|
3832
|
-
_.value && !
|
|
3832
|
+
_.value && !M.retries ? (d(), m("button", {
|
|
3833
3833
|
key: 0,
|
|
3834
3834
|
"data-testid": "report-canvas-retry",
|
|
3835
3835
|
class: "fm-typo-en-body-sm-600 shrink-0 text-fm-color-typo-secondary underline",
|
|
3836
|
-
onClick: (V) =>
|
|
3837
|
-
}, w(b(a)("reportV5.reportAi.build.retry")), 9,
|
|
3836
|
+
onClick: (V) => r("retry", M.id)
|
|
3837
|
+
}, w(b(a)("reportV5.reportAi.build.retry")), 9, aa)) : _.value ? (d(), m("button", {
|
|
3838
3838
|
key: 1,
|
|
3839
3839
|
"data-testid": "report-canvas-ask-builder",
|
|
3840
3840
|
class: "fm-typo-en-body-sm-600 shrink-0 text-fm-color-typo-secondary underline",
|
|
3841
|
-
onClick: (V) =>
|
|
3842
|
-
}, w(b(a)("reportV5.reportAi.build.askBuilder")), 9,
|
|
3841
|
+
onClick: (V) => r("askBuilder", M.title)
|
|
3842
|
+
}, w(b(a)("reportV5.reportAi.build.askBuilder")), 9, ra)) : L("", !0)
|
|
3843
3843
|
]))), 128))
|
|
3844
|
-
])) :
|
|
3845
|
-
|
|
3846
|
-
|
|
3844
|
+
])) : L("", !0),
|
|
3845
|
+
e.retryError ? (d(), m("p", oa, w(b(a)("reportV5.reportAi.build.retryFailed")), 1)) : L("", !0),
|
|
3846
|
+
T.value ? (d(), m("div", ia, [
|
|
3847
3847
|
C("button", {
|
|
3848
3848
|
"data-testid": "report-canvas-details-toggle",
|
|
3849
3849
|
class: "details-toggle fm-typo-en-body-sm-600 -ml-4 flex items-center gap-4 rounded-md py-2 pl-4 pr-8 text-fm-color-typo-secondary",
|
|
3850
|
-
"aria-expanded":
|
|
3851
|
-
onClick:
|
|
3850
|
+
"aria-expanded": R.value,
|
|
3851
|
+
onClick: P[1] || (P[1] = (M) => R.value = !R.value)
|
|
3852
3852
|
}, [
|
|
3853
|
-
ee(
|
|
3854
|
-
name:
|
|
3853
|
+
ee(z, {
|
|
3854
|
+
name: R.value ? "expand_more" : "chevron_right",
|
|
3855
3855
|
size: "sm"
|
|
3856
3856
|
}, null, 8, ["name"]),
|
|
3857
3857
|
Ce(" " + w(b(a)("reportV5.reportAi.build.details")), 1)
|
|
3858
|
-
], 8,
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
key:
|
|
3858
|
+
], 8, sa),
|
|
3859
|
+
R.value ? (d(), m("div", la, [
|
|
3860
|
+
e.active ? L("", !0) : (d(!0), m(fe, { key: 0 }, me(e.phases, (M) => (d(), m("p", {
|
|
3861
|
+
key: M,
|
|
3862
3862
|
class: "fm-typo-en-body-sm-400 flex items-center gap-8 text-fm-color-typo-secondary"
|
|
3863
3863
|
}, [
|
|
3864
|
-
C("span",
|
|
3865
|
-
ee(
|
|
3864
|
+
C("span", fa, [
|
|
3865
|
+
ee(z, {
|
|
3866
3866
|
name: "check",
|
|
3867
3867
|
size: "sm"
|
|
3868
3868
|
})
|
|
3869
3869
|
]),
|
|
3870
|
-
Ce(" " + w(b(a)(`reportV5.reportAi.chat.phaseDone.${
|
|
3870
|
+
Ce(" " + w(b(a)(`reportV5.reportAi.chat.phaseDone.${M}`)), 1)
|
|
3871
3871
|
]))), 128)),
|
|
3872
|
-
(
|
|
3873
|
-
key:
|
|
3872
|
+
(d(!0), m(fe, null, me(i.value, (M) => (d(), m("p", {
|
|
3873
|
+
key: M.id,
|
|
3874
3874
|
"data-testid": "report-canvas-widget-state",
|
|
3875
3875
|
class: "fm-typo-en-body-sm-400 flex items-center gap-8 pl-24 text-fm-color-typo-secondary",
|
|
3876
|
-
title: b(a)(`reportV5.reportAi.build.state.${
|
|
3876
|
+
title: b(a)(`reportV5.reportAi.build.state.${M.status}`)
|
|
3877
3877
|
}, [
|
|
3878
|
-
C("span",
|
|
3879
|
-
|
|
3878
|
+
C("span", ca, [
|
|
3879
|
+
M.status === "ok" ? (d(), ve(z, {
|
|
3880
3880
|
key: 0,
|
|
3881
3881
|
name: "check",
|
|
3882
3882
|
size: "sm",
|
|
3883
3883
|
class: "text-fm-color-system-success-300"
|
|
3884
|
-
})) :
|
|
3884
|
+
})) : M.status === "error" ? (d(), ve(z, {
|
|
3885
3885
|
key: 1,
|
|
3886
3886
|
name: "close",
|
|
3887
3887
|
size: "sm",
|
|
3888
3888
|
class: "text-fm-color-typo-error"
|
|
3889
|
-
})) :
|
|
3889
|
+
})) : M.status === "building" ? (d(), m("span", ma)) : (d(), ve(z, {
|
|
3890
3890
|
key: 3,
|
|
3891
3891
|
name: "radio_button_unchecked",
|
|
3892
3892
|
size: "sm",
|
|
3893
3893
|
class: "text-fm-color-typo-tertiary"
|
|
3894
3894
|
}))
|
|
3895
3895
|
]),
|
|
3896
|
-
C("span",
|
|
3897
|
-
|
|
3898
|
-
], 8,
|
|
3899
|
-
])) :
|
|
3900
|
-
])) :
|
|
3901
|
-
])) :
|
|
3896
|
+
C("span", ua, w(M.title), 1),
|
|
3897
|
+
M.status === "error" ? (d(), m("span", pa, w(b(a)("reportV5.reportAi.build.state.error")), 1)) : (d(), m("span", ha, w(b(a)(`reportV5.reportAi.build.state.${M.status}`)), 1))
|
|
3898
|
+
], 8, da))), 128))
|
|
3899
|
+
])) : L("", !0)
|
|
3900
|
+
])) : L("", !0)
|
|
3901
|
+
])) : L("", !0);
|
|
3902
3902
|
};
|
|
3903
3903
|
}
|
|
3904
|
-
}), vt = /* @__PURE__ */ Tt(
|
|
3904
|
+
}), vt = /* @__PURE__ */ Tt(ga, [["__scopeId", "data-v-d9511bdd"]]), ba = { class: "flex flex-col items-stretch gap-8 px-[20px] pb-16 pt-12" }, va = {
|
|
3905
3905
|
key: 0,
|
|
3906
3906
|
"data-testid": "chat-edit-target-context",
|
|
3907
3907
|
class: "fm-typo-en-body-sm-400 line-clamp-1 text-fm-color-typo-secondary"
|
|
3908
|
-
},
|
|
3908
|
+
}, ya = {
|
|
3909
3909
|
key: 1,
|
|
3910
3910
|
role: "alert",
|
|
3911
3911
|
class: "fm-typo-en-body-sm-400 text-fm-color-typo-error"
|
|
3912
|
-
},
|
|
3912
|
+
}, xa = {
|
|
3913
3913
|
"data-testid": "report-canvas-chat-input",
|
|
3914
3914
|
class: "rounded-lg border border-fm-color-border-secondary bg-fm-color-neutral-white p-16 focus-within:border-fm-color-primary"
|
|
3915
|
-
},
|
|
3915
|
+
}, wa = ["value", "placeholder", "aria-label"], ka = { class: "mt-16 flex items-center gap-12" }, _a = ["aria-label"], Ia = {
|
|
3916
3916
|
key: 0,
|
|
3917
3917
|
class: "flex max-h-[96px] min-w-0 grow flex-wrap gap-4 overflow-y-auto"
|
|
3918
|
-
},
|
|
3918
|
+
}, Sa = { class: "fm-typo-en-body-sm-400 min-w-0 truncate" }, Aa = ["disabled", "aria-label", "onClick"], Ca = {
|
|
3919
3919
|
key: 1,
|
|
3920
3920
|
class: "fm-typo-en-body-sm-400 min-w-0 grow truncate"
|
|
3921
|
-
},
|
|
3921
|
+
}, Ea = {
|
|
3922
3922
|
key: 0,
|
|
3923
3923
|
"data-testid": "chat-edit-target-element"
|
|
3924
|
-
},
|
|
3924
|
+
}, Ta = ["disabled", "aria-label"], Oa = ["disabled", "aria-label", "title"], za = ["disabled", "aria-label"], Na = { class: "text-[12px] leading-16 text-fm-color-typo-secondary" }, yt = 21, Ra = /* @__PURE__ */ $e({
|
|
3925
3925
|
__name: "ReportCanvasComposer",
|
|
3926
3926
|
props: {
|
|
3927
3927
|
draft: {},
|
|
@@ -3936,111 +3936,111 @@ const Dn = {
|
|
|
3936
3936
|
placeholder: {}
|
|
3937
3937
|
},
|
|
3938
3938
|
emits: ["update:draft", "submit", "clearTarget", "stop"],
|
|
3939
|
-
setup(
|
|
3940
|
-
const
|
|
3941
|
-
function
|
|
3942
|
-
const
|
|
3943
|
-
|
|
3944
|
-
}
|
|
3945
|
-
Le(
|
|
3946
|
-
() =>
|
|
3947
|
-
() => void ke(
|
|
3939
|
+
setup(e, { expose: t, emit: n }) {
|
|
3940
|
+
const r = e, a = n, { t: i } = Be(), v = yt * 2, k = yt * 6, _ = E(), u = E(!1);
|
|
3941
|
+
function $() {
|
|
3942
|
+
const c = _.value;
|
|
3943
|
+
c && (c.style.height = "auto", c.style.height = `${Math.min(Math.max(c.scrollHeight, v), k)}px`);
|
|
3944
|
+
}
|
|
3945
|
+
Le($), se(
|
|
3946
|
+
() => r.draft,
|
|
3947
|
+
() => void ke($)
|
|
3948
3948
|
);
|
|
3949
|
-
function
|
|
3950
|
-
a("update:draft",
|
|
3949
|
+
function N(c) {
|
|
3950
|
+
a("update:draft", c.target.value);
|
|
3951
3951
|
}
|
|
3952
|
-
function A(
|
|
3953
|
-
|
|
3952
|
+
function A(c) {
|
|
3953
|
+
c.key !== "Enter" || c.shiftKey || u.value || c.isComposing || (c.preventDefault(), T());
|
|
3954
3954
|
}
|
|
3955
|
-
const
|
|
3956
|
-
function
|
|
3957
|
-
|
|
3955
|
+
const R = D(() => !!r.draft.trim() && !r.streaming && !r.targetStale);
|
|
3956
|
+
function T() {
|
|
3957
|
+
R.value && a("submit");
|
|
3958
3958
|
}
|
|
3959
|
-
function
|
|
3960
|
-
var
|
|
3961
|
-
(
|
|
3959
|
+
function B() {
|
|
3960
|
+
var c;
|
|
3961
|
+
(c = _.value) == null || c.focus();
|
|
3962
3962
|
}
|
|
3963
|
-
|
|
3964
|
-
const
|
|
3965
|
-
function
|
|
3966
|
-
const y =
|
|
3963
|
+
t({ focus: B });
|
|
3964
|
+
const P = D(() => r.targets ?? (r.target ? [r.target] : [])), z = D(() => P.value.length === 1 ? P.value[0] : void 0);
|
|
3965
|
+
function M(c) {
|
|
3966
|
+
const y = c == null ? void 0 : c.element;
|
|
3967
3967
|
if (!y) return "";
|
|
3968
3968
|
const g = (y.text || "").trim();
|
|
3969
3969
|
return g ? g.slice(0, 40) : y.part || y.tag;
|
|
3970
3970
|
}
|
|
3971
|
-
const V =
|
|
3972
|
-
function Y(
|
|
3973
|
-
const y =
|
|
3974
|
-
return (
|
|
3971
|
+
const V = D(() => M(z.value));
|
|
3972
|
+
function Y(c) {
|
|
3973
|
+
const y = M(c);
|
|
3974
|
+
return (c.label || i("reportV5.reportAi.chat.selectedWidget")) + (y ? " › " + y : "");
|
|
3975
3975
|
}
|
|
3976
|
-
const X =
|
|
3977
|
-
() => !
|
|
3978
|
-
|
|
3976
|
+
const X = D(
|
|
3977
|
+
() => !P.value.length && r.placeholder || i(
|
|
3978
|
+
P.value.length ? "reportV5.reportAi.chat.commentPlaceholder" : r.blank ? "reportV5.reportAi.chat.placeholderNew" : "reportV5.reportAi.chat.placeholderChange"
|
|
3979
3979
|
)
|
|
3980
|
-
), Z =
|
|
3981
|
-
return (
|
|
3980
|
+
), Z = D(() => r.targetLabel ?? i("reportV5.reportAi.chat.entireReport"));
|
|
3981
|
+
return (c, y) => {
|
|
3982
3982
|
var U;
|
|
3983
3983
|
const g = Oe("FmIcon");
|
|
3984
|
-
return
|
|
3985
|
-
(U =
|
|
3986
|
-
|
|
3987
|
-
C("div",
|
|
3984
|
+
return d(), m("div", ba, [
|
|
3985
|
+
(U = z.value) != null && U.elementText ? (d(), m("p", va, " “" + w(z.value.elementText) + "” ", 1)) : L("", !0),
|
|
3986
|
+
e.targetStale && !e.streaming ? (d(), m("p", ya, w(b(i)("reportV5.reportAi.chat.staleTarget")), 1)) : L("", !0),
|
|
3987
|
+
C("div", xa, [
|
|
3988
3988
|
C("textarea", {
|
|
3989
3989
|
ref_key: "field",
|
|
3990
3990
|
ref: _,
|
|
3991
|
-
value:
|
|
3991
|
+
value: e.draft,
|
|
3992
3992
|
placeholder: X.value,
|
|
3993
3993
|
"aria-label": X.value,
|
|
3994
3994
|
rows: "2",
|
|
3995
3995
|
class: "fm-typo-en-body-md-400 block w-full resize-none border-0 bg-transparent !leading-[21px] outline-none placeholder:text-fm-color-typo-secondary",
|
|
3996
|
-
onInput:
|
|
3996
|
+
onInput: N,
|
|
3997
3997
|
onKeydown: A,
|
|
3998
3998
|
onCompositionstart: y[0] || (y[0] = (q) => u.value = !0),
|
|
3999
3999
|
onCompositionend: y[1] || (y[1] = (q) => u.value = !1)
|
|
4000
|
-
}, null, 40,
|
|
4001
|
-
C("div",
|
|
4000
|
+
}, null, 40, wa),
|
|
4001
|
+
C("div", ka, [
|
|
4002
4002
|
C("div", {
|
|
4003
4003
|
"data-testid": "chat-edit-target",
|
|
4004
4004
|
role: "status",
|
|
4005
|
-
"aria-label":
|
|
4005
|
+
"aria-label": P.value.length ? b(i)("reportV5.reportAi.chat.commentOn", { widget: P.value.map(Y).join(", ") }) : Z.value,
|
|
4006
4006
|
class: "flex min-w-0 grow items-center gap-8 text-fm-color-typo-secondary"
|
|
4007
4007
|
}, [
|
|
4008
4008
|
ee(g, {
|
|
4009
|
-
name:
|
|
4009
|
+
name: P.value.length ? "mode_comment" : "dashboard",
|
|
4010
4010
|
size: "sm",
|
|
4011
4011
|
outline: ""
|
|
4012
4012
|
}, null, 8, ["name"]),
|
|
4013
|
-
|
|
4014
|
-
(
|
|
4013
|
+
P.value.length > 1 ? (d(), m("ul", Ia, [
|
|
4014
|
+
(d(!0), m(fe, null, me(P.value, (q, K) => (d(), m("li", {
|
|
4015
4015
|
key: K,
|
|
4016
4016
|
"data-testid": "chat-edit-target-part",
|
|
4017
4017
|
class: "flex min-w-0 max-w-full items-center gap-4 rounded-sm bg-fm-color-neutral-gray-100 py-2 pl-8 pr-4"
|
|
4018
4018
|
}, [
|
|
4019
|
-
C("span",
|
|
4019
|
+
C("span", Sa, w(Y(q)), 1),
|
|
4020
4020
|
C("button", {
|
|
4021
4021
|
class: "flex shrink-0 items-center text-fm-color-typo-secondary disabled:opacity-50",
|
|
4022
|
-
disabled:
|
|
4022
|
+
disabled: e.streaming,
|
|
4023
4023
|
"aria-label": b(i)(
|
|
4024
4024
|
q.element && !q.area ? "reportV5.reportAi.chat.removeElement" : "reportV5.reportAi.chat.removeTarget"
|
|
4025
4025
|
),
|
|
4026
|
-
onClick: (
|
|
4026
|
+
onClick: (ae) => a("clearTarget", K)
|
|
4027
4027
|
}, [
|
|
4028
4028
|
ee(g, {
|
|
4029
4029
|
name: "close",
|
|
4030
4030
|
size: "sm"
|
|
4031
4031
|
})
|
|
4032
|
-
], 8,
|
|
4032
|
+
], 8, Aa)
|
|
4033
4033
|
]))), 128))
|
|
4034
|
-
])) : (
|
|
4035
|
-
Ce(w(
|
|
4036
|
-
V.value ? (
|
|
4034
|
+
])) : (d(), m("p", Ca, [
|
|
4035
|
+
Ce(w(z.value ? z.value.label || b(i)("reportV5.reportAi.chat.selectedWidget") : Z.value), 1),
|
|
4036
|
+
V.value ? (d(), m("span", Ea, " › " + w(V.value), 1)) : L("", !0)
|
|
4037
4037
|
])),
|
|
4038
|
-
|
|
4038
|
+
z.value ? (d(), m("button", {
|
|
4039
4039
|
key: 2,
|
|
4040
4040
|
class: "flex shrink-0 items-center text-fm-color-typo-secondary disabled:opacity-50",
|
|
4041
|
-
disabled:
|
|
4041
|
+
disabled: e.streaming,
|
|
4042
4042
|
"aria-label": b(i)(
|
|
4043
|
-
|
|
4043
|
+
z.value.element && !z.value.area ? "reportV5.reportAi.chat.removeElement" : "reportV5.reportAi.chat.removeTarget"
|
|
4044
4044
|
),
|
|
4045
4045
|
onClick: y[2] || (y[2] = (q) => a("clearTarget", 0))
|
|
4046
4046
|
}, [
|
|
@@ -4048,167 +4048,167 @@ const Dn = {
|
|
|
4048
4048
|
name: "close",
|
|
4049
4049
|
size: "sm"
|
|
4050
4050
|
})
|
|
4051
|
-
], 8,
|
|
4052
|
-
], 8,
|
|
4053
|
-
|
|
4051
|
+
], 8, Ta)) : L("", !0)
|
|
4052
|
+
], 8, _a),
|
|
4053
|
+
e.stoppable ? (d(), m("button", {
|
|
4054
4054
|
key: 0,
|
|
4055
4055
|
"data-testid": "report-canvas-chat-stop",
|
|
4056
4056
|
type: "button",
|
|
4057
4057
|
class: "flex h-[36px] w-[36px] shrink-0 items-center justify-center rounded-full bg-fm-color-primary text-fm-color-neutral-white transition-colors focus-visible:outline focus-visible:outline-2 focus-visible:outline-fm-color-primary disabled:cursor-not-allowed disabled:opacity-50",
|
|
4058
|
-
disabled:
|
|
4059
|
-
"aria-label": b(i)(
|
|
4060
|
-
title: b(i)(
|
|
4058
|
+
disabled: e.stopping,
|
|
4059
|
+
"aria-label": b(i)(e.stopping ? "reportV5.reportAi.chat.stopping" : "reportV5.reportAi.chat.stop"),
|
|
4060
|
+
title: b(i)(e.stopping ? "reportV5.reportAi.chat.stopping" : "reportV5.reportAi.chat.stop"),
|
|
4061
4061
|
onClick: y[3] || (y[3] = (q) => a("stop"))
|
|
4062
4062
|
}, [
|
|
4063
4063
|
ee(g, {
|
|
4064
4064
|
name: "stop",
|
|
4065
4065
|
size: "sm"
|
|
4066
4066
|
})
|
|
4067
|
-
], 8,
|
|
4067
|
+
], 8, Oa)) : (d(), m("button", {
|
|
4068
4068
|
key: 1,
|
|
4069
4069
|
"data-testid": "report-canvas-chat-send",
|
|
4070
4070
|
class: et([
|
|
4071
4071
|
"flex h-[36px] w-[36px] shrink-0 items-center justify-center rounded-full transition-colors focus-visible:outline focus-visible:outline-2 focus-visible:outline-fm-color-primary disabled:cursor-not-allowed",
|
|
4072
|
-
|
|
4072
|
+
R.value ? "bg-fm-color-primary text-fm-color-neutral-white" : "bg-fm-color-neutral-gray-100 text-fm-color-typo-secondary"
|
|
4073
4073
|
]),
|
|
4074
|
-
disabled: !
|
|
4074
|
+
disabled: !R.value,
|
|
4075
4075
|
"aria-label": b(i)("reportV5.reportAi.chat.send"),
|
|
4076
|
-
onClick:
|
|
4076
|
+
onClick: T
|
|
4077
4077
|
}, [
|
|
4078
4078
|
ee(g, {
|
|
4079
4079
|
name: "arrow_forward",
|
|
4080
4080
|
size: "sm"
|
|
4081
4081
|
})
|
|
4082
|
-
], 10,
|
|
4082
|
+
], 10, za))
|
|
4083
4083
|
])
|
|
4084
4084
|
]),
|
|
4085
|
-
C("p",
|
|
4085
|
+
C("p", Na, w(e.streaming && e.draft.trim() ? b(i)("reportV5.reportAi.chat.waitForUpdate") : b(i)("reportV5.reportAi.chat.newLineHint")), 1)
|
|
4086
4086
|
]);
|
|
4087
4087
|
};
|
|
4088
4088
|
}
|
|
4089
|
-
}),
|
|
4090
|
-
function xt(
|
|
4091
|
-
return
|
|
4089
|
+
}), Ma = "rounded-sm bg-fm-color-neutral-gray-100 px-4 font-mono text-[0.9em]";
|
|
4090
|
+
function xt(e) {
|
|
4091
|
+
return e.map((t) => t.type === "strong" ? ce("strong", { class: "font-semibold" }, t.text) : t.type === "em" ? ce("em", t.text) : t.type === "code" ? ce("code", { class: Ma }, t.text) : t.type === "link" ? ce(
|
|
4092
4092
|
"a",
|
|
4093
4093
|
{
|
|
4094
|
-
href:
|
|
4094
|
+
href: t.href,
|
|
4095
4095
|
target: "_blank",
|
|
4096
4096
|
rel: "noopener noreferrer",
|
|
4097
4097
|
class: "text-fm-color-primary underline"
|
|
4098
4098
|
},
|
|
4099
|
-
|
|
4100
|
-
) :
|
|
4099
|
+
t.text
|
|
4100
|
+
) : t.text);
|
|
4101
4101
|
}
|
|
4102
|
-
const
|
|
4102
|
+
const La = (e) => ce(
|
|
4103
4103
|
"div",
|
|
4104
4104
|
{ class: "fm-typo-en-body-md-400 flex flex-col items-stretch gap-8 !leading-[21px]" },
|
|
4105
|
-
(
|
|
4105
|
+
(e.blocks ?? []).map((t) => t.type === "pre" ? ce(
|
|
4106
4106
|
"pre",
|
|
4107
4107
|
{
|
|
4108
4108
|
class: "overflow-x-auto rounded-md bg-fm-color-neutral-gray-100 p-8 font-mono text-xs"
|
|
4109
4109
|
},
|
|
4110
|
-
|
|
4111
|
-
) :
|
|
4112
|
-
|
|
4113
|
-
{ class: `flex flex-col gap-4 pl-16 ${
|
|
4114
|
-
|
|
4110
|
+
t.text
|
|
4111
|
+
) : t.type === "list" ? ce(
|
|
4112
|
+
t.ordered ? "ol" : "ul",
|
|
4113
|
+
{ class: `flex flex-col gap-4 pl-16 ${t.ordered ? "list-decimal" : "list-disc"}` },
|
|
4114
|
+
t.items.map((n) => ce("li", xt(n)))
|
|
4115
4115
|
) : ce(
|
|
4116
4116
|
"p",
|
|
4117
|
-
{ class:
|
|
4118
|
-
xt(
|
|
4117
|
+
{ class: t.heading ? "fm-typo-en-body-md-600" : void 0 },
|
|
4118
|
+
xt(t.inline)
|
|
4119
4119
|
))
|
|
4120
|
-
),
|
|
4120
|
+
), Pa = ["aria-expanded"], ja = /* @__PURE__ */ $e({
|
|
4121
4121
|
__name: "ReportCanvasMessage",
|
|
4122
4122
|
props: {
|
|
4123
4123
|
blocks: {},
|
|
4124
4124
|
preview: {}
|
|
4125
4125
|
},
|
|
4126
|
-
setup(
|
|
4127
|
-
const
|
|
4128
|
-
return (i, v) => (
|
|
4129
|
-
ee(b(
|
|
4130
|
-
|
|
4126
|
+
setup(e) {
|
|
4127
|
+
const t = e, { t: n } = Be(), r = E(!0), a = D(() => t.preview && !r.value ? t.preview : t.blocks);
|
|
4128
|
+
return (i, v) => (d(), m("div", null, [
|
|
4129
|
+
ee(b(La), { blocks: a.value }, null, 8, ["blocks"]),
|
|
4130
|
+
e.preview ? (d(), m("button", {
|
|
4131
4131
|
key: 0,
|
|
4132
4132
|
"data-testid": "report-canvas-full-reply",
|
|
4133
4133
|
class: "fm-typo-en-body-sm-600 mt-4 text-fm-color-typo-secondary underline",
|
|
4134
|
-
"aria-expanded":
|
|
4135
|
-
onClick: v[0] || (v[0] = (k) =>
|
|
4136
|
-
}, w(b(n)(
|
|
4134
|
+
"aria-expanded": r.value,
|
|
4135
|
+
onClick: v[0] || (v[0] = (k) => r.value = !r.value)
|
|
4136
|
+
}, w(b(n)(r.value ? "reportV5.reportAi.chat.showLess" : "reportV5.reportAi.chat.showFullReply")), 9, Pa)) : L("", !0)
|
|
4137
4137
|
]));
|
|
4138
4138
|
}
|
|
4139
|
-
}), $
|
|
4139
|
+
}), $a = ["aria-label"], Da = { class: "flex h-64 shrink-0 items-center gap-12 border-b border-fm-color-border-secondary px-[20px]" }, Ba = { class: "min-w-0 grow" }, qa = { class: "fm-typo-en-body-md-600" }, Va = {
|
|
4140
4140
|
key: 0,
|
|
4141
4141
|
class: "fm-typo-en-body-sm-400 truncate text-fm-color-typo-secondary"
|
|
4142
|
-
},
|
|
4142
|
+
}, Fa = ["disabled", "aria-label"], Ua = ["disabled", "aria-label", "title"], Ha = ["aria-label"], Wa = ["data-testid", "aria-label"], Ga = {
|
|
4143
4143
|
key: 0,
|
|
4144
4144
|
class: "mt-auto flex shrink-0 flex-col gap-24 pb-8 pt-32"
|
|
4145
|
-
},
|
|
4145
|
+
}, Ya = { class: "text-center" }, Xa = { class: "text-[24px] font-semibold leading-tight tracking-tight text-fm-color-typo-primary" }, Ka = { class: "fm-typo-en-body-sm-400 mt-12 text-fm-color-typo-secondary" }, Ja = {
|
|
4146
4146
|
key: 0,
|
|
4147
4147
|
class: "flex flex-col gap-4"
|
|
4148
|
-
},
|
|
4148
|
+
}, Qa = ["disabled", "title", "onClick"], Za = ["aria-label"], er = { class: "fm-typo-en-body-sm-600 mb-12 text-fm-color-typo-secondary" }, tr = {
|
|
4149
4149
|
key: 0,
|
|
4150
4150
|
class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary"
|
|
4151
|
-
},
|
|
4151
|
+
}, nr = {
|
|
4152
4152
|
key: 1,
|
|
4153
4153
|
"data-testid": "report-canvas-chat-list-error",
|
|
4154
4154
|
class: "fm-typo-en-body-sm-400 text-fm-color-typo-error"
|
|
4155
|
-
},
|
|
4155
|
+
}, ar = {
|
|
4156
4156
|
key: 2,
|
|
4157
4157
|
class: "fm-typo-en-body-sm-400 py-12 text-fm-color-typo-secondary"
|
|
4158
|
-
},
|
|
4158
|
+
}, rr = {
|
|
4159
4159
|
key: 0,
|
|
4160
4160
|
class: "fm-typo-en-body-sm-400 mb-8 text-fm-color-typo-secondary"
|
|
4161
|
-
},
|
|
4161
|
+
}, or = ["disabled", "aria-current", "title", "onClick"], ir = { class: "fm-typo-en-body-md-400 min-w-0 grow truncate" }, sr = ["datetime"], lr = ["disabled"], fr = ["disabled"], dr = {
|
|
4162
4162
|
key: 2,
|
|
4163
4163
|
"data-testid": "report-canvas-chat-error",
|
|
4164
4164
|
class: "fm-typo-en-body-sm-400 mt-12 text-fm-color-typo-error"
|
|
4165
|
-
},
|
|
4165
|
+
}, cr = {
|
|
4166
4166
|
key: 1,
|
|
4167
4167
|
class: "relative flex min-h-0 grow flex-col"
|
|
4168
|
-
},
|
|
4168
|
+
}, mr = {
|
|
4169
4169
|
key: 0,
|
|
4170
4170
|
"data-testid": "report-canvas-chat-loading",
|
|
4171
4171
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
4172
|
-
},
|
|
4172
|
+
}, ur = ["disabled"], pr = {
|
|
4173
4173
|
key: 0,
|
|
4174
4174
|
"data-testid": "chat-message-target",
|
|
4175
4175
|
class: "fm-typo-en-body-sm-600 mb-4 text-right text-fm-color-typo-secondary"
|
|
4176
|
-
},
|
|
4176
|
+
}, hr = {
|
|
4177
4177
|
key: 1,
|
|
4178
4178
|
class: "flex flex-col items-end"
|
|
4179
|
-
},
|
|
4179
|
+
}, gr = {
|
|
4180
4180
|
key: 0,
|
|
4181
4181
|
"data-testid": "chat-message-unsent",
|
|
4182
4182
|
class: "fm-typo-en-body-sm-400 mt-4 text-fm-color-typo-secondary"
|
|
4183
|
-
},
|
|
4183
|
+
}, br = ["disabled", "onClick"], vr = {
|
|
4184
4184
|
key: 1,
|
|
4185
4185
|
"data-testid": "chat-message-no-reply",
|
|
4186
4186
|
class: "fm-typo-en-body-sm-400 mt-4 max-w-[90%] text-right text-fm-color-typo-secondary"
|
|
4187
|
-
},
|
|
4187
|
+
}, yr = ["disabled", "onClick"], xr = ["disabled", "onClick"], wr = {
|
|
4188
4188
|
key: 1,
|
|
4189
4189
|
"data-testid": "report-canvas-failure",
|
|
4190
4190
|
class: "rounded-md border border-fm-color-border-secondary px-12 py-12"
|
|
4191
|
-
},
|
|
4191
|
+
}, kr = { class: "fm-typo-en-body-md-600 flex items-center gap-8" }, _r = { class: "fm-typo-en-body-sm-400 mt-4 text-fm-color-typo-secondary" }, Ir = {
|
|
4192
4192
|
key: 0,
|
|
4193
4193
|
class: "mt-12 flex flex-wrap gap-8"
|
|
4194
|
-
},
|
|
4194
|
+
}, Sr = {
|
|
4195
4195
|
key: 1,
|
|
4196
4196
|
"data-testid": "report-canvas-failure-ref",
|
|
4197
4197
|
class: "fm-typo-en-body-sm-400 mt-8 text-fm-color-typo-tertiary"
|
|
4198
|
-
},
|
|
4198
|
+
}, Ar = {
|
|
4199
4199
|
key: 3,
|
|
4200
4200
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
4201
|
-
},
|
|
4201
|
+
}, Cr = {
|
|
4202
4202
|
key: 4,
|
|
4203
4203
|
"data-testid": "report-canvas-answer-duration",
|
|
4204
4204
|
class: "fm-typo-en-body-sm-400 mt-4 text-fm-color-typo-secondary"
|
|
4205
|
-
},
|
|
4205
|
+
}, Er = {
|
|
4206
4206
|
key: 2,
|
|
4207
4207
|
"data-testid": "report-canvas-chat-error",
|
|
4208
4208
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-error"
|
|
4209
|
-
},
|
|
4209
|
+
}, Tr = { class: "shrink-0" }, wt = "New chat", Or = 1440 * 60 * 1e3, zr = 80, Nr = /* @__PURE__ */ $e({
|
|
4210
4210
|
__name: "ReportCanvasChatPanel",
|
|
4211
|
-
props: /* @__PURE__ */
|
|
4211
|
+
props: /* @__PURE__ */ it({
|
|
4212
4212
|
messages: {},
|
|
4213
4213
|
draft: {},
|
|
4214
4214
|
target: {},
|
|
@@ -4250,14 +4250,14 @@ const Lr = (t) => ce(
|
|
|
4250
4250
|
homeDraft: { default: "" },
|
|
4251
4251
|
homeDraftModifiers: {}
|
|
4252
4252
|
}),
|
|
4253
|
-
emits: /* @__PURE__ */
|
|
4254
|
-
setup(
|
|
4255
|
-
const n =
|
|
4256
|
-
var
|
|
4257
|
-
return ((
|
|
4258
|
-
}), k =
|
|
4253
|
+
emits: /* @__PURE__ */ it(["update:draft", "submit", "close", "retry", "undo", "resend", "askAgain", "editRequest", "askBuilder", "checkStatus", "clearTarget", "newChat", "selectChat", "loadChats", "loadMoreChats", "loadEarlier", "stop"], ["update:homeOpen", "update:homeDraft"]),
|
|
4254
|
+
setup(e, { emit: t }) {
|
|
4255
|
+
const n = e, r = t, { t: a, locale: i } = Be(), v = D(() => {
|
|
4256
|
+
var o;
|
|
4257
|
+
return ((o = n.copy) == null ? void 0 : o.title) ?? a("reportV5.reportAi.chat.title");
|
|
4258
|
+
}), k = rt(e, "homeOpen"), _ = E(!1), u = rt(e, "homeDraft"), $ = E(!1), N = D(
|
|
4259
4259
|
() => !n.chatTitle || n.chatTitle === wt ? a("reportV5.reportAi.chat.chats") : n.chatTitle
|
|
4260
|
-
), A =
|
|
4260
|
+
), A = E(!1), R = D(() => n.switching || A.value);
|
|
4261
4261
|
se(
|
|
4262
4262
|
() => n.messages,
|
|
4263
4263
|
() => {
|
|
@@ -4265,117 +4265,117 @@ const Lr = (t) => ce(
|
|
|
4265
4265
|
}
|
|
4266
4266
|
), se(
|
|
4267
4267
|
() => n.switching,
|
|
4268
|
-
(
|
|
4269
|
-
|
|
4268
|
+
(o) => {
|
|
4269
|
+
o || (A.value = !1);
|
|
4270
4270
|
}
|
|
4271
4271
|
);
|
|
4272
|
-
function
|
|
4273
|
-
n.busy || (k.value = !0, _.value = !1,
|
|
4272
|
+
function T() {
|
|
4273
|
+
n.busy || (k.value = !0, _.value = !1, r("loadChats"));
|
|
4274
4274
|
}
|
|
4275
|
-
function
|
|
4276
|
-
_.value = !0,
|
|
4275
|
+
function B() {
|
|
4276
|
+
_.value = !0, r("loadChats");
|
|
4277
4277
|
}
|
|
4278
|
-
function
|
|
4279
|
-
_.value ? _.value = !1 :
|
|
4278
|
+
function P() {
|
|
4279
|
+
_.value ? _.value = !1 : T();
|
|
4280
4280
|
}
|
|
4281
|
-
function
|
|
4282
|
-
n.busy || (k.value = !1, _.value = !1,
|
|
4281
|
+
function z(o) {
|
|
4282
|
+
n.busy || (k.value = !1, _.value = !1, o !== n.chatId && (A.value = !0, r("selectChat", o)));
|
|
4283
4283
|
}
|
|
4284
|
-
function
|
|
4285
|
-
n.busy || (k.value = !1, _.value = !1, A.value = !0,
|
|
4284
|
+
function M() {
|
|
4285
|
+
n.busy || (k.value = !1, _.value = !1, A.value = !0, r("newChat"));
|
|
4286
4286
|
}
|
|
4287
4287
|
se(
|
|
4288
4288
|
() => n.chatId,
|
|
4289
4289
|
() => {
|
|
4290
|
-
|
|
4290
|
+
$.value && (u.value = "", $.value = !1, k.value = !1);
|
|
4291
4291
|
}
|
|
4292
4292
|
), se(
|
|
4293
4293
|
() => n.switching,
|
|
4294
|
-
(
|
|
4295
|
-
|
|
4294
|
+
(o) => {
|
|
4295
|
+
o || ($.value = !1);
|
|
4296
4296
|
}
|
|
4297
4297
|
);
|
|
4298
|
-
function V(
|
|
4299
|
-
if (
|
|
4300
|
-
|
|
4298
|
+
function V(o) {
|
|
4299
|
+
if (o.key === "Escape" && _.value) {
|
|
4300
|
+
o.stopPropagation(), _.value = !1;
|
|
4301
4301
|
return;
|
|
4302
4302
|
}
|
|
4303
|
-
|
|
4303
|
+
o.key === "Escape" && k.value && (o.stopPropagation(), k.value = !1);
|
|
4304
4304
|
}
|
|
4305
|
-
const Y =
|
|
4306
|
-
const
|
|
4307
|
-
|
|
4305
|
+
const Y = D(() => {
|
|
4306
|
+
const o = /* @__PURE__ */ new Date();
|
|
4307
|
+
o.setHours(0, 0, 0, 0);
|
|
4308
4308
|
const p = [];
|
|
4309
4309
|
for (const G of n.chats ?? []) {
|
|
4310
|
-
const W = new Date(G.lastMessageAt).getTime(), ge = W >=
|
|
4310
|
+
const W = new Date(G.lastMessageAt).getTime(), ge = W >= o.getTime() ? "today" : W >= o.getTime() - Or ? "yesterday" : "earlier";
|
|
4311
4311
|
(p.find((be) => be.key === ge) ?? (p.push({ key: ge, label: a(`reportV5.reportAi.chat.group.${ge}`), chats: [] }), p[p.length - 1])).chats.push(G);
|
|
4312
4312
|
}
|
|
4313
4313
|
return p;
|
|
4314
4314
|
});
|
|
4315
|
-
function X(
|
|
4316
|
-
return new Date(
|
|
4315
|
+
function X(o) {
|
|
4316
|
+
return new Date(o.lastMessageAt).toLocaleString(i.value, {
|
|
4317
4317
|
month: "short",
|
|
4318
4318
|
day: "numeric"
|
|
4319
4319
|
});
|
|
4320
4320
|
}
|
|
4321
|
-
const Z =
|
|
4321
|
+
const Z = D(() => new Set(n.undoableTurnIds ?? [])), c = D(() => new Set(n.unsentIds ?? [])), y = E();
|
|
4322
4322
|
se(
|
|
4323
4323
|
() => n.targets ?? n.target,
|
|
4324
|
-
async (
|
|
4324
|
+
async (o) => {
|
|
4325
4325
|
var p;
|
|
4326
|
-
(Array.isArray(
|
|
4326
|
+
(Array.isArray(o) ? !o.length : !o) || (_.value = !1, await ke(), (p = y.value) == null || p.focus());
|
|
4327
4327
|
},
|
|
4328
4328
|
{ immediate: !0 }
|
|
4329
4329
|
);
|
|
4330
|
-
const g =
|
|
4330
|
+
const g = D(
|
|
4331
4331
|
() => {
|
|
4332
|
-
var
|
|
4332
|
+
var o;
|
|
4333
4333
|
return $n(n.messages ?? [], {
|
|
4334
4334
|
streamingId: n.streaming ? n.turnId : void 0,
|
|
4335
|
-
outcomes: (
|
|
4335
|
+
outcomes: (o = n.copy) == null ? void 0 : o.outcomes
|
|
4336
4336
|
});
|
|
4337
4337
|
}
|
|
4338
|
-
), U =
|
|
4339
|
-
const
|
|
4338
|
+
), U = D(() => {
|
|
4339
|
+
const o = new Set(n.noReplyId ? [n.noReplyId] : []);
|
|
4340
4340
|
return g.value.forEach((p, G) => {
|
|
4341
4341
|
var W;
|
|
4342
|
-
p.role === "user" && ((W = g.value[G + 1]) == null ? void 0 : W.role) === "user" &&
|
|
4343
|
-
}),
|
|
4342
|
+
p.role === "user" && ((W = g.value[G + 1]) == null ? void 0 : W.role) === "user" && o.add(p.id);
|
|
4343
|
+
}), o;
|
|
4344
4344
|
});
|
|
4345
|
-
function q(
|
|
4346
|
-
for (let p =
|
|
4345
|
+
function q(o) {
|
|
4346
|
+
for (let p = o - 1; p >= 0; p -= 1)
|
|
4347
4347
|
if (g.value[p].role === "user") return g.value[p].id;
|
|
4348
4348
|
}
|
|
4349
|
-
const K =
|
|
4350
|
-
() => n.streaming ? g.value.findIndex((
|
|
4351
|
-
),
|
|
4352
|
-
() => K.value < 0 && (n.streaming || n.interrupted) ||
|
|
4353
|
-
), te =
|
|
4354
|
-
() => k.value || !n.earlier && !
|
|
4355
|
-
), xe =
|
|
4349
|
+
const K = D(
|
|
4350
|
+
() => n.streaming ? g.value.findIndex((o) => o.pending) : -1
|
|
4351
|
+
), ae = D(() => g.value.findIndex((o) => o.id === n.runAnchorId)), re = D(
|
|
4352
|
+
() => K.value < 0 && (n.streaming || n.interrupted) || ae.value < 0 && !!n.run
|
|
4353
|
+
), te = D(
|
|
4354
|
+
() => k.value || !n.earlier && !R.value && !g.value.length && !re.value
|
|
4355
|
+
), xe = D(() => (n.chats ?? []).slice(0, 3)), ue = D(
|
|
4356
4356
|
() => {
|
|
4357
|
-
var
|
|
4358
|
-
return !!((
|
|
4357
|
+
var o;
|
|
4358
|
+
return !!((o = n.chats) != null && o.length) || !!n.chatsLoading || !!n.chatsError || _.value;
|
|
4359
4359
|
}
|
|
4360
4360
|
);
|
|
4361
4361
|
se(
|
|
4362
4362
|
[te, () => n.chatId],
|
|
4363
|
-
([
|
|
4364
|
-
|
|
4363
|
+
([o, p]) => {
|
|
4364
|
+
o && p && !k.value && r("loadChats");
|
|
4365
4365
|
},
|
|
4366
4366
|
{ immediate: !0 }
|
|
4367
4367
|
);
|
|
4368
|
-
const we =
|
|
4368
|
+
const we = D(
|
|
4369
4369
|
() => _.value ? Y.value : [{ key: "recent", label: "", chats: xe.value }]
|
|
4370
4370
|
);
|
|
4371
|
-
function ne(
|
|
4371
|
+
function ne(o) {
|
|
4372
4372
|
var W;
|
|
4373
|
-
const p =
|
|
4373
|
+
const p = o === K.value, G = o === ae.value;
|
|
4374
4374
|
return {
|
|
4375
4375
|
active: p && n.streaming || G && ((W = n.run) == null ? void 0 : W.status) === "running" && !n.runStale,
|
|
4376
4376
|
// a run card left behind by a newer streaming turn shows its own work, not that turn's phase
|
|
4377
4377
|
phase: p || !n.streaming ? n.phase : "updating",
|
|
4378
|
-
phases: Cn(g.value[
|
|
4378
|
+
phases: Cn(g.value[o]),
|
|
4379
4379
|
run: G ? n.run : null,
|
|
4380
4380
|
slow: p && n.slow,
|
|
4381
4381
|
startedAt: p && n.streaming ? n.startedAt ?? null : null,
|
|
@@ -4384,65 +4384,65 @@ const Lr = (t) => ce(
|
|
|
4384
4384
|
retryError: G ? n.retryError : ""
|
|
4385
4385
|
};
|
|
4386
4386
|
}
|
|
4387
|
-
const _e = ["one", "two", "three"], pe =
|
|
4388
|
-
() => n.starters ?? (n.blank ? _e.map((
|
|
4389
|
-
label: a(`reportV5.reportAi.chat.suggestNew.${
|
|
4390
|
-
prompt: a(`reportV5.reportAi.chat.suggestNew.${
|
|
4387
|
+
const _e = ["one", "two", "three"], pe = D(
|
|
4388
|
+
() => n.starters ?? (n.blank ? _e.map((o) => ({
|
|
4389
|
+
label: a(`reportV5.reportAi.chat.suggestNew.${o}.label`),
|
|
4390
|
+
prompt: a(`reportV5.reportAi.chat.suggestNew.${o}.prompt`)
|
|
4391
4391
|
})) : [])
|
|
4392
4392
|
);
|
|
4393
|
-
async function he(
|
|
4393
|
+
async function he(o) {
|
|
4394
4394
|
var p;
|
|
4395
|
-
|
|
4395
|
+
r("editRequest", o), await ke(), (p = y.value) == null || p.focus();
|
|
4396
4396
|
}
|
|
4397
|
-
async function de(
|
|
4397
|
+
async function de(o) {
|
|
4398
4398
|
var p;
|
|
4399
|
-
|
|
4399
|
+
r("askBuilder", o), await ke(), (p = y.value) == null || p.focus();
|
|
4400
4400
|
}
|
|
4401
|
-
async function Te(
|
|
4401
|
+
async function Te(o) {
|
|
4402
4402
|
var p;
|
|
4403
|
-
Ie(
|
|
4403
|
+
Ie(o), await ke(), (p = y.value) == null || p.focus();
|
|
4404
4404
|
}
|
|
4405
|
-
function Ie(
|
|
4406
|
-
k.value ? u.value =
|
|
4405
|
+
function Ie(o) {
|
|
4406
|
+
k.value ? u.value = o : r("update:draft", o);
|
|
4407
4407
|
}
|
|
4408
|
-
const h =
|
|
4408
|
+
const h = E(), I = E(!0), O = E(!1);
|
|
4409
4409
|
function F() {
|
|
4410
|
-
const
|
|
4411
|
-
|
|
4410
|
+
const o = h.value;
|
|
4411
|
+
o && (I.value = o.scrollHeight - o.scrollTop - o.clientHeight <= zr, I.value && (O.value = !1));
|
|
4412
4412
|
}
|
|
4413
4413
|
async function J() {
|
|
4414
4414
|
await ke();
|
|
4415
|
-
const
|
|
4416
|
-
|
|
4415
|
+
const o = h.value;
|
|
4416
|
+
o && (o.scrollTop = o.scrollHeight, I.value = !0, O.value = !1);
|
|
4417
4417
|
}
|
|
4418
4418
|
se(
|
|
4419
4419
|
() => JSON.stringify(n.messages ?? []).length,
|
|
4420
4420
|
() => {
|
|
4421
|
-
I.value ? J() :
|
|
4421
|
+
I.value ? J() : O.value = !0;
|
|
4422
4422
|
}
|
|
4423
4423
|
);
|
|
4424
4424
|
function H() {
|
|
4425
4425
|
if (k.value) {
|
|
4426
|
-
if (!u.value.trim() || n.busy || n.targetStale ||
|
|
4427
|
-
|
|
4426
|
+
if (!u.value.trim() || n.busy || n.targetStale || $.value) return;
|
|
4427
|
+
$.value = !0, r("newChat", u.value.trim());
|
|
4428
4428
|
return;
|
|
4429
4429
|
}
|
|
4430
|
-
!n.draft.trim() || n.streaming || n.targetStale || (
|
|
4430
|
+
!n.draft.trim() || n.streaming || n.targetStale || (r("submit"), J());
|
|
4431
4431
|
}
|
|
4432
|
-
return (
|
|
4433
|
-
var Se, be, Ne, Re, Me,
|
|
4432
|
+
return (o, p) => {
|
|
4433
|
+
var Se, be, Ne, Re, Me, l;
|
|
4434
4434
|
const G = Oe("FmIcon"), W = Oe("FmTooltip"), ge = Oe("FmButton");
|
|
4435
|
-
return
|
|
4435
|
+
return d(), m("aside", {
|
|
4436
4436
|
class: "flex h-full min-h-0 w-full flex-col border-l border-fm-color-border-secondary bg-fm-color-neutral-white",
|
|
4437
4437
|
"aria-label": v.value,
|
|
4438
4438
|
onKeydown: V
|
|
4439
4439
|
}, [
|
|
4440
|
-
C("header",
|
|
4441
|
-
C("div",
|
|
4442
|
-
C("h2",
|
|
4443
|
-
!te.value &&
|
|
4440
|
+
C("header", Da, [
|
|
4441
|
+
C("div", Ba, [
|
|
4442
|
+
C("h2", qa, w(v.value), 1),
|
|
4443
|
+
!te.value && e.chatTitle && e.chatTitle !== wt ? (d(), m("p", Va, w(e.chatTitle), 1)) : L("", !0)
|
|
4444
4444
|
]),
|
|
4445
|
-
!k.value || _.value ? (
|
|
4445
|
+
!k.value || _.value ? (d(), ve(W, {
|
|
4446
4446
|
key: 0,
|
|
4447
4447
|
placement: "bottom",
|
|
4448
4448
|
content: b(a)("reportV5.reportAi.chat.chats")
|
|
@@ -4451,19 +4451,19 @@ const Lr = (t) => ce(
|
|
|
4451
4451
|
C("button", {
|
|
4452
4452
|
"data-testid": "report-canvas-chat-back",
|
|
4453
4453
|
class: "chat-icon-button flex h-[36px] w-[36px] shrink-0 items-center justify-center rounded-md text-fm-color-typo-secondary",
|
|
4454
|
-
disabled:
|
|
4455
|
-
"aria-label": _.value ? b(a)("reportV5.reportAi.chat.recentChats") : b(a)("reportV5.reportAi.chat.openChats", { title:
|
|
4456
|
-
onClick:
|
|
4454
|
+
disabled: e.busy,
|
|
4455
|
+
"aria-label": _.value ? b(a)("reportV5.reportAi.chat.recentChats") : b(a)("reportV5.reportAi.chat.openChats", { title: N.value }),
|
|
4456
|
+
onClick: P
|
|
4457
4457
|
}, [
|
|
4458
4458
|
ee(G, {
|
|
4459
4459
|
name: "chevron_left",
|
|
4460
4460
|
size: "md"
|
|
4461
4461
|
})
|
|
4462
|
-
], 8,
|
|
4462
|
+
], 8, Fa)
|
|
4463
4463
|
]),
|
|
4464
4464
|
_: 1
|
|
4465
|
-
}, 8, ["content"])) :
|
|
4466
|
-
te.value ?
|
|
4465
|
+
}, 8, ["content"])) : L("", !0),
|
|
4466
|
+
te.value ? L("", !0) : (d(), ve(W, {
|
|
4467
4467
|
key: 1,
|
|
4468
4468
|
placement: "bottom",
|
|
4469
4469
|
content: b(a)("reportV5.reportAi.chat.newChat")
|
|
@@ -4472,17 +4472,17 @@ const Lr = (t) => ce(
|
|
|
4472
4472
|
C("button", {
|
|
4473
4473
|
"data-testid": "report-canvas-new-chat",
|
|
4474
4474
|
class: "chat-icon-button flex h-[36px] w-[36px] shrink-0 items-center justify-center rounded-md text-fm-color-typo-secondary",
|
|
4475
|
-
disabled:
|
|
4475
|
+
disabled: e.busy,
|
|
4476
4476
|
"aria-label": b(a)("reportV5.reportAi.chat.newChat"),
|
|
4477
|
-
title:
|
|
4478
|
-
onClick:
|
|
4477
|
+
title: e.busy ? b(a)("reportV5.reportAi.chat.waitForUpdate") : void 0,
|
|
4478
|
+
onClick: M
|
|
4479
4479
|
}, [
|
|
4480
4480
|
ee(G, {
|
|
4481
4481
|
name: "edit_square",
|
|
4482
4482
|
size: "md",
|
|
4483
4483
|
outline: ""
|
|
4484
4484
|
})
|
|
4485
|
-
], 8,
|
|
4485
|
+
], 8, Ua)
|
|
4486
4486
|
]),
|
|
4487
4487
|
_: 1
|
|
4488
4488
|
}, 8, ["content"])),
|
|
@@ -4495,38 +4495,38 @@ const Lr = (t) => ce(
|
|
|
4495
4495
|
"data-testid": "report-canvas-chat-close",
|
|
4496
4496
|
class: "chat-icon-button flex h-[36px] w-[36px] shrink-0 items-center justify-center rounded-md text-fm-color-typo-secondary",
|
|
4497
4497
|
"aria-label": b(a)("reportV5.reportAi.chat.hide"),
|
|
4498
|
-
onClick: p[0] || (p[0] = (s) =>
|
|
4498
|
+
onClick: p[0] || (p[0] = (s) => r("close"))
|
|
4499
4499
|
}, [
|
|
4500
4500
|
ee(G, {
|
|
4501
4501
|
name: "close",
|
|
4502
4502
|
size: "md"
|
|
4503
4503
|
})
|
|
4504
|
-
], 8,
|
|
4504
|
+
], 8, Ha)
|
|
4505
4505
|
]),
|
|
4506
4506
|
_: 1
|
|
4507
4507
|
}, 8, ["content"])
|
|
4508
4508
|
]),
|
|
4509
|
-
te.value ? (
|
|
4509
|
+
te.value ? (d(), m("div", {
|
|
4510
4510
|
key: 0,
|
|
4511
4511
|
"data-testid": k.value ? "report-canvas-chat-list" : "report-canvas-chat-home",
|
|
4512
4512
|
class: "flex min-h-0 grow flex-col overflow-y-auto px-[20px] py-24",
|
|
4513
4513
|
"aria-label": b(a)("reportV5.reportAi.chat.chats")
|
|
4514
4514
|
}, [
|
|
4515
|
-
_.value ?
|
|
4516
|
-
C("div",
|
|
4517
|
-
C("h3",
|
|
4518
|
-
C("p",
|
|
4519
|
-
|
|
4515
|
+
_.value ? L("", !0) : (d(), m("div", Ga, [
|
|
4516
|
+
C("div", Ya, [
|
|
4517
|
+
C("h3", Xa, w(((Se = e.copy) == null ? void 0 : Se.welcome) ?? b(a)("reportV5.reportAi.chat.exploreTitle")), 1),
|
|
4518
|
+
C("p", Ka, w(((be = e.copy) == null ? void 0 : be.hint) ?? b(a)(
|
|
4519
|
+
e.blank ? "reportV5.reportAi.chat.placeholderNew" : "reportV5.reportAi.chat.exploreHint"
|
|
4520
4520
|
)), 1)
|
|
4521
4521
|
]),
|
|
4522
|
-
pe.value.length ? (
|
|
4523
|
-
(
|
|
4522
|
+
pe.value.length ? (d(), m("div", Ja, [
|
|
4523
|
+
(d(!0), m(fe, null, me(pe.value, (s) => (d(), m("button", {
|
|
4524
4524
|
key: s.label,
|
|
4525
4525
|
"data-testid": "report-canvas-suggestion",
|
|
4526
4526
|
class: "chat-row fm-typo-en-body-md-600 flex w-full items-center justify-between gap-12 rounded-md px-8 py-12 text-left text-fm-color-primary",
|
|
4527
|
-
disabled:
|
|
4527
|
+
disabled: e.busy,
|
|
4528
4528
|
title: s.prompt,
|
|
4529
|
-
onClick: (
|
|
4529
|
+
onClick: (f) => Te(s.prompt)
|
|
4530
4530
|
}, [
|
|
4531
4531
|
C("span", null, w(s.label), 1),
|
|
4532
4532
|
ee(G, {
|
|
@@ -4534,73 +4534,73 @@ const Lr = (t) => ce(
|
|
|
4534
4534
|
size: "sm",
|
|
4535
4535
|
class: "shrink-0"
|
|
4536
4536
|
})
|
|
4537
|
-
], 8,
|
|
4538
|
-
])) :
|
|
4537
|
+
], 8, Qa))), 128))
|
|
4538
|
+
])) : L("", !0)
|
|
4539
4539
|
])),
|
|
4540
|
-
ue.value ? (
|
|
4540
|
+
ue.value ? (d(), m("section", {
|
|
4541
4541
|
key: 1,
|
|
4542
4542
|
class: "shrink-0 pt-24",
|
|
4543
4543
|
"aria-label": b(a)("reportV5.reportAi.chat.recentChats")
|
|
4544
4544
|
}, [
|
|
4545
|
-
C("h3",
|
|
4545
|
+
C("h3", er, w(b(a)(
|
|
4546
4546
|
_.value ? "reportV5.reportAi.chat.yourChats" : "reportV5.reportAi.chat.recentChats"
|
|
4547
4547
|
)), 1),
|
|
4548
|
-
|
|
4548
|
+
e.chatsLoading && !((Ne = e.chats) != null && Ne.length) ? (d(), m("p", tr, w(b(a)("reportV5.reportAi.chat.loadingChats")), 1)) : e.chatsError ? (d(), m("p", nr, w(e.chatsError), 1)) : (Re = e.chats) != null && Re.length ? (d(!0), m(fe, { key: 3 }, me(we.value, (s) => (d(), m("section", {
|
|
4549
4549
|
key: s.key,
|
|
4550
4550
|
class: et(_.value ? "mb-16" : "")
|
|
4551
4551
|
}, [
|
|
4552
|
-
s.label ? (
|
|
4553
|
-
(
|
|
4554
|
-
key:
|
|
4552
|
+
s.label ? (d(), m("p", rr, w(s.label), 1)) : L("", !0),
|
|
4553
|
+
(d(!0), m(fe, null, me(s.chats, (f) => (d(), m("button", {
|
|
4554
|
+
key: f.id,
|
|
4555
4555
|
"data-testid": "report-canvas-chat-list-item",
|
|
4556
4556
|
class: "chat-row flex w-full items-center gap-12 rounded-md px-8 py-12 text-left",
|
|
4557
|
-
disabled:
|
|
4558
|
-
"aria-current":
|
|
4559
|
-
title:
|
|
4560
|
-
onClick: (S) =>
|
|
4557
|
+
disabled: e.busy,
|
|
4558
|
+
"aria-current": f.id === e.chatId ? "true" : void 0,
|
|
4559
|
+
title: f.title,
|
|
4560
|
+
onClick: (S) => z(f.id)
|
|
4561
4561
|
}, [
|
|
4562
|
-
C("span",
|
|
4562
|
+
C("span", ir, w(f.title), 1),
|
|
4563
4563
|
C("time", {
|
|
4564
|
-
datetime:
|
|
4564
|
+
datetime: f.lastMessageAt,
|
|
4565
4565
|
class: "fm-typo-en-body-sm-400 shrink-0 text-fm-color-typo-secondary"
|
|
4566
|
-
}, w(X(
|
|
4567
|
-
], 8,
|
|
4568
|
-
], 2))), 128)) : (
|
|
4569
|
-
_.value ?
|
|
4566
|
+
}, w(X(f)), 9, sr)
|
|
4567
|
+
], 8, or))), 128))
|
|
4568
|
+
], 2))), 128)) : (d(), m("p", ar, w(b(a)("reportV5.reportAi.chat.noChats")), 1)),
|
|
4569
|
+
_.value ? e.chatsCursor ? (d(), m("button", {
|
|
4570
4570
|
key: 5,
|
|
4571
4571
|
"data-testid": "report-canvas-chat-list-more",
|
|
4572
4572
|
class: "chat-row fm-typo-en-body-sm-600 rounded-md px-8 py-12 text-fm-color-typo-secondary",
|
|
4573
|
-
disabled:
|
|
4574
|
-
onClick: p[1] || (p[1] = (s) =>
|
|
4575
|
-
}, w(b(a)("reportV5.reportAi.chat.loadMoreChats")), 9,
|
|
4573
|
+
disabled: e.chatsLoading,
|
|
4574
|
+
onClick: p[1] || (p[1] = (s) => r("loadMoreChats"))
|
|
4575
|
+
}, w(b(a)("reportV5.reportAi.chat.loadMoreChats")), 9, fr)) : L("", !0) : (d(), m("button", {
|
|
4576
4576
|
key: 4,
|
|
4577
4577
|
"data-testid": "report-canvas-chat-see-all",
|
|
4578
4578
|
class: "chat-row fm-typo-en-body-sm-600 mt-8 rounded-md px-8 py-12 text-fm-color-typo-secondary",
|
|
4579
|
-
disabled:
|
|
4580
|
-
onClick:
|
|
4581
|
-
}, w(b(a)("reportV5.reportAi.chat.seeAll")), 9,
|
|
4582
|
-
], 8,
|
|
4583
|
-
|
|
4584
|
-
], 8,
|
|
4579
|
+
disabled: e.chatsLoading,
|
|
4580
|
+
onClick: B
|
|
4581
|
+
}, w(b(a)("reportV5.reportAi.chat.seeAll")), 9, lr))
|
|
4582
|
+
], 8, Za)) : L("", !0),
|
|
4583
|
+
e.error ? (d(), m("p", dr, w(e.error), 1)) : L("", !0)
|
|
4584
|
+
], 8, Wa)) : (d(), m("div", cr, [
|
|
4585
4585
|
C("div", {
|
|
4586
4586
|
ref_key: "scroller",
|
|
4587
4587
|
ref: h,
|
|
4588
4588
|
class: "min-h-0 grow overflow-y-auto px-[20px] py-16",
|
|
4589
4589
|
onScroll: F
|
|
4590
4590
|
}, [
|
|
4591
|
-
|
|
4592
|
-
|
|
4591
|
+
R.value ? (d(), m("p", mr, w(b(a)("reportV5.reportAi.chat.loadingChat")), 1)) : (d(), m(fe, { key: 1 }, [
|
|
4592
|
+
e.earlier ? (d(), m("button", {
|
|
4593
4593
|
key: 0,
|
|
4594
4594
|
"data-testid": "report-canvas-load-earlier",
|
|
4595
4595
|
class: "fm-typo-en-body-sm-600 mb-16 w-full text-fm-color-typo-secondary disabled:opacity-50",
|
|
4596
|
-
disabled:
|
|
4597
|
-
onClick: p[2] || (p[2] = (s) =>
|
|
4598
|
-
}, w(b(a)("reportV5.reportAi.chat.loadEarlier")), 9,
|
|
4599
|
-
(
|
|
4596
|
+
disabled: e.loadingEarlier,
|
|
4597
|
+
onClick: p[2] || (p[2] = (s) => r("loadEarlier"))
|
|
4598
|
+
}, w(b(a)("reportV5.reportAi.chat.loadEarlier")), 9, ur)) : L("", !0),
|
|
4599
|
+
(d(!0), m(fe, null, me(g.value, (s, f) => (d(), m("div", {
|
|
4600
4600
|
key: s.id,
|
|
4601
4601
|
class: "mb-16"
|
|
4602
4602
|
}, [
|
|
4603
|
-
s.targets.length ? (
|
|
4603
|
+
s.targets.length ? (d(), m("p", pr, w(b(a)("reportV5.reportAi.chat.commentOn", {
|
|
4604
4604
|
widget: [
|
|
4605
4605
|
...new Set(
|
|
4606
4606
|
s.targets.map(
|
|
@@ -4608,50 +4608,49 @@ const Lr = (t) => ce(
|
|
|
4608
4608
|
)
|
|
4609
4609
|
)
|
|
4610
4610
|
].join(", ")
|
|
4611
|
-
})), 1)) :
|
|
4612
|
-
s.role === "user" ? (
|
|
4611
|
+
})), 1)) : L("", !0),
|
|
4612
|
+
s.role === "user" ? (d(), m("div", hr, [
|
|
4613
4613
|
C("div", {
|
|
4614
4614
|
"data-testid": "report-canvas-user-message",
|
|
4615
4615
|
class: et([
|
|
4616
4616
|
"fm-typo-en-body-md-400 max-w-[90%] whitespace-pre-wrap rounded-md px-12 py-8 !leading-[21px]",
|
|
4617
|
-
|
|
4617
|
+
c.value.has(s.id) ? "bg-fm-color-neutral-gray-100 text-fm-color-typo-secondary" : "bg-fm-color-system-info-100"
|
|
4618
4618
|
])
|
|
4619
4619
|
}, w(s.answer), 3),
|
|
4620
|
-
|
|
4620
|
+
c.value.has(s.id) ? (d(), m("p", gr, [
|
|
4621
4621
|
Ce(w(b(a)("reportV5.reportAi.chat.notSent")) + " ", 1),
|
|
4622
4622
|
C("button", {
|
|
4623
4623
|
"data-testid": "chat-message-resend",
|
|
4624
4624
|
class: "ml-4 underline disabled:opacity-50",
|
|
4625
|
-
disabled:
|
|
4626
|
-
onClick: (S) =>
|
|
4627
|
-
}, w(b(a)("reportV5.reportAi.chat.resend")), 9,
|
|
4628
|
-
])) : U.value.has(s.id) ? (
|
|
4625
|
+
disabled: e.streaming || e.busy,
|
|
4626
|
+
onClick: (S) => r("resend", s.id)
|
|
4627
|
+
}, w(b(a)("reportV5.reportAi.chat.resend")), 9, br)
|
|
4628
|
+
])) : U.value.has(s.id) ? (d(), m("p", vr, [
|
|
4629
4629
|
Ce(w(b(a)("reportV5.reportAi.chat.noReply")) + " ", 1),
|
|
4630
4630
|
C("button", {
|
|
4631
4631
|
"data-testid": "chat-message-ask-again",
|
|
4632
4632
|
class: "ml-4 underline disabled:opacity-50",
|
|
4633
|
-
disabled:
|
|
4634
|
-
onClick: (S) =>
|
|
4635
|
-
}, w(b(a)("reportV5.reportAi.chat.resend")), 9,
|
|
4636
|
-
])) : Z.value.has(s.turnId) ? (
|
|
4633
|
+
disabled: e.streaming || e.busy,
|
|
4634
|
+
onClick: (S) => r("askAgain", s.id)
|
|
4635
|
+
}, w(b(a)("reportV5.reportAi.chat.resend")), 9, yr)
|
|
4636
|
+
])) : Z.value.has(s.turnId) ? (d(), m("button", {
|
|
4637
4637
|
key: 2,
|
|
4638
4638
|
"data-testid": "chat-turn-undo",
|
|
4639
4639
|
class: "fm-typo-en-body-sm-400 mt-4 text-fm-color-typo-secondary underline disabled:opacity-50",
|
|
4640
|
-
disabled:
|
|
4641
|
-
onClick: (S) =>
|
|
4642
|
-
}, w(b(a)("reportV5.reportCanvas.draft.undo")), 9,
|
|
4643
|
-
])) : (
|
|
4644
|
-
|
|
4640
|
+
disabled: e.undoing || e.streaming,
|
|
4641
|
+
onClick: (S) => r("undo", s.turnId)
|
|
4642
|
+
}, w(b(a)("reportV5.reportCanvas.draft.undo")), 9, xr)) : L("", !0)
|
|
4643
|
+
])) : (d(), m(fe, { key: 2 }, [
|
|
4644
|
+
f === K.value || f === ae.value ? (d(), ve(vt, ot({
|
|
4645
4645
|
key: 0,
|
|
4646
|
-
class: "mb-8"
|
|
4647
|
-
|
|
4648
|
-
|
|
4649
|
-
onRetry: p[3] || (p[3] = (S) => o("retry", S)),
|
|
4646
|
+
class: "mb-8"
|
|
4647
|
+
}, { ref_for: !0 }, ne(f), {
|
|
4648
|
+
onRetry: p[3] || (p[3] = (S) => r("retry", S)),
|
|
4650
4649
|
onAskBuilder: de,
|
|
4651
|
-
onCheckStatus: p[4] || (p[4] = (S) =>
|
|
4652
|
-
}), null, 16)) :
|
|
4653
|
-
s.failure ? (
|
|
4654
|
-
C("p",
|
|
4650
|
+
onCheckStatus: p[4] || (p[4] = (S) => r("checkStatus"))
|
|
4651
|
+
}), null, 16)) : L("", !0),
|
|
4652
|
+
s.failure ? (d(), m("div", wr, [
|
|
4653
|
+
C("p", kr, [
|
|
4655
4654
|
ee(G, {
|
|
4656
4655
|
name: "error",
|
|
4657
4656
|
size: "sm",
|
|
@@ -4659,410 +4658,410 @@ const Lr = (t) => ce(
|
|
|
4659
4658
|
}),
|
|
4660
4659
|
Ce(" " + w(b(a)("reportV5.reportAi.build.failed.title")), 1)
|
|
4661
4660
|
]),
|
|
4662
|
-
C("p",
|
|
4663
|
-
|
|
4661
|
+
C("p", _r, w(b(a)(`reportV5.reportAi.build.failed.${b(Rn)(s.failure.code)}`)), 1),
|
|
4662
|
+
f === g.value.length - 1 && q(f) ? (d(), m("div", Ir, [
|
|
4664
4663
|
ee(ge, {
|
|
4665
4664
|
"data-testid": "report-canvas-try-again",
|
|
4666
4665
|
variant: "primary",
|
|
4667
4666
|
label: b(a)("reportV5.reportAi.build.failed.tryAgain"),
|
|
4668
|
-
disabled:
|
|
4669
|
-
onClick: (S) =>
|
|
4667
|
+
disabled: e.streaming || e.busy,
|
|
4668
|
+
onClick: (S) => r("askAgain", q(f))
|
|
4670
4669
|
}, null, 8, ["label", "disabled", "onClick"]),
|
|
4671
4670
|
ee(ge, {
|
|
4672
4671
|
"data-testid": "report-canvas-edit-request",
|
|
4673
4672
|
variant: "secondary",
|
|
4674
4673
|
label: b(a)("reportV5.reportAi.build.failed.editRequest"),
|
|
4675
|
-
disabled:
|
|
4676
|
-
onClick: (S) => he(q(
|
|
4674
|
+
disabled: e.streaming || e.busy,
|
|
4675
|
+
onClick: (S) => he(q(f))
|
|
4677
4676
|
}, null, 8, ["label", "disabled", "onClick"])
|
|
4678
|
-
])) :
|
|
4679
|
-
s.failure.ref ? (
|
|
4680
|
-
])) : s.blocks.length ? (
|
|
4677
|
+
])) : L("", !0),
|
|
4678
|
+
s.failure.ref ? (d(), m("p", Sr, w(b(a)("reportV5.reportAi.build.failed.ref", { ref: s.failure.ref })), 1)) : L("", !0)
|
|
4679
|
+
])) : s.blocks.length ? (d(), ve(ja, {
|
|
4681
4680
|
key: 2,
|
|
4682
4681
|
"data-testid": "report-canvas-answer",
|
|
4683
4682
|
blocks: s.blocks,
|
|
4684
4683
|
preview: s.preview
|
|
4685
|
-
}, null, 8, ["blocks", "preview"])) : s.noSummary ? (
|
|
4686
|
-
s.ms ? (
|
|
4684
|
+
}, null, 8, ["blocks", "preview"])) : s.noSummary ? (d(), m("p", Ar, w(b(a)("reportV5.reportAi.chat.noSummary")), 1)) : L("", !0),
|
|
4685
|
+
s.ms ? (d(), m("p", Cr, w(b(a)("reportV5.reportAi.chat.took", { duration: b(Nn)(s.ms) })), 1)) : L("", !0)
|
|
4687
4686
|
], 64))
|
|
4688
4687
|
]))), 128)),
|
|
4689
|
-
|
|
4688
|
+
re.value ? (d(), ve(vt, ot({
|
|
4690
4689
|
key: 1,
|
|
4691
4690
|
class: "mb-16"
|
|
4692
4691
|
}, ne(-1), {
|
|
4693
|
-
onRetry: p[5] || (p[5] = (s) =>
|
|
4692
|
+
onRetry: p[5] || (p[5] = (s) => r("retry", s)),
|
|
4694
4693
|
onAskBuilder: de,
|
|
4695
|
-
onCheckStatus: p[6] || (p[6] = (s) =>
|
|
4696
|
-
}), null, 16)) :
|
|
4697
|
-
|
|
4694
|
+
onCheckStatus: p[6] || (p[6] = (s) => r("checkStatus"))
|
|
4695
|
+
}), null, 16)) : L("", !0),
|
|
4696
|
+
e.error ? (d(), m("p", Er, w(e.error), 1)) : L("", !0)
|
|
4698
4697
|
], 64))
|
|
4699
4698
|
], 544),
|
|
4700
|
-
|
|
4699
|
+
O.value ? (d(), m("button", {
|
|
4701
4700
|
key: 0,
|
|
4702
4701
|
"data-testid": "report-canvas-jump-latest",
|
|
4703
4702
|
class: "fm-typo-en-body-sm-600 absolute bottom-12 left-1/2 -translate-x-1/2 rounded-full border border-fm-color-border-secondary bg-fm-color-neutral-white px-12 py-4 shadow-sm",
|
|
4704
4703
|
onClick: J
|
|
4705
|
-
}, w(b(a)("reportV5.reportAi.chat.jumpToLatest")), 1)) :
|
|
4704
|
+
}, w(b(a)("reportV5.reportAi.chat.jumpToLatest")), 1)) : L("", !0)
|
|
4706
4705
|
])),
|
|
4707
|
-
C("div",
|
|
4708
|
-
ee(
|
|
4706
|
+
C("div", Tr, [
|
|
4707
|
+
ee(Ra, {
|
|
4709
4708
|
ref_key: "composer",
|
|
4710
4709
|
ref: y,
|
|
4711
|
-
draft: k.value ? u.value :
|
|
4712
|
-
target:
|
|
4713
|
-
targets:
|
|
4714
|
-
"target-stale":
|
|
4715
|
-
streaming:
|
|
4716
|
-
blank:
|
|
4717
|
-
stoppable: !!
|
|
4718
|
-
stopping:
|
|
4719
|
-
"target-label": (Me =
|
|
4720
|
-
placeholder: (
|
|
4710
|
+
draft: k.value ? u.value : e.draft,
|
|
4711
|
+
target: e.target,
|
|
4712
|
+
targets: e.targets,
|
|
4713
|
+
"target-stale": e.targetStale,
|
|
4714
|
+
streaming: e.streaming || e.switching || $.value || k.value && !!e.busy,
|
|
4715
|
+
blank: e.blank,
|
|
4716
|
+
stoppable: !!e.stoppable && !k.value,
|
|
4717
|
+
stopping: e.stopping,
|
|
4718
|
+
"target-label": (Me = e.copy) == null ? void 0 : Me.target,
|
|
4719
|
+
placeholder: (l = e.copy) == null ? void 0 : l.placeholder,
|
|
4721
4720
|
"onUpdate:draft": Ie,
|
|
4722
4721
|
onSubmit: H,
|
|
4723
|
-
onClearTarget: p[7] || (p[7] = (s) =>
|
|
4724
|
-
onStop: p[8] || (p[8] = (s) =>
|
|
4722
|
+
onClearTarget: p[7] || (p[7] = (s) => r("clearTarget", s)),
|
|
4723
|
+
onStop: p[8] || (p[8] = (s) => r("stop"))
|
|
4725
4724
|
}, null, 8, ["draft", "target", "targets", "target-stale", "streaming", "blank", "stoppable", "stopping", "target-label", "placeholder"])
|
|
4726
4725
|
])
|
|
4727
|
-
], 40, $
|
|
4726
|
+
], 40, $a);
|
|
4728
4727
|
};
|
|
4729
4728
|
}
|
|
4730
|
-
}), so = /* @__PURE__ */ Tt(
|
|
4731
|
-
function Ee(
|
|
4732
|
-
const { businessId:
|
|
4733
|
-
if (!
|
|
4734
|
-
return `/${
|
|
4729
|
+
}), so = /* @__PURE__ */ Tt(Nr, [["__scopeId", "data-v-cbe24113"]]);
|
|
4730
|
+
function Ee(e) {
|
|
4731
|
+
const { businessId: t } = ze(De());
|
|
4732
|
+
if (!t.value) throw new Error("Business Id is not defined");
|
|
4733
|
+
return `/${t.value}/report-ai/${e}`;
|
|
4735
4734
|
}
|
|
4736
|
-
const
|
|
4735
|
+
const Rr = (e, t = {}) => {
|
|
4737
4736
|
const n = new URLSearchParams();
|
|
4738
|
-
|
|
4739
|
-
const
|
|
4737
|
+
t.sessionId && n.set("sessionId", t.sessionId), t.before && n.set("before", t.before);
|
|
4738
|
+
const r = n.toString(), a = {
|
|
4740
4739
|
fetchType: ie.Get,
|
|
4741
|
-
url: `${Ee(
|
|
4740
|
+
url: `${Ee(e)}/chat${r ? `?${r}` : ""}`
|
|
4742
4741
|
};
|
|
4743
4742
|
return oe.fetch(a);
|
|
4744
|
-
},
|
|
4743
|
+
}, Mr = (e, t) => {
|
|
4745
4744
|
const n = {
|
|
4746
4745
|
fetchType: ie.Get,
|
|
4747
|
-
url: `${Ee(
|
|
4746
|
+
url: `${Ee(e)}/chats${t ? `?cursor=${encodeURIComponent(t)}` : ""}`
|
|
4748
4747
|
};
|
|
4749
4748
|
return oe.fetch(n);
|
|
4750
|
-
},
|
|
4751
|
-
const
|
|
4749
|
+
}, Lr = (e) => {
|
|
4750
|
+
const t = {
|
|
4752
4751
|
fetchType: ie.Post,
|
|
4753
|
-
url: `${Ee(
|
|
4752
|
+
url: `${Ee(e)}/chats`,
|
|
4754
4753
|
data: {}
|
|
4755
4754
|
};
|
|
4756
|
-
return oe.fetch(
|
|
4757
|
-
}, lo = (
|
|
4755
|
+
return oe.fetch(t);
|
|
4756
|
+
}, lo = (e, t) => {
|
|
4758
4757
|
const n = {
|
|
4759
4758
|
fetchType: ie.Get,
|
|
4760
|
-
url: `${Ee(
|
|
4759
|
+
url: `${Ee(e)}/runs/latest${t ? `?sessionId=${t}` : ""}`
|
|
4761
4760
|
};
|
|
4762
4761
|
return oe.fetch(n);
|
|
4763
|
-
}, fo = (
|
|
4762
|
+
}, fo = (e, t, n, r) => {
|
|
4764
4763
|
const a = {
|
|
4765
4764
|
fetchType: ie.Post,
|
|
4766
|
-
url: `${Ee(
|
|
4767
|
-
data: { timezone:
|
|
4765
|
+
url: `${Ee(e)}/runs/${t}/sections/${n}/retry`,
|
|
4766
|
+
data: { timezone: r }
|
|
4768
4767
|
};
|
|
4769
4768
|
return oe.fetch(a);
|
|
4770
|
-
},
|
|
4769
|
+
}, Pr = (e, t) => {
|
|
4771
4770
|
const n = {
|
|
4772
4771
|
fetchType: ie.Post,
|
|
4773
|
-
url: `${Ee(
|
|
4774
|
-
data: { sessionId:
|
|
4772
|
+
url: `${Ee(e)}/chat/stop`,
|
|
4773
|
+
data: { sessionId: t }
|
|
4775
4774
|
};
|
|
4776
4775
|
return oe.fetch(n);
|
|
4777
|
-
},
|
|
4778
|
-
key:
|
|
4779
|
-
getChat: (
|
|
4780
|
-
listChats: (
|
|
4781
|
-
createChat: () =>
|
|
4782
|
-
stopChat: (
|
|
4783
|
-
chatPath: (
|
|
4784
|
-
}), co = (
|
|
4785
|
-
key: `digest:${
|
|
4786
|
-
getChat: (
|
|
4787
|
-
listChats: (
|
|
4788
|
-
createChat: () =>
|
|
4789
|
-
stopChat: (
|
|
4790
|
-
chatPath: (
|
|
4776
|
+
}, jr = (e, t) => `/${e}/report-ai/${t}/chat`, Je = 3e4, kt = 3e3, $r = "New chat", _t = 80, Dr = (e) => ({
|
|
4777
|
+
key: e,
|
|
4778
|
+
getChat: (t) => Rr(e, t),
|
|
4779
|
+
listChats: (t) => Mr(e, t),
|
|
4780
|
+
createChat: () => Lr(e),
|
|
4781
|
+
stopChat: (t) => Pr(e, t),
|
|
4782
|
+
chatPath: (t) => jr(t, e)
|
|
4783
|
+
}), co = (e) => ({
|
|
4784
|
+
key: `digest:${e}`,
|
|
4785
|
+
getChat: (t) => Qt(e, t),
|
|
4786
|
+
listChats: (t) => Jt(e, t),
|
|
4787
|
+
createChat: () => Kt(e),
|
|
4788
|
+
stopChat: (t) => Xt(e, t),
|
|
4789
|
+
chatPath: (t) => Yt(t, e)
|
|
4791
4790
|
});
|
|
4792
|
-
function Qe(
|
|
4793
|
-
return `report-canvas:chat:${
|
|
4791
|
+
function Qe(e, t) {
|
|
4792
|
+
return `report-canvas:chat:${e}:${t}`;
|
|
4794
4793
|
}
|
|
4795
|
-
function
|
|
4794
|
+
function Br(e) {
|
|
4796
4795
|
try {
|
|
4797
|
-
return window.localStorage.getItem(
|
|
4796
|
+
return window.localStorage.getItem(e) ?? void 0;
|
|
4798
4797
|
} catch {
|
|
4799
4798
|
return;
|
|
4800
4799
|
}
|
|
4801
4800
|
}
|
|
4802
|
-
function Ze(
|
|
4801
|
+
function Ze(e, t) {
|
|
4803
4802
|
try {
|
|
4804
|
-
|
|
4803
|
+
t ? window.localStorage.setItem(e, t) : window.localStorage.removeItem(e);
|
|
4805
4804
|
} catch {
|
|
4806
4805
|
}
|
|
4807
4806
|
}
|
|
4808
|
-
const It = (
|
|
4809
|
-
text:
|
|
4810
|
-
...
|
|
4811
|
-
targets:
|
|
4807
|
+
const It = (e) => Array.isArray(e) ? e : e ? [e] : [], Lt = (e, t) => ({
|
|
4808
|
+
text: e,
|
|
4809
|
+
...t.length ? { target: t[0] } : {},
|
|
4810
|
+
targets: t
|
|
4812
4811
|
});
|
|
4813
|
-
function St(
|
|
4812
|
+
function St(e) {
|
|
4814
4813
|
return Lt(
|
|
4815
|
-
|
|
4814
|
+
e.parts.filter((t) => t.type === "text").map((t) => String(t.text ?? "")).join(`
|
|
4816
4815
|
`),
|
|
4817
|
-
|
|
4816
|
+
e.parts.filter((t) => t.type === "data-edit-target").map((t) => t.data)
|
|
4818
4817
|
);
|
|
4819
4818
|
}
|
|
4820
|
-
function mo(
|
|
4821
|
-
const { businessId:
|
|
4822
|
-
se([
|
|
4823
|
-
!
|
|
4819
|
+
function mo(e) {
|
|
4820
|
+
const { businessId: t, token: n } = ze(De()), r = typeof e == "string" ? Dr(e) : e, a = E([]), i = E(), v = E(""), k = E(null), _ = E(!1), u = E([]), $ = E(null), N = E(!1), A = E(""), R = E(!1), T = E(!1), B = E(""), P = E(null), z = E(""), M = E(!1), V = E([]), Y = E(!1), X = E(null), Z = E(!1), c = E(null), y = E(!1), g = D(() => Z.value || T.value && y.value), U = E(!1);
|
|
4821
|
+
se([T, Z], ([l, s]) => {
|
|
4822
|
+
!l && !s && (U.value = !1);
|
|
4824
4823
|
});
|
|
4825
4824
|
let q, K;
|
|
4826
|
-
const
|
|
4827
|
-
function
|
|
4828
|
-
|
|
4825
|
+
const ae = [];
|
|
4826
|
+
function re(l) {
|
|
4827
|
+
ae.push(l);
|
|
4829
4828
|
}
|
|
4830
4829
|
const te = [];
|
|
4831
|
-
function xe(
|
|
4832
|
-
te.push(
|
|
4830
|
+
function xe(l) {
|
|
4831
|
+
te.push(l);
|
|
4833
4832
|
}
|
|
4834
4833
|
const ue = [];
|
|
4835
|
-
function we(
|
|
4836
|
-
ue.push(
|
|
4834
|
+
function we(l) {
|
|
4835
|
+
ue.push(l);
|
|
4837
4836
|
}
|
|
4838
4837
|
let ne = 0;
|
|
4839
4838
|
Ct() && Et(() => {
|
|
4840
4839
|
ne += 1, clearTimeout(q), clearTimeout(K);
|
|
4841
4840
|
});
|
|
4842
|
-
async function _e(
|
|
4843
|
-
const s = Qe(b(
|
|
4844
|
-
clearTimeout(q),
|
|
4841
|
+
async function _e(l) {
|
|
4842
|
+
const s = Qe(b(t.value), r.key), f = l ?? Br(s), S = ne += 1;
|
|
4843
|
+
clearTimeout(q), R.value = !0;
|
|
4845
4844
|
try {
|
|
4846
4845
|
let x;
|
|
4847
4846
|
try {
|
|
4848
|
-
x = await
|
|
4849
|
-
} catch (
|
|
4850
|
-
if (!
|
|
4851
|
-
Ze(s, void 0), x = await
|
|
4847
|
+
x = await r.getChat({ sessionId: f });
|
|
4848
|
+
} catch (j) {
|
|
4849
|
+
if (!f) throw j;
|
|
4850
|
+
Ze(s, void 0), x = await r.getChat();
|
|
4852
4851
|
}
|
|
4853
4852
|
return S !== ne ? null : (pe(x), x.latestRun ?? null);
|
|
4854
4853
|
} catch (x) {
|
|
4855
|
-
return S === ne && (
|
|
4854
|
+
return S === ne && (z.value = x instanceof Error ? x.message : String(x)), null;
|
|
4856
4855
|
} finally {
|
|
4857
|
-
S === ne && (
|
|
4856
|
+
S === ne && (R.value = !1);
|
|
4858
4857
|
}
|
|
4859
4858
|
}
|
|
4860
|
-
function pe(
|
|
4861
|
-
i.value =
|
|
4859
|
+
function pe(l) {
|
|
4860
|
+
i.value = l.sessionId ?? void 0, v.value = l.title ?? "", a.value = l.messages, k.value = l.earlier ?? null, V.value = [], z.value = "", Ze(Qe(b(t.value), r.key), l.sessionId), he(l);
|
|
4862
4861
|
}
|
|
4863
|
-
function he(
|
|
4862
|
+
function he(l) {
|
|
4864
4863
|
clearTimeout(q), clearTimeout(K);
|
|
4865
|
-
const s =
|
|
4866
|
-
if (
|
|
4867
|
-
Z.value = !1,
|
|
4864
|
+
const s = l.pending, f = l.messages[l.messages.length - 1], S = [...l.messages].reverse().find((Q) => Q.role === "user");
|
|
4865
|
+
if (c.value = s != null && s.stopped && S ? S.id : null, M.value = !1, !s || s.stopped) {
|
|
4866
|
+
Z.value = !1, T.value || (X.value = null, P.value = null, Y.value = !1);
|
|
4868
4867
|
return;
|
|
4869
4868
|
}
|
|
4870
4869
|
Z.value = !0;
|
|
4871
4870
|
const x = Date.parse(s.now) - Date.parse(s.since);
|
|
4872
4871
|
X.value = Date.now() - x;
|
|
4873
|
-
const
|
|
4874
|
-
|
|
4872
|
+
const j = (f == null ? void 0 : f.role) === "assistant" && f.inProgress ? f : void 0;
|
|
4873
|
+
j && (B.value = j.id), P.value = En(j), Y.value = x >= Je, Y.value || (K = setTimeout(() => Y.value = !0, Je - x)), q = setTimeout(() => void de(), kt);
|
|
4875
4874
|
}
|
|
4876
|
-
async function de(
|
|
4877
|
-
const s = ne,
|
|
4875
|
+
async function de(l = !1) {
|
|
4876
|
+
const s = ne, f = i.value;
|
|
4878
4877
|
try {
|
|
4879
|
-
const S = await
|
|
4880
|
-
if (s !== ne ||
|
|
4878
|
+
const S = await r.getChat({ sessionId: f });
|
|
4879
|
+
if (s !== ne || T.value || f !== i.value) return;
|
|
4881
4880
|
pe(S), (!S.pending || S.pending.stopped) && (te.forEach((x) => x()), ue.forEach((x) => x(S.latestRun ?? null)));
|
|
4882
4881
|
} catch {
|
|
4883
|
-
s === ne && (Z.value ||
|
|
4882
|
+
s === ne && (Z.value || l) && (q = setTimeout(() => void de(l), kt));
|
|
4884
4883
|
}
|
|
4885
4884
|
}
|
|
4886
|
-
async function Te(
|
|
4887
|
-
return
|
|
4885
|
+
async function Te(l) {
|
|
4886
|
+
return l === i.value || T.value || Z.value ? null : _e(l);
|
|
4888
4887
|
}
|
|
4889
4888
|
async function Ie() {
|
|
4890
|
-
if (
|
|
4891
|
-
const
|
|
4892
|
-
|
|
4889
|
+
if (T.value || Z.value) return !1;
|
|
4890
|
+
const l = ne += 1;
|
|
4891
|
+
R.value = !0;
|
|
4893
4892
|
try {
|
|
4894
|
-
const { chat: s } = await
|
|
4895
|
-
return
|
|
4893
|
+
const { chat: s } = await r.createChat();
|
|
4894
|
+
return l !== ne ? !1 : (pe({ sessionId: s.id, title: s.title, earlier: null, messages: [], latestRun: null }), u.value = [s, ...u.value.filter((f) => f.id !== s.id)], !0);
|
|
4896
4895
|
} catch (s) {
|
|
4897
|
-
return
|
|
4896
|
+
return l === ne && (z.value = s instanceof Error ? s.message : String(s)), !1;
|
|
4898
4897
|
} finally {
|
|
4899
|
-
|
|
4898
|
+
l === ne && (R.value = !1);
|
|
4900
4899
|
}
|
|
4901
4900
|
}
|
|
4902
|
-
async function h(
|
|
4903
|
-
|
|
4901
|
+
async function h(l) {
|
|
4902
|
+
N.value = !0, A.value = "";
|
|
4904
4903
|
try {
|
|
4905
|
-
const s = await
|
|
4906
|
-
u.value =
|
|
4904
|
+
const s = await r.listChats(l);
|
|
4905
|
+
u.value = l ? [...u.value, ...s.chats] : s.chats, $.value = s.cursor;
|
|
4907
4906
|
} catch (s) {
|
|
4908
4907
|
A.value = s instanceof Error ? s.message : String(s);
|
|
4909
4908
|
} finally {
|
|
4910
|
-
|
|
4909
|
+
N.value = !1;
|
|
4911
4910
|
}
|
|
4912
4911
|
}
|
|
4913
4912
|
async function I() {
|
|
4914
4913
|
if (!k.value || _.value) return;
|
|
4915
|
-
const
|
|
4914
|
+
const l = k.value, s = i.value;
|
|
4916
4915
|
_.value = !0;
|
|
4917
4916
|
try {
|
|
4918
|
-
const
|
|
4917
|
+
const f = await r.getChat({ sessionId: s, before: l });
|
|
4919
4918
|
if (s !== i.value) return;
|
|
4920
|
-
a.value = [...
|
|
4921
|
-
} catch (
|
|
4922
|
-
|
|
4919
|
+
a.value = [...f.messages, ...a.value], k.value = f.earlier ?? null;
|
|
4920
|
+
} catch (f) {
|
|
4921
|
+
z.value = f instanceof Error ? f.message : String(f);
|
|
4923
4922
|
} finally {
|
|
4924
4923
|
_.value = !1;
|
|
4925
4924
|
}
|
|
4926
4925
|
}
|
|
4927
|
-
const
|
|
4928
|
-
function F(
|
|
4929
|
-
i.value &&
|
|
4926
|
+
const O = /* @__PURE__ */ new Map();
|
|
4927
|
+
function F(l, s) {
|
|
4928
|
+
i.value && O.set(i.value, Lt(l, It(s)));
|
|
4930
4929
|
}
|
|
4931
4930
|
function J() {
|
|
4932
|
-
return i.value &&
|
|
4931
|
+
return i.value && O.get(i.value) || { text: "", targets: [] };
|
|
4933
4932
|
}
|
|
4934
|
-
function H(
|
|
4935
|
-
V.value.includes(
|
|
4933
|
+
function H(l) {
|
|
4934
|
+
V.value.includes(l) || (V.value = [...V.value, l]);
|
|
4936
4935
|
}
|
|
4937
|
-
async function
|
|
4938
|
-
const
|
|
4939
|
-
if (!g.value || U.value || !
|
|
4936
|
+
async function o() {
|
|
4937
|
+
const l = i.value;
|
|
4938
|
+
if (!g.value || U.value || !l) return null;
|
|
4940
4939
|
U.value = !0;
|
|
4941
4940
|
try {
|
|
4942
|
-
await
|
|
4943
|
-
} catch (
|
|
4944
|
-
return U.value = !1,
|
|
4941
|
+
await r.stopChat(l);
|
|
4942
|
+
} catch (f) {
|
|
4943
|
+
return U.value = !1, z.value = f instanceof Error ? f.message : String(f), null;
|
|
4945
4944
|
}
|
|
4946
|
-
const s = [...a.value].reverse().find((
|
|
4945
|
+
const s = [...a.value].reverse().find((f) => f.role === "user");
|
|
4947
4946
|
return s ? p(s.id) : null;
|
|
4948
4947
|
}
|
|
4949
|
-
function p(
|
|
4950
|
-
const s = a.value.find((
|
|
4948
|
+
function p(l) {
|
|
4949
|
+
const s = a.value.find((f) => f.id === l && f.role === "user");
|
|
4951
4950
|
return s ? St(s) : null;
|
|
4952
4951
|
}
|
|
4953
|
-
function G(
|
|
4954
|
-
const s = a.value.find((
|
|
4955
|
-
return !s || !V.value.includes(
|
|
4952
|
+
function G(l) {
|
|
4953
|
+
const s = a.value.find((f) => f.id === l);
|
|
4954
|
+
return !s || !V.value.includes(l) ? null : (a.value = a.value.filter((f) => f.id !== l), V.value = V.value.filter((f) => f !== l), St(s));
|
|
4956
4955
|
}
|
|
4957
|
-
function W(
|
|
4958
|
-
const
|
|
4959
|
-
if (
|
|
4960
|
-
const x = [...
|
|
4961
|
-
s(x), a.value = [...a.value.slice(0, -1), { ...
|
|
4956
|
+
function W(l, s) {
|
|
4957
|
+
const f = a.value[a.value.length - 1];
|
|
4958
|
+
if (f && f.role === "assistant" && f.id === l) {
|
|
4959
|
+
const x = [...f.parts];
|
|
4960
|
+
s(x), a.value = [...a.value.slice(0, -1), { ...f, parts: x }];
|
|
4962
4961
|
return;
|
|
4963
4962
|
}
|
|
4964
4963
|
const S = [];
|
|
4965
|
-
s(S), a.value = [...a.value, { id:
|
|
4964
|
+
s(S), a.value = [...a.value, { id: l, role: "assistant", parts: S }];
|
|
4966
4965
|
}
|
|
4967
|
-
function ge(
|
|
4968
|
-
for (let S =
|
|
4969
|
-
const x =
|
|
4966
|
+
function ge(l, s, f) {
|
|
4967
|
+
for (let S = l.length - 1; S >= 0; S -= 1) {
|
|
4968
|
+
const x = l[S];
|
|
4970
4969
|
if (x.type === "text" && x.id === s) {
|
|
4971
|
-
|
|
4970
|
+
l[S] = { ...x, text: String(x.text ?? "") + f };
|
|
4972
4971
|
return;
|
|
4973
4972
|
}
|
|
4974
4973
|
}
|
|
4975
|
-
|
|
4974
|
+
l.push({ type: "text", id: s, text: f, state: "streaming" });
|
|
4976
4975
|
}
|
|
4977
|
-
function Se(
|
|
4978
|
-
for (let S =
|
|
4979
|
-
const x =
|
|
4976
|
+
function Se(l, s, f) {
|
|
4977
|
+
for (let S = l.length - 1; S >= 0; S -= 1) {
|
|
4978
|
+
const x = l[S];
|
|
4980
4979
|
if (x.type.startsWith("tool-") && x.toolCallId === s)
|
|
4981
|
-
return
|
|
4980
|
+
return l[S] = { ...x, ...f }, !0;
|
|
4982
4981
|
}
|
|
4983
4982
|
return !1;
|
|
4984
4983
|
}
|
|
4985
|
-
function be(
|
|
4986
|
-
|
|
4984
|
+
function be(l, s) {
|
|
4985
|
+
l.named || (P.value = gt(P.value, Rt(s)));
|
|
4987
4986
|
}
|
|
4988
|
-
function Ne(
|
|
4989
|
-
const
|
|
4990
|
-
if (
|
|
4987
|
+
function Ne(l, s) {
|
|
4988
|
+
const f = String(l.type ?? ""), S = s.id;
|
|
4989
|
+
if (f === "start-step") {
|
|
4991
4990
|
W(S, (x) => x.push({ type: "step-start" }));
|
|
4992
4991
|
return;
|
|
4993
4992
|
}
|
|
4994
|
-
if (
|
|
4995
|
-
const x = String(
|
|
4993
|
+
if (f === "text-start") {
|
|
4994
|
+
const x = String(l.id ?? "text");
|
|
4996
4995
|
W(
|
|
4997
4996
|
S,
|
|
4998
|
-
(
|
|
4997
|
+
(j) => j.push({ type: "text", id: x, text: "", state: "streaming" })
|
|
4999
4998
|
);
|
|
5000
4999
|
return;
|
|
5001
5000
|
}
|
|
5002
|
-
if (
|
|
5003
|
-
const x = String(
|
|
5004
|
-
W(S, (
|
|
5001
|
+
if (f === "text-delta") {
|
|
5002
|
+
const x = String(l.id ?? "text");
|
|
5003
|
+
W(S, (j) => ge(j, x, String(l.delta ?? "")));
|
|
5005
5004
|
return;
|
|
5006
5005
|
}
|
|
5007
|
-
if (
|
|
5008
|
-
const x = String(
|
|
5009
|
-
W(S, (
|
|
5010
|
-
for (let Q =
|
|
5011
|
-
if (
|
|
5012
|
-
|
|
5006
|
+
if (f === "text-end") {
|
|
5007
|
+
const x = String(l.id ?? "text");
|
|
5008
|
+
W(S, (j) => {
|
|
5009
|
+
for (let Q = j.length - 1; Q >= 0; Q -= 1)
|
|
5010
|
+
if (j[Q].type === "text" && j[Q].id === x) {
|
|
5011
|
+
j[Q] = { ...j[Q], state: "done" };
|
|
5013
5012
|
return;
|
|
5014
5013
|
}
|
|
5015
5014
|
});
|
|
5016
5015
|
return;
|
|
5017
5016
|
}
|
|
5018
|
-
if (
|
|
5019
|
-
const x = String(
|
|
5017
|
+
if (f === "tool-input-start") {
|
|
5018
|
+
const x = String(l.toolName ?? ""), j = String(l.toolCallId ?? lt());
|
|
5020
5019
|
be(s, x), W(
|
|
5021
5020
|
S,
|
|
5022
|
-
(Q) => Q.push({ type: `tool-${x}`, toolCallId:
|
|
5021
|
+
(Q) => Q.push({ type: `tool-${x}`, toolCallId: j, state: "input-streaming" })
|
|
5023
5022
|
);
|
|
5024
5023
|
return;
|
|
5025
5024
|
}
|
|
5026
|
-
if (
|
|
5027
|
-
const x = String(
|
|
5025
|
+
if (f === "tool-input-available" || f === "tool-output-available") {
|
|
5026
|
+
const x = String(l.toolCallId ?? ""), j = f === "tool-input-available" ? "input-available" : "output-available";
|
|
5028
5027
|
W(S, (Q) => {
|
|
5029
|
-
!Se(Q, x, { state:
|
|
5030
|
-
}), typeof
|
|
5028
|
+
!Se(Q, x, { state: j }) && typeof l.toolName == "string" && Q.push({ type: `tool-${l.toolName}`, toolCallId: x, state: j });
|
|
5029
|
+
}), typeof l.toolName == "string" && be(s, l.toolName);
|
|
5031
5030
|
return;
|
|
5032
5031
|
}
|
|
5033
|
-
if (
|
|
5034
|
-
const x = String(
|
|
5035
|
-
W(S, (
|
|
5032
|
+
if (f === "tool-output-error") {
|
|
5033
|
+
const x = String(l.toolCallId ?? "");
|
|
5034
|
+
W(S, (j) => Se(j, x, { state: "output-error" }));
|
|
5036
5035
|
return;
|
|
5037
5036
|
}
|
|
5038
|
-
if (
|
|
5039
|
-
const x = String(
|
|
5040
|
-
W(S, (
|
|
5041
|
-
|
|
5037
|
+
if (f === "error") {
|
|
5038
|
+
const x = String(l.errorText ?? "stream error");
|
|
5039
|
+
W(S, (j) => {
|
|
5040
|
+
j.push({ type: "step-start" }), j.push({ type: "text", id: "turn-error", text: x, state: "done" });
|
|
5042
5041
|
});
|
|
5043
5042
|
return;
|
|
5044
5043
|
}
|
|
5045
|
-
if (
|
|
5046
|
-
const x =
|
|
5047
|
-
x === "plan" && typeof
|
|
5044
|
+
if (f.startsWith("data-")) {
|
|
5045
|
+
const x = f.slice(5), j = l.data ?? {};
|
|
5046
|
+
x === "plan" && typeof j.sessionId == "string" && (s.acked = !0, y.value = !0, i.value = j.sessionId, Ze(Qe(b(t.value), r.key), j.sessionId)), x === "step" && typeof j.step == "string" ? (s.named = !0, P.value = gt(P.value, j.step)) : be(s, x), W(S, (Q) => Q.push({ type: f, data: j })), ae.forEach((Q) => Q({ name: x, data: j }));
|
|
5048
5047
|
}
|
|
5049
5048
|
}
|
|
5050
|
-
function Re(
|
|
5051
|
-
if (v.value && v.value !== $
|
|
5052
|
-
const s =
|
|
5049
|
+
function Re(l) {
|
|
5050
|
+
if (v.value && v.value !== $r) return;
|
|
5051
|
+
const s = l.length > _t ? `${l.slice(0, _t - 1)}…` : l;
|
|
5053
5052
|
v.value = s, u.value = u.value.map(
|
|
5054
|
-
(
|
|
5053
|
+
(f) => f.id === i.value ? { ...f, title: s } : f
|
|
5055
5054
|
);
|
|
5056
5055
|
}
|
|
5057
|
-
async function Me(
|
|
5058
|
-
const
|
|
5059
|
-
if (!
|
|
5056
|
+
async function Me(l, s) {
|
|
5057
|
+
const f = l.trim();
|
|
5058
|
+
if (!f || T.value || Z.value) return;
|
|
5060
5059
|
const S = It(s);
|
|
5061
|
-
|
|
5060
|
+
z.value = "", M.value = !1;
|
|
5062
5061
|
const x = {
|
|
5063
5062
|
id: lt(),
|
|
5064
5063
|
role: "user",
|
|
5065
|
-
parts: [{ type: "text", text:
|
|
5064
|
+
parts: [{ type: "text", text: f }]
|
|
5066
5065
|
};
|
|
5067
5066
|
a.value = [
|
|
5068
5067
|
...a.value,
|
|
@@ -5073,14 +5072,14 @@ function mo(t) {
|
|
|
5073
5072
|
...S.map((le) => ({ type: "data-edit-target", data: le }))
|
|
5074
5073
|
]
|
|
5075
5074
|
}
|
|
5076
|
-
], Re(
|
|
5077
|
-
const
|
|
5075
|
+
], Re(f), y.value = !1, T.value = !0, P.value = null, Y.value = !1, c.value = null, X.value = Date.now(), B.value = `assistant-${Date.now()}`;
|
|
5076
|
+
const j = { id: B.value, acked: !1 }, Q = setTimeout(() => {
|
|
5078
5077
|
Y.value = !0;
|
|
5079
5078
|
}, Je);
|
|
5080
5079
|
let tt = !1;
|
|
5081
5080
|
try {
|
|
5082
5081
|
const le = await fetch(
|
|
5083
|
-
|
|
5082
|
+
Gt(r.chatPath(t.value)),
|
|
5084
5083
|
{
|
|
5085
5084
|
method: "POST",
|
|
5086
5085
|
headers: {
|
|
@@ -5099,10 +5098,10 @@ function mo(t) {
|
|
|
5099
5098
|
if (!le.ok || !le.body) {
|
|
5100
5099
|
const Ae = await le.json().catch(() => null);
|
|
5101
5100
|
if (typeof (Ae == null ? void 0 : Ae.message) == "string") {
|
|
5102
|
-
|
|
5101
|
+
z.value = Ae.message, a.value = a.value.filter((Ve) => Ve.id !== x.id);
|
|
5103
5102
|
return;
|
|
5104
5103
|
}
|
|
5105
|
-
console.warn("[report-canvas] chat rejected", { subject:
|
|
5104
|
+
console.warn("[report-canvas] chat rejected", { subject: r.key, status: le.status }), H(x.id);
|
|
5106
5105
|
return;
|
|
5107
5106
|
}
|
|
5108
5107
|
const Pt = le.body.getReader(), jt = new TextDecoder();
|
|
@@ -5116,21 +5115,21 @@ function mo(t) {
|
|
|
5116
5115
|
`);
|
|
5117
5116
|
qe = nt.pop() ?? "";
|
|
5118
5117
|
for (const $t of nt)
|
|
5119
|
-
for (const
|
|
5118
|
+
for (const at of $t.split(`
|
|
5120
5119
|
`)) {
|
|
5121
|
-
if (!
|
|
5122
|
-
const Fe =
|
|
5120
|
+
if (!at.startsWith("data:")) continue;
|
|
5121
|
+
const Fe = at.slice(5).trim();
|
|
5123
5122
|
if (!(!Fe || Fe === "[DONE]"))
|
|
5124
5123
|
try {
|
|
5125
|
-
Ne(JSON.parse(Fe),
|
|
5124
|
+
Ne(JSON.parse(Fe), j);
|
|
5126
5125
|
} catch {
|
|
5127
5126
|
}
|
|
5128
5127
|
}
|
|
5129
5128
|
}
|
|
5130
5129
|
} catch (le) {
|
|
5131
|
-
console.warn("[report-canvas] chat stream failed", { subject:
|
|
5130
|
+
console.warn("[report-canvas] chat stream failed", { subject: r.key, err: le }), j.acked ? (M.value = !0, tt = !0) : H(x.id);
|
|
5132
5131
|
} finally {
|
|
5133
|
-
clearTimeout(Q),
|
|
5132
|
+
clearTimeout(Q), T.value = !1, P.value = null, Y.value = !1, X.value = null, te.forEach((le) => le()), tt && de(!0);
|
|
5134
5133
|
}
|
|
5135
5134
|
}
|
|
5136
5135
|
return {
|
|
@@ -5140,23 +5139,23 @@ function mo(t) {
|
|
|
5140
5139
|
earlier: k,
|
|
5141
5140
|
loadingEarlier: _,
|
|
5142
5141
|
chats: u,
|
|
5143
|
-
chatsCursor:
|
|
5144
|
-
chatsLoading:
|
|
5142
|
+
chatsCursor: $,
|
|
5143
|
+
chatsLoading: N,
|
|
5145
5144
|
chatsError: A,
|
|
5146
|
-
switching:
|
|
5147
|
-
streaming:
|
|
5148
|
-
turnId:
|
|
5149
|
-
step:
|
|
5150
|
-
error:
|
|
5151
|
-
interrupted:
|
|
5145
|
+
switching: R,
|
|
5146
|
+
streaming: T,
|
|
5147
|
+
turnId: B,
|
|
5148
|
+
step: P,
|
|
5149
|
+
error: z,
|
|
5150
|
+
interrupted: M,
|
|
5152
5151
|
unsent: V,
|
|
5153
5152
|
slow: Y,
|
|
5154
5153
|
startedAt: X,
|
|
5155
5154
|
awaiting: Z,
|
|
5156
|
-
noReplyId:
|
|
5155
|
+
noReplyId: c,
|
|
5157
5156
|
stoppable: g,
|
|
5158
5157
|
stopping: U,
|
|
5159
|
-
stop:
|
|
5158
|
+
stop: o,
|
|
5160
5159
|
load: _e,
|
|
5161
5160
|
select: Te,
|
|
5162
5161
|
startChat: Ie,
|
|
@@ -5167,40 +5166,40 @@ function mo(t) {
|
|
|
5167
5166
|
takeUnsent: G,
|
|
5168
5167
|
requestOf: p,
|
|
5169
5168
|
send: Me,
|
|
5170
|
-
onLifecycle:
|
|
5169
|
+
onLifecycle: re,
|
|
5171
5170
|
onSettled: xe,
|
|
5172
5171
|
onResumed: we
|
|
5173
5172
|
};
|
|
5174
5173
|
}
|
|
5175
|
-
const
|
|
5176
|
-
function uo(
|
|
5177
|
-
const n =
|
|
5174
|
+
const qr = 380, Vr = 600, At = 'button:not([disabled]),textarea:not([disabled]),select:not([disabled]),a[href],[tabindex]:not([tabindex="-1"])';
|
|
5175
|
+
function uo(e, t) {
|
|
5176
|
+
const n = E(), r = E(), a = E(0);
|
|
5178
5177
|
let i, v = !1;
|
|
5179
5178
|
Le(() => {
|
|
5180
|
-
!n.value || typeof ResizeObserver > "u" || (i = new ResizeObserver(([
|
|
5181
|
-
a.value =
|
|
5179
|
+
!n.value || typeof ResizeObserver > "u" || (i = new ResizeObserver(([N]) => {
|
|
5180
|
+
a.value = N.contentRect.width, !v && (v = !0, k.value || (e.value = !1));
|
|
5182
5181
|
}), i.observe(n.value));
|
|
5183
5182
|
}), Pe(() => i == null ? void 0 : i.disconnect());
|
|
5184
|
-
const k =
|
|
5185
|
-
() => !a.value || a.value >=
|
|
5186
|
-
), _ =
|
|
5183
|
+
const k = D(
|
|
5184
|
+
() => !a.value || a.value >= qr + Vr
|
|
5185
|
+
), _ = D(() => e.value && !k.value && !t.value);
|
|
5187
5186
|
let u = null;
|
|
5188
|
-
se(_, async (
|
|
5189
|
-
var A,
|
|
5190
|
-
if (
|
|
5191
|
-
u = document.activeElement, await ke(), (
|
|
5187
|
+
se(_, async (N) => {
|
|
5188
|
+
var A, R, T;
|
|
5189
|
+
if (N) {
|
|
5190
|
+
u = document.activeElement, await ke(), (R = (A = r.value) == null ? void 0 : A.querySelector(At)) == null || R.focus();
|
|
5192
5191
|
return;
|
|
5193
5192
|
}
|
|
5194
|
-
(
|
|
5193
|
+
(T = u == null ? void 0 : u.focus) == null || T.call(u), u = null;
|
|
5195
5194
|
});
|
|
5196
|
-
function
|
|
5197
|
-
if (
|
|
5198
|
-
const A = [...
|
|
5195
|
+
function $(N) {
|
|
5196
|
+
if (N.key !== "Tab" || !_.value || !r.value) return;
|
|
5197
|
+
const A = [...r.value.querySelectorAll(At)];
|
|
5199
5198
|
if (!A.length) return;
|
|
5200
|
-
const
|
|
5201
|
-
document.activeElement ===
|
|
5199
|
+
const R = N.shiftKey ? A[0] : A[A.length - 1];
|
|
5200
|
+
document.activeElement === R && (N.preventDefault(), (N.shiftKey ? A[A.length - 1] : A[0]).focus());
|
|
5202
5201
|
}
|
|
5203
|
-
return Le(() => window.addEventListener("keydown",
|
|
5202
|
+
return Le(() => window.addEventListener("keydown", $, !0)), Pe(() => window.removeEventListener("keydown", $, !0)), { root: n, drawer: r, docked: k, modal: _ };
|
|
5204
5203
|
}
|
|
5205
5204
|
export {
|
|
5206
5205
|
oo as R,
|
|
@@ -5214,9 +5213,9 @@ export {
|
|
|
5214
5213
|
lo as h,
|
|
5215
5214
|
eo as i,
|
|
5216
5215
|
to as j,
|
|
5217
|
-
|
|
5218
|
-
|
|
5219
|
-
|
|
5220
|
-
|
|
5221
|
-
|
|
5216
|
+
Jr as k,
|
|
5217
|
+
Qr as l,
|
|
5218
|
+
Zr as p,
|
|
5219
|
+
ao as r,
|
|
5220
|
+
ro as u
|
|
5222
5221
|
};
|