@feedmepos/mf-report 5.30.1 → 5.30.2

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 (31) hide show
  1. package/dist/{App-CxNecVsw.js → App-6zO4iQws.js} +4 -4
  2. package/dist/{DateRangeSelect-BI_D4Ipz.js → DateRangeSelect-BuA-6Cqk.js} +1 -1
  3. package/dist/{Default.vue_vue_type_script_setup_true_lang-BxcJSQhM.js → Default.vue_vue_type_script_setup_true_lang-C8rb1ZoC.js} +1 -1
  4. package/dist/{DynamicWidget.vue_vue_type_script_setup_true_lang-D-KPQrPq.js → DynamicWidget.vue_vue_type_script_setup_true_lang-ClwALNEj.js} +888 -879
  5. package/dist/{GlobalFilterSelect.vue_vue_type_script_setup_true_lang-BvvfKZNr.js → GlobalFilterSelect.vue_vue_type_script_setup_true_lang-CLkuxs9G.js} +571 -558
  6. package/dist/{InsightView-DxYqCScx.js → InsightView-BNHq0EtF.js} +5 -5
  7. package/dist/Integration-DphGslTR.js +8817 -0
  8. package/dist/{Integrations-DcV_v5Du.js → Integrations-BCJLD7Sw.js} +2 -2
  9. package/dist/{Layout-DemHMNuZ.js → Layout-7V1d_pkT.js} +1 -1
  10. package/dist/{LocationSelect.vue_vue_type_script_setup_true_lang-CYgy4A1o.js → LocationSelect.vue_vue_type_script_setup_true_lang-B2it9IPE.js} +2 -2
  11. package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-CWAgCUv_.js → MenuTab.vue_vue_type_script_setup_true_lang-B6F3Hki4.js} +5 -5
  12. package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-C-5fNiYo.js → NavigationTab.vue_vue_type_script_setup_true_lang-Sucqh6EA.js} +5 -5
  13. package/dist/{OverviewView-BZPCDGUE.js → OverviewView-9Hln0g2v.js} +5 -5
  14. package/dist/{Report-7pwAySr_.js → Report-Q70-i6Or.js} +3 -3
  15. package/dist/{ReportCanvasView-pLudoc2O.js → ReportCanvasView-BiTnB13m.js} +5 -5
  16. package/dist/{ReportEditor-C3Hi49MD.js → ReportEditor-1CN33Gnq.js} +7 -7
  17. package/dist/{ReportView-GVcf2UPH.js → ReportView-critFY-G.js} +6 -6
  18. package/dist/{ReportViewRoute-CM9QOfnk.js → ReportViewRoute-CFPaGWsc.js} +2 -2
  19. package/dist/{Setting-DbNvny2j.js → Setting-D62B-6wp.js} +3 -3
  20. package/dist/{Template-DDmro22I.js → Template-q38kvrMM.js} +3 -3
  21. package/dist/{TileEditor-Blbbg1V4.js → TileEditor-nZZlRwbN.js} +6 -6
  22. package/dist/{TilePageStack.vue_vue_type_script_setup_true_lang-DuxN8oe_.js → TilePageStack.vue_vue_type_script_setup_true_lang-BTxYHBq6.js} +2 -2
  23. package/dist/{TransitionFade-Bwj-Hupm.js → TransitionFade-3P3TmFUU.js} +5 -5
  24. package/dist/{app-DNuUgxBX.js → app-guIXajh-.js} +353 -321
  25. package/dist/app.js +1 -1
  26. package/dist/{currency-Bn6Bcs8d.js → currency-CoYTPdJI.js} +1 -1
  27. package/dist/{index-B-AfP_nO.js → index-CB3Wm4Rz.js} +1 -1
  28. package/dist/{report-3-5_1WdK.js → report-D2c06ACp.js} +1 -1
  29. package/dist/{useRestaurantPermission-BSGZVb0X.js → useRestaurantPermission-Bn1JV1ua.js} +1 -1
  30. package/package.json +1 -1
  31. package/dist/Integration-DIsAxhsM.js +0 -8626
@@ -1,29 +1,29 @@
1
- import { ref as ye, computed as ve, defineComponent as yt, mergeModels as lt, useModel as ft, watch as Ie, resolveComponent as ee, createElementBlock as me, openBlock as H, createVNode as L, withCtx as re, createElementVNode as q, createCommentVNode as bt, Fragment as Le, renderList as ht, createBlock as Fe, unref as T, createTextVNode as nt, withDirectives as xl, toDisplayString as fe, vShow as Al, renderSlot as Ut, normalizeStyle as $l, normalizeClass as Gt, withModifiers as dt } from "vue";
2
- import { c as jt, _ as qt, D as Gl, e as El } from "./DateRangeSelect-BI_D4Ipz.js";
3
- import { e as gt } from "./index-B-AfP_nO.js";
4
- import { d as I, u as Oe, c as je, a as Me, F as ke, Z as St, r as $e, g as Ll, h as Ml } from "./app-DNuUgxBX.js";
5
- import { b as M, C as W, Q as tt, u as Pe, o as Ge, p as Ue, D as pe, a as Pl, x as Et, W as Lt, A as Bl, S as Mt } from "./report-3-5_1WdK.js";
6
- import { defineStore as Qt, storeToRefs as se } from "pinia";
7
- import { detectLocale as Ae } from "@feedmepos/mf-common";
1
+ import { ref as he, computed as Se, defineComponent as yt, mergeModels as lt, useModel as ft, watch as Ie, resolveComponent as ee, createElementBlock as pe, openBlock as J, createVNode as P, withCtx as ie, createElementVNode as j, createCommentVNode as bt, Fragment as Le, renderList as ht, createBlock as we, unref as T, createTextVNode as nt, withDirectives as $l, toDisplayString as be, vShow as xl, renderSlot as qt, normalizeStyle as Al, normalizeClass as Et, withModifiers as dt } from "vue";
2
+ import { c as jt, _ as Qt, D as Gl, e as El } from "./DateRangeSelect-BuA-6Cqk.js";
3
+ import { e as St } from "./index-CB3Wm4Rz.js";
4
+ import { d as I, u as Oe, c as qe, a as Me, F as ke, _ as gt, r as Ae, g as Ll, h as Ml } from "./app-guIXajh-.js";
5
+ import { b as B, C as W, Q as tt, u as Pe, o as Ge, p as Ue, D as fe, a as Pl, x as Lt, W as Mt, A as Bl, S as Pt } from "./report-D2c06ACp.js";
6
+ import { defineStore as Ft, storeToRefs as re } from "pinia";
7
+ import { detectLocale as xe } from "@feedmepos/mf-common";
8
8
  import { u as Kt } from "./_plugin-vue_export-helper-C6QDExPN.js";
9
9
  import { _ as zl } from "./SelectComponent.vue_vue_type_script_setup_true_lang-DW7Dk7iQ.js";
10
10
  var Jt = /* @__PURE__ */ ((l) => (l.generating = "GENERATING", l.completed = "COMPLETED", l.failed = "FAILED", l.canceled = "CANCELLED", l))(Jt || {});
11
11
  const Wl = "/assets/formatChartData.worker-t4_wCRf0.js", mt = /* @__PURE__ */ new Map();
12
- function Pt(l) {
12
+ function Bt(l) {
13
13
  return new Worker(l, { type: "module" });
14
14
  }
15
15
  async function Ul(l) {
16
16
  if (mt.has(l))
17
- return Pt(mt.get(l));
17
+ return Bt(mt.get(l));
18
18
  let n = l;
19
19
  if (location.hostname !== new URL(import.meta.url).hostname) {
20
- const d = new URL(l.replace(/^\//, ""), import.meta.url).href, p = await fetch(d).then((g) => g.text()), f = new Blob([p], { type: "application/javascript" });
20
+ const d = new URL(l.replace(/^\//, ""), import.meta.url).href, p = await fetch(d).then((S) => S.text()), f = new Blob([p], { type: "application/javascript" });
21
21
  n = URL.createObjectURL(f);
22
22
  }
23
- const r = Pt(n);
23
+ const r = Bt(n);
24
24
  return mt.set(l, n), r;
25
25
  }
26
- async function jl(l, n) {
26
+ async function ql(l, n) {
27
27
  const s = await Ul(l);
28
28
  return s.postMessage(n), await new Promise((r) => {
29
29
  s.onmessage = async (d) => {
@@ -32,12 +32,12 @@ async function jl(l, n) {
32
32
  };
33
33
  });
34
34
  }
35
- const ql = "mf-reportreport-sort-store", Yt = Qt(ql, () => {
36
- const l = ye([]);
35
+ const jl = "mf-reportreport-sort-store", Yt = Ft(jl, () => {
36
+ const l = he([]);
37
37
  function n(d, p) {
38
38
  if (d == null) return;
39
- const f = Array.isArray(p) ? p.filter((i) => i && i.key) : [], g = l.value.findIndex((i) => i.tileIndex === d), h = { tileIndex: d, sorts: f };
40
- g !== -1 ? l.value.splice(g, 1, h) : l.value.push(h);
39
+ const f = Array.isArray(p) ? p.filter((i) => i && i.key) : [], S = l.value.findIndex((i) => i.tileIndex === d), h = { tileIndex: d, sorts: f };
40
+ S !== -1 ? l.value.splice(S, 1, h) : l.value.push(h);
41
41
  }
42
42
  function s(d) {
43
43
  var p;
@@ -47,11 +47,21 @@ const ql = "mf-reportreport-sort-store", Yt = Qt(ql, () => {
47
47
  typeof d == "number" ? l.value = l.value.filter((p) => p.tileIndex !== d) : l.value = [];
48
48
  }
49
49
  return { tileSort: l, setTileSorts: n, getTileSorts: s, clearTileSorts: r };
50
+ }), Ql = "mf-reportreport-search-store", Kl = Ft(Ql, () => {
51
+ const l = he({});
52
+ function n(r, d) {
53
+ r != null && (d ? l.value[r] = d : delete l.value[r]);
54
+ }
55
+ function s(r) {
56
+ if (r != null)
57
+ return l.value[r] || void 0;
58
+ }
59
+ return { tileSearch: l, setTileSearch: n, getTileSearch: s };
50
60
  }), Ht = "__EMPTY__";
51
61
  function We(l = []) {
52
62
  return Array.from(new Set(l));
53
63
  }
54
- function Ql(l) {
64
+ function Jl(l) {
55
65
  return [
56
66
  l.schemaName,
57
67
  l.name,
@@ -60,14 +70,14 @@ function Ql(l) {
60
70
  l.operator
61
71
  ].join(":");
62
72
  }
63
- function Kl(l) {
73
+ function Yl(l) {
64
74
  const n = (s, r) => I().set("hour", s).set("minute", r).set("second", 0).set("millisecond", 0).toISOString();
65
75
  return !l.startTime || !l.endTime ? [] : [
66
76
  n(l.startTime.hour, l.startTime.minute),
67
77
  n(l.endTime.hour, l.endTime.minute)
68
78
  ];
69
79
  }
70
- function Jl(l, n) {
80
+ function Hl(l, n) {
71
81
  return {
72
82
  schemaName: l.schemaName,
73
83
  name: l.name,
@@ -78,28 +88,28 @@ function Jl(l, n) {
78
88
  isGlobalFilter: !0
79
89
  };
80
90
  }
81
- function Yl(l, n) {
82
- const s = Kl(n);
91
+ function Zl(l, n) {
92
+ const s = Yl(n);
83
93
  return s.length !== 2 ? null : {
84
94
  schemaName: l.schemaName,
85
95
  name: l.name,
86
96
  operator: W.Between,
87
- option: l.option ?? M.TimeOfDay,
97
+ option: l.option ?? B.TimeOfDay,
88
98
  values: s,
89
99
  dataFormula: l.dataFormula,
90
100
  isGlobalFilter: !0
91
101
  };
92
102
  }
93
- function Hl(l) {
94
- var d, p, f, g;
103
+ function Xl(l) {
104
+ var d, p, f, S;
95
105
  const n = (l.filters ?? []).map((h) => ({
96
106
  ...h,
97
107
  isGlobalFilter: !0
98
108
  })), s = Array.from(new Set(l.values ?? []));
99
109
  if (s.length === 1 && String(s[0]) === "EMPTY_GLOBAL_FILTER_VALUE") {
100
- const h = Object.values(M).includes(
110
+ const h = Object.values(B).includes(
101
111
  String(l.option ?? "")
102
- ), i = l.option === M.TimeOfDay ? ["1000-01-01T23:59:59.999Z", "1000-01-01T00:00:00.000Z"] : [h ? "-1" : Ht];
112
+ ), i = l.option === B.TimeOfDay ? ["1000-01-01T23:59:59.999Z", "1000-01-01T00:00:00.000Z"] : [h ? "-1" : Ht];
103
113
  return [
104
114
  ...n,
105
115
  {
@@ -120,17 +130,17 @@ function Hl(l) {
120
130
  ...((p = l.customTimeRanges) == null ? void 0 : p.filter((i) => {
121
131
  const F = String(i.name ?? "");
122
132
  return h.has(F);
123
- }).map((i) => Yl(l, i)).filter((i) => !!i)) ?? []
133
+ }).map((i) => Zl(l, i)).filter((i) => !!i)) ?? []
124
134
  ];
125
135
  }
126
136
  if ((((f = l.customOptions) == null ? void 0 : f.length) ?? 0) > 0) {
127
137
  const h = new Set(s.map((i) => String(i)));
128
138
  return [
129
139
  ...n,
130
- ...((g = l.customOptions) == null ? void 0 : g.filter((i) => {
140
+ ...((S = l.customOptions) == null ? void 0 : S.filter((i) => {
131
141
  const F = String(i.label ?? "");
132
142
  return h.has(F);
133
- }).map((i) => Jl(l, i)).filter((i) => Array.isArray(i.values) && i.values.length > 0)) ?? []
143
+ }).map((i) => Hl(l, i)).filter((i) => Array.isArray(i.values) && i.values.length > 0)) ?? []
134
144
  ];
135
145
  }
136
146
  return s.length === 0 ? n : [
@@ -146,17 +156,17 @@ function Hl(l) {
146
156
  }
147
157
  ];
148
158
  }
149
- function Bt({
159
+ function zt({
150
160
  originalFilters: l,
151
161
  globalFilters: n,
152
162
  schemaNames: s
153
163
  }) {
154
- const r = /* @__PURE__ */ new Map(), d = [], p = new Set((s ?? []).map((u) => String(u))), f = (u) => p.has(u.schemaName ?? ""), g = n.filter(f);
164
+ const r = /* @__PURE__ */ new Map(), d = [], p = new Set((s ?? []).map((u) => String(u))), f = (u) => p.has(u.schemaName ?? ""), S = n.filter(f);
155
165
  function h(u) {
156
- const m = Object.values(M).includes(
166
+ const m = Object.values(B).includes(
157
167
  String(u.option ?? "")
158
168
  );
159
- return u.option === M.TimeOfDay ? ["1000-01-01T23:59:59.999Z", "1000-01-01T00:00:00.000Z"] : [m ? "-1" : Ht];
169
+ return u.option === B.TimeOfDay ? ["1000-01-01T23:59:59.999Z", "1000-01-01T00:00:00.000Z"] : [m ? "-1" : Ht];
160
170
  }
161
171
  function i(u, m) {
162
172
  const v = typeof u == "number" ? u : Number(u), N = typeof m == "number" ? m : Number(m);
@@ -167,23 +177,23 @@ function Bt({
167
177
  const v = i(u[0], m[0]);
168
178
  return v == null ? null : [v >= 0 ? u[0] : m[0]];
169
179
  }
170
- function P(u, m) {
180
+ function z(u, m) {
171
181
  if (u.length === 0 || m.length === 0) return null;
172
182
  const v = i(u[0], m[0]);
173
183
  return v == null ? null : [v <= 0 ? u[0] : m[0]];
174
184
  }
175
- function ne(u, m) {
185
+ function ae(u, m) {
176
186
  if (u.length < 2 || m.length < 2) return null;
177
187
  const v = i(u[0], m[0]), N = i(u[1], m[1]);
178
188
  if (v == null || N == null) return null;
179
- const k = v >= 0 ? u[0] : m[0], O = N <= 0 ? u[1] : m[1];
180
- return i(k, O) == null ? null : [k, O];
189
+ const _ = v >= 0 ? u[0] : m[0], O = N <= 0 ? u[1] : m[1];
190
+ return i(_, O) == null ? null : [_, O];
181
191
  }
182
- function _(u, m) {
192
+ function k(u, m) {
183
193
  const v = We(u.values), N = We(m.values);
184
194
  switch (m.operator) {
185
195
  case W.Equal: {
186
- const k = new Set(N), O = v.filter((B) => k.has(B));
196
+ const _ = new Set(N), O = v.filter((E) => _.has(E));
187
197
  return O.length ? O : h(u);
188
198
  }
189
199
  case W.NotEqual:
@@ -197,9 +207,9 @@ function Bt({
197
207
  return F(v, N);
198
208
  case W.LessThan:
199
209
  case W.LessThanOrEqual:
200
- return P(v, N);
210
+ return z(v, N);
201
211
  case W.Between:
202
- return ne(v, N);
212
+ return ae(v, N);
203
213
  default:
204
214
  return null;
205
215
  }
@@ -211,57 +221,57 @@ function Bt({
211
221
  ...u,
212
222
  values: We(u.values)
213
223
  };
214
- if (m.option === M.TimeOfDay && m.operator === W.Between) {
224
+ if (m.option === B.TimeOfDay && m.operator === W.Between) {
215
225
  d.push(m);
216
226
  return;
217
227
  }
218
- const N = Ql(m), k = r.get(N);
219
- if (!k) {
228
+ const N = Jl(m), _ = r.get(N);
229
+ if (!_) {
220
230
  r.set(N, m);
221
231
  return;
222
232
  }
223
- const O = _(k, m);
233
+ const O = k(_, m);
224
234
  if (O == null) {
225
235
  d.push(m);
226
236
  return;
227
237
  }
228
- k.values = O, r.set(N, k);
238
+ _.values = O, r.set(N, _);
229
239
  };
230
- return l.forEach(D), g.forEach(D), [...Array.from(r.values()), ...d];
240
+ return l.forEach(D), S.forEach(D), [...Array.from(r.values()), ...d];
231
241
  }
232
- function qe(l, n, s) {
242
+ function je(l, n, s) {
233
243
  var p;
234
244
  const r = JSON.parse(JSON.stringify(l)), d = n.filter((f) => {
235
- var g;
236
- return (g = f.tileIds) == null ? void 0 : g.includes(s);
237
- }).flatMap((f) => Hl(f));
245
+ var S;
246
+ return (S = f.tileIds) == null ? void 0 : S.includes(s);
247
+ }).flatMap((f) => Xl(f));
238
248
  return {
239
249
  ...r,
240
250
  config: {
241
251
  ...r.config,
242
- filters: Bt({
252
+ filters: zt({
243
253
  originalFilters: r.config.filters ?? [],
244
254
  globalFilters: d ?? [],
245
255
  schemaNames: r.config.schemaNames
246
256
  }),
247
- joinDatasources: ((p = r.config.joinDatasources) == null ? void 0 : p.map((f, g) => {
257
+ joinDatasources: ((p = r.config.joinDatasources) == null ? void 0 : p.map((f, S) => {
248
258
  var h;
249
259
  return {
250
260
  ...f,
251
- filters: Bt({
261
+ filters: zt({
252
262
  originalFilters: f.filters ?? [],
253
263
  globalFilters: d ?? [],
254
- schemaNames: (h = r.config.joinDatasources) == null ? void 0 : h[g].schemaNames
264
+ schemaNames: (h = r.config.joinDatasources) == null ? void 0 : h[S].schemaNames
255
265
  })
256
266
  };
257
267
  })) ?? []
258
268
  }
259
269
  };
260
270
  }
261
- function Zl(l) {
271
+ function en(l) {
262
272
  return (l == null ? void 0 : l.queryDatasource) === tt.BigQuery ? tt.BigQuery : tt.Postgres;
263
273
  }
264
- const Xl = [
274
+ const tn = [
265
275
  "schemaNames",
266
276
  "schemas",
267
277
  "dimensions",
@@ -291,7 +301,7 @@ const Xl = [
291
301
  ];
292
302
  function Zt(l) {
293
303
  const n = { ...l.config };
294
- for (const s of Xl)
304
+ for (const s of tn)
295
305
  delete n[s];
296
306
  return n;
297
307
  }
@@ -305,14 +315,14 @@ function Qe({
305
315
  compareDateRange: r,
306
316
  timezone: d
307
317
  }) {
308
- const { canReadReportDateRange: p, canReadPageDateRange: f } = Ml(), g = (i) => n ? f(n, i, d) : l ? p(l, i, d) : !0, h = !!(r != null && r.startDate && (r != null && r.endDate));
309
- return g(s) && (!h || g(r));
318
+ const { canReadReportDateRange: p, canReadPageDateRange: f } = Ml(), S = (i) => n ? f(n, i, d) : l ? p(l, i, d) : !0, h = !!(r != null && r.startDate && (r != null && r.endDate));
319
+ return S(s) && (!h || S(r));
310
320
  }
311
321
  function Ke(l) {
312
322
  if (l === "overview")
313
323
  return Ll.report_accessOverview;
314
324
  }
315
- function Ft({
325
+ function wt({
316
326
  selectedNavigationTab: l,
317
327
  isEditorRoute: n,
318
328
  overviewReport: s,
@@ -331,7 +341,7 @@ async function Xt(l, n) {
331
341
  }
332
342
  throw new Error("No callback");
333
343
  }
334
- const en = async ({
344
+ const ln = async ({
335
345
  widget: l,
336
346
  signal: n,
337
347
  tileId: s,
@@ -339,22 +349,22 @@ const en = async ({
339
349
  scopedTimeRange: d,
340
350
  scopedDateRange: p,
341
351
  scopedGlobalFilters: f,
342
- page: g,
352
+ page: S,
343
353
  pageRead: h,
344
354
  search: i
345
355
  }) => {
346
- var ie, he, ue, ge;
347
- const { businessId: F } = se(Oe()), { currentReport: P, editingReport: ne, overviewReport: _ } = Pe(), { selectedNavigationTab: D, isEditorRoute: u } = je(), m = Ft({
356
+ var de, ge, ye, ue;
357
+ const { businessId: F } = re(Oe()), { currentReport: z, editingReport: ae, overviewReport: k } = Pe(), { selectedNavigationTab: D, isEditorRoute: u } = qe(), m = wt({
348
358
  selectedNavigationTab: D,
349
359
  isEditorRoute: u,
350
- overviewReport: _,
351
- editingReport: ne,
352
- currentReport: P
360
+ overviewReport: k,
361
+ editingReport: ae,
362
+ currentReport: z
353
363
  }), v = Ke(D), {
354
364
  selectedRestaurantIds: N,
355
- selectedWarehouseIds: k,
365
+ selectedWarehouseIds: _,
356
366
  selectedLocationIds: O,
357
- dateRange: B,
367
+ dateRange: E,
358
368
  compareDateRange: Q,
359
369
  timeRange: U,
360
370
  timezone: te,
@@ -363,36 +373,36 @@ const en = async ({
363
373
  } = Me(), { globalFilters: w } = Ge();
364
374
  if (O.length === 0)
365
375
  return null;
366
- const x = p ?? B, J = d ?? U, z = f ?? w;
376
+ const $ = p ?? E, K = d ?? U, Y = f ?? w;
367
377
  if (!Qe({
368
378
  report: m,
369
379
  pageSubject: v,
370
- dateRange: x,
380
+ dateRange: $,
371
381
  compareDateRange: Q,
372
382
  timezone: te
373
383
  }))
374
384
  return null;
375
- const Y = (r == null ? void 0 : r.filter((we) => X.some((ce) => ce.id === we))) ?? N, ae = (r == null ? void 0 : r.filter((we) => le.some((ce) => ce.id === we))) ?? k, K = qe(l, z, s ?? ""), R = {
385
+ const H = (r == null ? void 0 : r.filter((oe) => X.some((se) => se.id === oe))) ?? N, ne = (r == null ? void 0 : r.filter((oe) => le.some((se) => se.id === oe))) ?? _, L = je(l, Y, s ?? ""), R = {
376
386
  fetchType: ke.Post,
377
387
  url: h ? `/${F.value}/v2/query/page` : `/${F.value}/v2/query`,
378
388
  data: {
379
- ...g ? { page: g } : {},
389
+ ...S ? { page: S } : {},
380
390
  ...h ?? {},
381
391
  ...i ? { search: i } : {},
382
- widget: K,
383
- dateRange: [x.startDate, x.endDate],
392
+ widget: L,
393
+ dateRange: [$.startDate, $.endDate],
384
394
  compareDateRange: Q.startDate && Q.endDate ? [Q.startDate, Q.endDate] : void 0,
385
395
  timeRange: [
386
- I().tz(te).hour(Number((ie = J.start) == null ? void 0 : ie.hour)).minute(Number((he = J.start) == null ? void 0 : he.minute)).toISOString(),
387
- I().tz(te).hour(Number((ue = J.end) == null ? void 0 : ue.hour)).minute(Number((ge = J.end) == null ? void 0 : ge.minute)).endOf("minutes").toISOString()
396
+ I().tz(te).hour(Number((de = K.start) == null ? void 0 : de.hour)).minute(Number((ge = K.start) == null ? void 0 : ge.minute)).toISOString(),
397
+ I().tz(te).hour(Number((ye = K.end) == null ? void 0 : ye.hour)).minute(Number((ue = K.end) == null ? void 0 : ue.minute)).endOf("minutes").toISOString()
388
398
  ],
389
399
  businessIds: F.value ? [F.value] : [],
390
- restaurantIds: Y,
391
- warehouseIds: ae,
400
+ restaurantIds: H,
401
+ warehouseIds: ne,
392
402
  timezone: te,
393
403
  skipStringSpaceGrouping: !!(m != null && m.batch) || vt(m),
394
404
  reportId: m == null ? void 0 : m.id,
395
- queryDatasource: Zl(m)
405
+ queryDatasource: en(m)
396
406
  },
397
407
  requestConfig: {
398
408
  timeout: 1e3 * 60 * 5,
@@ -401,50 +411,50 @@ const en = async ({
401
411
  // A query is a read: a 502/503/504 from the gateway is safe to re-send.
402
412
  retry: 2
403
413
  };
404
- return await Xt([() => $e.fetch(R)], 2e3);
405
- }, Mn = async ({
414
+ return await Xt([() => Ae.fetch(R)], 2e3);
415
+ }, Bn = async ({
406
416
  widget: l,
407
417
  signal: n,
408
418
  tileId: s,
409
419
  scopedDateRange: r,
410
420
  scopedCompareDateRange: d
411
421
  }) => {
412
- var le, w, x, J;
413
- const { businessId: p } = se(Oe()), { currentReport: f, editingReport: g, overviewReport: h } = Pe(), { selectedNavigationTab: i, isEditorRoute: F } = je(), P = Ft({
422
+ var le, w, $, K;
423
+ const { businessId: p } = re(Oe()), { currentReport: f, editingReport: S, overviewReport: h } = Pe(), { selectedNavigationTab: i, isEditorRoute: F } = qe(), z = wt({
414
424
  selectedNavigationTab: i,
415
425
  isEditorRoute: F,
416
426
  overviewReport: h,
417
- editingReport: g,
427
+ editingReport: S,
418
428
  currentReport: f
419
- }), ne = Ke(i), { restaurants: _, warehouses: D, dateRange: u, compareDateRange: m, timeRange: v, timezone: N } = Me(), { globalFilters: k } = Ge();
420
- if (_.length === 0 && D.length === 0)
429
+ }), ae = Ke(i), { restaurants: k, warehouses: D, dateRange: u, compareDateRange: m, timeRange: v, timezone: N } = Me(), { globalFilters: _ } = Ge();
430
+ if (k.length === 0 && D.length === 0)
421
431
  return { totalBytesProcessed: 0 };
422
- const O = r ?? u, B = d ?? m;
432
+ const O = r ?? u, E = d ?? m;
423
433
  if (!Qe({
424
- report: P,
425
- pageSubject: ne,
434
+ report: z,
435
+ pageSubject: ae,
426
436
  dateRange: O,
427
- compareDateRange: B,
437
+ compareDateRange: E,
428
438
  timezone: N
429
439
  }))
430
440
  return { totalBytesProcessed: 0 };
431
- const Q = _.map((z) => z.id), U = D.map((z) => z.id), te = qe(l, k, s ?? ""), X = {
441
+ const Q = k.map((Y) => Y.id), U = D.map((Y) => Y.id), te = je(l, _, s ?? ""), X = {
432
442
  fetchType: ke.Post,
433
443
  url: `/${p.value}/v2/query/dry-run`,
434
444
  data: {
435
445
  widget: te,
436
446
  dateRange: [O.startDate, O.endDate],
437
- compareDateRange: B.startDate && B.endDate ? [B.startDate, B.endDate] : void 0,
447
+ compareDateRange: E.startDate && E.endDate ? [E.startDate, E.endDate] : void 0,
438
448
  timeRange: [
439
449
  I().tz(N).hour(Number((le = v.start) == null ? void 0 : le.hour)).minute(Number((w = v.start) == null ? void 0 : w.minute)).toISOString(),
440
- I().tz(N).hour(Number((x = v.end) == null ? void 0 : x.hour)).minute(Number((J = v.end) == null ? void 0 : J.minute)).endOf("minutes").toISOString()
450
+ I().tz(N).hour(Number(($ = v.end) == null ? void 0 : $.hour)).minute(Number((K = v.end) == null ? void 0 : K.minute)).endOf("minutes").toISOString()
441
451
  ],
442
452
  businessIds: p.value ? [p.value] : [],
443
453
  restaurantIds: Q,
444
454
  warehouseIds: U,
445
455
  timezone: N,
446
456
  skipStringSpaceGrouping: !1,
447
- reportId: P == null ? void 0 : P.id,
457
+ reportId: z == null ? void 0 : z.id,
448
458
  queryDatasource: tt.BigQuery
449
459
  },
450
460
  requestConfig: {
@@ -452,8 +462,8 @@ const en = async ({
452
462
  signal: n
453
463
  }
454
464
  };
455
- return $e.fetch(X);
456
- }, tn = async ({
465
+ return Ae.fetch(X);
466
+ }, nn = async ({
457
467
  widget: l,
458
468
  signal: n,
459
469
  tileId: s,
@@ -461,20 +471,20 @@ const en = async ({
461
471
  scopedTimeRange: d,
462
472
  scopedDateRange: p,
463
473
  scopedGlobalFilters: f,
464
- page: g,
474
+ page: S,
465
475
  pageRead: h,
466
476
  search: i
467
477
  }) => {
468
- var ue, ge, we, ce;
469
- const { businessId: F, country: P } = se(Oe()), { currentReport: ne, editingReport: _, overviewReport: D } = Pe(), { selectedNavigationTab: u, isEditorRoute: m } = je(), v = Ft({
478
+ var ye, ue, oe, se;
479
+ const { businessId: F, country: z } = re(Oe()), { currentReport: ae, editingReport: k, overviewReport: D } = Pe(), { selectedNavigationTab: u, isEditorRoute: m } = qe(), v = wt({
470
480
  selectedNavigationTab: u,
471
481
  isEditorRoute: m,
472
482
  overviewReport: D,
473
- editingReport: _,
474
- currentReport: ne
483
+ editingReport: k,
484
+ currentReport: ae
475
485
  }), N = Ke(u);
476
486
  if (vt(v))
477
- return en({
487
+ return ln({
478
488
  widget: l,
479
489
  signal: n,
480
490
  tileId: s,
@@ -482,52 +492,52 @@ const en = async ({
482
492
  scopedTimeRange: d,
483
493
  scopedDateRange: p,
484
494
  scopedGlobalFilters: f,
485
- page: g,
495
+ page: S,
486
496
  pageRead: h,
487
497
  search: i
488
498
  });
489
499
  const {
490
- selectedRestaurantIds: k,
500
+ selectedRestaurantIds: _,
491
501
  selectedWarehouseIds: O,
492
- selectedLocationIds: B,
502
+ selectedLocationIds: E,
493
503
  dateRange: Q,
494
504
  compareDateRange: U,
495
505
  timeRange: te,
496
506
  timezone: X,
497
507
  restaurants: le,
498
508
  warehouses: w
499
- } = Me(), { globalFilters: x } = Ge();
500
- if (B.length === 0)
509
+ } = Me(), { globalFilters: $ } = Ge();
510
+ if (E.length === 0)
501
511
  return null;
502
- const J = p ?? Q, z = d ?? te, Y = f ?? x;
512
+ const K = p ?? Q, Y = d ?? te, H = f ?? $;
503
513
  if (!Qe({
504
514
  report: v,
505
515
  pageSubject: N,
506
- dateRange: J,
516
+ dateRange: K,
507
517
  compareDateRange: U,
508
518
  timezone: X
509
519
  }))
510
520
  return null;
511
- const ae = (r == null ? void 0 : r.filter((Z) => le.some((De) => De.id === Z))) ?? k, K = (r == null ? void 0 : r.filter((Z) => w.some((De) => De.id === Z))) ?? O, R = qe(l, Y, s ?? ""), be = {
521
+ const ne = (r == null ? void 0 : r.filter((Z) => le.some((De) => De.id === Z))) ?? _, L = (r == null ? void 0 : r.filter((Z) => w.some((De) => De.id === Z))) ?? O, R = je(l, H, s ?? ""), ve = {
512
522
  fetchType: ke.Post,
513
523
  url: `/${F.value}/postgres-query`,
514
- data: gt.getQueryRequests({
524
+ data: St.getQueryRequests({
515
525
  widget: R,
516
- dateRange: [J.startDate, J.endDate],
526
+ dateRange: [K.startDate, K.endDate],
517
527
  compareDateRange: U.startDate && U.endDate ? [U.startDate, U.endDate] : void 0,
518
528
  timeRange: [
519
- I().tz(X).hour(Number((ue = z.start) == null ? void 0 : ue.hour)).minute(Number((ge = z.start) == null ? void 0 : ge.minute)).toISOString(),
520
- I().tz(X).hour(Number((we = z.end) == null ? void 0 : we.hour)).minute(Number((ce = z.end) == null ? void 0 : ce.minute)).endOf("minutes").toISOString()
529
+ I().tz(X).hour(Number((ye = Y.start) == null ? void 0 : ye.hour)).minute(Number((ue = Y.start) == null ? void 0 : ue.minute)).toISOString(),
530
+ I().tz(X).hour(Number((oe = Y.end) == null ? void 0 : oe.hour)).minute(Number((se = Y.end) == null ? void 0 : se.minute)).endOf("minutes").toISOString()
521
531
  ],
522
532
  businessIds: F.value ? [F.value] : [],
523
- restaurantIds: ae,
524
- warehouseIds: K,
533
+ restaurantIds: ne,
534
+ warehouseIds: L,
525
535
  timezone: X
526
536
  }).map((Z, De) => {
527
537
  const Te = De === 0 ? 3e3 : 12e3;
528
538
  return {
529
539
  ...Z,
530
- limit: ae.length > 50 ? l.config.limit || Te : l.config.limit,
540
+ limit: ne.length > 50 ? l.config.limit || Te : l.config.limit,
531
541
  skipStringSpaceGrouping: !!(v != null && v.batch) || vt(v),
532
542
  reportId: v == null ? void 0 : v.id
533
543
  };
@@ -536,16 +546,16 @@ const en = async ({
536
546
  timeout: 1e3 * 60 * 5,
537
547
  signal: n
538
548
  }
539
- }, ie = [() => $e.fetch(be)];
540
- k.length < 50 && ie.push(() => $e.fetch(be)), ie.push(() => $e.fetch(be));
541
- const he = await Xt(ie, 2e3);
542
- return (await jl(Wl, {
543
- responses: he,
549
+ }, de = [() => Ae.fetch(ve)];
550
+ _.length < 50 && de.push(() => Ae.fetch(ve)), de.push(() => Ae.fetch(ve));
551
+ const ge = await Xt(de, 2e3);
552
+ return (await ql(Wl, {
553
+ responses: ge,
544
554
  widget: JSON.parse(JSON.stringify(l)),
545
- country: P.value,
555
+ country: z.value,
546
556
  timezone: X
547
557
  })).data;
548
- }, Pn = async ({
558
+ }, zn = async ({
549
559
  fileType: l,
550
560
  index: n,
551
561
  orientationTypes: s,
@@ -553,53 +563,55 @@ const en = async ({
553
563
  locationIds: d,
554
564
  timeRange: p,
555
565
  dateRange: f,
556
- globalFilters: g
566
+ globalFilters: S
557
567
  }) => {
558
- const { businessId: h } = se(Oe()), i = Me(), { compareDateRange: F } = se(i), { restaurants: P, warehouses: ne, timezone: _ } = i, { globalFilters: D } = Ge(), { currentReport: u, overviewReport: m } = Pe(), { selectedNavigationTab: v } = je(), { getTileSorts: N } = Yt();
559
- let k = u == null ? void 0 : u.id, O = Ue(u == null ? void 0 : u.tiles);
560
- v === "overview" && m && (k = m == null ? void 0 : m.id, O = Ue(m == null ? void 0 : m.tiles));
561
- const B = v === "overview" && m ? m : u, Q = Ke(v);
568
+ const { businessId: h } = re(Oe()), i = Me(), { compareDateRange: F } = re(i), { restaurants: z, warehouses: ae, timezone: k } = i, { globalFilters: D } = Ge(), { currentReport: u, overviewReport: m } = Pe(), { selectedNavigationTab: v } = qe(), { getTileSorts: N } = Yt(), { getTileSearch: _ } = Kl();
569
+ let O = u == null ? void 0 : u.id, E = Ue(u == null ? void 0 : u.tiles);
570
+ v === "overview" && m && (O = m == null ? void 0 : m.id, E = Ue(m == null ? void 0 : m.tiles));
571
+ const Q = v === "overview" && m ? m : u, U = Ke(v);
562
572
  if (!Qe({
563
- report: B,
564
- pageSubject: Q,
573
+ report: Q,
574
+ pageSubject: U,
565
575
  dateRange: f,
566
576
  compareDateRange: F.value,
567
- timezone: _
577
+ timezone: k
568
578
  }))
569
579
  return;
570
- const U = g ?? D, te = O.filter((Y, ae) => typeof n == "number" ? ae === n : !0).map((Y) => qe(Y.widget, U, Y.id)), X = {
580
+ const te = S ?? D, X = E.filter((ne, L) => typeof n == "number" ? L === n : !0).map((ne) => je(ne.widget, te, ne.id)), le = {
571
581
  fetchType: ke.Post,
572
- url: `/${h.value}/file?lang=${Ae()}`,
582
+ url: `/${h.value}/file?lang=${xe()}`,
573
583
  data: {
574
584
  configs: [
575
- ...te.map((Y, ae) => {
576
- var K, R, be, ie;
585
+ ...X.map((ne, L) => {
586
+ var de, ge, ye, ue;
587
+ const R = _(n ?? L), ve = St.getQueryRequests({
588
+ widget: ne,
589
+ dateRange: [f.startDate, f.endDate],
590
+ compareDateRange: F.value.startDate && F.value.endDate ? [F.value.startDate, F.value.endDate] : void 0,
591
+ timeRange: [
592
+ I().tz(k).set("hour", Number((de = p.start) == null ? void 0 : de.hour)).set("minute", Number((ge = p.start) == null ? void 0 : ge.minute)).toISOString(),
593
+ I().tz(k).set("hour", Number((ye = p.end) == null ? void 0 : ye.hour)).set("minute", Number((ue = p.end) == null ? void 0 : ue.minute)).toISOString()
594
+ ],
595
+ businessIds: h ? [h.value] : [],
596
+ restaurantIds: d.filter(
597
+ (oe) => z.find((se) => se.id === oe)
598
+ ),
599
+ warehouseIds: d.filter(
600
+ (oe) => ae.find((se) => se.id === oe)
601
+ ),
602
+ timezone: k
603
+ });
577
604
  return {
578
- requests: gt.getQueryRequests({
579
- widget: Y,
580
- dateRange: [f.startDate, f.endDate],
581
- compareDateRange: F.value.startDate && F.value.endDate ? [F.value.startDate, F.value.endDate] : void 0,
582
- timeRange: [
583
- I().tz(_).set("hour", Number((K = p.start) == null ? void 0 : K.hour)).set("minute", Number((R = p.start) == null ? void 0 : R.minute)).toISOString(),
584
- I().tz(_).set("hour", Number((be = p.end) == null ? void 0 : be.hour)).set("minute", Number((ie = p.end) == null ? void 0 : ie.minute)).toISOString()
585
- ],
586
- businessIds: h ? [h.value] : [],
587
- restaurantIds: d.filter(
588
- (he) => P.find((ue) => ue.id === he)
589
- ),
590
- warehouseIds: d.filter(
591
- (he) => ne.find((ue) => ue.id === he)
592
- ),
593
- timezone: _
594
- }),
595
- index: n || ae,
605
+ // Every request, like the query API's search; the file service filters it in memory.
606
+ requests: R ? ve.map((oe) => ({ ...oe, search: R })) : ve,
607
+ index: n || L,
596
608
  drillDimension: null,
597
- ...Zt(Y),
598
- globalSorts: N(n ?? ae)
609
+ ...Zt(ne),
610
+ globalSorts: N(n ?? L)
599
611
  };
600
612
  })
601
613
  ],
602
- reportId: k,
614
+ reportId: O,
603
615
  type: l,
604
616
  orientationTypes: s,
605
617
  isCombinedLocationLayout: r
@@ -608,9 +620,9 @@ const en = async ({
608
620
  responseType: "arraybuffer",
609
621
  timeout: 1e3 * 60 * 60 * 24
610
622
  }
611
- }, { headers: le, data: w } = await St.rawFetch(X), x = le["content-disposition"].split("filename=")[1].replaceAll('"', ""), J = window.URL.createObjectURL(new Blob([new Uint8Array(w).buffer])), z = document.createElement("a");
612
- z.href = J, z.setAttribute("download", decodeURIComponent(x)), document.body.appendChild(z), z.click(), z.remove();
613
- }, Bn = async ({
623
+ }, { headers: w, data: $ } = await gt.rawFetch(le), K = w["content-disposition"].split("filename=")[1].replaceAll('"', ""), Y = window.URL.createObjectURL(new Blob([new Uint8Array($).buffer])), H = document.createElement("a");
624
+ H.href = Y, H.setAttribute("download", decodeURIComponent(K)), document.body.appendChild(H), H.click(), H.remove();
625
+ }, Wn = async ({
614
626
  emails: l,
615
627
  types: n,
616
628
  dateRange: s,
@@ -618,25 +630,25 @@ const en = async ({
618
630
  locationIds: d,
619
631
  orientationTypes: p,
620
632
  isCombinedLocationLayout: f,
621
- globalFilters: g
633
+ globalFilters: S
622
634
  }) => {
623
- const { businessId: h } = se(Oe()), { currentReport: i, overviewReport: F } = Pe(), { selectedNavigationTab: P } = je(), ne = Me(), { compareDateRange: _ } = se(ne), { restaurants: D, warehouses: u, timezone: m } = ne, { globalFilters: v } = Ge(), { getTileSorts: N } = Yt();
635
+ const { businessId: h } = re(Oe()), { currentReport: i, overviewReport: F } = Pe(), { selectedNavigationTab: z } = qe(), ae = Me(), { compareDateRange: k } = re(ae), { restaurants: D, warehouses: u, timezone: m } = ae, { globalFilters: v } = Ge(), { getTileSorts: N } = Yt();
624
636
  if (l.length === 0) {
625
637
  console.error("No email addresses provided.");
626
638
  return;
627
639
  }
628
- let k = (i == null ? void 0 : i.id) || "", O = (i == null ? void 0 : i.name) || "", B = Ue(i == null ? void 0 : i.tiles);
629
- P === "overview" && F && (k = F == null ? void 0 : F.id, O = F.name, B = Ue(F == null ? void 0 : F.tiles));
630
- const Q = P === "overview" && F ? F : i, U = Ke(P);
640
+ let _ = (i == null ? void 0 : i.id) || "", O = (i == null ? void 0 : i.name) || "", E = Ue(i == null ? void 0 : i.tiles);
641
+ z === "overview" && F && (_ = F == null ? void 0 : F.id, O = F.name, E = Ue(F == null ? void 0 : F.tiles));
642
+ const Q = z === "overview" && F ? F : i, U = Ke(z);
631
643
  if (!Qe({
632
644
  report: Q,
633
645
  pageSubject: U,
634
646
  dateRange: s,
635
- compareDateRange: _.value,
647
+ compareDateRange: k.value,
636
648
  timezone: m
637
649
  }))
638
650
  return;
639
- const te = g ?? v, X = B.map((w) => qe(w.widget, te, w.id)), le = {
651
+ const te = S ?? v, X = E.map((w) => je(w.widget, te, w.id)), le = {
640
652
  businessId: h.value,
641
653
  status: Jt.generating,
642
654
  dateRange: {
@@ -645,66 +657,66 @@ const en = async ({
645
657
  },
646
658
  reportName: O,
647
659
  emails: l,
648
- configs: X.map((w, x) => {
649
- var J, z, Y, ae;
660
+ configs: X.map((w, $) => {
661
+ var K, Y, H, ne;
650
662
  return {
651
- requests: gt.getQueryRequests({
663
+ requests: St.getQueryRequests({
652
664
  widget: w,
653
665
  dateRange: [s.startDate, s.endDate],
654
- compareDateRange: _.value.startDate && _.value.endDate ? [_.value.startDate, _.value.endDate] : void 0,
666
+ compareDateRange: k.value.startDate && k.value.endDate ? [k.value.startDate, k.value.endDate] : void 0,
655
667
  timeRange: [
656
- I().tz(m).hour(Number((J = r.start) == null ? void 0 : J.hour)).minute(Number((z = r.start) == null ? void 0 : z.minute)).toISOString(),
657
- I().tz(m).hour(Number((Y = r.end) == null ? void 0 : Y.hour)).minute(Number((ae = r.end) == null ? void 0 : ae.minute)).endOf("minutes").toISOString()
668
+ I().tz(m).hour(Number((K = r.start) == null ? void 0 : K.hour)).minute(Number((Y = r.start) == null ? void 0 : Y.minute)).toISOString(),
669
+ I().tz(m).hour(Number((H = r.end) == null ? void 0 : H.hour)).minute(Number((ne = r.end) == null ? void 0 : ne.minute)).endOf("minutes").toISOString()
658
670
  ],
659
671
  businessIds: h ? [h.value] : [],
660
672
  restaurantIds: d.filter(
661
- (K) => D.find((R) => R.id === K)
673
+ (L) => D.find((R) => R.id === L)
662
674
  ),
663
675
  warehouseIds: d.filter(
664
- (K) => u.find((R) => R.id === K)
676
+ (L) => u.find((R) => R.id === L)
665
677
  ),
666
678
  timezone: m
667
679
  }),
668
- index: x,
680
+ index: $,
669
681
  drillDimension: null,
670
682
  ...Zt(w),
671
- globalSorts: N(x)
683
+ globalSorts: N($)
672
684
  };
673
685
  }),
674
- reportId: k,
686
+ reportId: _,
675
687
  type: n,
676
688
  orientationTypes: p,
677
689
  isCombinedLocationLayout: f
678
690
  };
679
- await St.fetch({
691
+ await gt.fetch({
680
692
  fetchType: ke.Post,
681
- url: `/${h.value}/reports/email?lang=${Ae()}`,
693
+ url: `/${h.value}/reports/email?lang=${xe()}`,
682
694
  data: le,
683
695
  requestConfig: { timeout: 1e3 * 60 * 3 }
684
696
  });
685
- }, zn = async (l) => {
686
- const { businessId: n } = se(Oe());
687
- await St.fetch({
697
+ }, Un = async (l) => {
698
+ const { businessId: n } = re(Oe());
699
+ await gt.fetch({
688
700
  fetchType: ke.Post,
689
- url: `/${n.value}/reports/resend-email?lang=${Ae()}`,
701
+ url: `/${n.value}/reports/resend-email?lang=${xe()}`,
690
702
  data: { jobId: l },
691
703
  requestConfig: { timeout: 1e3 * 60 * 3 }
692
704
  });
693
- }, Wn = async () => {
694
- const { businessId: l } = se(Oe());
695
- return await $e.fetch({
705
+ }, qn = async () => {
706
+ const { businessId: l } = re(Oe());
707
+ return await Ae.fetch({
696
708
  fetchType: ke.Get,
697
709
  url: `/${l.value}/reports/email-recipients`
698
710
  });
699
- }, Un = async (l) => {
700
- const { businessId: n } = se(Oe());
701
- await $e.fetch({
711
+ }, jn = async (l) => {
712
+ const { businessId: n } = re(Oe());
713
+ await Ae.fetch({
702
714
  fetchType: ke.Post,
703
715
  url: `/${n.value}/reports/email-recipient/delete`,
704
716
  data: { email: l }
705
717
  });
706
- }, ln = "mf-reportwidget-result-store", nn = Qt(ln, () => {
707
- const l = ye({}), n = ye(0), s = ve(() => n.value === 0);
718
+ }, an = "mf-reportwidget-result-store", sn = Ft(an, () => {
719
+ const l = he({}), n = he(0), s = Se(() => n.value === 0);
708
720
  function r() {
709
721
  n.value += 1;
710
722
  }
@@ -723,7 +735,7 @@ const en = async ({
723
735
  function f(h) {
724
736
  return h ? l.value[h] ?? [] : [];
725
737
  }
726
- function g() {
738
+ function S() {
727
739
  l.value = {};
728
740
  }
729
741
  return {
@@ -734,16 +746,16 @@ const en = async ({
734
746
  finishWidgetResultLoading: d,
735
747
  setWidgetResult: p,
736
748
  getWidgetResult: f,
737
- clearAllWidgetResults: g
749
+ clearAllWidgetResults: S
738
750
  };
739
- }), zt = (l, n = "en") => I().set("hour", l.hour).set("minute", l.minute).locale(n).format("h:mm A"), an = (l, n) => {
751
+ }), Wt = (l, n = "en") => I().set("hour", l.hour).set("minute", l.minute).locale(n).format("h:mm A"), rn = (l, n) => {
740
752
  const s = I().set("hour", l.hour).set("minute", l.minute);
741
753
  return I().set("hour", n.hour).set("minute", n.minute) < s ? "+1" : "";
742
754
  };
743
- function Wt(l, n) {
755
+ function Ut(l, n) {
744
756
  return l.isSystem ? n("reportV5.reportHour.fullDay") : l.name;
745
757
  }
746
- const sn = { class: "px-24 py-16 rounded-lg shadow-light-300" }, rn = { class: "text-fm-color-typo-primary" }, on = { class: "text-fm-color-typo-secondary" }, un = { class: "fm-typo-en-body-lg-600 mb-8" }, cn = { class: "flex items-center justify-center w-full" }, dn = { class: "fm-typo-en-body-lg-600 mb-8" }, mn = { class: "flex items-center justify-center" }, pn = { class: "flex flex-row mb-4 px-4 gap-2" }, fn = /* @__PURE__ */ yt({
758
+ const on = { class: "px-24 py-16 rounded-lg shadow-light-300" }, un = { class: "text-fm-color-typo-primary" }, cn = { class: "text-fm-color-typo-secondary" }, dn = { class: "fm-typo-en-body-lg-600 mb-8" }, mn = { class: "flex items-center justify-center w-full" }, pn = { class: "fm-typo-en-body-lg-600 mb-8" }, fn = { class: "flex items-center justify-center" }, bn = { class: "flex flex-row mb-4 px-4 gap-2" }, hn = /* @__PURE__ */ yt({
747
759
  __name: "TimeRangeSelect",
748
760
  props: /* @__PURE__ */ lt({
749
761
  defaultDateRange: {
@@ -786,8 +798,8 @@ const sn = { class: "px-24 py-16 rounded-lg shadow-light-300" }, rn = { class: "
786
798
  emits: /* @__PURE__ */ lt(["update", "chip-closed"], ["update:timeRange", "update:selectTimeDefault"]),
787
799
  setup(l, { emit: n }) {
788
800
  const { t: s, locale: r } = Kt(), d = ft(l, "timeRange"), p = n, f = ft(l, "selectTimeDefault");
789
- function g(D) {
790
- D && (d.value = D, p("update", d.value)), P.value = !1;
801
+ function S(D) {
802
+ D && (d.value = D, p("update", d.value)), z.value = !1;
791
803
  }
792
804
  function h(D) {
793
805
  const u = D.split(":"), m = I().set("hour", Number(u[0])).set("minute", Number(u[1]));
@@ -797,7 +809,7 @@ const sn = { class: "px-24 py-16 rounded-lg shadow-light-300" }, rn = { class: "
797
809
  period: m.format("A")
798
810
  };
799
811
  }
800
- const i = ye(JSON.parse(JSON.stringify(d.value)));
812
+ const i = he(JSON.parse(JSON.stringify(d.value)));
801
813
  function F(D, u) {
802
814
  i.value.start = JSON.parse(JSON.stringify(D)), i.value.end = JSON.parse(JSON.stringify(u));
803
815
  }
@@ -807,8 +819,8 @@ const sn = { class: "px-24 py-16 rounded-lg shadow-light-300" }, rn = { class: "
807
819
  if (d.value) {
808
820
  const D = l.defaultDateRange.findIndex(
809
821
  (u) => {
810
- var m, v, N, k;
811
- return u.startTime.hour === ((m = d.value.start) == null ? void 0 : m.hour) && u.startTime.minute === ((v = d.value.start) == null ? void 0 : v.minute) && u.endTime.hour === ((N = d.value.end) == null ? void 0 : N.hour) && u.endTime.minute === ((k = d.value.end) == null ? void 0 : k.minute);
822
+ var m, v, N, _;
823
+ return u.startTime.hour === ((m = d.value.start) == null ? void 0 : m.hour) && u.startTime.minute === ((v = d.value.start) == null ? void 0 : v.minute) && u.endTime.hour === ((N = d.value.end) == null ? void 0 : N.hour) && u.endTime.minute === ((_ = d.value.end) == null ? void 0 : _.minute);
812
824
  }
813
825
  ) + 1;
814
826
  D !== 0 ? f.value = D : f.value = l.defaultDateRange.length + 1;
@@ -816,63 +828,63 @@ const sn = { class: "px-24 py-16 rounded-lg shadow-light-300" }, rn = { class: "
816
828
  },
817
829
  { deep: !0, immediate: !0 }
818
830
  );
819
- const P = ye(!1);
820
- function ne(D) {
831
+ const z = he(!1);
832
+ function ae(D) {
821
833
  p("chip-closed", D);
822
834
  }
823
- const _ = ve(() => l.label ? l.label : jt({
835
+ const k = Se(() => l.label ? l.label : jt({
824
836
  startTime: d.value.start,
825
837
  endTime: d.value.end,
826
838
  locale: r.value
827
839
  }));
828
840
  return (D, u) => {
829
- const m = ee("FmChip"), v = ee("FmRadio"), N = ee("FmMenuDivider"), k = ee("FmRadioGroup"), O = ee("FmTimeInput"), B = ee("FmButton"), Q = ee("FmPopover");
830
- return H(), me("div", null, [
831
- L(Q, {
832
- "show-popover": P.value,
841
+ const m = ee("FmChip"), v = ee("FmRadio"), N = ee("FmMenuDivider"), _ = ee("FmRadioGroup"), O = ee("FmTimeInput"), E = ee("FmButton"), Q = ee("FmPopover");
842
+ return J(), pe("div", null, [
843
+ P(Q, {
844
+ "show-popover": z.value,
833
845
  placement: "bottom",
834
- onPopoverChanged: u[6] || (u[6] = (U) => P.value = U)
846
+ onPopoverChanged: u[6] || (u[6] = (U) => z.value = U)
835
847
  }, {
836
- "popover-button": re(() => [
837
- L(qt, {
848
+ "popover-button": ie(() => [
849
+ P(Qt, {
838
850
  "left-icon": l.label ? "filter_alt" : "schedule",
839
- label: _.value,
851
+ label: k.value,
840
852
  removable: l.removable,
841
- onChipClosed: u[0] || (u[0] = (U) => ne(!0))
853
+ onChipClosed: u[0] || (u[0] = (U) => ae(!0))
842
854
  }, null, 8, ["left-icon", "label", "removable"])
843
855
  ]),
844
- default: re(() => {
856
+ default: ie(() => {
845
857
  var U, te, X, le;
846
858
  return [
847
- q("div", sn, [
848
- L(k, {
859
+ j("div", on, [
860
+ P(_, {
849
861
  modelValue: f.value,
850
862
  "onUpdate:modelValue": u[1] || (u[1] = (w) => f.value = w)
851
863
  }, {
852
- default: re(() => [
853
- (H(!0), me(Le, null, ht(l.defaultDateRange, (w, x) => (H(), Fe(v, {
854
- key: `range_${x}`,
855
- value: x + 1,
856
- label: T(Wt)(w, T(s)),
857
- onClick: (J) => F(w.startTime, w.endTime)
864
+ default: ie(() => [
865
+ (J(!0), pe(Le, null, ht(l.defaultDateRange, (w, $) => (J(), we(v, {
866
+ key: `range_${$}`,
867
+ value: $ + 1,
868
+ label: T(Ut)(w, T(s)),
869
+ onClick: (K) => F(w.startTime, w.endTime)
858
870
  }, {
859
- label: re(() => [
860
- q("p", rn, [
861
- nt(fe(T(Wt)(w, T(s))) + " ", 1),
862
- xl(L(m, {
871
+ label: ie(() => [
872
+ j("p", un, [
873
+ nt(be(T(Ut)(w, T(s))) + " ", 1),
874
+ $l(P(m, {
863
875
  label: T(s)("report.common.default"),
864
876
  class: "bg-fm-color-system-info-100 border-fm-color-typo-info text-fm-color-typo-info",
865
877
  compact: ""
866
878
  }, null, 8, ["label"]), [
867
- [Al, w.isDefault]
879
+ [xl, w.isDefault]
868
880
  ])
869
881
  ]),
870
- q("p", on, fe(T(zt)(w.startTime, T(Ae)())) + " - " + fe(T(zt)(w.endTime, T(Ae)())) + " " + fe(T(an)(w.startTime, w.endTime)), 1)
882
+ j("p", cn, be(T(Wt)(w.startTime, T(xe)())) + " - " + be(T(Wt)(w.endTime, T(xe)())) + " " + be(T(rn)(w.startTime, w.endTime)), 1)
871
883
  ]),
872
884
  _: 2
873
885
  }, 1032, ["value", "label", "onClick"]))), 128)),
874
- L(N),
875
- L(v, {
886
+ P(N),
887
+ P(v, {
876
888
  key: "range_custom",
877
889
  label: T(s)("report.common.custom"),
878
890
  value: l.defaultDateRange.length + 1
@@ -880,46 +892,46 @@ const sn = { class: "px-24 py-16 rounded-lg shadow-light-300" }, rn = { class: "
880
892
  ]),
881
893
  _: 1
882
894
  }, 8, ["modelValue"]),
883
- f.value === l.defaultDateRange.length + 1 ? (H(), me(Le, { key: 0 }, [
884
- q("p", un, fe(T(s)("report.date.startingTime")), 1),
885
- q("div", cn, [
886
- L(O, {
895
+ f.value === l.defaultDateRange.length + 1 ? (J(), pe(Le, { key: 0 }, [
896
+ j("p", dn, be(T(s)("report.date.startingTime")), 1),
897
+ j("div", mn, [
898
+ P(O, {
887
899
  "model-value": h(`${(U = i.value.start) == null ? void 0 : U.hour}:${(te = i.value.start) == null ? void 0 : te.minute}`),
888
900
  "onUpdate:modelValue": u[2] || (u[2] = (w) => {
889
901
  if (i.value.start) {
890
- const x = T(I)(`${w.hours}:${w.minutes} ${w.period}`, "h:m A").locale(
891
- T(Ae)()
902
+ const $ = T(I)(`${w.hours}:${w.minutes} ${w.period}`, "h:m A").locale(
903
+ T(xe)()
892
904
  );
893
- i.value.start.hour = x.get("hour"), i.value.start.minute = x.get("minute");
905
+ i.value.start.hour = $.get("hour"), i.value.start.minute = $.get("minute");
894
906
  }
895
907
  })
896
908
  }, null, 8, ["model-value"])
897
909
  ]),
898
- q("p", dn, fe(T(s)("report.date.endingTime")), 1),
899
- q("div", mn, [
900
- L(O, {
910
+ j("p", pn, be(T(s)("report.date.endingTime")), 1),
911
+ j("div", fn, [
912
+ P(O, {
901
913
  "model-value": h(`${(X = i.value.end) == null ? void 0 : X.hour}:${(le = i.value.end) == null ? void 0 : le.minute}`),
902
914
  "onUpdate:modelValue": u[3] || (u[3] = (w) => {
903
915
  if (i.value.end) {
904
- const x = T(I)(`${w.hours}:${w.minutes} ${w.period}`, "h:m A").locale(
905
- T(Ae)()
916
+ const $ = T(I)(`${w.hours}:${w.minutes} ${w.period}`, "h:m A").locale(
917
+ T(xe)()
906
918
  );
907
- i.value.end.hour = x.get("hour"), i.value.end.minute = x.get("minute");
919
+ i.value.end.hour = $.get("hour"), i.value.end.minute = $.get("minute");
908
920
  }
909
921
  })
910
922
  }, null, 8, ["model-value"])
911
923
  ])
912
924
  ], 64)) : bt("", !0),
913
- q("div", pn, [
914
- u[7] || (u[7] = q("div", { class: "grow" }, null, -1)),
915
- L(B, {
925
+ j("div", bn, [
926
+ u[7] || (u[7] = j("div", { class: "grow" }, null, -1)),
927
+ P(E, {
916
928
  label: T(s)("report.common.cancel"),
917
929
  variant: "tertiary",
918
- onClick: u[4] || (u[4] = (w) => P.value = !1)
930
+ onClick: u[4] || (u[4] = (w) => z.value = !1)
919
931
  }, null, 8, ["label"]),
920
- L(B, {
932
+ P(E, {
921
933
  label: T(s)("report.common.apply"),
922
- onClick: u[5] || (u[5] = () => g(JSON.parse(JSON.stringify(i.value))))
934
+ onClick: u[5] || (u[5] = () => S(JSON.parse(JSON.stringify(i.value))))
923
935
  }, null, 8, ["label"])
924
936
  ])
925
937
  ])
@@ -930,7 +942,7 @@ const sn = { class: "px-24 py-16 rounded-lg shadow-light-300" }, rn = { class: "
930
942
  ]);
931
943
  };
932
944
  }
933
- }), jn = /* @__PURE__ */ yt({
945
+ }), Qn = /* @__PURE__ */ yt({
934
946
  __name: "BaseDialog",
935
947
  props: /* @__PURE__ */ lt({
936
948
  title: {
@@ -955,26 +967,26 @@ const sn = { class: "px-24 py-16 rounded-lg shadow-light-300" }, rn = { class: "
955
967
  return Ie(s, () => {
956
968
  s.value ? document.body.style.overflow = "hidden" : document.body.style.overflow = "scroll";
957
969
  }), (p, f) => {
958
- const g = ee("FmButton"), h = ee("FmDialog");
959
- return H(), Fe(h, {
970
+ const S = ee("FmButton"), h = ee("FmDialog");
971
+ return J(), we(h, {
960
972
  modelValue: s.value,
961
973
  "onUpdate:modelValue": f[2] || (f[2] = (i) => s.value = i),
962
974
  overlay: ""
963
975
  }, {
964
- "dialog-header": re(() => [
965
- nt(fe(r.title), 1)
976
+ "dialog-header": ie(() => [
977
+ nt(be(r.title), 1)
966
978
  ]),
967
- default: re(() => [
968
- Ut(p.$slots, "content")
979
+ default: ie(() => [
980
+ qt(p.$slots, "content")
969
981
  ]),
970
- "dialog-footer": re(() => [
971
- f[3] || (f[3] = q("div", { class: "grow" }, null, -1)),
972
- L(g, {
982
+ "dialog-footer": ie(() => [
983
+ f[3] || (f[3] = j("div", { class: "grow" }, null, -1)),
984
+ P(S, {
973
985
  label: r.secondaryButtonLabel,
974
986
  variant: "tertiary",
975
987
  onClick: f[0] || (f[0] = (i) => s.value = !1)
976
988
  }, null, 8, ["label"]),
977
- L(g, {
989
+ P(S, {
978
990
  label: r.primaryButtonLabel,
979
991
  variant: "primary",
980
992
  onClick: f[1] || (f[1] = (i) => d("confirm"))
@@ -985,8 +997,8 @@ const sn = { class: "px-24 py-16 rounded-lg shadow-light-300" }, rn = { class: "
985
997
  };
986
998
  }
987
999
  });
988
- var xe = /* @__PURE__ */ ((l) => (l.Select = "Select", l.TextField = "TextField", l.Timestamp = "Timestamp", l))(xe || {});
989
- function bn(l) {
1000
+ var $e = /* @__PURE__ */ ((l) => (l.Select = "Select", l.TextField = "TextField", l.Timestamp = "Timestamp", l))($e || {});
1001
+ function vn(l) {
990
1002
  let n = !1, s = 1;
991
1003
  switch (l) {
992
1004
  case W.Equal:
@@ -1010,15 +1022,15 @@ function bn(l) {
1010
1022
  count: s
1011
1023
  };
1012
1024
  }
1013
- function qn({
1025
+ function Kn({
1014
1026
  operator: l,
1015
1027
  dimensionOption: n,
1016
1028
  dataType: s,
1017
1029
  t: r
1018
1030
  }) {
1019
- const { fixed: d, count: p } = bn(l);
1031
+ const { fixed: d, count: p } = vn(l);
1020
1032
  switch (s) {
1021
- case pe.String:
1033
+ case fe.String:
1022
1034
  return {
1023
1035
  type: "TextField",
1024
1036
  fixed: d,
@@ -1026,7 +1038,7 @@ function qn({
1026
1038
  dataType: void 0,
1027
1039
  default: ""
1028
1040
  };
1029
- case pe.Numeric:
1041
+ case fe.Numeric:
1030
1042
  return {
1031
1043
  type: "TextField",
1032
1044
  fixed: d,
@@ -1034,7 +1046,7 @@ function qn({
1034
1046
  dataType: "number",
1035
1047
  default: 0
1036
1048
  };
1037
- case pe.Bool:
1049
+ case fe.Bool:
1038
1050
  return {
1039
1051
  type: "Select",
1040
1052
  fixed: d,
@@ -1045,7 +1057,7 @@ function qn({
1045
1057
  ],
1046
1058
  default: !0
1047
1059
  };
1048
- case pe.Timestamp:
1060
+ case fe.Timestamp:
1049
1061
  return el({
1050
1062
  dimensionOption: n,
1051
1063
  fixed: d,
@@ -1061,21 +1073,21 @@ function qn({
1061
1073
  default: ""
1062
1074
  };
1063
1075
  }
1064
- function Qn(l) {
1076
+ function Jn(l) {
1065
1077
  switch (l) {
1066
- case M.HourOfDay:
1078
+ case B.HourOfDay:
1067
1079
  return 0;
1068
- case M.DayOfMonth:
1080
+ case B.DayOfMonth:
1069
1081
  return 1;
1070
1082
  default:
1071
1083
  return;
1072
1084
  }
1073
1085
  }
1074
- function Kn(l) {
1086
+ function Yn(l) {
1075
1087
  switch (l) {
1076
- case M.HourOfDay:
1088
+ case B.HourOfDay:
1077
1089
  return 23;
1078
- case M.DayOfMonth:
1090
+ case B.DayOfMonth:
1079
1091
  return 31;
1080
1092
  default:
1081
1093
  return;
@@ -1088,9 +1100,9 @@ function el({
1088
1100
  t: r
1089
1101
  }) {
1090
1102
  switch (l) {
1091
- case M.HourOfDay:
1103
+ case B.HourOfDay:
1092
1104
  return {
1093
- type: xe.Select,
1105
+ type: $e.Select,
1094
1106
  fixed: n,
1095
1107
  count: s,
1096
1108
  options: Array.from({ length: 24 }, (d, p) => ({
@@ -1099,9 +1111,9 @@ function el({
1099
1111
  })),
1100
1112
  default: "0"
1101
1113
  };
1102
- case M.DayOfWeek:
1114
+ case B.DayOfWeek:
1103
1115
  return {
1104
- type: xe.Select,
1116
+ type: $e.Select,
1105
1117
  fixed: n,
1106
1118
  count: s,
1107
1119
  options: [
@@ -1115,9 +1127,9 @@ function el({
1115
1127
  ],
1116
1128
  default: "1"
1117
1129
  };
1118
- case M.DayOfMonth:
1130
+ case B.DayOfMonth:
1119
1131
  return {
1120
- type: xe.Select,
1132
+ type: $e.Select,
1121
1133
  fixed: n,
1122
1134
  count: s,
1123
1135
  options: Array.from({ length: 31 }, (d, p) => ({
@@ -1126,9 +1138,9 @@ function el({
1126
1138
  })),
1127
1139
  default: "1"
1128
1140
  };
1129
- case M.MonthOfYear:
1141
+ case B.MonthOfYear:
1130
1142
  return {
1131
- type: xe.Select,
1143
+ type: $e.Select,
1132
1144
  fixed: n,
1133
1145
  count: s,
1134
1146
  options: [
@@ -1149,7 +1161,7 @@ function el({
1149
1161
  };
1150
1162
  default:
1151
1163
  return {
1152
- type: xe.Timestamp,
1164
+ type: $e.Timestamp,
1153
1165
  fixed: n,
1154
1166
  count: s,
1155
1167
  default: (/* @__PURE__ */ new Date()).toISOString()
@@ -1166,12 +1178,12 @@ function pt({
1166
1178
  count: 1,
1167
1179
  t: n
1168
1180
  });
1169
- return s.type !== xe.Select ? [] : [{ label: n("report.input.unknown"), value: "" }, ...s.options];
1181
+ return s.type !== $e.Select ? [] : [{ label: n("report.input.unknown"), value: "" }, ...s.options];
1170
1182
  }
1171
- const hn = { class: "flex flex-row flex-wrap gap-2" }, vn = { class: "inline-flex max-w-[460px]" }, yn = {
1183
+ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-flex max-w-[460px]" }, gn = {
1172
1184
  key: 0,
1173
1185
  class: "flex justify-center my-2"
1174
- }, gn = { class: "px-2 pb-8" }, Sn = { class: "flex-1 overflow-y-auto overflow-x-hidden" }, Fn = { class: "px-2 pb-8" }, wn = { class: "flex items-start w-full" }, Dn = ["onClick"], Tn = { class: "fm-typo-en-body-md-400" }, Vn = { key: 0 }, Cn = { class: "px-12 py-3" }, Nn = { class: "flex items-center justify-between" }, On = { class: "text-xs max-w-[200px]" }, kn = { class: "px-4 py-3 flex flex-row justify-end gap-2 bg-white" }, Ne = "__EMPTY__", Se = "__NO_SELECTION__", Jn = /* @__PURE__ */ yt({
1186
+ }, Fn = { class: "px-2 pb-8" }, wn = { class: "flex-1 overflow-y-auto overflow-x-hidden" }, Dn = { class: "px-2 pb-8" }, Tn = { class: "flex items-start w-full" }, Vn = ["onClick"], Cn = { class: "fm-typo-en-body-md-400" }, Nn = { key: 0 }, On = { class: "px-12 py-3" }, kn = { class: "flex items-center justify-between" }, _n = { class: "text-xs max-w-[200px]" }, Rn = { class: "px-4 py-3 flex flex-row justify-end gap-2 bg-white" }, Ne = "__EMPTY__", Fe = "__NO_SELECTION__", Hn = /* @__PURE__ */ yt({
1175
1187
  __name: "GlobalFilterSelect",
1176
1188
  props: {
1177
1189
  globalFilterId: {},
@@ -1183,64 +1195,64 @@ const hn = { class: "flex flex-row flex-wrap gap-2" }, vn = { class: "inline-fle
1183
1195
  isDialogGlobalFilter: { type: Boolean }
1184
1196
  },
1185
1197
  setup(l) {
1186
- const n = l, { t: s, locale: r } = Kt(), { currentReport: d, editingTile: p } = se(Pe());
1187
- let { timeRange: f, dateRange: g, selectedLocationIds: h, timezone: i } = se(Me()), { globalFilters: F } = se(Ge()), { schemas: P } = se(Pl()), {
1188
- showMore: ne,
1189
- getGlobalFilter: _,
1198
+ const n = l, { t: s, locale: r } = Kt(), { currentReport: d, editingTile: p } = re(Pe());
1199
+ let { timeRange: f, dateRange: S, selectedLocationIds: h, timezone: i } = re(Me()), { globalFilters: F } = re(Ge()), { schemas: z } = re(Pl()), {
1200
+ showMore: ae,
1201
+ getGlobalFilter: k,
1190
1202
  setGlobalFilter: D,
1191
1203
  setIncludeUnavailable: u,
1192
1204
  getGlobalFilterKey: m,
1193
1205
  isMenuOpen: v,
1194
1206
  getGlobalFilterLabel: N,
1195
- incrementAppliedTilesFiltersVersion: k
1207
+ incrementAppliedTilesFiltersVersion: _
1196
1208
  } = Ge();
1197
- const O = ve(() => s("report.input.empty")), B = ["NULL", "", " "];
1209
+ const O = Se(() => s("report.input.empty")), E = ["NULL", "", " "];
1198
1210
  let Q;
1199
- const U = nn(), { getWidgetResult: te } = U, { widgetResults: X, isAllWidgetResultLoaded: le } = se(U), w = ye(!1), x = ye(!1), J = ye(""), z = ye({}), Y = ve(() => {
1211
+ const U = sn(), { getWidgetResult: te } = U, { widgetResults: X, isAllWidgetResultLoaded: le } = re(U), w = he(!1), $ = he(!1), K = he(""), Y = he({}), H = Se(() => {
1200
1212
  var e;
1201
1213
  return n.globalFilterId ?? ((e = d.value) == null ? void 0 : e.id) ?? "";
1202
- }), ae = ve(() => n.report ?? d.value), K = ye([]);
1214
+ }), ne = Se(() => n.report ?? d.value), L = he([]);
1203
1215
  function R(e) {
1204
- return `${Y.value}|instance:${e}`;
1216
+ return `${H.value}|instance:${e}`;
1205
1217
  }
1206
- function be(e) {
1207
- return ct(e) ? !1 : w.value ? !0 : n.isDialogGlobalFilter ? x.value : !le.value && e.options.length === 0;
1218
+ function ve(e) {
1219
+ return ct(e) ? !1 : w.value ? !0 : n.isDialogGlobalFilter ? $.value : !le.value && e.options.length === 0;
1208
1220
  }
1209
- function ie(e, t) {
1221
+ function de(e, t) {
1210
1222
  return (e == null ? void 0 : e.startDate) === (t == null ? void 0 : t.startDate) && (e == null ? void 0 : e.endDate) === (t == null ? void 0 : t.endDate);
1211
1223
  }
1212
- function he(e, t) {
1213
- var o, a, b, V, y, $, E, A;
1214
- return ((o = e == null ? void 0 : e.start) == null ? void 0 : o.hour) === ((a = t == null ? void 0 : t.start) == null ? void 0 : a.hour) && ((b = e == null ? void 0 : e.start) == null ? void 0 : b.minute) === ((V = t == null ? void 0 : t.start) == null ? void 0 : V.minute) && ((y = e == null ? void 0 : e.end) == null ? void 0 : y.hour) === (($ = t == null ? void 0 : t.end) == null ? void 0 : $.hour) && ((E = e == null ? void 0 : e.end) == null ? void 0 : E.minute) === ((A = t == null ? void 0 : t.end) == null ? void 0 : A.minute);
1224
+ function ge(e, t) {
1225
+ var o, a, b, V, y, A, M, x;
1226
+ return ((o = e == null ? void 0 : e.start) == null ? void 0 : o.hour) === ((a = t == null ? void 0 : t.start) == null ? void 0 : a.hour) && ((b = e == null ? void 0 : e.start) == null ? void 0 : b.minute) === ((V = t == null ? void 0 : t.start) == null ? void 0 : V.minute) && ((y = e == null ? void 0 : e.end) == null ? void 0 : y.hour) === ((A = t == null ? void 0 : t.end) == null ? void 0 : A.hour) && ((M = e == null ? void 0 : e.end) == null ? void 0 : M.minute) === ((x = t == null ? void 0 : t.end) == null ? void 0 : x.minute);
1215
1227
  }
1216
- function ue(e, t) {
1228
+ function ye(e, t) {
1217
1229
  return !e || !t ? e === t : e.length === t.length && e.every((o, a) => o === t[a]);
1218
1230
  }
1219
- const ge = ve(() => {
1231
+ const ue = Se(() => {
1220
1232
  if (!(n.isDialogGlobalFilter || !!p.value))
1221
1233
  return !1;
1222
- const t = n.dateRange ?? g.value, o = n.timeRange ?? f.value, a = n.locationIds ?? h.value;
1223
- return ie(t, g.value) && he(o, f.value) && ue(a, h.value);
1234
+ const t = n.dateRange ?? S.value, o = n.timeRange ?? f.value, a = n.locationIds ?? h.value;
1235
+ return de(t, S.value) && ge(o, f.value) && ye(a, h.value);
1224
1236
  });
1225
- function we(e) {
1237
+ function oe(e) {
1226
1238
  return e ? [...e.tileIds ?? []] : Array.from(new Set(He.value.flatMap((t) => t.tileIds ?? [])));
1227
1239
  }
1228
- function ce(e) {
1229
- n.isDialogGlobalFilter || k(we(e));
1240
+ function se(e) {
1241
+ n.isDialogGlobalFilter || _(oe(e));
1230
1242
  }
1231
1243
  function Z(e) {
1232
- return e.filter((t) => t !== Se);
1244
+ return e.filter((t) => t !== Fe);
1233
1245
  }
1234
1246
  function De(e) {
1235
1247
  const t = e.some(
1236
1248
  (a) => a === Ne || a === "NULL" || typeof a == "string" && (a === "" || a === " ")
1237
1249
  ), o = e.flatMap(
1238
- (a) => a === Ne ? [...B] : [a]
1250
+ (a) => a === Ne ? [...E] : [a]
1239
1251
  );
1240
- return t ? Array.from(/* @__PURE__ */ new Set([...o, ...B])) : Array.from(new Set(o));
1252
+ return t ? Array.from(/* @__PURE__ */ new Set([...o, ...E])) : Array.from(new Set(o));
1241
1253
  }
1242
1254
  function Te(e) {
1243
- const t = _(
1255
+ const t = k(
1244
1256
  e.globalFilter,
1245
1257
  R(e.id)
1246
1258
  ).selectedValues;
@@ -1258,18 +1270,18 @@ const hn = { class: "flex flex-row flex-wrap gap-2" }, vn = { class: "inline-fle
1258
1270
  function tl(e) {
1259
1271
  e.options = [], at(e);
1260
1272
  }
1261
- function wt(e) {
1273
+ function Dt(e) {
1262
1274
  e.keepSelection || at(e);
1263
1275
  }
1264
1276
  function ll(e) {
1265
1277
  const t = Z(Te(e));
1266
- z.value[e.id] = [...t], at(e);
1278
+ Y.value[e.id] = [...t], at(e);
1267
1279
  }
1268
1280
  function nl() {
1269
1281
  var a, b, V, y;
1270
- const e = g.value, t = f.value, o = h.value || [];
1282
+ const e = S.value, t = f.value, o = h.value || [];
1271
1283
  return JSON.stringify({
1272
- globalFilterId: Y.value,
1284
+ globalFilterId: H.value,
1273
1285
  startDate: (e == null ? void 0 : e.startDate) ?? null,
1274
1286
  endDate: (e == null ? void 0 : e.endDate) ?? null,
1275
1287
  startHour: ((a = t == null ? void 0 : t.start) == null ? void 0 : a.hour) ?? null,
@@ -1281,46 +1293,46 @@ const hn = { class: "flex flex-row flex-wrap gap-2" }, vn = { class: "inline-fle
1281
1293
  }
1282
1294
  function Je(e) {
1283
1295
  const t = e.selectedValues || [];
1284
- return Ve(t) ? [Se] : e.keepSelection ? Z(t) : t;
1296
+ return Ve(t) ? [Fe] : e.keepSelection ? Z(t) : t;
1285
1297
  }
1286
- function de(e) {
1298
+ function me(e) {
1287
1299
  const t = Z(e.selectedValues || []);
1288
1300
  if (t.length)
1289
1301
  return t.map((a) => String(a));
1290
1302
  const o = Z(
1291
- _(e.globalFilter, R(e.id)).selectedValues
1303
+ k(e.globalFilter, R(e.id)).selectedValues
1292
1304
  );
1293
1305
  return o.length ? o.map((a) => String(a)) : (e.globalFilter.values ?? []).map((a) => String(a));
1294
1306
  }
1295
1307
  function al(e) {
1296
1308
  if (Ve(e.selectedValues || []))
1297
- return [Se];
1309
+ return [Fe];
1298
1310
  const t = Z(e.selectedValues || []);
1299
1311
  if (t.length)
1300
1312
  return t;
1301
- const o = _(
1313
+ const o = k(
1302
1314
  e.globalFilter,
1303
1315
  R(e.id)
1304
1316
  ).selectedValues;
1305
- return Ve(o || []) ? [Se] : Z(o);
1317
+ return Ve(o || []) ? [Fe] : Z(o);
1306
1318
  }
1307
1319
  function Ve(e) {
1308
- return e.includes(Se);
1320
+ return e.includes(Fe);
1309
1321
  }
1310
- function Dt(e) {
1322
+ function Tt(e) {
1311
1323
  return e === Ne || String(e ?? "").trim() === "";
1312
1324
  }
1313
1325
  function rt(e) {
1314
1326
  return [...e].sort((t, o) => {
1315
- const a = Dt(t.value), b = Dt(o.value);
1327
+ const a = Tt(t.value), b = Tt(o.value);
1316
1328
  return a !== b ? a ? -1 : 1 : t.label.localeCompare(o.label, r.value, {
1317
1329
  numeric: !0,
1318
1330
  sensitivity: "base"
1319
1331
  });
1320
1332
  });
1321
1333
  }
1322
- function Tt(e) {
1323
- return e.type === pe.String && !Be(e.globalFilter);
1334
+ function Vt(e) {
1335
+ return e.type === fe.String && !Be(e.globalFilter);
1324
1336
  }
1325
1337
  function ot(e) {
1326
1338
  return (e.options || []).map((t) => t.value);
@@ -1337,11 +1349,11 @@ const hn = { class: "flex flex-row flex-wrap gap-2" }, vn = { class: "inline-fle
1337
1349
  return Z(t).filter((a) => o.has(a));
1338
1350
  }
1339
1351
  function sl(e) {
1340
- const o = _(e.globalFilter, R(e.id)).selectedValues, a = n.isDialogGlobalFilter ? al(e) : [];
1352
+ const o = k(e.globalFilter, R(e.id)).selectedValues, a = n.isDialogGlobalFilter ? al(e) : [];
1341
1353
  if (Ve(e.selectedValues || []))
1342
- return [Se];
1354
+ return [Fe];
1343
1355
  if (Ve(o || []))
1344
- return [Se];
1356
+ return [Fe];
1345
1357
  if ((e.options || []).map((V) => V.value).length > 0) {
1346
1358
  const V = ut(
1347
1359
  e,
@@ -1353,12 +1365,12 @@ const hn = { class: "flex flex-row flex-wrap gap-2" }, vn = { class: "inline-fle
1353
1365
  if (y.length)
1354
1366
  return y;
1355
1367
  if (e.keepSelection) {
1356
- const $ = ut(
1368
+ const A = ut(
1357
1369
  e,
1358
1370
  Te(e)
1359
1371
  );
1360
- if ($.length)
1361
- return $;
1372
+ if (A.length)
1373
+ return A;
1362
1374
  }
1363
1375
  return [];
1364
1376
  }
@@ -1385,36 +1397,36 @@ const hn = { class: "flex flex-row flex-wrap gap-2" }, vn = { class: "inline-fle
1385
1397
  if (!it(e))
1386
1398
  return a.length ? a : b ? [Ne] : [];
1387
1399
  const V = new Set(
1388
- (e.options || []).filter((E) => E.available !== !1).map((E) => E.value)
1400
+ (e.options || []).filter((M) => M.available !== !1).map((M) => M.value)
1389
1401
  ), y = o.filter(
1390
- (E) => V.has(E)
1391
- ), $ = De(y);
1392
- return $.length ? $ : b ? [Ne] : [];
1402
+ (M) => V.has(M)
1403
+ ), A = De(y);
1404
+ return A.length ? A : b ? [Ne] : [];
1393
1405
  }
1394
1406
  function Ye(e) {
1395
- const t = z.value[e.id];
1407
+ const t = Y.value[e.id];
1396
1408
  if (t) {
1397
- e.selectedValues = [...t], st(e), delete z.value[e.id];
1409
+ e.selectedValues = [...t], st(e), delete Y.value[e.id];
1398
1410
  return;
1399
1411
  }
1400
1412
  e.selectedValues = sl(e), st(e);
1401
1413
  }
1402
1414
  function ul() {
1403
- K.value.forEach((e) => {
1404
- ge.value || wt(e);
1415
+ L.value.forEach((e) => {
1416
+ ue.value || Dt(e);
1405
1417
  });
1406
1418
  }
1407
1419
  function cl() {
1408
1420
  const e = nl();
1409
- J.value !== e && K.value.forEach((o) => {
1421
+ K.value !== e && L.value.forEach((o) => {
1410
1422
  if (o.keepSelection) {
1411
1423
  ll(o);
1412
1424
  return;
1413
1425
  }
1414
- wt(o);
1415
- }), J.value = e;
1426
+ Dt(o);
1427
+ }), K.value = e;
1416
1428
  }
1417
- const He = ve(() => n.globalFilters ?? F.value);
1429
+ const He = Se(() => n.globalFilters ?? F.value);
1418
1430
  function dl(e) {
1419
1431
  return {
1420
1432
  schemaName: e.schemaName,
@@ -1432,13 +1444,13 @@ const hn = { class: "flex flex-row flex-wrap gap-2" }, vn = { class: "inline-fle
1432
1444
  return e.map((t) => dl(t));
1433
1445
  }
1434
1446
  function pl(e, t) {
1435
- const o = `${m(e, Y.value)}|${t}`, a = _(e, R(o)), b = a.selectedValues.length ? [...a.selectedValues] : [...e.values ?? []];
1447
+ const o = `${m(e, H.value)}|${t}`, a = k(e, R(o)), b = a.selectedValues.length ? [...a.selectedValues] : [...e.values ?? []];
1436
1448
  return {
1437
1449
  id: o,
1438
1450
  globalFilter: e,
1439
1451
  search: a.search,
1440
1452
  options: a.options,
1441
- type: Ct(e),
1453
+ type: Nt(e),
1442
1454
  selectedValues: b,
1443
1455
  visibleCount: a.visibleCount,
1444
1456
  keepSelection: a.keepSelection,
@@ -1446,15 +1458,15 @@ const hn = { class: "flex flex-row flex-wrap gap-2" }, vn = { class: "inline-fle
1446
1458
  };
1447
1459
  }
1448
1460
  function fl() {
1449
- K.value = He.value.map(
1461
+ L.value = He.value.map(
1450
1462
  (e, t) => pl(e, t)
1451
1463
  );
1452
1464
  }
1453
- const bl = ve(
1465
+ const bl = Se(
1454
1466
  () => JSON.stringify(ml(He.value))
1455
- ), hl = ve(() => {
1467
+ ), hl = Se(() => {
1456
1468
  const e = He.value.map(
1457
- (t) => Et(t, Rt())
1469
+ (t) => Lt(t, It())
1458
1470
  );
1459
1471
  return JSON.stringify(
1460
1472
  e.map((t) => ({
@@ -1465,20 +1477,20 @@ const hn = { class: "flex flex-row flex-wrap gap-2" }, vn = { class: "inline-fle
1465
1477
  });
1466
1478
  Ie(
1467
1479
  () => ({
1468
- globalFilterId: Y.value,
1480
+ globalFilterId: H.value,
1469
1481
  globalFiltersConfigSignature: bl.value
1470
1482
  }),
1471
1483
  (e, t) => {
1472
- t && t.globalFilterId !== e.globalFilterId && K.value.forEach((o) => {
1484
+ t && t.globalFilterId !== e.globalFilterId && L.value.forEach((o) => {
1473
1485
  o.options = [];
1474
- }), fl(), t && t.globalFiltersConfigSignature !== e.globalFiltersConfigSignature && ce(), le.value && Xe();
1486
+ }), fl(), t && t.globalFiltersConfigSignature !== e.globalFiltersConfigSignature && se(), le.value && Xe();
1475
1487
  },
1476
1488
  { immediate: !0 }
1477
1489
  ), Ie(
1478
1490
  [
1479
1491
  le,
1480
1492
  f,
1481
- g,
1493
+ S,
1482
1494
  h,
1483
1495
  () => n.timeRange,
1484
1496
  () => n.dateRange,
@@ -1491,7 +1503,7 @@ const hn = { class: "flex flex-row flex-wrap gap-2" }, vn = { class: "inline-fle
1491
1503
  ), Ie(
1492
1504
  [() => p.value],
1493
1505
  async () => {
1494
- K.value.forEach((e) => {
1506
+ L.value.forEach((e) => {
1495
1507
  e.options = [];
1496
1508
  }), await Xe();
1497
1509
  },
@@ -1499,7 +1511,7 @@ const hn = { class: "flex flex-row flex-wrap gap-2" }, vn = { class: "inline-fle
1499
1511
  ), Ie(
1500
1512
  () => hl.value,
1501
1513
  async (e, t) => {
1502
- e !== t && t && (n.isDialogGlobalFilter || _t() || await Xe());
1514
+ e !== t && t && (n.isDialogGlobalFilter || Rt() || await Xe());
1503
1515
  }
1504
1516
  ), Ie(
1505
1517
  () => r.value,
@@ -1507,54 +1519,54 @@ const hn = { class: "flex flex-row flex-wrap gap-2" }, vn = { class: "inline-fle
1507
1519
  vl();
1508
1520
  }
1509
1521
  );
1510
- function Vt(e, t) {
1522
+ function Ct(e, t) {
1511
1523
  var o;
1512
- return t === !0 ? s("report.common.yes") || "Yes" : t === !1 ? s("report.common.no") || "No" : String(t).trim() === "" || t === Ne ? O.value : e.type === pe.Timestamp && e.globalFilter.option !== M.DateTime && e.globalFilter.option !== M.TimeOfDay ? ((o = pt({
1524
+ return t === !0 ? s("report.common.yes") || "Yes" : t === !1 ? s("report.common.no") || "No" : String(t).trim() === "" || t === Ne ? O.value : e.type === fe.Timestamp && e.globalFilter.option !== B.DateTime && e.globalFilter.option !== B.TimeOfDay ? ((o = pt({
1513
1525
  dimensionOption: e.globalFilter.option,
1514
1526
  t: s
1515
1527
  }).find((b) => String(b.value) === String(t))) == null ? void 0 : o.label) ?? String(t) : String(t);
1516
1528
  }
1517
1529
  function vl() {
1518
- K.value.forEach((e) => {
1530
+ L.value.forEach((e) => {
1519
1531
  if (!e.options.length) return;
1520
1532
  const t = e.options.map((o) => ({
1521
1533
  ...o,
1522
- label: Vt(e, o.value)
1534
+ label: Ct(e, o.value)
1523
1535
  }));
1524
- e.options = Tt(e) ? rt(t) : t;
1536
+ e.options = Vt(e) ? rt(t) : t;
1525
1537
  });
1526
1538
  }
1527
- function Ct(e) {
1539
+ function Nt(e) {
1528
1540
  var o;
1529
- const t = (o = P.value.find((a) => a.name === e.schemaName)) == null ? void 0 : o.fields.find((a) => a.name === e.name);
1541
+ const t = (o = z.value.find((a) => a.name === e.schemaName)) == null ? void 0 : o.fields.find((a) => a.name === e.name);
1530
1542
  return t == null ? void 0 : t.type;
1531
1543
  }
1532
1544
  function yl(e) {
1533
- var $, E;
1534
- if (!ae.value && !p.value) return [];
1535
- if (!(($ = e.tileIds) != null && $.length)) return [];
1536
- const t = p.value ? [p.value] : Ue((E = ae.value) == null ? void 0 : E.tiles), { name: o = "", schemaName: a = "" } = e, b = t.filter((A) => {
1537
- var oe, S;
1538
- const G = (oe = A == null ? void 0 : A.widget) == null ? void 0 : oe.config;
1539
- if (!G || (S = e.tileIds) != null && S.length && !e.tileIds.includes(A.id)) return !1;
1545
+ var A, M;
1546
+ if (!ne.value && !p.value) return [];
1547
+ if (!((A = e.tileIds) != null && A.length)) return [];
1548
+ const t = p.value ? [p.value] : Ue((M = ne.value) == null ? void 0 : M.tiles), { name: o = "", schemaName: a = "" } = e, b = t.filter((x) => {
1549
+ var ce, g;
1550
+ const G = (ce = x == null ? void 0 : x.widget) == null ? void 0 : ce.config;
1551
+ if (!G || (g = e.tileIds) != null && g.length && !e.tileIds.includes(x.id)) return !1;
1540
1552
  const c = (G.dimensions ?? []).some(
1541
1553
  (_e) => _e.schemaName === a && _e.name === o
1542
- ), j = (G.joinDatasources ?? []).some(
1554
+ ), q = (G.joinDatasources ?? []).some(
1543
1555
  (_e) => (_e.dimensions ?? []).some((ze) => ze.schemaName === a && ze.name === o)
1544
1556
  ), C = (G.schemaNames ?? []).includes(a);
1545
- return c || j || C;
1557
+ return c || q || C;
1546
1558
  });
1547
1559
  if (!b.length) return [];
1548
- const V = (A, G) => {
1549
- const c = /* @__PURE__ */ new Map(), j = (C) => {
1550
- const oe = `${C.schemaName}:${C.name}:${C.operator}:${C.option ?? ""}:${C.dataFormula ?? ""}`, S = c.get(oe);
1551
- S ? [W.Like, W.NotLike].includes(C.operator) ? S.values = Array.from(/* @__PURE__ */ new Set([...S.values ?? [], ...C.values ?? []])) : c.set(oe, { ...C }) : c.set(oe, { ...C });
1560
+ const V = (x, G) => {
1561
+ const c = /* @__PURE__ */ new Map(), q = (C) => {
1562
+ const ce = `${C.schemaName}:${C.name}:${C.operator}:${C.option ?? ""}:${C.dataFormula ?? ""}`, g = c.get(ce);
1563
+ g ? [W.Like, W.NotLike].includes(C.operator) ? g.values = Array.from(/* @__PURE__ */ new Set([...g.values ?? [], ...C.values ?? []])) : c.set(ce, { ...C }) : c.set(ce, { ...C });
1552
1564
  };
1553
- return A.forEach(j), G.forEach(j), Array.from(c.values());
1554
- }, y = (A) => {
1565
+ return x.forEach(q), G.forEach(q), Array.from(c.values());
1566
+ }, y = (x) => {
1555
1567
  var c;
1556
- const G = (c = A.dimensions) == null ? void 0 : c.find(
1557
- (j) => j.schemaName === a && j.name === o
1568
+ const G = (c = x.dimensions) == null ? void 0 : c.find(
1569
+ (q) => q.schemaName === a && q.name === o
1558
1570
  );
1559
1571
  return {
1560
1572
  name: o,
@@ -1565,43 +1577,43 @@ const hn = { class: "flex flex-row flex-wrap gap-2" }, vn = { class: "inline-fle
1565
1577
  dataFormula: G == null ? void 0 : G.dataFormula
1566
1578
  };
1567
1579
  };
1568
- return b.reduce((A, G) => {
1569
- var ze, $t;
1580
+ return b.reduce((x, G) => {
1581
+ var ze, Gt;
1570
1582
  const c = (ze = G == null ? void 0 : G.widget) == null ? void 0 : ze.config;
1571
- if (!c) return A;
1572
- const j = y(c), C = (c.dimensions ?? []).some((Ce) => Ce.schemaName === a) || (c.schemaNames ?? []).includes(a), oe = V(
1583
+ if (!c) return x;
1584
+ const q = y(c), C = (c.dimensions ?? []).some((Ce) => Ce.schemaName === a) || (c.schemaNames ?? []).includes(a), ce = V(
1573
1585
  c.filters ?? [],
1574
1586
  (e.filters ?? []).filter((Ce) => {
1575
1587
  var Re;
1576
1588
  return (Re = c.schemaNames) == null ? void 0 : Re.includes(Ce.schemaName);
1577
1589
  })
1578
- ), S = ($t = c.joinDatasources) == null ? void 0 : $t.find(
1590
+ ), g = (Gt = c.joinDatasources) == null ? void 0 : Gt.find(
1579
1591
  (Ce) => (Ce.schemaNames ?? []).includes(a) || (Ce.dimensions ?? []).some((Re) => Re.schemaName === a)
1580
1592
  ), _e = V(
1581
- (S == null ? void 0 : S.filters) ?? [],
1593
+ (g == null ? void 0 : g.filters) ?? [],
1582
1594
  (e.filters ?? []).filter((Ce) => {
1583
1595
  var Re;
1584
- return (Re = S == null ? void 0 : S.schemaNames) == null ? void 0 : Re.includes(Ce.schemaName);
1596
+ return (Re = g == null ? void 0 : g.schemaNames) == null ? void 0 : Re.includes(Ce.schemaName);
1585
1597
  })
1586
1598
  );
1587
- return A.push({
1588
- type: Lt.Table,
1599
+ return x.push({
1600
+ type: Mt.Table,
1589
1601
  title: "Global Filter",
1590
1602
  config: {
1591
1603
  schemaNames: c.schemaNames,
1592
1604
  schemas: c.schemas,
1593
- dimensions: C ? [j] : [],
1594
- filters: oe,
1595
- sorts: C ? [{ name: o, schemaName: a, type: Mt.Asc, aggregation: null, dimensionOption: null }] : [],
1596
- joinDatasources: !C && S ? [
1605
+ dimensions: C ? [q] : [],
1606
+ filters: ce,
1607
+ sorts: C ? [{ name: o, schemaName: a, type: Pt.Asc, aggregation: null, dimensionOption: null }] : [],
1608
+ joinDatasources: !C && g ? [
1597
1609
  {
1598
- ...S,
1599
- dimensions: [j],
1610
+ ...g,
1611
+ dimensions: [q],
1600
1612
  sorts: [
1601
1613
  {
1602
1614
  name: o,
1603
1615
  schemaName: a,
1604
- type: Mt.Asc,
1616
+ type: Pt.Asc,
1605
1617
  aggregation: null,
1606
1618
  dimensionOption: null
1607
1619
  }
@@ -1623,29 +1635,29 @@ const hn = { class: "flex flex-row flex-wrap gap-2" }, vn = { class: "inline-fle
1623
1635
  colWidths: null,
1624
1636
  isBlend: !1
1625
1637
  }
1626
- }), A;
1638
+ }), x;
1627
1639
  }, []);
1628
1640
  }
1629
- function Nt(e) {
1641
+ function Ot(e) {
1630
1642
  const t = new Set(Ee(e));
1631
1643
  return e.options.every((o) => t.has(o.value));
1632
1644
  }
1633
- function gl(e) {
1634
- Nt(e) ? e.selectedValues = [Se] : e.selectedValues = [];
1645
+ function Sl(e) {
1646
+ Ot(e) ? e.selectedValues = [Fe] : e.selectedValues = [];
1635
1647
  }
1636
- function Ot(e, t) {
1648
+ function kt(e, t) {
1637
1649
  return Ee(e).includes(t);
1638
1650
  }
1639
- const kt = ve(
1640
- () => K.value.map((e) => {
1651
+ const _t = Se(
1652
+ () => L.value.map((e) => {
1641
1653
  const t = e.options, o = e.search.toLowerCase() ?? "";
1642
1654
  return t.filter(
1643
1655
  (b) => b.label.toLowerCase().includes(o.toLowerCase())
1644
1656
  ).slice(0, e.visibleCount);
1645
1657
  })
1646
1658
  );
1647
- function Sl(e) {
1648
- e.visibleCount += 50, ne(e.globalFilter, R(e.id), 50);
1659
+ function gl(e) {
1660
+ e.visibleCount += 50, ae(e.globalFilter, R(e.id), 50);
1649
1661
  }
1650
1662
  function Fl(e, t) {
1651
1663
  D(e.globalFilter, R(e.id), { search: t });
@@ -1658,12 +1670,12 @@ const hn = { class: "flex flex-row flex-wrap gap-2" }, vn = { class: "inline-fle
1658
1670
  var t;
1659
1671
  return !((t = e.globalFilter.tileIds) != null && t.length);
1660
1672
  }
1661
- function _t() {
1662
- return (n.isDialogGlobalFilter || !!p.value) && !ge.value;
1663
- }
1664
1673
  function Rt() {
1674
+ return (n.isDialogGlobalFilter || !!p.value) && !ue.value;
1675
+ }
1676
+ function It() {
1665
1677
  var e;
1666
- return n.isDialogGlobalFilter && ge.value && ((e = d.value) != null && e.id) ? d.value.id : Y.value;
1678
+ return n.isDialogGlobalFilter && ue.value && ((e = d.value) != null && e.id) ? d.value.id : H.value;
1667
1679
  }
1668
1680
  function Ze(e) {
1669
1681
  return String(e ?? "").trim() === "" ? Ne : String(e);
@@ -1685,12 +1697,12 @@ const hn = { class: "flex flex-row flex-wrap gap-2" }, vn = { class: "inline-fle
1685
1697
  if (!t.length) return;
1686
1698
  const o = new Set(e.options.map((b) => b.value)), a = t.filter((b) => !o.has(b)).map((b) => ({
1687
1699
  value: b,
1688
- label: Vt(e, b),
1700
+ label: Ct(e, b),
1689
1701
  available: !1
1690
1702
  }));
1691
1703
  if (a.length) {
1692
1704
  const b = [...e.options, ...a];
1693
- e.options = Tt(e) ? rt(b) : b;
1705
+ e.options = Vt(e) ? rt(b) : b;
1694
1706
  }
1695
1707
  }
1696
1708
  function Tl(e) {
@@ -1717,24 +1729,24 @@ const hn = { class: "flex flex-row flex-wrap gap-2" }, vn = { class: "inline-fle
1717
1729
  tl(e);
1718
1730
  return;
1719
1731
  }
1720
- if (!(!e.type && (e.type = Ct(e.globalFilter), !e.type))) {
1732
+ if (!(!e.type && (e.type = Nt(e.globalFilter), !e.type))) {
1721
1733
  if (Be(e.globalFilter)) {
1722
1734
  e.options = wl(e.globalFilter), Ye(e);
1723
1735
  return;
1724
1736
  }
1725
1737
  switch (e.type) {
1726
- case pe.String:
1738
+ case fe.String:
1727
1739
  try {
1728
1740
  const a = yl(e.globalFilter);
1729
1741
  if (!a.length) {
1730
1742
  e.options = [];
1731
1743
  return;
1732
1744
  }
1733
- const b = _t(), V = [];
1745
+ const b = Rt(), V = [];
1734
1746
  for (const c of a) {
1735
1747
  if (t.aborted) return;
1736
1748
  if (b) {
1737
- const C = await tn({
1749
+ const C = await nn({
1738
1750
  widget: c,
1739
1751
  signal: t,
1740
1752
  scopedLocationIds: n.locationIds,
@@ -1742,22 +1754,22 @@ const hn = { class: "flex flex-row flex-wrap gap-2" }, vn = { class: "inline-fle
1742
1754
  scopedDateRange: n.dateRange,
1743
1755
  scopedGlobalFilters: n.globalFilters
1744
1756
  });
1745
- (C == null ? void 0 : C.type) === Lt.Table && V.push(...C.rows.map((oe) => {
1746
- var S;
1747
- return ((S = oe.cells) == null ? void 0 : S[0]) ?? " ";
1757
+ (C == null ? void 0 : C.type) === Mt.Table && V.push(...C.rows.map((ce) => {
1758
+ var g;
1759
+ return ((g = ce.cells) == null ? void 0 : g[0]) ?? " ";
1748
1760
  }));
1749
1761
  continue;
1750
1762
  }
1751
- const j = te(
1752
- Et(e.globalFilter, Rt())
1763
+ const q = te(
1764
+ Lt(e.globalFilter, It())
1753
1765
  );
1754
- V.push(...j);
1766
+ V.push(...q);
1755
1767
  }
1756
- const y = Array.from(new Set(V)), $ = Te(e), E = e.keepSelection ? Array.from(/* @__PURE__ */ new Set([...y, ...$])) : y, A = new Set(V), G = new Set(y);
1768
+ const y = Array.from(new Set(V)), A = Te(e), M = e.keepSelection ? Array.from(/* @__PURE__ */ new Set([...y, ...A])) : y, x = new Set(V), G = new Set(y);
1757
1769
  e.options = rt(
1758
- Bl(E, {
1770
+ Bl(M, {
1759
1771
  unknownLabel: O.value,
1760
- getAvailable: (c) => e.keepSelection ? A.has(c) : G.has(c)
1772
+ getAvailable: (c) => e.keepSelection ? x.has(c) : G.has(c)
1761
1773
  })
1762
1774
  ), Ye(e);
1763
1775
  } catch (a) {
@@ -1766,48 +1778,48 @@ const hn = { class: "flex flex-row flex-wrap gap-2" }, vn = { class: "inline-fle
1766
1778
  throw a;
1767
1779
  }
1768
1780
  break;
1769
- case pe.Bool: {
1781
+ case fe.Bool: {
1770
1782
  e.options = [
1771
1783
  { label: s("report.common.yes"), value: !0 },
1772
1784
  { label: s("report.common.no"), value: !1 }
1773
1785
  ], Ye(e);
1774
1786
  break;
1775
1787
  }
1776
- case pe.Timestamp:
1777
- if (e.globalFilter.option !== M.DateTime && e.globalFilter.option !== M.TimeOfDay) {
1788
+ case fe.Timestamp:
1789
+ if (e.globalFilter.option !== B.DateTime && e.globalFilter.option !== B.TimeOfDay) {
1778
1790
  const a = e.globalFilter.option;
1779
1791
  e.options = pt({ dimensionOption: a, t: s }), e.globalFilter.values = e.options.length ? e.options.map((b) => b.value) : ["NULL"];
1780
1792
  }
1781
1793
  Ye(e);
1782
1794
  break;
1783
- case pe.Numeric:
1795
+ case fe.Numeric:
1784
1796
  break;
1785
1797
  }
1786
1798
  }
1787
1799
  }
1788
1800
  async function Xe() {
1789
- if (!Y.value || !K.value.length) return;
1801
+ if (!H.value || !L.value.length) return;
1790
1802
  Q && Q.abort();
1791
1803
  const e = new AbortController();
1792
- Q = e, w.value = !0, n.isDialogGlobalFilter && (x.value = !0);
1804
+ Q = e, w.value = !0, n.isDialogGlobalFilter && ($.value = !0);
1793
1805
  try {
1794
1806
  await Promise.all(
1795
- K.value.map(
1807
+ L.value.map(
1796
1808
  (t) => Vl(t, e.signal)
1797
1809
  )
1798
1810
  );
1799
1811
  } finally {
1800
- Q === e && (w.value = !1), n.isDialogGlobalFilter && Q === e && (x.value = !1);
1812
+ Q === e && (w.value = !1), n.isDialogGlobalFilter && Q === e && ($.value = !1);
1801
1813
  }
1802
1814
  }
1803
- function It(e, t) {
1815
+ function $t(e, t) {
1804
1816
  const o = ot(e), a = Ee(e);
1805
1817
  if (a.includes(t)) {
1806
- const y = a.filter(($) => $ !== t);
1807
- e.selectedValues = y.length > 0 ? y : [Se];
1818
+ const y = a.filter((A) => A !== t);
1819
+ e.selectedValues = y.length > 0 ? y : [Fe];
1808
1820
  } else {
1809
- const y = [...a, t], $ = o.length > 0 && o.every((E) => y.includes(E));
1810
- e.selectedValues = $ ? [] : y;
1821
+ const y = [...a, t], A = o.length > 0 && o.every((M) => y.includes(M));
1822
+ e.selectedValues = A ? [] : y;
1811
1823
  }
1812
1824
  const V = Je(e);
1813
1825
  e.selectedValues = [...V], D(e.globalFilter, R(e.id), {
@@ -1822,7 +1834,7 @@ const hn = { class: "flex flex-row flex-wrap gap-2" }, vn = { class: "inline-fle
1822
1834
  t === null ? o.values = [] : o.values = a, e.selectedValues = [...a], e.keepSelection = t !== null, D(e.globalFilter, R(e.id), {
1823
1835
  keepSelection: e.keepSelection,
1824
1836
  selectedValues: [...a]
1825
- }), ce(e.globalFilter);
1837
+ }), se(e.globalFilter);
1826
1838
  }
1827
1839
  function Cl(e) {
1828
1840
  const t = Ee(e);
@@ -1833,30 +1845,30 @@ const hn = { class: "flex flex-row flex-wrap gap-2" }, vn = { class: "inline-fle
1833
1845
  }
1834
1846
  function et(e) {
1835
1847
  const t = N(e.globalFilter), o = e.options.length > 0 ? "(0 selected)" : "";
1836
- if (e.type === pe.Timestamp && !Be(e.globalFilter)) {
1837
- const y = de(e), $ = y.length === 2;
1838
- if (e.globalFilter.option === M.DateTime)
1839
- return { preview: $ ? `${t} is between ${El({
1848
+ if (e.type === fe.Timestamp && !Be(e.globalFilter)) {
1849
+ const y = me(e), A = y.length === 2;
1850
+ if (e.globalFilter.option === B.DateTime)
1851
+ return { preview: A ? `${t} is between ${El({
1840
1852
  startDate: y[0] || null,
1841
1853
  endDate: y[1] || null,
1842
1854
  locale: r.value,
1843
1855
  timezone: i.value
1844
1856
  })}` : t, suffix: "" };
1845
- if (e.globalFilter.option === M.TimeOfDay) {
1846
- const E = y[0] ? I(y[0]).tz(i.value) : null, A = y[1] ? I(y[1]).tz(i.value) : null, G = (j) => j && j.isValid() ? { hour: j.hour(), minute: j.minute() } : null;
1847
- return { preview: $ ? `${t} is between ${jt({
1848
- startTime: G(E),
1849
- endTime: G(A),
1857
+ if (e.globalFilter.option === B.TimeOfDay) {
1858
+ const M = y[0] ? I(y[0]).tz(i.value) : null, x = y[1] ? I(y[1]).tz(i.value) : null, G = (q) => q && q.isValid() ? { hour: q.hour(), minute: q.minute() } : null;
1859
+ return { preview: A ? `${t} is between ${jt({
1860
+ startTime: G(M),
1861
+ endTime: G(x),
1850
1862
  locale: r.value
1851
1863
  })}` : t, suffix: "" };
1852
1864
  }
1853
- if (e.globalFilter.option !== M.DateTime && e.globalFilter.option !== M.TimeOfDay) {
1854
- const E = pt({
1865
+ if (e.globalFilter.option !== B.DateTime && e.globalFilter.option !== B.TimeOfDay) {
1866
+ const M = pt({
1855
1867
  dimensionOption: e.globalFilter.option,
1856
1868
  t: s
1857
- }), A = new Map(E.map((C) => [String(C.value), C.label])), c = Ee(e).map((C) => A.get(String(C)) ?? String(C)), j = c.map((C) => C.length > 20 ? `${C.slice(0, 20)}…` : C).join(", ");
1869
+ }), x = new Map(M.map((C) => [String(C.value), C.label])), c = Ee(e).map((C) => x.get(String(C)) ?? String(C)), q = c.map((C) => C.length > 20 ? `${C.slice(0, 20)}…` : C).join(", ");
1858
1870
  return c.length ? {
1859
- preview: `${t}: ${j}`,
1871
+ preview: `${t}: ${q}`,
1860
1872
  suffix: `(${c.length} selected)`
1861
1873
  } : { preview: t, suffix: o };
1862
1874
  }
@@ -1868,10 +1880,10 @@ const hn = { class: "flex flex-row flex-wrap gap-2" }, vn = { class: "inline-fle
1868
1880
  } : { preview: t, suffix: o };
1869
1881
  }
1870
1882
  function Ol(e) {
1871
- st(e), ce(e.globalFilter), document.body.click();
1883
+ st(e), se(e.globalFilter), document.body.click();
1872
1884
  }
1873
1885
  function kl(e) {
1874
- const t = _(
1886
+ const t = k(
1875
1887
  e.globalFilter,
1876
1888
  R(e.id)
1877
1889
  ).selectedValues;
@@ -1893,178 +1905,178 @@ const hn = { class: "flex flex-row flex-wrap gap-2" }, vn = { class: "inline-fle
1893
1905
  return e ? e.length > t ? `${e.slice(0, t)}…` : e : O.value;
1894
1906
  }
1895
1907
  function At(e, t) {
1896
- var b, V, y, $;
1908
+ var b, V, y, A;
1897
1909
  const o = e.globalFilter;
1898
1910
  let a = [];
1899
1911
  if (t === null)
1900
1912
  o.values = [];
1901
1913
  else {
1902
- const E = I().tz(i.value).set("hour", Number((b = t.start) == null ? void 0 : b.hour)).set("minute", Number((V = t.start) == null ? void 0 : V.minute)).toISOString(), A = I().tz(i.value).set("hour", Number((y = t.end) == null ? void 0 : y.hour)).set("minute", Number(($ = t.end) == null ? void 0 : $.minute)).toISOString();
1903
- a = [E, A], o.values = a;
1914
+ const M = I().tz(i.value).set("hour", Number((b = t.start) == null ? void 0 : b.hour)).set("minute", Number((V = t.start) == null ? void 0 : V.minute)).toISOString(), x = I().tz(i.value).set("hour", Number((y = t.end) == null ? void 0 : y.hour)).set("minute", Number((A = t.end) == null ? void 0 : A.minute)).toISOString();
1915
+ a = [M, x], o.values = a;
1904
1916
  }
1905
1917
  e.selectedValues = [...a], e.keepSelection = t !== null, D(e.globalFilter, R(e.id), {
1906
1918
  keepSelection: e.keepSelection,
1907
1919
  selectedValues: [...a]
1908
- }), ce(e.globalFilter);
1920
+ }), se(e.globalFilter);
1909
1921
  }
1910
1922
  return (e, t) => {
1911
- const o = ee("FmCircularProgress"), a = ee("FmTextField"), b = ee("FmMenuItem"), V = ee("FmTooltip"), y = ee("FmIcon"), $ = ee("FmMenuDivider"), E = ee("FmSwitch"), A = ee("FmButton"), G = ee("FmMenu");
1912
- return H(), me("div", hn, [
1913
- (H(!0), me(Le, null, ht(K.value, (c, j) => (H(), me("div", {
1923
+ const o = ee("FmCircularProgress"), a = ee("FmTextField"), b = ee("FmMenuItem"), V = ee("FmTooltip"), y = ee("FmIcon"), A = ee("FmMenuDivider"), M = ee("FmSwitch"), x = ee("FmButton"), G = ee("FmMenu");
1924
+ return J(), pe("div", yn, [
1925
+ (J(!0), pe(Le, null, ht(L.value, (c, q) => (J(), pe("div", {
1914
1926
  key: c.id
1915
1927
  }, [
1916
- c.globalFilter.option === T(M).DateTime && !Be(c.globalFilter) ? (H(), Fe(Gl, {
1928
+ c.globalFilter.option === T(B).DateTime && !Be(c.globalFilter) ? (J(), we(Gl, {
1917
1929
  key: 0,
1918
1930
  "date-range": {
1919
- startDate: de(c)[0],
1920
- endDate: de(c)[1]
1931
+ startDate: me(c)[0],
1932
+ endDate: me(c)[1]
1921
1933
  },
1922
1934
  class: "w-full",
1923
1935
  label: et(c).preview,
1924
- removable: de(c).length === 2,
1936
+ removable: me(c).length === 2,
1925
1937
  onUpdate: (C) => xt(c, C),
1926
1938
  onChipClosed: () => xt(c, null)
1927
- }, null, 8, ["date-range", "label", "removable", "onUpdate", "onChipClosed"])) : c.globalFilter.option === T(M).TimeOfDay && !Be(c.globalFilter) ? (H(), Fe(fn, {
1939
+ }, null, 8, ["date-range", "label", "removable", "onUpdate", "onChipClosed"])) : c.globalFilter.option === T(B).TimeOfDay && !Be(c.globalFilter) ? (J(), we(hn, {
1928
1940
  key: 1,
1929
1941
  "time-range": {
1930
- start: de(c)[0] ? {
1931
- hour: T(I)(de(c)[0]).tz(T(i)).hour(),
1932
- minute: T(I)(de(c)[0]).tz(T(i)).minute()
1942
+ start: me(c)[0] ? {
1943
+ hour: T(I)(me(c)[0]).tz(T(i)).hour(),
1944
+ minute: T(I)(me(c)[0]).tz(T(i)).minute()
1933
1945
  } : null,
1934
- end: de(c)[1] ? {
1935
- hour: T(I)(de(c)[1]).tz(T(i)).hour(),
1936
- minute: T(I)(de(c)[1]).tz(T(i)).minute()
1946
+ end: me(c)[1] ? {
1947
+ hour: T(I)(me(c)[1]).tz(T(i)).hour(),
1948
+ minute: T(I)(me(c)[1]).tz(T(i)).minute()
1937
1949
  } : null
1938
1950
  },
1939
1951
  class: "w-full",
1940
1952
  label: et(c).preview,
1941
- removable: de(c).length === 2,
1953
+ removable: me(c).length === 2,
1942
1954
  onUpdate: (C) => At(c, C),
1943
1955
  onChipClosed: () => At(c, null)
1944
- }, null, 8, ["time-range", "label", "removable", "onUpdate", "onChipClosed"])) : (H(), Fe(G, {
1956
+ }, null, 8, ["time-range", "label", "removable", "onUpdate", "onChipClosed"])) : (J(), we(G, {
1945
1957
  key: 2,
1946
1958
  "close-on-click": !1,
1947
1959
  shift: !0,
1948
1960
  open: T(v)(c.id)
1949
1961
  }, {
1950
- "menu-button": re(() => [
1951
- q("div", vn, [
1952
- L(qt, {
1962
+ "menu-button": ie(() => [
1963
+ j("div", Sn, [
1964
+ P(Qt, {
1953
1965
  "left-icon": "filter_alt",
1954
1966
  "trailing-icon": "expand_more",
1955
- loading: be(c),
1967
+ loading: ve(c),
1956
1968
  label: et(c).preview,
1957
1969
  class: "w-full"
1958
1970
  }, {
1959
- default: re(() => [
1960
- nt(fe(et(c).suffix), 1)
1971
+ default: ie(() => [
1972
+ nt(be(et(c).suffix), 1)
1961
1973
  ]),
1962
1974
  _: 2
1963
1975
  }, 1032, ["loading", "label"])
1964
1976
  ])
1965
1977
  ]),
1966
- "menu-wrapper": re(({ maxHeight: C, width: oe }) => [
1967
- q("div", {
1978
+ "menu-wrapper": ie(({ maxHeight: C, width: ce }) => [
1979
+ j("div", {
1968
1980
  class: "flex flex-col bg-fm-color-neutral-white p-2 rounded-lg shadow-light-300",
1969
- style: $l({ maxHeight: `${C}px`, width: oe })
1981
+ style: Al({ maxHeight: `${C}px`, width: ce })
1970
1982
  }, [
1971
- be(c) ? (H(), me("div", yn, [
1972
- L(o)
1973
- ])) : c.options.length > 0 ? (H(), me(Le, { key: 1 }, [
1974
- q("div", gn, [
1975
- L(a, {
1983
+ ve(c) ? (J(), pe("div", gn, [
1984
+ P(o)
1985
+ ])) : c.options.length > 0 ? (J(), pe(Le, { key: 1 }, [
1986
+ j("div", Fn, [
1987
+ P(a, {
1976
1988
  modelValue: c.search,
1977
- "onUpdate:modelValue": [(S) => c.search = S, (S) => Fl(c, S)],
1989
+ "onUpdate:modelValue": [(g) => c.search = g, (g) => Fl(c, g)],
1978
1990
  type: "text",
1979
1991
  "prepend-icon": "search",
1980
1992
  placeholder: Nl(),
1981
1993
  class: "border px-2 pb-8 text-sm mb-1 rounded"
1982
1994
  }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])
1983
1995
  ]),
1984
- q("div", Sn, [
1985
- q("div", Fn, [
1986
- L(b, {
1996
+ j("div", wn, [
1997
+ j("div", Dn, [
1998
+ P(b, {
1987
1999
  label: Cl(c),
1988
2000
  "has-checkbox": !0,
1989
- "model-value": Nt(c),
2001
+ "model-value": Ot(c),
1990
2002
  indeterminate: !0,
1991
- onClick: (S) => gl(c)
2003
+ onClick: (g) => Sl(c)
1992
2004
  }, null, 8, ["label", "model-value", "onClick"]),
1993
- (H(!0), me(Le, null, ht(kt.value[j], (S) => (H(), me(Le, {
1994
- key: S.value
2005
+ (J(!0), pe(Le, null, ht(_t.value[q], (g) => (J(), pe(Le, {
2006
+ key: g.value
1995
2007
  }, [
1996
- S.label && S.label.length > 110 ? (H(), Fe(V, {
2008
+ g.label && g.label.length > 110 ? (J(), we(V, {
1997
2009
  key: 0,
1998
2010
  placement: "right",
1999
2011
  "hide-arrow": !0,
2000
2012
  "z-index": 2e3
2001
2013
  }, {
2002
- content: re(() => [
2003
- nt(fe(S.label), 1)
2014
+ content: ie(() => [
2015
+ nt(be(g.label), 1)
2004
2016
  ]),
2005
- default: re(() => [
2006
- q("div", wn, [
2007
- L(b, {
2008
- label: Il(S.label, 110),
2017
+ default: ie(() => [
2018
+ j("div", Tn, [
2019
+ P(b, {
2020
+ label: Il(g.label, 110),
2009
2021
  "has-checkbox": !0,
2010
- "model-value": Ot(c, S.value),
2011
- class: Gt([
2022
+ "model-value": kt(c, g.value),
2023
+ class: Et([
2012
2024
  "flex-1 text-left",
2013
- { "bg-gray-200": S.available === !1 }
2025
+ { "bg-gray-200": g.available === !1 }
2014
2026
  ]),
2015
- onClick: () => It(c, S.value)
2027
+ onClick: () => $t(c, g.value)
2016
2028
  }, null, 8, ["label", "model-value", "class", "onClick"])
2017
2029
  ])
2018
2030
  ]),
2019
2031
  _: 2
2020
- }, 1024)) : (H(), Fe(b, {
2032
+ }, 1024)) : (J(), we(b, {
2021
2033
  key: 1,
2022
- label: S.label,
2034
+ label: g.label,
2023
2035
  "has-checkbox": !0,
2024
- "model-value": Ot(c, S.value),
2025
- class: Gt(["flex-1 text-left", { "bg-gray-100": S.available === !1 }]),
2026
- onClick: () => It(c, S.value)
2036
+ "model-value": kt(c, g.value),
2037
+ class: Et(["flex-1 text-left", { "bg-gray-100": g.available === !1 }]),
2038
+ onClick: () => $t(c, g.value)
2027
2039
  }, null, 8, ["label", "model-value", "class", "onClick"]))
2028
2040
  ], 64))), 128)),
2029
- kt.value[j].length < c.options.length && !c.search ? (H(), Fe(b, {
2041
+ _t.value[q].length < c.options.length && !c.search ? (J(), we(b, {
2030
2042
  key: 0,
2031
2043
  class: "fm-typo-en-body-md-400 -ml-2",
2032
2044
  label: T(s)("report.section.filter.loadMore"),
2033
- onClick: dt((S) => Sl(c), ["stop"]),
2045
+ onClick: dt((g) => gl(c), ["stop"]),
2034
2046
  icon: "autorenew"
2035
2047
  }, null, 8, ["label", "onClick"])) : bt("", !0)
2036
2048
  ])
2037
2049
  ]),
2038
- q("div", {
2050
+ j("div", {
2039
2051
  class: "px-12 py-2 flex items-center gap-2 cursor-pointer hover:bg-fm-color-neutral-50 transition-colors",
2040
- onClick: (S) => _l(c)
2052
+ onClick: (g) => _l(c)
2041
2053
  }, [
2042
- L(y, {
2054
+ P(y, {
2043
2055
  name: c.showAdvanced ? "keyboard_arrow_up" : "keyboard_arrow_down",
2044
2056
  size: "md",
2045
2057
  class: ""
2046
2058
  }, null, 8, ["name"]),
2047
- q("span", Tn, fe(T(s)("report.section.filter.advanced")), 1)
2048
- ], 8, Dn),
2049
- L($),
2050
- c.showAdvanced ? (H(), me("div", Vn, [
2051
- q("div", Cn, [
2052
- q("div", Nn, [
2053
- L(E, {
2059
+ j("span", Cn, be(T(s)("report.section.filter.advanced")), 1)
2060
+ ], 8, Vn),
2061
+ P(A),
2062
+ c.showAdvanced ? (J(), pe("div", Nn, [
2063
+ j("div", On, [
2064
+ j("div", kn, [
2065
+ P(M, {
2054
2066
  "model-value": c.keepSelection,
2055
2067
  label: T(s)("report.section.filter.keepSelection"),
2056
2068
  labelPlacement: "right",
2057
2069
  "onUpdate:modelValue": () => Rl(c)
2058
2070
  }, null, 8, ["model-value", "label", "onUpdate:modelValue"]),
2059
- L(V, {
2071
+ P(V, {
2060
2072
  placement: "top",
2061
2073
  "z-index": 2e3
2062
2074
  }, {
2063
- content: re(() => [
2064
- q("div", On, fe(T(s)("report.section.filter.keepSelectionTooltip")), 1)
2075
+ content: ie(() => [
2076
+ j("div", _n, be(T(s)("report.section.filter.keepSelectionTooltip")), 1)
2065
2077
  ]),
2066
- default: re(() => [
2067
- L(y, {
2078
+ default: ie(() => [
2079
+ P(y, {
2068
2080
  name: "info",
2069
2081
  size: "md",
2070
2082
  class: "text-fm-color-primary"
@@ -2075,19 +2087,19 @@ const hn = { class: "flex flex-row flex-wrap gap-2" }, vn = { class: "inline-fle
2075
2087
  ])
2076
2088
  ])
2077
2089
  ])) : bt("", !0),
2078
- q("div", kn, [
2079
- L(A, {
2090
+ j("div", Rn, [
2091
+ P(x, {
2080
2092
  variant: "tertiary",
2081
2093
  label: T(s)("report.common.cancel"),
2082
- onClick: dt((S) => kl(c), ["stop"])
2094
+ onClick: dt((g) => kl(c), ["stop"])
2083
2095
  }, null, 8, ["label", "onClick"]),
2084
- L(A, {
2096
+ P(x, {
2085
2097
  color: "primary",
2086
- onClick: dt((S) => Ol(c), ["stop"]),
2098
+ onClick: dt((g) => Ol(c), ["stop"]),
2087
2099
  label: T(s)("report.common.apply")
2088
2100
  }, null, 8, ["onClick", "label"])
2089
2101
  ])
2090
- ], 64)) : (H(), Fe(zl, {
2102
+ ], 64)) : (J(), we(zl, {
2091
2103
  key: 2,
2092
2104
  title: ct(c) ? T(s)("report.messages.noWidgetsApplied") : void 0,
2093
2105
  "sub-title": ct(c) ? T(s)("report.messages.assignWidgetsToUseThisFilter") : void 0
@@ -2097,31 +2109,32 @@ const hn = { class: "flex flex-row flex-wrap gap-2" }, vn = { class: "inline-fle
2097
2109
  _: 2
2098
2110
  }, 1032, ["open"]))
2099
2111
  ]))), 128)),
2100
- Ut(e.$slots, "default")
2112
+ qt(e.$slots, "default")
2101
2113
  ]);
2102
2114
  };
2103
2115
  }
2104
2116
  });
2105
2117
  export {
2106
- xe as I,
2118
+ $e as I,
2107
2119
  Jt as R,
2108
- Jn as _,
2109
- jn as a,
2110
- Qn as b,
2111
- Kn as c,
2112
- Mn as d,
2113
- Wt as e,
2114
- fn as f,
2115
- qn as g,
2116
- jl as h,
2117
- Pn as i,
2118
- nn as j,
2119
- Un as k,
2120
- Wn as l,
2121
- Bn as m,
2122
- tn as q,
2123
- zn as r,
2124
- an as s,
2125
- zt as t,
2120
+ Hn as _,
2121
+ Qn as a,
2122
+ Jn as b,
2123
+ Yn as c,
2124
+ Bn as d,
2125
+ Ut as e,
2126
+ hn as f,
2127
+ Kn as g,
2128
+ ql as h,
2129
+ zn as i,
2130
+ sn as j,
2131
+ Kl as k,
2132
+ jn as l,
2133
+ qn as m,
2134
+ Wn as n,
2135
+ nn as q,
2136
+ Un as r,
2137
+ rn as s,
2138
+ Wt as t,
2126
2139
  Yt as u
2127
2140
  };