@feedmepos/mf-report 5.33.3-beta.0 → 5.34.0-beta.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 (46) hide show
  1. package/dist/{App-GzjtZ_d7.js → App-DyrakazI.js} +98 -97
  2. package/dist/{DateRangeSelect-CfV_WX9B.js → DateRangeSelect-D5SGi6ca.js} +67 -67
  3. package/dist/{Default.vue_vue_type_script_setup_true_lang-Y9S0SZ7o.js → Default.vue_vue_type_script_setup_true_lang-DsTRZa_6.js} +3 -3
  4. package/dist/DigestListView-BnkDRa7x.js +876 -0
  5. package/dist/{DigestReaderView-C1aKtovl.js → DigestReaderView-ByISB4qT.js} +63 -63
  6. package/dist/{DynamicWidget.vue_vue_type_script_setup_true_lang-CH2pf4XK.js → DynamicWidget.vue_vue_type_script_setup_true_lang-BKNNtuyG.js} +733 -733
  7. package/dist/{GlobalFilterSelect.vue_vue_type_script_setup_true_lang-DJ-LIqFg.js → GlobalFilterSelect.vue_vue_type_script_setup_true_lang-DHrnVaog.js} +526 -526
  8. package/dist/{InsightView-O5pzXY-g.js → InsightView-CUBTqwTI.js} +88 -88
  9. package/dist/{Integration-DHtuuAEx.js → Integration-WDbqUebw.js} +30 -30
  10. package/dist/{Integrations-xK1WbyH5.js → Integrations-C5_nERZt.js} +10 -10
  11. package/dist/{Layout-QoN7zexW.js → Layout-BqzoK8Mg.js} +3 -3
  12. package/dist/{LocationSelect.vue_vue_type_script_setup_true_lang-DEeDj0JI.js → LocationSelect.vue_vue_type_script_setup_true_lang-kvdk_gEw.js} +306 -306
  13. package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-tmHI7t6B.js → MenuTab.vue_vue_type_script_setup_true_lang-B8uHS4bV.js} +6 -6
  14. package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-DNrIAtGk.js → NavigationTab.vue_vue_type_script_setup_true_lang-CpexikuB.js} +12784 -11760
  15. package/dist/{OverviewView-CcqkLuon.js → OverviewView-mOEI9DAV.js} +7 -7
  16. package/dist/{Report-CcGTeCCn.js → Report-DmbTzjbj.js} +12 -12
  17. package/dist/{ReportCanvasView-C7CJq01e.js → ReportCanvasView-BqZ38Tsk.js} +426 -426
  18. package/dist/{ReportEditor-Vu592FeV.js → ReportEditor-8oAVfFdY.js} +32 -32
  19. package/dist/{ReportView-D-J7pmp5.js → ReportView-B6nE3qwV.js} +13 -13
  20. package/dist/{ReportViewRoute-TSaFpVVj.js → ReportViewRoute-DqXbM93B.js} +5 -5
  21. package/dist/SelectComponent.vue_vue_type_script_setup_true_lang-Cxx-TQz9.js +137 -0
  22. package/dist/{Setting-tUrQLnqy.js → Setting-C01x-O-V.js} +6 -6
  23. package/dist/{Template-DRdVU80G.js → Template-VyBWHUXE.js} +80 -80
  24. package/dist/{TileEditor-CIR7d_cP.js → TileEditor-DICyBR1o.js} +1566 -1566
  25. package/dist/{TilePageStack.vue_vue_type_script_setup_true_lang-BtHZMHPR.js → TilePageStack.vue_vue_type_script_setup_true_lang-Dyaao76o.js} +82 -82
  26. package/dist/{TransitionFade-7EvXhuHo.js → TransitionFade-kXCDPEMQ.js} +170 -170
  27. package/dist/{XeroRedirect-CuTrP62C.js → XeroRedirect-D4sHbZe7.js} +3 -3
  28. package/dist/_plugin-vue_export-helper-Bx7s49ra.js +2828 -0
  29. package/dist/{app-1dD87x1L.js → app-BQDKX7NB.js} +5688 -13890
  30. package/dist/app.js +1 -1
  31. package/dist/assets/{formatChartData.worker-DvK7K5ca.js → formatChartData.worker-Cpgnh20a.js} +62 -62
  32. package/dist/assets/{processTableData.worker-C3l4iUXL.js → processTableData.worker-B7I6PElJ.js} +64 -64
  33. package/dist/{chart-BywXiz4O.js → chart-DU0N9V2o.js} +7 -4
  34. package/dist/currency-8SmajsvB.js +12 -0
  35. package/dist/index-BQ8NJuCA.js +24722 -0
  36. package/dist/{report-B547gOvv.js → report-CcXsPATD.js} +23 -23
  37. package/dist/style.css +1 -1
  38. package/dist/{useDigestFont-CVDCu0Is.js → useDigestFont-CjZZOIRM.js} +80 -80
  39. package/dist/{useReportCanvasPanel-DLt-AkFQ.js → useReportCanvasPanel-dWlB_xvo.js} +975 -976
  40. package/dist/{useRestaurantPermission-BtRjWi-p.js → useRestaurantPermission-D3G7ET0Z.js} +2 -2
  41. package/package.json +11 -11
  42. package/dist/DigestListView-DJQikkEC.js +0 -876
  43. package/dist/SelectComponent.vue_vue_type_script_setup_true_lang-DW7Dk7iQ.js +0 -137
  44. package/dist/_plugin-vue_export-helper-C6QDExPN.js +0 -2718
  45. package/dist/currency-BXCfWg4A.js +0 -12
  46. package/dist/index-B_yQyaGT.js +0 -25511
@@ -1,13 +1,13 @@
1
- import { defineComponent as ut, ref as d, computed as k, watch as $e, onMounted as dt, onBeforeUnmount as He, resolveComponent as re, createElementBlock as p, openBlock as s, createElementVNode as n, createVNode as F, toDisplayString as c, createCommentVNode as x, Fragment as Pe, renderList as Ne, normalizeClass as Ue, createBlock as ne, nextTick as qe, unref as o, withDirectives as ea, withCtx as fe, isRef as lt, vShow as ta, withKeys as aa, withModifiers as oa } from "vue";
2
- import { useRoute as na, useRouter as ra } from "vue-router";
3
- import { u as ct, _ as vt } from "./_plugin-vue_export-helper-C6QDExPN.js";
1
+ import { defineComponent as ut, ref as d, computed as _, watch as $e, onMounted as dt, onBeforeUnmount as He, resolveComponent as se, openBlock as s, createElementBlock as p, createElementVNode as r, createVNode as D, toDisplayString as c, createCommentVNode as x, Fragment as Pe, renderList as Ne, normalizeClass as Ue, createBlock as ne, nextTick as qe, unref as a, withCtx as fe, isRef as lt, withDirectives as ea, vShow as ta, withKeys as aa, withModifiers as oa } from "vue";
2
+ import { useRoute as ra, useRouter as na } from "vue-router";
3
+ import { u as ct, _ as vt } from "./_plugin-vue_export-helper-Bx7s49ra.js";
4
4
  import { storeToRefs as je } from "pinia";
5
5
  import { useSnackbar as sa } from "@feedmepos/ui-library";
6
- import { g as la, r as ia, f as ua, h as da, u as ca, c as va, b as fa, a as ma, R as pa, e as ya, p as ba, i as ha, j as ga, k as it, l as wa } from "./useReportCanvasPanel-DLt-AkFQ.js";
7
- import { _ as _a } from "./LocationSelect.vue_vue_type_script_setup_true_lang-DEeDj0JI.js";
8
- import { D as ka } from "./DateRangeSelect-CfV_WX9B.js";
9
- import { a as ft, j as xa } from "./app-1dD87x1L.js";
10
- import { u as Ca } from "./report-B547gOvv.js";
6
+ import { g as la, r as ia, f as ua, h as da, u as ca, c as va, b as ma, a as fa, R as pa, e as ya, p as ba, i as ha, j as ga, k as it, l as wa } from "./useReportCanvasPanel-dWlB_xvo.js";
7
+ import { _ as ka } from "./LocationSelect.vue_vue_type_script_setup_true_lang-kvdk_gEw.js";
8
+ import { D as _a } from "./DateRangeSelect-D5SGi6ca.js";
9
+ import { a as mt, j as xa } from "./app-BQDKX7NB.js";
10
+ import { u as Ca } from "./report-CcXsPATD.js";
11
11
  import { u as Sa } from "./global-loader-BuxFfehu.js";
12
12
  import { r as Ra } from "./i18n-DbyciK4x.js";
13
13
  const Va = ["aria-label"], Aa = { class: "flex h-64 shrink-0 items-center gap-12 border-b border-fm-color-border-secondary px-[20px]" }, $a = { class: "fm-typo-en-body-md-600 grow" }, Ea = ["aria-label", "disabled"], Fa = { class: "min-h-0 grow overflow-y-auto px-[20px] py-[20px]" }, Da = { class: "fm-typo-en-body-md-400 mb-[20px] text-fm-color-typo-secondary" }, Ia = { class: "mb-24 rounded-[12px] border border-fm-color-border-secondary p-16" }, Ta = { class: "mb-8 flex items-center gap-8" }, Oa = { class: "fm-typo-en-body-md-600 grow" }, Ba = { class: "fm-typo-en-body-sm-600 rounded-md bg-fm-color-neutral-gray-100 px-8 py-4" }, La = {
@@ -30,7 +30,7 @@ const Va = ["aria-label"], Aa = { class: "flex h-64 shrink-0 items-center gap-12
30
30
  }, Ya = { class: "fm-typo-en-body-md-400 line-clamp-3 block break-words" }, eo = {
31
31
  "data-testid": "canvas-version-author",
32
32
  class: "mt-8 flex items-center gap-8 text-fm-color-typo-secondary"
33
- }, to = { class: "fm-typo-en-body-sm-400 line-clamp-1 break-words" }, ao = { class: "shrink-0 border-t border-fm-color-border-secondary p-[20px]" }, oo = { class: "fm-typo-en-body-sm-400 mb-4 text-fm-color-typo-secondary" }, no = { class: "fm-typo-en-body-md-400 mb-16 max-h-[120px] overflow-y-auto whitespace-pre-wrap break-words" }, ro = {
33
+ }, to = { class: "fm-typo-en-body-sm-400 line-clamp-1 break-words" }, ao = { class: "shrink-0 border-t border-fm-color-border-secondary p-[20px]" }, oo = { class: "fm-typo-en-body-sm-400 mb-4 text-fm-color-typo-secondary" }, ro = { class: "fm-typo-en-body-md-400 mb-16 max-h-[120px] overflow-y-auto whitespace-pre-wrap break-words" }, no = {
34
34
  key: 0,
35
35
  role: "alert",
36
36
  class: "fm-typo-en-body-md-400 mb-12 text-fm-color-typo-error"
@@ -53,203 +53,203 @@ const Va = ["aria-label"], Aa = { class: "flex h-64 shrink-0 items-center gap-12
53
53
  busy: { type: Boolean }
54
54
  },
55
55
  emits: ["close", "restored", "restoring"],
56
- setup(me, { emit: se }) {
57
- const N = me, M = se, { t: f, locale: C } = ct(), l = (a, r = {}) => f(`reportV5.reportCanvas.history.${a}`, r), $ = d([]), D = d(!0), W = d(!1), ee = d(!1), v = d(!1), i = d(!1), I = d(), le = d(), te = d(), U = d(), L = k(() => $.value.find((a) => a.id === I.value)), w = k(() => N.hasDraft || N.busy || v.value);
58
- let q = !0, Z = null;
59
- function ie(a, r) {
60
- const V = new Date(a);
61
- return Number.isFinite(V.getTime()) ? new Intl.DateTimeFormat(C.value, { ...r, timeZone: N.timezone }).format(
56
+ setup(A, { emit: le }) {
57
+ const U = A, K = le, { t: m, locale: C } = ct(), l = (o, n = {}) => m(`reportV5.reportCanvas.history.${o}`, n), E = d([]), I = d(!0), Z = d(!1), te = d(!1), v = d(!1), i = d(!1), T = d(), ie = d(), ae = d(), q = d(), z = _(() => E.value.find((o) => o.id === T.value)), w = _(() => U.hasDraft || U.busy || v.value);
58
+ let j = !0, G = null;
59
+ function ue(o, n) {
60
+ const V = new Date(o);
61
+ return Number.isFinite(V.getTime()) ? new Intl.DateTimeFormat(C.value, { ...n, timeZone: U.timezone }).format(
62
62
  V
63
63
  ) : l("unknownDate");
64
64
  }
65
- const ue = (a) => ie(a, { dateStyle: "medium", timeStyle: "short" }), m = (a) => ie(a, { hour: "numeric", minute: "2-digit", second: "2-digit" }), b = (a) => ie(a, { year: "numeric", month: "2-digit", day: "2-digit" });
66
- function R(a) {
67
- return b(a) === b((/* @__PURE__ */ new Date()).toISOString()) ? l("today") : ie(a, { month: "long", day: "numeric", year: "numeric" });
65
+ const de = (o) => ue(o, { dateStyle: "medium", timeStyle: "short" }), f = (o) => ue(o, { hour: "numeric", minute: "2-digit", second: "2-digit" }), b = (o) => ue(o, { year: "numeric", month: "2-digit", day: "2-digit" });
66
+ function R(o) {
67
+ return b(o) === b((/* @__PURE__ */ new Date()).toISOString()) ? l("today") : ue(o, { month: "long", day: "numeric", year: "numeric" });
68
68
  }
69
- const T = k(() => {
70
- const a = [];
71
- for (const r of [...$.value].sort((V, j) => Date.parse(j.at) - Date.parse(V.at))) {
72
- const V = b(r.at), j = a.find((ge) => ge.key === V);
73
- j ? j.versions.push(r) : a.push({ key: V, label: R(r.at), versions: [r] });
69
+ const O = _(() => {
70
+ const o = [];
71
+ for (const n of [...E.value].sort((V, H) => Date.parse(H.at) - Date.parse(V.at))) {
72
+ const V = b(n.at), H = o.find((ge) => ge.key === V);
73
+ H ? H.versions.push(n) : o.push({ key: V, label: R(n.at), versions: [n] });
74
74
  }
75
- return a;
76
- }), z = (a) => {
77
- var r;
78
- return a.id === ((r = $.value[0]) == null ? void 0 : r.id);
79
- }, G = (a) => a.prompt.trim() || l("noPrompt"), K = (a) => a.restoredFrom ? l("restoredFrom", { at: ue(a.restoredFrom) }) : "", ce = (a) => [K(a), G(a)].filter(Boolean).join(" "), Ce = (a) => {
80
- var r, V;
81
- return ((r = a.author) == null ? void 0 : r.name) || ((V = a.author) == null ? void 0 : V.email) || l("unknownUser");
75
+ return o;
76
+ }), P = (o) => {
77
+ var n;
78
+ return o.id === ((n = E.value[0]) == null ? void 0 : n.id);
79
+ }, Q = (o) => o.prompt.trim() || l("noPrompt"), J = (o) => o.restoredFrom ? l("restoredFrom", { at: de(o.restoredFrom) }) : "", ve = (o) => [J(o), Q(o)].filter(Boolean).join(" "), Ce = (o) => {
80
+ var n, V;
81
+ return ((n = o.author) == null ? void 0 : n.name) || ((V = o.author) == null ? void 0 : V.email) || l("unknownUser");
82
82
  };
83
83
  async function he() {
84
- D.value = !0, W.value = !1;
84
+ I.value = !0, Z.value = !1;
85
85
  try {
86
- const a = await la(N.reportId);
87
- q && ($.value = a);
86
+ const o = await la(U.reportId);
87
+ j && (E.value = o);
88
88
  } catch {
89
- q && (W.value = !0);
89
+ j && (Z.value = !0);
90
90
  } finally {
91
- q && (D.value = !1);
91
+ j && (I.value = !1);
92
92
  }
93
93
  }
94
- function Q(a) {
95
- v.value || z(a) || (I.value = I.value === a.id ? void 0 : a.id, i.value = !1, ee.value = !1);
94
+ function X(o) {
95
+ v.value || P(o) || (T.value = T.value === o.id ? void 0 : o.id, i.value = !1, te.value = !1);
96
96
  }
97
97
  async function Se() {
98
- var a;
99
- !L.value || w.value || (i.value = !0, await qe(), (a = te.value) == null || a.focus());
98
+ var o;
99
+ !z.value || w.value || (i.value = !0, await qe(), (o = ae.value) == null || o.focus());
100
100
  }
101
101
  async function S() {
102
- var a;
103
- i.value = !1, ee.value = !1, await qe(), (a = U.value) == null || a.focus();
102
+ var o;
103
+ i.value = !1, te.value = !1, await qe(), (o = q.value) == null || o.focus();
104
104
  }
105
- async function ae() {
106
- if (!(!L.value || w.value || !i.value)) {
107
- v.value = !0, M("restoring", !0), ee.value = !1;
105
+ async function oe() {
106
+ if (!(!z.value || w.value || !i.value)) {
107
+ v.value = !0, K("restoring", !0), te.value = !1;
108
108
  try {
109
- const a = await ia(N.reportId, L.value.id);
110
- q && M("restored", a);
109
+ const o = await ia(U.reportId, z.value.id);
110
+ j && K("restored", o);
111
111
  } catch {
112
- q && (ee.value = !0);
112
+ j && (te.value = !0);
113
113
  } finally {
114
- v.value = !1, M("restoring", !1);
114
+ v.value = !1, K("restoring", !1);
115
115
  }
116
116
  }
117
117
  }
118
- function pe(a) {
119
- a.key === "Escape" && (a.stopPropagation(), !v.value && (i.value ? S() : M("close")));
118
+ function pe(o) {
119
+ o.key === "Escape" && (o.stopPropagation(), !v.value && (i.value ? S() : K("close")));
120
120
  }
121
- return $e(w, (a) => {
122
- a && !v.value && (i.value = !1);
121
+ return $e(w, (o) => {
122
+ o && !v.value && (i.value = !1);
123
123
  }), dt(() => {
124
- var a;
125
- Z = document.activeElement, (a = le.value) == null || a.focus(), he();
124
+ var o;
125
+ G = document.activeElement, (o = ie.value) == null || o.focus(), he();
126
126
  }), He(() => {
127
- q = !1, Z == null || Z.focus();
128
- }), (a, r) => {
129
- const V = re("FmIcon"), j = re("FmButton"), ge = re("FmAvatar");
127
+ j = !1, G == null || G.focus();
128
+ }), (o, n) => {
129
+ const V = se("FmIcon"), H = se("FmButton"), ge = se("FmAvatar");
130
130
  return s(), p("aside", {
131
131
  "data-testid": "canvas-versions",
132
132
  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",
133
133
  "aria-label": l("title"),
134
134
  onKeydown: pe
135
135
  }, [
136
- n("header", Aa, [
137
- F(V, {
136
+ r("header", Aa, [
137
+ D(V, {
138
138
  name: "history",
139
139
  size: "md",
140
140
  class: "text-fm-color-typo-secondary"
141
141
  }),
142
- n("h2", $a, c(l("title")), 1),
143
- n("button", {
142
+ r("h2", $a, c(l("title")), 1),
143
+ r("button", {
144
144
  ref_key: "closeButton",
145
- ref: le,
145
+ ref: ie,
146
146
  "data-testid": "canvas-versions-close",
147
147
  class: "history-button flex h-[36px] w-[36px] items-center justify-center rounded-md text-fm-color-typo-secondary",
148
148
  "aria-label": l("close"),
149
149
  disabled: v.value,
150
- onClick: r[0] || (r[0] = (J) => M("close"))
150
+ onClick: n[0] || (n[0] = (W) => K("close"))
151
151
  }, [
152
- F(V, {
152
+ D(V, {
153
153
  name: "close",
154
154
  size: "md"
155
155
  })
156
156
  ], 8, Ea)
157
157
  ]),
158
- n("div", Fa, [
159
- n("p", Da, c(l("intro")), 1),
160
- n("div", Ia, [
161
- n("div", Ta, [
162
- r[1] || (r[1] = n("span", {
158
+ r("div", Fa, [
159
+ r("p", Da, c(l("intro")), 1),
160
+ r("div", Ia, [
161
+ r("div", Ta, [
162
+ n[1] || (n[1] = r("span", {
163
163
  class: "h-8 w-8 rounded-full bg-fm-color-primary",
164
164
  "aria-hidden": "true"
165
165
  }, null, -1)),
166
- n("span", Oa, c(l("current")), 1),
167
- n("span", Ba, c(l("published")), 1)
166
+ r("span", Oa, c(l("current")), 1),
167
+ r("span", Ba, c(l("published")), 1)
168
168
  ]),
169
- a.publishedAt ? (s(), p("p", La, c(ue(a.publishedAt)), 1)) : x("", !0)
169
+ A.publishedAt ? (s(), p("p", La, c(de(A.publishedAt)), 1)) : x("", !0)
170
170
  ]),
171
- D.value ? (s(), p("div", {
171
+ I.value ? (s(), p("div", {
172
172
  key: 0,
173
173
  role: "status",
174
174
  class: "space-y-16",
175
175
  "aria-label": l("loading")
176
176
  }, [
177
- n("p", Pa, c(l("loading")), 1),
178
- (s(), p(Pe, null, Ne(3, (J) => n("div", {
179
- key: J,
177
+ r("p", Pa, c(l("loading")), 1),
178
+ (s(), p(Pe, null, Ne(3, (W) => r("div", {
179
+ key: W,
180
180
  class: "rounded-lg border border-fm-color-border-secondary p-16",
181
181
  "aria-hidden": "true"
182
- }, r[2] || (r[2] = [
183
- n("div", { class: "mb-12 h-12 w-1/3 rounded bg-fm-color-neutral-gray-100" }, null, -1),
184
- n("div", { class: "h-12 w-3/4 rounded bg-fm-color-neutral-gray-100" }, null, -1)
185
- ]))), 64))
186
- ], 8, za)) : W.value ? (s(), p("div", Na, [
187
- n("p", Ua, c(l("loadFailed")), 1),
188
- n("p", qa, c(l("loadFailedHint")), 1),
189
- F(j, {
182
+ }, [...n[2] || (n[2] = [
183
+ r("div", { class: "mb-12 h-12 w-1/3 rounded bg-fm-color-neutral-gray-100" }, null, -1),
184
+ r("div", { class: "h-12 w-3/4 rounded bg-fm-color-neutral-gray-100" }, null, -1)
185
+ ])])), 64))
186
+ ], 8, za)) : Z.value ? (s(), p("div", Na, [
187
+ r("p", Ua, c(l("loadFailed")), 1),
188
+ r("p", qa, c(l("loadFailedHint")), 1),
189
+ D(H, {
190
190
  variant: "secondary",
191
191
  label: l("retry"),
192
192
  onClick: he
193
193
  }, null, 8, ["label"])
194
- ])) : $.value.length ? x("", !0) : (s(), p("div", ja, [
195
- F(V, {
194
+ ])) : E.value.length ? x("", !0) : (s(), p("div", ja, [
195
+ D(V, {
196
196
  name: "history",
197
197
  size: "lg",
198
198
  class: "mb-12 text-fm-color-typo-secondary"
199
199
  }),
200
- n("p", Ha, c(l("empty")), 1),
201
- n("p", Ma, c(l("emptyHint")), 1)
200
+ r("p", Ha, c(l("empty")), 1),
201
+ r("p", Ma, c(l("emptyHint")), 1)
202
202
  ])),
203
- (s(!0), p(Pe, null, Ne(D.value || W.value ? [] : T.value, (J) => (s(), p("section", {
204
- key: J.key,
203
+ (s(!0), p(Pe, null, Ne(I.value || Z.value ? [] : O.value, (W) => (s(), p("section", {
204
+ key: W.key,
205
205
  class: "mb-[20px]"
206
206
  }, [
207
- n("h3", Ka, c(J.label), 1),
208
- n("ul", Ja, [
209
- (s(!0), p(Pe, null, Ne(J.versions, (h) => {
207
+ r("h3", Ka, c(W.label), 1),
208
+ r("ul", Ja, [
209
+ (s(!0), p(Pe, null, Ne(W.versions, (h) => {
210
210
  var ye, we, Re;
211
211
  return s(), p("li", {
212
212
  key: h.id,
213
213
  "data-testid": "canvas-version-row",
214
214
  class: "relative mb-8"
215
215
  }, [
216
- r[3] || (r[3] = n("span", {
216
+ n[3] || (n[3] = r("span", {
217
217
  class: "history-dot absolute top-[20px] h-8 w-8 rounded-full border border-fm-color-border-secondary bg-fm-color-neutral-white",
218
218
  "aria-hidden": "true"
219
219
  }, null, -1)),
220
- n("button", {
220
+ r("button", {
221
221
  class: Ue([
222
222
  "history-button w-full rounded-lg border p-12 text-left",
223
- I.value === h.id ? "border-fm-color-primary bg-fm-color-primary-50" : "border-transparent"
223
+ T.value === h.id ? "border-fm-color-primary bg-fm-color-primary-50" : "border-transparent"
224
224
  ]),
225
- "aria-expanded": I.value === h.id,
226
- "aria-controls": I.value === h.id ? "canvas-version-details" : void 0,
227
- "aria-current": z(h) ? "true" : void 0,
228
- disabled: v.value || z(h),
229
- onClick: (Ee) => Q(h)
225
+ "aria-expanded": T.value === h.id,
226
+ "aria-controls": T.value === h.id ? "canvas-version-details" : void 0,
227
+ "aria-current": P(h) ? "true" : void 0,
228
+ disabled: v.value || P(h),
229
+ onClick: (Ee) => X(h)
230
230
  }, [
231
- n("span", Za, [
232
- n("time", {
231
+ r("span", Za, [
232
+ r("time", {
233
233
  datetime: h.at,
234
- title: ue(h.at),
234
+ title: de(h.at),
235
235
  class: "fm-typo-en-body-sm-400 grow text-fm-color-typo-secondary"
236
- }, c(m(h.at)), 9, Ga),
237
- z(h) ? (s(), p("span", Qa, c(l("currentBadge")), 1)) : I.value === h.id ? (s(), ne(V, {
236
+ }, c(f(h.at)), 9, Ga),
237
+ P(h) ? (s(), p("span", Qa, c(l("currentBadge")), 1)) : T.value === h.id ? (s(), ne(V, {
238
238
  key: 1,
239
239
  name: "check",
240
240
  size: "sm",
241
241
  class: "text-fm-color-primary"
242
242
  })) : x("", !0)
243
243
  ]),
244
- K(h) ? (s(), p("span", Xa, c(K(h)), 1)) : x("", !0),
245
- n("span", Ya, c(G(h)), 1),
246
- n("span", eo, [
247
- F(ge, {
244
+ J(h) ? (s(), p("span", Xa, c(J(h)), 1)) : x("", !0),
245
+ r("span", Ya, c(Q(h)), 1),
246
+ r("span", eo, [
247
+ D(ge, {
248
248
  size: "sm",
249
249
  name: ((ye = h.author) == null ? void 0 : ye.name) || ((we = h.author) == null ? void 0 : we.email) || "?",
250
250
  src: (Re = h.author) == null ? void 0 : Re.photoUrl
251
251
  }, null, 8, ["name", "src"]),
252
- n("span", to, c(Ce(h)), 1)
252
+ r("span", to, c(Ce(h)), 1)
253
253
  ])
254
254
  ], 10, Wa)
255
255
  ]);
@@ -257,35 +257,35 @@ const Va = ["aria-label"], Aa = { class: "flex h-64 shrink-0 items-center gap-12
257
257
  ])
258
258
  ]))), 128))
259
259
  ]),
260
- n("footer", ao, [
261
- L.value ? (s(), p("div", {
260
+ r("footer", ao, [
261
+ z.value ? (s(), p("div", {
262
262
  key: 0,
263
263
  id: "canvas-version-details",
264
264
  ref_key: "details",
265
- ref: U,
265
+ ref: q,
266
266
  tabindex: "-1",
267
267
  class: "history-details"
268
268
  }, [
269
- n("p", oo, c(l("savedBy", { user: Ce(L.value), at: ue(L.value.at) })), 1),
270
- n("p", no, c(i.value ? l("confirmHint") : ce(L.value)), 1),
271
- ee.value ? (s(), p("p", ro, c(l("restoreFailed")), 1)) : x("", !0),
272
- a.hasDraft || a.busy ? (s(), p("p", so, c(l(a.hasDraft ? "draftHint" : "busyHint")), 1)) : x("", !0),
269
+ r("p", oo, c(l("savedBy", { user: Ce(z.value), at: de(z.value.at) })), 1),
270
+ r("p", ro, c(i.value ? l("confirmHint") : ve(z.value)), 1),
271
+ te.value ? (s(), p("p", no, c(l("restoreFailed")), 1)) : x("", !0),
272
+ A.hasDraft || A.busy ? (s(), p("p", so, c(l(A.hasDraft ? "draftHint" : "busyHint")), 1)) : x("", !0),
273
273
  i.value ? (s(), p("div", lo, [
274
- n("button", {
274
+ r("button", {
275
275
  ref_key: "cancelButton",
276
- ref: te,
276
+ ref: ae,
277
277
  class: "history-button fm-typo-en-body-md-600 rounded-lg px-16 py-12",
278
278
  disabled: v.value,
279
279
  onClick: S
280
280
  }, c(l("cancel")), 9, io),
281
- F(j, {
281
+ D(H, {
282
282
  "data-testid": "canvas-version-confirm",
283
283
  variant: "primary",
284
284
  label: l(v.value ? "restoring" : "confirm"),
285
285
  disabled: w.value,
286
- onClick: ae
286
+ onClick: oe
287
287
  }, null, 8, ["label", "disabled"])
288
- ])) : (s(), ne(j, {
288
+ ])) : (s(), ne(H, {
289
289
  key: 3,
290
290
  "data-testid": "canvas-version-restore",
291
291
  class: "w-full",
@@ -296,51 +296,51 @@ const Va = ["aria-label"], Aa = { class: "flex h-64 shrink-0 items-center gap-12
296
296
  onClick: Se
297
297
  }, null, 8, ["label", "disabled"]))
298
298
  ], 512)) : (s(), p("p", uo, c(l("selectHint")), 1)),
299
- n("p", co, c(l("timezone", { timezone: a.timezone })), 1)
299
+ r("p", co, c(l("timezone", { timezone: A.timezone })), 1)
300
300
  ])
301
301
  ], 40, Va);
302
302
  };
303
303
  }
304
- }), fo = /* @__PURE__ */ vt(vo, [["__scopeId", "data-v-7df5ac71"]]), mo = 2e3, po = 10 * 6e4;
305
- function yo(me, se, N, M) {
306
- const { timezone: f } = je(ft()), C = d(null), l = d(null), $ = d(!1), D = d(""), W = [];
307
- function ee(m) {
308
- W.push(m);
304
+ }), mo = /* @__PURE__ */ vt(vo, [["__scopeId", "data-v-7df5ac71"]]), fo = 2e3, po = 10 * 6e4;
305
+ function yo(A, le, U, K) {
306
+ const { timezone: m } = je(mt()), C = d(null), l = d(null), E = d(!1), I = d(""), Z = [];
307
+ function te(f) {
308
+ Z.push(f);
309
309
  }
310
310
  let v;
311
311
  function i() {
312
312
  v !== void 0 && (window.clearInterval(v), v = void 0);
313
313
  }
314
- function I() {
315
- var m;
316
- v !== void 0 || se.value || ((m = C.value) == null ? void 0 : m.status) === "running" && (v = window.setInterval(() => void le(), mo));
314
+ function T() {
315
+ var f;
316
+ v !== void 0 || le.value || ((f = C.value) == null ? void 0 : f.status) === "running" && (v = window.setInterval(() => void ie(), fo));
317
317
  }
318
- async function le() {
319
- var m;
320
- if (se.value) {
318
+ async function ie() {
319
+ var f;
320
+ if (le.value) {
321
321
  i();
322
322
  return;
323
323
  }
324
324
  try {
325
- const { run: b } = await da(me, M == null ? void 0 : M.value);
326
- b && te(b), ((m = C.value) == null ? void 0 : m.status) !== "running" ? i() : C.value.updatedAt && Date.now() - new Date(C.value.updatedAt).getTime() > po && ($.value = !0, i());
325
+ const { run: b } = await da(A, K == null ? void 0 : K.value);
326
+ b && ae(b), ((f = C.value) == null ? void 0 : f.status) !== "running" ? i() : C.value.updatedAt && Date.now() - new Date(C.value.updatedAt).getTime() > po && (E.value = !0, i());
327
327
  } catch {
328
328
  }
329
329
  }
330
- function te(m, b) {
330
+ function ae(f, b) {
331
331
  b !== void 0 && (l.value = b);
332
- const R = m.sections.some((T) => {
333
- var G;
334
- const z = (G = C.value) == null ? void 0 : G.sections.find((K) => K.id === T.id);
335
- return T.status === "ok" && (z == null ? void 0 : z.status) !== "ok";
332
+ const R = f.sections.some((O) => {
333
+ var Q;
334
+ const P = (Q = C.value) == null ? void 0 : Q.sections.find((J) => J.id === O.id);
335
+ return O.status === "ok" && (P == null ? void 0 : P.status) !== "ok";
336
336
  });
337
- C.value = m, $.value = !1, R && W.forEach((T) => T()), I();
337
+ C.value = f, E.value = !1, R && Z.forEach((O) => O()), T();
338
338
  }
339
- function U(m) {
339
+ function q(f) {
340
340
  var R;
341
- if (m.name !== "build_run") return;
342
- const b = m.data;
343
- Array.isArray(b.sections) && te(
341
+ if (f.name !== "build_run") return;
342
+ const b = f.data;
343
+ Array.isArray(b.sections) && ae(
344
344
  {
345
345
  runId: b.runId ? String(b.runId) : void 0,
346
346
  status: b.status ?? "running",
@@ -348,68 +348,68 @@ function yo(me, se, N, M) {
348
348
  updatedAt: (/* @__PURE__ */ new Date()).toISOString()
349
349
  },
350
350
  // first snapshot of this turn claims the anchor; later ones keep it
351
- (R = C.value) != null && R.runId && C.value.runId === b.runId ? void 0 : (N == null ? void 0 : N.value) ?? null
351
+ (R = C.value) != null && R.runId && C.value.runId === b.runId ? void 0 : (U == null ? void 0 : U.value) ?? null
352
352
  );
353
353
  }
354
- function L() {
355
- i(), C.value = null, l.value = null, $.value = !1, D.value = "";
354
+ function z() {
355
+ i(), C.value = null, l.value = null, E.value = !1, I.value = "";
356
356
  }
357
- function w(m, b = []) {
358
- m && m.status !== "ok" && te(m, Z(m, b));
357
+ function w(f, b = []) {
358
+ f && f.status !== "ok" && ae(f, G(f, b));
359
359
  }
360
- function q(m) {
361
- l.value || !C.value || (l.value = Z(C.value, m));
360
+ function j(f) {
361
+ l.value || !C.value || (l.value = G(C.value, f));
362
362
  }
363
- function Z(m, b) {
364
- if (!m.runId) return null;
363
+ function G(f, b) {
364
+ if (!f.runId) return null;
365
365
  const R = b.find(
366
- (T) => T.role === "assistant" && T.parts.some(
367
- (z) => {
368
- var G;
369
- return z.type === "data-build_run" && ((G = z.data) == null ? void 0 : G.runId) === m.runId;
366
+ (O) => O.role === "assistant" && O.parts.some(
367
+ (P) => {
368
+ var Q;
369
+ return P.type === "data-build_run" && ((Q = P.data) == null ? void 0 : Q.runId) === f.runId;
370
370
  }
371
371
  )
372
372
  );
373
373
  return (R == null ? void 0 : R.id) ?? null;
374
374
  }
375
- async function ie(m) {
375
+ async function ue(f) {
376
376
  var b;
377
377
  if (!(!((b = C.value) != null && b.runId) || C.value.status === "running")) {
378
- D.value = "";
378
+ I.value = "";
379
379
  try {
380
380
  const { run: R } = await ua(
381
- me,
381
+ A,
382
382
  C.value.runId,
383
- m,
384
- o(f.value)
383
+ f,
384
+ a(m.value)
385
385
  );
386
- te(R);
386
+ ae(R);
387
387
  } catch (R) {
388
- D.value = R instanceof Error ? R.message : String(R);
388
+ I.value = R instanceof Error ? R.message : String(R);
389
389
  }
390
390
  }
391
391
  }
392
- async function ue() {
393
- $.value = !1, await le();
392
+ async function de() {
393
+ E.value = !1, await ie();
394
394
  }
395
395
  return He(i), {
396
396
  run: C,
397
397
  anchorId: l,
398
- stale: $,
399
- retryError: D,
398
+ stale: E,
399
+ retryError: I,
400
400
  seed: w,
401
- reanchor: q,
402
- clear: L,
403
- noteEvent: U,
404
- retry: ie,
405
- refresh: ue,
406
- onLanded: ee
401
+ reanchor: j,
402
+ clear: z,
403
+ noteEvent: q,
404
+ retry: ue,
405
+ refresh: de,
406
+ onLanded: te
407
407
  };
408
408
  }
409
- const bo = "page_filters", ho = { 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" }, wo = { class: "relative shrink-0" }, _o = {
409
+ const bo = "page_filters", ho = { 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" }, wo = { class: "relative shrink-0" }, ko = {
410
410
  key: 0,
411
411
  class: "flex items-center gap-8 border-b border-fm-color-border-secondary px-16 py-8"
412
- }, ko = {
412
+ }, _o = {
413
413
  key: 0,
414
414
  class: "flex min-w-0 grow items-start overflow-x-auto scrollbar-hide"
415
415
  }, xo = {
@@ -441,154 +441,154 @@ const bo = "page_filters", ho = { class: "flex min-w-0 grow flex-col" }, go = {
441
441
  reportId: {},
442
442
  viewOnly: { type: Boolean }
443
443
  },
444
- setup(me) {
445
- const se = me, N = na(), M = ra(), { t: f, te: C } = ct(), l = Ca(), { currentReport: $ } = je(l), D = k(() => {
444
+ setup(A) {
445
+ const le = A, U = ra(), K = na(), { t: m, te: C } = ct(), l = Ca(), { currentReport: E } = je(l), I = _(() => {
446
446
  var e;
447
- return Ra(f, C, (e = $.value) == null ? void 0 : e.name, "other");
448
- }), W = sa(), { promptLoader: ee } = Sa(), v = se.reportId || String(N.query.reportId ?? ""), i = d(), I = d(""), le = k(() => {
447
+ return Ra(m, C, (e = E.value) == null ? void 0 : e.name, "other");
448
+ }), Z = sa(), { promptLoader: te } = Sa(), v = le.reportId || String(U.query.reportId ?? ""), i = d(), T = d(""), ie = _(() => {
449
449
  var e;
450
450
  return ((e = i.value) == null ? void 0 : e.state) === "draft";
451
- }), te = k(() => {
451
+ }), ae = _(() => {
452
452
  var e, t;
453
453
  return ((t = (e = i.value) == null ? void 0 : e.unpublishedTurnIds) == null ? void 0 : t.length) ?? 0;
454
- }), U = d(!1), L = d(""), w = d(!1), q = d(!1), Z = d(!1);
455
- function ie() {
454
+ }), q = d(!1), z = d(""), w = d(!1), j = d(!1), G = d(!1);
455
+ function ue() {
456
456
  w.value = !0, S.value = !1;
457
457
  }
458
- function ue() {
459
- Z.value || (w.value ? w.value = !1 : Q.value = !1);
458
+ function de() {
459
+ G.value || (w.value ? w.value = !1 : X.value = !1);
460
460
  }
461
- async function m(e) {
462
- await Ae(() => Promise.resolve(e)), w.value = !1, q.value = !0;
461
+ async function f(e) {
462
+ await Ae(() => Promise.resolve(e)), w.value = !1, j.value = !0;
463
463
  }
464
- const { isAdmin: b, canUpdate: R } = xa(), T = k(() => !se.viewOnly && b.value), z = k(
464
+ const { isAdmin: b, canUpdate: R } = xa(), O = _(() => !le.viewOnly && b.value), P = _(
465
465
  () => {
466
466
  var e;
467
- return !se.viewOnly && !!((e = $.value) != null && e.editable) && R($.value);
467
+ return !le.viewOnly && !!((e = E.value) != null && e.editable) && R(E.value);
468
468
  }
469
- ), G = k(
470
- () => z.value ? [{ label: f("report.common.rename"), value: "rename", isPrimary: !1 }] : []
471
- ), K = d(!1), ce = d("");
469
+ ), Q = _(
470
+ () => P.value ? [{ label: m("report.common.rename"), value: "rename", isPrimary: !1 }] : []
471
+ ), J = d(!1), ve = d("");
472
472
  function Ce() {
473
- ce.value = D.value, K.value = !0;
473
+ ve.value = I.value, J.value = !0;
474
474
  }
475
475
  async function he() {
476
- const e = $.value, t = ce.value.trim();
477
- if (!(!e || !t) && (K.value = !1, t !== D.value))
476
+ const e = E.value, t = ve.value.trim();
477
+ if (!(!e || !t) && (J.value = !1, t !== I.value))
478
478
  try {
479
- await ee(() => l.createOrUpdateReport({ ...e, name: t })), W.open({ message: f("report.messages.saveSuccess"), type: "success" });
479
+ await te(() => l.createOrUpdateReport({ ...e, name: t })), Z.open({ message: m("report.messages.saveSuccess"), type: "success" });
480
480
  } catch {
481
- W.open({
482
- message: f("report.messages.failedToAction", { action: f("report.common.rename") }),
481
+ Z.open({
482
+ message: m("report.messages.failedToAction", { action: m("report.common.rename") }),
483
483
  type: "error"
484
484
  });
485
485
  }
486
486
  }
487
- const Q = d(!1), Se = d(), S = d(!1), ae = d(!1), pe = d(), a = d(), r = k({
488
- get: () => ae.value ? pe.value : a.value,
487
+ const X = d(!1), Se = d(), S = d(!1), oe = d(!1), pe = d(), o = d(), n = _({
488
+ get: () => oe.value ? pe.value : o.value,
489
489
  set: (e) => {
490
- ae.value ? pe.value = e : a.value = e;
490
+ oe.value ? pe.value = e : o.value = e;
491
491
  }
492
- }), V = k(
492
+ }), V = _(
493
493
  () => {
494
494
  var e;
495
- return !!r.value && !((e = i.value) != null && e.sections.some(
495
+ return !!n.value && !((e = i.value) != null && e.sections.some(
496
496
  (t) => {
497
497
  var u, g;
498
- return t.id === ((u = r.value) == null ? void 0 : u.sectionId) && t.version === ((g = r.value) == null ? void 0 : g.version);
498
+ return t.id === ((u = n.value) == null ? void 0 : u.sectionId) && t.version === ((g = n.value) == null ? void 0 : g.version);
499
499
  }
500
500
  ));
501
501
  }
502
- ), j = d({});
502
+ ), H = d({});
503
503
  function ge(e, t) {
504
504
  var u;
505
505
  return String(
506
- ((u = e.config) == null ? void 0 : u.title) || j.value[e.id] || f("reportV5.reportAi.chat.widgetNumber", { number: t + 1 })
506
+ ((u = e.config) == null ? void 0 : u.title) || H.value[e.id] || m("reportV5.reportAi.chat.widgetNumber", { number: t + 1 })
507
507
  );
508
508
  }
509
- const J = d([]), h = d([]), ye = k({
510
- get: () => ae.value ? J.value : h.value,
509
+ const W = d([]), h = d([]), ye = _({
510
+ get: () => oe.value ? W.value : h.value,
511
511
  set: (e) => {
512
- ae.value ? J.value = e : h.value = e;
512
+ oe.value ? W.value = e : h.value = e;
513
513
  }
514
514
  });
515
515
  function we() {
516
- r.value = void 0, ye.value = [], S.value = !1;
516
+ n.value = void 0, ye.value = [], S.value = !1;
517
517
  }
518
518
  function Re() {
519
- const e = r.value;
519
+ const e = n.value;
520
520
  if (!(e != null && e.element)) return we();
521
521
  const { element: t, ...u } = e, g = ye.value.shift();
522
- r.value = g ? { ...u, element: g, elementText: g.text ?? "", elementTag: g.tag } : u;
522
+ n.value = g ? { ...u, element: g, elementText: g.text ?? "", elementTag: g.tag } : u;
523
523
  }
524
524
  function Ee(e) {
525
525
  e.key === "Escape" && (S.value = !1);
526
526
  }
527
- function mt(e, t = []) {
527
+ function ft(e, t = []) {
528
528
  var g;
529
- if (!S.value || X.value) return;
530
- const u = (g = i.value) == null ? void 0 : g.sections.find((E) => E.id === e.sectionId);
531
- !u || u.version !== e.version || (r.value = {
529
+ if (!S.value || Y.value) return;
530
+ const u = (g = i.value) == null ? void 0 : g.sections.find((F) => F.id === e.sectionId);
531
+ !u || u.version !== e.version || (n.value = {
532
532
  ...e,
533
- viewParams: JSON.parse(JSON.stringify(_.params.value)),
534
- viewIntent: JSON.parse(JSON.stringify(_.intent.value)),
533
+ viewParams: JSON.parse(JSON.stringify(k.params.value)),
534
+ viewIntent: JSON.parse(JSON.stringify(k.intent.value)),
535
535
  label: e.label || ge(u, i.value.sections.indexOf(u))
536
- }, ye.value = t, S.value = !1, Q.value = !0);
536
+ }, ye.value = t, S.value = !1, X.value = !0);
537
537
  }
538
- const O = d(""), Me = d(""), Ke = d("");
538
+ const B = d(""), Me = d(""), Ke = d("");
539
539
  function Je(e) {
540
- return H.stashDraft(O.value, a.value), P.clear(), e().then(() => {
541
- const t = H.recallDraft();
542
- O.value = t.text, a.value = t.target, h.value = [], S.value = !1;
540
+ return M.stashDraft(B.value, o.value), N.clear(), e().then(() => {
541
+ const t = M.recallDraft();
542
+ B.value = t.text, o.value = t.target, h.value = [], S.value = !1;
543
543
  });
544
544
  }
545
545
  async function pt(e) {
546
546
  if (tt.value) return;
547
- const t = e ? pe.value : void 0, u = e ? [...J.value] : [];
547
+ const t = e ? pe.value : void 0, u = e ? [...W.value] : [];
548
548
  let g = !1;
549
549
  await Je(async () => {
550
- g = await H.startChat();
551
- }), g && e && (ae.value = !1, a.value = t, h.value = u, pe.value = void 0, J.value = [], O.value = e, await Ve());
550
+ g = await M.startChat();
551
+ }), g && e && (oe.value = !1, o.value = t, h.value = u, pe.value = void 0, W.value = [], B.value = e, await Ve());
552
552
  }
553
553
  const yt = (e) => Je(async () => {
554
- const t = await H.select(e);
555
- P.seed(t, _e.value);
554
+ const t = await M.select(e);
555
+ N.seed(t, ke.value);
556
556
  });
557
557
  async function Ve() {
558
- const e = O.value.trim();
559
- if (!(!e || V.value || X.value)) {
560
- if (Ke.value = e, O.value = "", await zt(e, r.value), Ye.value) {
561
- O.value || (O.value = Ke.value);
558
+ const e = B.value.trim();
559
+ if (!(!e || V.value || Y.value)) {
560
+ if (Ke.value = e, B.value = "", await zt(e, n.value), Ye.value) {
561
+ B.value || (B.value = Ke.value);
562
562
  return;
563
563
  }
564
564
  we();
565
565
  }
566
566
  }
567
567
  function bt(e) {
568
- const t = H.takeUnsent(e);
568
+ const t = M.takeUnsent(e);
569
569
  if (t)
570
- return O.value = t.text, r.value = t.target, Ve();
570
+ return B.value = t.text, n.value = t.target, Ve();
571
571
  }
572
572
  function ht(e) {
573
- X.value || (O.value = f("reportV5.reportAi.build.askBuilderPrompt", { title: e }), r.value = void 0);
573
+ Y.value || (B.value = m("reportV5.reportAi.build.askBuilderPrompt", { title: e }), n.value = void 0);
574
574
  }
575
575
  async function gt() {
576
- const e = await H.stop();
577
- !e || O.value.trim() || (O.value = e.text, r.value = e.target);
576
+ const e = await M.stop();
577
+ !e || B.value.trim() || (B.value = e.text, n.value = e.target);
578
578
  }
579
579
  function wt(e) {
580
- const t = H.requestOf(e);
581
- t && (O.value = t.text, r.value = t.target);
580
+ const t = M.requestOf(e);
581
+ t && (B.value = t.text, n.value = t.target);
582
582
  }
583
- function _t(e) {
584
- const t = H.requestOf(e);
583
+ function kt(e) {
584
+ const t = M.requestOf(e);
585
585
  if (t)
586
- return O.value = t.text, r.value = t.target, Ve();
586
+ return B.value = t.text, n.value = t.target, Ve();
587
587
  }
588
- const _ = ca(v), H = va(v), {
589
- messages: _e,
588
+ const k = ca(v), M = va(v), {
589
+ messages: ke,
590
590
  sessionId: We,
591
- title: kt,
591
+ title: _t,
592
592
  chats: xt,
593
593
  chatsCursor: Ze,
594
594
  chatsLoading: Ct,
@@ -613,63 +613,63 @@ const bo = "page_filters", ho = { class: "flex min-w-0 grow flex-col" }, go = {
613
613
  onLifecycle: Pt,
614
614
  onSettled: Nt,
615
615
  onResumed: Ut
616
- } = H, X = k(() => Qe.value || Ot.value), { dateRange: Fe, selectedLocationIds: De, locations: et, timezone: qt } = je(ft()), P = yo(v, Qe, Xe, We), tt = k(
616
+ } = M, Y = _(() => Qe.value || Ot.value), { dateRange: Fe, selectedLocationIds: De, locations: et, timezone: qt } = je(mt()), N = yo(v, Qe, Xe, We), tt = _(
617
617
  () => {
618
618
  var e;
619
- return X.value || Ge.value || ((e = P.run.value) == null ? void 0 : e.status) === "running";
619
+ return Y.value || Ge.value || ((e = N.run.value) == null ? void 0 : e.status) === "running";
620
620
  }
621
- ), at = k(
621
+ ), at = _(
622
622
  () => {
623
623
  var e;
624
624
  return ((e = i.value) == null ? void 0 : e.sections.filter((t) => t.id !== bo)) ?? [];
625
625
  }
626
- ), ot = k(() => at.value.length === 0), nt = k({
627
- get: () => T.value && Q.value || w.value,
626
+ ), ot = _(() => at.value.length === 0), rt = _({
627
+ get: () => O.value && X.value || w.value,
628
628
  set: (e) => {
629
- Q.value = e, e || (w.value = !1);
629
+ X.value = e, e || (w.value = !1);
630
630
  }
631
- }), { root: jt, drawer: Ht, docked: Ie, modal: Te } = fa(nt, S), Mt = k(
631
+ }), { root: jt, drawer: Ht, docked: Ie, modal: Te } = ma(rt, S), Mt = _(
632
632
  () => {
633
633
  var e;
634
634
  return ((e = i.value) == null ? void 0 : e.sections.some((t) => t.status === "pending")) ?? !1;
635
635
  }
636
- ), Kt = k(() => X.value ? At.value ?? "working" : Mt.value ? "loading" : "updating"), Y = ma(Se, {
637
- onSelectSection: mt,
636
+ ), Kt = _(() => Y.value ? At.value ?? "working" : Mt.value ? "loading" : "updating"), ee = fa(Se, {
637
+ onSelectSection: ft,
638
638
  onCancelSelection: () => {
639
639
  S.value = !1;
640
640
  },
641
641
  onSetParams: (e, t) => {
642
- _.setParams(e, t);
642
+ k.setParams(e, t);
643
643
  },
644
644
  onSectionRendered: (e, t, u) => {
645
- u && (j.value = { ...j.value, [e]: u }), Oe(e, t, "ok");
645
+ u && (H.value = { ...H.value, [e]: u }), Oe(e, t, "ok");
646
646
  },
647
647
  onSectionError: (e, t, u) => {
648
648
  console.warn("[report-canvas] section failed", { reportId: v, sectionId: e, message: u }), Oe(e, t, "error", u);
649
649
  },
650
650
  onSectionLayout: (e, t, u) => {
651
- var E;
652
- const g = (E = i.value) == null ? void 0 : E.sections.find((A) => A.id === e);
651
+ var F;
652
+ const g = (F = i.value) == null ? void 0 : F.sections.find(($) => $.id === e);
653
653
  (g == null ? void 0 : g.status) === "ok" && Oe(e, t, "ok", void 0, u);
654
654
  }
655
655
  });
656
- _.onResult((e) => Y.pushRows(e)), _.onParamsChanged(() => Y.pushParams(_.paramState())), _.bindStore(), $e([S, r, Y.ready, X], () => {
657
- Y.setCommentMode(S.value && !X.value, r.value);
656
+ k.onResult((e) => ee.pushRows(e)), k.onParamsChanged(() => ee.pushParams(k.paramState())), k.bindStore(), $e([S, n, ee.ready, Y], () => {
657
+ ee.setCommentMode(S.value && !Y.value, n.value);
658
658
  });
659
- async function Oe(e, t, u, g, E) {
660
- var ve, xe;
661
- const A = (ve = i.value) == null ? void 0 : ve.sections.find((be) => be.id === e);
662
- if (!A || t !== A.version) return;
663
- const de = u === "error" ? g ?? "the section failed to render" : void 0, oe = E ?? A.warnings ?? [];
664
- if (!(A.status === u && A.error === de && (A.warnings ?? []).join(`
665
- `) === oe.join(`
659
+ async function Oe(e, t, u, g, F) {
660
+ var me, xe;
661
+ const $ = (me = i.value) == null ? void 0 : me.sections.find((be) => be.id === e);
662
+ if (!$ || t !== $.version) return;
663
+ const ce = u === "error" ? g ?? "the section failed to render" : void 0, re = F ?? $.warnings ?? [];
664
+ if (!($.status === u && $.error === ce && ($.warnings ?? []).join(`
665
+ `) === re.join(`
666
666
  `))) {
667
- A.status = u, A.error = de, A.warnings = oe.length ? oe : void 0;
667
+ $.status = u, $.error = ce, $.warnings = re.length ? re : void 0;
668
668
  try {
669
669
  await wa(
670
670
  v,
671
671
  e,
672
- { version: t, status: u, error: de, warnings: oe },
672
+ { version: t, status: u, error: ce, warnings: re },
673
673
  (xe = i.value) == null ? void 0 : xe.state
674
674
  );
675
675
  } catch (be) {
@@ -678,32 +678,32 @@ const bo = "page_filters", ho = { class: "flex min-w-0 grow flex-col" }, go = {
678
678
  }
679
679
  }
680
680
  async function Ae(e) {
681
- if (!U.value) {
682
- U.value = !0, L.value = "";
681
+ if (!q.value) {
682
+ q.value = !0, z.value = "";
683
683
  try {
684
684
  const t = await e();
685
- i.value = t, _.load(t), await Y.init(t.sections, _.paramState(), _.env());
685
+ i.value = t, k.load(t), await ee.init(t.sections, k.paramState(), k.env());
686
686
  } catch (t) {
687
- L.value = t instanceof Error ? t.message : String(t);
687
+ z.value = t instanceof Error ? t.message : String(t);
688
688
  } finally {
689
- U.value = !1;
689
+ q.value = !1;
690
690
  }
691
691
  }
692
692
  }
693
693
  const Jt = () => Ae(() => ba(v)), Wt = () => Ae(() => ha(v)), Zt = (e) => Ae(() => ga(v, e));
694
694
  async function Gt() {
695
695
  try {
696
- I.value = "";
696
+ T.value = "";
697
697
  const e = await it(v);
698
- i.value = e, _.load(e), T.value && ot.value && Ie.value && (Q.value = !0), await qe(), await Y.init(e.sections, _.paramState(), _.env());
698
+ i.value = e, k.load(e), O.value && ot.value && Ie.value && (X.value = !0), await qe(), await ee.init(e.sections, k.paramState(), k.env());
699
699
  } catch (e) {
700
- I.value = e instanceof Error ? e.message : String(e);
700
+ T.value = e instanceof Error ? e.message : String(e);
701
701
  }
702
702
  }
703
703
  const Be = /* @__PURE__ */ new Set();
704
- let ke = null, Le = !1;
704
+ let _e = null, Le = !1;
705
705
  function ze() {
706
- return ke ? (Le = !0, ke) : (ke = (async () => {
706
+ return _e ? (Le = !0, _e) : (_e = (async () => {
707
707
  do {
708
708
  Le = !1;
709
709
  try {
@@ -713,122 +713,122 @@ const bo = "page_filters", ho = { class: "flex min-w-0 grow flex-col" }, go = {
713
713
  }
714
714
  } while (Le);
715
715
  })().finally(() => {
716
- ke = null;
717
- }), ke);
716
+ _e = null;
717
+ }), _e);
718
718
  }
719
719
  async function Qt() {
720
- var de, oe;
721
- const e = (((de = i.value) == null ? void 0 : de.sections) ?? []).map((B) => B.id), t = new Map(
722
- (((oe = i.value) == null ? void 0 : oe.sections) ?? []).map((B) => [B.id, B.version])
720
+ var ce, re;
721
+ const e = (((ce = i.value) == null ? void 0 : ce.sections) ?? []).map((L) => L.id), t = new Map(
722
+ (((re = i.value) == null ? void 0 : re.sections) ?? []).map((L) => [L.id, L.version])
723
723
  ), u = await it(v);
724
724
  i.value = u;
725
725
  const g = [...Be];
726
- Be.clear(), _.applyCanvas(u, g) && Y.pushParams(_.paramState());
727
- const E = u.sections.map((B) => B.id);
728
- if (E.length !== e.length || E.some((B, ve) => B !== e[ve])) {
729
- await Y.init(u.sections, _.paramState(), _.env());
726
+ Be.clear(), k.applyCanvas(u, g) && ee.pushParams(k.paramState());
727
+ const F = u.sections.map((L) => L.id);
728
+ if (F.length !== e.length || F.some((L, me) => L !== e[me])) {
729
+ await ee.init(u.sections, k.paramState(), k.env());
730
730
  return;
731
731
  }
732
- const A = u.sections.filter(
733
- (B) => t.get(B.id) !== B.version
732
+ const $ = u.sections.filter(
733
+ (L) => t.get(L.id) !== L.version
734
734
  );
735
- A.length && await Y.swapSections(A);
735
+ $.length && await ee.swapSections($);
736
736
  }
737
737
  const Xt = ["param_written", "sql_written", "section_written", "deleted", "reordered", "restored"];
738
738
  Pt((e) => {
739
- e.name === "sql_written" && typeof e.data.queryId == "string" && Be.add(e.data.queryId), Xt.includes(e.name) && ze(), P.noteEvent(e);
740
- }), Nt(() => void ze()), Ut((e) => P.seed(e, _e.value)), $e(_e, (e) => P.reanchor(e)), P.onLanded(() => void ze()), $e([et, qt], () => {
741
- i.value && Y.pushEnv(_.env());
739
+ e.name === "sql_written" && typeof e.data.queryId == "string" && Be.add(e.data.queryId), Xt.includes(e.name) && ze(), N.noteEvent(e);
740
+ }), Nt(() => void ze()), Ut((e) => N.seed(e, ke.value)), $e(ke, (e) => N.reanchor(e)), N.onLanded(() => void ze()), $e([et, qt], () => {
741
+ i.value && ee.pushEnv(k.env());
742
742
  });
743
- const Yt = k(
744
- () => Object.values(_.results.value).some((e) => e.truncated)
743
+ const Yt = _(
744
+ () => Object.values(k.results.value).some((e) => e.truncated)
745
745
  );
746
746
  return dt(async () => {
747
- window.addEventListener("keydown", Ee), await Gt(), T.value && P.seed(await Lt(), _e.value);
747
+ window.addEventListener("keydown", Ee), await Gt(), O.value && N.seed(await Lt(), ke.value);
748
748
  }), He(() => window.removeEventListener("keydown", Ee)), (e, t) => {
749
- var B, ve, xe, be, rt, st;
750
- const u = re("FmTooltip"), g = re("FmPageHead"), E = re("FmButton"), A = re("FmIcon"), de = re("FmTextField"), oe = re("FmDialog");
749
+ var L, me, xe, be, nt, st;
750
+ const u = se("FmTooltip"), g = se("FmPageHead"), F = se("FmButton"), $ = se("FmIcon"), ce = se("FmTextField"), re = se("FmDialog");
751
751
  return s(), p("div", {
752
752
  ref_key: "root",
753
753
  ref: jt,
754
754
  class: "relative flex h-full min-h-0 w-full"
755
755
  }, [
756
- n("div", ho, [
757
- e.viewOnly ? x("", !0) : (s(), ne(g, {
756
+ r("div", ho, [
757
+ A.viewOnly ? x("", !0) : (s(), ne(g, {
758
758
  key: 0,
759
759
  class: "remove-line-clamping shrink-0",
760
- title: D.value,
760
+ title: I.value,
761
761
  "back-button": !0,
762
- actions: G.value,
763
- "onClick:back": t[0] || (t[0] = (y) => o(M).push({ name: "reports", query: o(N).query })),
762
+ actions: Q.value,
763
+ "onClick:back": t[0] || (t[0] = (y) => a(K).push({ name: "reports", query: a(U).query })),
764
764
  "onClick:action": t[1] || (t[1] = (y) => y === "rename" && Ce())
765
765
  }, {
766
766
  title: fe(() => [
767
- F(u, {
768
- content: D.value,
767
+ D(u, {
768
+ content: I.value,
769
769
  placement: "bottom",
770
770
  "z-index": 2e3,
771
771
  class: "flex min-w-0 max-w-full justify-start"
772
772
  }, {
773
773
  default: fe(() => [
774
- n("p", go, c(D.value), 1)
774
+ r("p", go, c(I.value), 1)
775
775
  ]),
776
776
  _: 1
777
777
  }, 8, ["content"])
778
778
  ]),
779
779
  _: 1
780
780
  }, 8, ["title", "actions"])),
781
- n("div", wo, [
782
- !e.viewOnly || ((B = i.value) == null ? void 0 : B.hostFilters) !== !1 ? (s(), p("div", _o, [
783
- ((ve = i.value) == null ? void 0 : ve.hostFilters) !== !1 ? (s(), p("div", ko, [
784
- F(_a, {
785
- modelValue: o(De),
781
+ r("div", wo, [
782
+ !A.viewOnly || ((L = i.value) == null ? void 0 : L.hostFilters) !== !1 ? (s(), p("div", ko, [
783
+ ((me = i.value) == null ? void 0 : me.hostFilters) !== !1 ? (s(), p("div", _o, [
784
+ D(ka, {
785
+ modelValue: a(De),
786
786
  "onUpdate:modelValue": t[3] || (t[3] = (y) => lt(De) ? De.value = y : null),
787
- options: o(et)
787
+ options: a(et)
788
788
  }, {
789
789
  default: fe(() => [
790
- F(ka, {
791
- "date-range": o(Fe),
790
+ D(_a, {
791
+ "date-range": a(Fe),
792
792
  "onUpdate:dateRange": t[2] || (t[2] = (y) => lt(Fe) ? Fe.value = y : null)
793
793
  }, null, 8, ["date-range"])
794
794
  ]),
795
795
  _: 1
796
796
  }, 8, ["modelValue", "options"])
797
797
  ])) : (s(), p("div", xo)),
798
- at.value.length && !e.viewOnly ? (s(), p("div", Co, [
799
- (xe = i.value) != null && xe.canEdit && ((be = i.value) != null && be.publishedAt) ? (s(), ne(E, {
798
+ at.value.length && !A.viewOnly ? (s(), p("div", Co, [
799
+ (xe = i.value) != null && xe.canEdit && ((be = i.value) != null && be.publishedAt) ? (s(), ne(F, {
800
800
  key: 0,
801
801
  "data-testid": "canvas-versions-open",
802
802
  variant: "tertiary",
803
803
  "prepend-icon": "history",
804
- label: o(f)("reportV5.reportCanvas.draft.history"),
804
+ label: a(m)("reportV5.reportCanvas.draft.history"),
805
805
  "aria-expanded": w.value,
806
- onClick: ie
806
+ onClick: ue
807
807
  }, null, 8, ["label", "aria-expanded"])) : x("", !0),
808
- T.value ? (s(), ne(u, {
808
+ O.value ? (s(), ne(u, {
809
809
  key: 1,
810
810
  placement: "bottom",
811
- content: o(f)(
811
+ content: a(m)(
812
812
  S.value ? "reportV5.reportAi.chat.cancelSelection" : "reportV5.reportAi.chat.commentWidget"
813
813
  )
814
814
  }, {
815
815
  default: fe(() => [
816
- n("button", {
816
+ r("button", {
817
817
  "data-testid": "canvas-comment-toggle",
818
818
  class: Ue(["canvas-comment-target flex h-32 w-32 items-center justify-center rounded-md text-fm-color-typo-secondary disabled:opacity-50", S.value && "bg-fm-color-neutral-gray-100 text-fm-color-primary"]),
819
819
  "aria-pressed": S.value,
820
- "aria-label": o(f)("reportV5.reportAi.chat.commentWidget"),
821
- disabled: X.value || w.value,
820
+ "aria-label": a(m)("reportV5.reportAi.chat.commentWidget"),
821
+ disabled: Y.value || w.value,
822
822
  onClick: t[4] || (t[4] = (y) => S.value = !S.value)
823
- }, t[19] || (t[19] = [
824
- n("svg", {
823
+ }, [...t[19] || (t[19] = [
824
+ r("svg", {
825
825
  width: "20",
826
826
  height: "20",
827
827
  viewBox: "0 0 20 20",
828
828
  fill: "none",
829
829
  "aria-hidden": "true"
830
830
  }, [
831
- n("path", {
831
+ r("path", {
832
832
  d: "M5 3.5h5a6.5 6.5 0 1 1-6.5 6.5V5A1.5 1.5 0 0 1 5 3.5Z",
833
833
  stroke: "currentColor",
834
834
  "stroke-width": "1.5",
@@ -836,191 +836,191 @@ const bo = "page_filters", ho = { class: "flex min-w-0 grow flex-col" }, go = {
836
836
  "stroke-linejoin": "round"
837
837
  })
838
838
  ], -1)
839
- ]), 10, So)
839
+ ])], 10, So)
840
840
  ]),
841
841
  _: 1
842
842
  }, 8, ["content"])) : x("", !0),
843
- T.value && !Q.value && !w.value ? (s(), ne(E, {
843
+ O.value && !X.value && !w.value ? (s(), ne(F, {
844
844
  key: 2,
845
845
  "data-testid": "report-canvas-chat-open",
846
846
  variant: "tertiary",
847
847
  "prepend-icon": "auto_awesome",
848
- label: o(f)("reportV5.reportAi.chat.open"),
849
- onClick: t[5] || (t[5] = (y) => Q.value = !0)
848
+ label: a(m)("reportV5.reportAi.chat.open"),
849
+ onClick: t[5] || (t[5] = (y) => X.value = !0)
850
850
  }, null, 8, ["label"])) : x("", !0)
851
851
  ])) : x("", !0)
852
852
  ])) : x("", !0)
853
853
  ]),
854
- le.value && !e.viewOnly ? (s(), p("div", Ro, [
855
- n("span", Vo, c(o(f)("reportV5.reportCanvas.draft.pending", { count: te.value })), 1),
856
- n("span", Ao, c(o(f)("reportV5.reportCanvas.draft.hint")), 1),
857
- L.value ? (s(), p("span", $o, c(L.value), 1)) : x("", !0),
858
- F(E, {
854
+ ie.value && !A.viewOnly ? (s(), p("div", Ro, [
855
+ r("span", Vo, c(a(m)("reportV5.reportCanvas.draft.pending", { count: ae.value })), 1),
856
+ r("span", Ao, c(a(m)("reportV5.reportCanvas.draft.hint")), 1),
857
+ z.value ? (s(), p("span", $o, c(z.value), 1)) : x("", !0),
858
+ D(F, {
859
859
  "data-testid": "canvas-draft-discard",
860
860
  variant: "tertiary",
861
- label: o(f)("reportV5.reportCanvas.draft.discard"),
862
- disabled: U.value,
861
+ label: a(m)("reportV5.reportCanvas.draft.discard"),
862
+ disabled: q.value,
863
863
  onClick: Wt
864
864
  }, null, 8, ["label", "disabled"]),
865
- F(E, {
865
+ D(F, {
866
866
  "data-testid": "canvas-draft-publish",
867
867
  variant: "primary",
868
- label: o(f)("reportV5.reportCanvas.draft.publish"),
869
- disabled: U.value,
868
+ label: a(m)("reportV5.reportCanvas.draft.publish"),
869
+ disabled: q.value,
870
870
  onClick: Jt
871
871
  }, null, 8, ["label", "disabled"])
872
872
  ])) : x("", !0),
873
- q.value ? (s(), p("div", Eo, [
874
- F(A, {
873
+ j.value ? (s(), p("div", Eo, [
874
+ D($, {
875
875
  name: "check_circle",
876
876
  size: "sm"
877
877
  }),
878
- n("span", Fo, c(o(f)("reportV5.reportCanvas.history.restored")), 1),
879
- n("button", {
878
+ r("span", Fo, c(a(m)("reportV5.reportCanvas.history.restored")), 1),
879
+ r("button", {
880
880
  class: "flex h-32 w-32 items-center justify-center rounded-md",
881
- "aria-label": o(f)("reportV5.reportCanvas.draft.close"),
882
- onClick: t[6] || (t[6] = (y) => q.value = !1)
881
+ "aria-label": a(m)("reportV5.reportCanvas.draft.close"),
882
+ onClick: t[6] || (t[6] = (y) => j.value = !1)
883
883
  }, [
884
- F(A, {
884
+ D($, {
885
885
  name: "close",
886
886
  size: "sm"
887
887
  })
888
888
  ], 8, Do)
889
889
  ])) : x("", !0),
890
- Yt.value ? (s(), p("div", Io, c(o(f)("reportV5.reportCanvas.canvas.truncated")), 1)) : x("", !0),
891
- I.value ? (s(), p("p", To, c(I.value), 1)) : x("", !0),
892
- ea(n("iframe", {
890
+ Yt.value ? (s(), p("div", Io, c(a(m)("reportV5.reportCanvas.canvas.truncated")), 1)) : x("", !0),
891
+ T.value ? (s(), p("p", To, c(T.value), 1)) : x("", !0),
892
+ ea(r("iframe", {
893
893
  ref_key: "frame",
894
894
  ref: Se,
895
895
  "data-testid": "report-canvas-frame",
896
896
  class: "min-h-0 grow border-0",
897
- srcdoc: o(pa),
897
+ srcdoc: a(pa),
898
898
  sandbox: "allow-scripts",
899
- title: o(f)("reportV5.reportCanvas.canvas.title")
899
+ title: a(m)("reportV5.reportCanvas.canvas.title")
900
900
  }, null, 8, Oo), [
901
- [ta, !I.value]
901
+ [ta, !T.value]
902
902
  ])
903
903
  ]),
904
- o(Te) ? (s(), p("button", {
904
+ a(Te) ? (s(), p("button", {
905
905
  key: 0,
906
906
  type: "button",
907
907
  tabindex: "-1",
908
908
  "aria-hidden": "true",
909
909
  "data-testid": "canvas-scrim",
910
910
  class: "canvas-scrim absolute inset-0 z-20 cursor-default",
911
- onClick: ue
911
+ onClick: de
912
912
  })) : x("", !0),
913
- !e.viewOnly && nt.value && (o(Ie) || !S.value) ? (s(), p("div", {
913
+ !A.viewOnly && rt.value && (a(Ie) || !S.value) ? (s(), p("div", {
914
914
  key: 1,
915
915
  ref_key: "drawer",
916
916
  ref: Ht,
917
917
  class: Ue(
918
- o(Ie) ? "w-[380px] shrink-0" : "absolute inset-y-0 right-0 z-30 w-full max-w-[380px] shadow-lg"
918
+ a(Ie) ? "w-[380px] shrink-0" : "absolute inset-y-0 right-0 z-30 w-full max-w-[380px] shadow-lg"
919
919
  ),
920
- role: o(Te) ? "dialog" : void 0,
921
- "aria-modal": o(Te) ? "true" : void 0,
922
- "aria-label": o(f)(w.value ? "reportV5.reportCanvas.draft.history" : "reportV5.reportAi.chat.title")
920
+ role: a(Te) ? "dialog" : void 0,
921
+ "aria-modal": a(Te) ? "true" : void 0,
922
+ "aria-label": a(m)(w.value ? "reportV5.reportCanvas.draft.history" : "reportV5.reportAi.chat.title")
923
923
  }, [
924
- w.value ? (s(), ne(fo, {
924
+ w.value ? (s(), ne(mo, {
925
925
  key: 0,
926
- "report-id": o(v),
927
- "published-at": (rt = i.value) == null ? void 0 : rt.publishedAt,
928
- timezone: o(_).env().timezone,
929
- "has-draft": le.value,
930
- busy: X.value || U.value,
926
+ "report-id": a(v),
927
+ "published-at": (nt = i.value) == null ? void 0 : nt.publishedAt,
928
+ timezone: a(k).env().timezone,
929
+ "has-draft": ie.value,
930
+ busy: Y.value || q.value,
931
931
  onClose: t[7] || (t[7] = (y) => w.value = !1),
932
- onRestored: m,
933
- onRestoring: t[8] || (t[8] = (y) => Z.value = y)
932
+ onRestored: f,
933
+ onRestoring: t[8] || (t[8] = (y) => G.value = y)
934
934
  }, null, 8, ["report-id", "published-at", "timezone", "has-draft", "busy"])) : (s(), ne(ya, {
935
935
  key: 1,
936
936
  "home-draft": Me.value,
937
937
  "onUpdate:homeDraft": t[9] || (t[9] = (y) => Me.value = y),
938
- "home-open": ae.value,
939
- "onUpdate:homeOpen": t[10] || (t[10] = (y) => ae.value = y),
940
- messages: o(_e),
941
- draft: O.value,
942
- target: r.value,
938
+ "home-open": oe.value,
939
+ "onUpdate:homeOpen": t[10] || (t[10] = (y) => oe.value = y),
940
+ messages: a(ke),
941
+ draft: B.value,
942
+ target: n.value,
943
943
  "target-stale": V.value,
944
- streaming: X.value,
945
- "turn-id": o(Xe),
944
+ streaming: Y.value,
945
+ "turn-id": a(Xe),
946
946
  phase: Kt.value,
947
- slow: o(It),
948
- "started-at": o(Tt),
949
- error: o(Ye),
950
- interrupted: o($t),
947
+ slow: a(It),
948
+ "started-at": a(Tt),
949
+ error: a(Ye),
950
+ interrupted: a($t),
951
951
  blank: ot.value,
952
- run: o(P).run.value,
953
- "run-anchor-id": o(P).anchorId.value,
954
- "run-stale": o(P).stale.value,
955
- "retry-error": o(P).retryError.value,
952
+ run: a(N).run.value,
953
+ "run-anchor-id": a(N).anchorId.value,
954
+ "run-stale": a(N).stale.value,
955
+ "retry-error": a(N).retryError.value,
956
956
  "undoable-turn-ids": ((st = i.value) == null ? void 0 : st.unpublishedTurnIds) ?? [],
957
- undoing: U.value,
958
- "unsent-ids": o(Dt),
959
- "no-reply-id": o(Bt),
960
- "chat-id": o(We),
961
- "chat-title": o(kt),
962
- chats: o(xt),
963
- "chats-cursor": o(Ze),
964
- "chats-loading": o(Ct),
965
- "chats-error": o(St),
966
- switching: o(Ge),
957
+ undoing: q.value,
958
+ "unsent-ids": a(Dt),
959
+ "no-reply-id": a(Bt),
960
+ "chat-id": a(We),
961
+ "chat-title": a(_t),
962
+ chats: a(xt),
963
+ "chats-cursor": a(Ze),
964
+ "chats-loading": a(Ct),
965
+ "chats-error": a(St),
966
+ switching: a(Ge),
967
967
  busy: tt.value,
968
- stoppable: o(Et),
969
- stopping: o(Ft),
970
- earlier: o(Rt),
971
- "loading-earlier": o(Vt),
972
- "onUpdate:draft": t[11] || (t[11] = (y) => O.value = y),
968
+ stoppable: a(Et),
969
+ stopping: a(Ft),
970
+ earlier: a(Rt),
971
+ "loading-earlier": a(Vt),
972
+ "onUpdate:draft": t[11] || (t[11] = (y) => B.value = y),
973
973
  onClearTarget: Re,
974
974
  onSubmit: Ve,
975
- onClose: t[12] || (t[12] = (y) => Q.value = !1),
976
- onRetry: o(P).retry,
975
+ onClose: t[12] || (t[12] = (y) => X.value = !1),
976
+ onRetry: a(N).retry,
977
977
  onUndo: Zt,
978
978
  onResend: bt,
979
- onAskAgain: _t,
979
+ onAskAgain: kt,
980
980
  onEditRequest: wt,
981
981
  onStop: gt,
982
982
  onAskBuilder: ht,
983
- onCheckStatus: o(P).refresh,
983
+ onCheckStatus: a(N).refresh,
984
984
  onNewChat: pt,
985
985
  onSelectChat: yt,
986
- onLoadChats: t[13] || (t[13] = (y) => o(H).loadChats()),
987
- onLoadMoreChats: t[14] || (t[14] = (y) => o(H).loadChats(o(Ze) ?? void 0)),
988
- onLoadEarlier: t[15] || (t[15] = (y) => o(H).loadEarlier())
986
+ onLoadChats: t[13] || (t[13] = (y) => a(M).loadChats()),
987
+ onLoadMoreChats: t[14] || (t[14] = (y) => a(M).loadChats(a(Ze) ?? void 0)),
988
+ onLoadEarlier: t[15] || (t[15] = (y) => a(M).loadEarlier())
989
989
  }, null, 8, ["home-draft", "home-open", "messages", "draft", "target", "target-stale", "streaming", "turn-id", "phase", "slow", "started-at", "error", "interrupted", "blank", "run", "run-anchor-id", "run-stale", "retry-error", "undoable-turn-ids", "undoing", "unsent-ids", "no-reply-id", "chat-id", "chat-title", "chats", "chats-cursor", "chats-loading", "chats-error", "switching", "busy", "stoppable", "stopping", "earlier", "loading-earlier", "onRetry", "onCheckStatus"]))
990
990
  ], 10, Bo)) : x("", !0),
991
- z.value ? (s(), ne(oe, {
991
+ P.value ? (s(), ne(re, {
992
992
  key: 2,
993
- modelValue: K.value,
994
- "onUpdate:modelValue": t[18] || (t[18] = (y) => K.value = y),
993
+ modelValue: J.value,
994
+ "onUpdate:modelValue": t[18] || (t[18] = (y) => J.value = y),
995
995
  overlay: !0,
996
996
  "dismiss-away": !0
997
997
  }, {
998
998
  "dialog-header": fe(() => [
999
- n("p", Lo, c(o(f)("report.common.rename")), 1)
999
+ r("p", Lo, c(a(m)("report.common.rename")), 1)
1000
1000
  ]),
1001
1001
  default: fe(() => [
1002
- n("div", {
1002
+ r("div", {
1003
1003
  onKeydown: aa(oa(he, ["prevent"]), ["enter"])
1004
1004
  }, [
1005
- F(de, {
1006
- modelValue: ce.value,
1007
- "onUpdate:modelValue": t[16] || (t[16] = (y) => ce.value = y),
1008
- label: o(f)("report.view.report.name"),
1009
- placeholder: o(f)("report.view.report.enter")
1005
+ D(ce, {
1006
+ modelValue: ve.value,
1007
+ "onUpdate:modelValue": t[16] || (t[16] = (y) => ve.value = y),
1008
+ label: a(m)("report.view.report.name"),
1009
+ placeholder: a(m)("report.view.report.enter")
1010
1010
  }, null, 8, ["modelValue", "label", "placeholder"])
1011
1011
  ], 40, zo)
1012
1012
  ]),
1013
1013
  "dialog-footer": fe(() => [
1014
- t[20] || (t[20] = n("div", { class: "grow" }, null, -1)),
1015
- F(E, {
1016
- label: o(f)("report.common.cancel"),
1014
+ t[20] || (t[20] = r("div", { class: "grow" }, null, -1)),
1015
+ D(F, {
1016
+ label: a(m)("report.common.cancel"),
1017
1017
  variant: "tertiary",
1018
- onClick: t[17] || (t[17] = (y) => K.value = !1)
1018
+ onClick: t[17] || (t[17] = (y) => J.value = !1)
1019
1019
  }, null, 8, ["label"]),
1020
- F(E, {
1021
- label: o(f)("report.common.save"),
1020
+ D(F, {
1021
+ label: a(m)("report.common.save"),
1022
1022
  variant: "primary",
1023
- disabled: ce.value.trim() === "",
1023
+ disabled: ve.value.trim() === "",
1024
1024
  onClick: he
1025
1025
  }, null, 8, ["label", "disabled"])
1026
1026
  ]),