@feedmepos/mf-report 5.34.2-beta.0 → 5.35.0-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.
Files changed (39) hide show
  1. package/dist/{App-CTNqGWu3.js → App-DQyEf0mm.js} +4 -4
  2. package/dist/{DateRangeSelect-ugBAezWv.js → DateRangeSelect-DvE_au_i.js} +1 -1
  3. package/dist/{Default.vue_vue_type_script_setup_true_lang-BgdRmAaG.js → Default.vue_vue_type_script_setup_true_lang-B5Ir3Xuu.js} +1 -1
  4. package/dist/{DigestListView-Dw2-7g3V.js → DigestListView-Cl2EK5bf.js} +3 -3
  5. package/dist/DigestReaderView-BS0iuanX.js +489 -0
  6. package/dist/{DynamicWidget.vue_vue_type_script_setup_true_lang-CQOfbsny.js → DynamicWidget.vue_vue_type_script_setup_true_lang-DfVW7Q_x.js} +173 -173
  7. package/dist/{GlobalFilterSelect.vue_vue_type_script_setup_true_lang-BQpXUl5Y.js → GlobalFilterSelect.vue_vue_type_script_setup_true_lang-Fcz2N71N.js} +175 -175
  8. package/dist/{InsightView-drYR-GoM.js → InsightView-CmA2Xi0T.js} +5 -5
  9. package/dist/{Integration-Bd5TU3TW.js → Integration-DdfS7Jgh.js} +3 -3
  10. package/dist/{Integrations-wIW0tkRi.js → Integrations-CRMbmKLq.js} +2 -2
  11. package/dist/{Layout-CpxtgZ_K.js → Layout-kcAw_A-E.js} +1 -1
  12. package/dist/{LocationSelect.vue_vue_type_script_setup_true_lang-5Wduoqrp.js → LocationSelect.vue_vue_type_script_setup_true_lang-BRYP_afx.js} +1553 -1547
  13. package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-BkyAL0XA.js → MenuTab.vue_vue_type_script_setup_true_lang-I8gsgGXJ.js} +5 -5
  14. package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-zCfpFbMB.js → NavigationTab.vue_vue_type_script_setup_true_lang-D3QOPpyj.js} +5 -5
  15. package/dist/{OverviewView-CPIbkUIQ.js → OverviewView-tS8EKm9q.js} +5 -5
  16. package/dist/{Report-DqHL8zAU.js → Report-BvJw6A0s.js} +3 -3
  17. package/dist/ReportCanvasView-Bywb09Z7.js +1066 -0
  18. package/dist/{ReportEditor-DyDsge8L.js → ReportEditor-D88J-04n.js} +7 -7
  19. package/dist/{ReportView-DK7g-7Ba.js → ReportView-DxnYH37m.js} +6 -6
  20. package/dist/{ReportViewRoute-Dpt84-XU.js → ReportViewRoute-DJdbgiqN.js} +2 -2
  21. package/dist/{Setting-Inns2xlq.js → Setting-CNrh7nBB.js} +94 -94
  22. package/dist/{Template-7ErGUPov.js → Template-BreFV27K.js} +3 -3
  23. package/dist/{TileEditor-BjWofHQ5.js → TileEditor-CLXi5in3.js} +6 -6
  24. package/dist/{TilePageStack.vue_vue_type_script_setup_true_lang-BxjkJQs_.js → TilePageStack.vue_vue_type_script_setup_true_lang-HMTKQELw.js} +2 -2
  25. package/dist/{TransitionFade-BlQMeZNA.js → TransitionFade-tUK-3l63.js} +5 -5
  26. package/dist/{app-BxEfKOCH.js → app-CwMmSHUw.js} +19 -19
  27. package/dist/app.js +1 -1
  28. package/dist/assets/{formatChartData.worker-Cpgnh20a.js → formatChartData.worker-Bt8turfo.js} +22 -22
  29. package/dist/assets/{processTableData.worker-B7I6PElJ.js → processTableData.worker-MGb36f8J.js} +22 -22
  30. package/dist/{currency-Gp2WcafT.js → currency-BUi-Xq6N.js} +1 -1
  31. package/dist/{index-CVkwce9f.js → index-cojDf4MH.js} +503 -473
  32. package/dist/{report-CYTvrsBN.js → report-CtMB0C_H.js} +1 -1
  33. package/dist/style.css +1 -1
  34. package/dist/{useDigestFont-C1lXCGD5.js → useDigestFont-HI14Bq_l.js} +1 -1
  35. package/dist/{useReportCanvasPanel-DktKsHBS.js → useReportCanvasPicks-ZAlJK9Cv.js} +1353 -1264
  36. package/dist/{useRestaurantPermission-Dhr3bCra.js → useRestaurantPermission-DO4WIH7P.js} +1 -1
  37. package/package.json +2 -2
  38. package/dist/DigestReaderView-DGYa6bGl.js +0 -526
  39. package/dist/ReportCanvasView-Dv-CsDYk.js +0 -1035
@@ -1,342 +1,362 @@
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";
1
+ import { ref as O, shallowRef as Bt, getCurrentScope as Ct, onScopeDispose as Tt, watch as ie, onMounted as Pe, onBeforeUnmount as Le, defineComponent as $e, computed as $, resolveComponent as Oe, openBlock as c, createElementBlock as p, Fragment as fe, renderList as me, createElementVNode as N, createVNode as Z, toDisplayString as A, unref as v, createCommentVNode as j, createTextVNode as Ce, createBlock as ge, nextTick as we, normalizeClass as Ze, 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
- import { detectLocale as Bt } from "@feedmepos/mf-common";
4
- import { w as oe, F as ie, u as De, a as qt, a6 as Vt, a7 as Ft, a8 as Ut, a9 as Ht, A as Wt, aa as Gt, ab as Yt, ac as Xt, ad as Kt, ae as Jt, af as Qt } from "./app-BxEfKOCH.js";
5
- import { c as Zt } from "./currency-Gp2WcafT.js";
3
+ import { detectLocale as qt } from "@feedmepos/mf-common";
4
+ import { w as re, F as oe, u as De, a as Vt, a6 as Ft, a7 as Ut, a8 as Ht, a9 as Wt, A as Gt, aa as Yt, ab as Xt, ac as Kt, ad as Jt, ae as Qt, af as Zt } from "./app-CwMmSHUw.js";
5
+ import { c as en } from "./currency-BUi-Xq6N.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-Bx7s49ra.js";
8
- import { v as lt } from "./report-CYTvrsBN.js";
9
- function ye(e) {
7
+ import { u as Be, _ as Et } from "./_plugin-vue_export-helper-Bx7s49ra.js";
8
+ import { v as lt } from "./report-CtMB0C_H.js";
9
+ function be(e) {
10
10
  const { businessId: t } = ze(De());
11
11
  if (!t.value) throw new Error("Business Id is not defined");
12
12
  return `/${t.value}/report-canvas/${e}`;
13
13
  }
14
- const Jr = (e) => {
14
+ const io = (e) => {
15
15
  const t = {
16
- fetchType: ie.Get,
17
- url: ye(e)
16
+ fetchType: oe.Get,
17
+ url: be(e)
18
18
  };
19
- return oe.fetch(t);
20
- }, en = (e, t, n, r, a, i) => {
21
- const v = {
22
- fetchType: ie.Post,
23
- url: `${ye(e)}/query/${t}`,
19
+ return re.fetch(t);
20
+ }, tn = (e, t, n, r, a, o) => {
21
+ const y = {
22
+ fetchType: oe.Post,
23
+ url: `${be(e)}/query/${t}`,
24
24
  // a draft-only query id does not exist on the published copy, so the state travels with it
25
25
  data: { params: n, timezone: r, state: a },
26
- requestConfig: { signal: i }
26
+ requestConfig: { signal: o }
27
27
  };
28
- return oe.fetch(v);
29
- }, Qr = (e, t, n, r) => {
28
+ return re.fetch(y);
29
+ }, so = (e, t, n, r) => {
30
30
  const a = {
31
- fetchType: ie.Post,
32
- url: `${ye(e)}/section/${t}/ack`,
31
+ fetchType: oe.Post,
32
+ url: `${be(e)}/section/${t}/ack`,
33
33
  data: { ...n, state: r }
34
34
  };
35
- return oe.fetch(a);
36
- }, Zr = (e) => oe.fetch({
37
- fetchType: ie.Post,
38
- url: `${ye(e)}/publish`,
35
+ return re.fetch(a);
36
+ }, lo = (e) => re.fetch({
37
+ fetchType: oe.Post,
38
+ url: `${be(e)}/publish`,
39
39
  data: {}
40
- }), eo = (e) => oe.fetch({
41
- fetchType: ie.Delete,
42
- url: `${ye(e)}/draft`
43
- }), to = (e, t) => oe.fetch({
44
- fetchType: ie.Post,
45
- url: `${ye(e)}/draft/undo`,
40
+ }), fo = (e) => re.fetch({
41
+ fetchType: oe.Delete,
42
+ url: `${be(e)}/draft`
43
+ }), co = (e, t) => re.fetch({
44
+ fetchType: oe.Post,
45
+ url: `${be(e)}/draft/undo`,
46
46
  data: { turnId: t }
47
- }), no = (e) => oe.fetch({
48
- fetchType: ie.Get,
49
- url: `${ye(e)}/versions`
50
- }), ao = (e, t) => oe.fetch({
51
- fetchType: ie.Post,
52
- url: `${ye(e)}/restore`,
47
+ }), mo = (e) => re.fetch({
48
+ fetchType: oe.Get,
49
+ url: `${be(e)}/versions`
50
+ }), uo = (e, t) => re.fetch({
51
+ fetchType: oe.Post,
52
+ url: `${be(e)}/restore`,
53
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);
54
+ }), nn = ["@from", "@to", "@locationIds", "@timezone"], et = ["@from", "@to", "@locationIds"], an = ["@timezone"], rn = ["@locationIds"], on = 1, sn = 1500;
55
+ function ln(e) {
56
+ if (!(!(e instanceof Gt) || e.status !== 429))
57
+ return Math.min(Math.max(e.retryAfterMs ?? sn, 500), 5e3);
58
58
  }
59
59
  const ft = {
60
- "en-US": Ht,
61
- "th-TH": Ut,
62
- "zh-CN": Ft,
63
- "zh-Hant": Vt
60
+ "en-US": Wt,
61
+ "th-TH": Ht,
62
+ "zh-CN": Ut,
63
+ "zh-Hant": Ft
64
64
  };
65
- function ln(e) {
66
- var a, i;
67
- const t = ft[e] ?? ft["en-US"], n = {}, r = (v, k) => {
68
- for (const [_, u] of Object.entries(v ?? {}))
69
- typeof u == "string" ? n[`${k}${_}`] = u : u && typeof u == "object" && r(u, `${k}${_}.`);
65
+ function fn(e) {
66
+ var a, o;
67
+ const t = ft[e] ?? ft["en-US"], n = {}, r = (y, x) => {
68
+ for (const [w, u] of Object.entries(y ?? {}))
69
+ typeof u == "string" ? n[`${x}${w}`] = u : u && typeof u == "object" && r(u, `${x}${w}.`);
70
70
  };
71
- return r(((i = (a = t == null ? void 0 : t.reportV5) == null ? void 0 : a.reportCanvas) == null ? void 0 : i.frame) ?? {}, ""), n;
71
+ return r(((o = (a = t == null ? void 0 : t.reportV5) == null ? void 0 : a.reportCanvas) == null ? void 0 : o.frame) ?? {}, ""), n;
72
72
  }
73
- function dt(e) {
73
+ function Ot(e) {
74
74
  return e == null ? !0 : Array.isArray(e) ? e.length === 0 : e === "";
75
75
  }
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
- const V = {}, Y = {};
80
- Ct() && Et(() => Object.values(Y).forEach((h) => h.abort()));
81
- const X = {};
82
- function Z(h) {
83
- B.push(h);
84
- }
85
- function c(h) {
86
- P.push(h);
87
- }
88
- function y(h) {
89
- A.value = { ...A.value, [h.queryId]: h }, B.forEach((I) => I(h));
90
- }
91
- function g(h) {
92
- const I = {};
93
- for (const O of h.params)
94
- I[O.name] = O.default ?? null;
76
+ function dn(e) {
77
+ return !et.some((t) => t in e && Ot(e[t] ?? null));
78
+ }
79
+ function cn(e, t) {
80
+ var r;
81
+ const n = typeof e == "string" || typeof e == "number" || typeof e == "boolean";
82
+ return (r = t == null ? void 0 : t.type) != null && r.endsWith("[]") && n ? [e] : e;
83
+ }
84
+ function mn(e, t) {
85
+ return rn.includes(e) ? t == null ? void 0 : t[e] : void 0;
86
+ }
87
+ function un(e, t, n) {
88
+ return e[t] === n ? !1 : (n ? e[t] = n : delete e[t], !0);
89
+ }
90
+ function pn(e, t, n) {
91
+ const r = e[t];
92
+ return r ? { queryId: t, runId: n, status: "ok", rows: r.rows, truncated: r.truncated } : { queryId: t, runId: n, status: "error", rows: [], truncated: !1, error: `no saved rows for ${t}` };
93
+ }
94
+ function hn(e, t, n) {
95
+ return {
96
+ queryId: e,
97
+ runId: t,
98
+ status: "ok",
99
+ rows: n.rows ?? [],
100
+ truncated: !!n.truncated,
101
+ ...typeof n.total == "number" ? { total: n.total } : {}
102
+ };
103
+ }
104
+ function gn(e, t, n) {
105
+ return {
106
+ queryId: e,
107
+ runId: t,
108
+ status: "error",
109
+ rows: [],
110
+ truncated: !1,
111
+ error: n instanceof Error ? n.message : String(n)
112
+ };
113
+ }
114
+ function po(e, t = {}) {
115
+ const n = t.frozen, r = Vt(), { dateRange: a, selectedLocationIds: o, locations: y, timezone: x } = ze(r), { country: w } = ze(De()), u = O({}), M = O([]), z = O({}), h = Bt({}), _ = O(), I = O([]), L = [], R = [], E = { ids: "[]", date: "" };
116
+ let P = !1;
117
+ const F = {}, G = {};
118
+ Ct() && Tt(() => Object.values(G).forEach((b) => b.abort()));
119
+ const Y = {};
120
+ function Q(b) {
121
+ L.push(b);
122
+ }
123
+ function m(b) {
124
+ R.push(b);
125
+ }
126
+ function k(b) {
127
+ h.value = { ...h.value, [b.queryId]: b }, L.forEach((C) => C(b));
128
+ }
129
+ function g(b) {
130
+ const C = {};
131
+ for (const D of b.params)
132
+ C[D.name] = D.default ?? null;
95
133
  if (n) {
96
- u.value = I, N.value = {};
134
+ u.value = C, z.value = {};
97
135
  return;
98
136
  }
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();
137
+ C["@from"] = a.value.startDate ?? null, C["@to"] = a.value.endDate ?? null, C["@timezone"] = x.value, C["@locationIds"] = [...o.value], u.value = C, z.value = {}, K();
100
138
  }
101
- function U() {
102
- return v.value.map((h) => h.id);
139
+ function H() {
140
+ return y.value.map((b) => b.id);
103
141
  }
104
- function q() {
142
+ function V() {
105
143
  return { startDate: a.value.startDate, endDate: a.value.endDate };
106
144
  }
107
145
  function K() {
108
- z.ids = JSON.stringify([...i.value]), z.date = JSON.stringify(q());
146
+ E.ids = JSON.stringify([...o.value]), E.date = JSON.stringify(V());
109
147
  }
110
- function ae() {
148
+ function ne() {
111
149
  if (n) return;
112
- const h = u.value["@from"], I = u.value["@to"];
113
- if (typeof h == "string" || typeof I == "string") {
114
- const F = {
115
- startDate: typeof h == "string" ? h : void 0,
116
- endDate: typeof I == "string" ? I : void 0
150
+ const b = u.value["@from"], C = u.value["@to"];
151
+ if (typeof b == "string" || typeof C == "string") {
152
+ const q = {
153
+ startDate: typeof b == "string" ? b : void 0,
154
+ endDate: typeof C == "string" ? C : void 0
117
155
  };
118
- JSON.stringify(F) !== JSON.stringify(q()) && (a.value = F);
156
+ JSON.stringify(q) !== JSON.stringify(V()) && (a.value = q);
119
157
  }
120
- const O = u.value["@locationIds"];
121
- if (Array.isArray(O)) {
122
- const F = O.map(String);
123
- JSON.stringify(F) !== JSON.stringify(i.value) && (i.value = F);
158
+ const D = u.value["@locationIds"];
159
+ if (Array.isArray(D)) {
160
+ const q = D.map(String);
161
+ JSON.stringify(q) !== JSON.stringify(o.value) && (o.value = q);
124
162
  }
125
163
  K();
126
164
  }
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);
165
+ function ae() {
166
+ const b = [...o.value], C = {}, D = { ...z.value };
167
+ JSON.stringify(V()) !== E.date && (C["@from"] = a.value.startDate ?? null, C["@to"] = a.value.endDate ?? null), JSON.stringify(b) !== E.ids ? (C["@locationIds"] = b, delete D["@locationIds"]) : D["@locationIds"] === "all" && (C["@locationIds"] = H()), Object.keys(C).length && _e(C, D);
130
168
  }
131
- function te() {
132
- n || se([a, i, v], () => {
133
- M && re();
169
+ function ee() {
170
+ n || ie([a, o, y], () => {
171
+ P && ae();
134
172
  });
135
173
  }
136
- function xe() {
137
- return { values: u.value, decls: $.value, intent: N.value };
174
+ function ve() {
175
+ return { values: u.value, decls: M.value, intent: z.value };
138
176
  }
139
177
  function ue() {
140
- const h = Bt() || "en-US";
178
+ const b = qt() || "en-US";
141
179
  return {
142
- locations: v.value.map((I) => ({
143
- id: I.id,
144
- name: I.name || I.id,
145
- code: I.code
180
+ locations: y.value.map((C) => ({
181
+ id: C.id,
182
+ name: C.name || C.id,
183
+ code: C.code
146
184
  })),
147
- timezone: n && typeof u.value["@timezone"] == "string" ? u.value["@timezone"] : k.value,
148
- locale: h,
149
- currency: Zt(_.value),
150
- strings: ln(h)
185
+ timezone: n && typeof u.value["@timezone"] == "string" ? u.value["@timezone"] : x.value,
186
+ locale: b,
187
+ currency: en(w.value),
188
+ strings: fn(b)
151
189
  };
152
190
  }
153
- function we(h, I) {
154
- return JSON.stringify(h.dependsOn.map((O) => I[O] ?? null));
191
+ function ye(b, C) {
192
+ return JSON.stringify(b.dependsOn.map((D) => C[D] ?? null));
155
193
  }
156
- function ne(h, 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);
194
+ function te(b, C) {
195
+ return b.lazy ? b.dependsOn.some((D) => {
196
+ const q = M.value.find((X) => X.name === D);
197
+ return ((q == null ? void 0 : q.default) ?? null) === null && Ot(C[D] ?? null);
160
198
  }) : !1;
161
199
  }
162
- function _e(h) {
163
- return !He.some((I) => I in h && dt(h[I] ?? null));
164
- }
165
- async function pe(h, I) {
166
- var J, H;
167
- const O = (V[h.id] ?? 0) + 1;
168
- if (V[h.id] = O, n) {
169
- const o = n[h.id];
170
- y(
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
- );
200
+ async function ke(b, C) {
201
+ var l, s;
202
+ const D = (F[b.id] ?? 0) + 1;
203
+ if (F[b.id] = D, n) {
204
+ k(pn(n, b.id, D));
173
205
  return;
174
206
  }
175
- (J = Y[h.id]) == null || J.abort();
176
- const F = new AbortController();
177
- Y[h.id] = F, y({
178
- queryId: h.id,
179
- runId: O,
207
+ (l = G[b.id]) == null || l.abort();
208
+ const q = new AbortController();
209
+ G[b.id] = q, k({
210
+ queryId: b.id,
211
+ runId: D,
180
212
  status: "loading",
181
- rows: ((H = A.value[h.id]) == null ? void 0 : H.rows) ?? [],
213
+ rows: ((s = h.value[b.id]) == null ? void 0 : s.rows) ?? [],
182
214
  truncated: !1
183
215
  });
184
- for (let o = 0; ; o++)
216
+ const X = await Ee(b.id, C, q, D);
217
+ X && k(X);
218
+ }
219
+ function pe(b, C) {
220
+ G[b] === C && delete G[b];
221
+ }
222
+ async function Ee(b, C, D, q) {
223
+ const X = () => F[b] === q;
224
+ for (let l = 0; ; l++)
185
225
  try {
186
- const p = await en(
226
+ const s = await tn(
187
227
  e,
188
- h.id,
189
- I,
190
- k.value,
191
- R.value,
192
- F.signal
228
+ b,
229
+ C,
230
+ x.value,
231
+ _.value,
232
+ D.signal
193
233
  );
194
- if (Y[h.id] === F && delete Y[h.id], V[h.id] !== O) return;
195
- y({
196
- queryId: h.id,
197
- runId: O,
198
- status: "ok",
199
- rows: p.rows ?? [],
200
- truncated: !!p.truncated,
201
- ...typeof p.total == "number" ? { total: p.total } : {}
202
- });
203
- return;
204
- } catch (p) {
205
- if (F.signal.aborted || V[h.id] !== O) return;
206
- const G = sn(p);
207
- if (G !== void 0 && o < rn) {
208
- if (await new Promise((W) => setTimeout(W, G)), V[h.id] !== O) return;
209
- continue;
210
- }
211
- y({
212
- queryId: h.id,
213
- runId: O,
214
- status: "error",
215
- rows: [],
216
- truncated: !1,
217
- error: p instanceof Error ? p.message : String(p)
218
- });
219
- return;
234
+ return pe(b, D), X() ? hn(b, q, s) : void 0;
235
+ } catch (s) {
236
+ if (D.signal.aborted || !X()) return;
237
+ const W = ln(s);
238
+ if (W === void 0 || l >= on) return gn(b, q, s);
239
+ if (await new Promise((U) => setTimeout(U, W)), !X()) return;
220
240
  }
221
241
  }
222
- function he(h = {}) {
223
- var F, J, H;
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,
242
+ function se(b = {}) {
243
+ var q, X, l;
244
+ const C = { ...u.value }, D = !dn(C);
245
+ for (const s of I.value) {
246
+ const W = D && s.dependsOn.some((de) => et.includes(de));
247
+ if (te(s, C)) {
248
+ delete Y[s.id], ((q = h.value[s.id]) == null ? void 0 : q.status) !== "idle" && k({
249
+ queryId: s.id,
250
+ runId: F[s.id] ?? 0,
231
251
  status: "idle",
232
252
  rows: [],
233
253
  truncated: !1
234
254
  });
235
255
  continue;
236
256
  }
237
- if (p) {
238
- ((J = A.value[o.id]) == null ? void 0 : J.status) !== "loading" && y({
239
- queryId: o.id,
240
- runId: V[o.id] ?? 0,
257
+ if (W) {
258
+ ((X = h.value[s.id]) == null ? void 0 : X.status) !== "loading" && k({
259
+ queryId: s.id,
260
+ runId: F[s.id] ?? 0,
241
261
  status: "loading",
242
- rows: ((H = A.value[o.id]) == null ? void 0 : H.rows) ?? [],
262
+ rows: ((l = h.value[s.id]) == null ? void 0 : l.rows) ?? [],
243
263
  truncated: !1
244
264
  });
245
265
  continue;
246
266
  }
247
- const G = we(o, I);
248
- !h.force && X[o.id] === G || (X[o.id] = G, pe(o, I));
249
- }
250
- }
251
- function de(h, I) {
252
- const O = { ...u.value }, F = { ...N.value };
253
- let J = !1;
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
- }
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
- }
261
- function Te(h) {
262
- R.value = h.state, T.value = h.queries, $.value = h.params, A.value = {};
263
- for (const I of Object.keys(V)) delete V[I];
264
- for (const I of Object.keys(X)) delete X[I];
265
- g(h), M = !0, he();
266
- }
267
- function Ie(h, I = []) {
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
- u.value = F;
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
- if (H.length) {
278
- const o = { ...A.value };
279
- for (const p of H) delete o[p];
280
- A.value = o;
281
- }
282
- for (const o of I) delete X[o];
283
- return he(), JSON.stringify(u.value) !== O;
267
+ const U = ye(s, C);
268
+ !b.force && Y[s.id] === U || (Y[s.id] = U, ke(s, C));
269
+ }
270
+ }
271
+ function _e(b, C) {
272
+ const D = { ...u.value }, q = { ...z.value };
273
+ let X = !1;
274
+ for (const [l, s] of Object.entries(b)) {
275
+ if (!(l in D) || an.includes(l)) continue;
276
+ const W = cn(s, M.value.find((U) => U.name === l));
277
+ un(q, l, mn(l, C)) && (X = !0), JSON.stringify(D[l] ?? null) !== JSON.stringify(W ?? null) && (D[l] = W, X = !0);
278
+ }
279
+ return X ? (u.value = D, z.value = q, Object.keys(b).some((l) => et.includes(l)) && ne(), se(), R.forEach((l) => l()), !0) : !1;
280
+ }
281
+ function Se(b) {
282
+ _.value = b.state, I.value = b.queries, M.value = b.params, h.value = {};
283
+ for (const C of Object.keys(F)) delete F[C];
284
+ for (const C of Object.keys(Y)) delete Y[C];
285
+ g(b), P = !0, se();
286
+ }
287
+ function xe(b, C = []) {
288
+ _.value = b.state, I.value = b.queries, M.value = b.params;
289
+ const D = JSON.stringify(u.value), q = {};
290
+ for (const s of b.params)
291
+ q[s.name] = s.name in u.value ? u.value[s.name] : s.default ?? null;
292
+ u.value = q;
293
+ const X = new Set(b.queries.map((s) => s.id));
294
+ for (const s of Object.keys(F)) X.has(s) || delete F[s];
295
+ for (const s of Object.keys(Y)) X.has(s) || delete Y[s];
296
+ const l = Object.keys(h.value).filter((s) => !X.has(s));
297
+ if (l.length) {
298
+ const s = { ...h.value };
299
+ for (const W of l) delete s[W];
300
+ h.value = s;
301
+ }
302
+ for (const s of C) delete Y[s];
303
+ return se(), JSON.stringify(u.value) !== D;
284
304
  }
285
305
  return {
286
306
  params: u,
287
- intent: N,
288
- results: A,
289
- queries: T,
290
- state: R,
291
- paramState: xe,
307
+ intent: z,
308
+ results: h,
309
+ queries: I,
310
+ state: _,
311
+ paramState: ve,
292
312
  env: ue,
293
- load: Te,
294
- bindStore: te,
295
- applyCanvas: Ie,
296
- run: he,
297
- setParams: de,
298
- onResult: Z,
299
- onParamsChanged: c,
300
- RESERVED: tn
313
+ load: Se,
314
+ bindStore: ee,
315
+ applyCanvas: xe,
316
+ run: se,
317
+ setParams: _e,
318
+ onResult: Q,
319
+ onParamsChanged: m,
320
+ RESERVED: nn
301
321
  };
302
322
  }
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
- /*$vite$:1*/`, Ot = /url\(\s*(['"]?)\s*([^)'"]*?)\s*\1\s*\)/gi, dn = /@font-face\s*\{[^}]*\}/gi;
305
- function zt(e) {
323
+ const bn = `: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}
324
+ /*$vite$:1*/`, zt = /url\(\s*(['"]?)\s*([^)'"]*?)\s*\1\s*\)/gi, vn = /@font-face\s*\{[^}]*\}/gi;
325
+ function Nt(e) {
306
326
  return /^(data:|blob:|#)/i.test(e);
307
327
  }
308
- function cn(e) {
309
- for (const t of e.matchAll(Ot))
310
- if (!zt(t[2])) return !0;
328
+ function yn(e) {
329
+ for (const t of e.matchAll(zt))
330
+ if (!Nt(t[2])) return !0;
311
331
  return !1;
312
332
  }
313
- function mn(e) {
333
+ function xn(e) {
314
334
  var n;
315
335
  return `@font-face ${((n = /font-family\s*:\s*([^;}]+)/i.exec(e)) == null ? void 0 : n[1].trim()) || "(unnamed)"}`;
316
336
  }
317
- function un(e) {
337
+ function wn(e) {
318
338
  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 };
339
+ let n = e.replace(vn, (r) => yn(r) ? (t.push(xn(r)), "") : r);
340
+ return n = n.replace(zt, (r, a, o) => Nt(o) ? r : (t.push(`url(${o})`), "url(about:invalid)")), { css: n, stripped: t };
321
341
  }
322
- const We = "/* __FM_UI_LIBRARY_V2_STYLES__ */", pn = [
342
+ const He = "/* __FM_UI_LIBRARY_V2_STYLES__ */", kn = [
323
343
  "--fm-text-primary",
324
344
  "--fm-bg-default",
325
345
  "--fm-border-default",
326
346
  "--fm-action-primary-bg"
327
347
  ];
328
- function hn(e, t) {
329
- if (!e.includes(We))
348
+ function _n(e, t) {
349
+ if (!e.includes(He))
330
350
  throw new Error("report canvas frame is missing the UI library style placeholder");
331
- const { css: n, stripped: r } = un(t), a = pn.filter((v) => !n.includes(v));
351
+ const { css: n, stripped: r } = wn(t), a = kn.filter((y) => !n.includes(y));
332
352
  if (a.length)
333
353
  throw new Error(`the UI library stylesheet defines none of ${a.join(", ")}`);
334
- const i = e.replace(We, () => n);
335
- if (i.includes(We))
354
+ const o = e.replace(He, () => n);
355
+ if (o.includes(He))
336
356
  throw new Error("the frame declares the UI library style placeholder more than once");
337
- return { html: i, stripped: r };
357
+ return { html: o, stripped: r };
338
358
  }
339
- const gn = `<meta charset="utf-8" />
359
+ const Sn = `<meta charset="utf-8" />
340
360
  <meta name="viewport" content="width=device-width, initial-scale=1" />
341
361
  <!--
342
362
  Runtime shell for AI-written report sections. Loaded into ONE iframe per report with
@@ -3202,8 +3222,8 @@ const gn = `<meta charset="utf-8" />
3202
3222
  post({ type: "ready", nonce: NONCE })
3203
3223
  })()
3204
3224
  <\/script>
3205
- `, oo = hn(gn, fn).html, ct = 8e3;
3206
- function mt(e) {
3225
+ `, ho = _n(Sn, bn).html, dt = 8e3;
3226
+ function ct(e) {
3207
3227
  const t = e;
3208
3228
  if (!t || typeof t != "object") return;
3209
3229
  const n = (a) => Number.isSafeInteger(a) && a >= 0 && a <= 1e4;
@@ -3217,10 +3237,10 @@ function mt(e) {
3217
3237
  ...r === null || typeof r == "number" && Number.isFinite(r) ? { value: r } : typeof r == "string" ? { value: r.slice(0, 64) } : {}
3218
3238
  };
3219
3239
  }
3220
- function Nt(e) {
3240
+ function Rt(e) {
3221
3241
  const t = e;
3222
3242
  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) : [];
3243
+ const n = Array.isArray(t.path) ? t.path.filter((o) => Number.isSafeInteger(o) && o >= 0).slice(0, 32) : [], r = ct(t.datum), a = Array.isArray(t.points) ? t.points.slice(0, 64).map(ct).filter((o) => !!o) : [];
3224
3244
  return {
3225
3245
  tag: t.tag.slice(0, 32),
3226
3246
  ...typeof t.part == "string" ? { part: t.part.slice(0, 128) } : {},
@@ -3231,15 +3251,15 @@ function Nt(e) {
3231
3251
  ...a.length ? { points: a } : {}
3232
3252
  };
3233
3253
  }
3234
- function bn(e) {
3254
+ function In(e) {
3235
3255
  const t = e;
3236
3256
  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;
3257
+ const [n, r, a, o] = [t.left, t.top, t.width, t.height], y = (x) => typeof x == "number" && Number.isFinite(x);
3258
+ return y(n) && y(r) && y(a) && y(o) && a > 0 && o > 0 ? { left: n, top: r, width: a, height: o } : void 0;
3239
3259
  }
3240
- function ut(e) {
3260
+ function mt(e) {
3241
3261
  if (typeof e.sectionId != "string" || !Number.isSafeInteger(e.version)) return;
3242
- const t = Nt(e.element), n = bn(e.area);
3262
+ const t = Rt(e.element), n = In(e.area);
3243
3263
  return {
3244
3264
  sectionId: e.sectionId,
3245
3265
  version: e.version,
@@ -3250,261 +3270,261 @@ function ut(e) {
3250
3270
  ...n ? { area: n } : {}
3251
3271
  };
3252
3272
  }
3253
- function io(e, t) {
3254
- const n = E(!1);
3273
+ function go(e, t) {
3274
+ const n = O(!1);
3255
3275
  let r = null;
3256
3276
  const a = /* @__PURE__ */ new Map();
3257
- let i;
3258
- const v = /* @__PURE__ */ new Map();
3259
- function k() {
3260
- var c;
3261
- return ((c = e.value) == null ? void 0 : c.contentWindow) ?? null;
3262
- }
3263
- function _(c) {
3264
- var y;
3265
- (y = k()) == null || y.postMessage(JSON.parse(JSON.stringify(c)), "*");
3266
- }
3267
- function u(c) {
3268
- var U, q, K, ae;
3269
- const y = k();
3270
- if (!y || c.source !== y) return;
3271
- const g = c.data;
3277
+ let o;
3278
+ const y = /* @__PURE__ */ new Map();
3279
+ function x() {
3280
+ var m;
3281
+ return ((m = e.value) == null ? void 0 : m.contentWindow) ?? null;
3282
+ }
3283
+ function w(m) {
3284
+ var k;
3285
+ (k = x()) == null || k.postMessage(JSON.parse(JSON.stringify(m)), "*");
3286
+ }
3287
+ function u(m) {
3288
+ var H, V, K, ne;
3289
+ const k = x();
3290
+ if (!k || m.source !== k) return;
3291
+ const g = m.data;
3272
3292
  if (!(!g || typeof g != "object"))
3273
3293
  switch (g.type) {
3274
3294
  case "ready":
3275
3295
  if (n.value) return;
3276
- i = g.nonce, n.value = !0, r == null || r(), r = null, V();
3296
+ o = g.nonce, n.value = !0, r == null || r(), r = null, F();
3277
3297
  break;
3278
3298
  case "sectionSelected": {
3279
- if (!i || g.nonce !== i) return;
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);
3299
+ if (!o || g.nonce !== o) return;
3300
+ const ae = mt(g);
3301
+ if (!ae) return;
3302
+ const { area: ee, ...ve } = ae, ue = Array.isArray(g.widen) ? g.widen.slice(0, 4).map(Rt).filter((ye) => !!ye) : [];
3303
+ (H = t.onSelectSection) == null || H.call(t, ve, ue);
3284
3304
  break;
3285
3305
  }
3286
3306
  case "areaSelected": {
3287
- if (!i || g.nonce !== i || !Array.isArray(g.picks)) return;
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));
3307
+ if (!o || g.nonce !== o || !Array.isArray(g.picks)) return;
3308
+ const ae = g.picks.slice(0, 64).map((ee) => ee && typeof ee == "object" ? mt(ee) : void 0).filter((ee) => !!ee);
3309
+ ae.length && ((V = t.onSelectArea) == null || V.call(t, ae));
3290
3310
  break;
3291
3311
  }
3292
3312
  case "selectionCancelled":
3293
- i && g.nonce === i && ((K = t.onCancelSelection) == null || K.call(t));
3313
+ o && g.nonce === o && ((K = t.onCancelSelection) == null || K.call(t));
3294
3314
  break;
3295
3315
  case "setParams":
3296
3316
  t.onSetParams(g.values ?? {}, g.intent);
3297
3317
  break;
3298
3318
  case "openLink":
3299
- typeof g.href == "string" && ((ae = t.onOpenLink) == null || ae.call(t, g.href));
3319
+ typeof g.href == "string" && ((ne = t.onOpenLink) == null || ne.call(t, g.href));
3300
3320
  break;
3301
3321
  case "rendered":
3302
- if (!$(g)) return;
3303
- A(g.sectionId, g.version), t.onSectionRendered(
3322
+ if (!M(g)) return;
3323
+ h(g.sectionId, g.version), t.onSectionRendered(
3304
3324
  g.sectionId,
3305
3325
  g.version,
3306
3326
  String(g.label ?? "").slice(0, 120)
3307
3327
  );
3308
3328
  break;
3309
3329
  case "error":
3310
- if (!$(g)) return;
3311
- A(g.sectionId, g.version), t.onSectionError(g.sectionId, g.version, g.message);
3330
+ if (!M(g)) return;
3331
+ h(g.sectionId, g.version), t.onSectionError(g.sectionId, g.version, g.message);
3312
3332
  break;
3313
3333
  case "layout":
3314
- if (!$(g)) return;
3334
+ if (!M(g)) return;
3315
3335
  t.onSectionLayout(
3316
3336
  g.sectionId,
3317
3337
  g.version,
3318
- (Array.isArray(g.warnings) ? g.warnings : []).slice(0, 12).map((re) => String(re).slice(0, 200))
3338
+ (Array.isArray(g.warnings) ? g.warnings : []).slice(0, 12).map((ae) => String(ae).slice(0, 200))
3319
3339
  );
3320
3340
  break;
3321
3341
  }
3322
3342
  }
3323
- function $(c) {
3324
- return !i || c.nonce === i ? !0 : (console.warn("[report-canvas] dropped a render outcome without the shell nonce"), !1);
3343
+ function M(m) {
3344
+ return !o || m.nonce === o ? !0 : (console.warn("[report-canvas] dropped a render outcome without the shell nonce"), !1);
3325
3345
  }
3326
- function N(c, y) {
3327
- return `${c}@${y}`;
3346
+ function z(m, k) {
3347
+ return `${m}@${k}`;
3328
3348
  }
3329
- function A(c, y) {
3330
- if (y === void 0) return;
3331
- const g = N(c, y), U = v.get(g);
3332
- U !== void 0 && (clearTimeout(U), v.delete(g));
3349
+ function h(m, k) {
3350
+ if (k === void 0) return;
3351
+ const g = z(m, k), H = y.get(g);
3352
+ H !== void 0 && (clearTimeout(H), y.delete(g));
3333
3353
  }
3334
- function R() {
3335
- v.forEach((c) => clearTimeout(c)), v.clear();
3354
+ function _() {
3355
+ y.forEach((m) => clearTimeout(m)), y.clear();
3336
3356
  }
3337
- function T(c) {
3338
- for (const y of c) {
3339
- const g = N(y.id, y.version);
3340
- v.has(g) || v.set(
3357
+ function I(m) {
3358
+ for (const k of m) {
3359
+ const g = z(k.id, k.version);
3360
+ y.has(g) || y.set(
3341
3361
  g,
3342
3362
  setTimeout(() => {
3343
- v.delete(g), t.onSectionError(
3344
- y.id,
3345
- y.version,
3346
- `the section did not report a render within ${ct}ms`
3363
+ y.delete(g), t.onSectionError(
3364
+ k.id,
3365
+ k.version,
3366
+ `the section did not report a render within ${dt}ms`
3347
3367
  );
3348
- }, ct)
3368
+ }, dt)
3349
3369
  );
3350
3370
  }
3351
3371
  }
3352
- async function B(c, y, g) {
3353
- const U = await st(c.flatMap((K) => K.libs ?? [])), q = () => {
3354
- _({
3372
+ async function L(m, k, g) {
3373
+ const H = await st(m.flatMap((K) => K.libs ?? [])), V = () => {
3374
+ w({
3355
3375
  type: "init",
3356
- sections: c,
3357
- params: y.values,
3358
- paramDecls: y.decls,
3359
- intent: y.intent,
3360
- libs: U,
3376
+ sections: m,
3377
+ params: k.values,
3378
+ paramDecls: k.decls,
3379
+ intent: k.intent,
3380
+ libs: H,
3361
3381
  env: g
3362
- }), R(), T(c);
3382
+ }), _(), I(m);
3363
3383
  };
3364
- n.value ? q() : r = q;
3384
+ n.value ? V() : r = V;
3365
3385
  }
3366
- async function P(c) {
3367
- const y = await st(c.flatMap((g) => g.libs ?? []));
3368
- _({ type: "sections", sections: c, libs: y }), T(c);
3386
+ async function R(m) {
3387
+ const k = await st(m.flatMap((g) => g.libs ?? []));
3388
+ w({ type: "sections", sections: m, libs: k }), I(m);
3369
3389
  }
3370
- function z(c) {
3371
- _({
3390
+ function E(m) {
3391
+ w({
3372
3392
  type: "params",
3373
- values: c.values,
3374
- paramDecls: c.decls,
3375
- intent: c.intent
3393
+ values: m.values,
3394
+ paramDecls: m.decls,
3395
+ intent: m.intent
3376
3396
  });
3377
3397
  }
3378
- function M(c) {
3379
- _({ type: "env", env: c });
3398
+ function P(m) {
3399
+ w({ type: "env", env: m });
3380
3400
  }
3381
- function V() {
3382
- const c = [...a.values()];
3383
- a.clear(), c.forEach(Y);
3401
+ function F() {
3402
+ const m = [...a.values()];
3403
+ a.clear(), m.forEach(G);
3384
3404
  }
3385
- function Y(c) {
3386
- _({
3405
+ function G(m) {
3406
+ w({
3387
3407
  type: "rows",
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
3408
+ queryId: m.queryId,
3409
+ runId: m.runId,
3410
+ rows: m.rows,
3411
+ status: m.status,
3412
+ truncated: m.truncated,
3413
+ total: m.total,
3414
+ error: m.error
3395
3415
  });
3396
3416
  }
3397
- function X(c) {
3417
+ function Y(m) {
3398
3418
  if (!n.value) {
3399
- a.set(c.queryId, c);
3419
+ a.set(m.queryId, m);
3400
3420
  return;
3401
3421
  }
3402
- Y(c);
3422
+ G(m);
3403
3423
  }
3404
- Le(() => window.addEventListener("message", u)), Pe(() => {
3405
- window.removeEventListener("message", u), R();
3424
+ Pe(() => window.addEventListener("message", u)), Le(() => {
3425
+ window.removeEventListener("message", u), _();
3406
3426
  });
3407
- function Z() {
3408
- n.value = !1, r = null, i = void 0, a.clear(), R();
3427
+ function Q() {
3428
+ n.value = !1, r = null, o = void 0, a.clear(), _();
3409
3429
  }
3410
3430
  return {
3411
3431
  /** `multiple`: a click adds a part and picking goes on, and a drag draws an area. */
3412
- setCommentMode: (c, y, g = !1) => _({
3432
+ setCommentMode: (m, k, g = !1) => w({
3413
3433
  type: "commentMode",
3414
- enabled: c,
3434
+ enabled: m,
3415
3435
  multiple: g,
3416
- picks: (Array.isArray(y) ? y : y ? [y] : []).map((U) => {
3417
- var q, K, ae;
3436
+ picks: (Array.isArray(k) ? k : k ? [k] : []).map((H) => {
3437
+ var V, K, ne;
3418
3438
  return {
3419
- sectionId: U.sectionId,
3420
- part: (q = U.element) == null ? void 0 : q.part,
3421
- path: ((K = U.element) == null ? void 0 : K.path) ?? [],
3422
- datum: ((ae = U.element) == null ? void 0 : ae.datum) && {
3423
- datasetIndex: U.element.datum.datasetIndex,
3424
- index: U.element.datum.index
3439
+ sectionId: H.sectionId,
3440
+ part: (V = H.element) == null ? void 0 : V.part,
3441
+ path: ((K = H.element) == null ? void 0 : K.path) ?? [],
3442
+ datum: ((ne = H.element) == null ? void 0 : ne.datum) && {
3443
+ datasetIndex: H.element.datum.datasetIndex,
3444
+ index: H.element.datum.index
3425
3445
  },
3426
- area: U.area
3446
+ area: H.area
3427
3447
  };
3428
3448
  })
3429
3449
  }),
3430
3450
  ready: n,
3431
- init: B,
3432
- swapSections: P,
3433
- pushParams: z,
3434
- pushEnv: M,
3435
- pushRows: X,
3436
- reset: Z
3451
+ init: L,
3452
+ swapSections: R,
3453
+ pushParams: E,
3454
+ pushEnv: P,
3455
+ pushRows: Y,
3456
+ reset: Q
3437
3457
  };
3438
3458
  }
3439
- const vn = /^(?:https?:\/\/|mailto:)[^\s]+$/i, Ge = /`([^`]+)`|(!?)\[([^\]]*)\]\(([^)\s]*)\)|\*\*([\s\S]+?)\*\*|\*([^*\n]+)\*/g;
3440
- function Ye(e, t) {
3459
+ const An = /^(?:https?:\/\/|mailto:)[^\s]+$/i, We = /`([^`]+)`|(!?)\[([^\]]*)\]\(([^)\s]*)\)|\*\*([\s\S]+?)\*\*|\*([^*\n]+)\*/g;
3460
+ function Ge(e, t) {
3441
3461
  if (!t) return;
3442
3462
  const n = e[e.length - 1];
3443
3463
  (n == null ? void 0 : n.type) === "text" ? n.text += t : e.push({ type: "text", text: t });
3444
3464
  }
3445
- function Xe(e) {
3465
+ function Ye(e) {
3446
3466
  const t = [];
3447
3467
  let n = 0;
3448
- Ge.lastIndex = 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 });
3468
+ We.lastIndex = 0;
3469
+ for (let r = We.exec(e); r; r = We.exec(e)) {
3470
+ Ge(t, e.slice(n, r.index)), n = r.index + r[0].length;
3471
+ const [, a, o, y, x, w, u] = r;
3472
+ a !== void 0 ? t.push({ type: "code", text: a }) : y !== void 0 ? !o && An.test(x) ? t.push({ type: "link", text: y || x, href: x }) : Ge(t, r[0]) : w !== void 0 ? t.push({ type: "strong", text: w }) : u !== void 0 && t.push({ type: "em", text: u });
3453
3473
  }
3454
- return Ye(t, e.slice(n)), t;
3474
+ return Ge(t, e.slice(n)), t;
3455
3475
  }
3456
- const yn = /^\s*```/, xn = /^\s{0,3}(#{1,6})\s+(.*)$/, wn = /^\s*[-*+]\s+(.*)$/, kn = /^\s*\d{1,3}[.)]\s+(.*)$/;
3457
- function pt(e) {
3476
+ const Cn = /^\s*```/, Tn = /^\s{0,3}(#{1,6})\s+(.*)$/, En = /^\s*[-*+]\s+(.*)$/, On = /^\s*\d{1,3}[.)]\s+(.*)$/;
3477
+ function ut(e) {
3458
3478
  const t = [], n = String(e ?? "").split(/\r?\n/);
3459
- let r = [], a = null, i = null;
3460
- function v() {
3461
- r.length && (t.push({ type: "p", inline: Xe(r.join(" ")) }), r = []);
3479
+ let r = [], a = null, o = null;
3480
+ function y() {
3481
+ r.length && (t.push({ type: "p", inline: Ye(r.join(" ")) }), r = []);
3462
3482
  }
3463
- function k() {
3483
+ function x() {
3464
3484
  a && (t.push({ type: "list", ordered: a.ordered, items: a.items }), a = null);
3465
3485
  }
3466
- function _() {
3467
- v(), k();
3486
+ function w() {
3487
+ y(), x();
3468
3488
  }
3469
3489
  for (const u of n) {
3470
- if (yn.test(u)) {
3471
- i ? (t.push({ type: "pre", text: i.join(`
3472
- `) }), i = null) : (_(), i = []);
3490
+ if (Cn.test(u)) {
3491
+ o ? (t.push({ type: "pre", text: o.join(`
3492
+ `) }), o = null) : (w(), o = []);
3473
3493
  continue;
3474
3494
  }
3475
- if (i) {
3476
- i.push(u);
3495
+ if (o) {
3496
+ o.push(u);
3477
3497
  continue;
3478
3498
  }
3479
- const $ = xn.exec(u), N = wn.exec(u), A = kn.exec(u);
3499
+ const M = Tn.exec(u), z = En.exec(u), h = On.exec(u);
3480
3500
  if (!u.trim())
3481
- _();
3482
- else if ($)
3483
- _(), t.push({ type: "p", inline: Xe($[2]), heading: !0 });
3484
- else if (N || A) {
3485
- v();
3486
- const R = !N;
3487
- (!a || a.ordered !== R) && (k(), a = { ordered: R, items: [] }), a.items.push(Xe((N ?? A)[1]));
3501
+ w();
3502
+ else if (M)
3503
+ w(), t.push({ type: "p", inline: Ye(M[2]), heading: !0 });
3504
+ else if (z || h) {
3505
+ y();
3506
+ const _ = !z;
3507
+ (!a || a.ordered !== _) && (x(), a = { ordered: _, items: [] }), a.items.push(Ye((z ?? h)[1]));
3488
3508
  } else
3489
- k(), r.push(u.trim());
3509
+ x(), r.push(u.trim());
3490
3510
  }
3491
- return i != null && i.length && t.push({ type: "pre", text: i.join(`
3492
- `) }), _(), t;
3511
+ return o != null && o.length && t.push({ type: "pre", text: o.join(`
3512
+ `) }), w(), t;
3493
3513
  }
3494
- function _n(e, t) {
3514
+ function zn(e, t) {
3495
3515
  const n = String(e ?? "").trim();
3496
3516
  if (n.length <= t) return n;
3497
3517
  const r = n.slice(0, t), a = r.lastIndexOf(" ");
3498
3518
  return `${(a > t * 0.6 ? r.slice(0, a) : r).trimEnd()}…`;
3499
3519
  }
3500
- const ht = 600, je = [
3520
+ const pt = 600, je = [
3501
3521
  "reviewing",
3502
3522
  "checking",
3503
3523
  "updating",
3504
3524
  "verifying",
3505
3525
  "writing",
3506
3526
  "loading"
3507
- ], In = {
3527
+ ], Nn = {
3508
3528
  discovery: "reviewing",
3509
3529
  grounding_probe: "reviewing",
3510
3530
  option_probe: "reviewing",
@@ -3542,7 +3562,7 @@ const ht = 600, je = [
3542
3562
  lazy_forced: "updating",
3543
3563
  manifest_unbound: "updating",
3544
3564
  rendered: "loading"
3545
- }, Sn = /* @__PURE__ */ new Set([
3565
+ }, Rn = /* @__PURE__ */ new Set([
3546
3566
  "plan",
3547
3567
  "edit-target",
3548
3568
  "error",
@@ -3553,64 +3573,64 @@ const ht = 600, je = [
3553
3573
  "step",
3554
3574
  "answer"
3555
3575
  ]);
3556
- function Rt(e) {
3557
- return e && In[e] || "working";
3576
+ function Mt(e) {
3577
+ return e && Nn[e] || "working";
3558
3578
  }
3559
- function gt(e, t) {
3579
+ function ht(e, t) {
3560
3580
  const n = je.indexOf(t);
3561
3581
  return n < 0 || e && je.indexOf(e) >= n ? e : t;
3562
3582
  }
3563
- function An(e) {
3564
- const t = new Set(e.map(Rt));
3583
+ function Mn(e) {
3584
+ const t = new Set(e.map(Mt));
3565
3585
  return je.filter((n) => t.has(n));
3566
3586
  }
3567
- function Mt(e) {
3587
+ function Pt(e) {
3568
3588
  var n;
3569
3589
  const t = [];
3570
3590
  for (const r of e) {
3571
3591
  const a = (n = r.data) == null ? void 0 : n.step;
3572
3592
  if (r.type !== "data-step" || typeof a != "string") continue;
3573
- const i = je.find((v) => v === a);
3574
- i && !t.includes(i) && t.push(i);
3593
+ const o = je.find((y) => y === a);
3594
+ o && !t.includes(o) && t.push(o);
3575
3595
  }
3576
3596
  return t;
3577
3597
  }
3578
- function Cn(e) {
3579
- return e ? e.steps.length ? e.steps : An(e.signals) : [];
3598
+ function Pn(e) {
3599
+ return e ? e.steps.length ? e.steps : Mn(e.signals) : [];
3580
3600
  }
3581
- function En(e) {
3582
- return Mt((e == null ? void 0 : e.parts) ?? []).pop() ?? null;
3601
+ function Ln(e) {
3602
+ return Pt((e == null ? void 0 : e.parts) ?? []).pop() ?? null;
3583
3603
  }
3584
- function Ke(e) {
3604
+ function Xe(e) {
3585
3605
  return e.filter((t) => t.type === "text").map((t) => String(t.text ?? "").trim()).filter(Boolean).join(`
3586
3606
 
3587
3607
  `);
3588
3608
  }
3589
- function Tn(e) {
3609
+ function jn(e) {
3590
3610
  const t = [];
3591
3611
  for (const n of e) {
3592
3612
  const r = n.type.startsWith("tool-") || n.type.startsWith("data-") ? n.type.slice(5) : "";
3593
- r && !Sn.has(r) && t.push(r);
3613
+ r && !Rn.has(r) && t.push(r);
3594
3614
  }
3595
3615
  return t;
3596
3616
  }
3597
- function On(e) {
3617
+ function $n(e) {
3598
3618
  var r;
3599
3619
  const t = e.find((a) => a.type === "data-turn_stats"), n = (r = t == null ? void 0 : t.data) == null ? void 0 : r.ms;
3600
3620
  return typeof n == "number" && n >= 0 ? n : void 0;
3601
3621
  }
3602
- function zn(e) {
3622
+ function Dn(e) {
3603
3623
  const t = Math.max(0, Math.floor(e / 1e3));
3604
3624
  return t < 60 ? `${t}s` : `${Math.floor(t / 60)}m ${String(t % 60).padStart(2, "0")}s`;
3605
3625
  }
3606
- function Nn(e) {
3626
+ function Bn(e) {
3607
3627
  const t = e / 1e3;
3608
3628
  return t < 60 ? `${t.toFixed(1)}s` : `${Math.floor(t / 60)}m ${String(Math.round(t % 60)).padStart(2, "0")}s`;
3609
3629
  }
3610
- function Rn(e) {
3630
+ function qn(e) {
3611
3631
  return e === "too_costly" || e === "timeout" ? "tooLarge" : e === "deadline" ? "outOfTime" : "ours";
3612
3632
  }
3613
- function Mn(e) {
3633
+ function Vn(e) {
3614
3634
  var n;
3615
3635
  const t = (n = e.find((r) => r.type === "data-turn_failed")) == null ? void 0 : n.data;
3616
3636
  if (t)
@@ -3619,36 +3639,36 @@ function Mn(e) {
3619
3639
  ...typeof t.ref == "string" ? { ref: t.ref } : {}
3620
3640
  };
3621
3641
  }
3622
- function Ln(e) {
3642
+ function Fn(e) {
3623
3643
  return e.filter((t) => t.type === "data-edit-target").map((t) => t.data);
3624
3644
  }
3625
- function Pn(e) {
3645
+ function Un(e) {
3626
3646
  const t = [[]];
3627
3647
  for (const n of e)
3628
3648
  n.type === "step-start" ? t.push([]) : t[t.length - 1].push(n);
3629
3649
  return t.filter((n) => n.length > 0);
3630
3650
  }
3631
- function bt(e) {
3651
+ function gt(e) {
3632
3652
  return e.some((t) => t.type.startsWith("tool-"));
3633
3653
  }
3634
- function jn(e) {
3654
+ function Hn(e) {
3635
3655
  var n;
3636
3656
  const t = (n = e.find((r) => r.type === "data-answer")) == null ? void 0 : n.data;
3637
3657
  return typeof (t == null ? void 0 : t.outcome) == "string" ? t.outcome : void 0;
3638
3658
  }
3639
- function $n(e, t = {}) {
3659
+ function Wn(e, t = {}) {
3640
3660
  var r, a;
3641
3661
  const n = [];
3642
- for (const i of e ?? []) {
3643
- const v = i.parts ?? [], k = Tn(v), _ = Ln(v);
3644
- if (i.role === "user") {
3645
- const z = Ke(v);
3662
+ for (const o of e ?? []) {
3663
+ const y = o.parts ?? [], x = jn(y), w = Fn(y);
3664
+ if (o.role === "user") {
3665
+ const E = Xe(y);
3646
3666
  n.push({
3647
- id: i.id,
3648
- turnId: i.turnId ?? i.id,
3667
+ id: o.id,
3668
+ turnId: o.turnId ?? o.id,
3649
3669
  role: "user",
3650
- targets: _,
3651
- answer: z,
3670
+ targets: w,
3671
+ answer: E,
3652
3672
  blocks: [],
3653
3673
  preview: null,
3654
3674
  signals: [],
@@ -3658,88 +3678,88 @@ function $n(e, t = {}) {
3658
3678
  });
3659
3679
  continue;
3660
3680
  }
3661
- const u = !!t.streamingId && i.id === t.streamingId;
3662
- if (i.inProgress && !u) continue;
3663
- const $ = Pn(v), N = $[$.length - 1] ?? [], A = $.some(bt), R = A && !v.some((z) => z.type === "step-start");
3664
- let T = "";
3681
+ const u = !!t.streamingId && o.id === t.streamingId;
3682
+ if (o.inProgress && !u) continue;
3683
+ const M = Un(y), z = M[M.length - 1] ?? [], h = M.some(gt), _ = h && !y.some((E) => E.type === "step-start");
3684
+ let I = "";
3665
3685
  if (!u) {
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
- }
3670
- const B = !!T && (R || T.length > ht), P = u ? void 0 : Mn(v);
3671
- !T && !k.length && !u || n.push({
3672
- id: i.id,
3673
- turnId: i.turnId ?? i.id,
3686
+ !h || _ ? I = Xe(y) : gt(z) || (I = Xe(z));
3687
+ const E = I ? void 0 : Hn(y);
3688
+ E && (I = ((r = t.outcomes) == null ? void 0 : r[E]) ?? "");
3689
+ }
3690
+ const L = !!I && (_ || I.length > pt), R = u ? void 0 : Vn(y);
3691
+ !I && !x.length && !u || n.push({
3692
+ id: o.id,
3693
+ turnId: o.turnId ?? o.id,
3674
3694
  role: "assistant",
3675
- targets: _,
3676
- answer: T,
3677
- blocks: T ? pt(T) : [],
3678
- preview: B ? pt(_n(T, ht)) : null,
3679
- signals: k,
3680
- steps: Mt(v),
3695
+ targets: w,
3696
+ answer: I,
3697
+ blocks: I ? ut(I) : [],
3698
+ preview: L ? ut(zn(I, pt)) : null,
3699
+ signals: x,
3700
+ steps: Pt(y),
3681
3701
  pending: u,
3682
- noSummary: !u && !T && A,
3683
- ms: u ? void 0 : On(v) ?? ((a = i.stats) == null ? void 0 : a.ms),
3684
- ...P ? { failure: P } : {}
3702
+ noSummary: !u && !I && h,
3703
+ ms: u ? void 0 : $n(y) ?? ((a = o.stats) == null ? void 0 : a.ms),
3704
+ ...R ? { failure: R } : {}
3685
3705
  });
3686
3706
  }
3687
3707
  return n;
3688
3708
  }
3689
- const Dn = {
3709
+ const Gn = {
3690
3710
  key: 0,
3691
3711
  class: "flex flex-col gap-4"
3692
- }, Bn = {
3712
+ }, Yn = {
3693
3713
  key: 0,
3694
3714
  "data-testid": "report-canvas-activity",
3695
3715
  class: "flex flex-col gap-4"
3696
- }, qn = { class: "flex w-16 shrink-0 justify-center text-fm-color-system-success-300" }, Vn = { class: "min-w-0 truncate" }, Fn = { class: "flex items-start gap-8" }, Un = { class: "min-w-0 grow" }, Hn = { class: "flex items-baseline gap-8" }, Wn = {
3716
+ }, Xn = { class: "flex w-16 shrink-0 justify-center text-fm-color-system-success-300" }, Kn = { class: "min-w-0 truncate" }, Jn = { class: "flex items-start gap-8" }, Qn = { class: "min-w-0 grow" }, Zn = { class: "flex items-baseline gap-8" }, ea = {
3697
3717
  class: "activity-shimmer fm-typo-en-body-md-400 min-w-0 grow",
3698
3718
  role: "status"
3699
- }, Gn = {
3719
+ }, ta = {
3700
3720
  key: 0,
3701
3721
  "data-testid": "report-canvas-elapsed",
3702
3722
  class: "fm-typo-en-body-sm-400 shrink-0 tabular-nums text-fm-color-typo-secondary"
3703
- }, Yn = {
3723
+ }, na = {
3704
3724
  key: 0,
3705
3725
  "data-testid": "report-canvas-prepared",
3706
3726
  class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary"
3707
- }, Xn = {
3727
+ }, aa = {
3708
3728
  key: 1,
3709
3729
  "data-testid": "report-canvas-slow",
3710
3730
  class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary"
3711
- }, Kn = {
3731
+ }, ra = {
3712
3732
  key: 1,
3713
3733
  "data-testid": "report-canvas-interrupted",
3714
3734
  class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
3715
- }, Jn = {
3735
+ }, oa = {
3716
3736
  key: 2,
3717
3737
  "data-testid": "report-canvas-stalled",
3718
3738
  class: "flex flex-col items-start gap-4"
3719
- }, Qn = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-error" }, Zn = {
3739
+ }, ia = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-error" }, sa = {
3720
3740
  key: 3,
3721
3741
  "data-testid": "report-canvas-failed",
3722
3742
  class: "flex flex-col gap-4"
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 = {
3743
+ }, la = { class: "min-w-0 grow" }, fa = { class: "fm-typo-en-body-sm-600 truncate" }, da = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, ca = ["onClick"], ma = ["onClick"], ua = {
3724
3744
  key: 4,
3725
3745
  class: "fm-typo-en-body-sm-400 text-fm-color-typo-error"
3726
- }, ia = { key: 5 }, sa = ["aria-expanded"], la = {
3746
+ }, pa = { key: 5 }, ha = ["aria-expanded"], ga = {
3727
3747
  key: 0,
3728
3748
  "data-testid": "report-canvas-details",
3729
3749
  class: "mt-4 flex flex-col gap-4"
3730
- }, fa = { class: "flex w-16 shrink-0 justify-center text-fm-color-system-success-300" }, da = ["title"], ca = {
3750
+ }, ba = { class: "flex w-16 shrink-0 justify-center text-fm-color-system-success-300" }, va = ["title"], ya = {
3731
3751
  class: "flex w-16 shrink-0 justify-center",
3732
3752
  "aria-hidden": "true"
3733
- }, ma = {
3753
+ }, xa = {
3734
3754
  key: 2,
3735
3755
  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
- }, ua = { class: "min-w-0 grow truncate" }, pa = {
3756
+ }, wa = { class: "min-w-0 grow truncate" }, ka = {
3737
3757
  key: 0,
3738
3758
  class: "shrink-0 text-fm-color-typo-error"
3739
- }, ha = {
3759
+ }, _a = {
3740
3760
  key: 1,
3741
3761
  class: "sr-only"
3742
- }, ga = /* @__PURE__ */ $e({
3762
+ }, Sa = /* @__PURE__ */ $e({
3743
3763
  __name: "ReportCanvasActivity",
3744
3764
  props: {
3745
3765
  active: { type: Boolean },
@@ -3754,174 +3774,174 @@ const Dn = {
3754
3774
  },
3755
3775
  emits: ["retry", "askBuilder", "checkStatus"],
3756
3776
  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
- se(
3777
+ const n = e, r = t, { t: a } = Be(), o = $(() => {
3778
+ var L;
3779
+ return ((L = n.run) == null ? void 0 : L.sections) ?? [];
3780
+ }), y = $(() => o.value.filter((L) => L.status === "ok").length), x = $(() => o.value.filter((L) => L.status === "error")), w = $(() => {
3781
+ var L;
3782
+ return !!((L = n.run) != null && L.runId) && n.run.status !== "running";
3783
+ }), u = $(() => {
3784
+ const L = n.phases.indexOf(n.phase);
3785
+ return L >= 0 ? n.phases.slice(0, L) : n.phases;
3786
+ }), M = O(Date.now());
3787
+ let z;
3788
+ ie(
3769
3789
  () => n.active && n.startedAt != null,
3770
- (B) => {
3771
- window.clearInterval(N), N = void 0, B && ($.value = Date.now(), N = window.setInterval(() => {
3772
- $.value = Date.now();
3790
+ (L) => {
3791
+ window.clearInterval(z), z = void 0, L && (M.value = Date.now(), z = window.setInterval(() => {
3792
+ M.value = Date.now();
3773
3793
  }, 1e3));
3774
3794
  },
3775
3795
  { immediate: !0 }
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
- () => i.value.length > 0 || !n.active && n.phases.length > 0
3796
+ ), Le(() => window.clearInterval(z));
3797
+ const h = $(
3798
+ () => n.active && n.startedAt != null ? Dn(M.value - n.startedAt) : ""
3799
+ ), _ = O(!1), I = $(
3800
+ () => o.value.length > 0 || !n.active && n.phases.length > 0
3781
3801
  );
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,
3802
+ return (L, R) => {
3803
+ const E = Oe("FmIcon");
3804
+ return e.active || e.interrupted || e.stale || e.retryError || x.value.length || I.value ? (c(), p("div", Gn, [
3805
+ e.active ? (c(), p("ol", Yn, [
3806
+ (c(!0), p(fe, null, me(u.value, (P) => (c(), p("li", {
3807
+ key: P,
3788
3808
  "data-testid": "report-canvas-step-done",
3789
3809
  class: "fm-typo-en-body-sm-400 flex items-center gap-8 text-fm-color-typo-secondary"
3790
3810
  }, [
3791
- C("span", qn, [
3792
- ee(z, {
3811
+ N("span", Xn, [
3812
+ Z(E, {
3793
3813
  name: "check",
3794
3814
  size: "sm"
3795
3815
  })
3796
3816
  ]),
3797
- C("span", Vn, w(b(a)(`reportV5.reportAi.chat.phaseDone.${M}`)), 1)
3817
+ N("span", Kn, A(v(a)(`reportV5.reportAi.chat.phaseDone.${P}`)), 1)
3798
3818
  ]))), 128)),
3799
- C("li", Fn, [
3800
- P[2] || (P[2] = C("span", { class: "flex h-[21px] w-16 shrink-0 items-center justify-center" }, [
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" })
3819
+ N("li", Jn, [
3820
+ R[2] || (R[2] = N("span", { class: "flex h-[21px] w-16 shrink-0 items-center justify-center" }, [
3821
+ N("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
3822
  ], -1)),
3803
- C("div", Un, [
3804
- C("div", Hn, [
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)
3823
+ N("div", Qn, [
3824
+ N("div", Zn, [
3825
+ N("p", ea, A(v(a)(`reportV5.reportAi.chat.phase.${e.phase}`)), 1),
3826
+ h.value ? (c(), p("span", ta, A(h.value), 1)) : j("", !0)
3807
3827
  ]),
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)
3828
+ o.value.length ? (c(), p("p", na, A(v(a)("reportV5.reportAi.build.prepared", { done: y.value, total: o.value.length })), 1)) : j("", !0),
3829
+ e.slow ? (c(), p("p", aa, A(v(a)("reportV5.reportAi.build.slow")) + " " + A(v(a)("reportV5.reportAi.build.safeToLeave")), 1)) : j("", !0)
3810
3830
  ])
3811
3831
  ])
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
- C("p", Qn, w(b(a)("reportV5.reportAi.build.stalled")), 1),
3816
- C("button", {
3832
+ ])) : j("", !0),
3833
+ e.interrupted ? (c(), p("p", ra, A(v(a)("reportV5.reportAi.build.interrupted")), 1)) : j("", !0),
3834
+ e.stale ? (c(), p("div", oa, [
3835
+ N("p", ia, A(v(a)("reportV5.reportAi.build.stalled")), 1),
3836
+ N("button", {
3817
3837
  class: "fm-typo-en-body-sm-600 text-fm-color-typo-secondary underline",
3818
- onClick: P[0] || (P[0] = (M) => r("checkStatus"))
3819
- }, w(b(a)("reportV5.reportAi.build.checkStatus")), 1)
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,
3838
+ onClick: R[0] || (R[0] = (P) => r("checkStatus"))
3839
+ }, A(v(a)("reportV5.reportAi.build.checkStatus")), 1)
3840
+ ])) : j("", !0),
3841
+ x.value.length ? (c(), p("ul", sa, [
3842
+ (c(!0), p(fe, null, me(x.value, (P) => (c(), p("li", {
3843
+ key: P.id,
3824
3844
  class: "flex items-start gap-8"
3825
3845
  }, [
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"
3846
+ N("div", la, [
3847
+ N("p", fa, A(P.title), 1),
3848
+ N("p", da, A(v(a)(
3849
+ P.retries ? "reportV5.reportAi.build.retriedWidget" : "reportV5.reportAi.build.failedWidget"
3830
3850
  )), 1)
3831
3851
  ]),
3832
- _.value && !M.retries ? (d(), m("button", {
3852
+ w.value && !P.retries ? (c(), p("button", {
3833
3853
  key: 0,
3834
3854
  "data-testid": "report-canvas-retry",
3835
3855
  class: "fm-typo-en-body-sm-600 shrink-0 text-fm-color-typo-secondary underline",
3836
- onClick: (V) => r("retry", M.id)
3837
- }, w(b(a)("reportV5.reportAi.build.retry")), 9, aa)) : _.value ? (d(), m("button", {
3856
+ onClick: (F) => r("retry", P.id)
3857
+ }, A(v(a)("reportV5.reportAi.build.retry")), 9, ca)) : w.value ? (c(), p("button", {
3838
3858
  key: 1,
3839
3859
  "data-testid": "report-canvas-ask-builder",
3840
3860
  class: "fm-typo-en-body-sm-600 shrink-0 text-fm-color-typo-secondary underline",
3841
- onClick: (V) => r("askBuilder", M.title)
3842
- }, w(b(a)("reportV5.reportAi.build.askBuilder")), 9, ra)) : L("", !0)
3861
+ onClick: (F) => r("askBuilder", P.title)
3862
+ }, A(v(a)("reportV5.reportAi.build.askBuilder")), 9, ma)) : j("", !0)
3843
3863
  ]))), 128))
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
- C("button", {
3864
+ ])) : j("", !0),
3865
+ e.retryError ? (c(), p("p", ua, A(v(a)("reportV5.reportAi.build.retryFailed")), 1)) : j("", !0),
3866
+ I.value ? (c(), p("div", pa, [
3867
+ N("button", {
3848
3868
  "data-testid": "report-canvas-details-toggle",
3849
3869
  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": R.value,
3851
- onClick: P[1] || (P[1] = (M) => R.value = !R.value)
3870
+ "aria-expanded": _.value,
3871
+ onClick: R[1] || (R[1] = (P) => _.value = !_.value)
3852
3872
  }, [
3853
- ee(z, {
3854
- name: R.value ? "expand_more" : "chevron_right",
3873
+ Z(E, {
3874
+ name: _.value ? "expand_more" : "chevron_right",
3855
3875
  size: "sm"
3856
3876
  }, null, 8, ["name"]),
3857
- Ce(" " + w(b(a)("reportV5.reportAi.build.details")), 1)
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,
3877
+ Ce(" " + A(v(a)("reportV5.reportAi.build.details")), 1)
3878
+ ], 8, ha),
3879
+ _.value ? (c(), p("div", ga, [
3880
+ e.active ? j("", !0) : (c(!0), p(fe, { key: 0 }, me(e.phases, (P) => (c(), p("p", {
3881
+ key: P,
3862
3882
  class: "fm-typo-en-body-sm-400 flex items-center gap-8 text-fm-color-typo-secondary"
3863
3883
  }, [
3864
- C("span", fa, [
3865
- ee(z, {
3884
+ N("span", ba, [
3885
+ Z(E, {
3866
3886
  name: "check",
3867
3887
  size: "sm"
3868
3888
  })
3869
3889
  ]),
3870
- Ce(" " + w(b(a)(`reportV5.reportAi.chat.phaseDone.${M}`)), 1)
3890
+ Ce(" " + A(v(a)(`reportV5.reportAi.chat.phaseDone.${P}`)), 1)
3871
3891
  ]))), 128)),
3872
- (d(!0), m(fe, null, me(i.value, (M) => (d(), m("p", {
3873
- key: M.id,
3892
+ (c(!0), p(fe, null, me(o.value, (P) => (c(), p("p", {
3893
+ key: P.id,
3874
3894
  "data-testid": "report-canvas-widget-state",
3875
3895
  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.${M.status}`)
3896
+ title: v(a)(`reportV5.reportAi.build.state.${P.status}`)
3877
3897
  }, [
3878
- C("span", ca, [
3879
- M.status === "ok" ? (d(), ve(z, {
3898
+ N("span", ya, [
3899
+ P.status === "ok" ? (c(), ge(E, {
3880
3900
  key: 0,
3881
3901
  name: "check",
3882
3902
  size: "sm",
3883
3903
  class: "text-fm-color-system-success-300"
3884
- })) : M.status === "error" ? (d(), ve(z, {
3904
+ })) : P.status === "error" ? (c(), ge(E, {
3885
3905
  key: 1,
3886
3906
  name: "close",
3887
3907
  size: "sm",
3888
3908
  class: "text-fm-color-typo-error"
3889
- })) : M.status === "building" ? (d(), m("span", ma)) : (d(), ve(z, {
3909
+ })) : P.status === "building" ? (c(), p("span", xa)) : (c(), ge(E, {
3890
3910
  key: 3,
3891
3911
  name: "radio_button_unchecked",
3892
3912
  size: "sm",
3893
3913
  class: "text-fm-color-typo-tertiary"
3894
3914
  }))
3895
3915
  ]),
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);
3916
+ N("span", wa, A(P.title), 1),
3917
+ P.status === "error" ? (c(), p("span", ka, A(v(a)("reportV5.reportAi.build.state.error")), 1)) : (c(), p("span", _a, A(v(a)(`reportV5.reportAi.build.state.${P.status}`)), 1))
3918
+ ], 8, va))), 128))
3919
+ ])) : j("", !0)
3920
+ ])) : j("", !0)
3921
+ ])) : j("", !0);
3902
3922
  };
3903
3923
  }
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 = {
3924
+ }), bt = /* @__PURE__ */ Et(Sa, [["__scopeId", "data-v-d9511bdd"]]), Ia = { class: "flex flex-col items-stretch gap-8 px-[20px] pb-16 pt-12" }, Aa = {
3905
3925
  key: 0,
3906
3926
  "data-testid": "chat-edit-target-context",
3907
3927
  class: "fm-typo-en-body-sm-400 line-clamp-1 text-fm-color-typo-secondary"
3908
- }, ya = {
3928
+ }, Ca = {
3909
3929
  key: 1,
3910
3930
  role: "alert",
3911
3931
  class: "fm-typo-en-body-sm-400 text-fm-color-typo-error"
3912
- }, xa = {
3932
+ }, Ta = {
3913
3933
  "data-testid": "report-canvas-chat-input",
3914
3934
  class: "rounded-lg border border-fm-color-border-secondary bg-fm-color-neutral-white p-16 focus-within:border-fm-color-primary"
3915
- }, wa = ["value", "placeholder", "aria-label"], ka = { class: "mt-16 flex items-center gap-12" }, _a = ["aria-label"], Ia = {
3935
+ }, Ea = ["value", "placeholder", "aria-label"], Oa = { class: "mt-16 flex items-center gap-12" }, za = ["aria-label"], Na = {
3916
3936
  key: 0,
3917
3937
  class: "flex max-h-[96px] min-w-0 grow flex-wrap gap-4 overflow-y-auto"
3918
- }, Sa = { class: "fm-typo-en-body-sm-400 min-w-0 truncate" }, Aa = ["disabled", "aria-label", "onClick"], Ca = {
3938
+ }, Ra = { class: "fm-typo-en-body-sm-400 min-w-0 truncate" }, Ma = ["disabled", "aria-label", "onClick"], Pa = {
3919
3939
  key: 1,
3920
3940
  class: "fm-typo-en-body-sm-400 min-w-0 grow truncate"
3921
- }, Ea = {
3941
+ }, La = {
3922
3942
  key: 0,
3923
3943
  "data-testid": "chat-edit-target-element"
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({
3944
+ }, ja = ["disabled", "aria-label"], $a = ["disabled", "aria-label", "title"], Da = ["disabled", "aria-label"], Ba = { class: "text-[12px] leading-16 text-fm-color-typo-secondary" }, vt = 21, qa = /* @__PURE__ */ $e({
3925
3945
  __name: "ReportCanvasComposer",
3926
3946
  props: {
3927
3947
  draft: {},
@@ -3937,158 +3957,158 @@ const Dn = {
3937
3957
  },
3938
3958
  emits: ["update:draft", "submit", "clearTarget", "stop"],
3939
3959
  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`);
3960
+ const r = e, a = n, { t: o } = Be(), y = vt * 2, x = vt * 6, w = O(), u = O(!1);
3961
+ function M() {
3962
+ const m = w.value;
3963
+ m && (m.style.height = "auto", m.style.height = `${Math.min(Math.max(m.scrollHeight, y), x)}px`);
3944
3964
  }
3945
- Le($), se(
3965
+ Pe(M), ie(
3946
3966
  () => r.draft,
3947
- () => void ke($)
3967
+ () => void we(M)
3948
3968
  );
3949
- function N(c) {
3950
- a("update:draft", c.target.value);
3951
- }
3952
- function A(c) {
3953
- c.key !== "Enter" || c.shiftKey || u.value || c.isComposing || (c.preventDefault(), T());
3954
- }
3955
- const R = D(() => !!r.draft.trim() && !r.streaming && !r.targetStale);
3956
- function T() {
3957
- R.value && a("submit");
3958
- }
3959
- function B() {
3960
- var c;
3961
- (c = _.value) == null || c.focus();
3962
- }
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
- if (!y) return "";
3968
- const g = (y.text || "").trim();
3969
- return g ? g.slice(0, 40) : y.part || y.tag;
3970
- }
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
- }
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"
3969
+ function z(m) {
3970
+ a("update:draft", m.target.value);
3971
+ }
3972
+ function h(m) {
3973
+ m.key !== "Enter" || m.shiftKey || u.value || m.isComposing || (m.preventDefault(), I());
3974
+ }
3975
+ const _ = $(() => !!r.draft.trim() && !r.streaming && !r.targetStale);
3976
+ function I() {
3977
+ _.value && a("submit");
3978
+ }
3979
+ function L() {
3980
+ var m;
3981
+ (m = w.value) == null || m.focus();
3982
+ }
3983
+ t({ focus: L });
3984
+ const R = $(() => r.targets ?? (r.target ? [r.target] : [])), E = $(() => R.value.length === 1 ? R.value[0] : void 0);
3985
+ function P(m) {
3986
+ const k = m == null ? void 0 : m.element;
3987
+ if (!k) return "";
3988
+ const g = (k.text || "").trim();
3989
+ return g ? g.slice(0, 40) : k.part || k.tag;
3990
+ }
3991
+ const F = $(() => P(E.value));
3992
+ function G(m) {
3993
+ const k = P(m);
3994
+ return (m.label || o("reportV5.reportAi.chat.selectedWidget")) + (k ? " › " + k : "");
3995
+ }
3996
+ const Y = $(
3997
+ () => !R.value.length && r.placeholder || o(
3998
+ R.value.length ? "reportV5.reportAi.chat.commentPlaceholder" : r.blank ? "reportV5.reportAi.chat.placeholderNew" : "reportV5.reportAi.chat.placeholderChange"
3979
3999
  )
3980
- ), Z = D(() => r.targetLabel ?? i("reportV5.reportAi.chat.entireReport"));
3981
- return (c, y) => {
3982
- var U;
4000
+ ), Q = $(() => r.targetLabel ?? o("reportV5.reportAi.chat.entireReport"));
4001
+ return (m, k) => {
4002
+ var H;
3983
4003
  const g = Oe("FmIcon");
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
- C("textarea", {
4004
+ return c(), p("div", Ia, [
4005
+ (H = E.value) != null && H.elementText ? (c(), p("p", Aa, " “" + A(E.value.elementText) + "” ", 1)) : j("", !0),
4006
+ e.targetStale && !e.streaming ? (c(), p("p", Ca, A(v(o)("reportV5.reportAi.chat.staleTarget")), 1)) : j("", !0),
4007
+ N("div", Ta, [
4008
+ N("textarea", {
3989
4009
  ref_key: "field",
3990
- ref: _,
4010
+ ref: w,
3991
4011
  value: e.draft,
3992
- placeholder: X.value,
3993
- "aria-label": X.value,
4012
+ placeholder: Y.value,
4013
+ "aria-label": Y.value,
3994
4014
  rows: "2",
3995
4015
  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: N,
3997
- onKeydown: A,
3998
- onCompositionstart: y[0] || (y[0] = (q) => u.value = !0),
3999
- onCompositionend: y[1] || (y[1] = (q) => u.value = !1)
4000
- }, null, 40, wa),
4001
- C("div", ka, [
4002
- C("div", {
4016
+ onInput: z,
4017
+ onKeydown: h,
4018
+ onCompositionstart: k[0] || (k[0] = (V) => u.value = !0),
4019
+ onCompositionend: k[1] || (k[1] = (V) => u.value = !1)
4020
+ }, null, 40, Ea),
4021
+ N("div", Oa, [
4022
+ N("div", {
4003
4023
  "data-testid": "chat-edit-target",
4004
4024
  role: "status",
4005
- "aria-label": P.value.length ? b(i)("reportV5.reportAi.chat.commentOn", { widget: P.value.map(Y).join(", ") }) : Z.value,
4025
+ "aria-label": R.value.length ? v(o)("reportV5.reportAi.chat.commentOn", { widget: R.value.map(G).join(", ") }) : Q.value,
4006
4026
  class: "flex min-w-0 grow items-center gap-8 text-fm-color-typo-secondary"
4007
4027
  }, [
4008
- ee(g, {
4009
- name: P.value.length ? "mode_comment" : "dashboard",
4028
+ Z(g, {
4029
+ name: R.value.length ? "mode_comment" : "dashboard",
4010
4030
  size: "sm",
4011
4031
  outline: ""
4012
4032
  }, null, 8, ["name"]),
4013
- P.value.length > 1 ? (d(), m("ul", Ia, [
4014
- (d(!0), m(fe, null, me(P.value, (q, K) => (d(), m("li", {
4033
+ R.value.length > 1 ? (c(), p("ul", Na, [
4034
+ (c(!0), p(fe, null, me(R.value, (V, K) => (c(), p("li", {
4015
4035
  key: K,
4016
4036
  "data-testid": "chat-edit-target-part",
4017
4037
  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
4038
  }, [
4019
- C("span", Sa, w(Y(q)), 1),
4020
- C("button", {
4039
+ N("span", Ra, A(G(V)), 1),
4040
+ N("button", {
4021
4041
  class: "flex shrink-0 items-center text-fm-color-typo-secondary disabled:opacity-50",
4022
4042
  disabled: e.streaming,
4023
- "aria-label": b(i)(
4024
- q.element && !q.area ? "reportV5.reportAi.chat.removeElement" : "reportV5.reportAi.chat.removeTarget"
4043
+ "aria-label": v(o)(
4044
+ V.element && !V.area ? "reportV5.reportAi.chat.removeElement" : "reportV5.reportAi.chat.removeTarget"
4025
4045
  ),
4026
- onClick: (ae) => a("clearTarget", K)
4046
+ onClick: (ne) => a("clearTarget", K)
4027
4047
  }, [
4028
- ee(g, {
4048
+ Z(g, {
4029
4049
  name: "close",
4030
4050
  size: "sm"
4031
4051
  })
4032
- ], 8, Aa)
4052
+ ], 8, Ma)
4033
4053
  ]))), 128))
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)
4054
+ ])) : (c(), p("p", Pa, [
4055
+ Ce(A(E.value ? E.value.label || v(o)("reportV5.reportAi.chat.selectedWidget") : Q.value), 1),
4056
+ F.value ? (c(), p("span", La, " › " + A(F.value), 1)) : j("", !0)
4037
4057
  ])),
4038
- z.value ? (d(), m("button", {
4058
+ E.value ? (c(), p("button", {
4039
4059
  key: 2,
4040
4060
  class: "flex shrink-0 items-center text-fm-color-typo-secondary disabled:opacity-50",
4041
4061
  disabled: e.streaming,
4042
- "aria-label": b(i)(
4043
- z.value.element && !z.value.area ? "reportV5.reportAi.chat.removeElement" : "reportV5.reportAi.chat.removeTarget"
4062
+ "aria-label": v(o)(
4063
+ E.value.element && !E.value.area ? "reportV5.reportAi.chat.removeElement" : "reportV5.reportAi.chat.removeTarget"
4044
4064
  ),
4045
- onClick: y[2] || (y[2] = (q) => a("clearTarget", 0))
4065
+ onClick: k[2] || (k[2] = (V) => a("clearTarget", 0))
4046
4066
  }, [
4047
- ee(g, {
4067
+ Z(g, {
4048
4068
  name: "close",
4049
4069
  size: "sm"
4050
4070
  })
4051
- ], 8, Ta)) : L("", !0)
4052
- ], 8, _a),
4053
- e.stoppable ? (d(), m("button", {
4071
+ ], 8, ja)) : j("", !0)
4072
+ ], 8, za),
4073
+ e.stoppable ? (c(), p("button", {
4054
4074
  key: 0,
4055
4075
  "data-testid": "report-canvas-chat-stop",
4056
4076
  type: "button",
4057
4077
  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
4078
  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
- onClick: y[3] || (y[3] = (q) => a("stop"))
4079
+ "aria-label": v(o)(e.stopping ? "reportV5.reportAi.chat.stopping" : "reportV5.reportAi.chat.stop"),
4080
+ title: v(o)(e.stopping ? "reportV5.reportAi.chat.stopping" : "reportV5.reportAi.chat.stop"),
4081
+ onClick: k[3] || (k[3] = (V) => a("stop"))
4062
4082
  }, [
4063
- ee(g, {
4083
+ Z(g, {
4064
4084
  name: "stop",
4065
4085
  size: "sm"
4066
4086
  })
4067
- ], 8, Oa)) : (d(), m("button", {
4087
+ ], 8, $a)) : (c(), p("button", {
4068
4088
  key: 1,
4069
4089
  "data-testid": "report-canvas-chat-send",
4070
- class: et([
4090
+ class: Ze([
4071
4091
  "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
- R.value ? "bg-fm-color-primary text-fm-color-neutral-white" : "bg-fm-color-neutral-gray-100 text-fm-color-typo-secondary"
4092
+ _.value ? "bg-fm-color-primary text-fm-color-neutral-white" : "bg-fm-color-neutral-gray-100 text-fm-color-typo-secondary"
4073
4093
  ]),
4074
- disabled: !R.value,
4075
- "aria-label": b(i)("reportV5.reportAi.chat.send"),
4076
- onClick: T
4094
+ disabled: !_.value,
4095
+ "aria-label": v(o)("reportV5.reportAi.chat.send"),
4096
+ onClick: I
4077
4097
  }, [
4078
- ee(g, {
4098
+ Z(g, {
4079
4099
  name: "arrow_forward",
4080
4100
  size: "sm"
4081
4101
  })
4082
- ], 10, za))
4102
+ ], 10, Da))
4083
4103
  ])
4084
4104
  ]),
4085
- C("p", Na, w(e.streaming && e.draft.trim() ? b(i)("reportV5.reportAi.chat.waitForUpdate") : b(i)("reportV5.reportAi.chat.newLineHint")), 1)
4105
+ N("p", Ba, A(e.streaming && e.draft.trim() ? v(o)("reportV5.reportAi.chat.waitForUpdate") : v(o)("reportV5.reportAi.chat.newLineHint")), 1)
4086
4106
  ]);
4087
4107
  };
4088
4108
  }
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(
4109
+ }), Va = "rounded-sm bg-fm-color-neutral-gray-100 px-4 font-mono text-[0.9em]";
4110
+ function yt(e) {
4111
+ 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: Va }, t.text) : t.type === "link" ? ce(
4092
4112
  "a",
4093
4113
  {
4094
4114
  href: t.href,
@@ -4099,7 +4119,7 @@ function xt(e) {
4099
4119
  t.text
4100
4120
  ) : t.text);
4101
4121
  }
4102
- const La = (e) => ce(
4122
+ const Fa = (e) => ce(
4103
4123
  "div",
4104
4124
  { class: "fm-typo-en-body-md-400 flex flex-col items-stretch gap-8 !leading-[21px]" },
4105
4125
  (e.blocks ?? []).map((t) => t.type === "pre" ? ce(
@@ -4111,102 +4131,102 @@ const La = (e) => ce(
4111
4131
  ) : t.type === "list" ? ce(
4112
4132
  t.ordered ? "ol" : "ul",
4113
4133
  { class: `flex flex-col gap-4 pl-16 ${t.ordered ? "list-decimal" : "list-disc"}` },
4114
- t.items.map((n) => ce("li", xt(n)))
4134
+ t.items.map((n) => ce("li", yt(n)))
4115
4135
  ) : ce(
4116
4136
  "p",
4117
4137
  { class: t.heading ? "fm-typo-en-body-md-600" : void 0 },
4118
- xt(t.inline)
4138
+ yt(t.inline)
4119
4139
  ))
4120
- ), Pa = ["aria-expanded"], ja = /* @__PURE__ */ $e({
4140
+ ), Ua = ["aria-expanded"], Ha = /* @__PURE__ */ $e({
4121
4141
  __name: "ReportCanvasMessage",
4122
4142
  props: {
4123
4143
  blocks: {},
4124
4144
  preview: {}
4125
4145
  },
4126
4146
  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", {
4147
+ const t = e, { t: n } = Be(), r = O(!0), a = $(() => t.preview && !r.value ? t.preview : t.blocks);
4148
+ return (o, y) => (c(), p("div", null, [
4149
+ Z(v(Fa), { blocks: a.value }, null, 8, ["blocks"]),
4150
+ e.preview ? (c(), p("button", {
4131
4151
  key: 0,
4132
4152
  "data-testid": "report-canvas-full-reply",
4133
4153
  class: "fm-typo-en-body-sm-600 mt-4 text-fm-color-typo-secondary underline",
4134
4154
  "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)
4155
+ onClick: y[0] || (y[0] = (x) => r.value = !r.value)
4156
+ }, A(v(n)(r.value ? "reportV5.reportAi.chat.showLess" : "reportV5.reportAi.chat.showFullReply")), 9, Ua)) : j("", !0)
4137
4157
  ]));
4138
4158
  }
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 = {
4159
+ }), Wa = ["aria-label"], Ga = { class: "flex h-64 shrink-0 items-center gap-12 border-b border-fm-color-border-secondary px-[20px]" }, Ya = { class: "min-w-0 grow" }, Xa = { class: "fm-typo-en-body-md-600" }, Ka = {
4140
4160
  key: 0,
4141
4161
  class: "fm-typo-en-body-sm-400 truncate text-fm-color-typo-secondary"
4142
- }, Fa = ["disabled", "aria-label"], Ua = ["disabled", "aria-label", "title"], Ha = ["aria-label"], Wa = ["data-testid", "aria-label"], Ga = {
4162
+ }, Ja = ["disabled", "aria-label"], Qa = ["disabled", "aria-label", "title"], Za = ["aria-label"], er = ["data-testid", "aria-label"], tr = {
4143
4163
  key: 0,
4144
4164
  class: "mt-auto flex shrink-0 flex-col gap-24 pb-8 pt-32"
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 = {
4165
+ }, nr = { class: "text-center" }, ar = { class: "text-[24px] font-semibold leading-tight tracking-tight text-fm-color-typo-primary" }, rr = { class: "fm-typo-en-body-sm-400 mt-12 text-fm-color-typo-secondary" }, or = {
4146
4166
  key: 0,
4147
4167
  class: "flex flex-col gap-4"
4148
- }, Qa = ["disabled", "title", "onClick"], Za = ["aria-label"], er = { class: "fm-typo-en-body-sm-600 mb-12 text-fm-color-typo-secondary" }, tr = {
4168
+ }, ir = ["disabled", "title", "onClick"], sr = ["aria-label"], lr = { class: "fm-typo-en-body-sm-600 mb-12 text-fm-color-typo-secondary" }, fr = {
4149
4169
  key: 0,
4150
4170
  class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary"
4151
- }, nr = {
4171
+ }, dr = {
4152
4172
  key: 1,
4153
4173
  "data-testid": "report-canvas-chat-list-error",
4154
4174
  class: "fm-typo-en-body-sm-400 text-fm-color-typo-error"
4155
- }, ar = {
4175
+ }, cr = {
4156
4176
  key: 2,
4157
4177
  class: "fm-typo-en-body-sm-400 py-12 text-fm-color-typo-secondary"
4158
- }, rr = {
4178
+ }, mr = {
4159
4179
  key: 0,
4160
4180
  class: "fm-typo-en-body-sm-400 mb-8 text-fm-color-typo-secondary"
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 = {
4181
+ }, ur = ["disabled", "aria-current", "title", "onClick"], pr = { class: "fm-typo-en-body-md-400 min-w-0 grow truncate" }, hr = ["datetime"], gr = ["disabled"], br = ["disabled"], vr = {
4162
4182
  key: 2,
4163
4183
  "data-testid": "report-canvas-chat-error",
4164
4184
  class: "fm-typo-en-body-sm-400 mt-12 text-fm-color-typo-error"
4165
- }, cr = {
4185
+ }, yr = {
4166
4186
  key: 1,
4167
4187
  class: "relative flex min-h-0 grow flex-col"
4168
- }, mr = {
4188
+ }, xr = {
4169
4189
  key: 0,
4170
4190
  "data-testid": "report-canvas-chat-loading",
4171
4191
  class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
4172
- }, ur = ["disabled"], pr = {
4192
+ }, wr = ["disabled"], kr = {
4173
4193
  key: 0,
4174
4194
  "data-testid": "chat-message-target",
4175
4195
  class: "fm-typo-en-body-sm-600 mb-4 text-right text-fm-color-typo-secondary"
4176
- }, hr = {
4196
+ }, _r = {
4177
4197
  key: 1,
4178
4198
  class: "flex flex-col items-end"
4179
- }, gr = {
4199
+ }, Sr = {
4180
4200
  key: 0,
4181
4201
  "data-testid": "chat-message-unsent",
4182
4202
  class: "fm-typo-en-body-sm-400 mt-4 text-fm-color-typo-secondary"
4183
- }, br = ["disabled", "onClick"], vr = {
4203
+ }, Ir = ["disabled", "onClick"], Ar = {
4184
4204
  key: 1,
4185
4205
  "data-testid": "chat-message-no-reply",
4186
4206
  class: "fm-typo-en-body-sm-400 mt-4 max-w-[90%] text-right text-fm-color-typo-secondary"
4187
- }, yr = ["disabled", "onClick"], xr = ["disabled", "onClick"], wr = {
4207
+ }, Cr = ["disabled", "onClick"], Tr = ["disabled", "onClick"], Er = {
4188
4208
  key: 1,
4189
4209
  "data-testid": "report-canvas-failure",
4190
4210
  class: "rounded-md border border-fm-color-border-secondary px-12 py-12"
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 = {
4211
+ }, Or = { class: "fm-typo-en-body-md-600 flex items-center gap-8" }, zr = { class: "fm-typo-en-body-sm-400 mt-4 text-fm-color-typo-secondary" }, Nr = {
4192
4212
  key: 0,
4193
4213
  class: "mt-12 flex flex-wrap gap-8"
4194
- }, Sr = {
4214
+ }, Rr = {
4195
4215
  key: 1,
4196
4216
  "data-testid": "report-canvas-failure-ref",
4197
4217
  class: "fm-typo-en-body-sm-400 mt-8 text-fm-color-typo-tertiary"
4198
- }, Ar = {
4218
+ }, Mr = {
4199
4219
  key: 3,
4200
4220
  class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
4201
- }, Cr = {
4221
+ }, Pr = {
4202
4222
  key: 4,
4203
4223
  "data-testid": "report-canvas-answer-duration",
4204
4224
  class: "fm-typo-en-body-sm-400 mt-4 text-fm-color-typo-secondary"
4205
- }, Er = {
4225
+ }, Lr = {
4206
4226
  key: 2,
4207
4227
  "data-testid": "report-canvas-chat-error",
4208
4228
  class: "fm-typo-en-body-md-400 text-fm-color-typo-error"
4209
- }, Tr = { class: "shrink-0" }, wt = "New chat", Or = 1440 * 60 * 1e3, zr = 80, Nr = /* @__PURE__ */ $e({
4229
+ }, jr = { class: "shrink-0" }, xt = "New chat", $r = 1440 * 60 * 1e3, Dr = 80, Br = /* @__PURE__ */ $e({
4210
4230
  __name: "ReportCanvasChatPanel",
4211
4231
  props: /* @__PURE__ */ it({
4212
4232
  messages: {},
@@ -4252,559 +4272,559 @@ const La = (e) => ce(
4252
4272
  }),
4253
4273
  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
4274
  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
- () => !n.chatTitle || n.chatTitle === wt ? a("reportV5.reportAi.chat.chats") : n.chatTitle
4260
- ), A = E(!1), R = D(() => n.switching || A.value);
4261
- se(
4275
+ const n = e, r = t, { t: a, locale: o } = Be(), y = $(() => {
4276
+ var l;
4277
+ return ((l = n.copy) == null ? void 0 : l.title) ?? a("reportV5.reportAi.chat.title");
4278
+ }), x = rt(e, "homeOpen"), w = O(!1), u = rt(e, "homeDraft"), M = O(!1), z = $(
4279
+ () => !n.chatTitle || n.chatTitle === xt ? a("reportV5.reportAi.chat.chats") : n.chatTitle
4280
+ ), h = O(!1), _ = $(() => n.switching || h.value);
4281
+ ie(
4262
4282
  () => n.messages,
4263
4283
  () => {
4264
- A.value = !1;
4284
+ h.value = !1;
4265
4285
  }
4266
- ), se(
4286
+ ), ie(
4267
4287
  () => n.switching,
4268
- (o) => {
4269
- o || (A.value = !1);
4288
+ (l) => {
4289
+ l || (h.value = !1);
4270
4290
  }
4271
4291
  );
4272
- function T() {
4273
- n.busy || (k.value = !0, _.value = !1, r("loadChats"));
4292
+ function I() {
4293
+ n.busy || (x.value = !0, w.value = !1, r("loadChats"));
4274
4294
  }
4275
- function B() {
4276
- _.value = !0, r("loadChats");
4295
+ function L() {
4296
+ w.value = !0, r("loadChats");
4277
4297
  }
4278
- function P() {
4279
- _.value ? _.value = !1 : T();
4298
+ function R() {
4299
+ w.value ? w.value = !1 : I();
4280
4300
  }
4281
- function z(o) {
4282
- n.busy || (k.value = !1, _.value = !1, o !== n.chatId && (A.value = !0, r("selectChat", o)));
4301
+ function E(l) {
4302
+ n.busy || (x.value = !1, w.value = !1, l !== n.chatId && (h.value = !0, r("selectChat", l)));
4283
4303
  }
4284
- function M() {
4285
- n.busy || (k.value = !1, _.value = !1, A.value = !0, r("newChat"));
4304
+ function P() {
4305
+ n.busy || (x.value = !1, w.value = !1, h.value = !0, r("newChat"));
4286
4306
  }
4287
- se(
4307
+ ie(
4288
4308
  () => n.chatId,
4289
4309
  () => {
4290
- $.value && (u.value = "", $.value = !1, k.value = !1);
4310
+ M.value && (u.value = "", M.value = !1, x.value = !1);
4291
4311
  }
4292
- ), se(
4312
+ ), ie(
4293
4313
  () => n.switching,
4294
- (o) => {
4295
- o || ($.value = !1);
4314
+ (l) => {
4315
+ l || (M.value = !1);
4296
4316
  }
4297
4317
  );
4298
- function V(o) {
4299
- if (o.key === "Escape" && _.value) {
4300
- o.stopPropagation(), _.value = !1;
4318
+ function F(l) {
4319
+ if (l.key === "Escape" && w.value) {
4320
+ l.stopPropagation(), w.value = !1;
4301
4321
  return;
4302
4322
  }
4303
- o.key === "Escape" && k.value && (o.stopPropagation(), k.value = !1);
4304
- }
4305
- const Y = D(() => {
4306
- const o = /* @__PURE__ */ new Date();
4307
- o.setHours(0, 0, 0, 0);
4308
- const p = [];
4309
- for (const G of n.chats ?? []) {
4310
- const W = new Date(G.lastMessageAt).getTime(), ge = W >= o.getTime() ? "today" : W >= o.getTime() - Or ? "yesterday" : "earlier";
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);
4323
+ l.key === "Escape" && x.value && (l.stopPropagation(), x.value = !1);
4324
+ }
4325
+ const G = $(() => {
4326
+ const l = /* @__PURE__ */ new Date();
4327
+ l.setHours(0, 0, 0, 0);
4328
+ const s = [];
4329
+ for (const W of n.chats ?? []) {
4330
+ const U = new Date(W.lastMessageAt).getTime(), de = U >= l.getTime() ? "today" : U >= l.getTime() - $r ? "yesterday" : "earlier";
4331
+ (s.find((he) => he.key === de) ?? (s.push({ key: de, label: a(`reportV5.reportAi.chat.group.${de}`), chats: [] }), s[s.length - 1])).chats.push(W);
4312
4332
  }
4313
- return p;
4333
+ return s;
4314
4334
  });
4315
- function X(o) {
4316
- return new Date(o.lastMessageAt).toLocaleString(i.value, {
4335
+ function Y(l) {
4336
+ return new Date(l.lastMessageAt).toLocaleString(o.value, {
4317
4337
  month: "short",
4318
4338
  day: "numeric"
4319
4339
  });
4320
4340
  }
4321
- const Z = D(() => new Set(n.undoableTurnIds ?? [])), c = D(() => new Set(n.unsentIds ?? [])), y = E();
4322
- se(
4341
+ const Q = $(() => new Set(n.undoableTurnIds ?? [])), m = $(() => new Set(n.unsentIds ?? [])), k = O();
4342
+ ie(
4323
4343
  () => n.targets ?? n.target,
4324
- async (o) => {
4325
- var p;
4326
- (Array.isArray(o) ? !o.length : !o) || (_.value = !1, await ke(), (p = y.value) == null || p.focus());
4344
+ async (l) => {
4345
+ var s;
4346
+ (Array.isArray(l) ? !l.length : !l) || (w.value = !1, await we(), (s = k.value) == null || s.focus());
4327
4347
  },
4328
4348
  { immediate: !0 }
4329
4349
  );
4330
- const g = D(
4350
+ const g = $(
4331
4351
  () => {
4332
- var o;
4333
- return $n(n.messages ?? [], {
4352
+ var l;
4353
+ return Wn(n.messages ?? [], {
4334
4354
  streamingId: n.streaming ? n.turnId : void 0,
4335
- outcomes: (o = n.copy) == null ? void 0 : o.outcomes
4355
+ outcomes: (l = n.copy) == null ? void 0 : l.outcomes
4336
4356
  });
4337
4357
  }
4338
- ), U = D(() => {
4339
- const o = new Set(n.noReplyId ? [n.noReplyId] : []);
4340
- return g.value.forEach((p, G) => {
4341
- var W;
4342
- p.role === "user" && ((W = g.value[G + 1]) == null ? void 0 : W.role) === "user" && o.add(p.id);
4343
- }), o;
4358
+ ), H = $(() => {
4359
+ const l = new Set(n.noReplyId ? [n.noReplyId] : []);
4360
+ return g.value.forEach((s, W) => {
4361
+ var U;
4362
+ s.role === "user" && ((U = g.value[W + 1]) == null ? void 0 : U.role) === "user" && l.add(s.id);
4363
+ }), l;
4344
4364
  });
4345
- function q(o) {
4346
- for (let p = o - 1; p >= 0; p -= 1)
4347
- if (g.value[p].role === "user") return g.value[p].id;
4348
- }
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(
4365
+ function V(l) {
4366
+ for (let s = l - 1; s >= 0; s -= 1)
4367
+ if (g.value[s].role === "user") return g.value[s].id;
4368
+ }
4369
+ const K = $(
4370
+ () => n.streaming ? g.value.findIndex((l) => l.pending) : -1
4371
+ ), ne = $(() => g.value.findIndex((l) => l.id === n.runAnchorId)), ae = $(
4372
+ () => K.value < 0 && (n.streaming || n.interrupted) || ne.value < 0 && !!n.run
4373
+ ), ee = $(
4374
+ () => x.value || !n.earlier && !_.value && !g.value.length && !ae.value
4375
+ ), ve = $(() => (n.chats ?? []).slice(0, 3)), ue = $(
4356
4376
  () => {
4357
- var o;
4358
- return !!((o = n.chats) != null && o.length) || !!n.chatsLoading || !!n.chatsError || _.value;
4377
+ var l;
4378
+ return !!((l = n.chats) != null && l.length) || !!n.chatsLoading || !!n.chatsError || w.value;
4359
4379
  }
4360
4380
  );
4361
- se(
4362
- [te, () => n.chatId],
4363
- ([o, p]) => {
4364
- o && p && !k.value && r("loadChats");
4381
+ ie(
4382
+ [ee, () => n.chatId],
4383
+ ([l, s]) => {
4384
+ l && s && !x.value && r("loadChats");
4365
4385
  },
4366
4386
  { immediate: !0 }
4367
4387
  );
4368
- const we = D(
4369
- () => _.value ? Y.value : [{ key: "recent", label: "", chats: xe.value }]
4388
+ const ye = $(
4389
+ () => w.value ? G.value : [{ key: "recent", label: "", chats: ve.value }]
4370
4390
  );
4371
- function ne(o) {
4372
- var W;
4373
- const p = o === K.value, G = o === ae.value;
4391
+ function te(l) {
4392
+ var U;
4393
+ const s = l === K.value, W = l === ne.value;
4374
4394
  return {
4375
- active: p && n.streaming || G && ((W = n.run) == null ? void 0 : W.status) === "running" && !n.runStale,
4395
+ active: s && n.streaming || W && ((U = n.run) == null ? void 0 : U.status) === "running" && !n.runStale,
4376
4396
  // a run card left behind by a newer streaming turn shows its own work, not that turn's phase
4377
- phase: p || !n.streaming ? n.phase : "updating",
4378
- phases: Cn(g.value[o]),
4379
- run: G ? n.run : null,
4380
- slow: p && n.slow,
4381
- startedAt: p && n.streaming ? n.startedAt ?? null : null,
4382
- stale: G && n.runStale,
4383
- interrupted: p && n.interrupted,
4384
- retryError: G ? n.retryError : ""
4397
+ phase: s || !n.streaming ? n.phase : "updating",
4398
+ phases: Pn(g.value[l]),
4399
+ run: W ? n.run : null,
4400
+ slow: s && n.slow,
4401
+ startedAt: s && n.streaming ? n.startedAt ?? null : null,
4402
+ stale: W && n.runStale,
4403
+ interrupted: s && n.interrupted,
4404
+ retryError: W ? n.retryError : ""
4385
4405
  };
4386
4406
  }
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`)
4407
+ const ke = ["one", "two", "three"], pe = $(
4408
+ () => n.starters ?? (n.blank ? ke.map((l) => ({
4409
+ label: a(`reportV5.reportAi.chat.suggestNew.${l}.label`),
4410
+ prompt: a(`reportV5.reportAi.chat.suggestNew.${l}.prompt`)
4391
4411
  })) : [])
4392
4412
  );
4393
- async function he(o) {
4394
- var p;
4395
- r("editRequest", o), await ke(), (p = y.value) == null || p.focus();
4413
+ async function Ee(l) {
4414
+ var s;
4415
+ r("editRequest", l), await we(), (s = k.value) == null || s.focus();
4396
4416
  }
4397
- async function de(o) {
4398
- var p;
4399
- r("askBuilder", o), await ke(), (p = y.value) == null || p.focus();
4417
+ async function se(l) {
4418
+ var s;
4419
+ r("askBuilder", l), await we(), (s = k.value) == null || s.focus();
4400
4420
  }
4401
- async function Te(o) {
4402
- var p;
4403
- Ie(o), await ke(), (p = y.value) == null || p.focus();
4421
+ async function _e(l) {
4422
+ var s;
4423
+ Se(l), await we(), (s = k.value) == null || s.focus();
4404
4424
  }
4405
- function Ie(o) {
4406
- k.value ? u.value = o : r("update:draft", o);
4425
+ function Se(l) {
4426
+ x.value ? u.value = l : r("update:draft", l);
4407
4427
  }
4408
- const h = E(), I = E(!0), O = E(!1);
4409
- function F() {
4410
- const o = h.value;
4411
- o && (I.value = o.scrollHeight - o.scrollTop - o.clientHeight <= zr, I.value && (O.value = !1));
4428
+ const xe = O(), b = O(!0), C = O(!1);
4429
+ function D() {
4430
+ const l = xe.value;
4431
+ l && (b.value = l.scrollHeight - l.scrollTop - l.clientHeight <= Dr, b.value && (C.value = !1));
4412
4432
  }
4413
- async function J() {
4414
- await ke();
4415
- const o = h.value;
4416
- o && (o.scrollTop = o.scrollHeight, I.value = !0, O.value = !1);
4433
+ async function q() {
4434
+ await we();
4435
+ const l = xe.value;
4436
+ l && (l.scrollTop = l.scrollHeight, b.value = !0, C.value = !1);
4417
4437
  }
4418
- se(
4438
+ ie(
4419
4439
  () => JSON.stringify(n.messages ?? []).length,
4420
4440
  () => {
4421
- I.value ? J() : O.value = !0;
4441
+ b.value ? q() : C.value = !0;
4422
4442
  }
4423
4443
  );
4424
- function H() {
4425
- if (k.value) {
4426
- if (!u.value.trim() || n.busy || n.targetStale || $.value) return;
4427
- $.value = !0, r("newChat", u.value.trim());
4444
+ function X() {
4445
+ if (x.value) {
4446
+ if (!u.value.trim() || n.busy || n.targetStale || M.value) return;
4447
+ M.value = !0, r("newChat", u.value.trim());
4428
4448
  return;
4429
4449
  }
4430
- !n.draft.trim() || n.streaming || n.targetStale || (r("submit"), J());
4450
+ !n.draft.trim() || n.streaming || n.targetStale || (r("submit"), q());
4431
4451
  }
4432
- return (o, p) => {
4433
- var Se, be, Ne, Re, Me, l;
4434
- const G = Oe("FmIcon"), W = Oe("FmTooltip"), ge = Oe("FmButton");
4435
- return d(), m("aside", {
4452
+ return (l, s) => {
4453
+ var Ie, he, Ne, Re, Me, f;
4454
+ const W = Oe("FmIcon"), U = Oe("FmTooltip"), de = Oe("FmButton");
4455
+ return c(), p("aside", {
4436
4456
  class: "flex h-full min-h-0 w-full flex-col border-l border-fm-color-border-secondary bg-fm-color-neutral-white",
4437
- "aria-label": v.value,
4438
- onKeydown: V
4457
+ "aria-label": y.value,
4458
+ onKeydown: F
4439
4459
  }, [
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)
4460
+ N("header", Ga, [
4461
+ N("div", Ya, [
4462
+ N("h2", Xa, A(y.value), 1),
4463
+ !ee.value && e.chatTitle && e.chatTitle !== xt ? (c(), p("p", Ka, A(e.chatTitle), 1)) : j("", !0)
4444
4464
  ]),
4445
- !k.value || _.value ? (d(), ve(W, {
4465
+ !x.value || w.value ? (c(), ge(U, {
4446
4466
  key: 0,
4447
4467
  placement: "bottom",
4448
- content: b(a)("reportV5.reportAi.chat.chats")
4468
+ content: v(a)("reportV5.reportAi.chat.chats")
4449
4469
  }, {
4450
4470
  default: Ue(() => [
4451
- C("button", {
4471
+ N("button", {
4452
4472
  "data-testid": "report-canvas-chat-back",
4453
4473
  class: "chat-icon-button flex h-[36px] w-[36px] shrink-0 items-center justify-center rounded-md text-fm-color-typo-secondary",
4454
4474
  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
4475
+ "aria-label": w.value ? v(a)("reportV5.reportAi.chat.recentChats") : v(a)("reportV5.reportAi.chat.openChats", { title: z.value }),
4476
+ onClick: R
4457
4477
  }, [
4458
- ee(G, {
4478
+ Z(W, {
4459
4479
  name: "chevron_left",
4460
4480
  size: "md"
4461
4481
  })
4462
- ], 8, Fa)
4482
+ ], 8, Ja)
4463
4483
  ]),
4464
4484
  _: 1
4465
- }, 8, ["content"])) : L("", !0),
4466
- te.value ? L("", !0) : (d(), ve(W, {
4485
+ }, 8, ["content"])) : j("", !0),
4486
+ ee.value ? j("", !0) : (c(), ge(U, {
4467
4487
  key: 1,
4468
4488
  placement: "bottom",
4469
- content: b(a)("reportV5.reportAi.chat.newChat")
4489
+ content: v(a)("reportV5.reportAi.chat.newChat")
4470
4490
  }, {
4471
4491
  default: Ue(() => [
4472
- C("button", {
4492
+ N("button", {
4473
4493
  "data-testid": "report-canvas-new-chat",
4474
4494
  class: "chat-icon-button flex h-[36px] w-[36px] shrink-0 items-center justify-center rounded-md text-fm-color-typo-secondary",
4475
4495
  disabled: e.busy,
4476
- "aria-label": b(a)("reportV5.reportAi.chat.newChat"),
4477
- title: e.busy ? b(a)("reportV5.reportAi.chat.waitForUpdate") : void 0,
4478
- onClick: M
4496
+ "aria-label": v(a)("reportV5.reportAi.chat.newChat"),
4497
+ title: e.busy ? v(a)("reportV5.reportAi.chat.waitForUpdate") : void 0,
4498
+ onClick: P
4479
4499
  }, [
4480
- ee(G, {
4500
+ Z(W, {
4481
4501
  name: "edit_square",
4482
4502
  size: "md",
4483
4503
  outline: ""
4484
4504
  })
4485
- ], 8, Ua)
4505
+ ], 8, Qa)
4486
4506
  ]),
4487
4507
  _: 1
4488
4508
  }, 8, ["content"])),
4489
- ee(W, {
4509
+ Z(U, {
4490
4510
  placement: "left",
4491
- content: b(a)("reportV5.reportAi.chat.hide")
4511
+ content: v(a)("reportV5.reportAi.chat.hide")
4492
4512
  }, {
4493
4513
  default: Ue(() => [
4494
- C("button", {
4514
+ N("button", {
4495
4515
  "data-testid": "report-canvas-chat-close",
4496
4516
  class: "chat-icon-button flex h-[36px] w-[36px] shrink-0 items-center justify-center rounded-md text-fm-color-typo-secondary",
4497
- "aria-label": b(a)("reportV5.reportAi.chat.hide"),
4498
- onClick: p[0] || (p[0] = (s) => r("close"))
4517
+ "aria-label": v(a)("reportV5.reportAi.chat.hide"),
4518
+ onClick: s[0] || (s[0] = (i) => r("close"))
4499
4519
  }, [
4500
- ee(G, {
4520
+ Z(W, {
4501
4521
  name: "close",
4502
4522
  size: "md"
4503
4523
  })
4504
- ], 8, Ha)
4524
+ ], 8, Za)
4505
4525
  ]),
4506
4526
  _: 1
4507
4527
  }, 8, ["content"])
4508
4528
  ]),
4509
- te.value ? (d(), m("div", {
4529
+ ee.value ? (c(), p("div", {
4510
4530
  key: 0,
4511
- "data-testid": k.value ? "report-canvas-chat-list" : "report-canvas-chat-home",
4531
+ "data-testid": x.value ? "report-canvas-chat-list" : "report-canvas-chat-home",
4512
4532
  class: "flex min-h-0 grow flex-col overflow-y-auto px-[20px] py-24",
4513
- "aria-label": b(a)("reportV5.reportAi.chat.chats")
4533
+ "aria-label": v(a)("reportV5.reportAi.chat.chats")
4514
4534
  }, [
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)(
4535
+ w.value ? j("", !0) : (c(), p("div", tr, [
4536
+ N("div", nr, [
4537
+ N("h3", ar, A(((Ie = e.copy) == null ? void 0 : Ie.welcome) ?? v(a)("reportV5.reportAi.chat.exploreTitle")), 1),
4538
+ N("p", rr, A(((he = e.copy) == null ? void 0 : he.hint) ?? v(a)(
4519
4539
  e.blank ? "reportV5.reportAi.chat.placeholderNew" : "reportV5.reportAi.chat.exploreHint"
4520
4540
  )), 1)
4521
4541
  ]),
4522
- pe.value.length ? (d(), m("div", Ja, [
4523
- (d(!0), m(fe, null, me(pe.value, (s) => (d(), m("button", {
4524
- key: s.label,
4542
+ pe.value.length ? (c(), p("div", or, [
4543
+ (c(!0), p(fe, null, me(pe.value, (i) => (c(), p("button", {
4544
+ key: i.label,
4525
4545
  "data-testid": "report-canvas-suggestion",
4526
4546
  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
4547
  disabled: e.busy,
4528
- title: s.prompt,
4529
- onClick: (f) => Te(s.prompt)
4548
+ title: i.prompt,
4549
+ onClick: (d) => _e(i.prompt)
4530
4550
  }, [
4531
- C("span", null, w(s.label), 1),
4532
- ee(G, {
4551
+ N("span", null, A(i.label), 1),
4552
+ Z(W, {
4533
4553
  name: "chevron_right",
4534
4554
  size: "sm",
4535
4555
  class: "shrink-0"
4536
4556
  })
4537
- ], 8, Qa))), 128))
4538
- ])) : L("", !0)
4557
+ ], 8, ir))), 128))
4558
+ ])) : j("", !0)
4539
4559
  ])),
4540
- ue.value ? (d(), m("section", {
4560
+ ue.value ? (c(), p("section", {
4541
4561
  key: 1,
4542
4562
  class: "shrink-0 pt-24",
4543
- "aria-label": b(a)("reportV5.reportAi.chat.recentChats")
4563
+ "aria-label": v(a)("reportV5.reportAi.chat.recentChats")
4544
4564
  }, [
4545
- C("h3", er, w(b(a)(
4546
- _.value ? "reportV5.reportAi.chat.yourChats" : "reportV5.reportAi.chat.recentChats"
4565
+ N("h3", lr, A(v(a)(
4566
+ w.value ? "reportV5.reportAi.chat.yourChats" : "reportV5.reportAi.chat.recentChats"
4547
4567
  )), 1),
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
- key: s.key,
4550
- class: et(_.value ? "mb-16" : "")
4568
+ e.chatsLoading && !((Ne = e.chats) != null && Ne.length) ? (c(), p("p", fr, A(v(a)("reportV5.reportAi.chat.loadingChats")), 1)) : e.chatsError ? (c(), p("p", dr, A(e.chatsError), 1)) : (Re = e.chats) != null && Re.length ? (c(!0), p(fe, { key: 3 }, me(ye.value, (i) => (c(), p("section", {
4569
+ key: i.key,
4570
+ class: Ze(w.value ? "mb-16" : "")
4551
4571
  }, [
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,
4572
+ i.label ? (c(), p("p", mr, A(i.label), 1)) : j("", !0),
4573
+ (c(!0), p(fe, null, me(i.chats, (d) => (c(), p("button", {
4574
+ key: d.id,
4555
4575
  "data-testid": "report-canvas-chat-list-item",
4556
4576
  class: "chat-row flex w-full items-center gap-12 rounded-md px-8 py-12 text-left",
4557
4577
  disabled: e.busy,
4558
- "aria-current": f.id === e.chatId ? "true" : void 0,
4559
- title: f.title,
4560
- onClick: (S) => z(f.id)
4578
+ "aria-current": d.id === e.chatId ? "true" : void 0,
4579
+ title: d.title,
4580
+ onClick: (T) => E(d.id)
4561
4581
  }, [
4562
- C("span", ir, w(f.title), 1),
4563
- C("time", {
4564
- datetime: f.lastMessageAt,
4582
+ N("span", pr, A(d.title), 1),
4583
+ N("time", {
4584
+ datetime: d.lastMessageAt,
4565
4585
  class: "fm-typo-en-body-sm-400 shrink-0 text-fm-color-typo-secondary"
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", {
4586
+ }, A(Y(d)), 9, hr)
4587
+ ], 8, ur))), 128))
4588
+ ], 2))), 128)) : (c(), p("p", cr, A(v(a)("reportV5.reportAi.chat.noChats")), 1)),
4589
+ w.value ? e.chatsCursor ? (c(), p("button", {
4570
4590
  key: 5,
4571
4591
  "data-testid": "report-canvas-chat-list-more",
4572
4592
  class: "chat-row fm-typo-en-body-sm-600 rounded-md px-8 py-12 text-fm-color-typo-secondary",
4573
4593
  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", {
4594
+ onClick: s[1] || (s[1] = (i) => r("loadMoreChats"))
4595
+ }, A(v(a)("reportV5.reportAi.chat.loadMoreChats")), 9, br)) : j("", !0) : (c(), p("button", {
4576
4596
  key: 4,
4577
4597
  "data-testid": "report-canvas-chat-see-all",
4578
4598
  class: "chat-row fm-typo-en-body-sm-600 mt-8 rounded-md px-8 py-12 text-fm-color-typo-secondary",
4579
4599
  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
- C("div", {
4600
+ onClick: L
4601
+ }, A(v(a)("reportV5.reportAi.chat.seeAll")), 9, gr))
4602
+ ], 8, sr)) : j("", !0),
4603
+ e.error ? (c(), p("p", vr, A(e.error), 1)) : j("", !0)
4604
+ ], 8, er)) : (c(), p("div", yr, [
4605
+ N("div", {
4586
4606
  ref_key: "scroller",
4587
- ref: h,
4607
+ ref: xe,
4588
4608
  class: "min-h-0 grow overflow-y-auto px-[20px] py-16",
4589
- onScroll: F
4609
+ onScroll: D
4590
4610
  }, [
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", {
4611
+ _.value ? (c(), p("p", xr, A(v(a)("reportV5.reportAi.chat.loadingChat")), 1)) : (c(), p(fe, { key: 1 }, [
4612
+ e.earlier ? (c(), p("button", {
4593
4613
  key: 0,
4594
4614
  "data-testid": "report-canvas-load-earlier",
4595
4615
  class: "fm-typo-en-body-sm-600 mb-16 w-full text-fm-color-typo-secondary disabled:opacity-50",
4596
4616
  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
- key: s.id,
4617
+ onClick: s[2] || (s[2] = (i) => r("loadEarlier"))
4618
+ }, A(v(a)("reportV5.reportAi.chat.loadEarlier")), 9, wr)) : j("", !0),
4619
+ (c(!0), p(fe, null, me(g.value, (i, d) => (c(), p("div", {
4620
+ key: i.id,
4601
4621
  class: "mb-16"
4602
4622
  }, [
4603
- s.targets.length ? (d(), m("p", pr, w(b(a)("reportV5.reportAi.chat.commentOn", {
4623
+ i.targets.length ? (c(), p("p", kr, A(v(a)("reportV5.reportAi.chat.commentOn", {
4604
4624
  widget: [
4605
4625
  ...new Set(
4606
- s.targets.map(
4607
- (S) => S.label || b(a)("reportV5.reportAi.chat.selectedWidget")
4626
+ i.targets.map(
4627
+ (T) => T.label || v(a)("reportV5.reportAi.chat.selectedWidget")
4608
4628
  )
4609
4629
  )
4610
4630
  ].join(", ")
4611
- })), 1)) : L("", !0),
4612
- s.role === "user" ? (d(), m("div", hr, [
4613
- C("div", {
4631
+ })), 1)) : j("", !0),
4632
+ i.role === "user" ? (c(), p("div", _r, [
4633
+ N("div", {
4614
4634
  "data-testid": "report-canvas-user-message",
4615
- class: et([
4635
+ class: Ze([
4616
4636
  "fm-typo-en-body-md-400 max-w-[90%] whitespace-pre-wrap rounded-md px-12 py-8 !leading-[21px]",
4617
- c.value.has(s.id) ? "bg-fm-color-neutral-gray-100 text-fm-color-typo-secondary" : "bg-fm-color-system-info-100"
4637
+ m.value.has(i.id) ? "bg-fm-color-neutral-gray-100 text-fm-color-typo-secondary" : "bg-fm-color-system-info-100"
4618
4638
  ])
4619
- }, w(s.answer), 3),
4620
- c.value.has(s.id) ? (d(), m("p", gr, [
4621
- Ce(w(b(a)("reportV5.reportAi.chat.notSent")) + " ", 1),
4622
- C("button", {
4639
+ }, A(i.answer), 3),
4640
+ m.value.has(i.id) ? (c(), p("p", Sr, [
4641
+ Ce(A(v(a)("reportV5.reportAi.chat.notSent")) + " ", 1),
4642
+ N("button", {
4623
4643
  "data-testid": "chat-message-resend",
4624
4644
  class: "ml-4 underline disabled:opacity-50",
4625
4645
  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
- Ce(w(b(a)("reportV5.reportAi.chat.noReply")) + " ", 1),
4630
- C("button", {
4646
+ onClick: (T) => r("resend", i.id)
4647
+ }, A(v(a)("reportV5.reportAi.chat.resend")), 9, Ir)
4648
+ ])) : H.value.has(i.id) ? (c(), p("p", Ar, [
4649
+ Ce(A(v(a)("reportV5.reportAi.chat.noReply")) + " ", 1),
4650
+ N("button", {
4631
4651
  "data-testid": "chat-message-ask-again",
4632
4652
  class: "ml-4 underline disabled:opacity-50",
4633
4653
  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", {
4654
+ onClick: (T) => r("askAgain", i.id)
4655
+ }, A(v(a)("reportV5.reportAi.chat.resend")), 9, Cr)
4656
+ ])) : Q.value.has(i.turnId) ? (c(), p("button", {
4637
4657
  key: 2,
4638
4658
  "data-testid": "chat-turn-undo",
4639
4659
  class: "fm-typo-en-body-sm-400 mt-4 text-fm-color-typo-secondary underline disabled:opacity-50",
4640
4660
  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({
4661
+ onClick: (T) => r("undo", i.turnId)
4662
+ }, A(v(a)("reportV5.reportCanvas.draft.undo")), 9, Tr)) : j("", !0)
4663
+ ])) : (c(), p(fe, { key: 2 }, [
4664
+ d === K.value || d === ne.value ? (c(), ge(bt, ot({
4645
4665
  key: 0,
4646
4666
  class: "mb-8"
4647
- }, { ref_for: !0 }, ne(f), {
4648
- onRetry: p[3] || (p[3] = (S) => r("retry", S)),
4649
- onAskBuilder: de,
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, [
4654
- ee(G, {
4667
+ }, { ref_for: !0 }, te(d), {
4668
+ onRetry: s[3] || (s[3] = (T) => r("retry", T)),
4669
+ onAskBuilder: se,
4670
+ onCheckStatus: s[4] || (s[4] = (T) => r("checkStatus"))
4671
+ }), null, 16)) : j("", !0),
4672
+ i.failure ? (c(), p("div", Er, [
4673
+ N("p", Or, [
4674
+ Z(W, {
4655
4675
  name: "error",
4656
4676
  size: "sm",
4657
4677
  class: "shrink-0 text-fm-color-typo-error"
4658
4678
  }),
4659
- Ce(" " + w(b(a)("reportV5.reportAi.build.failed.title")), 1)
4679
+ Ce(" " + A(v(a)("reportV5.reportAi.build.failed.title")), 1)
4660
4680
  ]),
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, [
4663
- ee(ge, {
4681
+ N("p", zr, A(v(a)(`reportV5.reportAi.build.failed.${v(qn)(i.failure.code)}`)), 1),
4682
+ d === g.value.length - 1 && V(d) ? (c(), p("div", Nr, [
4683
+ Z(de, {
4664
4684
  "data-testid": "report-canvas-try-again",
4665
4685
  variant: "primary",
4666
- label: b(a)("reportV5.reportAi.build.failed.tryAgain"),
4686
+ label: v(a)("reportV5.reportAi.build.failed.tryAgain"),
4667
4687
  disabled: e.streaming || e.busy,
4668
- onClick: (S) => r("askAgain", q(f))
4688
+ onClick: (T) => r("askAgain", V(d))
4669
4689
  }, null, 8, ["label", "disabled", "onClick"]),
4670
- ee(ge, {
4690
+ Z(de, {
4671
4691
  "data-testid": "report-canvas-edit-request",
4672
4692
  variant: "secondary",
4673
- label: b(a)("reportV5.reportAi.build.failed.editRequest"),
4693
+ label: v(a)("reportV5.reportAi.build.failed.editRequest"),
4674
4694
  disabled: e.streaming || e.busy,
4675
- onClick: (S) => he(q(f))
4695
+ onClick: (T) => Ee(V(d))
4676
4696
  }, null, 8, ["label", "disabled", "onClick"])
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, {
4697
+ ])) : j("", !0),
4698
+ i.failure.ref ? (c(), p("p", Rr, A(v(a)("reportV5.reportAi.build.failed.ref", { ref: i.failure.ref })), 1)) : j("", !0)
4699
+ ])) : i.blocks.length ? (c(), ge(Ha, {
4680
4700
  key: 2,
4681
4701
  "data-testid": "report-canvas-answer",
4682
- blocks: s.blocks,
4683
- preview: s.preview
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)
4702
+ blocks: i.blocks,
4703
+ preview: i.preview
4704
+ }, null, 8, ["blocks", "preview"])) : i.noSummary ? (c(), p("p", Mr, A(v(a)("reportV5.reportAi.chat.noSummary")), 1)) : j("", !0),
4705
+ i.ms ? (c(), p("p", Pr, A(v(a)("reportV5.reportAi.chat.took", { duration: v(Bn)(i.ms) })), 1)) : j("", !0)
4686
4706
  ], 64))
4687
4707
  ]))), 128)),
4688
- re.value ? (d(), ve(vt, ot({
4708
+ ae.value ? (c(), ge(bt, ot({
4689
4709
  key: 1,
4690
4710
  class: "mb-16"
4691
- }, ne(-1), {
4692
- onRetry: p[5] || (p[5] = (s) => r("retry", s)),
4693
- onAskBuilder: de,
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)
4711
+ }, te(-1), {
4712
+ onRetry: s[5] || (s[5] = (i) => r("retry", i)),
4713
+ onAskBuilder: se,
4714
+ onCheckStatus: s[6] || (s[6] = (i) => r("checkStatus"))
4715
+ }), null, 16)) : j("", !0),
4716
+ e.error ? (c(), p("p", Lr, A(e.error), 1)) : j("", !0)
4697
4717
  ], 64))
4698
4718
  ], 544),
4699
- O.value ? (d(), m("button", {
4719
+ C.value ? (c(), p("button", {
4700
4720
  key: 0,
4701
4721
  "data-testid": "report-canvas-jump-latest",
4702
4722
  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",
4703
- onClick: J
4704
- }, w(b(a)("reportV5.reportAi.chat.jumpToLatest")), 1)) : L("", !0)
4723
+ onClick: q
4724
+ }, A(v(a)("reportV5.reportAi.chat.jumpToLatest")), 1)) : j("", !0)
4705
4725
  ])),
4706
- C("div", Tr, [
4707
- ee(Ra, {
4726
+ N("div", jr, [
4727
+ Z(qa, {
4708
4728
  ref_key: "composer",
4709
- ref: y,
4710
- draft: k.value ? u.value : e.draft,
4729
+ ref: k,
4730
+ draft: x.value ? u.value : e.draft,
4711
4731
  target: e.target,
4712
4732
  targets: e.targets,
4713
4733
  "target-stale": e.targetStale,
4714
- streaming: e.streaming || e.switching || $.value || k.value && !!e.busy,
4734
+ streaming: e.streaming || e.switching || M.value || x.value && !!e.busy,
4715
4735
  blank: e.blank,
4716
- stoppable: !!e.stoppable && !k.value,
4736
+ stoppable: !!e.stoppable && !x.value,
4717
4737
  stopping: e.stopping,
4718
4738
  "target-label": (Me = e.copy) == null ? void 0 : Me.target,
4719
- placeholder: (l = e.copy) == null ? void 0 : l.placeholder,
4720
- "onUpdate:draft": Ie,
4721
- onSubmit: H,
4722
- onClearTarget: p[7] || (p[7] = (s) => r("clearTarget", s)),
4723
- onStop: p[8] || (p[8] = (s) => r("stop"))
4739
+ placeholder: (f = e.copy) == null ? void 0 : f.placeholder,
4740
+ "onUpdate:draft": Se,
4741
+ onSubmit: X,
4742
+ onClearTarget: s[7] || (s[7] = (i) => r("clearTarget", i)),
4743
+ onStop: s[8] || (s[8] = (i) => r("stop"))
4724
4744
  }, null, 8, ["draft", "target", "targets", "target-stale", "streaming", "blank", "stoppable", "stopping", "target-label", "placeholder"])
4725
4745
  ])
4726
- ], 40, $a);
4746
+ ], 40, Wa);
4727
4747
  };
4728
4748
  }
4729
- }), so = /* @__PURE__ */ Tt(Nr, [["__scopeId", "data-v-cbe24113"]]);
4730
- function Ee(e) {
4749
+ }), bo = /* @__PURE__ */ Et(Br, [["__scopeId", "data-v-cbe24113"]]);
4750
+ function Te(e) {
4731
4751
  const { businessId: t } = ze(De());
4732
4752
  if (!t.value) throw new Error("Business Id is not defined");
4733
4753
  return `/${t.value}/report-ai/${e}`;
4734
4754
  }
4735
- const Rr = (e, t = {}) => {
4755
+ const qr = (e, t = {}) => {
4736
4756
  const n = new URLSearchParams();
4737
4757
  t.sessionId && n.set("sessionId", t.sessionId), t.before && n.set("before", t.before);
4738
4758
  const r = n.toString(), a = {
4739
- fetchType: ie.Get,
4740
- url: `${Ee(e)}/chat${r ? `?${r}` : ""}`
4759
+ fetchType: oe.Get,
4760
+ url: `${Te(e)}/chat${r ? `?${r}` : ""}`
4741
4761
  };
4742
- return oe.fetch(a);
4743
- }, Mr = (e, t) => {
4762
+ return re.fetch(a);
4763
+ }, Vr = (e, t) => {
4744
4764
  const n = {
4745
- fetchType: ie.Get,
4746
- url: `${Ee(e)}/chats${t ? `?cursor=${encodeURIComponent(t)}` : ""}`
4765
+ fetchType: oe.Get,
4766
+ url: `${Te(e)}/chats${t ? `?cursor=${encodeURIComponent(t)}` : ""}`
4747
4767
  };
4748
- return oe.fetch(n);
4749
- }, Lr = (e) => {
4768
+ return re.fetch(n);
4769
+ }, Fr = (e) => {
4750
4770
  const t = {
4751
- fetchType: ie.Post,
4752
- url: `${Ee(e)}/chats`,
4771
+ fetchType: oe.Post,
4772
+ url: `${Te(e)}/chats`,
4753
4773
  data: {}
4754
4774
  };
4755
- return oe.fetch(t);
4756
- }, lo = (e, t) => {
4775
+ return re.fetch(t);
4776
+ }, vo = (e, t) => {
4757
4777
  const n = {
4758
- fetchType: ie.Get,
4759
- url: `${Ee(e)}/runs/latest${t ? `?sessionId=${t}` : ""}`
4778
+ fetchType: oe.Get,
4779
+ url: `${Te(e)}/runs/latest${t ? `?sessionId=${t}` : ""}`
4760
4780
  };
4761
- return oe.fetch(n);
4762
- }, fo = (e, t, n, r) => {
4781
+ return re.fetch(n);
4782
+ }, yo = (e, t, n, r) => {
4763
4783
  const a = {
4764
- fetchType: ie.Post,
4765
- url: `${Ee(e)}/runs/${t}/sections/${n}/retry`,
4784
+ fetchType: oe.Post,
4785
+ url: `${Te(e)}/runs/${t}/sections/${n}/retry`,
4766
4786
  data: { timezone: r }
4767
4787
  };
4768
- return oe.fetch(a);
4769
- }, Pr = (e, t) => {
4788
+ return re.fetch(a);
4789
+ }, Ur = (e, t) => {
4770
4790
  const n = {
4771
- fetchType: ie.Post,
4772
- url: `${Ee(e)}/chat/stop`,
4791
+ fetchType: oe.Post,
4792
+ url: `${Te(e)}/chat/stop`,
4773
4793
  data: { sessionId: t }
4774
4794
  };
4775
- return oe.fetch(n);
4776
- }, jr = (e, t) => `/${e}/report-ai/${t}/chat`, Je = 3e4, kt = 3e3, $r = "New chat", _t = 80, Dr = (e) => ({
4795
+ return re.fetch(n);
4796
+ }, Hr = (e, t) => `/${e}/report-ai/${t}/chat`, Ke = 3e4, wt = 3e3, Wr = "New chat", kt = 80, Gr = (e) => ({
4777
4797
  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) => ({
4798
+ getChat: (t) => qr(e, t),
4799
+ listChats: (t) => Vr(e, t),
4800
+ createChat: () => Fr(e),
4801
+ stopChat: (t) => Ur(e, t),
4802
+ chatPath: (t) => Hr(t, e)
4803
+ }), xo = (e) => ({
4784
4804
  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)
4805
+ getChat: (t) => Zt(e, t),
4806
+ listChats: (t) => Qt(e, t),
4807
+ createChat: () => Jt(e),
4808
+ stopChat: (t) => Kt(e, t),
4809
+ chatPath: (t) => Xt(t, e)
4790
4810
  });
4791
- function Qe(e, t) {
4811
+ function Je(e, t) {
4792
4812
  return `report-canvas:chat:${e}:${t}`;
4793
4813
  }
4794
- function Br(e) {
4814
+ function Yr(e) {
4795
4815
  try {
4796
4816
  return window.localStorage.getItem(e) ?? void 0;
4797
4817
  } catch {
4798
4818
  return;
4799
4819
  }
4800
4820
  }
4801
- function Ze(e, t) {
4821
+ function Qe(e, t) {
4802
4822
  try {
4803
4823
  t ? window.localStorage.setItem(e, t) : window.localStorage.removeItem(e);
4804
4824
  } catch {
4805
4825
  }
4806
4826
  }
4807
- const It = (e) => Array.isArray(e) ? e : e ? [e] : [], Lt = (e, t) => ({
4827
+ const _t = (e) => Array.isArray(e) ? e : e ? [e] : [], Lt = (e, t) => ({
4808
4828
  text: e,
4809
4829
  ...t.length ? { target: t[0] } : {},
4810
4830
  targets: t
@@ -4816,270 +4836,270 @@ function St(e) {
4816
4836
  e.parts.filter((t) => t.type === "data-edit-target").map((t) => t.data)
4817
4837
  );
4818
4838
  }
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);
4839
+ function wo(e) {
4840
+ const { businessId: t, token: n } = ze(De()), r = typeof e == "string" ? Gr(e) : e, a = O([]), o = O(), y = O(""), x = O(null), w = O(!1), u = O([]), M = O(null), z = O(!1), h = O(""), _ = O(!1), I = O(!1), L = O(""), R = O(null), E = O(""), P = O(!1), F = O([]), G = O(!1), Y = O(null), Q = O(!1), m = O(null), k = O(!1), g = $(() => Q.value || I.value && k.value), H = O(!1);
4841
+ ie([I, Q], ([f, i]) => {
4842
+ !f && !i && (H.value = !1);
4823
4843
  });
4824
- let q, K;
4825
- const ae = [];
4826
- function re(l) {
4827
- ae.push(l);
4844
+ let V, K;
4845
+ const ne = [];
4846
+ function ae(f) {
4847
+ ne.push(f);
4828
4848
  }
4829
- const te = [];
4830
- function xe(l) {
4831
- te.push(l);
4849
+ const ee = [];
4850
+ function ve(f) {
4851
+ ee.push(f);
4832
4852
  }
4833
4853
  const ue = [];
4834
- function we(l) {
4835
- ue.push(l);
4854
+ function ye(f) {
4855
+ ue.push(f);
4836
4856
  }
4837
- let ne = 0;
4838
- Ct() && Et(() => {
4839
- ne += 1, clearTimeout(q), clearTimeout(K);
4857
+ let te = 0;
4858
+ Ct() && Tt(() => {
4859
+ te += 1, clearTimeout(V), clearTimeout(K);
4840
4860
  });
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;
4861
+ async function ke(f) {
4862
+ const i = Je(v(t.value), r.key), d = f ?? Yr(i), T = te += 1;
4863
+ clearTimeout(V), _.value = !0;
4844
4864
  try {
4845
- let x;
4865
+ let S;
4846
4866
  try {
4847
- x = await r.getChat({ sessionId: f });
4848
- } catch (j) {
4849
- if (!f) throw j;
4850
- Ze(s, void 0), x = await r.getChat();
4867
+ S = await r.getChat({ sessionId: d });
4868
+ } catch (B) {
4869
+ if (!d) throw B;
4870
+ Qe(i, void 0), S = await r.getChat();
4851
4871
  }
4852
- return S !== ne ? null : (pe(x), x.latestRun ?? null);
4853
- } catch (x) {
4854
- return S === ne && (z.value = x instanceof Error ? x.message : String(x)), null;
4872
+ return T !== te ? null : (pe(S), S.latestRun ?? null);
4873
+ } catch (S) {
4874
+ return T === te && (E.value = S instanceof Error ? S.message : String(S)), null;
4855
4875
  } finally {
4856
- S === ne && (R.value = !1);
4876
+ T === te && (_.value = !1);
4857
4877
  }
4858
4878
  }
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);
4879
+ function pe(f) {
4880
+ o.value = f.sessionId ?? void 0, y.value = f.title ?? "", a.value = f.messages, x.value = f.earlier ?? null, F.value = [], E.value = "", Qe(Je(v(t.value), r.key), f.sessionId), Ee(f);
4861
4881
  }
4862
- function he(l) {
4863
- clearTimeout(q), clearTimeout(K);
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);
4882
+ function Ee(f) {
4883
+ clearTimeout(V), clearTimeout(K);
4884
+ const i = f.pending, d = f.messages[f.messages.length - 1], T = [...f.messages].reverse().find((J) => J.role === "user");
4885
+ if (m.value = i != null && i.stopped && T ? T.id : null, P.value = !1, !i || i.stopped) {
4886
+ Q.value = !1, I.value || (Y.value = null, R.value = null, G.value = !1);
4867
4887
  return;
4868
4888
  }
4869
- Z.value = !0;
4870
- const x = Date.parse(s.now) - Date.parse(s.since);
4871
- X.value = Date.now() - x;
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);
4889
+ Q.value = !0;
4890
+ const S = Date.parse(i.now) - Date.parse(i.since);
4891
+ Y.value = Date.now() - S;
4892
+ const B = (d == null ? void 0 : d.role) === "assistant" && d.inProgress ? d : void 0;
4893
+ B && (L.value = B.id), R.value = Ln(B), G.value = S >= Ke, G.value || (K = setTimeout(() => G.value = !0, Ke - S)), V = setTimeout(() => void se(), wt);
4874
4894
  }
4875
- async function de(l = !1) {
4876
- const s = ne, f = i.value;
4895
+ async function se(f = !1) {
4896
+ const i = te, d = o.value;
4877
4897
  try {
4878
- const S = await r.getChat({ sessionId: f });
4879
- if (s !== ne || T.value || f !== i.value) return;
4880
- pe(S), (!S.pending || S.pending.stopped) && (te.forEach((x) => x()), ue.forEach((x) => x(S.latestRun ?? null)));
4898
+ const T = await r.getChat({ sessionId: d });
4899
+ if (i !== te || I.value || d !== o.value) return;
4900
+ pe(T), (!T.pending || T.pending.stopped) && (ee.forEach((S) => S()), ue.forEach((S) => S(T.latestRun ?? null)));
4881
4901
  } catch {
4882
- s === ne && (Z.value || l) && (q = setTimeout(() => void de(l), kt));
4902
+ i === te && (Q.value || f) && (V = setTimeout(() => void se(f), wt));
4883
4903
  }
4884
4904
  }
4885
- async function Te(l) {
4886
- return l === i.value || T.value || Z.value ? null : _e(l);
4905
+ async function _e(f) {
4906
+ return f === o.value || I.value || Q.value ? null : ke(f);
4887
4907
  }
4888
- async function Ie() {
4889
- if (T.value || Z.value) return !1;
4890
- const l = ne += 1;
4891
- R.value = !0;
4908
+ async function Se() {
4909
+ if (I.value || Q.value) return !1;
4910
+ const f = te += 1;
4911
+ _.value = !0;
4892
4912
  try {
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);
4895
- } catch (s) {
4896
- return l === ne && (z.value = s instanceof Error ? s.message : String(s)), !1;
4913
+ const { chat: i } = await r.createChat();
4914
+ return f !== te ? !1 : (pe({ sessionId: i.id, title: i.title, earlier: null, messages: [], latestRun: null }), u.value = [i, ...u.value.filter((d) => d.id !== i.id)], !0);
4915
+ } catch (i) {
4916
+ return f === te && (E.value = i instanceof Error ? i.message : String(i)), !1;
4897
4917
  } finally {
4898
- l === ne && (R.value = !1);
4918
+ f === te && (_.value = !1);
4899
4919
  }
4900
4920
  }
4901
- async function h(l) {
4902
- N.value = !0, A.value = "";
4921
+ async function xe(f) {
4922
+ z.value = !0, h.value = "";
4903
4923
  try {
4904
- const s = await r.listChats(l);
4905
- u.value = l ? [...u.value, ...s.chats] : s.chats, $.value = s.cursor;
4906
- } catch (s) {
4907
- A.value = s instanceof Error ? s.message : String(s);
4924
+ const i = await r.listChats(f);
4925
+ u.value = f ? [...u.value, ...i.chats] : i.chats, M.value = i.cursor;
4926
+ } catch (i) {
4927
+ h.value = i instanceof Error ? i.message : String(i);
4908
4928
  } finally {
4909
- N.value = !1;
4929
+ z.value = !1;
4910
4930
  }
4911
4931
  }
4912
- async function I() {
4913
- if (!k.value || _.value) return;
4914
- const l = k.value, s = i.value;
4915
- _.value = !0;
4932
+ async function b() {
4933
+ if (!x.value || w.value) return;
4934
+ const f = x.value, i = o.value;
4935
+ w.value = !0;
4916
4936
  try {
4917
- const f = await r.getChat({ sessionId: s, before: l });
4918
- if (s !== i.value) return;
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);
4937
+ const d = await r.getChat({ sessionId: i, before: f });
4938
+ if (i !== o.value) return;
4939
+ a.value = [...d.messages, ...a.value], x.value = d.earlier ?? null;
4940
+ } catch (d) {
4941
+ E.value = d instanceof Error ? d.message : String(d);
4922
4942
  } finally {
4923
- _.value = !1;
4943
+ w.value = !1;
4924
4944
  }
4925
4945
  }
4926
- const O = /* @__PURE__ */ new Map();
4927
- function F(l, s) {
4928
- i.value && O.set(i.value, Lt(l, It(s)));
4946
+ const C = /* @__PURE__ */ new Map();
4947
+ function D(f, i) {
4948
+ o.value && C.set(o.value, Lt(f, _t(i)));
4929
4949
  }
4930
- function J() {
4931
- return i.value && O.get(i.value) || { text: "", targets: [] };
4950
+ function q() {
4951
+ return o.value && C.get(o.value) || { text: "", targets: [] };
4932
4952
  }
4933
- function H(l) {
4934
- V.value.includes(l) || (V.value = [...V.value, l]);
4953
+ function X(f) {
4954
+ F.value.includes(f) || (F.value = [...F.value, f]);
4935
4955
  }
4936
- async function o() {
4937
- const l = i.value;
4938
- if (!g.value || U.value || !l) return null;
4939
- U.value = !0;
4956
+ async function l() {
4957
+ const f = o.value;
4958
+ if (!g.value || H.value || !f) return null;
4959
+ H.value = !0;
4940
4960
  try {
4941
- await r.stopChat(l);
4942
- } catch (f) {
4943
- return U.value = !1, z.value = f instanceof Error ? f.message : String(f), null;
4944
- }
4945
- const s = [...a.value].reverse().find((f) => f.role === "user");
4946
- return s ? p(s.id) : null;
4947
- }
4948
- function p(l) {
4949
- const s = a.value.find((f) => f.id === l && f.role === "user");
4950
- return s ? St(s) : null;
4951
- }
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));
4955
- }
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 }];
4961
+ await r.stopChat(f);
4962
+ } catch (d) {
4963
+ return H.value = !1, E.value = d instanceof Error ? d.message : String(d), null;
4964
+ }
4965
+ const i = [...a.value].reverse().find((d) => d.role === "user");
4966
+ return i ? s(i.id) : null;
4967
+ }
4968
+ function s(f) {
4969
+ const i = a.value.find((d) => d.id === f && d.role === "user");
4970
+ return i ? St(i) : null;
4971
+ }
4972
+ function W(f) {
4973
+ const i = a.value.find((d) => d.id === f);
4974
+ return !i || !F.value.includes(f) ? null : (a.value = a.value.filter((d) => d.id !== f), F.value = F.value.filter((d) => d !== f), St(i));
4975
+ }
4976
+ function U(f, i) {
4977
+ const d = a.value[a.value.length - 1];
4978
+ if (d && d.role === "assistant" && d.id === f) {
4979
+ const S = [...d.parts];
4980
+ i(S), a.value = [...a.value.slice(0, -1), { ...d, parts: S }];
4961
4981
  return;
4962
4982
  }
4963
- const S = [];
4964
- s(S), a.value = [...a.value, { id: l, role: "assistant", parts: S }];
4983
+ const T = [];
4984
+ i(T), a.value = [...a.value, { id: f, role: "assistant", parts: T }];
4965
4985
  }
4966
- function ge(l, s, f) {
4967
- for (let S = l.length - 1; S >= 0; S -= 1) {
4968
- const x = l[S];
4969
- if (x.type === "text" && x.id === s) {
4970
- l[S] = { ...x, text: String(x.text ?? "") + f };
4986
+ function de(f, i, d) {
4987
+ for (let T = f.length - 1; T >= 0; T -= 1) {
4988
+ const S = f[T];
4989
+ if (S.type === "text" && S.id === i) {
4990
+ f[T] = { ...S, text: String(S.text ?? "") + d };
4971
4991
  return;
4972
4992
  }
4973
4993
  }
4974
- l.push({ type: "text", id: s, text: f, state: "streaming" });
4994
+ f.push({ type: "text", id: i, text: d, state: "streaming" });
4975
4995
  }
4976
- function Se(l, s, f) {
4977
- for (let S = l.length - 1; S >= 0; S -= 1) {
4978
- const x = l[S];
4979
- if (x.type.startsWith("tool-") && x.toolCallId === s)
4980
- return l[S] = { ...x, ...f }, !0;
4996
+ function Ie(f, i, d) {
4997
+ for (let T = f.length - 1; T >= 0; T -= 1) {
4998
+ const S = f[T];
4999
+ if (S.type.startsWith("tool-") && S.toolCallId === i)
5000
+ return f[T] = { ...S, ...d }, !0;
4981
5001
  }
4982
5002
  return !1;
4983
5003
  }
4984
- function be(l, s) {
4985
- l.named || (P.value = gt(P.value, Rt(s)));
5004
+ function he(f, i) {
5005
+ f.named || (R.value = ht(R.value, Mt(i)));
4986
5006
  }
4987
- function Ne(l, s) {
4988
- const f = String(l.type ?? ""), S = s.id;
4989
- if (f === "start-step") {
4990
- W(S, (x) => x.push({ type: "step-start" }));
5007
+ function Ne(f, i) {
5008
+ const d = String(f.type ?? ""), T = i.id;
5009
+ if (d === "start-step") {
5010
+ U(T, (S) => S.push({ type: "step-start" }));
4991
5011
  return;
4992
5012
  }
4993
- if (f === "text-start") {
4994
- const x = String(l.id ?? "text");
4995
- W(
4996
- S,
4997
- (j) => j.push({ type: "text", id: x, text: "", state: "streaming" })
5013
+ if (d === "text-start") {
5014
+ const S = String(f.id ?? "text");
5015
+ U(
5016
+ T,
5017
+ (B) => B.push({ type: "text", id: S, text: "", state: "streaming" })
4998
5018
  );
4999
5019
  return;
5000
5020
  }
5001
- if (f === "text-delta") {
5002
- const x = String(l.id ?? "text");
5003
- W(S, (j) => ge(j, x, String(l.delta ?? "")));
5021
+ if (d === "text-delta") {
5022
+ const S = String(f.id ?? "text");
5023
+ U(T, (B) => de(B, S, String(f.delta ?? "")));
5004
5024
  return;
5005
5025
  }
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" };
5026
+ if (d === "text-end") {
5027
+ const S = String(f.id ?? "text");
5028
+ U(T, (B) => {
5029
+ for (let J = B.length - 1; J >= 0; J -= 1)
5030
+ if (B[J].type === "text" && B[J].id === S) {
5031
+ B[J] = { ...B[J], state: "done" };
5012
5032
  return;
5013
5033
  }
5014
5034
  });
5015
5035
  return;
5016
5036
  }
5017
- if (f === "tool-input-start") {
5018
- const x = String(l.toolName ?? ""), j = String(l.toolCallId ?? lt());
5019
- be(s, x), W(
5020
- S,
5021
- (Q) => Q.push({ type: `tool-${x}`, toolCallId: j, state: "input-streaming" })
5037
+ if (d === "tool-input-start") {
5038
+ const S = String(f.toolName ?? ""), B = String(f.toolCallId ?? lt());
5039
+ he(i, S), U(
5040
+ T,
5041
+ (J) => J.push({ type: `tool-${S}`, toolCallId: B, state: "input-streaming" })
5022
5042
  );
5023
5043
  return;
5024
5044
  }
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";
5027
- W(S, (Q) => {
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);
5045
+ if (d === "tool-input-available" || d === "tool-output-available") {
5046
+ const S = String(f.toolCallId ?? ""), B = d === "tool-input-available" ? "input-available" : "output-available";
5047
+ U(T, (J) => {
5048
+ !Ie(J, S, { state: B }) && typeof f.toolName == "string" && J.push({ type: `tool-${f.toolName}`, toolCallId: S, state: B });
5049
+ }), typeof f.toolName == "string" && he(i, f.toolName);
5030
5050
  return;
5031
5051
  }
5032
- if (f === "tool-output-error") {
5033
- const x = String(l.toolCallId ?? "");
5034
- W(S, (j) => Se(j, x, { state: "output-error" }));
5052
+ if (d === "tool-output-error") {
5053
+ const S = String(f.toolCallId ?? "");
5054
+ U(T, (B) => Ie(B, S, { state: "output-error" }));
5035
5055
  return;
5036
5056
  }
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" });
5057
+ if (d === "error") {
5058
+ const S = String(f.errorText ?? "stream error");
5059
+ U(T, (B) => {
5060
+ B.push({ type: "step-start" }), B.push({ type: "text", id: "turn-error", text: S, state: "done" });
5041
5061
  });
5042
5062
  return;
5043
5063
  }
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 }));
5064
+ if (d.startsWith("data-")) {
5065
+ const S = d.slice(5), B = f.data ?? {};
5066
+ S === "plan" && typeof B.sessionId == "string" && (i.acked = !0, k.value = !0, o.value = B.sessionId, Qe(Je(v(t.value), r.key), B.sessionId)), S === "step" && typeof B.step == "string" ? (i.named = !0, R.value = ht(R.value, B.step)) : he(i, S), U(T, (J) => J.push({ type: d, data: B })), ne.forEach((J) => J({ name: S, data: B }));
5047
5067
  }
5048
5068
  }
5049
- function Re(l) {
5050
- if (v.value && v.value !== $r) return;
5051
- const s = l.length > _t ? `${l.slice(0, _t - 1)}…` : l;
5052
- v.value = s, u.value = u.value.map(
5053
- (f) => f.id === i.value ? { ...f, title: s } : f
5069
+ function Re(f) {
5070
+ if (y.value && y.value !== Wr) return;
5071
+ const i = f.length > kt ? `${f.slice(0, kt - 1)}…` : f;
5072
+ y.value = i, u.value = u.value.map(
5073
+ (d) => d.id === o.value ? { ...d, title: i } : d
5054
5074
  );
5055
5075
  }
5056
- async function Me(l, s) {
5057
- const f = l.trim();
5058
- if (!f || T.value || Z.value) return;
5059
- const S = It(s);
5060
- z.value = "", M.value = !1;
5061
- const x = {
5076
+ async function Me(f, i) {
5077
+ const d = f.trim();
5078
+ if (!d || I.value || Q.value) return;
5079
+ const T = _t(i);
5080
+ E.value = "", P.value = !1;
5081
+ const S = {
5062
5082
  id: lt(),
5063
5083
  role: "user",
5064
- parts: [{ type: "text", text: f }]
5084
+ parts: [{ type: "text", text: d }]
5065
5085
  };
5066
5086
  a.value = [
5067
5087
  ...a.value,
5068
5088
  {
5069
- ...x,
5089
+ ...S,
5070
5090
  parts: [
5071
- ...x.parts,
5072
- ...S.map((le) => ({ type: "data-edit-target", data: le }))
5091
+ ...S.parts,
5092
+ ...T.map((le) => ({ type: "data-edit-target", data: le }))
5073
5093
  ]
5074
5094
  }
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(() => {
5077
- Y.value = !0;
5078
- }, Je);
5095
+ ], Re(d), k.value = !1, I.value = !0, R.value = null, G.value = !1, m.value = null, Y.value = Date.now(), L.value = `assistant-${Date.now()}`;
5096
+ const B = { id: L.value, acked: !1 }, J = setTimeout(() => {
5097
+ G.value = !0;
5098
+ }, Ke);
5079
5099
  let tt = !1;
5080
5100
  try {
5081
5101
  const le = await fetch(
5082
- Gt(r.chatPath(t.value)),
5102
+ Yt(r.chatPath(t.value)),
5083
5103
  {
5084
5104
  method: "POST",
5085
5105
  headers: {
@@ -5088,134 +5108,203 @@ function mo(e) {
5088
5108
  },
5089
5109
  // `target` alone is a one-part message, and all a server reading one part reads
5090
5110
  body: JSON.stringify({
5091
- sessionId: i.value,
5092
- target: S[0],
5093
- ...S.length > 1 ? { targets: S } : {},
5094
- message: x
5111
+ sessionId: o.value,
5112
+ target: T[0],
5113
+ ...T.length > 1 ? { targets: T } : {},
5114
+ message: S
5095
5115
  })
5096
5116
  }
5097
5117
  );
5098
5118
  if (!le.ok || !le.body) {
5099
5119
  const Ae = await le.json().catch(() => null);
5100
5120
  if (typeof (Ae == null ? void 0 : Ae.message) == "string") {
5101
- z.value = Ae.message, a.value = a.value.filter((Ve) => Ve.id !== x.id);
5121
+ E.value = Ae.message, a.value = a.value.filter((Ve) => Ve.id !== S.id);
5102
5122
  return;
5103
5123
  }
5104
- console.warn("[report-canvas] chat rejected", { subject: r.key, status: le.status }), H(x.id);
5124
+ console.warn("[report-canvas] chat rejected", { subject: r.key, status: le.status }), X(S.id);
5105
5125
  return;
5106
5126
  }
5107
- const Pt = le.body.getReader(), jt = new TextDecoder();
5127
+ const jt = le.body.getReader(), $t = new TextDecoder();
5108
5128
  let qe = "";
5109
5129
  for (; ; ) {
5110
- const { done: Ae, value: Ve } = await Pt.read();
5130
+ const { done: Ae, value: Ve } = await jt.read();
5111
5131
  if (Ae) break;
5112
- qe += jt.decode(Ve, { stream: !0 });
5132
+ qe += $t.decode(Ve, { stream: !0 });
5113
5133
  const nt = qe.split(`
5114
5134
 
5115
5135
  `);
5116
5136
  qe = nt.pop() ?? "";
5117
- for (const $t of nt)
5118
- for (const at of $t.split(`
5137
+ for (const Dt of nt)
5138
+ for (const at of Dt.split(`
5119
5139
  `)) {
5120
5140
  if (!at.startsWith("data:")) continue;
5121
5141
  const Fe = at.slice(5).trim();
5122
5142
  if (!(!Fe || Fe === "[DONE]"))
5123
5143
  try {
5124
- Ne(JSON.parse(Fe), j);
5144
+ Ne(JSON.parse(Fe), B);
5125
5145
  } catch {
5126
5146
  }
5127
5147
  }
5128
5148
  }
5129
5149
  } catch (le) {
5130
- console.warn("[report-canvas] chat stream failed", { subject: r.key, err: le }), j.acked ? (M.value = !0, tt = !0) : H(x.id);
5150
+ console.warn("[report-canvas] chat stream failed", { subject: r.key, err: le }), B.acked ? (P.value = !0, tt = !0) : X(S.id);
5131
5151
  } finally {
5132
- clearTimeout(Q), T.value = !1, P.value = null, Y.value = !1, X.value = null, te.forEach((le) => le()), tt && de(!0);
5152
+ clearTimeout(J), I.value = !1, R.value = null, G.value = !1, Y.value = null, ee.forEach((le) => le()), tt && se(!0);
5133
5153
  }
5134
5154
  }
5135
5155
  return {
5136
5156
  messages: a,
5137
- sessionId: i,
5138
- title: v,
5139
- earlier: k,
5140
- loadingEarlier: _,
5157
+ sessionId: o,
5158
+ title: y,
5159
+ earlier: x,
5160
+ loadingEarlier: w,
5141
5161
  chats: u,
5142
- chatsCursor: $,
5143
- chatsLoading: N,
5144
- chatsError: A,
5145
- switching: R,
5146
- streaming: T,
5147
- turnId: B,
5148
- step: P,
5149
- error: z,
5150
- interrupted: M,
5151
- unsent: V,
5152
- slow: Y,
5153
- startedAt: X,
5154
- awaiting: Z,
5155
- noReplyId: c,
5162
+ chatsCursor: M,
5163
+ chatsLoading: z,
5164
+ chatsError: h,
5165
+ switching: _,
5166
+ streaming: I,
5167
+ turnId: L,
5168
+ step: R,
5169
+ error: E,
5170
+ interrupted: P,
5171
+ unsent: F,
5172
+ slow: G,
5173
+ startedAt: Y,
5174
+ awaiting: Q,
5175
+ noReplyId: m,
5156
5176
  stoppable: g,
5157
- stopping: U,
5158
- stop: o,
5159
- load: _e,
5160
- select: Te,
5161
- startChat: Ie,
5162
- loadChats: h,
5163
- loadEarlier: I,
5164
- stashDraft: F,
5165
- recallDraft: J,
5166
- takeUnsent: G,
5167
- requestOf: p,
5177
+ stopping: H,
5178
+ stop: l,
5179
+ load: ke,
5180
+ select: _e,
5181
+ startChat: Se,
5182
+ loadChats: xe,
5183
+ loadEarlier: b,
5184
+ stashDraft: D,
5185
+ recallDraft: q,
5186
+ takeUnsent: W,
5187
+ requestOf: s,
5168
5188
  send: Me,
5169
- onLifecycle: re,
5170
- onSettled: xe,
5171
- onResumed: we
5189
+ onLifecycle: ae,
5190
+ onSettled: ve,
5191
+ onResumed: ye
5172
5192
  };
5173
5193
  }
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);
5177
- let i, v = !1;
5178
- Le(() => {
5179
- !n.value || typeof ResizeObserver > "u" || (i = new ResizeObserver(([N]) => {
5180
- a.value = N.contentRect.width, !v && (v = !0, k.value || (e.value = !1));
5181
- }), i.observe(n.value));
5182
- }), Pe(() => i == null ? void 0 : i.disconnect());
5183
- const k = D(
5184
- () => !a.value || a.value >= qr + Vr
5185
- ), _ = D(() => e.value && !k.value && !t.value);
5194
+ const Xr = 380, Kr = 600, It = 'button:not([disabled]),textarea:not([disabled]),select:not([disabled]),a[href],[tabindex]:not([tabindex="-1"])';
5195
+ function ko(e, t) {
5196
+ const n = O(), r = O(), a = O(0);
5197
+ let o, y = !1;
5198
+ Pe(() => {
5199
+ !n.value || typeof ResizeObserver > "u" || (o = new ResizeObserver(([z]) => {
5200
+ a.value = z.contentRect.width, !y && (y = !0, x.value || (e.value = !1));
5201
+ }), o.observe(n.value));
5202
+ }), Le(() => o == null ? void 0 : o.disconnect());
5203
+ const x = $(
5204
+ () => !a.value || a.value >= Xr + Kr
5205
+ ), w = $(() => e.value && !x.value && !t.value);
5186
5206
  let u = null;
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();
5207
+ ie(w, async (z) => {
5208
+ var h, _, I;
5209
+ if (z) {
5210
+ u = document.activeElement, await we(), (_ = (h = r.value) == null ? void 0 : h.querySelector(It)) == null || _.focus();
5191
5211
  return;
5192
5212
  }
5193
- (T = u == null ? void 0 : u.focus) == null || T.call(u), u = null;
5213
+ (I = u == null ? void 0 : u.focus) == null || I.call(u), u = null;
5194
5214
  });
5195
- function $(N) {
5196
- if (N.key !== "Tab" || !_.value || !r.value) return;
5197
- const A = [...r.value.querySelectorAll(At)];
5198
- if (!A.length) return;
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());
5201
- }
5202
- return Le(() => window.addEventListener("keydown", $, !0)), Pe(() => window.removeEventListener("keydown", $, !0)), { root: n, drawer: r, docked: k, modal: _ };
5215
+ function M(z) {
5216
+ if (z.key !== "Tab" || !w.value || !r.value) return;
5217
+ const h = [...r.value.querySelectorAll(It)];
5218
+ if (!h.length) return;
5219
+ const _ = z.shiftKey ? h[0] : h[h.length - 1];
5220
+ document.activeElement === _ && (z.preventDefault(), (z.shiftKey ? h[h.length - 1] : h[0]).focus());
5221
+ }
5222
+ return Pe(() => window.addEventListener("keydown", M, !0)), Le(() => window.removeEventListener("keydown", M, !0)), { root: n, drawer: r, docked: x, modal: w };
5223
+ }
5224
+ const At = 24;
5225
+ function Jr(e, t) {
5226
+ var n, r, a, o, y, x, w, u, M, z, h, _;
5227
+ return e.sectionId === t.sectionId && ((n = e.element) == null ? void 0 : n.part) === ((r = t.element) == null ? void 0 : r.part) && (((a = e.element) == null ? void 0 : a.path) ?? []).join(".") === (((o = t.element) == null ? void 0 : o.path) ?? []).join(".") && ((x = (y = e.element) == null ? void 0 : y.datum) == null ? void 0 : x.datasetIndex) === ((u = (w = t.element) == null ? void 0 : w.datum) == null ? void 0 : u.datasetIndex) && ((z = (M = e.element) == null ? void 0 : M.datum) == null ? void 0 : z.index) === ((_ = (h = t.element) == null ? void 0 : h.datum) == null ? void 0 : _.index);
5228
+ }
5229
+ const _o = (e) => e.map((t) => ({ targets: [t], widen: [] }));
5230
+ function So(e, t) {
5231
+ const n = O([]), r = O([]), a = $({
5232
+ get: () => e.value ? n.value : r.value,
5233
+ set: (h) => {
5234
+ e.value ? n.value = h : r.value = h;
5235
+ }
5236
+ }), o = $(() => a.value.flatMap((h) => h.targets)), y = $(() => a.value.map((h) => h.targets[0])), x = $(
5237
+ () => a.value.map(({ targets: [h, ..._] }) => {
5238
+ if (!_.length) return h;
5239
+ const I = [h, ..._];
5240
+ return {
5241
+ sectionId: h.sectionId,
5242
+ version: h.version,
5243
+ label: [...new Set(I.map((L) => L.label).filter(Boolean))].join(", "),
5244
+ elementText: I.map((L) => L.elementText).filter(Boolean).join(" · "),
5245
+ area: h.area
5246
+ };
5247
+ })
5248
+ ), w = $(
5249
+ () => o.value.some(
5250
+ (h) => !t.sections().some((_) => _.id === h.sectionId && _.version === h.version)
5251
+ )
5252
+ );
5253
+ function u(h, _) {
5254
+ const I = t.named(h);
5255
+ if (!I) return !1;
5256
+ const L = a.value.findIndex(
5257
+ (R) => !R.targets[0].area && Jr(R.targets[0], I)
5258
+ );
5259
+ return L >= 0 ? a.value = a.value.filter((R, E) => E !== L) : o.value.length < At && (a.value = [...a.value, { targets: [I], widen: _ }]), !0;
5260
+ }
5261
+ function M(h) {
5262
+ const _ = h.map((I) => t.named(I));
5263
+ return !_.length || !_.every((I) => !!I) || o.value.length + _.length > At ? !1 : (a.value = [...a.value, { targets: _, widen: [] }], !0);
5264
+ }
5265
+ function z(h) {
5266
+ const _ = a.value[h];
5267
+ if (!_) return;
5268
+ const [I] = _.targets;
5269
+ if (!I.element || I.area) {
5270
+ a.value = a.value.filter((G, Y) => Y !== h);
5271
+ return;
5272
+ }
5273
+ const { element: L, ...R } = I, [E, ...P] = _.widen, F = E ? { ...R, element: E, elementText: E.text ?? "", elementTag: E.tag } : R;
5274
+ a.value = a.value.map(
5275
+ (G, Y) => Y === h ? { targets: [F], widen: P } : G
5276
+ );
5277
+ }
5278
+ return {
5279
+ homePicks: n,
5280
+ threadPicks: r,
5281
+ picks: a,
5282
+ targets: o,
5283
+ outlines: y,
5284
+ chips: x,
5285
+ stale: w,
5286
+ toggle: u,
5287
+ addArea: M,
5288
+ widen: z
5289
+ };
5203
5290
  }
5204
5291
  export {
5205
- oo as R,
5206
- io as a,
5207
- uo as b,
5208
- mo as c,
5209
- co as d,
5210
- so as e,
5211
- fo as f,
5212
- no as g,
5213
- lo as h,
5214
- eo as i,
5215
- to as j,
5216
- Jr as k,
5217
- Qr as l,
5218
- Zr as p,
5219
- ao as r,
5220
- ro as u
5292
+ ho as R,
5293
+ go as a,
5294
+ ko as b,
5295
+ So as c,
5296
+ wo as d,
5297
+ xo as e,
5298
+ bo as f,
5299
+ _o as g,
5300
+ mo as h,
5301
+ yo as i,
5302
+ vo as j,
5303
+ fo as k,
5304
+ co as l,
5305
+ io as m,
5306
+ so as n,
5307
+ lo as p,
5308
+ uo as r,
5309
+ po as u
5221
5310
  };