@feedmepos/mf-report 5.29.0 → 5.29.1

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 (29) hide show
  1. package/dist/{App-CuBsRwfx.js → App-C85Jp6Vz.js} +4 -4
  2. package/dist/{DateRangeSelect-CzjlwjuC.js → DateRangeSelect-DvGzmN_R.js} +1 -1
  3. package/dist/{Default.vue_vue_type_script_setup_true_lang-Di9_F5Yk.js → Default.vue_vue_type_script_setup_true_lang-CQkOvL2Y.js} +1 -1
  4. package/dist/{DynamicWidget.vue_vue_type_script_setup_true_lang-C73R6Fb9.js → DynamicWidget.vue_vue_type_script_setup_true_lang-Cz_sLX0M.js} +4 -4
  5. package/dist/{GlobalFilterSelect.vue_vue_type_script_setup_true_lang-tLRFdLNs.js → GlobalFilterSelect.vue_vue_type_script_setup_true_lang-BaLEetL4.js} +3 -3
  6. package/dist/{InsightView-BcnmLQ8c.js → InsightView-BIRMotk8.js} +5 -5
  7. package/dist/{Integration-D4VFT1M8.js → Integration-a8to9u5E.js} +3 -3
  8. package/dist/{Integrations-v8oF1TL7.js → Integrations-CZX2Pb1k.js} +2 -2
  9. package/dist/{Layout-Ds8RSWmi.js → Layout-Drt_PvDA.js} +1 -1
  10. package/dist/{LocationSelect.vue_vue_type_script_setup_true_lang-Dk6u8nUH.js → LocationSelect.vue_vue_type_script_setup_true_lang-zkJl8ZGd.js} +2 -2
  11. package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-BWt7pqFb.js → MenuTab.vue_vue_type_script_setup_true_lang-Bo6snNCr.js} +5 -5
  12. package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-CU00GINo.js → NavigationTab.vue_vue_type_script_setup_true_lang-CF2rLgR4.js} +5 -5
  13. package/dist/{OverviewView-1v80g6KX.js → OverviewView-sw-6PFNK.js} +5 -5
  14. package/dist/{Report-DcFB4gM6.js → Report-CvA72k6X.js} +3 -3
  15. package/dist/{ReportCanvasView-BQO6Mywc.js → ReportCanvasView-BgpgQRwj.js} +1337 -1336
  16. package/dist/{ReportEditor-Bgcisf1s.js → ReportEditor-CHng3ZCl.js} +7 -7
  17. package/dist/{ReportView-Q_juD8Kr.js → ReportView-C6Puwq7Z.js} +6 -6
  18. package/dist/{ReportViewRoute-DwStGqyz.js → ReportViewRoute-MHTZIKjD.js} +2 -2
  19. package/dist/{Setting-C9rlM23O.js → Setting-B7WzVfCm.js} +3 -3
  20. package/dist/{Template-BZd0NB5w.js → Template-CkwyvoOF.js} +3 -3
  21. package/dist/{TileEditor-B2F9r3RS.js → TileEditor-BQM3ntyf.js} +6 -6
  22. package/dist/{TilePageStack.vue_vue_type_script_setup_true_lang-BmbrJAph.js → TilePageStack.vue_vue_type_script_setup_true_lang-CyQnQBgc.js} +2 -2
  23. package/dist/{TransitionFade-Dkeo9qr0.js → TransitionFade-LBrolxb9.js} +5 -5
  24. package/dist/{app-CoQ_GRKo.js → app-DtOPqbc0.js} +12 -12
  25. package/dist/app.js +1 -1
  26. package/dist/{report-Dau_so1j.js → report-i6Dy1EEf.js} +1 -1
  27. package/dist/style.css +1 -1
  28. package/dist/{useRestaurantPermission-CPoHZTxx.js → useRestaurantPermission-D_C2CTC1.js} +1 -1
  29. package/package.json +1 -1
@@ -1,50 +1,50 @@
1
- import { defineComponent as De, computed as j, ref as A, createElementBlock as h, createCommentVNode as R, openBlock as c, createElementVNode as _, toDisplayString as S, unref as s, Fragment as be, renderList as Se, onMounted as Le, watch as fe, nextTick as $e, resolveComponent as Ie, createVNode as X, createTextVNode as Vt, normalizeClass as Me, h as Te, mergeModels as wt, useModel as kt, createBlock as ge, withCtx as Ne, mergeProps as _t, onBeforeUnmount as Pe, shallowRef as hn, withDirectives as bn, isRef as St, vShow as gn } from "vue";
2
- import { useRoute as vn, useRouter as yn } from "vue-router";
3
- import { u as je, _ as mt } from "./_plugin-vue_export-helper-C6QDExPN.js";
4
- import { storeToRefs as Ee } from "pinia";
5
- import { r as me, F as ue, u as Ke, a as ut, V as xn, W as wn } from "./app-CoQ_GRKo.js";
6
- import { _ as kn } from "./LocationSelect.vue_vue_type_script_setup_true_lang-Dk6u8nUH.js";
7
- import { D as _n } from "./DateRangeSelect-CzjlwjuC.js";
8
- import { detectLocale as Sn } from "@feedmepos/mf-common";
9
- import { v as It, u as In } from "./report-Dau_so1j.js";
10
- import { r as Cn } from "./i18n-DbyciK4x.js";
11
- const An = {
1
+ import { defineComponent as je, computed as V, ref as T, createElementBlock as p, createCommentVNode as R, openBlock as c, createElementVNode as w, toDisplayString as k, unref as s, Fragment as ve, renderList as Se, onMounted as Me, watch as de, nextTick as Ee, resolveComponent as Ie, createVNode as Z, createTextVNode as Ft, normalizeClass as Pe, h as Ae, mergeModels as kt, useModel as _t, createBlock as me, withCtx as $e, mergeProps as St, onBeforeUnmount as De, shallowRef as gn, withDirectives as vn, isRef as It, vShow as yn } from "vue";
2
+ import { useRoute as xn, useRouter as wn } from "vue-router";
3
+ import { u as Ve, _ as ut } from "./_plugin-vue_export-helper-C6QDExPN.js";
4
+ import { storeToRefs as Oe } from "pinia";
5
+ import { r as ue, F as pe, u as Ye, a as pt, V as kn, W as _n, h as Sn } from "./app-DtOPqbc0.js";
6
+ import { _ as In } from "./LocationSelect.vue_vue_type_script_setup_true_lang-zkJl8ZGd.js";
7
+ import { D as Cn } from "./DateRangeSelect-DvGzmN_R.js";
8
+ import { detectLocale as An } from "@feedmepos/mf-common";
9
+ import { v as Ct, u as Tn } from "./report-i6Dy1EEf.js";
10
+ import { r as En } from "./i18n-DbyciK4x.js";
11
+ const On = {
12
12
  key: 0,
13
13
  class: "flex flex-col gap-4"
14
- }, Tn = {
14
+ }, zn = {
15
15
  key: 0,
16
16
  "data-testid": "report-canvas-activity",
17
17
  class: "flex items-start gap-8"
18
- }, En = { class: "min-w-0 grow" }, On = {
18
+ }, Nn = { class: "min-w-0 grow" }, $n = {
19
19
  class: "fm-typo-en-body-md-400",
20
20
  role: "status"
21
- }, zn = {
21
+ }, Rn = {
22
22
  key: 0,
23
23
  "data-testid": "report-canvas-prepared",
24
24
  class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary"
25
- }, Nn = {
25
+ }, Ln = {
26
26
  key: 1,
27
27
  class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary"
28
- }, $n = {
28
+ }, Mn = {
29
29
  key: 1,
30
30
  "data-testid": "report-canvas-interrupted",
31
31
  class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
32
- }, Rn = {
32
+ }, Pn = {
33
33
  key: 2,
34
34
  "data-testid": "report-canvas-stalled",
35
35
  class: "flex flex-col items-start gap-4"
36
- }, Ln = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-error" }, Mn = {
36
+ }, Dn = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-error" }, jn = {
37
37
  key: 3,
38
38
  "data-testid": "report-canvas-failed",
39
39
  class: "flex flex-col gap-4"
40
- }, Pn = { class: "min-w-0 grow" }, Dn = { class: "fm-typo-en-body-sm-600 truncate" }, jn = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Vn = ["onClick"], Fn = {
40
+ }, Vn = { class: "min-w-0 grow" }, Fn = { class: "fm-typo-en-body-sm-600 truncate" }, Bn = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, qn = ["onClick"], Un = {
41
41
  key: 4,
42
42
  class: "fm-typo-en-body-sm-400 text-fm-color-typo-error"
43
- }, Bn = { key: 5 }, qn = ["aria-expanded"], Un = {
43
+ }, Hn = { key: 5 }, Wn = ["aria-expanded"], Gn = {
44
44
  key: 0,
45
45
  "data-testid": "report-canvas-details",
46
46
  class: "mt-4 flex flex-col gap-4"
47
- }, Hn = { class: "min-w-0 grow truncate" }, Wn = { class: "shrink-0" }, Ct = /* @__PURE__ */ De({
47
+ }, Yn = { class: "min-w-0 grow truncate" }, Kn = { class: "shrink-0" }, At = /* @__PURE__ */ je({
48
48
  __name: "ReportCanvasActivity",
49
49
  props: {
50
50
  active: { type: Boolean },
@@ -58,85 +58,85 @@ const An = {
58
58
  },
59
59
  emits: ["retry", "checkStatus"],
60
60
  setup(o, { emit: e }) {
61
- const t = o, a = e, { t: r } = je(), m = j(() => {
62
- var k;
63
- return ((k = t.run) == null ? void 0 : k.sections) ?? [];
64
- }), b = j(() => m.value.filter((k) => k.status === "ok").length), w = j(() => m.value.filter((k) => k.status === "error")), I = j(() => {
65
- var k;
66
- return !!((k = t.run) != null && k.runId) && t.run.status !== "running";
67
- }), v = A(!1), L = j(() => t.phases.length > 0 || m.value.length > 0);
68
- return (k, N) => k.active || k.interrupted || k.stale || k.retryError || w.value.length || L.value ? (c(), h("div", An, [
69
- k.active ? (c(), h("div", Tn, [
70
- N[2] || (N[2] = _("span", { class: "mt-2 h-12 w-12 shrink-0 animate-spin rounded-full border-2 border-fm-color-neutral-gray-200 border-t-fm-color-primary motion-reduce:animate-none" }, null, -1)),
71
- _("div", En, [
72
- _("p", On, S(s(r)(`reportV5.reportAi.chat.phase.${k.phase}`)), 1),
73
- m.value.length ? (c(), h("p", zn, S(s(r)("reportV5.reportAi.build.prepared", { done: b.value, total: m.value.length })), 1)) : R("", !0),
74
- k.slow ? (c(), h("p", Nn, S(s(r)("reportV5.reportAi.build.slow")), 1)) : R("", !0)
61
+ const t = o, a = e, { t: r } = Ve(), m = V(() => {
62
+ var x;
63
+ return ((x = t.run) == null ? void 0 : x.sections) ?? [];
64
+ }), h = V(() => m.value.filter((x) => x.status === "ok").length), y = V(() => m.value.filter((x) => x.status === "error")), I = V(() => {
65
+ var x;
66
+ return !!((x = t.run) != null && x.runId) && t.run.status !== "running";
67
+ }), b = T(!1), L = V(() => t.phases.length > 0 || m.value.length > 0);
68
+ return (x, N) => x.active || x.interrupted || x.stale || x.retryError || y.value.length || L.value ? (c(), p("div", On, [
69
+ x.active ? (c(), p("div", zn, [
70
+ N[2] || (N[2] = w("span", { class: "mt-2 h-12 w-12 shrink-0 animate-spin rounded-full border-2 border-fm-color-neutral-gray-200 border-t-fm-color-primary motion-reduce:animate-none" }, null, -1)),
71
+ w("div", Nn, [
72
+ w("p", $n, k(s(r)(`reportV5.reportAi.chat.phase.${x.phase}`)), 1),
73
+ m.value.length ? (c(), p("p", Rn, k(s(r)("reportV5.reportAi.build.prepared", { done: h.value, total: m.value.length })), 1)) : R("", !0),
74
+ x.slow ? (c(), p("p", Ln, k(s(r)("reportV5.reportAi.build.slow")), 1)) : R("", !0)
75
75
  ])
76
76
  ])) : R("", !0),
77
- k.interrupted ? (c(), h("p", $n, S(s(r)("reportV5.reportAi.build.interrupted")), 1)) : R("", !0),
78
- k.stale ? (c(), h("div", Rn, [
79
- _("p", Ln, S(s(r)("reportV5.reportAi.build.stalled")), 1),
80
- _("button", {
77
+ x.interrupted ? (c(), p("p", Mn, k(s(r)("reportV5.reportAi.build.interrupted")), 1)) : R("", !0),
78
+ x.stale ? (c(), p("div", Pn, [
79
+ w("p", Dn, k(s(r)("reportV5.reportAi.build.stalled")), 1),
80
+ w("button", {
81
81
  class: "fm-typo-en-body-sm-600 text-fm-color-typo-secondary underline",
82
- onClick: N[0] || (N[0] = (T) => a("checkStatus"))
83
- }, S(s(r)("reportV5.reportAi.build.checkStatus")), 1)
82
+ onClick: N[0] || (N[0] = (E) => a("checkStatus"))
83
+ }, k(s(r)("reportV5.reportAi.build.checkStatus")), 1)
84
84
  ])) : R("", !0),
85
- w.value.length ? (c(), h("ul", Mn, [
86
- (c(!0), h(be, null, Se(w.value, (T) => (c(), h("li", {
87
- key: T.id,
85
+ y.value.length ? (c(), p("ul", jn, [
86
+ (c(!0), p(ve, null, Se(y.value, (E) => (c(), p("li", {
87
+ key: E.id,
88
88
  class: "flex items-start gap-8"
89
89
  }, [
90
- _("div", Pn, [
91
- _("p", Dn, S(T.title), 1),
92
- _("p", jn, S(s(r)("reportV5.reportAi.build.failedWidget")), 1)
90
+ w("div", Vn, [
91
+ w("p", Fn, k(E.title), 1),
92
+ w("p", Bn, k(s(r)("reportV5.reportAi.build.failedWidget")), 1)
93
93
  ]),
94
- I.value ? (c(), h("button", {
94
+ I.value ? (c(), p("button", {
95
95
  key: 0,
96
96
  class: "fm-typo-en-body-sm-600 shrink-0 text-fm-color-typo-secondary underline",
97
- onClick: (W) => a("retry", T.id)
98
- }, S(s(r)("reportV5.reportAi.build.retry")), 9, Vn)) : R("", !0)
97
+ onClick: (W) => a("retry", E.id)
98
+ }, k(s(r)("reportV5.reportAi.build.retry")), 9, qn)) : R("", !0)
99
99
  ]))), 128))
100
100
  ])) : R("", !0),
101
- k.retryError ? (c(), h("p", Fn, S(s(r)("reportV5.reportAi.build.retryFailed")), 1)) : R("", !0),
102
- L.value ? (c(), h("div", Bn, [
103
- _("button", {
101
+ x.retryError ? (c(), p("p", Un, k(s(r)("reportV5.reportAi.build.retryFailed")), 1)) : R("", !0),
102
+ L.value ? (c(), p("div", Hn, [
103
+ w("button", {
104
104
  "data-testid": "report-canvas-details-toggle",
105
105
  class: "fm-typo-en-body-sm-600 text-fm-color-typo-secondary",
106
- "aria-expanded": v.value,
107
- onClick: N[1] || (N[1] = (T) => v.value = !v.value)
108
- }, S(v.value ? "▾" : "▸") + " " + S(s(r)("reportV5.reportAi.build.details")), 9, qn),
109
- v.value ? (c(), h("div", Un, [
110
- (c(!0), h(be, null, Se(k.phases, (T) => (c(), h("p", {
111
- key: T,
106
+ "aria-expanded": b.value,
107
+ onClick: N[1] || (N[1] = (E) => b.value = !b.value)
108
+ }, k(b.value ? "▾" : "▸") + " " + k(s(r)("reportV5.reportAi.build.details")), 9, Wn),
109
+ b.value ? (c(), p("div", Gn, [
110
+ (c(!0), p(ve, null, Se(x.phases, (E) => (c(), p("p", {
111
+ key: E,
112
112
  class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary"
113
- }, S(s(r)(`reportV5.reportAi.chat.phase.${T}`)), 1))), 128)),
114
- (c(!0), h(be, null, Se(m.value, (T) => (c(), h("p", {
115
- key: T.id,
113
+ }, k(s(r)(`reportV5.reportAi.chat.phase.${E}`)), 1))), 128)),
114
+ (c(!0), p(ve, null, Se(m.value, (E) => (c(), p("p", {
115
+ key: E.id,
116
116
  class: "fm-typo-en-body-sm-400 flex gap-8 text-fm-color-typo-secondary"
117
117
  }, [
118
- _("span", Hn, S(T.title), 1),
119
- _("span", Wn, S(s(r)(`reportV5.reportAi.build.state.${T.status}`)), 1)
118
+ w("span", Yn, k(E.title), 1),
119
+ w("span", Kn, k(s(r)(`reportV5.reportAi.build.state.${E.status}`)), 1)
120
120
  ]))), 128))
121
121
  ])) : R("", !0)
122
122
  ])) : R("", !0)
123
123
  ])) : R("", !0);
124
124
  }
125
- }), Gn = { class: "flex flex-col items-stretch gap-8 px-[20px] pb-16 pt-12" }, Yn = {
125
+ }), Jn = { class: "flex flex-col items-stretch gap-8 px-[20px] pb-16 pt-12" }, Xn = {
126
126
  key: 0,
127
127
  "data-testid": "chat-edit-target-context",
128
128
  class: "fm-typo-en-body-sm-400 line-clamp-1 text-fm-color-typo-secondary"
129
- }, Kn = {
129
+ }, Qn = {
130
130
  key: 1,
131
131
  role: "alert",
132
132
  class: "fm-typo-en-body-sm-400 text-fm-color-typo-error"
133
- }, Jn = {
133
+ }, Zn = {
134
134
  "data-testid": "report-canvas-chat-input",
135
135
  class: "rounded-lg border border-fm-color-border-secondary bg-fm-color-neutral-white p-16 focus-within:border-fm-color-primary"
136
- }, Xn = ["value", "placeholder", "aria-label"], Qn = { class: "mt-16 flex items-center gap-12" }, Zn = ["aria-label"], ea = { class: "fm-typo-en-body-sm-400 min-w-0 grow truncate" }, ta = {
136
+ }, ea = ["value", "placeholder", "aria-label"], ta = { class: "mt-16 flex items-center gap-12" }, na = ["aria-label"], aa = { class: "fm-typo-en-body-sm-400 min-w-0 grow truncate" }, ra = {
137
137
  key: 0,
138
138
  "data-testid": "chat-edit-target-element"
139
- }, na = ["disabled", "aria-label"], aa = ["disabled", "aria-label"], ra = { class: "text-[12px] leading-16 text-fm-color-typo-secondary" }, At = 21, oa = /* @__PURE__ */ De({
139
+ }, oa = ["disabled", "aria-label"], ia = ["disabled", "aria-label"], sa = { class: "text-[12px] leading-16 text-fm-color-typo-secondary" }, Tt = 21, la = /* @__PURE__ */ je({
140
140
  __name: "ReportCanvasComposer",
141
141
  props: {
142
142
  draft: {},
@@ -147,118 +147,118 @@ const An = {
147
147
  },
148
148
  emits: ["update:draft", "submit", "clearTarget"],
149
149
  setup(o, { expose: e, emit: t }) {
150
- const a = o, r = t, { t: m } = je(), b = At * 2, w = At * 6, I = A(), v = A(!1);
150
+ const a = o, r = t, { t: m } = Ve(), h = Tt * 2, y = Tt * 6, I = T(), b = T(!1);
151
151
  function L() {
152
- const E = I.value;
153
- E && (E.style.height = "auto", E.style.height = `${Math.min(Math.max(E.scrollHeight, b), w)}px`);
152
+ const O = I.value;
153
+ O && (O.style.height = "auto", O.style.height = `${Math.min(Math.max(O.scrollHeight, h), y)}px`);
154
154
  }
155
- Le(L), fe(
155
+ Me(L), de(
156
156
  () => a.draft,
157
- () => void $e(L)
157
+ () => void Ee(L)
158
158
  );
159
- function k(E) {
160
- r("update:draft", E.target.value);
159
+ function x(O) {
160
+ r("update:draft", O.target.value);
161
161
  }
162
- function N(E) {
163
- E.key !== "Enter" || E.shiftKey || v.value || E.isComposing || (E.preventDefault(), W());
162
+ function N(O) {
163
+ O.key !== "Enter" || O.shiftKey || b.value || O.isComposing || (O.preventDefault(), W());
164
164
  }
165
- const T = j(() => !!a.draft.trim() && !a.streaming && !a.targetStale);
165
+ const E = V(() => !!a.draft.trim() && !a.streaming && !a.targetStale);
166
166
  function W() {
167
- T.value && r("submit");
167
+ E.value && r("submit");
168
168
  }
169
- function D() {
170
- var E;
171
- (E = I.value) == null || E.focus();
169
+ function j() {
170
+ var O;
171
+ (O = I.value) == null || O.focus();
172
172
  }
173
- e({ focus: D });
174
- const K = j(() => {
173
+ e({ focus: j });
174
+ const Y = V(() => {
175
175
  var J;
176
- const E = (J = a.target) == null ? void 0 : J.element;
177
- if (!E) return "";
178
- const G = (E.text || "").trim();
179
- return G ? G.slice(0, 40) : E.part || E.tag;
180
- }), q = j(
176
+ const O = (J = a.target) == null ? void 0 : J.element;
177
+ if (!O) return "";
178
+ const G = (O.text || "").trim();
179
+ return G ? G.slice(0, 40) : O.part || O.tag;
180
+ }), U = V(
181
181
  () => m(
182
182
  a.target ? "reportV5.reportAi.chat.commentPlaceholder" : a.blank ? "reportV5.reportAi.chat.placeholderNew" : "reportV5.reportAi.chat.placeholderChange"
183
183
  )
184
184
  );
185
- return (E, G) => {
186
- var P;
185
+ return (O, G) => {
186
+ var F;
187
187
  const J = Ie("FmIcon");
188
- return c(), h("div", Gn, [
189
- (P = E.target) != null && P.elementText ? (c(), h("p", Yn, " “" + S(E.target.elementText) + "” ", 1)) : R("", !0),
190
- E.targetStale && !E.streaming ? (c(), h("p", Kn, S(s(m)("reportV5.reportAi.chat.staleTarget")), 1)) : R("", !0),
191
- _("div", Jn, [
192
- _("textarea", {
188
+ return c(), p("div", Jn, [
189
+ (F = O.target) != null && F.elementText ? (c(), p("p", Xn, " “" + k(O.target.elementText) + "” ", 1)) : R("", !0),
190
+ O.targetStale && !O.streaming ? (c(), p("p", Qn, k(s(m)("reportV5.reportAi.chat.staleTarget")), 1)) : R("", !0),
191
+ w("div", Zn, [
192
+ w("textarea", {
193
193
  ref_key: "field",
194
194
  ref: I,
195
- value: E.draft,
196
- placeholder: q.value,
197
- "aria-label": q.value,
195
+ value: O.draft,
196
+ placeholder: U.value,
197
+ "aria-label": U.value,
198
198
  rows: "2",
199
199
  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",
200
- onInput: k,
200
+ onInput: x,
201
201
  onKeydown: N,
202
- onCompositionstart: G[0] || (G[0] = (B) => v.value = !0),
203
- onCompositionend: G[1] || (G[1] = (B) => v.value = !1)
204
- }, null, 40, Xn),
205
- _("div", Qn, [
206
- _("div", {
202
+ onCompositionstart: G[0] || (G[0] = (B) => b.value = !0),
203
+ onCompositionend: G[1] || (G[1] = (B) => b.value = !1)
204
+ }, null, 40, ea),
205
+ w("div", ta, [
206
+ w("div", {
207
207
  "data-testid": "chat-edit-target",
208
208
  role: "status",
209
- "aria-label": E.target ? s(m)("reportV5.reportAi.chat.commentOn", {
210
- widget: (E.target.label || s(m)("reportV5.reportAi.chat.selectedWidget")) + (K.value ? " › " + K.value : "")
209
+ "aria-label": O.target ? s(m)("reportV5.reportAi.chat.commentOn", {
210
+ widget: (O.target.label || s(m)("reportV5.reportAi.chat.selectedWidget")) + (Y.value ? " › " + Y.value : "")
211
211
  }) : s(m)("reportV5.reportAi.chat.entireReport"),
212
212
  class: "flex min-w-0 grow items-center gap-8 text-fm-color-typo-secondary"
213
213
  }, [
214
- X(J, {
215
- name: E.target ? "mode_comment" : "dashboard",
214
+ Z(J, {
215
+ name: O.target ? "mode_comment" : "dashboard",
216
216
  size: "sm",
217
217
  outline: ""
218
218
  }, null, 8, ["name"]),
219
- _("p", ea, [
220
- Vt(S(E.target ? E.target.label || s(m)("reportV5.reportAi.chat.selectedWidget") : s(m)("reportV5.reportAi.chat.entireReport")), 1),
221
- K.value ? (c(), h("span", ta, " › " + S(K.value), 1)) : R("", !0)
219
+ w("p", aa, [
220
+ Ft(k(O.target ? O.target.label || s(m)("reportV5.reportAi.chat.selectedWidget") : s(m)("reportV5.reportAi.chat.entireReport")), 1),
221
+ Y.value ? (c(), p("span", ra, " › " + k(Y.value), 1)) : R("", !0)
222
222
  ]),
223
- E.target ? (c(), h("button", {
223
+ O.target ? (c(), p("button", {
224
224
  key: 0,
225
225
  class: "flex shrink-0 items-center text-fm-color-typo-secondary disabled:opacity-50",
226
- disabled: E.streaming,
226
+ disabled: O.streaming,
227
227
  "aria-label": s(m)(
228
- E.target.element ? "reportV5.reportAi.chat.removeElement" : "reportV5.reportAi.chat.removeTarget"
228
+ O.target.element ? "reportV5.reportAi.chat.removeElement" : "reportV5.reportAi.chat.removeTarget"
229
229
  ),
230
230
  onClick: G[2] || (G[2] = (B) => r("clearTarget"))
231
231
  }, [
232
- X(J, {
232
+ Z(J, {
233
233
  name: "close",
234
234
  size: "sm"
235
235
  })
236
- ], 8, na)) : R("", !0)
237
- ], 8, Zn),
238
- _("button", {
236
+ ], 8, oa)) : R("", !0)
237
+ ], 8, na),
238
+ w("button", {
239
239
  "data-testid": "report-canvas-chat-send",
240
- class: Me([
240
+ class: Pe([
241
241
  "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",
242
- T.value ? "bg-fm-color-primary text-fm-color-neutral-white" : "bg-fm-color-neutral-gray-100 text-fm-color-typo-secondary"
242
+ E.value ? "bg-fm-color-primary text-fm-color-neutral-white" : "bg-fm-color-neutral-gray-100 text-fm-color-typo-secondary"
243
243
  ]),
244
- disabled: !T.value,
244
+ disabled: !E.value,
245
245
  "aria-label": s(m)("reportV5.reportAi.chat.send"),
246
246
  onClick: W
247
247
  }, [
248
- X(J, {
248
+ Z(J, {
249
249
  name: "arrow_forward",
250
250
  size: "sm"
251
251
  })
252
- ], 10, aa)
252
+ ], 10, ia)
253
253
  ])
254
254
  ]),
255
- _("p", ra, S(E.streaming && E.draft.trim() ? s(m)("reportV5.reportAi.chat.waitForUpdate") : s(m)("reportV5.reportAi.chat.newLineHint")), 1)
255
+ w("p", sa, k(O.streaming && O.draft.trim() ? s(m)("reportV5.reportAi.chat.waitForUpdate") : s(m)("reportV5.reportAi.chat.newLineHint")), 1)
256
256
  ]);
257
257
  };
258
258
  }
259
- }), ia = "rounded-sm bg-fm-color-neutral-gray-100 px-4 font-mono text-[0.9em]";
260
- function Tt(o) {
261
- return o.map((e) => e.type === "strong" ? Te("strong", { class: "font-semibold" }, e.text) : e.type === "em" ? Te("em", e.text) : e.type === "code" ? Te("code", { class: ia }, e.text) : e.type === "link" ? Te(
259
+ }), fa = "rounded-sm bg-fm-color-neutral-gray-100 px-4 font-mono text-[0.9em]";
260
+ function Et(o) {
261
+ return o.map((e) => e.type === "strong" ? Ae("strong", { class: "font-semibold" }, e.text) : e.type === "em" ? Ae("em", e.text) : e.type === "code" ? Ae("code", { class: fa }, e.text) : e.type === "link" ? Ae(
262
262
  "a",
263
263
  {
264
264
  href: e.href,
@@ -269,110 +269,110 @@ function Tt(o) {
269
269
  e.text
270
270
  ) : e.text);
271
271
  }
272
- const sa = (o) => Te(
272
+ const da = (o) => Ae(
273
273
  "div",
274
274
  { class: "fm-typo-en-body-md-400 flex flex-col items-stretch gap-8 !leading-[21px]" },
275
- (o.blocks ?? []).map((e) => e.type === "pre" ? Te(
275
+ (o.blocks ?? []).map((e) => e.type === "pre" ? Ae(
276
276
  "pre",
277
277
  {
278
278
  class: "overflow-x-auto rounded-md bg-fm-color-neutral-gray-100 p-8 font-mono text-xs"
279
279
  },
280
280
  e.text
281
- ) : e.type === "list" ? Te(
281
+ ) : e.type === "list" ? Ae(
282
282
  e.ordered ? "ol" : "ul",
283
283
  { class: `flex flex-col gap-4 pl-16 ${e.ordered ? "list-decimal" : "list-disc"}` },
284
- e.items.map((t) => Te("li", Tt(t)))
285
- ) : Te(
284
+ e.items.map((t) => Ae("li", Et(t)))
285
+ ) : Ae(
286
286
  "p",
287
287
  { class: e.heading ? "fm-typo-en-body-md-600" : void 0 },
288
- Tt(e.inline)
288
+ Et(e.inline)
289
289
  ))
290
- ), la = ["aria-expanded"], fa = /* @__PURE__ */ De({
290
+ ), ca = ["aria-expanded"], ma = /* @__PURE__ */ je({
291
291
  __name: "ReportCanvasMessage",
292
292
  props: {
293
293
  blocks: {},
294
294
  preview: {}
295
295
  },
296
296
  setup(o) {
297
- const e = o, { t } = je(), a = A(!1);
298
- fe(
297
+ const e = o, { t } = Ve(), a = T(!1);
298
+ de(
299
299
  () => e.preview,
300
300
  () => a.value = !1
301
301
  );
302
- const r = j(() => e.preview && !a.value ? e.preview : e.blocks);
303
- return (m, b) => (c(), h("div", null, [
304
- X(s(sa), { blocks: r.value }, null, 8, ["blocks"]),
305
- m.preview ? (c(), h("button", {
302
+ const r = V(() => e.preview && !a.value ? e.preview : e.blocks);
303
+ return (m, h) => (c(), p("div", null, [
304
+ Z(s(da), { blocks: r.value }, null, 8, ["blocks"]),
305
+ m.preview ? (c(), p("button", {
306
306
  key: 0,
307
307
  "data-testid": "report-canvas-full-reply",
308
308
  class: "fm-typo-en-body-sm-600 mt-4 text-fm-color-typo-secondary underline",
309
309
  "aria-expanded": a.value,
310
- onClick: b[0] || (b[0] = (w) => a.value = !a.value)
311
- }, S(s(t)(a.value ? "reportV5.reportAi.chat.showLess" : "reportV5.reportAi.chat.showFullReply")), 9, la)) : R("", !0)
310
+ onClick: h[0] || (h[0] = (y) => a.value = !a.value)
311
+ }, k(s(t)(a.value ? "reportV5.reportAi.chat.showLess" : "reportV5.reportAi.chat.showFullReply")), 9, ca)) : R("", !0)
312
312
  ]));
313
313
  }
314
- }), da = /^(?:https?:\/\/|mailto:)[^\s]+$/i, at = /`([^`]+)`|(!?)\[([^\]]*)\]\(([^)\s]*)\)|\*\*([\s\S]+?)\*\*|\*([^*\n]+)\*/g;
315
- function rt(o, e) {
314
+ }), ua = /^(?:https?:\/\/|mailto:)[^\s]+$/i, rt = /`([^`]+)`|(!?)\[([^\]]*)\]\(([^)\s]*)\)|\*\*([\s\S]+?)\*\*|\*([^*\n]+)\*/g;
315
+ function ot(o, e) {
316
316
  if (!e) return;
317
317
  const t = o[o.length - 1];
318
318
  (t == null ? void 0 : t.type) === "text" ? t.text += e : o.push({ type: "text", text: e });
319
319
  }
320
- function ot(o) {
320
+ function it(o) {
321
321
  const e = [];
322
322
  let t = 0;
323
- at.lastIndex = 0;
324
- for (let a = at.exec(o); a; a = at.exec(o)) {
325
- rt(e, o.slice(t, a.index)), t = a.index + a[0].length;
326
- const [, r, m, b, w, I, v] = a;
327
- r !== void 0 ? e.push({ type: "code", text: r }) : b !== void 0 ? !m && da.test(w) ? e.push({ type: "link", text: b || w, href: w }) : rt(e, a[0]) : I !== void 0 ? e.push({ type: "strong", text: I }) : v !== void 0 && e.push({ type: "em", text: v });
323
+ rt.lastIndex = 0;
324
+ for (let a = rt.exec(o); a; a = rt.exec(o)) {
325
+ ot(e, o.slice(t, a.index)), t = a.index + a[0].length;
326
+ const [, r, m, h, y, I, b] = a;
327
+ r !== void 0 ? e.push({ type: "code", text: r }) : h !== void 0 ? !m && ua.test(y) ? e.push({ type: "link", text: h || y, href: y }) : ot(e, a[0]) : I !== void 0 ? e.push({ type: "strong", text: I }) : b !== void 0 && e.push({ type: "em", text: b });
328
328
  }
329
- return rt(e, o.slice(t)), e;
329
+ return ot(e, o.slice(t)), e;
330
330
  }
331
- const ca = /^\s*```/, ma = /^\s{0,3}(#{1,6})\s+(.*)$/, ua = /^\s*[-*+]\s+(.*)$/, pa = /^\s*\d{1,3}[.)]\s+(.*)$/;
332
- function Et(o) {
331
+ const pa = /^\s*```/, ha = /^\s{0,3}(#{1,6})\s+(.*)$/, ba = /^\s*[-*+]\s+(.*)$/, ga = /^\s*\d{1,3}[.)]\s+(.*)$/;
332
+ function Ot(o) {
333
333
  const e = [], t = String(o ?? "").split(/\r?\n/);
334
334
  let a = [], r = null, m = null;
335
- function b() {
336
- a.length && (e.push({ type: "p", inline: ot(a.join(" ")) }), a = []);
335
+ function h() {
336
+ a.length && (e.push({ type: "p", inline: it(a.join(" ")) }), a = []);
337
337
  }
338
- function w() {
338
+ function y() {
339
339
  r && (e.push({ type: "list", ordered: r.ordered, items: r.items }), r = null);
340
340
  }
341
341
  function I() {
342
- b(), w();
342
+ h(), y();
343
343
  }
344
- for (const v of t) {
345
- if (ca.test(v)) {
344
+ for (const b of t) {
345
+ if (pa.test(b)) {
346
346
  m ? (e.push({ type: "pre", text: m.join(`
347
347
  `) }), m = null) : (I(), m = []);
348
348
  continue;
349
349
  }
350
350
  if (m) {
351
- m.push(v);
351
+ m.push(b);
352
352
  continue;
353
353
  }
354
- const L = ma.exec(v), k = ua.exec(v), N = pa.exec(v);
355
- if (!v.trim())
354
+ const L = ha.exec(b), x = ba.exec(b), N = ga.exec(b);
355
+ if (!b.trim())
356
356
  I();
357
357
  else if (L)
358
- I(), e.push({ type: "p", inline: ot(L[2]), heading: !0 });
359
- else if (k || N) {
360
- b();
361
- const T = !k;
362
- (!r || r.ordered !== T) && (w(), r = { ordered: T, items: [] }), r.items.push(ot((k ?? N)[1]));
358
+ I(), e.push({ type: "p", inline: it(L[2]), heading: !0 });
359
+ else if (x || N) {
360
+ h();
361
+ const E = !x;
362
+ (!r || r.ordered !== E) && (y(), r = { ordered: E, items: [] }), r.items.push(it((x ?? N)[1]));
363
363
  } else
364
- w(), a.push(v.trim());
364
+ y(), a.push(b.trim());
365
365
  }
366
366
  return m != null && m.length && e.push({ type: "pre", text: m.join(`
367
367
  `) }), I(), e;
368
368
  }
369
- function ha(o, e) {
369
+ function va(o, e) {
370
370
  const t = String(o ?? "").trim();
371
371
  if (t.length <= e) return t;
372
372
  const a = t.slice(0, e), r = a.lastIndexOf(" ");
373
373
  return `${(r > e * 0.6 ? a.slice(0, r) : a).trimEnd()}…`;
374
374
  }
375
- const Ot = 600, ba = {
375
+ const zt = 600, ya = {
376
376
  discovery: "reviewing",
377
377
  grounding_probe: "reviewing",
378
378
  option_probe: "reviewing",
@@ -409,66 +409,66 @@ const Ot = 600, ba = {
409
409
  lazy_forced: "updating",
410
410
  manifest_unbound: "updating",
411
411
  rendered: "loading"
412
- }, ga = /* @__PURE__ */ new Set(["plan", "edit-target", "error", "turn_stats"]);
413
- function Ft(o) {
414
- return o && ba[o] || "working";
412
+ }, xa = /* @__PURE__ */ new Set(["plan", "edit-target", "error", "turn_stats"]);
413
+ function Bt(o) {
414
+ return o && ya[o] || "working";
415
415
  }
416
- function va(o) {
416
+ function wa(o) {
417
417
  const e = [];
418
418
  for (const t of o) {
419
- const a = Ft(t);
419
+ const a = Bt(t);
420
420
  e.includes(a) || e.push(a);
421
421
  }
422
422
  return e.slice(-4);
423
423
  }
424
- function it(o) {
424
+ function st(o) {
425
425
  return o.filter((e) => e.type === "text").map((e) => String(e.text ?? "").trim()).filter(Boolean).join(`
426
426
 
427
427
  `);
428
428
  }
429
- function ya(o) {
429
+ function ka(o) {
430
430
  const e = [];
431
431
  for (const t of o) {
432
432
  const a = t.type.startsWith("tool-") || t.type.startsWith("data-") ? t.type.slice(5) : "";
433
- a && !ga.has(a) && e.push(a);
433
+ a && !xa.has(a) && e.push(a);
434
434
  }
435
435
  return e;
436
436
  }
437
- function xa(o) {
437
+ function _a(o) {
438
438
  var a;
439
439
  const e = o.find((r) => r.type === "data-turn_stats"), t = (a = e == null ? void 0 : e.data) == null ? void 0 : a.ms;
440
440
  return typeof t == "number" && t >= 0 ? t : void 0;
441
441
  }
442
- function wa(o) {
442
+ function Sa(o) {
443
443
  const e = o / 1e3;
444
444
  return e < 60 ? `${e.toFixed(1)}s` : `${Math.floor(e / 60)}m ${String(Math.round(e % 60)).padStart(2, "0")}s`;
445
445
  }
446
- function ka(o) {
446
+ function Ia(o) {
447
447
  const e = o.find((t) => t.type === "data-edit-target");
448
448
  return e ? e.data : void 0;
449
449
  }
450
- function _a(o) {
450
+ function Ca(o) {
451
451
  const e = [[]];
452
452
  for (const t of o)
453
453
  t.type === "step-start" ? e.push([]) : e[e.length - 1].push(t);
454
454
  return e.filter((t) => t.length > 0);
455
455
  }
456
- function zt(o) {
456
+ function Nt(o) {
457
457
  return o.some((e) => e.type.startsWith("tool-"));
458
458
  }
459
- function Sa(o, e = {}) {
459
+ function Aa(o, e = {}) {
460
460
  var a;
461
461
  const t = [];
462
462
  for (const r of o ?? []) {
463
- const m = r.parts ?? [], b = ya(m), w = ka(m);
463
+ const m = r.parts ?? [], h = ka(m), y = Ia(m);
464
464
  if (r.role === "user") {
465
- const D = it(m);
465
+ const j = st(m);
466
466
  t.push({
467
467
  id: r.id,
468
468
  turnId: r.turnId ?? r.id,
469
469
  role: "user",
470
- target: w,
471
- answer: D,
470
+ target: y,
471
+ answer: j,
472
472
  blocks: [],
473
473
  preview: null,
474
474
  signals: [],
@@ -477,84 +477,84 @@ function Sa(o, e = {}) {
477
477
  });
478
478
  continue;
479
479
  }
480
- const I = !!e.streamingId && r.id === e.streamingId, v = _a(m), L = v[v.length - 1] ?? [], k = v.some(zt), N = k && !m.some((D) => D.type === "step-start");
481
- let T = "";
482
- I || (!k || N ? T = it(m) : zt(L) || (T = it(L)));
483
- const W = !!T && (N || T.length > Ot);
484
- !T && !b.length && !I || t.push({
480
+ const I = !!e.streamingId && r.id === e.streamingId, b = Ca(m), L = b[b.length - 1] ?? [], x = b.some(Nt), N = x && !m.some((j) => j.type === "step-start");
481
+ let E = "";
482
+ I || (!x || N ? E = st(m) : Nt(L) || (E = st(L)));
483
+ const W = !!E && (N || E.length > zt);
484
+ !E && !h.length && !I || t.push({
485
485
  id: r.id,
486
486
  turnId: r.turnId ?? r.id,
487
487
  role: "assistant",
488
- target: w,
489
- answer: T,
490
- blocks: T ? Et(T) : [],
491
- preview: W ? Et(ha(T, Ot)) : null,
492
- signals: b,
488
+ target: y,
489
+ answer: E,
490
+ blocks: E ? Ot(E) : [],
491
+ preview: W ? Ot(va(E, zt)) : null,
492
+ signals: h,
493
493
  pending: I,
494
- noSummary: !I && !T && k,
495
- ms: I ? void 0 : xa(m) ?? ((a = r.stats) == null ? void 0 : a.ms)
494
+ noSummary: !I && !E && x,
495
+ ms: I ? void 0 : _a(m) ?? ((a = r.stats) == null ? void 0 : a.ms)
496
496
  });
497
497
  }
498
498
  return t;
499
499
  }
500
- const Ia = ["aria-label"], Ca = { class: "flex h-64 shrink-0 items-center gap-12 border-b border-fm-color-border-secondary px-[20px]" }, Aa = { class: "min-w-0 grow" }, Ta = { class: "fm-typo-en-body-md-600" }, Ea = {
500
+ const Ta = ["aria-label"], Ea = { class: "flex h-64 shrink-0 items-center gap-12 border-b border-fm-color-border-secondary px-[20px]" }, Oa = { class: "min-w-0 grow" }, za = { class: "fm-typo-en-body-md-600" }, Na = {
501
501
  key: 0,
502
502
  class: "fm-typo-en-body-sm-400 truncate text-fm-color-typo-secondary"
503
- }, Oa = ["disabled", "aria-label"], za = ["disabled", "aria-label", "title"], Na = ["aria-label"], $a = ["data-testid", "aria-label"], Ra = {
503
+ }, $a = ["disabled", "aria-label"], Ra = ["disabled", "aria-label", "title"], La = ["aria-label"], Ma = ["data-testid", "aria-label"], Pa = {
504
504
  key: 0,
505
505
  class: "mt-auto flex shrink-0 flex-col gap-24 pb-8 pt-32"
506
- }, La = { class: "text-center" }, Ma = { class: "text-[24px] font-semibold leading-tight tracking-tight text-fm-color-typo-primary" }, Pa = { class: "fm-typo-en-body-sm-400 mt-12 text-fm-color-typo-secondary" }, Da = {
506
+ }, Da = { class: "text-center" }, ja = { class: "text-[24px] font-semibold leading-tight tracking-tight text-fm-color-typo-primary" }, Va = { class: "fm-typo-en-body-sm-400 mt-12 text-fm-color-typo-secondary" }, Fa = {
507
507
  key: 0,
508
508
  class: "flex flex-col gap-4"
509
- }, ja = ["disabled", "title", "onClick"], Va = ["aria-label"], Fa = { class: "fm-typo-en-body-sm-600 mb-12 text-fm-color-typo-secondary" }, Ba = {
509
+ }, Ba = ["disabled", "title", "onClick"], qa = ["aria-label"], Ua = { class: "fm-typo-en-body-sm-600 mb-12 text-fm-color-typo-secondary" }, Ha = {
510
510
  key: 0,
511
511
  class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary"
512
- }, qa = {
512
+ }, Wa = {
513
513
  key: 1,
514
514
  "data-testid": "report-canvas-chat-list-error",
515
515
  class: "fm-typo-en-body-sm-400 text-fm-color-typo-error"
516
- }, Ua = {
516
+ }, Ga = {
517
517
  key: 2,
518
518
  class: "fm-typo-en-body-sm-400 py-12 text-fm-color-typo-secondary"
519
- }, Ha = {
519
+ }, Ya = {
520
520
  key: 0,
521
521
  class: "fm-typo-en-body-sm-400 mb-8 text-fm-color-typo-secondary"
522
- }, Wa = ["disabled", "aria-current", "title", "onClick"], Ga = { class: "fm-typo-en-body-md-400 min-w-0 grow truncate" }, Ya = ["datetime"], Ka = ["disabled"], Ja = ["disabled"], Xa = {
522
+ }, Ka = ["disabled", "aria-current", "title", "onClick"], Ja = { class: "fm-typo-en-body-md-400 min-w-0 grow truncate" }, Xa = ["datetime"], Qa = ["disabled"], Za = ["disabled"], er = {
523
523
  key: 2,
524
524
  "data-testid": "report-canvas-chat-error",
525
525
  class: "fm-typo-en-body-sm-400 mt-12 text-fm-color-typo-error"
526
- }, Qa = {
526
+ }, tr = {
527
527
  key: 1,
528
528
  class: "relative flex min-h-0 grow flex-col"
529
- }, Za = {
529
+ }, nr = {
530
530
  key: 0,
531
531
  "data-testid": "report-canvas-chat-loading",
532
532
  class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
533
- }, er = ["disabled"], tr = {
533
+ }, ar = ["disabled"], rr = {
534
534
  key: 0,
535
535
  "data-testid": "chat-message-target",
536
536
  class: "fm-typo-en-body-sm-600 mb-4 text-right text-fm-color-typo-secondary"
537
- }, nr = {
537
+ }, or = {
538
538
  key: 1,
539
539
  class: "flex flex-col items-end"
540
- }, ar = {
540
+ }, ir = {
541
541
  key: 0,
542
542
  "data-testid": "chat-message-unsent",
543
543
  class: "fm-typo-en-body-sm-400 mt-4 text-fm-color-typo-secondary"
544
- }, rr = ["disabled", "onClick"], or = ["disabled", "onClick"], ir = {
544
+ }, sr = ["disabled", "onClick"], lr = ["disabled", "onClick"], fr = {
545
545
  key: 2,
546
546
  class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
547
- }, sr = {
547
+ }, dr = {
548
548
  key: 3,
549
549
  "data-testid": "report-canvas-answer-duration",
550
550
  class: "fm-typo-en-body-sm-400 mt-4 text-fm-color-typo-secondary"
551
- }, lr = {
551
+ }, cr = {
552
552
  key: 2,
553
553
  "data-testid": "report-canvas-chat-error",
554
554
  class: "fm-typo-en-body-md-400 text-fm-color-typo-error"
555
- }, fr = { class: "shrink-0" }, Nt = "New chat", dr = 24 * 60 * 60 * 1e3, cr = 80, mr = /* @__PURE__ */ De({
555
+ }, mr = { class: "shrink-0" }, $t = "New chat", ur = 24 * 60 * 60 * 1e3, pr = 80, hr = /* @__PURE__ */ je({
556
556
  __name: "ReportCanvasChatPanel",
557
- props: /* @__PURE__ */ wt({
557
+ props: /* @__PURE__ */ kt({
558
558
  messages: {},
559
559
  draft: {},
560
560
  target: {},
@@ -589,62 +589,62 @@ const Ia = ["aria-label"], Ca = { class: "flex h-64 shrink-0 items-center gap-12
589
589
  homeDraft: { default: "" },
590
590
  homeDraftModifiers: {}
591
591
  }),
592
- emits: /* @__PURE__ */ wt(["update:draft", "submit", "close", "retry", "undo", "resend", "checkStatus", "clearTarget", "newChat", "selectChat", "loadChats", "loadMoreChats", "loadEarlier"], ["update:homeOpen", "update:homeDraft"]),
592
+ emits: /* @__PURE__ */ kt(["update:draft", "submit", "close", "retry", "undo", "resend", "checkStatus", "clearTarget", "newChat", "selectChat", "loadChats", "loadMoreChats", "loadEarlier"], ["update:homeOpen", "update:homeDraft"]),
593
593
  setup(o, { emit: e }) {
594
- const t = o, a = e, { t: r, locale: m } = je(), b = kt(o, "homeOpen"), w = A(!1), I = kt(o, "homeDraft"), v = A(!1), L = j(
595
- () => !t.chatTitle || t.chatTitle === Nt ? r("reportV5.reportAi.chat.chats") : t.chatTitle
596
- ), k = A(!1), N = j(() => t.switching || k.value);
597
- fe(
594
+ const t = o, a = e, { t: r, locale: m } = Ve(), h = _t(o, "homeOpen"), y = T(!1), I = _t(o, "homeDraft"), b = T(!1), L = V(
595
+ () => !t.chatTitle || t.chatTitle === $t ? r("reportV5.reportAi.chat.chats") : t.chatTitle
596
+ ), x = T(!1), N = V(() => t.switching || x.value);
597
+ de(
598
598
  () => t.messages,
599
599
  () => {
600
- k.value = !1;
600
+ x.value = !1;
601
601
  }
602
- ), fe(
602
+ ), de(
603
603
  () => t.switching,
604
604
  (n) => {
605
- n || (k.value = !1);
605
+ n || (x.value = !1);
606
606
  }
607
607
  );
608
- function T() {
609
- t.busy || (b.value = !0, w.value = !1, a("loadChats"));
608
+ function E() {
609
+ t.busy || (h.value = !0, y.value = !1, a("loadChats"));
610
610
  }
611
611
  function W() {
612
- w.value = !0, a("loadChats");
612
+ y.value = !0, a("loadChats");
613
613
  }
614
- function D() {
615
- w.value ? w.value = !1 : T();
614
+ function j() {
615
+ y.value ? y.value = !1 : E();
616
616
  }
617
- function K(n) {
618
- t.busy || (b.value = !1, w.value = !1, n !== t.chatId && (k.value = !0, a("selectChat", n)));
617
+ function Y(n) {
618
+ t.busy || (h.value = !1, y.value = !1, n !== t.chatId && (x.value = !0, a("selectChat", n)));
619
619
  }
620
- function q() {
621
- t.busy || (b.value = !1, w.value = !1, k.value = !0, a("newChat"));
620
+ function U() {
621
+ t.busy || (h.value = !1, y.value = !1, x.value = !0, a("newChat"));
622
622
  }
623
- fe(
623
+ de(
624
624
  () => t.chatId,
625
625
  () => {
626
- v.value && (I.value = "", v.value = !1, b.value = !1);
626
+ b.value && (I.value = "", b.value = !1, h.value = !1);
627
627
  }
628
- ), fe(
628
+ ), de(
629
629
  () => t.switching,
630
630
  (n) => {
631
- n || (v.value = !1);
631
+ n || (b.value = !1);
632
632
  }
633
633
  );
634
- function E(n) {
635
- if (n.key === "Escape" && w.value) {
636
- n.stopPropagation(), w.value = !1;
634
+ function O(n) {
635
+ if (n.key === "Escape" && y.value) {
636
+ n.stopPropagation(), y.value = !1;
637
637
  return;
638
638
  }
639
- n.key === "Escape" && b.value && (n.stopPropagation(), b.value = !1);
639
+ n.key === "Escape" && h.value && (n.stopPropagation(), h.value = !1);
640
640
  }
641
- const G = j(() => {
641
+ const G = V(() => {
642
642
  const n = /* @__PURE__ */ new Date();
643
643
  n.setHours(0, 0, 0, 0);
644
644
  const i = [];
645
645
  for (const f of t.chats ?? []) {
646
- const p = new Date(f.lastMessageAt).getTime(), $ = p >= n.getTime() ? "today" : p >= n.getTime() - dr ? "yesterday" : "earlier";
647
- (i.find((V) => V.key === $) ?? (i.push({ key: $, label: r(`reportV5.reportAi.chat.group.${$}`), chats: [] }), i[i.length - 1])).chats.push(f);
646
+ const A = new Date(f.lastMessageAt).getTime(), P = A >= n.getTime() ? "today" : A >= n.getTime() - ur ? "yesterday" : "earlier";
647
+ (i.find((D) => D.key === P) ?? (i.push({ key: P, label: r(`reportV5.reportAi.chat.group.${P}`), chats: [] }), i[i.length - 1])).chats.push(f);
648
648
  }
649
649
  return i;
650
650
  });
@@ -654,49 +654,49 @@ const Ia = ["aria-label"], Ca = { class: "flex h-64 shrink-0 items-center gap-12
654
654
  day: "numeric"
655
655
  });
656
656
  }
657
- const P = j(() => new Set(t.undoableTurnIds ?? [])), B = j(() => new Set(t.unsentIds ?? [])), g = A();
658
- fe(
657
+ const F = V(() => new Set(t.undoableTurnIds ?? [])), B = V(() => new Set(t.unsentIds ?? [])), _ = T();
658
+ de(
659
659
  () => t.target,
660
660
  async (n) => {
661
661
  var i;
662
- n && (w.value = !1, await $e(), (i = g.value) == null || i.focus());
662
+ n && (y.value = !1, await Ee(), (i = _.value) == null || i.focus());
663
663
  },
664
664
  { immediate: !0 }
665
665
  );
666
- const z = j(
667
- () => Sa(t.messages ?? [], {
666
+ const z = V(
667
+ () => Aa(t.messages ?? [], {
668
668
  streamingId: t.streaming ? t.turnId : void 0
669
669
  })
670
- ), C = j(
670
+ ), g = V(
671
671
  () => t.streaming ? z.value.findIndex((n) => n.pending) : -1
672
- ), Y = j(() => z.value.findIndex((n) => n.id === t.runAnchorId)), U = j(
673
- () => C.value < 0 && (t.streaming || t.interrupted) || Y.value < 0 && !!t.run
674
- ), te = j(
675
- () => b.value || !t.earlier && !N.value && !z.value.length && !U.value
676
- ), re = j(() => (t.chats ?? []).slice(0, 3)), de = j(
672
+ ), H = V(() => z.value.findIndex((n) => n.id === t.runAnchorId)), K = V(
673
+ () => g.value < 0 && (t.streaming || t.interrupted) || H.value < 0 && !!t.run
674
+ ), ee = V(
675
+ () => h.value || !t.earlier && !N.value && !z.value.length && !K.value
676
+ ), X = V(() => (t.chats ?? []).slice(0, 3)), se = V(
677
677
  () => {
678
678
  var n;
679
- return !!((n = t.chats) != null && n.length) || !!t.chatsLoading || !!t.chatsError || w.value;
679
+ return !!((n = t.chats) != null && n.length) || !!t.chatsLoading || !!t.chatsError || y.value;
680
680
  }
681
681
  );
682
- fe(
683
- [te, () => t.chatId],
682
+ de(
683
+ [ee, () => t.chatId],
684
684
  ([n, i]) => {
685
- n && i && !b.value && a("loadChats");
685
+ n && i && !h.value && a("loadChats");
686
686
  },
687
687
  { immediate: !0 }
688
688
  );
689
- const ie = j(
690
- () => w.value ? G.value : [{ key: "recent", label: "", chats: re.value }]
689
+ const ce = V(
690
+ () => y.value ? G.value : [{ key: "recent", label: "", chats: X.value }]
691
691
  );
692
- function se(n) {
693
- var p, $;
694
- const i = n === C.value, f = n === Y.value;
692
+ function ye(n) {
693
+ var A, P;
694
+ const i = n === g.value, f = n === H.value;
695
695
  return {
696
- active: i && t.streaming || f && ((p = t.run) == null ? void 0 : p.status) === "running" && !t.runStale,
696
+ active: i && t.streaming || f && ((A = t.run) == null ? void 0 : A.status) === "running" && !t.runStale,
697
697
  // a run card left behind by a newer streaming turn shows its own work, not that turn's phase
698
698
  phase: i || !t.streaming ? t.phase : "updating",
699
- phases: va((($ = z.value[n]) == null ? void 0 : $.signals) ?? []),
699
+ phases: wa(((P = z.value[n]) == null ? void 0 : P.signals) ?? []),
700
700
  run: f ? t.run : null,
701
701
  slow: i && t.slow,
702
702
  stale: f && t.runStale,
@@ -704,371 +704,371 @@ const Ia = ["aria-label"], Ca = { class: "flex h-64 shrink-0 items-center gap-12
704
704
  retryError: f ? t.retryError : ""
705
705
  };
706
706
  }
707
- const ve = ["one", "two", "three"], pe = j(
708
- () => t.blank ? ve.map((n) => ({
707
+ const he = ["one", "two", "three"], le = V(
708
+ () => t.blank ? he.map((n) => ({
709
709
  label: r(`reportV5.reportAi.chat.suggestNew.${n}.label`),
710
710
  prompt: r(`reportV5.reportAi.chat.suggestNew.${n}.prompt`)
711
711
  })) : []
712
712
  );
713
- async function ce(n) {
713
+ async function oe(n) {
714
714
  var i;
715
- Z(n), await $e(), (i = g.value) == null || i.focus();
715
+ te(n), await Ee(), (i = _.value) == null || i.focus();
716
716
  }
717
- function Z(n) {
718
- b.value ? I.value = n : a("update:draft", n);
717
+ function te(n) {
718
+ h.value ? I.value = n : a("update:draft", n);
719
719
  }
720
- const ye = A(), y = A(!0), u = A(!1);
721
- function O() {
722
- const n = ye.value;
723
- n && (y.value = n.scrollHeight - n.scrollTop - n.clientHeight <= cr, y.value && (u.value = !1));
720
+ const xe = T(), C = T(!0), u = T(!1);
721
+ function S() {
722
+ const n = xe.value;
723
+ n && (C.value = n.scrollHeight - n.scrollTop - n.clientHeight <= pr, C.value && (u.value = !1));
724
724
  }
725
725
  async function M() {
726
- await $e();
727
- const n = ye.value;
728
- n && (n.scrollTop = n.scrollHeight, y.value = !0, u.value = !1);
726
+ await Ee();
727
+ const n = xe.value;
728
+ n && (n.scrollTop = n.scrollHeight, C.value = !0, u.value = !1);
729
729
  }
730
- fe(
730
+ de(
731
731
  () => JSON.stringify(t.messages ?? []).length,
732
732
  () => {
733
- y.value ? M() : u.value = !0;
733
+ C.value ? M() : u.value = !0;
734
734
  }
735
735
  );
736
736
  function d() {
737
- if (b.value) {
738
- if (!I.value.trim() || t.busy || t.targetStale || v.value) return;
739
- v.value = !0, a("newChat", I.value.trim());
737
+ if (h.value) {
738
+ if (!I.value.trim() || t.busy || t.targetStale || b.value) return;
739
+ b.value = !0, a("newChat", I.value.trim());
740
740
  return;
741
741
  }
742
742
  !t.draft.trim() || t.streaming || t.targetStale || (a("submit"), M());
743
743
  }
744
744
  return (n, i) => {
745
- var $, H;
746
- const f = Ie("FmIcon"), p = Ie("FmTooltip");
747
- return c(), h("aside", {
745
+ var P, $;
746
+ const f = Ie("FmIcon"), A = Ie("FmTooltip");
747
+ return c(), p("aside", {
748
748
  class: "flex h-full min-h-0 w-full flex-col border-l border-fm-color-border-secondary bg-fm-color-neutral-white",
749
749
  "aria-label": s(r)("reportV5.reportAi.chat.title"),
750
- onKeydown: E
750
+ onKeydown: O
751
751
  }, [
752
- _("header", Ca, [
753
- _("div", Aa, [
754
- _("h2", Ta, S(s(r)("reportV5.reportAi.chat.title")), 1),
755
- !te.value && n.chatTitle && n.chatTitle !== Nt ? (c(), h("p", Ea, S(n.chatTitle), 1)) : R("", !0)
752
+ w("header", Ea, [
753
+ w("div", Oa, [
754
+ w("h2", za, k(s(r)("reportV5.reportAi.chat.title")), 1),
755
+ !ee.value && n.chatTitle && n.chatTitle !== $t ? (c(), p("p", Na, k(n.chatTitle), 1)) : R("", !0)
756
756
  ]),
757
- !b.value || w.value ? (c(), ge(p, {
757
+ !h.value || y.value ? (c(), me(A, {
758
758
  key: 0,
759
759
  placement: "bottom",
760
760
  content: s(r)("reportV5.reportAi.chat.chats")
761
761
  }, {
762
- default: Ne(() => [
763
- _("button", {
762
+ default: $e(() => [
763
+ w("button", {
764
764
  "data-testid": "report-canvas-chat-back",
765
765
  class: "chat-icon-button flex h-[36px] w-[36px] shrink-0 items-center justify-center rounded-md text-fm-color-typo-secondary",
766
766
  disabled: n.busy,
767
- "aria-label": w.value ? s(r)("reportV5.reportAi.chat.recentChats") : s(r)("reportV5.reportAi.chat.openChats", { title: L.value }),
768
- onClick: D
767
+ "aria-label": y.value ? s(r)("reportV5.reportAi.chat.recentChats") : s(r)("reportV5.reportAi.chat.openChats", { title: L.value }),
768
+ onClick: j
769
769
  }, [
770
- X(f, {
770
+ Z(f, {
771
771
  name: "chevron_left",
772
772
  size: "md"
773
773
  })
774
- ], 8, Oa)
774
+ ], 8, $a)
775
775
  ]),
776
776
  _: 1
777
777
  }, 8, ["content"])) : R("", !0),
778
- te.value ? R("", !0) : (c(), ge(p, {
778
+ ee.value ? R("", !0) : (c(), me(A, {
779
779
  key: 1,
780
780
  placement: "bottom",
781
781
  content: s(r)("reportV5.reportAi.chat.newChat")
782
782
  }, {
783
- default: Ne(() => [
784
- _("button", {
783
+ default: $e(() => [
784
+ w("button", {
785
785
  "data-testid": "report-canvas-new-chat",
786
786
  class: "chat-icon-button flex h-[36px] w-[36px] shrink-0 items-center justify-center rounded-md text-fm-color-typo-secondary",
787
787
  disabled: n.busy,
788
788
  "aria-label": s(r)("reportV5.reportAi.chat.newChat"),
789
789
  title: n.busy ? s(r)("reportV5.reportAi.chat.waitForUpdate") : void 0,
790
- onClick: q
790
+ onClick: U
791
791
  }, [
792
- X(f, {
792
+ Z(f, {
793
793
  name: "edit_square",
794
794
  size: "md",
795
795
  outline: ""
796
796
  })
797
- ], 8, za)
797
+ ], 8, Ra)
798
798
  ]),
799
799
  _: 1
800
800
  }, 8, ["content"])),
801
- X(p, {
801
+ Z(A, {
802
802
  placement: "left",
803
803
  content: s(r)("reportV5.reportAi.chat.hide")
804
804
  }, {
805
- default: Ne(() => [
806
- _("button", {
805
+ default: $e(() => [
806
+ w("button", {
807
807
  "data-testid": "report-canvas-chat-close",
808
808
  class: "chat-icon-button flex h-[36px] w-[36px] shrink-0 items-center justify-center rounded-md text-fm-color-typo-secondary",
809
809
  "aria-label": s(r)("reportV5.reportAi.chat.hide"),
810
- onClick: i[0] || (i[0] = (V) => a("close"))
810
+ onClick: i[0] || (i[0] = (D) => a("close"))
811
811
  }, [
812
- X(f, {
812
+ Z(f, {
813
813
  name: "close",
814
814
  size: "md"
815
815
  })
816
- ], 8, Na)
816
+ ], 8, La)
817
817
  ]),
818
818
  _: 1
819
819
  }, 8, ["content"])
820
820
  ]),
821
- te.value ? (c(), h("div", {
821
+ ee.value ? (c(), p("div", {
822
822
  key: 0,
823
- "data-testid": b.value ? "report-canvas-chat-list" : "report-canvas-chat-home",
823
+ "data-testid": h.value ? "report-canvas-chat-list" : "report-canvas-chat-home",
824
824
  class: "flex min-h-0 grow flex-col overflow-y-auto px-[20px] py-24",
825
825
  "aria-label": s(r)("reportV5.reportAi.chat.chats")
826
826
  }, [
827
- w.value ? R("", !0) : (c(), h("div", Ra, [
828
- _("div", La, [
829
- _("h3", Ma, S(s(r)("reportV5.reportAi.chat.exploreTitle")), 1),
830
- _("p", Pa, S(s(r)(
827
+ y.value ? R("", !0) : (c(), p("div", Pa, [
828
+ w("div", Da, [
829
+ w("h3", ja, k(s(r)("reportV5.reportAi.chat.exploreTitle")), 1),
830
+ w("p", Va, k(s(r)(
831
831
  n.blank ? "reportV5.reportAi.chat.placeholderNew" : "reportV5.reportAi.chat.exploreHint"
832
832
  )), 1)
833
833
  ]),
834
- pe.value.length ? (c(), h("div", Da, [
835
- (c(!0), h(be, null, Se(pe.value, (V) => (c(), h("button", {
836
- key: V.label,
834
+ le.value.length ? (c(), p("div", Fa, [
835
+ (c(!0), p(ve, null, Se(le.value, (D) => (c(), p("button", {
836
+ key: D.label,
837
837
  "data-testid": "report-canvas-suggestion",
838
838
  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",
839
839
  disabled: n.busy,
840
- title: V.prompt,
841
- onClick: (ae) => ce(V.prompt)
840
+ title: D.prompt,
841
+ onClick: (re) => oe(D.prompt)
842
842
  }, [
843
- _("span", null, S(V.label), 1),
844
- X(f, {
843
+ w("span", null, k(D.label), 1),
844
+ Z(f, {
845
845
  name: "chevron_right",
846
846
  size: "sm",
847
847
  class: "shrink-0"
848
848
  })
849
- ], 8, ja))), 128))
849
+ ], 8, Ba))), 128))
850
850
  ])) : R("", !0)
851
851
  ])),
852
- de.value ? (c(), h("section", {
852
+ se.value ? (c(), p("section", {
853
853
  key: 1,
854
854
  class: "shrink-0 pt-24",
855
855
  "aria-label": s(r)("reportV5.reportAi.chat.recentChats")
856
856
  }, [
857
- _("h3", Fa, S(s(r)(
858
- w.value ? "reportV5.reportAi.chat.yourChats" : "reportV5.reportAi.chat.recentChats"
857
+ w("h3", Ua, k(s(r)(
858
+ y.value ? "reportV5.reportAi.chat.yourChats" : "reportV5.reportAi.chat.recentChats"
859
859
  )), 1),
860
- n.chatsLoading && !(($ = n.chats) != null && $.length) ? (c(), h("p", Ba, S(s(r)("reportV5.reportAi.chat.loadingChats")), 1)) : n.chatsError ? (c(), h("p", qa, S(n.chatsError), 1)) : (H = n.chats) != null && H.length ? (c(!0), h(be, { key: 3 }, Se(ie.value, (V) => (c(), h("section", {
861
- key: V.key,
862
- class: Me(w.value ? "mb-16" : "")
860
+ n.chatsLoading && !((P = n.chats) != null && P.length) ? (c(), p("p", Ha, k(s(r)("reportV5.reportAi.chat.loadingChats")), 1)) : n.chatsError ? (c(), p("p", Wa, k(n.chatsError), 1)) : ($ = n.chats) != null && $.length ? (c(!0), p(ve, { key: 3 }, Se(ce.value, (D) => (c(), p("section", {
861
+ key: D.key,
862
+ class: Pe(y.value ? "mb-16" : "")
863
863
  }, [
864
- V.label ? (c(), h("p", Ha, S(V.label), 1)) : R("", !0),
865
- (c(!0), h(be, null, Se(V.chats, (ae) => (c(), h("button", {
866
- key: ae.id,
864
+ D.label ? (c(), p("p", Ya, k(D.label), 1)) : R("", !0),
865
+ (c(!0), p(ve, null, Se(D.chats, (re) => (c(), p("button", {
866
+ key: re.id,
867
867
  "data-testid": "report-canvas-chat-list-item",
868
868
  class: "chat-row flex w-full items-center gap-12 rounded-md px-8 py-12 text-left",
869
869
  disabled: n.busy,
870
- "aria-current": ae.id === n.chatId ? "true" : void 0,
871
- title: ae.title,
872
- onClick: (xe) => K(ae.id)
870
+ "aria-current": re.id === n.chatId ? "true" : void 0,
871
+ title: re.title,
872
+ onClick: (be) => Y(re.id)
873
873
  }, [
874
- _("span", Ga, S(ae.title), 1),
875
- _("time", {
876
- datetime: ae.lastMessageAt,
874
+ w("span", Ja, k(re.title), 1),
875
+ w("time", {
876
+ datetime: re.lastMessageAt,
877
877
  class: "fm-typo-en-body-sm-400 shrink-0 text-fm-color-typo-secondary"
878
- }, S(J(ae)), 9, Ya)
879
- ], 8, Wa))), 128))
880
- ], 2))), 128)) : (c(), h("p", Ua, S(s(r)("reportV5.reportAi.chat.noChats")), 1)),
881
- w.value ? n.chatsCursor ? (c(), h("button", {
878
+ }, k(J(re)), 9, Xa)
879
+ ], 8, Ka))), 128))
880
+ ], 2))), 128)) : (c(), p("p", Ga, k(s(r)("reportV5.reportAi.chat.noChats")), 1)),
881
+ y.value ? n.chatsCursor ? (c(), p("button", {
882
882
  key: 5,
883
883
  "data-testid": "report-canvas-chat-list-more",
884
884
  class: "chat-row fm-typo-en-body-sm-600 rounded-md px-8 py-12 text-fm-color-typo-secondary",
885
885
  disabled: n.chatsLoading,
886
- onClick: i[1] || (i[1] = (V) => a("loadMoreChats"))
887
- }, S(s(r)("reportV5.reportAi.chat.loadMoreChats")), 9, Ja)) : R("", !0) : (c(), h("button", {
886
+ onClick: i[1] || (i[1] = (D) => a("loadMoreChats"))
887
+ }, k(s(r)("reportV5.reportAi.chat.loadMoreChats")), 9, Za)) : R("", !0) : (c(), p("button", {
888
888
  key: 4,
889
889
  "data-testid": "report-canvas-chat-see-all",
890
890
  class: "chat-row fm-typo-en-body-sm-600 mt-8 rounded-md px-8 py-12 text-fm-color-typo-secondary",
891
891
  disabled: n.chatsLoading,
892
892
  onClick: W
893
- }, S(s(r)("reportV5.reportAi.chat.seeAll")), 9, Ka))
894
- ], 8, Va)) : R("", !0),
895
- n.error ? (c(), h("p", Xa, S(n.error), 1)) : R("", !0)
896
- ], 8, $a)) : (c(), h("div", Qa, [
897
- _("div", {
893
+ }, k(s(r)("reportV5.reportAi.chat.seeAll")), 9, Qa))
894
+ ], 8, qa)) : R("", !0),
895
+ n.error ? (c(), p("p", er, k(n.error), 1)) : R("", !0)
896
+ ], 8, Ma)) : (c(), p("div", tr, [
897
+ w("div", {
898
898
  ref_key: "scroller",
899
- ref: ye,
899
+ ref: xe,
900
900
  class: "min-h-0 grow overflow-y-auto px-[20px] py-16",
901
- onScroll: O
901
+ onScroll: S
902
902
  }, [
903
- N.value ? (c(), h("p", Za, S(s(r)("reportV5.reportAi.chat.loadingChat")), 1)) : (c(), h(be, { key: 1 }, [
904
- n.earlier ? (c(), h("button", {
903
+ N.value ? (c(), p("p", nr, k(s(r)("reportV5.reportAi.chat.loadingChat")), 1)) : (c(), p(ve, { key: 1 }, [
904
+ n.earlier ? (c(), p("button", {
905
905
  key: 0,
906
906
  "data-testid": "report-canvas-load-earlier",
907
907
  class: "fm-typo-en-body-sm-600 mb-16 w-full text-fm-color-typo-secondary disabled:opacity-50",
908
908
  disabled: n.loadingEarlier,
909
- onClick: i[2] || (i[2] = (V) => a("loadEarlier"))
910
- }, S(s(r)("reportV5.reportAi.chat.loadEarlier")), 9, er)) : R("", !0),
911
- (c(!0), h(be, null, Se(z.value, (V, ae) => (c(), h("div", {
912
- key: V.id,
909
+ onClick: i[2] || (i[2] = (D) => a("loadEarlier"))
910
+ }, k(s(r)("reportV5.reportAi.chat.loadEarlier")), 9, ar)) : R("", !0),
911
+ (c(!0), p(ve, null, Se(z.value, (D, re) => (c(), p("div", {
912
+ key: D.id,
913
913
  class: "mb-16"
914
914
  }, [
915
- V.target ? (c(), h("p", tr, S(s(r)("reportV5.reportAi.chat.commentOn", {
916
- widget: V.target.label || s(r)("reportV5.reportAi.chat.selectedWidget")
915
+ D.target ? (c(), p("p", rr, k(s(r)("reportV5.reportAi.chat.commentOn", {
916
+ widget: D.target.label || s(r)("reportV5.reportAi.chat.selectedWidget")
917
917
  })), 1)) : R("", !0),
918
- V.role === "user" ? (c(), h("div", nr, [
919
- _("div", {
918
+ D.role === "user" ? (c(), p("div", or, [
919
+ w("div", {
920
920
  "data-testid": "report-canvas-user-message",
921
- class: Me([
921
+ class: Pe([
922
922
  "fm-typo-en-body-md-400 max-w-[90%] whitespace-pre-wrap rounded-md px-12 py-8 !leading-[21px]",
923
- B.value.has(V.id) ? "bg-fm-color-neutral-gray-100 text-fm-color-typo-secondary" : "bg-fm-color-system-info-100"
923
+ B.value.has(D.id) ? "bg-fm-color-neutral-gray-100 text-fm-color-typo-secondary" : "bg-fm-color-system-info-100"
924
924
  ])
925
- }, S(V.answer), 3),
926
- B.value.has(V.id) ? (c(), h("p", ar, [
927
- Vt(S(s(r)("reportV5.reportAi.chat.notSent")) + " ", 1),
928
- _("button", {
925
+ }, k(D.answer), 3),
926
+ B.value.has(D.id) ? (c(), p("p", ir, [
927
+ Ft(k(s(r)("reportV5.reportAi.chat.notSent")) + " ", 1),
928
+ w("button", {
929
929
  "data-testid": "chat-message-resend",
930
930
  class: "ml-4 underline disabled:opacity-50",
931
931
  disabled: n.streaming || n.busy,
932
- onClick: (xe) => a("resend", V.id)
933
- }, S(s(r)("reportV5.reportAi.chat.resend")), 9, rr)
934
- ])) : P.value.has(V.turnId) ? (c(), h("button", {
932
+ onClick: (be) => a("resend", D.id)
933
+ }, k(s(r)("reportV5.reportAi.chat.resend")), 9, sr)
934
+ ])) : F.value.has(D.turnId) ? (c(), p("button", {
935
935
  key: 1,
936
936
  "data-testid": "chat-turn-undo",
937
937
  class: "fm-typo-en-body-sm-400 mt-4 text-fm-color-typo-secondary underline disabled:opacity-50",
938
938
  disabled: n.undoing || n.streaming,
939
- onClick: (xe) => a("undo", V.turnId)
940
- }, S(s(r)("reportV5.reportCanvas.draft.undo")), 9, or)) : R("", !0)
941
- ])) : (c(), h(be, { key: 2 }, [
942
- ae === C.value || ae === Y.value ? (c(), ge(Ct, _t({
939
+ onClick: (be) => a("undo", D.turnId)
940
+ }, k(s(r)("reportV5.reportCanvas.draft.undo")), 9, lr)) : R("", !0)
941
+ ])) : (c(), p(ve, { key: 2 }, [
942
+ re === g.value || re === H.value ? (c(), me(At, St({
943
943
  key: 0,
944
944
  class: "mb-8",
945
945
  ref_for: !0
946
- }, se(ae), {
947
- onRetry: i[3] || (i[3] = (xe) => a("retry", xe)),
948
- onCheckStatus: i[4] || (i[4] = (xe) => a("checkStatus"))
946
+ }, ye(re), {
947
+ onRetry: i[3] || (i[3] = (be) => a("retry", be)),
948
+ onCheckStatus: i[4] || (i[4] = (be) => a("checkStatus"))
949
949
  }), null, 16)) : R("", !0),
950
- V.blocks.length ? (c(), ge(fa, {
950
+ D.blocks.length ? (c(), me(ma, {
951
951
  key: 1,
952
952
  "data-testid": "report-canvas-answer",
953
- blocks: V.blocks,
954
- preview: V.preview
955
- }, null, 8, ["blocks", "preview"])) : V.noSummary ? (c(), h("p", ir, S(s(r)("reportV5.reportAi.chat.noSummary")), 1)) : R("", !0),
956
- V.ms ? (c(), h("p", sr, S(s(r)("reportV5.reportAi.chat.took", { duration: s(wa)(V.ms) })), 1)) : R("", !0)
953
+ blocks: D.blocks,
954
+ preview: D.preview
955
+ }, null, 8, ["blocks", "preview"])) : D.noSummary ? (c(), p("p", fr, k(s(r)("reportV5.reportAi.chat.noSummary")), 1)) : R("", !0),
956
+ D.ms ? (c(), p("p", dr, k(s(r)("reportV5.reportAi.chat.took", { duration: s(Sa)(D.ms) })), 1)) : R("", !0)
957
957
  ], 64))
958
958
  ]))), 128)),
959
- U.value ? (c(), ge(Ct, _t({
959
+ K.value ? (c(), me(At, St({
960
960
  key: 1,
961
961
  class: "mb-16"
962
- }, se(-1), {
963
- onRetry: i[5] || (i[5] = (V) => a("retry", V)),
964
- onCheckStatus: i[6] || (i[6] = (V) => a("checkStatus"))
962
+ }, ye(-1), {
963
+ onRetry: i[5] || (i[5] = (D) => a("retry", D)),
964
+ onCheckStatus: i[6] || (i[6] = (D) => a("checkStatus"))
965
965
  }), null, 16)) : R("", !0),
966
- n.error ? (c(), h("p", lr, S(n.error), 1)) : R("", !0)
966
+ n.error ? (c(), p("p", cr, k(n.error), 1)) : R("", !0)
967
967
  ], 64))
968
968
  ], 544),
969
- u.value ? (c(), h("button", {
969
+ u.value ? (c(), p("button", {
970
970
  key: 0,
971
971
  "data-testid": "report-canvas-jump-latest",
972
972
  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",
973
973
  onClick: M
974
- }, S(s(r)("reportV5.reportAi.chat.jumpToLatest")), 1)) : R("", !0)
974
+ }, k(s(r)("reportV5.reportAi.chat.jumpToLatest")), 1)) : R("", !0)
975
975
  ])),
976
- _("div", fr, [
977
- X(oa, {
976
+ w("div", mr, [
977
+ Z(la, {
978
978
  ref_key: "composer",
979
- ref: g,
980
- draft: b.value ? I.value : n.draft,
979
+ ref: _,
980
+ draft: h.value ? I.value : n.draft,
981
981
  target: n.target,
982
982
  "target-stale": n.targetStale,
983
- streaming: n.streaming || n.switching || v.value || b.value && !!n.busy,
983
+ streaming: n.streaming || n.switching || b.value || h.value && !!n.busy,
984
984
  blank: n.blank,
985
- "onUpdate:draft": Z,
985
+ "onUpdate:draft": te,
986
986
  onSubmit: d,
987
- onClearTarget: i[7] || (i[7] = (V) => a("clearTarget"))
987
+ onClearTarget: i[7] || (i[7] = (D) => a("clearTarget"))
988
988
  }, null, 8, ["draft", "target", "target-stale", "streaming", "blank"])
989
989
  ])
990
- ], 40, Ia);
990
+ ], 40, Ta);
991
991
  };
992
992
  }
993
- }), ur = /* @__PURE__ */ mt(mr, [["__scopeId", "data-v-0840b672"]]);
994
- function Oe(o) {
995
- const { businessId: e } = Ee(Ke());
993
+ }), br = /* @__PURE__ */ ut(hr, [["__scopeId", "data-v-0840b672"]]);
994
+ function ze(o) {
995
+ const { businessId: e } = Oe(Ye());
996
996
  if (!e.value) throw new Error("Business Id is not defined");
997
997
  return `/${e.value}/report-canvas/${o}`;
998
998
  }
999
- const $t = (o) => {
999
+ const Rt = (o) => {
1000
1000
  const e = {
1001
- fetchType: ue.Get,
1002
- url: Oe(o)
1001
+ fetchType: pe.Get,
1002
+ url: ze(o)
1003
1003
  };
1004
- return me.fetch(e);
1005
- }, pr = (o, e, t, a, r) => {
1004
+ return ue.fetch(e);
1005
+ }, gr = (o, e, t, a, r) => {
1006
1006
  const m = {
1007
- fetchType: ue.Post,
1008
- url: `${Oe(o)}/query/${e}`,
1007
+ fetchType: pe.Post,
1008
+ url: `${ze(o)}/query/${e}`,
1009
1009
  // a draft-only query id does not exist on the published copy, so the state travels with it
1010
1010
  data: { params: t, timezone: a, state: r }
1011
1011
  };
1012
- return me.fetch(m);
1013
- }, hr = (o, e, t, a) => {
1012
+ return ue.fetch(m);
1013
+ }, vr = (o, e, t, a) => {
1014
1014
  const r = {
1015
- fetchType: ue.Post,
1016
- url: `${Oe(o)}/section/${e}/ack`,
1015
+ fetchType: pe.Post,
1016
+ url: `${ze(o)}/section/${e}/ack`,
1017
1017
  data: { ...t, state: a }
1018
1018
  };
1019
- return me.fetch(r);
1020
- }, br = (o) => me.fetch({
1021
- fetchType: ue.Post,
1022
- url: `${Oe(o)}/publish`,
1019
+ return ue.fetch(r);
1020
+ }, yr = (o) => ue.fetch({
1021
+ fetchType: pe.Post,
1022
+ url: `${ze(o)}/publish`,
1023
1023
  data: {}
1024
- }), gr = (o) => me.fetch({
1025
- fetchType: ue.Delete,
1026
- url: `${Oe(o)}/draft`
1027
- }), vr = (o, e) => me.fetch({
1028
- fetchType: ue.Post,
1029
- url: `${Oe(o)}/draft/undo`,
1024
+ }), xr = (o) => ue.fetch({
1025
+ fetchType: pe.Delete,
1026
+ url: `${ze(o)}/draft`
1027
+ }), wr = (o, e) => ue.fetch({
1028
+ fetchType: pe.Post,
1029
+ url: `${ze(o)}/draft/undo`,
1030
1030
  data: { turnId: e }
1031
- }), yr = (o) => me.fetch({
1032
- fetchType: ue.Get,
1033
- url: `${Oe(o)}/versions`
1034
- }), xr = (o, e) => me.fetch({
1035
- fetchType: ue.Post,
1036
- url: `${Oe(o)}/restore`,
1031
+ }), kr = (o) => ue.fetch({
1032
+ fetchType: pe.Get,
1033
+ url: `${ze(o)}/versions`
1034
+ }), _r = (o, e) => ue.fetch({
1035
+ fetchType: pe.Post,
1036
+ url: `${ze(o)}/restore`,
1037
1037
  data: { versionId: e }
1038
- }), wr = ["aria-label"], kr = { class: "flex h-64 shrink-0 items-center gap-12 border-b border-fm-color-border-secondary px-[20px]" }, _r = { class: "fm-typo-en-body-md-600 grow" }, Sr = ["aria-label", "disabled"], Ir = { class: "min-h-0 grow overflow-y-auto px-[20px] py-[20px]" }, Cr = { class: "fm-typo-en-body-md-400 mb-[20px] text-fm-color-typo-secondary" }, Ar = { class: "mb-24 rounded-[12px] border border-fm-color-border-secondary p-16" }, Tr = { class: "mb-8 flex items-center gap-8" }, Er = { class: "fm-typo-en-body-md-600 grow" }, Or = { class: "fm-typo-en-body-sm-600 rounded-md bg-fm-color-neutral-gray-100 px-8 py-4" }, zr = {
1038
+ }), Sr = ["aria-label"], Ir = { class: "flex h-64 shrink-0 items-center gap-12 border-b border-fm-color-border-secondary px-[20px]" }, Cr = { class: "fm-typo-en-body-md-600 grow" }, Ar = ["aria-label", "disabled"], Tr = { class: "min-h-0 grow overflow-y-auto px-[20px] py-[20px]" }, Er = { class: "fm-typo-en-body-md-400 mb-[20px] text-fm-color-typo-secondary" }, Or = { class: "mb-24 rounded-[12px] border border-fm-color-border-secondary p-16" }, zr = { class: "mb-8 flex items-center gap-8" }, Nr = { class: "fm-typo-en-body-md-600 grow" }, $r = { class: "fm-typo-en-body-sm-600 rounded-md bg-fm-color-neutral-gray-100 px-8 py-4" }, Rr = {
1039
1039
  key: 0,
1040
1040
  class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
1041
- }, Nr = ["aria-label"], $r = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Rr = {
1041
+ }, Lr = ["aria-label"], Mr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Pr = {
1042
1042
  key: 1,
1043
1043
  role: "alert",
1044
1044
  class: "rounded-[12px] border border-fm-color-border-secondary p-[20px]"
1045
- }, Lr = { class: "fm-typo-en-body-md-600 mb-8" }, Mr = { class: "fm-typo-en-body-md-400 mb-16 text-fm-color-typo-secondary" }, Pr = {
1045
+ }, Dr = { class: "fm-typo-en-body-md-600 mb-8" }, jr = { class: "fm-typo-en-body-md-400 mb-16 text-fm-color-typo-secondary" }, Vr = {
1046
1046
  key: 2,
1047
1047
  class: "flex flex-col items-center rounded-[12px] bg-fm-color-neutral-gray-50 px-16 py-32 text-center"
1048
- }, Dr = { class: "fm-typo-en-body-md-600 mb-8" }, jr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Vr = { class: "fm-typo-en-body-sm-600 mb-12 text-fm-color-typo-secondary" }, Fr = { class: "ml-4 border-l border-fm-color-border-secondary pl-16" }, Br = ["aria-expanded", "aria-controls", "aria-current", "disabled", "onClick"], qr = { class: "mb-4 flex items-center gap-8" }, Ur = ["datetime", "title"], Hr = {
1048
+ }, Fr = { class: "fm-typo-en-body-md-600 mb-8" }, Br = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, qr = { class: "fm-typo-en-body-sm-600 mb-12 text-fm-color-typo-secondary" }, Ur = { class: "ml-4 border-l border-fm-color-border-secondary pl-16" }, Hr = ["aria-expanded", "aria-controls", "aria-current", "disabled", "onClick"], Wr = { class: "mb-4 flex items-center gap-8" }, Gr = ["datetime", "title"], Yr = {
1049
1049
  key: 0,
1050
1050
  "data-testid": "canvas-version-current",
1051
1051
  class: "fm-typo-en-body-sm-600 rounded-md bg-fm-color-neutral-gray-100 px-8 py-4 text-fm-color-typo-secondary"
1052
- }, Wr = {
1052
+ }, Kr = {
1053
1053
  key: 0,
1054
1054
  class: "fm-typo-en-body-md-600 block break-words text-fm-color-typo-secondary"
1055
- }, Gr = { class: "fm-typo-en-body-md-400 line-clamp-3 block break-words" }, Yr = {
1055
+ }, Jr = { class: "fm-typo-en-body-md-400 line-clamp-3 block break-words" }, Xr = {
1056
1056
  "data-testid": "canvas-version-author",
1057
1057
  class: "mt-8 flex items-center gap-8 text-fm-color-typo-secondary"
1058
- }, Kr = { class: "fm-typo-en-body-sm-400 line-clamp-1 break-words" }, Jr = { class: "shrink-0 border-t border-fm-color-border-secondary p-[20px]" }, Xr = { class: "fm-typo-en-body-sm-400 mb-4 text-fm-color-typo-secondary" }, Qr = { class: "fm-typo-en-body-md-400 mb-16 max-h-[120px] overflow-y-auto whitespace-pre-wrap break-words" }, Zr = {
1058
+ }, Qr = { class: "fm-typo-en-body-sm-400 line-clamp-1 break-words" }, Zr = { class: "shrink-0 border-t border-fm-color-border-secondary p-[20px]" }, eo = { class: "fm-typo-en-body-sm-400 mb-4 text-fm-color-typo-secondary" }, to = { class: "fm-typo-en-body-md-400 mb-16 max-h-[120px] overflow-y-auto whitespace-pre-wrap break-words" }, no = {
1059
1059
  key: 0,
1060
1060
  role: "alert",
1061
1061
  class: "fm-typo-en-body-md-400 mb-12 text-fm-color-typo-error"
1062
- }, eo = {
1062
+ }, ao = {
1063
1063
  key: 1,
1064
1064
  class: "fm-typo-en-body-md-400 mb-12 text-fm-color-typo-secondary"
1065
- }, to = {
1065
+ }, ro = {
1066
1066
  key: 2,
1067
1067
  class: "flex items-center justify-end gap-8"
1068
- }, no = ["disabled"], ao = {
1068
+ }, oo = ["disabled"], io = {
1069
1069
  key: 1,
1070
1070
  class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
1071
- }, ro = { class: "fm-typo-en-body-sm-400 mt-12 text-fm-color-typo-secondary" }, oo = /* @__PURE__ */ De({
1071
+ }, so = { class: "fm-typo-en-body-sm-400 mt-12 text-fm-color-typo-secondary" }, lo = /* @__PURE__ */ je({
1072
1072
  __name: "ReportCanvasHistory",
1073
1073
  props: {
1074
1074
  reportId: {},
@@ -1079,259 +1079,259 @@ const $t = (o) => {
1079
1079
  },
1080
1080
  emits: ["close", "restored", "restoring"],
1081
1081
  setup(o, { emit: e }) {
1082
- const t = o, a = e, { t: r, locale: m } = je(), b = (y, u = {}) => r(`reportV5.reportCanvas.history.${y}`, u), w = A([]), I = A(!0), v = A(!1), L = A(!1), k = A(!1), N = A(!1), T = A(), W = A(), D = A(), K = A(), q = j(() => w.value.find((y) => y.id === T.value)), E = j(() => t.hasDraft || t.busy || k.value);
1082
+ const t = o, a = e, { t: r, locale: m } = Ve(), h = (C, u = {}) => r(`reportV5.reportCanvas.history.${C}`, u), y = T([]), I = T(!0), b = T(!1), L = T(!1), x = T(!1), N = T(!1), E = T(), W = T(), j = T(), Y = T(), U = V(() => y.value.find((C) => C.id === E.value)), O = V(() => t.hasDraft || t.busy || x.value);
1083
1083
  let G = !0, J = null;
1084
- function P(y, u) {
1085
- const O = new Date(y);
1086
- return Number.isFinite(O.getTime()) ? new Intl.DateTimeFormat(m.value, { ...u, timeZone: t.timezone }).format(
1087
- O
1088
- ) : b("unknownDate");
1089
- }
1090
- const B = (y) => P(y, { dateStyle: "medium", timeStyle: "short" }), g = (y) => P(y, { hour: "numeric", minute: "2-digit", second: "2-digit" }), z = (y) => P(y, { year: "numeric", month: "2-digit", day: "2-digit" });
1091
- function C(y) {
1092
- return z(y) === z((/* @__PURE__ */ new Date()).toISOString()) ? b("today") : P(y, { month: "long", day: "numeric", year: "numeric" });
1093
- }
1094
- const Y = j(() => {
1095
- const y = [];
1096
- for (const u of [...w.value].sort((O, M) => Date.parse(M.at) - Date.parse(O.at))) {
1097
- const O = z(u.at), M = y.find((d) => d.key === O);
1098
- M ? M.versions.push(u) : y.push({ key: O, label: C(u.at), versions: [u] });
1084
+ function F(C, u) {
1085
+ const S = new Date(C);
1086
+ return Number.isFinite(S.getTime()) ? new Intl.DateTimeFormat(m.value, { ...u, timeZone: t.timezone }).format(
1087
+ S
1088
+ ) : h("unknownDate");
1089
+ }
1090
+ const B = (C) => F(C, { dateStyle: "medium", timeStyle: "short" }), _ = (C) => F(C, { hour: "numeric", minute: "2-digit", second: "2-digit" }), z = (C) => F(C, { year: "numeric", month: "2-digit", day: "2-digit" });
1091
+ function g(C) {
1092
+ return z(C) === z((/* @__PURE__ */ new Date()).toISOString()) ? h("today") : F(C, { month: "long", day: "numeric", year: "numeric" });
1093
+ }
1094
+ const H = V(() => {
1095
+ const C = [];
1096
+ for (const u of [...y.value].sort((S, M) => Date.parse(M.at) - Date.parse(S.at))) {
1097
+ const S = z(u.at), M = C.find((d) => d.key === S);
1098
+ M ? M.versions.push(u) : C.push({ key: S, label: g(u.at), versions: [u] });
1099
1099
  }
1100
- return y;
1101
- }), U = (y) => {
1100
+ return C;
1101
+ }), K = (C) => {
1102
1102
  var u;
1103
- return y.id === ((u = w.value[0]) == null ? void 0 : u.id);
1104
- }, te = (y) => y.prompt.trim() || b("noPrompt"), re = (y) => y.restoredFrom ? b("restoredFrom", { at: B(y.restoredFrom) }) : "", de = (y) => [re(y), te(y)].filter(Boolean).join(" "), ie = (y) => {
1105
- var u, O;
1106
- return ((u = y.author) == null ? void 0 : u.name) || ((O = y.author) == null ? void 0 : O.email) || b("unknownUser");
1103
+ return C.id === ((u = y.value[0]) == null ? void 0 : u.id);
1104
+ }, ee = (C) => C.prompt.trim() || h("noPrompt"), X = (C) => C.restoredFrom ? h("restoredFrom", { at: B(C.restoredFrom) }) : "", se = (C) => [X(C), ee(C)].filter(Boolean).join(" "), ce = (C) => {
1105
+ var u, S;
1106
+ return ((u = C.author) == null ? void 0 : u.name) || ((S = C.author) == null ? void 0 : S.email) || h("unknownUser");
1107
1107
  };
1108
- async function se() {
1109
- I.value = !0, v.value = !1;
1108
+ async function ye() {
1109
+ I.value = !0, b.value = !1;
1110
1110
  try {
1111
- const y = await yr(t.reportId);
1112
- G && (w.value = y);
1111
+ const C = await kr(t.reportId);
1112
+ G && (y.value = C);
1113
1113
  } catch {
1114
- G && (v.value = !0);
1114
+ G && (b.value = !0);
1115
1115
  } finally {
1116
1116
  G && (I.value = !1);
1117
1117
  }
1118
1118
  }
1119
- function ve(y) {
1120
- k.value || U(y) || (T.value = T.value === y.id ? void 0 : y.id, N.value = !1, L.value = !1);
1119
+ function he(C) {
1120
+ x.value || K(C) || (E.value = E.value === C.id ? void 0 : C.id, N.value = !1, L.value = !1);
1121
1121
  }
1122
- async function pe() {
1123
- var y;
1124
- !q.value || E.value || (N.value = !0, await $e(), (y = D.value) == null || y.focus());
1122
+ async function le() {
1123
+ var C;
1124
+ !U.value || O.value || (N.value = !0, await Ee(), (C = j.value) == null || C.focus());
1125
1125
  }
1126
- async function ce() {
1127
- var y;
1128
- N.value = !1, L.value = !1, await $e(), (y = K.value) == null || y.focus();
1126
+ async function oe() {
1127
+ var C;
1128
+ N.value = !1, L.value = !1, await Ee(), (C = Y.value) == null || C.focus();
1129
1129
  }
1130
- async function Z() {
1131
- if (!(!q.value || E.value || !N.value)) {
1132
- k.value = !0, a("restoring", !0), L.value = !1;
1130
+ async function te() {
1131
+ if (!(!U.value || O.value || !N.value)) {
1132
+ x.value = !0, a("restoring", !0), L.value = !1;
1133
1133
  try {
1134
- const y = await xr(t.reportId, q.value.id);
1135
- G && a("restored", y);
1134
+ const C = await _r(t.reportId, U.value.id);
1135
+ G && a("restored", C);
1136
1136
  } catch {
1137
1137
  G && (L.value = !0);
1138
1138
  } finally {
1139
- k.value = !1, a("restoring", !1);
1139
+ x.value = !1, a("restoring", !1);
1140
1140
  }
1141
1141
  }
1142
1142
  }
1143
- function ye(y) {
1144
- y.key === "Escape" && (y.stopPropagation(), !k.value && (N.value ? ce() : a("close")));
1143
+ function xe(C) {
1144
+ C.key === "Escape" && (C.stopPropagation(), !x.value && (N.value ? oe() : a("close")));
1145
1145
  }
1146
- return fe(E, (y) => {
1147
- y && !k.value && (N.value = !1);
1148
- }), Le(() => {
1149
- var y;
1150
- J = document.activeElement, (y = W.value) == null || y.focus(), se();
1151
- }), Pe(() => {
1146
+ return de(O, (C) => {
1147
+ C && !x.value && (N.value = !1);
1148
+ }), Me(() => {
1149
+ var C;
1150
+ J = document.activeElement, (C = W.value) == null || C.focus(), ye();
1151
+ }), De(() => {
1152
1152
  G = !1, J == null || J.focus();
1153
- }), (y, u) => {
1154
- const O = Ie("FmIcon"), M = Ie("FmButton"), d = Ie("FmAvatar");
1155
- return c(), h("aside", {
1153
+ }), (C, u) => {
1154
+ const S = Ie("FmIcon"), M = Ie("FmButton"), d = Ie("FmAvatar");
1155
+ return c(), p("aside", {
1156
1156
  "data-testid": "canvas-versions",
1157
1157
  class: "flex h-full min-h-0 flex-col border-l border-fm-color-border-secondary bg-fm-color-neutral-white text-fm-color-typo-primary",
1158
- "aria-label": b("title"),
1159
- onKeydown: ye
1158
+ "aria-label": h("title"),
1159
+ onKeydown: xe
1160
1160
  }, [
1161
- _("header", kr, [
1162
- X(O, {
1161
+ w("header", Ir, [
1162
+ Z(S, {
1163
1163
  name: "history",
1164
1164
  size: "md",
1165
1165
  class: "text-fm-color-typo-secondary"
1166
1166
  }),
1167
- _("h2", _r, S(b("title")), 1),
1168
- _("button", {
1167
+ w("h2", Cr, k(h("title")), 1),
1168
+ w("button", {
1169
1169
  ref_key: "closeButton",
1170
1170
  ref: W,
1171
1171
  "data-testid": "canvas-versions-close",
1172
1172
  class: "history-button flex h-[36px] w-[36px] items-center justify-center rounded-md text-fm-color-typo-secondary",
1173
- "aria-label": b("close"),
1174
- disabled: k.value,
1173
+ "aria-label": h("close"),
1174
+ disabled: x.value,
1175
1175
  onClick: u[0] || (u[0] = (n) => a("close"))
1176
1176
  }, [
1177
- X(O, {
1177
+ Z(S, {
1178
1178
  name: "close",
1179
1179
  size: "md"
1180
1180
  })
1181
- ], 8, Sr)
1181
+ ], 8, Ar)
1182
1182
  ]),
1183
- _("div", Ir, [
1184
- _("p", Cr, S(b("intro")), 1),
1185
- _("div", Ar, [
1186
- _("div", Tr, [
1187
- u[1] || (u[1] = _("span", {
1183
+ w("div", Tr, [
1184
+ w("p", Er, k(h("intro")), 1),
1185
+ w("div", Or, [
1186
+ w("div", zr, [
1187
+ u[1] || (u[1] = w("span", {
1188
1188
  class: "h-8 w-8 rounded-full bg-fm-color-primary",
1189
1189
  "aria-hidden": "true"
1190
1190
  }, null, -1)),
1191
- _("span", Er, S(b("current")), 1),
1192
- _("span", Or, S(b("published")), 1)
1191
+ w("span", Nr, k(h("current")), 1),
1192
+ w("span", $r, k(h("published")), 1)
1193
1193
  ]),
1194
- y.publishedAt ? (c(), h("p", zr, S(B(y.publishedAt)), 1)) : R("", !0)
1194
+ C.publishedAt ? (c(), p("p", Rr, k(B(C.publishedAt)), 1)) : R("", !0)
1195
1195
  ]),
1196
- I.value ? (c(), h("div", {
1196
+ I.value ? (c(), p("div", {
1197
1197
  key: 0,
1198
1198
  role: "status",
1199
1199
  class: "space-y-16",
1200
- "aria-label": b("loading")
1200
+ "aria-label": h("loading")
1201
1201
  }, [
1202
- _("p", $r, S(b("loading")), 1),
1203
- (c(), h(be, null, Se(3, (n) => _("div", {
1202
+ w("p", Mr, k(h("loading")), 1),
1203
+ (c(), p(ve, null, Se(3, (n) => w("div", {
1204
1204
  key: n,
1205
1205
  class: "rounded-lg border border-fm-color-border-secondary p-16",
1206
1206
  "aria-hidden": "true"
1207
1207
  }, u[2] || (u[2] = [
1208
- _("div", { class: "mb-12 h-12 w-1/3 rounded bg-fm-color-neutral-gray-100" }, null, -1),
1209
- _("div", { class: "h-12 w-3/4 rounded bg-fm-color-neutral-gray-100" }, null, -1)
1208
+ w("div", { class: "mb-12 h-12 w-1/3 rounded bg-fm-color-neutral-gray-100" }, null, -1),
1209
+ w("div", { class: "h-12 w-3/4 rounded bg-fm-color-neutral-gray-100" }, null, -1)
1210
1210
  ]))), 64))
1211
- ], 8, Nr)) : v.value ? (c(), h("div", Rr, [
1212
- _("p", Lr, S(b("loadFailed")), 1),
1213
- _("p", Mr, S(b("loadFailedHint")), 1),
1214
- X(M, {
1211
+ ], 8, Lr)) : b.value ? (c(), p("div", Pr, [
1212
+ w("p", Dr, k(h("loadFailed")), 1),
1213
+ w("p", jr, k(h("loadFailedHint")), 1),
1214
+ Z(M, {
1215
1215
  variant: "secondary",
1216
- label: b("retry"),
1217
- onClick: se
1216
+ label: h("retry"),
1217
+ onClick: ye
1218
1218
  }, null, 8, ["label"])
1219
- ])) : w.value.length ? R("", !0) : (c(), h("div", Pr, [
1220
- X(O, {
1219
+ ])) : y.value.length ? R("", !0) : (c(), p("div", Vr, [
1220
+ Z(S, {
1221
1221
  name: "history",
1222
1222
  size: "lg",
1223
1223
  class: "mb-12 text-fm-color-typo-secondary"
1224
1224
  }),
1225
- _("p", Dr, S(b("empty")), 1),
1226
- _("p", jr, S(b("emptyHint")), 1)
1225
+ w("p", Fr, k(h("empty")), 1),
1226
+ w("p", Br, k(h("emptyHint")), 1)
1227
1227
  ])),
1228
- (c(!0), h(be, null, Se(I.value || v.value ? [] : Y.value, (n) => (c(), h("section", {
1228
+ (c(!0), p(ve, null, Se(I.value || b.value ? [] : H.value, (n) => (c(), p("section", {
1229
1229
  key: n.key,
1230
1230
  class: "mb-[20px]"
1231
1231
  }, [
1232
- _("h3", Vr, S(n.label), 1),
1233
- _("ul", Fr, [
1234
- (c(!0), h(be, null, Se(n.versions, (i) => {
1235
- var f, p, $;
1236
- return c(), h("li", {
1232
+ w("h3", qr, k(n.label), 1),
1233
+ w("ul", Ur, [
1234
+ (c(!0), p(ve, null, Se(n.versions, (i) => {
1235
+ var f, A, P;
1236
+ return c(), p("li", {
1237
1237
  key: i.id,
1238
1238
  "data-testid": "canvas-version-row",
1239
1239
  class: "relative mb-8"
1240
1240
  }, [
1241
- u[3] || (u[3] = _("span", {
1241
+ u[3] || (u[3] = w("span", {
1242
1242
  class: "history-dot absolute top-[20px] h-8 w-8 rounded-full border border-fm-color-border-secondary bg-fm-color-neutral-white",
1243
1243
  "aria-hidden": "true"
1244
1244
  }, null, -1)),
1245
- _("button", {
1246
- class: Me([
1245
+ w("button", {
1246
+ class: Pe([
1247
1247
  "history-button w-full rounded-lg border p-12 text-left",
1248
- T.value === i.id ? "border-fm-color-primary bg-fm-color-primary-50" : "border-transparent"
1248
+ E.value === i.id ? "border-fm-color-primary bg-fm-color-primary-50" : "border-transparent"
1249
1249
  ]),
1250
- "aria-expanded": T.value === i.id,
1251
- "aria-controls": T.value === i.id ? "canvas-version-details" : void 0,
1252
- "aria-current": U(i) ? "true" : void 0,
1253
- disabled: k.value || U(i),
1254
- onClick: (H) => ve(i)
1250
+ "aria-expanded": E.value === i.id,
1251
+ "aria-controls": E.value === i.id ? "canvas-version-details" : void 0,
1252
+ "aria-current": K(i) ? "true" : void 0,
1253
+ disabled: x.value || K(i),
1254
+ onClick: ($) => he(i)
1255
1255
  }, [
1256
- _("span", qr, [
1257
- _("time", {
1256
+ w("span", Wr, [
1257
+ w("time", {
1258
1258
  datetime: i.at,
1259
1259
  title: B(i.at),
1260
1260
  class: "fm-typo-en-body-sm-400 grow text-fm-color-typo-secondary"
1261
- }, S(g(i.at)), 9, Ur),
1262
- U(i) ? (c(), h("span", Hr, S(b("currentBadge")), 1)) : T.value === i.id ? (c(), ge(O, {
1261
+ }, k(_(i.at)), 9, Gr),
1262
+ K(i) ? (c(), p("span", Yr, k(h("currentBadge")), 1)) : E.value === i.id ? (c(), me(S, {
1263
1263
  key: 1,
1264
1264
  name: "check",
1265
1265
  size: "sm",
1266
1266
  class: "text-fm-color-primary"
1267
1267
  })) : R("", !0)
1268
1268
  ]),
1269
- re(i) ? (c(), h("span", Wr, S(re(i)), 1)) : R("", !0),
1270
- _("span", Gr, S(te(i)), 1),
1271
- _("span", Yr, [
1272
- X(d, {
1269
+ X(i) ? (c(), p("span", Kr, k(X(i)), 1)) : R("", !0),
1270
+ w("span", Jr, k(ee(i)), 1),
1271
+ w("span", Xr, [
1272
+ Z(d, {
1273
1273
  size: "sm",
1274
- name: ((f = i.author) == null ? void 0 : f.name) || ((p = i.author) == null ? void 0 : p.email) || "?",
1275
- src: ($ = i.author) == null ? void 0 : $.photoUrl
1274
+ name: ((f = i.author) == null ? void 0 : f.name) || ((A = i.author) == null ? void 0 : A.email) || "?",
1275
+ src: (P = i.author) == null ? void 0 : P.photoUrl
1276
1276
  }, null, 8, ["name", "src"]),
1277
- _("span", Kr, S(ie(i)), 1)
1277
+ w("span", Qr, k(ce(i)), 1)
1278
1278
  ])
1279
- ], 10, Br)
1279
+ ], 10, Hr)
1280
1280
  ]);
1281
1281
  }), 128))
1282
1282
  ])
1283
1283
  ]))), 128))
1284
1284
  ]),
1285
- _("footer", Jr, [
1286
- q.value ? (c(), h("div", {
1285
+ w("footer", Zr, [
1286
+ U.value ? (c(), p("div", {
1287
1287
  key: 0,
1288
1288
  id: "canvas-version-details",
1289
1289
  ref_key: "details",
1290
- ref: K,
1290
+ ref: Y,
1291
1291
  tabindex: "-1",
1292
1292
  class: "history-details"
1293
1293
  }, [
1294
- _("p", Xr, S(b("savedBy", { user: ie(q.value), at: B(q.value.at) })), 1),
1295
- _("p", Qr, S(N.value ? b("confirmHint") : de(q.value)), 1),
1296
- L.value ? (c(), h("p", Zr, S(b("restoreFailed")), 1)) : R("", !0),
1297
- y.hasDraft || y.busy ? (c(), h("p", eo, S(b(y.hasDraft ? "draftHint" : "busyHint")), 1)) : R("", !0),
1298
- N.value ? (c(), h("div", to, [
1299
- _("button", {
1294
+ w("p", eo, k(h("savedBy", { user: ce(U.value), at: B(U.value.at) })), 1),
1295
+ w("p", to, k(N.value ? h("confirmHint") : se(U.value)), 1),
1296
+ L.value ? (c(), p("p", no, k(h("restoreFailed")), 1)) : R("", !0),
1297
+ C.hasDraft || C.busy ? (c(), p("p", ao, k(h(C.hasDraft ? "draftHint" : "busyHint")), 1)) : R("", !0),
1298
+ N.value ? (c(), p("div", ro, [
1299
+ w("button", {
1300
1300
  ref_key: "cancelButton",
1301
- ref: D,
1301
+ ref: j,
1302
1302
  class: "history-button fm-typo-en-body-md-600 rounded-lg px-16 py-12",
1303
- disabled: k.value,
1304
- onClick: ce
1305
- }, S(b("cancel")), 9, no),
1306
- X(M, {
1303
+ disabled: x.value,
1304
+ onClick: oe
1305
+ }, k(h("cancel")), 9, oo),
1306
+ Z(M, {
1307
1307
  "data-testid": "canvas-version-confirm",
1308
1308
  variant: "primary",
1309
- label: b(k.value ? "restoring" : "confirm"),
1310
- disabled: E.value,
1311
- onClick: Z
1309
+ label: h(x.value ? "restoring" : "confirm"),
1310
+ disabled: O.value,
1311
+ onClick: te
1312
1312
  }, null, 8, ["label", "disabled"])
1313
- ])) : (c(), ge(M, {
1313
+ ])) : (c(), me(M, {
1314
1314
  key: 3,
1315
1315
  "data-testid": "canvas-version-restore",
1316
1316
  class: "w-full",
1317
1317
  variant: "primary",
1318
1318
  "prepend-icon": "restore",
1319
- label: b("restore"),
1320
- disabled: E.value,
1321
- onClick: pe
1319
+ label: h("restore"),
1320
+ disabled: O.value,
1321
+ onClick: le
1322
1322
  }, null, 8, ["label", "disabled"]))
1323
- ], 512)) : (c(), h("p", ao, S(b("selectHint")), 1)),
1324
- _("p", ro, S(b("timezone", { timezone: y.timezone })), 1)
1323
+ ], 512)) : (c(), p("p", io, k(h("selectHint")), 1)),
1324
+ w("p", so, k(h("timezone", { timezone: C.timezone })), 1)
1325
1325
  ])
1326
- ], 40, wr);
1326
+ ], 40, Sr);
1327
1327
  };
1328
1328
  }
1329
- }), io = /* @__PURE__ */ mt(oo, [["__scopeId", "data-v-7df5ac71"]]), so = ["@from", "@to", "@locationIds", "@timezone"], st = ["@from", "@to", "@locationIds"], lo = ["@timezone"], fo = ["@locationIds"], co = 1, mo = 1500;
1330
- function uo(o) {
1331
- if (!(!(o instanceof xn) || o.status !== 429))
1332
- return Math.min(Math.max(o.retryAfterMs ?? mo, 500), 5e3);
1329
+ }), fo = /* @__PURE__ */ ut(lo, [["__scopeId", "data-v-7df5ac71"]]), co = ["@from", "@to", "@locationIds", "@timezone"], lt = ["@from", "@to", "@locationIds"], mo = ["@timezone"], uo = ["@locationIds"], po = 1, ho = 1500;
1330
+ function bo(o) {
1331
+ if (!(!(o instanceof kn) || o.status !== 429))
1332
+ return Math.min(Math.max(o.retryAfterMs ?? ho, 500), 5e3);
1333
1333
  }
1334
- const po = {
1334
+ const go = {
1335
1335
  MY: "MYR",
1336
1336
  SG: "SGD",
1337
1337
  TH: "THB",
@@ -1349,66 +1349,66 @@ const po = {
1349
1349
  TW: "TWD",
1350
1350
  HK: "HKD"
1351
1351
  };
1352
- function Rt(o) {
1352
+ function Lt(o) {
1353
1353
  return o == null ? !0 : Array.isArray(o) ? o.length === 0 : o === "";
1354
1354
  }
1355
- function ho(o) {
1356
- const e = ut(), { dateRange: t, selectedLocationIds: a, locations: r, timezone: m } = Ee(e), { country: b } = Ee(Ke()), w = A({}), I = A([]), v = A({}), L = hn({}), k = A(), N = A([]), T = [], W = [], D = { ids: "[]", date: "" };
1357
- let K = !1;
1358
- const q = {}, E = {};
1355
+ function vo(o) {
1356
+ const e = pt(), { dateRange: t, selectedLocationIds: a, locations: r, timezone: m } = Oe(e), { country: h } = Oe(Ye()), y = T({}), I = T([]), b = T({}), L = gn({}), x = T(), N = T([]), E = [], W = [], j = { ids: "[]", date: "" };
1357
+ let Y = !1;
1358
+ const U = {}, O = {};
1359
1359
  function G(u) {
1360
- T.push(u);
1360
+ E.push(u);
1361
1361
  }
1362
1362
  function J(u) {
1363
1363
  W.push(u);
1364
1364
  }
1365
- function P(u) {
1366
- L.value = { ...L.value, [u.queryId]: u }, T.forEach((O) => O(u));
1365
+ function F(u) {
1366
+ L.value = { ...L.value, [u.queryId]: u }, E.forEach((S) => S(u));
1367
1367
  }
1368
1368
  function B(u) {
1369
- const O = {};
1369
+ const S = {};
1370
1370
  for (const M of u.params)
1371
- O[M.name] = M.default ?? null;
1372
- O["@from"] = t.value.startDate ?? null, O["@to"] = t.value.endDate ?? null, O["@timezone"] = m.value, O["@locationIds"] = [...a.value], w.value = O, v.value = {}, C();
1371
+ S[M.name] = M.default ?? null;
1372
+ S["@from"] = t.value.startDate ?? null, S["@to"] = t.value.endDate ?? null, S["@timezone"] = m.value, S["@locationIds"] = [...a.value], y.value = S, b.value = {}, g();
1373
1373
  }
1374
- function g() {
1374
+ function _() {
1375
1375
  return r.value.map((u) => u.id);
1376
1376
  }
1377
1377
  function z() {
1378
1378
  return { startDate: t.value.startDate, endDate: t.value.endDate };
1379
1379
  }
1380
- function C() {
1381
- D.ids = JSON.stringify([...a.value]), D.date = JSON.stringify(z());
1380
+ function g() {
1381
+ j.ids = JSON.stringify([...a.value]), j.date = JSON.stringify(z());
1382
1382
  }
1383
- function Y() {
1384
- const u = w.value["@from"], O = w.value["@to"];
1385
- if (typeof u == "string" || typeof O == "string") {
1383
+ function H() {
1384
+ const u = y.value["@from"], S = y.value["@to"];
1385
+ if (typeof u == "string" || typeof S == "string") {
1386
1386
  const d = {
1387
1387
  startDate: typeof u == "string" ? u : void 0,
1388
- endDate: typeof O == "string" ? O : void 0
1388
+ endDate: typeof S == "string" ? S : void 0
1389
1389
  };
1390
1390
  JSON.stringify(d) !== JSON.stringify(z()) && (t.value = d);
1391
1391
  }
1392
- const M = w.value["@locationIds"];
1392
+ const M = y.value["@locationIds"];
1393
1393
  if (Array.isArray(M)) {
1394
1394
  const d = M.map(String);
1395
1395
  JSON.stringify(d) !== JSON.stringify(a.value) && (a.value = d);
1396
1396
  }
1397
- C();
1397
+ g();
1398
1398
  }
1399
- function U() {
1400
- const u = [...a.value], O = {}, M = { ...v.value };
1401
- JSON.stringify(z()) !== D.date && (O["@from"] = t.value.startDate ?? null, O["@to"] = t.value.endDate ?? null), JSON.stringify(u) !== D.ids ? (O["@locationIds"] = u, delete M["@locationIds"]) : M["@locationIds"] === "all" && (O["@locationIds"] = g()), Object.keys(O).length && Z(O, M);
1399
+ function K() {
1400
+ const u = [...a.value], S = {}, M = { ...b.value };
1401
+ JSON.stringify(z()) !== j.date && (S["@from"] = t.value.startDate ?? null, S["@to"] = t.value.endDate ?? null), JSON.stringify(u) !== j.ids ? (S["@locationIds"] = u, delete M["@locationIds"]) : M["@locationIds"] === "all" && (S["@locationIds"] = _()), Object.keys(S).length && te(S, M);
1402
1402
  }
1403
- function te() {
1404
- fe([t, a, r], () => {
1405
- K && U();
1403
+ function ee() {
1404
+ de([t, a, r], () => {
1405
+ Y && K();
1406
1406
  });
1407
1407
  }
1408
- function re() {
1409
- return { values: w.value, decls: I.value, intent: v.value };
1408
+ function X() {
1409
+ return { values: y.value, decls: I.value, intent: b.value };
1410
1410
  }
1411
- function de() {
1411
+ function se() {
1412
1412
  return {
1413
1413
  locations: r.value.map((u) => ({
1414
1414
  id: u.id,
@@ -1418,26 +1418,26 @@ function ho(o) {
1418
1418
  timezone: m.value,
1419
1419
  // The portal's locale, not the browser's: the frame sets documentElement.lang from this,
1420
1420
  // and Rebus switches its line-height metrics on :lang(zh) / :lang(th).
1421
- locale: Sn() || "en-US",
1422
- currency: po[(b.value || "").toUpperCase()] ?? ""
1421
+ locale: An() || "en-US",
1422
+ currency: go[(h.value || "").toUpperCase()] ?? ""
1423
1423
  };
1424
1424
  }
1425
- function ie(u, O) {
1426
- return JSON.stringify(u.dependsOn.map((M) => O[M] ?? null));
1425
+ function ce(u, S) {
1426
+ return JSON.stringify(u.dependsOn.map((M) => S[M] ?? null));
1427
1427
  }
1428
- function se(u, O) {
1428
+ function ye(u, S) {
1429
1429
  return u.lazy ? u.dependsOn.some((M) => {
1430
1430
  const d = I.value.find((n) => n.name === M);
1431
- return ((d == null ? void 0 : d.default) ?? null) === null && Rt(O[M] ?? null);
1431
+ return ((d == null ? void 0 : d.default) ?? null) === null && Lt(S[M] ?? null);
1432
1432
  }) : !1;
1433
1433
  }
1434
- function ve(u) {
1435
- return !st.some((O) => O in u && Rt(u[O] ?? null));
1434
+ function he(u) {
1435
+ return !lt.some((S) => S in u && Lt(u[S] ?? null));
1436
1436
  }
1437
- async function pe(u, O) {
1437
+ async function le(u, S) {
1438
1438
  var d;
1439
- const M = (q[u.id] ?? 0) + 1;
1440
- q[u.id] = M, P({
1439
+ const M = (U[u.id] ?? 0) + 1;
1440
+ U[u.id] = M, F({
1441
1441
  queryId: u.id,
1442
1442
  runId: M,
1443
1443
  status: "loading",
@@ -1446,15 +1446,15 @@ function ho(o) {
1446
1446
  });
1447
1447
  for (let n = 0; ; n++)
1448
1448
  try {
1449
- const i = await pr(
1449
+ const i = await gr(
1450
1450
  o,
1451
1451
  u.id,
1452
- O,
1452
+ S,
1453
1453
  m.value,
1454
- k.value
1454
+ x.value
1455
1455
  );
1456
- if (q[u.id] !== M) return;
1457
- P({
1456
+ if (U[u.id] !== M) return;
1457
+ F({
1458
1458
  queryId: u.id,
1459
1459
  runId: M,
1460
1460
  status: "ok",
@@ -1463,13 +1463,13 @@ function ho(o) {
1463
1463
  });
1464
1464
  return;
1465
1465
  } catch (i) {
1466
- if (q[u.id] !== M) return;
1467
- const f = uo(i);
1468
- if (f !== void 0 && n < co) {
1469
- if (await new Promise((p) => setTimeout(p, f)), q[u.id] !== M) return;
1466
+ if (U[u.id] !== M) return;
1467
+ const f = bo(i);
1468
+ if (f !== void 0 && n < po) {
1469
+ if (await new Promise((A) => setTimeout(A, f)), U[u.id] !== M) return;
1470
1470
  continue;
1471
1471
  }
1472
- P({
1472
+ F({
1473
1473
  queryId: u.id,
1474
1474
  runId: M,
1475
1475
  status: "error",
@@ -1480,90 +1480,90 @@ function ho(o) {
1480
1480
  return;
1481
1481
  }
1482
1482
  }
1483
- function ce(u = {}) {
1483
+ function oe(u = {}) {
1484
1484
  var d, n, i;
1485
- const O = { ...w.value }, M = !ve(O);
1485
+ const S = { ...y.value }, M = !he(S);
1486
1486
  for (const f of N.value) {
1487
- const p = M && f.dependsOn.some((H) => st.includes(H));
1488
- if (se(f, O)) {
1489
- delete E[f.id], ((d = L.value[f.id]) == null ? void 0 : d.status) !== "idle" && P({
1487
+ const A = M && f.dependsOn.some(($) => lt.includes($));
1488
+ if (ye(f, S)) {
1489
+ delete O[f.id], ((d = L.value[f.id]) == null ? void 0 : d.status) !== "idle" && F({
1490
1490
  queryId: f.id,
1491
- runId: q[f.id] ?? 0,
1491
+ runId: U[f.id] ?? 0,
1492
1492
  status: "idle",
1493
1493
  rows: [],
1494
1494
  truncated: !1
1495
1495
  });
1496
1496
  continue;
1497
1497
  }
1498
- if (p) {
1499
- ((n = L.value[f.id]) == null ? void 0 : n.status) !== "loading" && P({
1498
+ if (A) {
1499
+ ((n = L.value[f.id]) == null ? void 0 : n.status) !== "loading" && F({
1500
1500
  queryId: f.id,
1501
- runId: q[f.id] ?? 0,
1501
+ runId: U[f.id] ?? 0,
1502
1502
  status: "loading",
1503
1503
  rows: ((i = L.value[f.id]) == null ? void 0 : i.rows) ?? [],
1504
1504
  truncated: !1
1505
1505
  });
1506
1506
  continue;
1507
1507
  }
1508
- const $ = ie(f, O);
1509
- !u.force && E[f.id] === $ || (E[f.id] = $, pe(f, O));
1508
+ const P = ce(f, S);
1509
+ !u.force && O[f.id] === P || (O[f.id] = P, le(f, S));
1510
1510
  }
1511
1511
  }
1512
- function Z(u, O) {
1513
- const M = { ...w.value }, d = { ...v.value };
1512
+ function te(u, S) {
1513
+ const M = { ...y.value }, d = { ...b.value };
1514
1514
  let n = !1;
1515
1515
  for (const [i, f] of Object.entries(u)) {
1516
- if (!(i in M) || lo.includes(i)) continue;
1517
- const p = fo.includes(i) ? O == null ? void 0 : O[i] : void 0;
1518
- d[i] !== p && (p ? d[i] = p : delete d[i], n = !0), JSON.stringify(M[i] ?? null) !== JSON.stringify(f ?? null) && (M[i] = f, n = !0);
1516
+ if (!(i in M) || mo.includes(i)) continue;
1517
+ const A = uo.includes(i) ? S == null ? void 0 : S[i] : void 0;
1518
+ d[i] !== A && (A ? d[i] = A : delete d[i], n = !0), JSON.stringify(M[i] ?? null) !== JSON.stringify(f ?? null) && (M[i] = f, n = !0);
1519
1519
  }
1520
- return n ? (w.value = M, v.value = d, Object.keys(u).some((i) => st.includes(i)) && Y(), ce(), W.forEach((i) => i()), !0) : !1;
1520
+ return n ? (y.value = M, b.value = d, Object.keys(u).some((i) => lt.includes(i)) && H(), oe(), W.forEach((i) => i()), !0) : !1;
1521
1521
  }
1522
- function ye(u) {
1523
- k.value = u.state, N.value = u.queries, I.value = u.params, L.value = {};
1524
- for (const O of Object.keys(q)) delete q[O];
1525
- for (const O of Object.keys(E)) delete E[O];
1526
- B(u), K = !0, ce();
1522
+ function xe(u) {
1523
+ x.value = u.state, N.value = u.queries, I.value = u.params, L.value = {};
1524
+ for (const S of Object.keys(U)) delete U[S];
1525
+ for (const S of Object.keys(O)) delete O[S];
1526
+ B(u), Y = !0, oe();
1527
1527
  }
1528
- function y(u, O = []) {
1529
- k.value = u.state, N.value = u.queries, I.value = u.params;
1530
- const M = JSON.stringify(w.value), d = {};
1528
+ function C(u, S = []) {
1529
+ x.value = u.state, N.value = u.queries, I.value = u.params;
1530
+ const M = JSON.stringify(y.value), d = {};
1531
1531
  for (const f of u.params)
1532
- d[f.name] = f.name in w.value ? w.value[f.name] : f.default ?? null;
1533
- w.value = d;
1532
+ d[f.name] = f.name in y.value ? y.value[f.name] : f.default ?? null;
1533
+ y.value = d;
1534
1534
  const n = new Set(u.queries.map((f) => f.id));
1535
- for (const f of Object.keys(q)) n.has(f) || delete q[f];
1536
- for (const f of Object.keys(E)) n.has(f) || delete E[f];
1535
+ for (const f of Object.keys(U)) n.has(f) || delete U[f];
1536
+ for (const f of Object.keys(O)) n.has(f) || delete O[f];
1537
1537
  const i = Object.keys(L.value).filter((f) => !n.has(f));
1538
1538
  if (i.length) {
1539
1539
  const f = { ...L.value };
1540
- for (const p of i) delete f[p];
1540
+ for (const A of i) delete f[A];
1541
1541
  L.value = f;
1542
1542
  }
1543
- for (const f of O) delete E[f];
1544
- return ce(), JSON.stringify(w.value) !== M;
1543
+ for (const f of S) delete O[f];
1544
+ return oe(), JSON.stringify(y.value) !== M;
1545
1545
  }
1546
1546
  return {
1547
- params: w,
1548
- intent: v,
1547
+ params: y,
1548
+ intent: b,
1549
1549
  results: L,
1550
1550
  queries: N,
1551
- state: k,
1552
- paramState: re,
1553
- env: de,
1554
- load: ye,
1555
- bindStore: te,
1556
- applyCanvas: y,
1557
- run: ce,
1558
- setParams: Z,
1551
+ state: x,
1552
+ paramState: X,
1553
+ env: se,
1554
+ load: xe,
1555
+ bindStore: ee,
1556
+ applyCanvas: C,
1557
+ run: oe,
1558
+ setParams: te,
1559
1559
  onResult: G,
1560
1560
  onParamsChanged: J,
1561
- RESERVED: so
1561
+ RESERVED: co
1562
1562
  };
1563
1563
  }
1564
- const bo = `: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}
1564
+ const yo = `: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}
1565
1565
  /*$vite$:1*/`;
1566
- function go(o) {
1566
+ function xo(o) {
1567
1567
  const e = o.replace(/^\//, "");
1568
1568
  try {
1569
1569
  const t = new URL(import.meta.url);
@@ -1573,47 +1573,47 @@ function go(o) {
1573
1573
  }
1574
1574
  return `${"/".replace(/\/$/, "")}/${e}`;
1575
1575
  }
1576
- const Bt = {
1576
+ const qt = {
1577
1577
  "chart.js@4": "chart.js-4.js",
1578
1578
  "fm-ui@1": "fm-ui-1.js",
1579
1579
  "components@1": "components-1.js"
1580
- }, lt = /* @__PURE__ */ new Map();
1581
- function vo(o) {
1582
- return go(`report-canvas-libs/${Bt[o]}`);
1580
+ }, ft = /* @__PURE__ */ new Map();
1581
+ function wo(o) {
1582
+ return xo(`report-canvas-libs/${qt[o]}`);
1583
1583
  }
1584
- async function Lt(o) {
1585
- const e = [...new Set(o)].filter((a) => Bt[a]), t = {};
1584
+ async function Mt(o) {
1585
+ const e = [...new Set(o)].filter((a) => qt[a]), t = {};
1586
1586
  return await Promise.all(
1587
1587
  e.map(async (a) => {
1588
- if (!lt.has(a)) {
1589
- const m = await fetch(vo(a));
1588
+ if (!ft.has(a)) {
1589
+ const m = await fetch(wo(a));
1590
1590
  if (!m.ok) return;
1591
- lt.set(a, await m.text());
1591
+ ft.set(a, await m.text());
1592
1592
  }
1593
- const r = lt.get(a);
1593
+ const r = ft.get(a);
1594
1594
  r && (t[a] = r);
1595
1595
  })
1596
1596
  ), t;
1597
1597
  }
1598
- const qt = /url\(\s*(['"]?)\s*([^)'"]*?)\s*\1\s*\)/gi, yo = /@font-face\s*\{[^}]*\}/gi;
1599
- function Ut(o) {
1598
+ const Ut = /url\(\s*(['"]?)\s*([^)'"]*?)\s*\1\s*\)/gi, ko = /@font-face\s*\{[^}]*\}/gi;
1599
+ function Ht(o) {
1600
1600
  return /^(data:|blob:|#)/i.test(o);
1601
1601
  }
1602
- function xo(o) {
1603
- for (const e of o.matchAll(qt))
1604
- if (!Ut(e[2])) return !0;
1602
+ function _o(o) {
1603
+ for (const e of o.matchAll(Ut))
1604
+ if (!Ht(e[2])) return !0;
1605
1605
  return !1;
1606
1606
  }
1607
- function wo(o) {
1607
+ function So(o) {
1608
1608
  var t;
1609
1609
  return `@font-face ${((t = /font-family\s*:\s*([^;}]+)/i.exec(o)) == null ? void 0 : t[1].trim()) || "(unnamed)"}`;
1610
1610
  }
1611
- function ko(o) {
1611
+ function Io(o) {
1612
1612
  const e = [];
1613
- let t = o.replace(yo, (a) => xo(a) ? (e.push(wo(a)), "") : a);
1614
- return t = t.replace(qt, (a, r, m) => Ut(m) ? a : (e.push(`url(${m})`), "url(about:invalid)")), { css: t, stripped: e };
1613
+ let t = o.replace(ko, (a) => _o(a) ? (e.push(So(a)), "") : a);
1614
+ return t = t.replace(Ut, (a, r, m) => Ht(m) ? a : (e.push(`url(${m})`), "url(about:invalid)")), { css: t, stripped: e };
1615
1615
  }
1616
- const Ht = `<meta charset="utf-8" />
1616
+ const Wt = `<meta charset="utf-8" />
1617
1617
  <meta name="viewport" content="width=device-width, initial-scale=1" />
1618
1618
  <!--
1619
1619
  Runtime shell for AI-written report sections. Loaded into ONE iframe per report with
@@ -3989,16 +3989,16 @@ const Ht = `<meta charset="utf-8" />
3989
3989
  post({ type: "ready", nonce: NONCE })
3990
3990
  })()
3991
3991
  <\/script>
3992
- `, Wt = "/* __FM_UI_LIBRARY_V2_STYLES__ */";
3993
- if (!Ht.includes(Wt))
3992
+ `, Gt = "/* __FM_UI_LIBRARY_V2_STYLES__ */";
3993
+ if (!Wt.includes(Gt))
3994
3994
  throw new Error("report canvas frame is missing the UI library style placeholder");
3995
- const _o = ko(bo).css, So = Ht.replace(
3996
- Wt,
3995
+ const Co = Io(yo).css, Ao = Wt.replace(
3996
+ Gt,
3997
3997
  // A replacer function, not the string: a literal replacement would let `$&`, `$'` or `$1`
3998
3998
  // inside the stylesheet rewrite themselves against the match.
3999
- () => _o
4000
- ), Mt = 8e3;
4001
- function Io(o) {
3999
+ () => Co
4000
+ ), Pt = 8e3;
4001
+ function To(o) {
4002
4002
  const e = o;
4003
4003
  if (!e || typeof e != "object") return;
4004
4004
  const t = (r) => Number.isSafeInteger(r) && r >= 0 && r <= 1e4;
@@ -4012,10 +4012,10 @@ function Io(o) {
4012
4012
  ...a === null || typeof a == "number" && Number.isFinite(a) ? { value: a } : typeof a == "string" ? { value: a.slice(0, 64) } : {}
4013
4013
  };
4014
4014
  }
4015
- function Pt(o) {
4015
+ function Dt(o) {
4016
4016
  const e = o;
4017
4017
  if (!e || typeof e != "object" || typeof e.tag != "string") return;
4018
- const t = Array.isArray(e.path) ? e.path.filter((r) => Number.isSafeInteger(r) && r >= 0).slice(0, 32) : [], a = Io(e.datum);
4018
+ const t = Array.isArray(e.path) ? e.path.filter((r) => Number.isSafeInteger(r) && r >= 0).slice(0, 32) : [], a = To(e.datum);
4019
4019
  return {
4020
4020
  tag: e.tag.slice(0, 32),
4021
4021
  ...typeof e.part == "string" ? { part: e.part.slice(0, 128) } : {},
@@ -4025,173 +4025,173 @@ function Pt(o) {
4025
4025
  ...a ? { datum: a } : {}
4026
4026
  };
4027
4027
  }
4028
- function Co(o, e) {
4029
- const t = A(!1);
4028
+ function Eo(o, e) {
4029
+ const t = T(!1);
4030
4030
  let a = null;
4031
4031
  const r = /* @__PURE__ */ new Map();
4032
4032
  let m;
4033
- const b = /* @__PURE__ */ new Map();
4034
- function w() {
4035
- var g;
4036
- return ((g = o.value) == null ? void 0 : g.contentWindow) ?? null;
4033
+ const h = /* @__PURE__ */ new Map();
4034
+ function y() {
4035
+ var _;
4036
+ return ((_ = o.value) == null ? void 0 : _.contentWindow) ?? null;
4037
4037
  }
4038
- function I(g) {
4038
+ function I(_) {
4039
4039
  var z;
4040
- (z = w()) == null || z.postMessage(JSON.parse(JSON.stringify(g)), "*");
4041
- }
4042
- function v(g) {
4043
- var Y, U;
4044
- const z = w();
4045
- if (!z || g.source !== z) return;
4046
- const C = g.data;
4047
- if (!(!C || typeof C != "object"))
4048
- switch (C.type) {
4040
+ (z = y()) == null || z.postMessage(JSON.parse(JSON.stringify(_)), "*");
4041
+ }
4042
+ function b(_) {
4043
+ var H, K;
4044
+ const z = y();
4045
+ if (!z || _.source !== z) return;
4046
+ const g = _.data;
4047
+ if (!(!g || typeof g != "object"))
4048
+ switch (g.type) {
4049
4049
  case "ready":
4050
4050
  if (t.value) return;
4051
- m = C.nonce, t.value = !0, a == null || a(), a = null, G();
4051
+ m = g.nonce, t.value = !0, a == null || a(), a = null, G();
4052
4052
  break;
4053
4053
  case "sectionSelected":
4054
- if (!m || C.nonce !== m || typeof C.sectionId != "string" || !Number.isSafeInteger(C.version))
4054
+ if (!m || g.nonce !== m || typeof g.sectionId != "string" || !Number.isSafeInteger(g.version))
4055
4055
  return;
4056
- const te = Pt(C.element), re = Array.isArray(C.widen) ? C.widen.slice(0, 4).map(Pt).filter((de) => !!de) : [];
4057
- (Y = e.onSelectSection) == null || Y.call(
4056
+ const ee = Dt(g.element), X = Array.isArray(g.widen) ? g.widen.slice(0, 4).map(Dt).filter((se) => !!se) : [];
4057
+ (H = e.onSelectSection) == null || H.call(
4058
4058
  e,
4059
4059
  {
4060
- sectionId: C.sectionId,
4061
- version: C.version,
4062
- label: String(C.label ?? "").slice(0, 120),
4063
- elementText: String(C.elementText ?? "").slice(0, 300),
4064
- elementTag: String(C.elementTag ?? "").slice(0, 32),
4065
- ...te ? { element: te } : {}
4060
+ sectionId: g.sectionId,
4061
+ version: g.version,
4062
+ label: String(g.label ?? "").slice(0, 120),
4063
+ elementText: String(g.elementText ?? "").slice(0, 300),
4064
+ elementTag: String(g.elementTag ?? "").slice(0, 32),
4065
+ ...ee ? { element: ee } : {}
4066
4066
  },
4067
- re
4067
+ X
4068
4068
  );
4069
4069
  break;
4070
4070
  case "selectionCancelled":
4071
- m && C.nonce === m && ((U = e.onCancelSelection) == null || U.call(e));
4071
+ m && g.nonce === m && ((K = e.onCancelSelection) == null || K.call(e));
4072
4072
  break;
4073
4073
  case "setParams":
4074
- e.onSetParams(C.values ?? {}, C.intent);
4074
+ e.onSetParams(g.values ?? {}, g.intent);
4075
4075
  break;
4076
4076
  case "rendered":
4077
- if (!L(C)) return;
4078
- N(C.sectionId, C.version), e.onSectionRendered(
4079
- C.sectionId,
4080
- C.version,
4081
- String(C.label ?? "").slice(0, 120)
4077
+ if (!L(g)) return;
4078
+ N(g.sectionId, g.version), e.onSectionRendered(
4079
+ g.sectionId,
4080
+ g.version,
4081
+ String(g.label ?? "").slice(0, 120)
4082
4082
  );
4083
4083
  break;
4084
4084
  case "error":
4085
- if (!L(C)) return;
4086
- N(C.sectionId, C.version), e.onSectionError(C.sectionId, C.version, C.message);
4085
+ if (!L(g)) return;
4086
+ N(g.sectionId, g.version), e.onSectionError(g.sectionId, g.version, g.message);
4087
4087
  break;
4088
4088
  case "layout":
4089
- if (!L(C)) return;
4089
+ if (!L(g)) return;
4090
4090
  e.onSectionLayout(
4091
- C.sectionId,
4092
- C.version,
4093
- (Array.isArray(C.warnings) ? C.warnings : []).slice(0, 12).map((de) => String(de).slice(0, 200))
4091
+ g.sectionId,
4092
+ g.version,
4093
+ (Array.isArray(g.warnings) ? g.warnings : []).slice(0, 12).map((se) => String(se).slice(0, 200))
4094
4094
  );
4095
4095
  break;
4096
4096
  }
4097
4097
  }
4098
- function L(g) {
4099
- return !m || g.nonce === m ? !0 : (console.warn("[report-canvas] dropped a render outcome without the shell nonce"), !1);
4098
+ function L(_) {
4099
+ return !m || _.nonce === m ? !0 : (console.warn("[report-canvas] dropped a render outcome without the shell nonce"), !1);
4100
4100
  }
4101
- function k(g, z) {
4102
- return `${g}@${z}`;
4101
+ function x(_, z) {
4102
+ return `${_}@${z}`;
4103
4103
  }
4104
- function N(g, z) {
4104
+ function N(_, z) {
4105
4105
  if (z === void 0) return;
4106
- const C = k(g, z), Y = b.get(C);
4107
- Y !== void 0 && (clearTimeout(Y), b.delete(C));
4106
+ const g = x(_, z), H = h.get(g);
4107
+ H !== void 0 && (clearTimeout(H), h.delete(g));
4108
4108
  }
4109
- function T() {
4110
- b.forEach((g) => clearTimeout(g)), b.clear();
4109
+ function E() {
4110
+ h.forEach((_) => clearTimeout(_)), h.clear();
4111
4111
  }
4112
- function W(g) {
4113
- for (const z of g) {
4114
- const C = k(z.id, z.version);
4115
- b.has(C) || b.set(
4116
- C,
4112
+ function W(_) {
4113
+ for (const z of _) {
4114
+ const g = x(z.id, z.version);
4115
+ h.has(g) || h.set(
4116
+ g,
4117
4117
  setTimeout(() => {
4118
- b.delete(C), e.onSectionError(
4118
+ h.delete(g), e.onSectionError(
4119
4119
  z.id,
4120
4120
  z.version,
4121
- `the section did not report a render within ${Mt}ms`
4121
+ `the section did not report a render within ${Pt}ms`
4122
4122
  );
4123
- }, Mt)
4123
+ }, Pt)
4124
4124
  );
4125
4125
  }
4126
4126
  }
4127
- async function D(g, z, C) {
4128
- const Y = await Lt(g.flatMap((te) => te.libs ?? [])), U = () => {
4127
+ async function j(_, z, g) {
4128
+ const H = await Mt(_.flatMap((ee) => ee.libs ?? [])), K = () => {
4129
4129
  I({
4130
4130
  type: "init",
4131
- sections: g,
4131
+ sections: _,
4132
4132
  params: z.values,
4133
4133
  paramDecls: z.decls,
4134
4134
  intent: z.intent,
4135
- libs: Y,
4136
- env: C
4137
- }), T(), W(g);
4135
+ libs: H,
4136
+ env: g
4137
+ }), E(), W(_);
4138
4138
  };
4139
- t.value ? U() : a = U;
4139
+ t.value ? K() : a = K;
4140
4140
  }
4141
- async function K(g) {
4142
- const z = await Lt(g.flatMap((C) => C.libs ?? []));
4143
- I({ type: "sections", sections: g, libs: z }), W(g);
4141
+ async function Y(_) {
4142
+ const z = await Mt(_.flatMap((g) => g.libs ?? []));
4143
+ I({ type: "sections", sections: _, libs: z }), W(_);
4144
4144
  }
4145
- function q(g) {
4145
+ function U(_) {
4146
4146
  I({
4147
4147
  type: "params",
4148
- values: g.values,
4149
- paramDecls: g.decls,
4150
- intent: g.intent
4148
+ values: _.values,
4149
+ paramDecls: _.decls,
4150
+ intent: _.intent
4151
4151
  });
4152
4152
  }
4153
- function E(g) {
4154
- I({ type: "env", env: g });
4153
+ function O(_) {
4154
+ I({ type: "env", env: _ });
4155
4155
  }
4156
4156
  function G() {
4157
- const g = [...r.values()];
4158
- r.clear(), g.forEach(J);
4157
+ const _ = [...r.values()];
4158
+ r.clear(), _.forEach(J);
4159
4159
  }
4160
- function J(g) {
4160
+ function J(_) {
4161
4161
  I({
4162
4162
  type: "rows",
4163
- queryId: g.queryId,
4164
- runId: g.runId,
4165
- rows: g.rows,
4166
- status: g.status,
4167
- truncated: g.truncated,
4168
- error: g.error
4163
+ queryId: _.queryId,
4164
+ runId: _.runId,
4165
+ rows: _.rows,
4166
+ status: _.status,
4167
+ truncated: _.truncated,
4168
+ error: _.error
4169
4169
  });
4170
4170
  }
4171
- function P(g) {
4171
+ function F(_) {
4172
4172
  if (!t.value) {
4173
- r.set(g.queryId, g);
4173
+ r.set(_.queryId, _);
4174
4174
  return;
4175
4175
  }
4176
- J(g);
4176
+ J(_);
4177
4177
  }
4178
- Le(() => window.addEventListener("message", v)), Pe(() => {
4179
- window.removeEventListener("message", v), T();
4178
+ Me(() => window.addEventListener("message", b)), De(() => {
4179
+ window.removeEventListener("message", b), E();
4180
4180
  });
4181
4181
  function B() {
4182
- t.value = !1, a = null, m = void 0, r.clear(), T();
4182
+ t.value = !1, a = null, m = void 0, r.clear(), E();
4183
4183
  }
4184
4184
  return {
4185
- setCommentMode: (g, z) => {
4186
- var C, Y, U;
4185
+ setCommentMode: (_, z) => {
4186
+ var g, H, K;
4187
4187
  return I({
4188
4188
  type: "commentMode",
4189
- enabled: g,
4189
+ enabled: _,
4190
4190
  selected: z ? {
4191
4191
  sectionId: z.sectionId,
4192
- part: (C = z.element) == null ? void 0 : C.part,
4193
- path: ((Y = z.element) == null ? void 0 : Y.path) ?? [],
4194
- datum: ((U = z.element) == null ? void 0 : U.datum) && {
4192
+ part: (g = z.element) == null ? void 0 : g.part,
4193
+ path: ((H = z.element) == null ? void 0 : H.path) ?? [],
4194
+ datum: ((K = z.element) == null ? void 0 : K.datum) && {
4195
4195
  datasetIndex: z.element.datum.datasetIndex,
4196
4196
  index: z.element.datum.index
4197
4197
  }
@@ -4199,277 +4199,277 @@ function Co(o, e) {
4199
4199
  });
4200
4200
  },
4201
4201
  ready: t,
4202
- init: D,
4203
- swapSections: K,
4204
- pushParams: q,
4205
- pushEnv: E,
4206
- pushRows: P,
4202
+ init: j,
4203
+ swapSections: Y,
4204
+ pushParams: U,
4205
+ pushEnv: O,
4206
+ pushRows: F,
4207
4207
  reset: B
4208
4208
  };
4209
4209
  }
4210
- function Ue(o) {
4211
- const { businessId: e } = Ee(Ke());
4210
+ function He(o) {
4211
+ const { businessId: e } = Oe(Ye());
4212
4212
  if (!e.value) throw new Error("Business Id is not defined");
4213
4213
  return `/${e.value}/report-ai/${o}`;
4214
4214
  }
4215
- const ft = (o, e = {}) => {
4215
+ const dt = (o, e = {}) => {
4216
4216
  const t = new URLSearchParams();
4217
4217
  e.sessionId && t.set("sessionId", e.sessionId), e.before && t.set("before", e.before);
4218
4218
  const a = t.toString(), r = {
4219
- fetchType: ue.Get,
4220
- url: `${Ue(o)}/chat${a ? `?${a}` : ""}`
4219
+ fetchType: pe.Get,
4220
+ url: `${He(o)}/chat${a ? `?${a}` : ""}`
4221
4221
  };
4222
- return me.fetch(r);
4223
- }, Ao = (o, e) => {
4222
+ return ue.fetch(r);
4223
+ }, Oo = (o, e) => {
4224
4224
  const t = {
4225
- fetchType: ue.Get,
4226
- url: `${Ue(o)}/chats${e ? `?cursor=${encodeURIComponent(e)}` : ""}`
4225
+ fetchType: pe.Get,
4226
+ url: `${He(o)}/chats${e ? `?cursor=${encodeURIComponent(e)}` : ""}`
4227
4227
  };
4228
- return me.fetch(t);
4229
- }, To = (o) => {
4228
+ return ue.fetch(t);
4229
+ }, zo = (o) => {
4230
4230
  const e = {
4231
- fetchType: ue.Post,
4232
- url: `${Ue(o)}/chats`,
4231
+ fetchType: pe.Post,
4232
+ url: `${He(o)}/chats`,
4233
4233
  data: {}
4234
4234
  };
4235
- return me.fetch(e);
4236
- }, Eo = (o, e) => {
4235
+ return ue.fetch(e);
4236
+ }, No = (o, e) => {
4237
4237
  const t = {
4238
- fetchType: ue.Get,
4239
- url: `${Ue(o)}/runs/latest${e ? `?sessionId=${e}` : ""}`
4238
+ fetchType: pe.Get,
4239
+ url: `${He(o)}/runs/latest${e ? `?sessionId=${e}` : ""}`
4240
4240
  };
4241
- return me.fetch(t);
4242
- }, Oo = (o, e, t, a) => {
4241
+ return ue.fetch(t);
4242
+ }, $o = (o, e, t, a) => {
4243
4243
  const r = {
4244
- fetchType: ue.Post,
4245
- url: `${Ue(o)}/runs/${e}/sections/${t}/retry`,
4244
+ fetchType: pe.Post,
4245
+ url: `${He(o)}/runs/${e}/sections/${t}/retry`,
4246
4246
  data: { timezone: a }
4247
4247
  };
4248
- return me.fetch(r);
4249
- }, zo = (o, e) => `/${o}/report-ai/${e}/chat`, No = 3e4, $o = "New chat", Dt = 80;
4250
- function dt(o, e) {
4248
+ return ue.fetch(r);
4249
+ }, Ro = (o, e) => `/${o}/report-ai/${e}/chat`, Lo = 3e4, Mo = "New chat", jt = 80;
4250
+ function ct(o, e) {
4251
4251
  return `report-canvas:chat:${o}:${e}`;
4252
4252
  }
4253
- function Ro(o) {
4253
+ function Po(o) {
4254
4254
  try {
4255
4255
  return window.localStorage.getItem(o) ?? void 0;
4256
4256
  } catch {
4257
4257
  return;
4258
4258
  }
4259
4259
  }
4260
- function ct(o, e) {
4260
+ function mt(o, e) {
4261
4261
  try {
4262
4262
  e ? window.localStorage.setItem(o, e) : window.localStorage.removeItem(o);
4263
4263
  } catch {
4264
4264
  }
4265
4265
  }
4266
- function Lo(o) {
4267
- const { businessId: e, token: t } = Ee(Ke()), a = A([]), r = A(), m = A(""), b = A(null), w = A(!1), I = A([]), v = A(null), L = A(!1), k = A(""), N = A(!1), T = A(!1), W = A(""), D = A(""), K = A(""), q = A(!1), E = A([]), G = A(!1), J = [];
4268
- function P(d) {
4266
+ function Do(o) {
4267
+ const { businessId: e, token: t } = Oe(Ye()), a = T([]), r = T(), m = T(""), h = T(null), y = T(!1), I = T([]), b = T(null), L = T(!1), x = T(""), N = T(!1), E = T(!1), W = T(""), j = T(""), Y = T(""), U = T(!1), O = T([]), G = T(!1), J = [];
4268
+ function F(d) {
4269
4269
  J.push(d);
4270
4270
  }
4271
4271
  const B = [];
4272
- function g(d) {
4272
+ function _(d) {
4273
4273
  B.push(d);
4274
4274
  }
4275
4275
  let z = 0;
4276
- async function C(d) {
4277
- const n = dt(s(e.value), o), i = d ?? Ro(n), f = z += 1;
4276
+ async function g(d) {
4277
+ const n = ct(s(e.value), o), i = d ?? Po(n), f = z += 1;
4278
4278
  N.value = !0;
4279
4279
  try {
4280
- let p;
4280
+ let A;
4281
4281
  try {
4282
- p = await ft(o, { sessionId: i });
4283
- } catch ($) {
4284
- if (!i) throw $;
4285
- ct(n, void 0), p = await ft(o);
4282
+ A = await dt(o, { sessionId: i });
4283
+ } catch (P) {
4284
+ if (!i) throw P;
4285
+ mt(n, void 0), A = await dt(o);
4286
4286
  }
4287
- return f !== z ? null : (Y(p), p.latestRun ?? null);
4288
- } catch (p) {
4289
- return f === z && (K.value = p instanceof Error ? p.message : String(p)), null;
4287
+ return f !== z ? null : (H(A), A.latestRun ?? null);
4288
+ } catch (A) {
4289
+ return f === z && (Y.value = A instanceof Error ? A.message : String(A)), null;
4290
4290
  } finally {
4291
4291
  f === z && (N.value = !1);
4292
4292
  }
4293
4293
  }
4294
- function Y(d) {
4295
- r.value = d.sessionId ?? void 0, m.value = d.title ?? "", a.value = d.messages, b.value = d.earlier ?? null, E.value = [], K.value = "", ct(dt(s(e.value), o), d.sessionId);
4294
+ function H(d) {
4295
+ r.value = d.sessionId ?? void 0, m.value = d.title ?? "", a.value = d.messages, h.value = d.earlier ?? null, O.value = [], Y.value = "", mt(ct(s(e.value), o), d.sessionId);
4296
4296
  }
4297
- async function U(d) {
4298
- return d === r.value || T.value ? null : C(d);
4297
+ async function K(d) {
4298
+ return d === r.value || E.value ? null : g(d);
4299
4299
  }
4300
- async function te() {
4301
- if (T.value) return !1;
4300
+ async function ee() {
4301
+ if (E.value) return !1;
4302
4302
  const d = z += 1;
4303
4303
  N.value = !0;
4304
4304
  try {
4305
- const { chat: n } = await To(o);
4306
- return d !== z ? !1 : (Y({ sessionId: n.id, title: n.title, earlier: null, messages: [], latestRun: null }), I.value = [n, ...I.value.filter((i) => i.id !== n.id)], !0);
4305
+ const { chat: n } = await zo(o);
4306
+ return d !== z ? !1 : (H({ sessionId: n.id, title: n.title, earlier: null, messages: [], latestRun: null }), I.value = [n, ...I.value.filter((i) => i.id !== n.id)], !0);
4307
4307
  } catch (n) {
4308
- return d === z && (K.value = n instanceof Error ? n.message : String(n)), !1;
4308
+ return d === z && (Y.value = n instanceof Error ? n.message : String(n)), !1;
4309
4309
  } finally {
4310
4310
  d === z && (N.value = !1);
4311
4311
  }
4312
4312
  }
4313
- async function re(d) {
4314
- L.value = !0, k.value = "";
4313
+ async function X(d) {
4314
+ L.value = !0, x.value = "";
4315
4315
  try {
4316
- const n = await Ao(o, d);
4317
- I.value = d ? [...I.value, ...n.chats] : n.chats, v.value = n.cursor;
4316
+ const n = await Oo(o, d);
4317
+ I.value = d ? [...I.value, ...n.chats] : n.chats, b.value = n.cursor;
4318
4318
  } catch (n) {
4319
- k.value = n instanceof Error ? n.message : String(n);
4319
+ x.value = n instanceof Error ? n.message : String(n);
4320
4320
  } finally {
4321
4321
  L.value = !1;
4322
4322
  }
4323
4323
  }
4324
- async function de() {
4325
- if (!b.value || w.value) return;
4326
- const d = b.value, n = r.value;
4327
- w.value = !0;
4324
+ async function se() {
4325
+ if (!h.value || y.value) return;
4326
+ const d = h.value, n = r.value;
4327
+ y.value = !0;
4328
4328
  try {
4329
- const i = await ft(o, { sessionId: n, before: d });
4329
+ const i = await dt(o, { sessionId: n, before: d });
4330
4330
  if (n !== r.value) return;
4331
- a.value = [...i.messages, ...a.value], b.value = i.earlier ?? null;
4331
+ a.value = [...i.messages, ...a.value], h.value = i.earlier ?? null;
4332
4332
  } catch (i) {
4333
- K.value = i instanceof Error ? i.message : String(i);
4333
+ Y.value = i instanceof Error ? i.message : String(i);
4334
4334
  } finally {
4335
- w.value = !1;
4335
+ y.value = !1;
4336
4336
  }
4337
4337
  }
4338
- const ie = /* @__PURE__ */ new Map();
4339
- function se(d, n) {
4340
- r.value && ie.set(r.value, { text: d, target: n });
4338
+ const ce = /* @__PURE__ */ new Map();
4339
+ function ye(d, n) {
4340
+ r.value && ce.set(r.value, { text: d, target: n });
4341
4341
  }
4342
- function ve() {
4343
- return r.value && ie.get(r.value) || { text: "" };
4342
+ function he() {
4343
+ return r.value && ce.get(r.value) || { text: "" };
4344
4344
  }
4345
- function pe(d) {
4346
- E.value.includes(d) || (E.value = [...E.value, d]);
4345
+ function le(d) {
4346
+ O.value.includes(d) || (O.value = [...O.value, d]);
4347
4347
  }
4348
- function ce(d) {
4348
+ function oe(d) {
4349
4349
  var i;
4350
4350
  const n = a.value.find((f) => f.id === d);
4351
- return !n || !E.value.includes(d) ? null : (a.value = a.value.filter((f) => f.id !== d), E.value = E.value.filter((f) => f !== d), {
4351
+ return !n || !O.value.includes(d) ? null : (a.value = a.value.filter((f) => f.id !== d), O.value = O.value.filter((f) => f !== d), {
4352
4352
  text: n.parts.filter((f) => f.type === "text").map((f) => String(f.text ?? "")).join(`
4353
4353
  `),
4354
4354
  target: (i = n.parts.find((f) => f.type === "data-edit-target")) == null ? void 0 : i.data
4355
4355
  });
4356
4356
  }
4357
- function Z(d, n) {
4357
+ function te(d, n) {
4358
4358
  const i = a.value[a.value.length - 1];
4359
4359
  if (i && i.role === "assistant" && i.id === d) {
4360
- const p = [...i.parts];
4361
- n(p), a.value = [...a.value.slice(0, -1), { ...i, parts: p }];
4360
+ const A = [...i.parts];
4361
+ n(A), a.value = [...a.value.slice(0, -1), { ...i, parts: A }];
4362
4362
  return;
4363
4363
  }
4364
4364
  const f = [];
4365
4365
  n(f), a.value = [...a.value, { id: d, role: "assistant", parts: f }];
4366
4366
  }
4367
- function ye(d, n, i) {
4367
+ function xe(d, n, i) {
4368
4368
  for (let f = d.length - 1; f >= 0; f -= 1) {
4369
- const p = d[f];
4370
- if (p.type === "text" && p.id === n) {
4371
- d[f] = { ...p, text: String(p.text ?? "") + i };
4369
+ const A = d[f];
4370
+ if (A.type === "text" && A.id === n) {
4371
+ d[f] = { ...A, text: String(A.text ?? "") + i };
4372
4372
  return;
4373
4373
  }
4374
4374
  }
4375
4375
  d.push({ type: "text", id: n, text: i, state: "streaming" });
4376
4376
  }
4377
- function y(d, n, i) {
4377
+ function C(d, n, i) {
4378
4378
  for (let f = d.length - 1; f >= 0; f -= 1) {
4379
- const p = d[f];
4380
- if (p.type.startsWith("tool-") && p.toolCallId === n)
4381
- return d[f] = { ...p, ...i }, !0;
4379
+ const A = d[f];
4380
+ if (A.type.startsWith("tool-") && A.toolCallId === n)
4381
+ return d[f] = { ...A, ...i }, !0;
4382
4382
  }
4383
4383
  return !1;
4384
4384
  }
4385
4385
  function u(d, n) {
4386
4386
  const i = String(d.type ?? ""), f = n.id;
4387
4387
  if (i === "start-step") {
4388
- Z(f, (p) => p.push({ type: "step-start" }));
4388
+ te(f, (A) => A.push({ type: "step-start" }));
4389
4389
  return;
4390
4390
  }
4391
4391
  if (i === "text-start") {
4392
- const p = String(d.id ?? "text");
4393
- Z(
4392
+ const A = String(d.id ?? "text");
4393
+ te(
4394
4394
  f,
4395
- ($) => $.push({ type: "text", id: p, text: "", state: "streaming" })
4395
+ (P) => P.push({ type: "text", id: A, text: "", state: "streaming" })
4396
4396
  );
4397
4397
  return;
4398
4398
  }
4399
4399
  if (i === "text-delta") {
4400
- const p = String(d.id ?? "text");
4401
- Z(f, ($) => ye($, p, String(d.delta ?? "")));
4400
+ const A = String(d.id ?? "text");
4401
+ te(f, (P) => xe(P, A, String(d.delta ?? "")));
4402
4402
  return;
4403
4403
  }
4404
4404
  if (i === "text-end") {
4405
- const p = String(d.id ?? "text");
4406
- Z(f, ($) => {
4407
- for (let H = $.length - 1; H >= 0; H -= 1)
4408
- if ($[H].type === "text" && $[H].id === p) {
4409
- $[H] = { ...$[H], state: "done" };
4405
+ const A = String(d.id ?? "text");
4406
+ te(f, (P) => {
4407
+ for (let $ = P.length - 1; $ >= 0; $ -= 1)
4408
+ if (P[$].type === "text" && P[$].id === A) {
4409
+ P[$] = { ...P[$], state: "done" };
4410
4410
  return;
4411
4411
  }
4412
4412
  });
4413
4413
  return;
4414
4414
  }
4415
4415
  if (i === "tool-input-start") {
4416
- const p = String(d.toolName ?? ""), $ = String(d.toolCallId ?? It());
4417
- D.value = p, Z(
4416
+ const A = String(d.toolName ?? ""), P = String(d.toolCallId ?? Ct());
4417
+ j.value = A, te(
4418
4418
  f,
4419
- (H) => H.push({ type: `tool-${p}`, toolCallId: $, state: "input-streaming" })
4419
+ ($) => $.push({ type: `tool-${A}`, toolCallId: P, state: "input-streaming" })
4420
4420
  );
4421
4421
  return;
4422
4422
  }
4423
4423
  if (i === "tool-input-available" || i === "tool-output-available") {
4424
- const p = String(d.toolCallId ?? ""), $ = i === "tool-input-available" ? "input-available" : "output-available";
4425
- Z(f, (H) => {
4426
- !y(H, p, { state: $ }) && typeof d.toolName == "string" && H.push({ type: `tool-${d.toolName}`, toolCallId: p, state: $ });
4427
- }), typeof d.toolName == "string" && (D.value = d.toolName);
4424
+ const A = String(d.toolCallId ?? ""), P = i === "tool-input-available" ? "input-available" : "output-available";
4425
+ te(f, ($) => {
4426
+ !C($, A, { state: P }) && typeof d.toolName == "string" && $.push({ type: `tool-${d.toolName}`, toolCallId: A, state: P });
4427
+ }), typeof d.toolName == "string" && (j.value = d.toolName);
4428
4428
  return;
4429
4429
  }
4430
4430
  if (i === "tool-output-error") {
4431
- const p = String(d.toolCallId ?? "");
4432
- Z(f, ($) => y($, p, { state: "output-error" }));
4431
+ const A = String(d.toolCallId ?? "");
4432
+ te(f, (P) => C(P, A, { state: "output-error" }));
4433
4433
  return;
4434
4434
  }
4435
4435
  if (i === "error") {
4436
- const p = String(d.errorText ?? "stream error");
4437
- Z(f, ($) => {
4438
- $.push({ type: "step-start" }), $.push({ type: "text", id: "turn-error", text: p, state: "done" });
4436
+ const A = String(d.errorText ?? "stream error");
4437
+ te(f, (P) => {
4438
+ P.push({ type: "step-start" }), P.push({ type: "text", id: "turn-error", text: A, state: "done" });
4439
4439
  });
4440
4440
  return;
4441
4441
  }
4442
4442
  if (i.startsWith("data-")) {
4443
- const p = i.slice(5), $ = d.data ?? {};
4444
- p === "plan" && typeof $.sessionId == "string" && (n.acked = !0, r.value = $.sessionId, ct(dt(s(e.value), o), $.sessionId)), p !== "turn_stats" && (D.value = p), Z(f, (H) => H.push({ type: i, data: $ })), J.forEach((H) => H({ name: p, data: $ }));
4443
+ const A = i.slice(5), P = d.data ?? {};
4444
+ A === "plan" && typeof P.sessionId == "string" && (n.acked = !0, r.value = P.sessionId, mt(ct(s(e.value), o), P.sessionId)), A !== "turn_stats" && (j.value = A), te(f, ($) => $.push({ type: i, data: P })), J.forEach(($) => $({ name: A, data: P }));
4445
4445
  }
4446
4446
  }
4447
- function O(d) {
4448
- if (m.value && m.value !== $o) return;
4449
- const n = d.length > Dt ? `${d.slice(0, Dt - 1)}…` : d;
4447
+ function S(d) {
4448
+ if (m.value && m.value !== Mo) return;
4449
+ const n = d.length > jt ? `${d.slice(0, jt - 1)}…` : d;
4450
4450
  m.value = n, I.value = I.value.map(
4451
4451
  (i) => i.id === r.value ? { ...i, title: n } : i
4452
4452
  );
4453
4453
  }
4454
4454
  async function M(d, n) {
4455
4455
  const i = d.trim();
4456
- if (!i || T.value) return;
4457
- K.value = "", q.value = !1;
4456
+ if (!i || E.value) return;
4457
+ Y.value = "", U.value = !1;
4458
4458
  const f = {
4459
- id: It(),
4459
+ id: Ct(),
4460
4460
  role: "user",
4461
4461
  parts: [{ type: "text", text: i }]
4462
4462
  };
4463
4463
  a.value = [
4464
4464
  ...a.value,
4465
4465
  n ? { ...f, parts: [...f.parts, { type: "data-edit-target", data: n }] } : f
4466
- ], O(i), T.value = !0, D.value = "", G.value = !1, W.value = `assistant-${Date.now()}`;
4467
- const p = { id: W.value, acked: !1 }, $ = setTimeout(() => {
4466
+ ], S(i), E.value = !0, j.value = "", G.value = !1, W.value = `assistant-${Date.now()}`;
4467
+ const A = { id: W.value, acked: !1 }, P = setTimeout(() => {
4468
4468
  G.value = !0;
4469
- }, No);
4469
+ }, Lo);
4470
4470
  try {
4471
- const H = await fetch(
4472
- wn(zo(e.value, o)),
4471
+ const $ = await fetch(
4472
+ _n(Ro(e.value, o)),
4473
4473
  {
4474
4474
  method: "POST",
4475
4475
  headers: {
@@ -4483,114 +4483,114 @@ function Lo(o) {
4483
4483
  })
4484
4484
  }
4485
4485
  );
4486
- if (!H.ok || !H.body) {
4487
- const Ce = await H.json().catch(() => null);
4488
- if (typeof (Ce == null ? void 0 : Ce.message) == "string") {
4489
- K.value = Ce.message, a.value = a.value.filter((Ve) => Ve.id !== f.id);
4486
+ if (!$.ok || !$.body) {
4487
+ const Te = await $.json().catch(() => null);
4488
+ if (typeof (Te == null ? void 0 : Te.message) == "string") {
4489
+ Y.value = Te.message, a.value = a.value.filter((Fe) => Fe.id !== f.id);
4490
4490
  return;
4491
4491
  }
4492
- console.warn("[report-canvas] chat rejected", { reportId: o, status: H.status }), pe(f.id);
4492
+ console.warn("[report-canvas] chat rejected", { reportId: o, status: $.status }), le(f.id);
4493
4493
  return;
4494
4494
  }
4495
- const V = H.body.getReader(), ae = new TextDecoder();
4496
- let xe = "";
4495
+ const D = $.body.getReader(), re = new TextDecoder();
4496
+ let be = "";
4497
4497
  for (; ; ) {
4498
- const { done: Ce, value: Ve } = await V.read();
4499
- if (Ce) break;
4500
- xe += ae.decode(Ve, { stream: !0 });
4501
- const He = xe.split(`
4498
+ const { done: Te, value: Fe } = await D.read();
4499
+ if (Te) break;
4500
+ be += re.decode(Fe, { stream: !0 });
4501
+ const Be = be.split(`
4502
4502
 
4503
4503
  `);
4504
- xe = He.pop() ?? "";
4505
- for (const We of He)
4506
- for (const Ge of We.split(`
4504
+ be = Be.pop() ?? "";
4505
+ for (const Ke of Be)
4506
+ for (const We of Ke.split(`
4507
4507
  `)) {
4508
- if (!Ge.startsWith("data:")) continue;
4509
- const Fe = Ge.slice(5).trim();
4510
- if (!(!Fe || Fe === "[DONE]"))
4508
+ if (!We.startsWith("data:")) continue;
4509
+ const Re = We.slice(5).trim();
4510
+ if (!(!Re || Re === "[DONE]"))
4511
4511
  try {
4512
- u(JSON.parse(Fe), p);
4512
+ u(JSON.parse(Re), A);
4513
4513
  } catch {
4514
4514
  }
4515
4515
  }
4516
4516
  }
4517
- } catch (H) {
4518
- console.warn("[report-canvas] chat stream failed", { reportId: o, err: H }), p.acked ? q.value = !0 : pe(f.id);
4517
+ } catch ($) {
4518
+ console.warn("[report-canvas] chat stream failed", { reportId: o, err: $ }), A.acked ? U.value = !0 : le(f.id);
4519
4519
  } finally {
4520
- clearTimeout($), T.value = !1, D.value = "", G.value = !1, B.forEach((H) => H());
4520
+ clearTimeout(P), E.value = !1, j.value = "", G.value = !1, B.forEach(($) => $());
4521
4521
  }
4522
4522
  }
4523
4523
  return {
4524
4524
  messages: a,
4525
4525
  sessionId: r,
4526
4526
  title: m,
4527
- earlier: b,
4528
- loadingEarlier: w,
4527
+ earlier: h,
4528
+ loadingEarlier: y,
4529
4529
  chats: I,
4530
- chatsCursor: v,
4530
+ chatsCursor: b,
4531
4531
  chatsLoading: L,
4532
- chatsError: k,
4532
+ chatsError: x,
4533
4533
  switching: N,
4534
- streaming: T,
4534
+ streaming: E,
4535
4535
  turnId: W,
4536
- activity: D,
4537
- error: K,
4538
- interrupted: q,
4539
- unsent: E,
4536
+ activity: j,
4537
+ error: Y,
4538
+ interrupted: U,
4539
+ unsent: O,
4540
4540
  slow: G,
4541
- load: C,
4542
- select: U,
4543
- startChat: te,
4544
- loadChats: re,
4545
- loadEarlier: de,
4546
- stashDraft: se,
4547
- recallDraft: ve,
4548
- takeUnsent: ce,
4541
+ load: g,
4542
+ select: K,
4543
+ startChat: ee,
4544
+ loadChats: X,
4545
+ loadEarlier: se,
4546
+ stashDraft: ye,
4547
+ recallDraft: he,
4548
+ takeUnsent: oe,
4549
4549
  send: M,
4550
- onLifecycle: P,
4551
- onSettled: g
4550
+ onLifecycle: F,
4551
+ onSettled: _
4552
4552
  };
4553
4553
  }
4554
- const Mo = 2e3, Po = 10 * 6e4;
4555
- function Do(o, e, t, a) {
4556
- const { timezone: r } = Ee(ut()), m = A(null), b = A(null), w = A(!1), I = A(""), v = [];
4557
- function L(P) {
4558
- v.push(P);
4554
+ const jo = 2e3, Vo = 10 * 6e4;
4555
+ function Fo(o, e, t, a) {
4556
+ const { timezone: r } = Oe(pt()), m = T(null), h = T(null), y = T(!1), I = T(""), b = [];
4557
+ function L(F) {
4558
+ b.push(F);
4559
4559
  }
4560
- let k;
4560
+ let x;
4561
4561
  function N() {
4562
- k !== void 0 && (window.clearInterval(k), k = void 0);
4562
+ x !== void 0 && (window.clearInterval(x), x = void 0);
4563
4563
  }
4564
- function T() {
4565
- var P;
4566
- k !== void 0 || e.value || ((P = m.value) == null ? void 0 : P.status) === "running" && (k = window.setInterval(() => void W(), Mo));
4564
+ function E() {
4565
+ var F;
4566
+ x !== void 0 || e.value || ((F = m.value) == null ? void 0 : F.status) === "running" && (x = window.setInterval(() => void W(), jo));
4567
4567
  }
4568
4568
  async function W() {
4569
- var P;
4569
+ var F;
4570
4570
  if (e.value) {
4571
4571
  N();
4572
4572
  return;
4573
4573
  }
4574
4574
  try {
4575
- const { run: B } = await Eo(o, a == null ? void 0 : a.value);
4576
- B && D(B), ((P = m.value) == null ? void 0 : P.status) !== "running" ? N() : m.value.updatedAt && Date.now() - new Date(m.value.updatedAt).getTime() > Po && (w.value = !0, N());
4575
+ const { run: B } = await No(o, a == null ? void 0 : a.value);
4576
+ B && j(B), ((F = m.value) == null ? void 0 : F.status) !== "running" ? N() : m.value.updatedAt && Date.now() - new Date(m.value.updatedAt).getTime() > Vo && (y.value = !0, N());
4577
4577
  } catch {
4578
4578
  }
4579
4579
  }
4580
- function D(P, B) {
4581
- B !== void 0 && (b.value = B);
4582
- const g = P.sections.some((z) => {
4583
- var Y;
4584
- const C = (Y = m.value) == null ? void 0 : Y.sections.find((U) => U.id === z.id);
4585
- return z.status === "ok" && (C == null ? void 0 : C.status) !== "ok";
4580
+ function j(F, B) {
4581
+ B !== void 0 && (h.value = B);
4582
+ const _ = F.sections.some((z) => {
4583
+ var H;
4584
+ const g = (H = m.value) == null ? void 0 : H.sections.find((K) => K.id === z.id);
4585
+ return z.status === "ok" && (g == null ? void 0 : g.status) !== "ok";
4586
4586
  });
4587
- m.value = P, w.value = !1, g && v.forEach((z) => z()), T();
4587
+ m.value = F, y.value = !1, _ && b.forEach((z) => z()), E();
4588
4588
  }
4589
- function K(P) {
4590
- var g;
4591
- if (P.name !== "build_run") return;
4592
- const B = P.data;
4593
- Array.isArray(B.sections) && D(
4589
+ function Y(F) {
4590
+ var _;
4591
+ if (F.name !== "build_run") return;
4592
+ const B = F.data;
4593
+ Array.isArray(B.sections) && j(
4594
4594
  {
4595
4595
  runId: B.runId ? String(B.runId) : void 0,
4596
4596
  status: B.status ?? "running",
@@ -4598,442 +4598,443 @@ function Do(o, e, t, a) {
4598
4598
  updatedAt: (/* @__PURE__ */ new Date()).toISOString()
4599
4599
  },
4600
4600
  // first snapshot of this turn claims the anchor; later ones keep it
4601
- (g = m.value) != null && g.runId && m.value.runId === B.runId ? void 0 : (t == null ? void 0 : t.value) ?? null
4601
+ (_ = m.value) != null && _.runId && m.value.runId === B.runId ? void 0 : (t == null ? void 0 : t.value) ?? null
4602
4602
  );
4603
4603
  }
4604
- function q() {
4605
- N(), m.value = null, b.value = null, w.value = !1, I.value = "";
4604
+ function U() {
4605
+ N(), m.value = null, h.value = null, y.value = !1, I.value = "";
4606
4606
  }
4607
- function E(P) {
4608
- P && P.status !== "ok" && D(P, null);
4607
+ function O(F) {
4608
+ F && F.status !== "ok" && j(F, null);
4609
4609
  }
4610
- async function G(P) {
4610
+ async function G(F) {
4611
4611
  var B;
4612
4612
  if (!(!((B = m.value) != null && B.runId) || m.value.status === "running")) {
4613
4613
  I.value = "";
4614
4614
  try {
4615
- const { run: g } = await Oo(
4615
+ const { run: _ } = await $o(
4616
4616
  o,
4617
4617
  m.value.runId,
4618
- P,
4618
+ F,
4619
4619
  s(r.value)
4620
4620
  );
4621
- D(g);
4622
- } catch (g) {
4623
- I.value = g instanceof Error ? g.message : String(g);
4621
+ j(_);
4622
+ } catch (_) {
4623
+ I.value = _ instanceof Error ? _.message : String(_);
4624
4624
  }
4625
4625
  }
4626
4626
  }
4627
4627
  async function J() {
4628
- w.value = !1, await W();
4628
+ y.value = !1, await W();
4629
4629
  }
4630
- return Pe(N), { run: m, anchorId: b, stale: w, retryError: I, seed: E, clear: q, noteEvent: K, retry: G, refresh: J, onLanded: L };
4630
+ return De(N), { run: m, anchorId: h, stale: y, retryError: I, seed: O, clear: U, noteEvent: Y, retry: G, refresh: J, onLanded: L };
4631
4631
  }
4632
- const jo = 380, Vo = 600, jt = 'button:not([disabled]),textarea:not([disabled]),select:not([disabled]),a[href],[tabindex]:not([tabindex="-1"])';
4633
- function Fo(o, e) {
4634
- const t = A(), a = A(), r = A(0);
4635
- let m, b = !1;
4636
- Le(() => {
4637
- !t.value || typeof ResizeObserver > "u" || (m = new ResizeObserver(([k]) => {
4638
- r.value = k.contentRect.width, !b && (b = !0, w.value || (o.value = !1));
4632
+ const Bo = 380, qo = 600, Vt = 'button:not([disabled]),textarea:not([disabled]),select:not([disabled]),a[href],[tabindex]:not([tabindex="-1"])';
4633
+ function Uo(o, e) {
4634
+ const t = T(), a = T(), r = T(0);
4635
+ let m, h = !1;
4636
+ Me(() => {
4637
+ !t.value || typeof ResizeObserver > "u" || (m = new ResizeObserver(([x]) => {
4638
+ r.value = x.contentRect.width, !h && (h = !0, y.value || (o.value = !1));
4639
4639
  }), m.observe(t.value));
4640
- }), Pe(() => m == null ? void 0 : m.disconnect());
4641
- const w = j(
4642
- () => !r.value || r.value >= jo + Vo
4643
- ), I = j(() => o.value && !w.value && !e.value);
4644
- let v = null;
4645
- fe(I, async (k) => {
4646
- var N, T, W;
4647
- if (k) {
4648
- v = document.activeElement, await $e(), (T = (N = a.value) == null ? void 0 : N.querySelector(jt)) == null || T.focus();
4640
+ }), De(() => m == null ? void 0 : m.disconnect());
4641
+ const y = V(
4642
+ () => !r.value || r.value >= Bo + qo
4643
+ ), I = V(() => o.value && !y.value && !e.value);
4644
+ let b = null;
4645
+ de(I, async (x) => {
4646
+ var N, E, W;
4647
+ if (x) {
4648
+ b = document.activeElement, await Ee(), (E = (N = a.value) == null ? void 0 : N.querySelector(Vt)) == null || E.focus();
4649
4649
  return;
4650
4650
  }
4651
- (W = v == null ? void 0 : v.focus) == null || W.call(v), v = null;
4651
+ (W = b == null ? void 0 : b.focus) == null || W.call(b), b = null;
4652
4652
  });
4653
- function L(k) {
4654
- if (k.key !== "Tab" || !I.value || !a.value) return;
4655
- const N = [...a.value.querySelectorAll(jt)];
4653
+ function L(x) {
4654
+ if (x.key !== "Tab" || !I.value || !a.value) return;
4655
+ const N = [...a.value.querySelectorAll(Vt)];
4656
4656
  if (!N.length) return;
4657
- const T = k.shiftKey ? N[0] : N[N.length - 1];
4658
- document.activeElement === T && (k.preventDefault(), (k.shiftKey ? N[N.length - 1] : N[0]).focus());
4657
+ const E = x.shiftKey ? N[0] : N[N.length - 1];
4658
+ document.activeElement === E && (x.preventDefault(), (x.shiftKey ? N[N.length - 1] : N[0]).focus());
4659
4659
  }
4660
- return Le(() => window.addEventListener("keydown", L, !0)), Pe(() => window.removeEventListener("keydown", L, !0)), { root: t, drawer: a, docked: w, modal: I };
4660
+ return Me(() => window.addEventListener("keydown", L, !0)), De(() => window.removeEventListener("keydown", L, !0)), { root: t, drawer: a, docked: y, modal: I };
4661
4661
  }
4662
- const Bo = "page_filters", qo = { class: "flex min-w-0 grow flex-col" }, Uo = { class: "fm-typo-en-title-md-600 block min-w-0 max-w-full overflow-hidden text-ellipsis whitespace-nowrap" }, Ho = { class: "relative shrink-0" }, Wo = {
4662
+ const Ho = "page_filters", Wo = { class: "flex min-w-0 grow flex-col" }, Go = { class: "fm-typo-en-title-md-600 block min-w-0 max-w-full overflow-hidden text-ellipsis whitespace-nowrap" }, Yo = { class: "relative shrink-0" }, Ko = {
4663
4663
  key: 0,
4664
4664
  class: "flex items-center gap-8 border-b border-fm-color-border-secondary px-16 py-8"
4665
- }, Go = {
4665
+ }, Jo = {
4666
4666
  key: 0,
4667
4667
  class: "flex min-w-0 grow items-start overflow-x-auto scrollbar-hide"
4668
- }, Yo = {
4668
+ }, Xo = {
4669
4669
  key: 1,
4670
4670
  class: "grow"
4671
- }, Ko = {
4671
+ }, Qo = {
4672
4672
  key: 2,
4673
4673
  class: "flex shrink-0 items-center gap-4"
4674
- }, Jo = ["aria-pressed", "aria-label", "disabled"], Xo = {
4674
+ }, Zo = ["aria-pressed", "aria-label", "disabled"], ei = {
4675
4675
  key: 1,
4676
4676
  "data-testid": "canvas-draft-bar",
4677
4677
  class: "flex items-center gap-12 border-b border-fm-color-border-secondary bg-fm-color-system-info-100 px-16 py-8"
4678
- }, Qo = { class: "fm-typo-en-body-sm-500 text-fm-color-typo-primary" }, Zo = { class: "fm-typo-en-body-sm-400 grow text-fm-color-typo-secondary" }, ei = {
4678
+ }, ti = { class: "fm-typo-en-body-sm-500 text-fm-color-typo-primary" }, ni = { class: "fm-typo-en-body-sm-400 grow text-fm-color-typo-secondary" }, ai = {
4679
4679
  key: 0,
4680
4680
  class: "fm-typo-en-body-sm-400 text-fm-color-typo-error"
4681
- }, ti = {
4681
+ }, ri = {
4682
4682
  key: 2,
4683
4683
  role: "status",
4684
4684
  class: "fm-typo-en-body-sm-400 flex items-center gap-8 border-b border-fm-color-border-secondary px-16 py-8"
4685
- }, ni = { class: "grow" }, ai = ["aria-label"], ri = {
4685
+ }, oi = { class: "grow" }, ii = ["aria-label"], si = {
4686
4686
  key: 3,
4687
4687
  class: "fm-typo-en-body-sm-400 border-b border-fm-color-border-secondary bg-fm-color-system-warning-100 px-16 py-8"
4688
- }, oi = {
4688
+ }, li = {
4689
4689
  key: 4,
4690
4690
  class: "fm-typo-en-body-sm-400 p-16 text-fm-color-typo-error"
4691
- }, ii = ["srcdoc", "title"], si = ["role", "aria-modal", "aria-label"], li = /* @__PURE__ */ De({
4691
+ }, fi = ["srcdoc", "title"], di = ["role", "aria-modal", "aria-label"], ci = /* @__PURE__ */ je({
4692
4692
  __name: "ReportCanvasView",
4693
4693
  props: {
4694
4694
  reportId: {},
4695
4695
  viewOnly: { type: Boolean }
4696
4696
  },
4697
4697
  setup(o) {
4698
- const e = o, t = vn(), a = yn(), { t: r, te: m } = je(), { currentReport: b } = Ee(In()), w = j(() => {
4698
+ const e = o, t = xn(), a = wn(), { t: r, te: m } = Ve(), { currentReport: h } = Oe(Tn()), y = V(() => {
4699
4699
  var l;
4700
- return Cn(r, m, (l = b.value) == null ? void 0 : l.name, "other");
4701
- }), I = e.reportId || String(t.query.reportId ?? ""), v = A(), L = A(""), k = j(() => {
4700
+ return En(r, m, (l = h.value) == null ? void 0 : l.name, "other");
4701
+ }), I = e.reportId || String(t.query.reportId ?? ""), b = T(), L = T(""), x = V(() => {
4702
4702
  var l;
4703
- return ((l = v.value) == null ? void 0 : l.state) === "draft";
4704
- }), N = j(() => {
4705
- var l, x;
4706
- return ((x = (l = v.value) == null ? void 0 : l.unpublishedTurnIds) == null ? void 0 : x.length) ?? 0;
4707
- }), T = A(!1), W = A(""), D = A(!1), K = A(!1), q = A(!1);
4708
- function E() {
4709
- D.value = !0, g.value = !1;
4703
+ return ((l = b.value) == null ? void 0 : l.state) === "draft";
4704
+ }), N = V(() => {
4705
+ var l, v;
4706
+ return ((v = (l = b.value) == null ? void 0 : l.unpublishedTurnIds) == null ? void 0 : v.length) ?? 0;
4707
+ }), E = T(!1), W = T(""), j = T(!1), Y = T(!1), U = T(!1);
4708
+ function O() {
4709
+ j.value = !0, g.value = !1;
4710
4710
  }
4711
4711
  function G() {
4712
- q.value || (D.value ? D.value = !1 : P.value = !1);
4712
+ U.value || (j.value ? j.value = !1 : _.value = !1);
4713
4713
  }
4714
4714
  async function J(l) {
4715
- await Ye(() => Promise.resolve(l)), D.value = !1, K.value = !0;
4715
+ await Ge(() => Promise.resolve(l)), j.value = !1, Y.value = !0;
4716
4716
  }
4717
- const P = A(!e.viewOnly), B = A(), g = A(!1), z = A(!1), C = A(), Y = A(), U = j({
4718
- get: () => z.value ? C.value : Y.value,
4717
+ const { isAdmin: F } = Sn(), B = V(() => !e.viewOnly && F.value), _ = T(!1), z = T(), g = T(!1), H = T(!1), K = T(), ee = T(), X = V({
4718
+ get: () => H.value ? K.value : ee.value,
4719
4719
  set: (l) => {
4720
- z.value ? C.value = l : Y.value = l;
4720
+ H.value ? K.value = l : ee.value = l;
4721
4721
  }
4722
- }), te = j(
4722
+ }), se = V(
4723
4723
  () => {
4724
4724
  var l;
4725
- return !!U.value && !((l = v.value) != null && l.sections.some(
4726
- (x) => {
4727
- var F, Q;
4728
- return x.id === ((F = U.value) == null ? void 0 : F.sectionId) && x.version === ((Q = U.value) == null ? void 0 : Q.version);
4725
+ return !!X.value && !((l = b.value) != null && l.sections.some(
4726
+ (v) => {
4727
+ var q, Q;
4728
+ return v.id === ((q = X.value) == null ? void 0 : q.sectionId) && v.version === ((Q = X.value) == null ? void 0 : Q.version);
4729
4729
  }
4730
4730
  ));
4731
4731
  }
4732
- ), re = A({});
4733
- function de(l, x) {
4734
- var F;
4732
+ ), ce = T({});
4733
+ function ye(l, v) {
4734
+ var q;
4735
4735
  return String(
4736
- ((F = l.config) == null ? void 0 : F.title) || re.value[l.id] || r("reportV5.reportAi.chat.widgetNumber", { number: x + 1 })
4736
+ ((q = l.config) == null ? void 0 : q.title) || ce.value[l.id] || r("reportV5.reportAi.chat.widgetNumber", { number: v + 1 })
4737
4737
  );
4738
4738
  }
4739
- const ie = A([]), se = A([]), ve = j({
4740
- get: () => z.value ? ie.value : se.value,
4739
+ const he = T([]), le = T([]), oe = V({
4740
+ get: () => H.value ? he.value : le.value,
4741
4741
  set: (l) => {
4742
- z.value ? ie.value = l : se.value = l;
4742
+ H.value ? he.value = l : le.value = l;
4743
4743
  }
4744
4744
  });
4745
- function pe() {
4746
- U.value = void 0, ve.value = [], g.value = !1;
4745
+ function te() {
4746
+ X.value = void 0, oe.value = [], g.value = !1;
4747
4747
  }
4748
- function ce() {
4749
- const l = U.value;
4750
- if (!(l != null && l.element)) return pe();
4751
- const { element: x, ...F } = l, Q = ve.value.shift();
4752
- U.value = Q ? { ...F, element: Q, elementText: Q.text ?? "", elementTag: Q.tag } : F;
4748
+ function xe() {
4749
+ const l = X.value;
4750
+ if (!(l != null && l.element)) return te();
4751
+ const { element: v, ...q } = l, Q = oe.value.shift();
4752
+ X.value = Q ? { ...q, element: Q, elementText: Q.text ?? "", elementTag: Q.tag } : q;
4753
4753
  }
4754
- function Z(l) {
4754
+ function C(l) {
4755
4755
  l.key === "Escape" && (g.value = !1);
4756
4756
  }
4757
- function ye(l, x = []) {
4757
+ function u(l, v = []) {
4758
4758
  var Q;
4759
4759
  if (!g.value || we.value) return;
4760
- const F = (Q = v.value) == null ? void 0 : Q.sections.find((le) => le.id === l.sectionId);
4761
- !F || F.version !== l.version || (U.value = {
4760
+ const q = (Q = b.value) == null ? void 0 : Q.sections.find((fe) => fe.id === l.sectionId);
4761
+ !q || q.version !== l.version || (X.value = {
4762
4762
  ...l,
4763
- viewParams: JSON.parse(JSON.stringify(p.params.value)),
4764
- viewIntent: JSON.parse(JSON.stringify(p.intent.value)),
4765
- label: l.label || de(F, v.value.sections.indexOf(F))
4766
- }, ve.value = x, g.value = !1, P.value = !0);
4767
- }
4768
- const y = A(""), u = A(""), O = A("");
4769
- function M(l) {
4770
- return $.stashDraft(y.value, Y.value), he.clear(), l().then(() => {
4771
- const x = $.recallDraft();
4772
- y.value = x.text, Y.value = x.target, se.value = [], g.value = !1;
4763
+ viewParams: JSON.parse(JSON.stringify($.params.value)),
4764
+ viewIntent: JSON.parse(JSON.stringify($.intent.value)),
4765
+ label: l.label || ye(q, b.value.sections.indexOf(q))
4766
+ }, oe.value = v, g.value = !1, _.value = !0);
4767
+ }
4768
+ const S = T(""), M = T(""), d = T("");
4769
+ function n(l) {
4770
+ return D.stashDraft(S.value, ee.value), ge.clear(), l().then(() => {
4771
+ const v = D.recallDraft();
4772
+ S.value = v.text, ee.value = v.target, le.value = [], g.value = !1;
4773
4773
  });
4774
4774
  }
4775
- async function d(l) {
4776
- if (gt.value) return;
4777
- const x = l ? C.value : void 0, F = l ? [...ie.value] : [];
4775
+ async function i(l) {
4776
+ if (vt.value) return;
4777
+ const v = l ? K.value : void 0, q = l ? [...he.value] : [];
4778
4778
  let Q = !1;
4779
- await M(async () => {
4780
- Q = await $.startChat();
4781
- }), Q && l && (z.value = !1, Y.value = x, se.value = F, C.value = void 0, ie.value = [], y.value = l, await i());
4779
+ await n(async () => {
4780
+ Q = await D.startChat();
4781
+ }), Q && l && (H.value = !1, ee.value = v, le.value = q, K.value = void 0, he.value = [], S.value = l, await A());
4782
4782
  }
4783
- const n = (l) => M(async () => {
4784
- const x = await $.select(l);
4785
- he.seed(x);
4783
+ const f = (l) => n(async () => {
4784
+ const v = await D.select(l);
4785
+ ge.seed(v);
4786
4786
  });
4787
- async function i() {
4788
- const l = y.value.trim();
4789
- if (!(!l || te.value || we.value)) {
4790
- if (O.value = l, y.value = "", await Qt(l, U.value), ht.value) {
4791
- y.value || (y.value = O.value);
4787
+ async function A() {
4788
+ const l = S.value.trim();
4789
+ if (!(!l || se.value || we.value)) {
4790
+ if (d.value = l, S.value = "", await tn(l, X.value), bt.value) {
4791
+ S.value || (S.value = d.value);
4792
4792
  return;
4793
4793
  }
4794
- pe();
4794
+ te();
4795
4795
  }
4796
4796
  }
4797
- function f(l) {
4798
- const x = $.takeUnsent(l);
4799
- if (x)
4800
- return y.value = x.text, U.value = x.target, i();
4801
- }
4802
- const p = ho(I), $ = Lo(I), {
4803
- messages: H,
4804
- sessionId: V,
4805
- title: ae,
4806
- chats: xe,
4807
- chatsCursor: Ce,
4808
- chatsLoading: Ve,
4809
- chatsError: He,
4810
- switching: We,
4811
- earlier: Ge,
4812
- loadingEarlier: Fe,
4797
+ function P(l) {
4798
+ const v = D.takeUnsent(l);
4799
+ if (v)
4800
+ return S.value = v.text, X.value = v.target, A();
4801
+ }
4802
+ const $ = vo(I), D = Do(I), {
4803
+ messages: re,
4804
+ sessionId: be,
4805
+ title: Te,
4806
+ chats: Fe,
4807
+ chatsCursor: Be,
4808
+ chatsLoading: Ke,
4809
+ chatsError: We,
4810
+ switching: Re,
4811
+ earlier: Yt,
4812
+ loadingEarlier: Kt,
4813
4813
  streaming: we,
4814
- turnId: pt,
4815
- activity: Gt,
4816
- error: ht,
4817
- interrupted: Yt,
4818
- unsent: Kt,
4819
- slow: Jt,
4820
- load: Xt,
4821
- send: Qt,
4822
- onLifecycle: Zt,
4823
- onSettled: en
4824
- } = $, { dateRange: Je, selectedLocationIds: Xe, locations: bt, timezone: tn } = Ee(ut()), he = Do(I, we, pt, V), gt = j(
4814
+ turnId: ht,
4815
+ activity: Jt,
4816
+ error: bt,
4817
+ interrupted: Xt,
4818
+ unsent: Qt,
4819
+ slow: Zt,
4820
+ load: en,
4821
+ send: tn,
4822
+ onLifecycle: nn,
4823
+ onSettled: an
4824
+ } = D, { dateRange: Je, selectedLocationIds: Xe, locations: gt, timezone: rn } = Oe(pt()), ge = Fo(I, we, ht, be), vt = V(
4825
4825
  () => {
4826
4826
  var l;
4827
- return we.value || We.value || ((l = he.run.value) == null ? void 0 : l.status) === "running";
4827
+ return we.value || Re.value || ((l = ge.run.value) == null ? void 0 : l.status) === "running";
4828
4828
  }
4829
- ), vt = j(
4829
+ ), yt = V(
4830
4830
  () => {
4831
4831
  var l;
4832
- return ((l = v.value) == null ? void 0 : l.sections.filter((x) => x.id !== Bo)) ?? [];
4832
+ return ((l = b.value) == null ? void 0 : l.sections.filter((v) => v.id !== Ho)) ?? [];
4833
4833
  }
4834
- ), nn = j(() => vt.value.length === 0), yt = j({
4835
- get: () => P.value || D.value,
4834
+ ), xt = V(() => yt.value.length === 0), wt = V({
4835
+ get: () => B.value && _.value || j.value,
4836
4836
  set: (l) => {
4837
- P.value = l, l || (D.value = !1);
4837
+ _.value = l, l || (j.value = !1);
4838
4838
  }
4839
- }), { root: an, drawer: rn, docked: xt, modal: Qe } = Fo(yt, g), on = j(
4839
+ }), { root: on, drawer: sn, docked: Qe, modal: Ze } = Uo(wt, g), ln = V(
4840
4840
  () => {
4841
4841
  var l;
4842
- return ((l = v.value) == null ? void 0 : l.sections.some((x) => x.status === "pending")) ?? !1;
4842
+ return ((l = b.value) == null ? void 0 : l.sections.some((v) => v.status === "pending")) ?? !1;
4843
4843
  }
4844
- ), sn = j(() => we.value ? Ft(Gt.value) : on.value ? "loading" : "updating"), ke = Co(B, {
4845
- onSelectSection: ye,
4844
+ ), fn = V(() => we.value ? Bt(Jt.value) : ln.value ? "loading" : "updating"), ke = Eo(z, {
4845
+ onSelectSection: u,
4846
4846
  onCancelSelection: () => {
4847
4847
  g.value = !1;
4848
4848
  },
4849
- onSetParams: (l, x) => {
4850
- p.setParams(l, x);
4849
+ onSetParams: (l, v) => {
4850
+ $.setParams(l, v);
4851
4851
  },
4852
- onSectionRendered: (l, x, F) => {
4853
- F && (re.value = { ...re.value, [l]: F }), Ze(l, x, "ok");
4852
+ onSectionRendered: (l, v, q) => {
4853
+ q && (ce.value = { ...ce.value, [l]: q }), et(l, v, "ok");
4854
4854
  },
4855
- onSectionError: (l, x, F) => {
4856
- console.warn("[report-canvas] section failed", { reportId: I, sectionId: l, message: F }), Ze(l, x, "error", F);
4855
+ onSectionError: (l, v, q) => {
4856
+ console.warn("[report-canvas] section failed", { reportId: I, sectionId: l, message: q }), et(l, v, "error", q);
4857
4857
  },
4858
- onSectionLayout: (l, x, F) => {
4859
- var le;
4860
- const Q = (le = v.value) == null ? void 0 : le.sections.find((ne) => ne.id === l);
4861
- (Q == null ? void 0 : Q.status) === "ok" && Ze(l, x, "ok", void 0, F);
4858
+ onSectionLayout: (l, v, q) => {
4859
+ var fe;
4860
+ const Q = (fe = b.value) == null ? void 0 : fe.sections.find((ae) => ae.id === l);
4861
+ (Q == null ? void 0 : Q.status) === "ok" && et(l, v, "ok", void 0, q);
4862
4862
  }
4863
4863
  });
4864
- p.onResult((l) => ke.pushRows(l)), p.onParamsChanged(() => ke.pushParams(p.paramState())), p.bindStore(), fe([g, U, ke.ready, we], () => {
4865
- ke.setCommentMode(g.value && !we.value, U.value);
4864
+ $.onResult((l) => ke.pushRows(l)), $.onParamsChanged(() => ke.pushParams($.paramState())), $.bindStore(), de([g, X, ke.ready, we], () => {
4865
+ ke.setCommentMode(g.value && !we.value, X.value);
4866
4866
  });
4867
- async function Ze(l, x, F, Q, le) {
4868
- var ze, qe;
4869
- const ne = (ze = v.value) == null ? void 0 : ze.sections.find((Re) => Re.id === l);
4870
- if (!ne || x !== ne.version) return;
4871
- const Ae = F === "error" ? Q ?? "the section failed to render" : void 0, _e = le ?? ne.warnings ?? [];
4872
- if (!(ne.status === F && ne.error === Ae && (ne.warnings ?? []).join(`
4867
+ async function et(l, v, q, Q, fe) {
4868
+ var Ne, Ue;
4869
+ const ae = (Ne = b.value) == null ? void 0 : Ne.sections.find((Le) => Le.id === l);
4870
+ if (!ae || v !== ae.version) return;
4871
+ const Ce = q === "error" ? Q ?? "the section failed to render" : void 0, _e = fe ?? ae.warnings ?? [];
4872
+ if (!(ae.status === q && ae.error === Ce && (ae.warnings ?? []).join(`
4873
4873
  `) === _e.join(`
4874
4874
  `))) {
4875
- ne.status = F, ne.error = Ae, ne.warnings = _e.length ? _e : void 0;
4875
+ ae.status = q, ae.error = Ce, ae.warnings = _e.length ? _e : void 0;
4876
4876
  try {
4877
- await hr(
4877
+ await vr(
4878
4878
  I,
4879
4879
  l,
4880
- { version: x, status: F, error: Ae, warnings: _e },
4881
- (qe = v.value) == null ? void 0 : qe.state
4880
+ { version: v, status: q, error: Ce, warnings: _e },
4881
+ (Ue = b.value) == null ? void 0 : Ue.state
4882
4882
  );
4883
- } catch (Re) {
4884
- console.warn("[report-canvas] ack failed", { reportId: I, sectionId: l, err: Re });
4883
+ } catch (Le) {
4884
+ console.warn("[report-canvas] ack failed", { reportId: I, sectionId: l, err: Le });
4885
4885
  }
4886
4886
  }
4887
4887
  }
4888
- async function Ye(l) {
4889
- if (!T.value) {
4890
- T.value = !0, W.value = "";
4888
+ async function Ge(l) {
4889
+ if (!E.value) {
4890
+ E.value = !0, W.value = "";
4891
4891
  try {
4892
- const x = await l();
4893
- v.value = x, p.load(x), await ke.init(x.sections, p.paramState(), p.env());
4894
- } catch (x) {
4895
- W.value = x instanceof Error ? x.message : String(x);
4892
+ const v = await l();
4893
+ b.value = v, $.load(v), await ke.init(v.sections, $.paramState(), $.env());
4894
+ } catch (v) {
4895
+ W.value = v instanceof Error ? v.message : String(v);
4896
4896
  } finally {
4897
- T.value = !1;
4897
+ E.value = !1;
4898
4898
  }
4899
4899
  }
4900
4900
  }
4901
- const ln = () => Ye(() => br(I)), fn = () => Ye(() => gr(I)), dn = (l) => Ye(() => vr(I, l));
4902
- async function cn() {
4901
+ const dn = () => Ge(() => yr(I)), cn = () => Ge(() => xr(I)), mn = (l) => Ge(() => wr(I, l));
4902
+ async function un() {
4903
4903
  try {
4904
4904
  L.value = "";
4905
- const l = await $t(I);
4906
- v.value = l, p.load(l), await ke.init(l.sections, p.paramState(), p.env());
4905
+ const l = await Rt(I);
4906
+ b.value = l, $.load(l), B.value && xt.value && Qe.value && (_.value = !0), await Ee(), await ke.init(l.sections, $.paramState(), $.env());
4907
4907
  } catch (l) {
4908
4908
  L.value = l instanceof Error ? l.message : String(l);
4909
4909
  }
4910
4910
  }
4911
- const et = /* @__PURE__ */ new Set();
4912
- let Be = null, tt = !1;
4913
- function nt() {
4914
- return Be ? (tt = !0, Be) : (Be = (async () => {
4911
+ const tt = /* @__PURE__ */ new Set();
4912
+ let qe = null, nt = !1;
4913
+ function at() {
4914
+ return qe ? (nt = !0, qe) : (qe = (async () => {
4915
4915
  do {
4916
- tt = !1;
4916
+ nt = !1;
4917
4917
  try {
4918
- await mn();
4918
+ await pn();
4919
4919
  } catch (l) {
4920
4920
  console.warn("[report-canvas] refresh failed", { reportId: I, err: l });
4921
4921
  }
4922
- } while (tt);
4922
+ } while (nt);
4923
4923
  })().finally(() => {
4924
- Be = null;
4925
- }), Be);
4926
- }
4927
- async function mn() {
4928
- var Ae, _e;
4929
- const l = (((Ae = v.value) == null ? void 0 : Ae.sections) ?? []).map((oe) => oe.id), x = new Map(
4930
- (((_e = v.value) == null ? void 0 : _e.sections) ?? []).map((oe) => [oe.id, oe.version])
4931
- ), F = await $t(I);
4932
- v.value = F;
4933
- const Q = [...et];
4934
- et.clear(), p.applyCanvas(F, Q) && ke.pushParams(p.paramState());
4935
- const le = F.sections.map((oe) => oe.id);
4936
- if (le.length !== l.length || le.some((oe, ze) => oe !== l[ze])) {
4937
- await ke.init(F.sections, p.paramState(), p.env());
4924
+ qe = null;
4925
+ }), qe);
4926
+ }
4927
+ async function pn() {
4928
+ var Ce, _e;
4929
+ const l = (((Ce = b.value) == null ? void 0 : Ce.sections) ?? []).map((ie) => ie.id), v = new Map(
4930
+ (((_e = b.value) == null ? void 0 : _e.sections) ?? []).map((ie) => [ie.id, ie.version])
4931
+ ), q = await Rt(I);
4932
+ b.value = q;
4933
+ const Q = [...tt];
4934
+ tt.clear(), $.applyCanvas(q, Q) && ke.pushParams($.paramState());
4935
+ const fe = q.sections.map((ie) => ie.id);
4936
+ if (fe.length !== l.length || fe.some((ie, Ne) => ie !== l[Ne])) {
4937
+ await ke.init(q.sections, $.paramState(), $.env());
4938
4938
  return;
4939
4939
  }
4940
- const ne = F.sections.filter(
4941
- (oe) => x.get(oe.id) !== oe.version
4940
+ const ae = q.sections.filter(
4941
+ (ie) => v.get(ie.id) !== ie.version
4942
4942
  );
4943
- ne.length && await ke.swapSections(ne);
4943
+ ae.length && await ke.swapSections(ae);
4944
4944
  }
4945
- const un = ["param_written", "sql_written", "section_written", "deleted", "reordered"];
4946
- Zt((l) => {
4947
- l.name === "sql_written" && typeof l.data.queryId == "string" && et.add(l.data.queryId), un.includes(l.name) && nt(), he.noteEvent(l);
4948
- }), en(() => void nt()), he.onLanded(() => void nt()), fe([bt, tn], () => {
4949
- v.value && ke.pushEnv(p.env());
4945
+ const hn = ["param_written", "sql_written", "section_written", "deleted", "reordered"];
4946
+ nn((l) => {
4947
+ l.name === "sql_written" && typeof l.data.queryId == "string" && tt.add(l.data.queryId), hn.includes(l.name) && at(), ge.noteEvent(l);
4948
+ }), an(() => void at()), ge.onLanded(() => void at()), de([gt, rn], () => {
4949
+ b.value && ke.pushEnv($.env());
4950
4950
  });
4951
- const pn = j(
4952
- () => Object.values(p.results.value).some((l) => l.truncated)
4951
+ const bn = V(
4952
+ () => Object.values($.results.value).some((l) => l.truncated)
4953
4953
  );
4954
- return Le(async () => {
4955
- window.addEventListener("keydown", Z), await cn(), e.viewOnly || he.seed(await Xt());
4956
- }), Pe(() => window.removeEventListener("keydown", Z)), (l, x) => {
4957
- var Ae, _e, oe, ze, qe, Re;
4958
- const F = Ie("FmTooltip"), Q = Ie("FmPageHead"), le = Ie("FmButton"), ne = Ie("FmIcon");
4959
- return c(), h("div", {
4954
+ return Me(async () => {
4955
+ window.addEventListener("keydown", C), await un(), B.value && ge.seed(await en());
4956
+ }), De(() => window.removeEventListener("keydown", C)), (l, v) => {
4957
+ var Ce, _e, ie, Ne, Ue, Le;
4958
+ const q = Ie("FmTooltip"), Q = Ie("FmPageHead"), fe = Ie("FmButton"), ae = Ie("FmIcon");
4959
+ return c(), p("div", {
4960
4960
  ref_key: "root",
4961
- ref: an,
4961
+ ref: on,
4962
4962
  class: "relative flex h-full min-h-0 w-full"
4963
4963
  }, [
4964
- _("div", qo, [
4965
- l.viewOnly ? R("", !0) : (c(), ge(Q, {
4964
+ w("div", Wo, [
4965
+ l.viewOnly ? R("", !0) : (c(), me(Q, {
4966
4966
  key: 0,
4967
4967
  class: "remove-line-clamping shrink-0",
4968
- title: w.value,
4968
+ title: y.value,
4969
4969
  "back-button": !0,
4970
- "onClick:back": x[0] || (x[0] = (ee) => s(a).push({ name: "reports", query: s(t).query }))
4970
+ "onClick:back": v[0] || (v[0] = (ne) => s(a).push({ name: "reports", query: s(t).query }))
4971
4971
  }, {
4972
- title: Ne(() => [
4973
- X(F, {
4974
- content: w.value,
4972
+ title: $e(() => [
4973
+ Z(q, {
4974
+ content: y.value,
4975
4975
  placement: "bottom",
4976
4976
  "z-index": 2e3,
4977
4977
  class: "flex min-w-0 max-w-full justify-start"
4978
4978
  }, {
4979
- default: Ne(() => [
4980
- _("p", Uo, S(w.value), 1)
4979
+ default: $e(() => [
4980
+ w("p", Go, k(y.value), 1)
4981
4981
  ]),
4982
4982
  _: 1
4983
4983
  }, 8, ["content"])
4984
4984
  ]),
4985
4985
  _: 1
4986
4986
  }, 8, ["title"])),
4987
- _("div", Ho, [
4988
- !l.viewOnly || ((Ae = v.value) == null ? void 0 : Ae.hostFilters) !== !1 ? (c(), h("div", Wo, [
4989
- ((_e = v.value) == null ? void 0 : _e.hostFilters) !== !1 ? (c(), h("div", Go, [
4990
- X(kn, {
4987
+ w("div", Yo, [
4988
+ !l.viewOnly || ((Ce = b.value) == null ? void 0 : Ce.hostFilters) !== !1 ? (c(), p("div", Ko, [
4989
+ ((_e = b.value) == null ? void 0 : _e.hostFilters) !== !1 ? (c(), p("div", Jo, [
4990
+ Z(In, {
4991
4991
  modelValue: s(Xe),
4992
- "onUpdate:modelValue": x[2] || (x[2] = (ee) => St(Xe) ? Xe.value = ee : null),
4993
- options: s(bt)
4992
+ "onUpdate:modelValue": v[2] || (v[2] = (ne) => It(Xe) ? Xe.value = ne : null),
4993
+ options: s(gt)
4994
4994
  }, {
4995
- default: Ne(() => [
4996
- X(_n, {
4995
+ default: $e(() => [
4996
+ Z(Cn, {
4997
4997
  "date-range": s(Je),
4998
- "onUpdate:dateRange": x[1] || (x[1] = (ee) => St(Je) ? Je.value = ee : null)
4998
+ "onUpdate:dateRange": v[1] || (v[1] = (ne) => It(Je) ? Je.value = ne : null)
4999
4999
  }, null, 8, ["date-range"])
5000
5000
  ]),
5001
5001
  _: 1
5002
5002
  }, 8, ["modelValue", "options"])
5003
- ])) : (c(), h("div", Yo)),
5004
- vt.value.length && !l.viewOnly ? (c(), h("div", Ko, [
5005
- (oe = v.value) != null && oe.canEdit && ((ze = v.value) != null && ze.publishedAt) ? (c(), ge(le, {
5003
+ ])) : (c(), p("div", Xo)),
5004
+ yt.value.length && !l.viewOnly ? (c(), p("div", Qo, [
5005
+ (ie = b.value) != null && ie.canEdit && ((Ne = b.value) != null && Ne.publishedAt) ? (c(), me(fe, {
5006
5006
  key: 0,
5007
5007
  "data-testid": "canvas-versions-open",
5008
5008
  variant: "tertiary",
5009
5009
  "prepend-icon": "history",
5010
5010
  label: s(r)("reportV5.reportCanvas.draft.history"),
5011
- "aria-expanded": D.value,
5012
- onClick: E
5011
+ "aria-expanded": j.value,
5012
+ onClick: O
5013
5013
  }, null, 8, ["label", "aria-expanded"])) : R("", !0),
5014
- X(F, {
5014
+ B.value ? (c(), me(q, {
5015
+ key: 1,
5015
5016
  placement: "bottom",
5016
5017
  content: s(r)(
5017
5018
  g.value ? "reportV5.reportAi.chat.cancelSelection" : "reportV5.reportAi.chat.commentWidget"
5018
5019
  )
5019
5020
  }, {
5020
- default: Ne(() => [
5021
- _("button", {
5021
+ default: $e(() => [
5022
+ w("button", {
5022
5023
  "data-testid": "canvas-comment-toggle",
5023
- class: Me(["canvas-comment-target flex h-32 w-32 items-center justify-center rounded-md text-fm-color-typo-secondary disabled:opacity-50", g.value && "bg-fm-color-neutral-gray-100 text-fm-color-primary"]),
5024
+ class: Pe(["canvas-comment-target flex h-32 w-32 items-center justify-center rounded-md text-fm-color-typo-secondary disabled:opacity-50", g.value && "bg-fm-color-neutral-gray-100 text-fm-color-primary"]),
5024
5025
  "aria-pressed": g.value,
5025
5026
  "aria-label": s(r)("reportV5.reportAi.chat.commentWidget"),
5026
- disabled: s(we) || D.value,
5027
- onClick: x[3] || (x[3] = (ee) => g.value = !g.value)
5028
- }, x[15] || (x[15] = [
5029
- _("svg", {
5027
+ disabled: s(we) || j.value,
5028
+ onClick: v[3] || (v[3] = (ne) => g.value = !g.value)
5029
+ }, v[15] || (v[15] = [
5030
+ w("svg", {
5030
5031
  width: "20",
5031
5032
  height: "20",
5032
5033
  viewBox: "0 0 20 20",
5033
5034
  fill: "none",
5034
5035
  "aria-hidden": "true"
5035
5036
  }, [
5036
- _("path", {
5037
+ w("path", {
5037
5038
  d: "M5 3.5h5a6.5 6.5 0 1 1-6.5 6.5V5A1.5 1.5 0 0 1 5 3.5Z",
5038
5039
  stroke: "currentColor",
5039
5040
  "stroke-width": "1.5",
@@ -5041,150 +5042,150 @@ const Bo = "page_filters", qo = { class: "flex min-w-0 grow flex-col" }, Uo = {
5041
5042
  "stroke-linejoin": "round"
5042
5043
  })
5043
5044
  ], -1)
5044
- ]), 10, Jo)
5045
+ ]), 10, Zo)
5045
5046
  ]),
5046
5047
  _: 1
5047
- }, 8, ["content"]),
5048
- !P.value && !D.value ? (c(), ge(le, {
5049
- key: 1,
5048
+ }, 8, ["content"])) : R("", !0),
5049
+ B.value && !_.value && !j.value ? (c(), me(fe, {
5050
+ key: 2,
5050
5051
  "data-testid": "report-canvas-chat-open",
5051
5052
  variant: "tertiary",
5052
5053
  "prepend-icon": "auto_awesome",
5053
5054
  label: s(r)("reportV5.reportAi.chat.open"),
5054
- onClick: x[4] || (x[4] = (ee) => P.value = !0)
5055
+ onClick: v[4] || (v[4] = (ne) => _.value = !0)
5055
5056
  }, null, 8, ["label"])) : R("", !0)
5056
5057
  ])) : R("", !0)
5057
5058
  ])) : R("", !0)
5058
5059
  ]),
5059
- k.value && !l.viewOnly ? (c(), h("div", Xo, [
5060
- _("span", Qo, S(s(r)("reportV5.reportCanvas.draft.pending", { count: N.value })), 1),
5061
- _("span", Zo, S(s(r)("reportV5.reportCanvas.draft.hint")), 1),
5062
- W.value ? (c(), h("span", ei, S(W.value), 1)) : R("", !0),
5063
- X(le, {
5060
+ x.value && !l.viewOnly ? (c(), p("div", ei, [
5061
+ w("span", ti, k(s(r)("reportV5.reportCanvas.draft.pending", { count: N.value })), 1),
5062
+ w("span", ni, k(s(r)("reportV5.reportCanvas.draft.hint")), 1),
5063
+ W.value ? (c(), p("span", ai, k(W.value), 1)) : R("", !0),
5064
+ Z(fe, {
5064
5065
  "data-testid": "canvas-draft-discard",
5065
5066
  variant: "tertiary",
5066
5067
  label: s(r)("reportV5.reportCanvas.draft.discard"),
5067
- disabled: T.value,
5068
- onClick: fn
5068
+ disabled: E.value,
5069
+ onClick: cn
5069
5070
  }, null, 8, ["label", "disabled"]),
5070
- X(le, {
5071
+ Z(fe, {
5071
5072
  "data-testid": "canvas-draft-publish",
5072
5073
  variant: "primary",
5073
5074
  label: s(r)("reportV5.reportCanvas.draft.publish"),
5074
- disabled: T.value,
5075
- onClick: ln
5075
+ disabled: E.value,
5076
+ onClick: dn
5076
5077
  }, null, 8, ["label", "disabled"])
5077
5078
  ])) : R("", !0),
5078
- K.value ? (c(), h("div", ti, [
5079
- X(ne, {
5079
+ Y.value ? (c(), p("div", ri, [
5080
+ Z(ae, {
5080
5081
  name: "check_circle",
5081
5082
  size: "sm"
5082
5083
  }),
5083
- _("span", ni, S(s(r)("reportV5.reportCanvas.history.restored")), 1),
5084
- _("button", {
5084
+ w("span", oi, k(s(r)("reportV5.reportCanvas.history.restored")), 1),
5085
+ w("button", {
5085
5086
  class: "flex h-32 w-32 items-center justify-center rounded-md",
5086
5087
  "aria-label": s(r)("reportV5.reportCanvas.draft.close"),
5087
- onClick: x[5] || (x[5] = (ee) => K.value = !1)
5088
+ onClick: v[5] || (v[5] = (ne) => Y.value = !1)
5088
5089
  }, [
5089
- X(ne, {
5090
+ Z(ae, {
5090
5091
  name: "close",
5091
5092
  size: "sm"
5092
5093
  })
5093
- ], 8, ai)
5094
+ ], 8, ii)
5094
5095
  ])) : R("", !0),
5095
- pn.value ? (c(), h("div", ri, S(s(r)("reportV5.reportCanvas.canvas.truncated")), 1)) : R("", !0),
5096
- L.value ? (c(), h("p", oi, S(L.value), 1)) : R("", !0),
5097
- bn(_("iframe", {
5096
+ bn.value ? (c(), p("div", si, k(s(r)("reportV5.reportCanvas.canvas.truncated")), 1)) : R("", !0),
5097
+ L.value ? (c(), p("p", li, k(L.value), 1)) : R("", !0),
5098
+ vn(w("iframe", {
5098
5099
  ref_key: "frame",
5099
- ref: B,
5100
+ ref: z,
5100
5101
  "data-testid": "report-canvas-frame",
5101
5102
  class: "min-h-0 grow border-0",
5102
- srcdoc: s(So),
5103
+ srcdoc: s(Ao),
5103
5104
  sandbox: "allow-scripts",
5104
5105
  title: s(r)("reportV5.reportCanvas.canvas.title")
5105
- }, null, 8, ii), [
5106
- [gn, !L.value]
5106
+ }, null, 8, fi), [
5107
+ [yn, !L.value]
5107
5108
  ])
5108
5109
  ]),
5109
- s(Qe) ? (c(), h("div", {
5110
+ s(Ze) ? (c(), p("div", {
5110
5111
  key: 0,
5111
5112
  class: "canvas-scrim absolute inset-0 z-20",
5112
5113
  onClick: G
5113
5114
  })) : R("", !0),
5114
- !l.viewOnly && yt.value && (s(xt) || !g.value) ? (c(), h("div", {
5115
+ !l.viewOnly && wt.value && (s(Qe) || !g.value) ? (c(), p("div", {
5115
5116
  key: 1,
5116
5117
  ref_key: "drawer",
5117
- ref: rn,
5118
- class: Me(
5119
- s(xt) ? "w-[380px] shrink-0" : "absolute inset-y-0 right-0 z-30 w-full max-w-[380px] shadow-lg"
5118
+ ref: sn,
5119
+ class: Pe(
5120
+ s(Qe) ? "w-[380px] shrink-0" : "absolute inset-y-0 right-0 z-30 w-full max-w-[380px] shadow-lg"
5120
5121
  ),
5121
- role: s(Qe) ? "dialog" : void 0,
5122
- "aria-modal": s(Qe) ? "true" : void 0,
5123
- "aria-label": s(r)(D.value ? "reportV5.reportCanvas.draft.history" : "reportV5.reportAi.chat.title")
5122
+ role: s(Ze) ? "dialog" : void 0,
5123
+ "aria-modal": s(Ze) ? "true" : void 0,
5124
+ "aria-label": s(r)(j.value ? "reportV5.reportCanvas.draft.history" : "reportV5.reportAi.chat.title")
5124
5125
  }, [
5125
- D.value ? (c(), ge(io, {
5126
+ j.value ? (c(), me(fo, {
5126
5127
  key: 0,
5127
5128
  "report-id": s(I),
5128
- "published-at": (qe = v.value) == null ? void 0 : qe.publishedAt,
5129
- timezone: s(p).env().timezone,
5130
- "has-draft": k.value,
5131
- busy: s(we) || T.value,
5132
- onClose: x[6] || (x[6] = (ee) => D.value = !1),
5129
+ "published-at": (Ue = b.value) == null ? void 0 : Ue.publishedAt,
5130
+ timezone: s($).env().timezone,
5131
+ "has-draft": x.value,
5132
+ busy: s(we) || E.value,
5133
+ onClose: v[6] || (v[6] = (ne) => j.value = !1),
5133
5134
  onRestored: J,
5134
- onRestoring: x[7] || (x[7] = (ee) => q.value = ee)
5135
- }, null, 8, ["report-id", "published-at", "timezone", "has-draft", "busy"])) : (c(), ge(ur, {
5135
+ onRestoring: v[7] || (v[7] = (ne) => U.value = ne)
5136
+ }, null, 8, ["report-id", "published-at", "timezone", "has-draft", "busy"])) : (c(), me(br, {
5136
5137
  key: 1,
5137
- "home-draft": u.value,
5138
- "onUpdate:homeDraft": x[8] || (x[8] = (ee) => u.value = ee),
5139
- "home-open": z.value,
5140
- "onUpdate:homeOpen": x[9] || (x[9] = (ee) => z.value = ee),
5141
- messages: s(H),
5142
- draft: y.value,
5143
- target: U.value,
5144
- "target-stale": te.value,
5138
+ "home-draft": M.value,
5139
+ "onUpdate:homeDraft": v[8] || (v[8] = (ne) => M.value = ne),
5140
+ "home-open": H.value,
5141
+ "onUpdate:homeOpen": v[9] || (v[9] = (ne) => H.value = ne),
5142
+ messages: s(re),
5143
+ draft: S.value,
5144
+ target: X.value,
5145
+ "target-stale": se.value,
5145
5146
  streaming: s(we),
5146
- "turn-id": s(pt),
5147
- phase: sn.value,
5148
- slow: s(Jt),
5149
- error: s(ht),
5150
- interrupted: s(Yt),
5151
- blank: nn.value,
5152
- run: s(he).run.value,
5153
- "run-anchor-id": s(he).anchorId.value,
5154
- "run-stale": s(he).stale.value,
5155
- "retry-error": s(he).retryError.value,
5156
- "undoable-turn-ids": ((Re = v.value) == null ? void 0 : Re.unpublishedTurnIds) ?? [],
5157
- undoing: T.value,
5158
- "unsent-ids": s(Kt),
5159
- "chat-id": s(V),
5160
- "chat-title": s(ae),
5161
- chats: s(xe),
5162
- "chats-cursor": s(Ce),
5163
- "chats-loading": s(Ve),
5164
- "chats-error": s(He),
5165
- switching: s(We),
5166
- busy: gt.value,
5167
- earlier: s(Ge),
5168
- "loading-earlier": s(Fe),
5169
- "onUpdate:draft": x[10] || (x[10] = (ee) => y.value = ee),
5170
- onClearTarget: ce,
5171
- onSubmit: i,
5172
- onClose: x[11] || (x[11] = (ee) => P.value = !1),
5173
- onRetry: s(he).retry,
5174
- onUndo: dn,
5175
- onResend: f,
5176
- onCheckStatus: s(he).refresh,
5177
- onNewChat: d,
5178
- onSelectChat: n,
5179
- onLoadChats: x[12] || (x[12] = (ee) => s($).loadChats()),
5180
- onLoadMoreChats: x[13] || (x[13] = (ee) => s($).loadChats(s(Ce) ?? void 0)),
5181
- onLoadEarlier: x[14] || (x[14] = (ee) => s($).loadEarlier())
5147
+ "turn-id": s(ht),
5148
+ phase: fn.value,
5149
+ slow: s(Zt),
5150
+ error: s(bt),
5151
+ interrupted: s(Xt),
5152
+ blank: xt.value,
5153
+ run: s(ge).run.value,
5154
+ "run-anchor-id": s(ge).anchorId.value,
5155
+ "run-stale": s(ge).stale.value,
5156
+ "retry-error": s(ge).retryError.value,
5157
+ "undoable-turn-ids": ((Le = b.value) == null ? void 0 : Le.unpublishedTurnIds) ?? [],
5158
+ undoing: E.value,
5159
+ "unsent-ids": s(Qt),
5160
+ "chat-id": s(be),
5161
+ "chat-title": s(Te),
5162
+ chats: s(Fe),
5163
+ "chats-cursor": s(Be),
5164
+ "chats-loading": s(Ke),
5165
+ "chats-error": s(We),
5166
+ switching: s(Re),
5167
+ busy: vt.value,
5168
+ earlier: s(Yt),
5169
+ "loading-earlier": s(Kt),
5170
+ "onUpdate:draft": v[10] || (v[10] = (ne) => S.value = ne),
5171
+ onClearTarget: xe,
5172
+ onSubmit: A,
5173
+ onClose: v[11] || (v[11] = (ne) => _.value = !1),
5174
+ onRetry: s(ge).retry,
5175
+ onUndo: mn,
5176
+ onResend: P,
5177
+ onCheckStatus: s(ge).refresh,
5178
+ onNewChat: i,
5179
+ onSelectChat: f,
5180
+ onLoadChats: v[12] || (v[12] = (ne) => s(D).loadChats()),
5181
+ onLoadMoreChats: v[13] || (v[13] = (ne) => s(D).loadChats(s(Be) ?? void 0)),
5182
+ onLoadEarlier: v[14] || (v[14] = (ne) => s(D).loadEarlier())
5182
5183
  }, null, 8, ["home-draft", "home-open", "messages", "draft", "target", "target-stale", "streaming", "turn-id", "phase", "slow", "error", "interrupted", "blank", "run", "run-anchor-id", "run-stale", "retry-error", "undoable-turn-ids", "undoing", "unsent-ids", "chat-id", "chat-title", "chats", "chats-cursor", "chats-loading", "chats-error", "switching", "busy", "earlier", "loading-earlier", "onRetry", "onCheckStatus"]))
5183
- ], 10, si)) : R("", !0)
5184
+ ], 10, di)) : R("", !0)
5184
5185
  ], 512);
5185
5186
  };
5186
5187
  }
5187
- }), yi = /* @__PURE__ */ mt(li, [["__scopeId", "data-v-abff964f"]]);
5188
+ }), ki = /* @__PURE__ */ ut(ci, [["__scopeId", "data-v-14b7e3fc"]]);
5188
5189
  export {
5189
- yi as default
5190
+ ki as default
5190
5191
  };