@feedmepos/mf-report 5.31.0-beta.0 → 5.31.1-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/dist/{App-CnVD_aRe.js → App-CifvmxI-.js} +4 -4
  2. package/dist/{DateRangeSelect-DpKNUuKx.js → DateRangeSelect-ChxxlHH1.js} +1 -1
  3. package/dist/{Default.vue_vue_type_script_setup_true_lang-I4NO9UOX.js → Default.vue_vue_type_script_setup_true_lang-CL1-_8mf.js} +1 -1
  4. package/dist/{DynamicWidget.vue_vue_type_script_setup_true_lang-Dz10heLt.js → DynamicWidget.vue_vue_type_script_setup_true_lang-DHjqUTvO.js} +7 -7
  5. package/dist/{GlobalFilterSelect.vue_vue_type_script_setup_true_lang-BRu0JrvS.js → GlobalFilterSelect.vue_vue_type_script_setup_true_lang-CSs3HGml.js} +566 -564
  6. package/dist/{InsightView-C8WZt__5.js → InsightView-Du6tSxTb.js} +5 -5
  7. package/dist/{Integration-C5tSrNLw.js → Integration-BAcn22tg.js} +3 -3
  8. package/dist/{Integrations-C83LbzmE.js → Integrations-DJxV9dAE.js} +2 -2
  9. package/dist/{Layout-Biqg7zFF.js → Layout-BYyARllh.js} +1 -1
  10. package/dist/{LocationSelect.vue_vue_type_script_setup_true_lang-CS8NUqdN.js → LocationSelect.vue_vue_type_script_setup_true_lang-CvOMVHQ5.js} +2 -2
  11. package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-Cfjoz1T0.js → MenuTab.vue_vue_type_script_setup_true_lang-DresFUiL.js} +5 -5
  12. package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-B1_zlEav.js → NavigationTab.vue_vue_type_script_setup_true_lang-CTWgBaBB.js} +4644 -4614
  13. package/dist/{OverviewView-CVaPccdT.js → OverviewView-WaYZ9aiD.js} +5 -5
  14. package/dist/{Report-rXclWVVt.js → Report-NAiFlYu_.js} +3 -3
  15. package/dist/{ReportCanvasView-C0dNeRU3.js → ReportCanvasView-Bfr5ZK1X.js} +5 -5
  16. package/dist/{ReportEditor-DXeVzgZe.js → ReportEditor-DNKWamHm.js} +7 -7
  17. package/dist/{ReportView-BeJJj3gB.js → ReportView-DVOKMdRI.js} +6 -6
  18. package/dist/{ReportViewRoute-C-9WBFR_.js → ReportViewRoute-4E5uW09e.js} +2 -2
  19. package/dist/{Setting-C3vOe-Kl.js → Setting-BIUKmm2_.js} +3 -3
  20. package/dist/{Template-CDu1xXgE.js → Template-COsS2dIW.js} +3 -3
  21. package/dist/{TileEditor-BGUEYc-A.js → TileEditor-BGiamZMW.js} +6 -6
  22. package/dist/{TilePageStack.vue_vue_type_script_setup_true_lang-CanQQED6.js → TilePageStack.vue_vue_type_script_setup_true_lang-CIMNFOXf.js} +2 -2
  23. package/dist/{TransitionFade-9mEtczb7.js → TransitionFade-DddzAlaC.js} +5 -5
  24. package/dist/{app-BIYwuRB4.js → app-B1esZ9Mq.js} +32 -12
  25. package/dist/app.js +1 -1
  26. package/dist/assets/{formatChartData.worker-DdA-N536.js → formatChartData.worker-DcIXAZPX.js} +1 -1
  27. package/dist/assets/{processTableData.worker-B69y8rv8.js → processTableData.worker-r9RKAQPd.js} +1 -1
  28. package/dist/{currency-BFVpOgJk.js → currency-CT2q92PX.js} +1 -1
  29. package/dist/{index-Cnj0Kacp.js → index-BScxCrNy.js} +3 -3
  30. package/dist/{report-DjGCG50y.js → report-BCTiFDGD.js} +1 -1
  31. package/dist/{useRestaurantPermission-BV526HlW.js → useRestaurantPermission-Bt2kY6PE.js} +1 -1
  32. package/package.json +1 -1
@@ -1,14 +1,14 @@
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-DpKNUuKx.js";
3
- import { e as St } from "./index-Cnj0Kacp.js";
4
- import { d as I, u as Oe, c as qe, a as Me, F as ke, a2 as gt, r as Ae, g as Ll, h as Ml } from "./app-BIYwuRB4.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-DjGCG50y.js";
1
+ import { ref as ve, computed as Se, defineComponent as yt, mergeModels as lt, useModel as ft, watch as Ie, resolveComponent as ee, createElementBlock as fe, openBlock as J, createVNode as P, withCtx as ue, createElementVNode as Q, createCommentVNode as bt, Fragment as Le, renderList as ht, createBlock as we, unref as D, createTextVNode as nt, withDirectives as $l, toDisplayString as he, 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-ChxxlHH1.js";
3
+ import { e as St } from "./index-BScxCrNy.js";
4
+ import { d as $, u as Oe, c as qe, a as Me, F as ke, a2 as gt, r as Ae, g as Ll, h as Ml } from "./app-B1esZ9Mq.js";
5
+ import { b as B, C as W, Q as tt, u as Pe, o as Ge, p as Ue, D as be, a as Pl, x as Lt, W as Mt, A as Bl, S as Pt } from "./report-BCTiFDGD.js";
6
6
  import { defineStore as Ft, storeToRefs as re } from "pinia";
7
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
- const Wl = "/assets/formatChartData.worker-DdA-N536.js", mt = /* @__PURE__ */ new Map();
11
+ const Wl = "/assets/formatChartData.worker-DcIXAZPX.js", mt = /* @__PURE__ */ new Map();
12
12
  function Bt(l) {
13
13
  return new Worker(l, { type: "module" });
14
14
  }
@@ -17,7 +17,7 @@ async function Ul(l) {
17
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((S) => S.text()), f = new Blob([p], { type: "application/javascript" });
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" });
21
21
  n = URL.createObjectURL(f);
22
22
  }
23
23
  const r = Bt(n);
@@ -33,11 +33,11 @@ async function ql(l, n) {
33
33
  });
34
34
  }
35
35
  const jl = "mf-reportreport-sort-store", Yt = Ft(jl, () => {
36
- const l = he([]);
36
+ const l = ve([]);
37
37
  function n(d, p) {
38
38
  if (d == null) return;
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);
39
+ const f = Array.isArray(p) ? p.filter((u) => u && u.key) : [], g = l.value.findIndex((u) => u.tileIndex === d), v = { tileIndex: d, sorts: f };
40
+ g !== -1 ? l.value.splice(g, 1, v) : l.value.push(v);
41
41
  }
42
42
  function s(d) {
43
43
  var p;
@@ -48,7 +48,7 @@ const jl = "mf-reportreport-sort-store", Yt = Ft(jl, () => {
48
48
  }
49
49
  return { tileSort: l, setTileSorts: n, getTileSorts: s, clearTileSorts: r };
50
50
  }), Ql = "mf-reportreport-search-store", Kl = Ft(Ql, () => {
51
- const l = he({});
51
+ const l = ve({});
52
52
  function n(r, d) {
53
53
  r != null && (d ? l.value[r] = d : delete l.value[r]);
54
54
  }
@@ -71,7 +71,7 @@ function Jl(l) {
71
71
  ].join(":");
72
72
  }
73
73
  function Yl(l) {
74
- const n = (s, r) => I().set("hour", s).set("minute", r).set("second", 0).set("millisecond", 0).toISOString();
74
+ const n = (s, r) => $().set("hour", s).set("minute", r).set("second", 0).set("millisecond", 0).toISOString();
75
75
  return !l.startTime || !l.endTime ? [] : [
76
76
  n(l.startTime.hour, l.startTime.minute),
77
77
  n(l.endTime.hour, l.endTime.minute)
@@ -101,15 +101,15 @@ function Zl(l, n) {
101
101
  };
102
102
  }
103
103
  function Xl(l) {
104
- var d, p, f, S;
105
- const n = (l.filters ?? []).map((h) => ({
106
- ...h,
104
+ var d, p, f, g;
105
+ const n = (l.filters ?? []).map((v) => ({
106
+ ...v,
107
107
  isGlobalFilter: !0
108
108
  })), s = Array.from(new Set(l.values ?? []));
109
109
  if (s.length === 1 && String(s[0]) === "EMPTY_GLOBAL_FILTER_VALUE") {
110
- const h = Object.values(B).includes(
110
+ const v = Object.values(B).includes(
111
111
  String(l.option ?? "")
112
- ), i = l.option === B.TimeOfDay ? ["1000-01-01T23:59:59.999Z", "1000-01-01T00:00:00.000Z"] : [h ? "-1" : Ht];
112
+ ), u = l.option === B.TimeOfDay ? ["1000-01-01T23:59:59.999Z", "1000-01-01T00:00:00.000Z"] : [v ? "-1" : Ht];
113
113
  return [
114
114
  ...n,
115
115
  {
@@ -117,30 +117,30 @@ function Xl(l) {
117
117
  name: l.name,
118
118
  operator: W.Equal,
119
119
  option: l.option ?? null,
120
- values: i,
120
+ values: u,
121
121
  dataFormula: l.dataFormula,
122
122
  isGlobalFilter: !0
123
123
  }
124
124
  ];
125
125
  }
126
126
  if ((((d = l.customTimeRanges) == null ? void 0 : d.length) ?? 0) > 0) {
127
- const h = new Set(s.map((i) => String(i)));
127
+ const v = new Set(s.map((u) => String(u)));
128
128
  return [
129
129
  ...n,
130
- ...((p = l.customTimeRanges) == null ? void 0 : p.filter((i) => {
131
- const F = String(i.name ?? "");
132
- return h.has(F);
133
- }).map((i) => Zl(l, i)).filter((i) => !!i)) ?? []
130
+ ...((p = l.customTimeRanges) == null ? void 0 : p.filter((u) => {
131
+ const w = String(u.name ?? "");
132
+ return v.has(w);
133
+ }).map((u) => Zl(l, u)).filter((u) => !!u)) ?? []
134
134
  ];
135
135
  }
136
136
  if ((((f = l.customOptions) == null ? void 0 : f.length) ?? 0) > 0) {
137
- const h = new Set(s.map((i) => String(i)));
137
+ const v = new Set(s.map((u) => String(u)));
138
138
  return [
139
139
  ...n,
140
- ...((S = l.customOptions) == null ? void 0 : S.filter((i) => {
141
- const F = String(i.label ?? "");
142
- return h.has(F);
143
- }).map((i) => Hl(l, i)).filter((i) => Array.isArray(i.values) && i.values.length > 0)) ?? []
140
+ ...((g = l.customOptions) == null ? void 0 : g.filter((u) => {
141
+ const w = String(u.label ?? "");
142
+ return v.has(w);
143
+ }).map((u) => Hl(l, u)).filter((u) => Array.isArray(u.values) && u.values.length > 0)) ?? []
144
144
  ];
145
145
  }
146
146
  return s.length === 0 ? n : [
@@ -161,89 +161,89 @@ function zt({
161
161
  globalFilters: n,
162
162
  schemaNames: s
163
163
  }) {
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);
165
- function h(u) {
164
+ const r = /* @__PURE__ */ new Map(), d = [], p = new Set((s ?? []).map((i) => String(i))), f = (i) => p.has(i.schemaName ?? ""), g = n.filter(f);
165
+ function v(i) {
166
166
  const m = Object.values(B).includes(
167
- String(u.option ?? "")
167
+ String(i.option ?? "")
168
168
  );
169
- return u.option === B.TimeOfDay ? ["1000-01-01T23:59:59.999Z", "1000-01-01T00:00:00.000Z"] : [m ? "-1" : Ht];
169
+ return i.option === B.TimeOfDay ? ["1000-01-01T23:59:59.999Z", "1000-01-01T00:00:00.000Z"] : [m ? "-1" : Ht];
170
170
  }
171
- function i(u, m) {
172
- const v = typeof u == "number" ? u : Number(u), C = typeof m == "number" ? m : Number(m);
173
- return Number.isFinite(v) && Number.isFinite(C) ? v - C : typeof u == "string" && typeof m == "string" ? u.localeCompare(m) : null;
171
+ function u(i, m) {
172
+ const h = typeof i == "number" ? i : Number(i), N = typeof m == "number" ? m : Number(m);
173
+ return Number.isFinite(h) && Number.isFinite(N) ? h - N : typeof i == "string" && typeof m == "string" ? i.localeCompare(m) : null;
174
174
  }
175
- function F(u, m) {
176
- if (u.length === 0 || m.length === 0) return null;
177
- const v = i(u[0], m[0]);
178
- return v == null ? null : [v >= 0 ? u[0] : m[0]];
175
+ function w(i, m) {
176
+ if (i.length === 0 || m.length === 0) return null;
177
+ const h = u(i[0], m[0]);
178
+ return h == null ? null : [h >= 0 ? i[0] : m[0]];
179
179
  }
180
- function z(u, m) {
181
- if (u.length === 0 || m.length === 0) return null;
182
- const v = i(u[0], m[0]);
183
- return v == null ? null : [v <= 0 ? u[0] : m[0]];
180
+ function O(i, m) {
181
+ if (i.length === 0 || m.length === 0) return null;
182
+ const h = u(i[0], m[0]);
183
+ return h == null ? null : [h <= 0 ? i[0] : m[0]];
184
184
  }
185
- function ae(u, m) {
186
- if (u.length < 2 || m.length < 2) return null;
187
- const v = i(u[0], m[0]), C = i(u[1], m[1]);
188
- if (v == null || C == null) return null;
189
- const _ = v >= 0 ? u[0] : m[0], O = C <= 0 ? u[1] : m[1];
190
- return i(_, O) == null ? null : [_, O];
185
+ function te(i, m) {
186
+ if (i.length < 2 || m.length < 2) return null;
187
+ const h = u(i[0], m[0]), N = u(i[1], m[1]);
188
+ if (h == null || N == null) return null;
189
+ const I = h >= 0 ? i[0] : m[0], k = N <= 0 ? i[1] : m[1];
190
+ return u(I, k) == null ? null : [I, k];
191
191
  }
192
- function k(u, m) {
193
- const v = We(u.values), C = We(m.values);
192
+ function A(i, m) {
193
+ const h = We(i.values), N = We(m.values);
194
194
  switch (m.operator) {
195
195
  case W.Equal: {
196
- const _ = new Set(C), O = v.filter((E) => _.has(E));
197
- return O.length ? O : h(u);
196
+ const I = new Set(N), k = h.filter((L) => I.has(L));
197
+ return k.length ? k : v(i);
198
198
  }
199
199
  case W.NotEqual:
200
200
  case W.NotLike:
201
201
  return We([
202
- ...v,
203
- ...C
202
+ ...h,
203
+ ...N
204
204
  ]);
205
205
  case W.GreaterThan:
206
206
  case W.GreaterThanOrEqual:
207
- return F(v, C);
207
+ return w(h, N);
208
208
  case W.LessThan:
209
209
  case W.LessThanOrEqual:
210
- return z(v, C);
210
+ return O(h, N);
211
211
  case W.Between:
212
- return ae(v, C);
212
+ return te(h, N);
213
213
  default:
214
214
  return null;
215
215
  }
216
216
  }
217
- const D = (u) => {
218
- if (!u || !f(u) || !Array.isArray(u.values) || u.values.length === 0)
217
+ const S = (i) => {
218
+ if (!i || !f(i) || !Array.isArray(i.values) || i.values.length === 0)
219
219
  return;
220
220
  const m = {
221
- ...u,
222
- values: We(u.values)
221
+ ...i,
222
+ values: We(i.values)
223
223
  };
224
224
  if (m.option === B.TimeOfDay && m.operator === W.Between) {
225
225
  d.push(m);
226
226
  return;
227
227
  }
228
- const C = Jl(m), _ = r.get(C);
229
- if (!_) {
230
- r.set(C, m);
228
+ const N = Jl(m), I = r.get(N);
229
+ if (!I) {
230
+ r.set(N, m);
231
231
  return;
232
232
  }
233
- const O = k(_, m);
234
- if (O == null) {
233
+ const k = A(I, m);
234
+ if (k == null) {
235
235
  d.push(m);
236
236
  return;
237
237
  }
238
- _.values = O, r.set(C, _);
238
+ I.values = k, r.set(N, I);
239
239
  };
240
- return l.forEach(D), S.forEach(D), [...Array.from(r.values()), ...d];
240
+ return l.forEach(S), g.forEach(S), [...Array.from(r.values()), ...d];
241
241
  }
242
242
  function je(l, n, s) {
243
243
  var p;
244
244
  const r = JSON.parse(JSON.stringify(l)), d = n.filter((f) => {
245
- var S;
246
- return (S = f.tileIds) == null ? void 0 : S.includes(s);
245
+ var g;
246
+ return (g = f.tileIds) == null ? void 0 : g.includes(s);
247
247
  }).flatMap((f) => Xl(f));
248
248
  return {
249
249
  ...r,
@@ -254,14 +254,14 @@ function je(l, n, s) {
254
254
  globalFilters: d ?? [],
255
255
  schemaNames: r.config.schemaNames
256
256
  }),
257
- joinDatasources: ((p = r.config.joinDatasources) == null ? void 0 : p.map((f, S) => {
258
- var h;
257
+ joinDatasources: ((p = r.config.joinDatasources) == null ? void 0 : p.map((f, g) => {
258
+ var v;
259
259
  return {
260
260
  ...f,
261
261
  filters: zt({
262
262
  originalFilters: f.filters ?? [],
263
263
  globalFilters: d ?? [],
264
- schemaNames: (h = r.config.joinDatasources) == null ? void 0 : h[S].schemaNames
264
+ schemaNames: (v = r.config.joinDatasources) == null ? void 0 : v[g].schemaNames
265
265
  })
266
266
  };
267
267
  })) ?? []
@@ -315,8 +315,8 @@ function Qe({
315
315
  compareDateRange: r,
316
316
  timezone: d
317
317
  }) {
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));
318
+ const { canReadReportDateRange: p, canReadPageDateRange: f } = Ml(), g = (u) => n ? f(n, u, d) : l ? p(l, u, d) : !0, v = !!(r != null && r.startDate && (r != null && r.endDate));
319
+ return g(s) && (!v || g(r));
320
320
  }
321
321
  function Ke(l) {
322
322
  if (l === "overview")
@@ -349,57 +349,57 @@ const ln = async ({
349
349
  scopedTimeRange: d,
350
350
  scopedDateRange: p,
351
351
  scopedGlobalFilters: f,
352
- page: S,
353
- pageRead: h,
354
- search: i
352
+ page: g,
353
+ pageRead: v,
354
+ search: u
355
355
  }) => {
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({
358
- selectedNavigationTab: D,
359
- isEditorRoute: u,
360
- overviewReport: k,
361
- editingReport: ae,
362
- currentReport: z
363
- }), v = Ke(D), {
364
- selectedRestaurantIds: C,
365
- selectedWarehouseIds: _,
366
- selectedLocationIds: O,
367
- dateRange: E,
368
- compareDateRange: Q,
369
- timeRange: U,
370
- timezone: te,
356
+ var me, ge, ye, ce;
357
+ const { businessId: w } = re(Oe()), { currentReport: O, editingReport: te, overviewReport: A } = Pe(), { selectedNavigationTab: S, isEditorRoute: i } = qe(), m = wt({
358
+ selectedNavigationTab: S,
359
+ isEditorRoute: i,
360
+ overviewReport: A,
361
+ editingReport: te,
362
+ currentReport: O
363
+ }), h = Ke(S), {
364
+ selectedRestaurantIds: N,
365
+ selectedWarehouseIds: I,
366
+ selectedLocationIds: k,
367
+ dateRange: L,
368
+ compareDateRange: U,
369
+ timeRange: q,
370
+ timezone: le,
371
371
  restaurants: X,
372
- warehouses: le
373
- } = Me(), { globalFilters: w } = Ge();
374
- if (O.length === 0)
372
+ warehouses: ne
373
+ } = Me(), { globalFilters: C } = Ge();
374
+ if (k.length === 0)
375
375
  return null;
376
- const $ = p ?? E, K = d ?? U, Y = f ?? w;
376
+ const _ = p ?? L, K = d ?? q, Y = f ?? C;
377
377
  if (!Qe({
378
378
  report: m,
379
- pageSubject: v,
380
- dateRange: $,
381
- compareDateRange: Q,
382
- timezone: te
379
+ pageSubject: h,
380
+ dateRange: _,
381
+ compareDateRange: U,
382
+ timezone: le
383
383
  }))
384
384
  return null;
385
- const H = (r == null ? void 0 : r.filter((oe) => X.some((se) => se.id === oe))) ?? C, ne = (r == null ? void 0 : r.filter((oe) => le.some((se) => se.id === oe))) ?? _, L = je(l, Y, s ?? ""), R = {
385
+ const H = (r == null ? void 0 : r.filter((ie) => X.some((se) => se.id === ie))) ?? N, ae = (r == null ? void 0 : r.filter((ie) => ne.some((se) => se.id === ie))) ?? I, z = je(l, Y, s ?? ""), R = {
386
386
  fetchType: ke.Post,
387
- url: h ? `/${F.value}/v2/query/page` : `/${F.value}/v2/query`,
387
+ url: v ? `/${w.value}/v2/query/page` : `/${w.value}/v2/query`,
388
388
  data: {
389
- ...S ? { page: S } : {},
390
- ...h ?? {},
391
- ...i ? { search: i } : {},
392
- widget: L,
393
- dateRange: [$.startDate, $.endDate],
394
- compareDateRange: Q.startDate && Q.endDate ? [Q.startDate, Q.endDate] : void 0,
389
+ ...g ? { page: g } : {},
390
+ ...v ?? {},
391
+ ...u ? { search: u } : {},
392
+ widget: z,
393
+ dateRange: [_.startDate, _.endDate],
394
+ compareDateRange: U.startDate && U.endDate ? [U.startDate, U.endDate] : void 0,
395
395
  timeRange: [
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()
396
+ $().tz(le).hour(Number((me = K.start) == null ? void 0 : me.hour)).minute(Number((ge = K.start) == null ? void 0 : ge.minute)).toISOString(),
397
+ $().tz(le).hour(Number((ye = K.end) == null ? void 0 : ye.hour)).minute(Number((ce = K.end) == null ? void 0 : ce.minute)).endOf("minutes").toISOString()
398
398
  ],
399
- businessIds: F.value ? [F.value] : [],
399
+ businessIds: w.value ? [w.value] : [],
400
400
  restaurantIds: H,
401
- warehouseIds: ne,
402
- timezone: te,
401
+ warehouseIds: ae,
402
+ timezone: le,
403
403
  skipStringSpaceGrouping: !!(m != null && m.batch) || vt(m),
404
404
  reportId: m == null ? void 0 : m.id,
405
405
  queryDatasource: en(m)
@@ -419,42 +419,42 @@ const ln = async ({
419
419
  scopedDateRange: r,
420
420
  scopedCompareDateRange: d
421
421
  }) => {
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({
424
- selectedNavigationTab: i,
425
- isEditorRoute: F,
426
- overviewReport: h,
427
- editingReport: S,
422
+ var ne, C, _, K;
423
+ const { businessId: p } = re(Oe()), { currentReport: f, editingReport: g, overviewReport: v } = Pe(), { selectedNavigationTab: u, isEditorRoute: w } = qe(), O = wt({
424
+ selectedNavigationTab: u,
425
+ isEditorRoute: w,
426
+ overviewReport: v,
427
+ editingReport: g,
428
428
  currentReport: f
429
- }), ae = Ke(i), { restaurants: k, warehouses: D, dateRange: u, compareDateRange: m, timeRange: v, timezone: C } = Me(), { globalFilters: _ } = Ge();
430
- if (k.length === 0 && D.length === 0)
429
+ }), te = Ke(u), { restaurants: A, warehouses: S, dateRange: i, compareDateRange: m, timeRange: h, timezone: N } = Me(), { globalFilters: I } = Ge();
430
+ if (A.length === 0 && S.length === 0)
431
431
  return { totalBytesProcessed: 0 };
432
- const O = r ?? u, E = d ?? m;
432
+ const k = r ?? i, L = d ?? m;
433
433
  if (!Qe({
434
- report: z,
435
- pageSubject: ae,
436
- dateRange: O,
437
- compareDateRange: E,
438
- timezone: C
434
+ report: O,
435
+ pageSubject: te,
436
+ dateRange: k,
437
+ compareDateRange: L,
438
+ timezone: N
439
439
  }))
440
440
  return { totalBytesProcessed: 0 };
441
- const Q = k.map((Y) => Y.id), U = D.map((Y) => Y.id), te = je(l, _, s ?? ""), X = {
441
+ const U = A.map((Y) => Y.id), q = S.map((Y) => Y.id), le = je(l, I, s ?? ""), X = {
442
442
  fetchType: ke.Post,
443
443
  url: `/${p.value}/v2/query/dry-run`,
444
444
  data: {
445
- widget: te,
446
- dateRange: [O.startDate, O.endDate],
447
- compareDateRange: E.startDate && E.endDate ? [E.startDate, E.endDate] : void 0,
445
+ widget: le,
446
+ dateRange: [k.startDate, k.endDate],
447
+ compareDateRange: L.startDate && L.endDate ? [L.startDate, L.endDate] : void 0,
448
448
  timeRange: [
449
- I().tz(C).hour(Number((le = v.start) == null ? void 0 : le.hour)).minute(Number((w = v.start) == null ? void 0 : w.minute)).toISOString(),
450
- I().tz(C).hour(Number(($ = v.end) == null ? void 0 : $.hour)).minute(Number((K = v.end) == null ? void 0 : K.minute)).endOf("minutes").toISOString()
449
+ $().tz(N).hour(Number((ne = h.start) == null ? void 0 : ne.hour)).minute(Number((C = h.start) == null ? void 0 : C.minute)).toISOString(),
450
+ $().tz(N).hour(Number((_ = h.end) == null ? void 0 : _.hour)).minute(Number((K = h.end) == null ? void 0 : K.minute)).endOf("minutes").toISOString()
451
451
  ],
452
452
  businessIds: p.value ? [p.value] : [],
453
- restaurantIds: Q,
454
- warehouseIds: U,
455
- timezone: C,
453
+ restaurantIds: U,
454
+ warehouseIds: q,
455
+ timezone: N,
456
456
  skipStringSpaceGrouping: !1,
457
- reportId: z == null ? void 0 : z.id,
457
+ reportId: O == null ? void 0 : O.id,
458
458
  queryDatasource: tt.BigQuery
459
459
  },
460
460
  requestConfig: {
@@ -471,19 +471,19 @@ const ln = async ({
471
471
  scopedTimeRange: d,
472
472
  scopedDateRange: p,
473
473
  scopedGlobalFilters: f,
474
- page: S,
475
- pageRead: h,
476
- search: i
474
+ page: g,
475
+ pageRead: v,
476
+ search: u
477
477
  }) => {
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({
480
- selectedNavigationTab: u,
478
+ var ye, ce, ie, se;
479
+ const { businessId: w, country: O } = re(Oe()), { currentReport: te, editingReport: A, overviewReport: S } = Pe(), { selectedNavigationTab: i, isEditorRoute: m } = qe(), h = wt({
480
+ selectedNavigationTab: i,
481
481
  isEditorRoute: m,
482
- overviewReport: D,
483
- editingReport: k,
484
- currentReport: ae
485
- }), C = Ke(u);
486
- if (vt(v))
482
+ overviewReport: S,
483
+ editingReport: A,
484
+ currentReport: te
485
+ }), N = Ke(i);
486
+ if (vt(h))
487
487
  return ln({
488
488
  widget: l,
489
489
  signal: n,
@@ -492,67 +492,67 @@ const ln = async ({
492
492
  scopedTimeRange: d,
493
493
  scopedDateRange: p,
494
494
  scopedGlobalFilters: f,
495
- page: S,
496
- pageRead: h,
497
- search: i
495
+ page: g,
496
+ pageRead: v,
497
+ search: u
498
498
  });
499
499
  const {
500
- selectedRestaurantIds: _,
501
- selectedWarehouseIds: O,
502
- selectedLocationIds: E,
503
- dateRange: Q,
504
- compareDateRange: U,
505
- timeRange: te,
500
+ selectedRestaurantIds: I,
501
+ selectedWarehouseIds: k,
502
+ selectedLocationIds: L,
503
+ dateRange: U,
504
+ compareDateRange: q,
505
+ timeRange: le,
506
506
  timezone: X,
507
- restaurants: le,
508
- warehouses: w
509
- } = Me(), { globalFilters: $ } = Ge();
510
- if (E.length === 0)
507
+ restaurants: ne,
508
+ warehouses: C
509
+ } = Me(), { globalFilters: _ } = Ge();
510
+ if (L.length === 0)
511
511
  return null;
512
- const K = p ?? Q, Y = d ?? te, H = f ?? $;
512
+ const K = p ?? U, Y = d ?? le, H = f ?? _;
513
513
  if (!Qe({
514
- report: v,
515
- pageSubject: C,
514
+ report: h,
515
+ pageSubject: N,
516
516
  dateRange: K,
517
- compareDateRange: U,
517
+ compareDateRange: q,
518
518
  timezone: X
519
519
  }))
520
520
  return null;
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 = {
521
+ const ae = (r == null ? void 0 : r.filter((Z) => ne.some((De) => De.id === Z))) ?? I, z = (r == null ? void 0 : r.filter((Z) => C.some((De) => De.id === Z))) ?? k, R = je(l, H, s ?? ""), oe = {
522
522
  fetchType: ke.Post,
523
- url: `/${F.value}/postgres-query`,
523
+ url: `/${w.value}/postgres-query`,
524
524
  data: St.getQueryRequests({
525
525
  widget: R,
526
526
  dateRange: [K.startDate, K.endDate],
527
- compareDateRange: U.startDate && U.endDate ? [U.startDate, U.endDate] : void 0,
527
+ compareDateRange: q.startDate && q.endDate ? [q.startDate, q.endDate] : void 0,
528
528
  timeRange: [
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()
529
+ $().tz(X).hour(Number((ye = Y.start) == null ? void 0 : ye.hour)).minute(Number((ce = Y.start) == null ? void 0 : ce.minute)).toISOString(),
530
+ $().tz(X).hour(Number((ie = Y.end) == null ? void 0 : ie.hour)).minute(Number((se = Y.end) == null ? void 0 : se.minute)).endOf("minutes").toISOString()
531
531
  ],
532
- businessIds: F.value ? [F.value] : [],
533
- restaurantIds: ne,
534
- warehouseIds: L,
532
+ businessIds: w.value ? [w.value] : [],
533
+ restaurantIds: ae,
534
+ warehouseIds: z,
535
535
  timezone: X
536
536
  }).map((Z, De) => {
537
537
  const Te = De === 0 ? 3e3 : 12e3;
538
538
  return {
539
539
  ...Z,
540
- limit: ne.length > 50 ? l.config.limit || Te : l.config.limit,
541
- skipStringSpaceGrouping: !!(v != null && v.batch) || vt(v),
542
- reportId: v == null ? void 0 : v.id
540
+ limit: ae.length > 50 ? l.config.limit || Te : l.config.limit,
541
+ skipStringSpaceGrouping: !!(h != null && h.batch) || vt(h),
542
+ reportId: h == null ? void 0 : h.id
543
543
  };
544
544
  }),
545
545
  requestConfig: {
546
546
  timeout: 1e3 * 60 * 5,
547
547
  signal: n
548
548
  }
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);
549
+ }, me = [() => Ae.fetch(oe)];
550
+ I.length < 50 && me.push(() => Ae.fetch(oe)), me.push(() => Ae.fetch(oe));
551
+ const ge = await Xt(me, 2e3);
552
552
  return (await ql(Wl, {
553
553
  responses: ge,
554
554
  widget: JSON.parse(JSON.stringify(l)),
555
- country: z.value,
555
+ country: O.value,
556
556
  timezone: X
557
557
  })).data;
558
558
  }, zn = async ({
@@ -563,55 +563,55 @@ const ln = async ({
563
563
  locationIds: d,
564
564
  timeRange: p,
565
565
  dateRange: f,
566
- globalFilters: S
566
+ globalFilters: g
567
567
  }) => {
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: C } = 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);
568
+ const { businessId: v } = re(Oe()), u = Me(), { compareDateRange: w } = re(u), { restaurants: O, warehouses: te, timezone: A } = u, { globalFilters: S } = Ge(), { currentReport: i, overviewReport: m } = Pe(), { selectedNavigationTab: h } = qe(), { getTileSorts: N } = Yt(), { getTileSearch: I } = Kl();
569
+ let k = i == null ? void 0 : i.id, L = Ue(i == null ? void 0 : i.tiles);
570
+ h === "overview" && m && (k = m == null ? void 0 : m.id, L = Ue(m == null ? void 0 : m.tiles));
571
+ const U = h === "overview" && m ? m : i, q = Ke(h);
572
572
  if (!Qe({
573
- report: Q,
574
- pageSubject: U,
573
+ report: U,
574
+ pageSubject: q,
575
575
  dateRange: f,
576
- compareDateRange: F.value,
577
- timezone: k
576
+ compareDateRange: w.value,
577
+ timezone: A
578
578
  }))
579
579
  return;
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 = {
580
+ const le = g ?? S, X = L.filter((ae, z) => typeof n == "number" ? z === n : !0).map((ae) => je(ae.widget, le, ae.id)), ne = {
581
581
  fetchType: ke.Post,
582
- url: `/${h.value}/file?lang=${xe()}`,
582
+ url: `/${v.value}/file?lang=${xe()}`,
583
583
  data: {
584
584
  configs: [
585
- ...X.map((ne, L) => {
586
- var de, ge, ye, ue;
587
- const R = _(n ?? L), ve = St.getQueryRequests({
588
- widget: ne,
585
+ ...X.map((ae, z) => {
586
+ var me, ge, ye, ce;
587
+ const R = I(n ?? z), oe = St.getQueryRequests({
588
+ widget: ae,
589
589
  dateRange: [f.startDate, f.endDate],
590
- compareDateRange: F.value.startDate && F.value.endDate ? [F.value.startDate, F.value.endDate] : void 0,
590
+ compareDateRange: w.value.startDate && w.value.endDate ? [w.value.startDate, w.value.endDate] : void 0,
591
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()
592
+ $().tz(A).set("hour", Number((me = p.start) == null ? void 0 : me.hour)).set("minute", Number((ge = p.start) == null ? void 0 : ge.minute)).toISOString(),
593
+ $().tz(A).set("hour", Number((ye = p.end) == null ? void 0 : ye.hour)).set("minute", Number((ce = p.end) == null ? void 0 : ce.minute)).toISOString()
594
594
  ],
595
- businessIds: h ? [h.value] : [],
595
+ businessIds: v ? [v.value] : [],
596
596
  restaurantIds: d.filter(
597
- (oe) => z.find((se) => se.id === oe)
597
+ (ie) => O.find((se) => se.id === ie)
598
598
  ),
599
599
  warehouseIds: d.filter(
600
- (oe) => ae.find((se) => se.id === oe)
600
+ (ie) => te.find((se) => se.id === ie)
601
601
  ),
602
- timezone: k
602
+ timezone: A
603
603
  });
604
604
  return {
605
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,
606
+ requests: R ? oe.map((ie) => ({ ...ie, search: R })) : oe,
607
+ index: n || z,
608
608
  drillDimension: null,
609
- ...Zt(ne),
610
- globalSorts: C(n ?? L)
609
+ ...Zt(ae),
610
+ globalSorts: N(n ?? z)
611
611
  };
612
612
  })
613
613
  ],
614
- reportId: O,
614
+ reportId: k,
615
615
  type: l,
616
616
  orientationTypes: s,
617
617
  isCombinedLocationLayout: r
@@ -620,7 +620,7 @@ const ln = async ({
620
620
  responseType: "arraybuffer",
621
621
  timeout: 1e3 * 60 * 60 * 24
622
622
  }
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");
623
+ }, { headers: C, data: _ } = await gt.rawFetch(ne), K = C["content-disposition"].split("filename=")[1].replaceAll('"', ""), Y = window.URL.createObjectURL(new Blob([new Uint8Array(_).buffer])), H = document.createElement("a");
624
624
  H.href = Y, H.setAttribute("download", decodeURIComponent(K)), document.body.appendChild(H), H.click(), H.remove();
625
625
  }, Wn = async ({
626
626
  emails: l,
@@ -630,68 +630,70 @@ const ln = async ({
630
630
  locationIds: d,
631
631
  orientationTypes: p,
632
632
  isCombinedLocationLayout: f,
633
- globalFilters: S
633
+ attachFiles: g,
634
+ globalFilters: v
634
635
  }) => {
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: C } = Yt();
636
+ const { businessId: u } = re(Oe()), { currentReport: w, overviewReport: O } = Pe(), { selectedNavigationTab: te } = qe(), A = Me(), { compareDateRange: S } = re(A), { restaurants: i, warehouses: m, timezone: h } = A, { globalFilters: N } = Ge(), { getTileSorts: I } = Yt();
636
637
  if (l.length === 0) {
637
638
  console.error("No email addresses provided.");
638
639
  return;
639
640
  }
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);
641
+ let k = (w == null ? void 0 : w.id) || "", L = (w == null ? void 0 : w.name) || "", U = Ue(w == null ? void 0 : w.tiles);
642
+ te === "overview" && O && (k = O == null ? void 0 : O.id, L = O.name, U = Ue(O == null ? void 0 : O.tiles));
643
+ const q = te === "overview" && O ? O : w, le = Ke(te);
643
644
  if (!Qe({
644
- report: Q,
645
- pageSubject: U,
645
+ report: q,
646
+ pageSubject: le,
646
647
  dateRange: s,
647
- compareDateRange: k.value,
648
- timezone: m
648
+ compareDateRange: S.value,
649
+ timezone: h
649
650
  }))
650
651
  return;
651
- const te = S ?? v, X = E.map((w) => je(w.widget, te, w.id)), le = {
652
- businessId: h.value,
652
+ const X = v ?? N, ne = U.map((_) => je(_.widget, X, _.id)), C = {
653
+ businessId: u.value,
653
654
  status: Jt.generating,
654
655
  dateRange: {
655
656
  start: s.startDate,
656
657
  end: s.endDate
657
658
  },
658
- reportName: O,
659
+ reportName: L,
659
660
  emails: l,
660
- configs: X.map((w, $) => {
661
- var K, Y, H, ne;
661
+ configs: ne.map((_, K) => {
662
+ var Y, H, ae, z;
662
663
  return {
663
664
  requests: St.getQueryRequests({
664
- widget: w,
665
+ widget: _,
665
666
  dateRange: [s.startDate, s.endDate],
666
- compareDateRange: k.value.startDate && k.value.endDate ? [k.value.startDate, k.value.endDate] : void 0,
667
+ compareDateRange: S.value.startDate && S.value.endDate ? [S.value.startDate, S.value.endDate] : void 0,
667
668
  timeRange: [
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()
669
+ $().tz(h).hour(Number((Y = r.start) == null ? void 0 : Y.hour)).minute(Number((H = r.start) == null ? void 0 : H.minute)).toISOString(),
670
+ $().tz(h).hour(Number((ae = r.end) == null ? void 0 : ae.hour)).minute(Number((z = r.end) == null ? void 0 : z.minute)).endOf("minutes").toISOString()
670
671
  ],
671
- businessIds: h ? [h.value] : [],
672
+ businessIds: u ? [u.value] : [],
672
673
  restaurantIds: d.filter(
673
- (L) => D.find((R) => R.id === L)
674
+ (R) => i.find((oe) => oe.id === R)
674
675
  ),
675
676
  warehouseIds: d.filter(
676
- (L) => u.find((R) => R.id === L)
677
+ (R) => m.find((oe) => oe.id === R)
677
678
  ),
678
- timezone: m
679
+ timezone: h
679
680
  }),
680
- index: $,
681
+ index: K,
681
682
  drillDimension: null,
682
- ...Zt(w),
683
- globalSorts: C($)
683
+ ...Zt(_),
684
+ globalSorts: I(K)
684
685
  };
685
686
  }),
686
- reportId: _,
687
+ reportId: k,
687
688
  type: n,
688
689
  orientationTypes: p,
689
- isCombinedLocationLayout: f
690
+ isCombinedLocationLayout: f,
691
+ attachFiles: g
690
692
  };
691
693
  await gt.fetch({
692
694
  fetchType: ke.Post,
693
- url: `/${h.value}/reports/email?lang=${xe()}`,
694
- data: le,
695
+ url: `/${u.value}/reports/email?lang=${xe()}`,
696
+ data: C,
695
697
  requestConfig: { timeout: 1e3 * 60 * 3 }
696
698
  });
697
699
  }, Un = async (l) => {
@@ -716,26 +718,26 @@ const ln = async ({
716
718
  data: { email: l }
717
719
  });
718
720
  }, an = "mf-reportwidget-result-store", sn = Ft(an, () => {
719
- const l = he({}), n = he(0), s = Se(() => n.value === 0);
721
+ const l = ve({}), n = ve(0), s = Se(() => n.value === 0);
720
722
  function r() {
721
723
  n.value += 1;
722
724
  }
723
725
  function d() {
724
726
  n.value = Math.max(0, n.value - 1);
725
727
  }
726
- function p(h, i) {
727
- if (h)
728
- if (i === null)
729
- l.value[h] = [];
728
+ function p(v, u) {
729
+ if (v)
730
+ if (u === null)
731
+ l.value[v] = [];
730
732
  else {
731
- const F = l.value[h] ?? [];
732
- l.value[h] = Array.from(/* @__PURE__ */ new Set([...F, ...i]));
733
+ const w = l.value[v] ?? [];
734
+ l.value[v] = Array.from(/* @__PURE__ */ new Set([...w, ...u]));
733
735
  }
734
736
  }
735
- function f(h) {
736
- return h ? l.value[h] ?? [] : [];
737
+ function f(v) {
738
+ return v ? l.value[v] ?? [] : [];
737
739
  }
738
- function S() {
740
+ function g() {
739
741
  l.value = {};
740
742
  }
741
743
  return {
@@ -746,11 +748,11 @@ const ln = async ({
746
748
  finishWidgetResultLoading: d,
747
749
  setWidgetResult: p,
748
750
  getWidgetResult: f,
749
- clearAllWidgetResults: S
751
+ clearAllWidgetResults: g
750
752
  };
751
- }), Wt = (l, n = "en") => I().set("hour", l.hour).set("minute", l.minute).locale(n).format("h:mm A"), rn = (l, n) => {
752
- const s = I().set("hour", l.hour).set("minute", l.minute);
753
- return I().set("hour", n.hour).set("minute", n.minute) < s ? "+1" : "";
753
+ }), Wt = (l, n = "en") => $().set("hour", l.hour).set("minute", l.minute).locale(n).format("h:mm A"), rn = (l, n) => {
754
+ const s = $().set("hour", l.hour).set("minute", l.minute);
755
+ return $().set("hour", n.hour).set("minute", n.minute) < s ? "+1" : "";
754
756
  };
755
757
  function Ut(l, n) {
756
758
  return l.isSystem ? n("reportV5.reportHour.fullDay") : l.name;
@@ -798,140 +800,140 @@ const on = { class: "px-24 py-16 rounded-lg shadow-light-300" }, un = { class: "
798
800
  emits: /* @__PURE__ */ lt(["update", "chip-closed"], ["update:timeRange", "update:selectTimeDefault"]),
799
801
  setup(l, { emit: n }) {
800
802
  const { t: s, locale: r } = Kt(), d = ft(l, "timeRange"), p = n, f = ft(l, "selectTimeDefault");
801
- function S(D) {
802
- D && (d.value = D, p("update", d.value)), z.value = !1;
803
+ function g(S) {
804
+ S && (d.value = S, p("update", d.value)), O.value = !1;
803
805
  }
804
- function h(D) {
805
- const u = D.split(":"), m = I().set("hour", Number(u[0])).set("minute", Number(u[1]));
806
+ function v(S) {
807
+ const i = S.split(":"), m = $().set("hour", Number(i[0])).set("minute", Number(i[1]));
806
808
  return {
807
809
  hours: Number(m.format("h")),
808
810
  minutes: Number(m.format("m")),
809
811
  period: m.format("A")
810
812
  };
811
813
  }
812
- const i = he(JSON.parse(JSON.stringify(d.value)));
813
- function F(D, u) {
814
- i.value.start = JSON.parse(JSON.stringify(D)), i.value.end = JSON.parse(JSON.stringify(u));
814
+ const u = ve(JSON.parse(JSON.stringify(d.value)));
815
+ function w(S, i) {
816
+ u.value.start = JSON.parse(JSON.stringify(S)), u.value.end = JSON.parse(JSON.stringify(i));
815
817
  }
816
818
  Ie(
817
819
  () => [d.value, l.defaultDateRange],
818
820
  () => {
819
821
  if (d.value) {
820
- const D = l.defaultDateRange.findIndex(
821
- (u) => {
822
- var m, v, C, _;
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 === ((C = d.value.end) == null ? void 0 : C.hour) && u.endTime.minute === ((_ = d.value.end) == null ? void 0 : _.minute);
822
+ const S = l.defaultDateRange.findIndex(
823
+ (i) => {
824
+ var m, h, N, I;
825
+ return i.startTime.hour === ((m = d.value.start) == null ? void 0 : m.hour) && i.startTime.minute === ((h = d.value.start) == null ? void 0 : h.minute) && i.endTime.hour === ((N = d.value.end) == null ? void 0 : N.hour) && i.endTime.minute === ((I = d.value.end) == null ? void 0 : I.minute);
824
826
  }
825
827
  ) + 1;
826
- D !== 0 ? f.value = D : f.value = l.defaultDateRange.length + 1;
828
+ S !== 0 ? f.value = S : f.value = l.defaultDateRange.length + 1;
827
829
  }
828
830
  },
829
831
  { deep: !0, immediate: !0 }
830
832
  );
831
- const z = he(!1);
832
- function ae(D) {
833
- p("chip-closed", D);
833
+ const O = ve(!1);
834
+ function te(S) {
835
+ p("chip-closed", S);
834
836
  }
835
- const k = Se(() => l.label ? l.label : jt({
837
+ const A = Se(() => l.label ? l.label : jt({
836
838
  startTime: d.value.start,
837
839
  endTime: d.value.end,
838
840
  locale: r.value
839
841
  }));
840
- return (D, u) => {
841
- const m = ee("FmChip"), v = ee("FmRadio"), C = 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,
842
+ return (S, i) => {
843
+ const m = ee("FmChip"), h = ee("FmRadio"), N = ee("FmMenuDivider"), I = ee("FmRadioGroup"), k = ee("FmTimeInput"), L = ee("FmButton"), U = ee("FmPopover");
844
+ return J(), fe("div", null, [
845
+ P(U, {
846
+ "show-popover": O.value,
845
847
  placement: "bottom",
846
- onPopoverChanged: u[6] || (u[6] = (U) => z.value = U)
848
+ onPopoverChanged: i[6] || (i[6] = (q) => O.value = q)
847
849
  }, {
848
- "popover-button": ie(() => [
850
+ "popover-button": ue(() => [
849
851
  P(Qt, {
850
852
  "left-icon": l.label ? "filter_alt" : "schedule",
851
- label: k.value,
853
+ label: A.value,
852
854
  removable: l.removable,
853
- onChipClosed: u[0] || (u[0] = (U) => ae(!0))
855
+ onChipClosed: i[0] || (i[0] = (q) => te(!0))
854
856
  }, null, 8, ["left-icon", "label", "removable"])
855
857
  ]),
856
- default: ie(() => {
857
- var U, te, X, le;
858
+ default: ue(() => {
859
+ var q, le, X, ne;
858
860
  return [
859
- j("div", on, [
860
- P(_, {
861
+ Q("div", on, [
862
+ P(I, {
861
863
  modelValue: f.value,
862
- "onUpdate:modelValue": u[1] || (u[1] = (w) => f.value = w)
864
+ "onUpdate:modelValue": i[1] || (i[1] = (C) => f.value = C)
863
865
  }, {
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)
866
+ default: ue(() => [
867
+ (J(!0), fe(Le, null, ht(l.defaultDateRange, (C, _) => (J(), we(h, {
868
+ key: `range_${_}`,
869
+ value: _ + 1,
870
+ label: D(Ut)(C, D(s)),
871
+ onClick: (K) => w(C.startTime, C.endTime)
870
872
  }, {
871
- label: ie(() => [
872
- j("p", un, [
873
- nt(be(T(Ut)(w, T(s))) + " ", 1),
873
+ label: ue(() => [
874
+ Q("p", un, [
875
+ nt(he(D(Ut)(C, D(s))) + " ", 1),
874
876
  $l(P(m, {
875
- label: T(s)("report.common.default"),
877
+ label: D(s)("report.common.default"),
876
878
  class: "bg-fm-color-system-info-100 border-fm-color-typo-info text-fm-color-typo-info",
877
879
  compact: ""
878
880
  }, null, 8, ["label"]), [
879
- [xl, w.isDefault]
881
+ [xl, C.isDefault]
880
882
  ])
881
883
  ]),
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)
884
+ Q("p", cn, he(D(Wt)(C.startTime, D(xe)())) + " - " + he(D(Wt)(C.endTime, D(xe)())) + " " + he(D(rn)(C.startTime, C.endTime)), 1)
883
885
  ]),
884
886
  _: 2
885
887
  }, 1032, ["value", "label", "onClick"]))), 128)),
886
- P(C),
887
- P(v, {
888
+ P(N),
889
+ P(h, {
888
890
  key: "range_custom",
889
- label: T(s)("report.common.custom"),
891
+ label: D(s)("report.common.custom"),
890
892
  value: l.defaultDateRange.length + 1
891
893
  }, null, 8, ["label", "value"])
892
894
  ]),
893
895
  _: 1
894
896
  }, 8, ["modelValue"]),
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, {
899
- "model-value": h(`${(U = i.value.start) == null ? void 0 : U.hour}:${(te = i.value.start) == null ? void 0 : te.minute}`),
900
- "onUpdate:modelValue": u[2] || (u[2] = (w) => {
901
- if (i.value.start) {
902
- const $ = T(I)(`${w.hours}:${w.minutes} ${w.period}`, "h:m A").locale(
903
- T(xe)()
897
+ f.value === l.defaultDateRange.length + 1 ? (J(), fe(Le, { key: 0 }, [
898
+ Q("p", dn, he(D(s)("report.date.startingTime")), 1),
899
+ Q("div", mn, [
900
+ P(k, {
901
+ "model-value": v(`${(q = u.value.start) == null ? void 0 : q.hour}:${(le = u.value.start) == null ? void 0 : le.minute}`),
902
+ "onUpdate:modelValue": i[2] || (i[2] = (C) => {
903
+ if (u.value.start) {
904
+ const _ = D($)(`${C.hours}:${C.minutes} ${C.period}`, "h:m A").locale(
905
+ D(xe)()
904
906
  );
905
- i.value.start.hour = $.get("hour"), i.value.start.minute = $.get("minute");
907
+ u.value.start.hour = _.get("hour"), u.value.start.minute = _.get("minute");
906
908
  }
907
909
  })
908
910
  }, null, 8, ["model-value"])
909
911
  ]),
910
- j("p", pn, be(T(s)("report.date.endingTime")), 1),
911
- j("div", fn, [
912
- P(O, {
913
- "model-value": h(`${(X = i.value.end) == null ? void 0 : X.hour}:${(le = i.value.end) == null ? void 0 : le.minute}`),
914
- "onUpdate:modelValue": u[3] || (u[3] = (w) => {
915
- if (i.value.end) {
916
- const $ = T(I)(`${w.hours}:${w.minutes} ${w.period}`, "h:m A").locale(
917
- T(xe)()
912
+ Q("p", pn, he(D(s)("report.date.endingTime")), 1),
913
+ Q("div", fn, [
914
+ P(k, {
915
+ "model-value": v(`${(X = u.value.end) == null ? void 0 : X.hour}:${(ne = u.value.end) == null ? void 0 : ne.minute}`),
916
+ "onUpdate:modelValue": i[3] || (i[3] = (C) => {
917
+ if (u.value.end) {
918
+ const _ = D($)(`${C.hours}:${C.minutes} ${C.period}`, "h:m A").locale(
919
+ D(xe)()
918
920
  );
919
- i.value.end.hour = $.get("hour"), i.value.end.minute = $.get("minute");
921
+ u.value.end.hour = _.get("hour"), u.value.end.minute = _.get("minute");
920
922
  }
921
923
  })
922
924
  }, null, 8, ["model-value"])
923
925
  ])
924
926
  ], 64)) : bt("", !0),
925
- j("div", bn, [
926
- u[7] || (u[7] = j("div", { class: "grow" }, null, -1)),
927
- P(E, {
928
- label: T(s)("report.common.cancel"),
927
+ Q("div", bn, [
928
+ i[7] || (i[7] = Q("div", { class: "grow" }, null, -1)),
929
+ P(L, {
930
+ label: D(s)("report.common.cancel"),
929
931
  variant: "tertiary",
930
- onClick: u[4] || (u[4] = (w) => z.value = !1)
932
+ onClick: i[4] || (i[4] = (C) => O.value = !1)
931
933
  }, null, 8, ["label"]),
932
- P(E, {
933
- label: T(s)("report.common.apply"),
934
- onClick: u[5] || (u[5] = () => S(JSON.parse(JSON.stringify(i.value))))
934
+ P(L, {
935
+ label: D(s)("report.common.apply"),
936
+ onClick: i[5] || (i[5] = () => g(JSON.parse(JSON.stringify(u.value))))
935
937
  }, null, 8, ["label"])
936
938
  ])
937
939
  ])
@@ -967,29 +969,29 @@ const on = { class: "px-24 py-16 rounded-lg shadow-light-300" }, un = { class: "
967
969
  return Ie(s, () => {
968
970
  s.value ? document.body.style.overflow = "hidden" : document.body.style.overflow = "scroll";
969
971
  }), (p, f) => {
970
- const S = ee("FmButton"), h = ee("FmDialog");
971
- return J(), we(h, {
972
+ const g = ee("FmButton"), v = ee("FmDialog");
973
+ return J(), we(v, {
972
974
  modelValue: s.value,
973
- "onUpdate:modelValue": f[2] || (f[2] = (i) => s.value = i),
975
+ "onUpdate:modelValue": f[2] || (f[2] = (u) => s.value = u),
974
976
  overlay: ""
975
977
  }, {
976
- "dialog-header": ie(() => [
977
- nt(be(r.title), 1)
978
+ "dialog-header": ue(() => [
979
+ nt(he(r.title), 1)
978
980
  ]),
979
- default: ie(() => [
981
+ default: ue(() => [
980
982
  qt(p.$slots, "content")
981
983
  ]),
982
- "dialog-footer": ie(() => [
983
- f[3] || (f[3] = j("div", { class: "grow" }, null, -1)),
984
- P(S, {
984
+ "dialog-footer": ue(() => [
985
+ f[3] || (f[3] = Q("div", { class: "grow" }, null, -1)),
986
+ P(g, {
985
987
  label: r.secondaryButtonLabel,
986
988
  variant: "tertiary",
987
- onClick: f[0] || (f[0] = (i) => s.value = !1)
989
+ onClick: f[0] || (f[0] = (u) => s.value = !1)
988
990
  }, null, 8, ["label"]),
989
- P(S, {
991
+ P(g, {
990
992
  label: r.primaryButtonLabel,
991
993
  variant: "primary",
992
- onClick: f[1] || (f[1] = (i) => d("confirm"))
994
+ onClick: f[1] || (f[1] = (u) => d("confirm"))
993
995
  }, null, 8, ["label"])
994
996
  ]),
995
997
  _: 3
@@ -1030,7 +1032,7 @@ function Kn({
1030
1032
  }) {
1031
1033
  const { fixed: d, count: p } = vn(l);
1032
1034
  switch (s) {
1033
- case fe.String:
1035
+ case be.String:
1034
1036
  return {
1035
1037
  type: "TextField",
1036
1038
  fixed: d,
@@ -1038,7 +1040,7 @@ function Kn({
1038
1040
  dataType: void 0,
1039
1041
  default: ""
1040
1042
  };
1041
- case fe.Numeric:
1043
+ case be.Numeric:
1042
1044
  return {
1043
1045
  type: "TextField",
1044
1046
  fixed: d,
@@ -1046,7 +1048,7 @@ function Kn({
1046
1048
  dataType: "number",
1047
1049
  default: 0
1048
1050
  };
1049
- case fe.Bool:
1051
+ case be.Bool:
1050
1052
  return {
1051
1053
  type: "Select",
1052
1054
  fixed: d,
@@ -1057,7 +1059,7 @@ function Kn({
1057
1059
  ],
1058
1060
  default: !0
1059
1061
  };
1060
- case fe.Timestamp:
1062
+ case be.Timestamp:
1061
1063
  return el({
1062
1064
  dimensionOption: n,
1063
1065
  fixed: d,
@@ -1196,49 +1198,49 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
1196
1198
  },
1197
1199
  setup(l) {
1198
1200
  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,
1202
- setGlobalFilter: D,
1203
- setIncludeUnavailable: u,
1201
+ let { timeRange: f, dateRange: g, selectedLocationIds: v, timezone: u } = re(Me()), { globalFilters: w } = re(Ge()), { schemas: O } = re(Pl()), {
1202
+ showMore: te,
1203
+ getGlobalFilter: A,
1204
+ setGlobalFilter: S,
1205
+ setIncludeUnavailable: i,
1204
1206
  getGlobalFilterKey: m,
1205
- isMenuOpen: v,
1206
- getGlobalFilterLabel: C,
1207
- incrementAppliedTilesFiltersVersion: _
1207
+ isMenuOpen: h,
1208
+ getGlobalFilterLabel: N,
1209
+ incrementAppliedTilesFiltersVersion: I
1208
1210
  } = Ge();
1209
- const O = Se(() => s("report.input.empty")), E = ["NULL", "", " "];
1210
- let Q;
1211
- const U = sn(), { getWidgetResult: te } = U, { widgetResults: X, isAllWidgetResultLoaded: le } = re(U), w = he(!1), $ = he(!1), K = he(""), Y = he({}), H = Se(() => {
1211
+ const k = Se(() => s("report.input.empty")), L = ["NULL", "", " "];
1212
+ let U;
1213
+ const q = sn(), { getWidgetResult: le } = q, { widgetResults: X, isAllWidgetResultLoaded: ne } = re(q), C = ve(!1), _ = ve(!1), K = ve(""), Y = ve({}), H = Se(() => {
1212
1214
  var e;
1213
1215
  return n.globalFilterId ?? ((e = d.value) == null ? void 0 : e.id) ?? "";
1214
- }), ne = Se(() => n.report ?? d.value), L = he([]);
1216
+ }), ae = Se(() => n.report ?? d.value), z = ve([]);
1215
1217
  function R(e) {
1216
1218
  return `${H.value}|instance:${e}`;
1217
1219
  }
1218
- function ve(e) {
1219
- return ct(e) ? !1 : w.value ? !0 : n.isDialogGlobalFilter ? $.value : !le.value && e.options.length === 0;
1220
+ function oe(e) {
1221
+ return ct(e) ? !1 : C.value ? !0 : n.isDialogGlobalFilter ? _.value : !ne.value && e.options.length === 0;
1220
1222
  }
1221
- function de(e, t) {
1223
+ function me(e, t) {
1222
1224
  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);
1223
1225
  }
1224
1226
  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);
1227
+ var o, a, b, T, y, G, M, x;
1228
+ 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) === ((T = t == null ? void 0 : t.start) == null ? void 0 : T.minute) && ((y = e == null ? void 0 : e.end) == null ? void 0 : y.hour) === ((G = t == null ? void 0 : t.end) == null ? void 0 : G.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);
1227
1229
  }
1228
1230
  function ye(e, t) {
1229
1231
  return !e || !t ? e === t : e.length === t.length && e.every((o, a) => o === t[a]);
1230
1232
  }
1231
- const ue = Se(() => {
1233
+ const ce = Se(() => {
1232
1234
  if (!(n.isDialogGlobalFilter || !!p.value))
1233
1235
  return !1;
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);
1236
+ const t = n.dateRange ?? g.value, o = n.timeRange ?? f.value, a = n.locationIds ?? v.value;
1237
+ return me(t, g.value) && ge(o, f.value) && ye(a, v.value);
1236
1238
  });
1237
- function oe(e) {
1239
+ function ie(e) {
1238
1240
  return e ? [...e.tileIds ?? []] : Array.from(new Set(He.value.flatMap((t) => t.tileIds ?? [])));
1239
1241
  }
1240
1242
  function se(e) {
1241
- n.isDialogGlobalFilter || _(oe(e));
1243
+ n.isDialogGlobalFilter || I(ie(e));
1242
1244
  }
1243
1245
  function Z(e) {
1244
1246
  return e.filter((t) => t !== Fe);
@@ -1247,23 +1249,23 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
1247
1249
  const t = e.some(
1248
1250
  (a) => a === Ce || a === "NULL" || typeof a == "string" && (a === "" || a === " ")
1249
1251
  ), o = e.flatMap(
1250
- (a) => a === Ce ? [...E] : [a]
1252
+ (a) => a === Ce ? [...L] : [a]
1251
1253
  );
1252
- return t ? Array.from(/* @__PURE__ */ new Set([...o, ...E])) : Array.from(new Set(o));
1254
+ return t ? Array.from(/* @__PURE__ */ new Set([...o, ...L])) : Array.from(new Set(o));
1253
1255
  }
1254
1256
  function Te(e) {
1255
- const t = k(
1257
+ const t = A(
1256
1258
  e.globalFilter,
1257
1259
  R(e.id)
1258
1260
  ).selectedValues;
1259
1261
  return t != null && t.length ? t : e.selectedValues || [];
1260
1262
  }
1261
1263
  function at(e) {
1262
- e.selectedValues = [], e.globalFilter.values = [], D(e.globalFilter, R(e.id), { selectedValues: [] });
1264
+ e.selectedValues = [], e.globalFilter.values = [], S(e.globalFilter, R(e.id), { selectedValues: [] });
1263
1265
  }
1264
1266
  function st(e) {
1265
1267
  const t = Je(e);
1266
- e.selectedValues = [...t], e.globalFilter.values = il(e), D(e.globalFilter, R(e.id), {
1268
+ e.selectedValues = [...t], e.globalFilter.values = il(e), S(e.globalFilter, R(e.id), {
1267
1269
  selectedValues: t
1268
1270
  });
1269
1271
  }
@@ -1278,15 +1280,15 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
1278
1280
  Y.value[e.id] = [...t], at(e);
1279
1281
  }
1280
1282
  function nl() {
1281
- var a, b, V, y;
1282
- const e = S.value, t = f.value, o = h.value || [];
1283
+ var a, b, T, y;
1284
+ const e = g.value, t = f.value, o = v.value || [];
1283
1285
  return JSON.stringify({
1284
1286
  globalFilterId: H.value,
1285
1287
  startDate: (e == null ? void 0 : e.startDate) ?? null,
1286
1288
  endDate: (e == null ? void 0 : e.endDate) ?? null,
1287
1289
  startHour: ((a = t == null ? void 0 : t.start) == null ? void 0 : a.hour) ?? null,
1288
1290
  startMinute: ((b = t == null ? void 0 : t.start) == null ? void 0 : b.minute) ?? null,
1289
- endHour: ((V = t == null ? void 0 : t.end) == null ? void 0 : V.hour) ?? null,
1291
+ endHour: ((T = t == null ? void 0 : t.end) == null ? void 0 : T.hour) ?? null,
1290
1292
  endMinute: ((y = t == null ? void 0 : t.end) == null ? void 0 : y.minute) ?? null,
1291
1293
  locationIds: o
1292
1294
  });
@@ -1295,12 +1297,12 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
1295
1297
  const t = e.selectedValues || [];
1296
1298
  return Ve(t) ? [Fe] : e.keepSelection ? Z(t) : t;
1297
1299
  }
1298
- function me(e) {
1300
+ function pe(e) {
1299
1301
  const t = Z(e.selectedValues || []);
1300
1302
  if (t.length)
1301
1303
  return t.map((a) => String(a));
1302
1304
  const o = Z(
1303
- k(e.globalFilter, R(e.id)).selectedValues
1305
+ A(e.globalFilter, R(e.id)).selectedValues
1304
1306
  );
1305
1307
  return o.length ? o.map((a) => String(a)) : (e.globalFilter.values ?? []).map((a) => String(a));
1306
1308
  }
@@ -1310,7 +1312,7 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
1310
1312
  const t = Z(e.selectedValues || []);
1311
1313
  if (t.length)
1312
1314
  return t;
1313
- const o = k(
1315
+ const o = A(
1314
1316
  e.globalFilter,
1315
1317
  R(e.id)
1316
1318
  ).selectedValues;
@@ -1332,7 +1334,7 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
1332
1334
  });
1333
1335
  }
1334
1336
  function Vt(e) {
1335
- return e.type === fe.String && !Be(e.globalFilter);
1337
+ return e.type === be.String && !Be(e.globalFilter);
1336
1338
  }
1337
1339
  function ot(e) {
1338
1340
  return (e.options || []).map((t) => t.value);
@@ -1349,28 +1351,28 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
1349
1351
  return Z(t).filter((a) => o.has(a));
1350
1352
  }
1351
1353
  function sl(e) {
1352
- const o = k(e.globalFilter, R(e.id)).selectedValues, a = n.isDialogGlobalFilter ? al(e) : [];
1354
+ const o = A(e.globalFilter, R(e.id)).selectedValues, a = n.isDialogGlobalFilter ? al(e) : [];
1353
1355
  if (Ve(e.selectedValues || []))
1354
1356
  return [Fe];
1355
1357
  if (Ve(o || []))
1356
1358
  return [Fe];
1357
- if ((e.options || []).map((V) => V.value).length > 0) {
1358
- const V = ut(
1359
+ if ((e.options || []).map((T) => T.value).length > 0) {
1360
+ const T = ut(
1359
1361
  e,
1360
1362
  a
1361
1363
  );
1362
- if (V.length)
1363
- return V;
1364
+ if (T.length)
1365
+ return T;
1364
1366
  const y = ut(e, o);
1365
1367
  if (y.length)
1366
1368
  return y;
1367
1369
  if (e.keepSelection) {
1368
- const A = ut(
1370
+ const G = ut(
1369
1371
  e,
1370
1372
  Te(e)
1371
1373
  );
1372
- if (A.length)
1373
- return A;
1374
+ if (G.length)
1375
+ return G;
1374
1376
  }
1375
1377
  return [];
1376
1378
  }
@@ -1396,12 +1398,12 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
1396
1398
  return a.length ? a : b ? [Ce] : [];
1397
1399
  if (!it(e))
1398
1400
  return a.length ? a : b ? [Ce] : [];
1399
- const V = new Set(
1401
+ const T = new Set(
1400
1402
  (e.options || []).filter((M) => M.available !== !1).map((M) => M.value)
1401
1403
  ), y = o.filter(
1402
- (M) => V.has(M)
1403
- ), A = De(y);
1404
- return A.length ? A : b ? [Ce] : [];
1404
+ (M) => T.has(M)
1405
+ ), G = De(y);
1406
+ return G.length ? G : b ? [Ce] : [];
1405
1407
  }
1406
1408
  function Ye(e) {
1407
1409
  const t = Y.value[e.id];
@@ -1412,13 +1414,13 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
1412
1414
  e.selectedValues = sl(e), st(e);
1413
1415
  }
1414
1416
  function ul() {
1415
- L.value.forEach((e) => {
1416
- ue.value || Dt(e);
1417
+ z.value.forEach((e) => {
1418
+ ce.value || Dt(e);
1417
1419
  });
1418
1420
  }
1419
1421
  function cl() {
1420
1422
  const e = nl();
1421
- K.value !== e && L.value.forEach((o) => {
1423
+ K.value !== e && z.value.forEach((o) => {
1422
1424
  if (o.keepSelection) {
1423
1425
  ll(o);
1424
1426
  return;
@@ -1426,7 +1428,7 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
1426
1428
  Dt(o);
1427
1429
  }), K.value = e;
1428
1430
  }
1429
- const He = Se(() => n.globalFilters ?? F.value);
1431
+ const He = Se(() => n.globalFilters ?? w.value);
1430
1432
  function dl(e) {
1431
1433
  return {
1432
1434
  schemaName: e.schemaName,
@@ -1444,7 +1446,7 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
1444
1446
  return e.map((t) => dl(t));
1445
1447
  }
1446
1448
  function pl(e, t) {
1447
- const o = `${m(e, H.value)}|${t}`, a = k(e, R(o)), b = a.selectedValues.length ? [...a.selectedValues] : [...e.values ?? []];
1449
+ const o = `${m(e, H.value)}|${t}`, a = A(e, R(o)), b = a.selectedValues.length ? [...a.selectedValues] : [...e.values ?? []];
1448
1450
  return {
1449
1451
  id: o,
1450
1452
  globalFilter: e,
@@ -1458,7 +1460,7 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
1458
1460
  };
1459
1461
  }
1460
1462
  function fl() {
1461
- L.value = He.value.map(
1463
+ z.value = He.value.map(
1462
1464
  (e, t) => pl(e, t)
1463
1465
  );
1464
1466
  }
@@ -1481,17 +1483,17 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
1481
1483
  globalFiltersConfigSignature: bl.value
1482
1484
  }),
1483
1485
  (e, t) => {
1484
- t && t.globalFilterId !== e.globalFilterId && L.value.forEach((o) => {
1486
+ t && t.globalFilterId !== e.globalFilterId && z.value.forEach((o) => {
1485
1487
  o.options = [];
1486
- }), fl(), t && t.globalFiltersConfigSignature !== e.globalFiltersConfigSignature && se(), le.value && Xe();
1488
+ }), fl(), t && t.globalFiltersConfigSignature !== e.globalFiltersConfigSignature && se(), ne.value && Xe();
1487
1489
  },
1488
1490
  { immediate: !0 }
1489
1491
  ), Ie(
1490
1492
  [
1491
- le,
1493
+ ne,
1492
1494
  f,
1493
- S,
1494
- h,
1495
+ g,
1496
+ v,
1495
1497
  () => n.timeRange,
1496
1498
  () => n.dateRange,
1497
1499
  () => n.locationIds
@@ -1503,7 +1505,7 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
1503
1505
  ), Ie(
1504
1506
  [() => p.value],
1505
1507
  async () => {
1506
- L.value.forEach((e) => {
1508
+ z.value.forEach((e) => {
1507
1509
  e.options = [];
1508
1510
  }), await Xe();
1509
1511
  },
@@ -1521,13 +1523,13 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
1521
1523
  );
1522
1524
  function Nt(e, t) {
1523
1525
  var o;
1524
- return t === !0 ? s("report.common.yes") || "Yes" : t === !1 ? s("report.common.no") || "No" : String(t).trim() === "" || t === Ce ? O.value : e.type === fe.Timestamp && e.globalFilter.option !== B.DateTime && e.globalFilter.option !== B.TimeOfDay ? ((o = pt({
1526
+ return t === !0 ? s("report.common.yes") || "Yes" : t === !1 ? s("report.common.no") || "No" : String(t).trim() === "" || t === Ce ? k.value : e.type === be.Timestamp && e.globalFilter.option !== B.DateTime && e.globalFilter.option !== B.TimeOfDay ? ((o = pt({
1525
1527
  dimensionOption: e.globalFilter.option,
1526
1528
  t: s
1527
1529
  }).find((b) => String(b.value) === String(t))) == null ? void 0 : o.label) ?? String(t) : String(t);
1528
1530
  }
1529
1531
  function vl() {
1530
- L.value.forEach((e) => {
1532
+ z.value.forEach((e) => {
1531
1533
  if (!e.options.length) return;
1532
1534
  const t = e.options.map((o) => ({
1533
1535
  ...o,
@@ -1538,62 +1540,62 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
1538
1540
  }
1539
1541
  function Ct(e) {
1540
1542
  var o;
1541
- const t = (o = z.value.find((a) => a.name === e.schemaName)) == null ? void 0 : o.fields.find((a) => a.name === e.name);
1543
+ const t = (o = O.value.find((a) => a.name === e.schemaName)) == null ? void 0 : o.fields.find((a) => a.name === e.name);
1542
1544
  return t == null ? void 0 : t.type;
1543
1545
  }
1544
1546
  function yl(e) {
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;
1552
- const c = (G.dimensions ?? []).some(
1547
+ var G, M;
1548
+ if (!ae.value && !p.value) return [];
1549
+ if (!((G = e.tileIds) != null && G.length)) return [];
1550
+ const t = p.value ? [p.value] : Ue((M = ae.value) == null ? void 0 : M.tiles), { name: o = "", schemaName: a = "" } = e, b = t.filter((x) => {
1551
+ var de, F;
1552
+ const E = (de = x == null ? void 0 : x.widget) == null ? void 0 : de.config;
1553
+ if (!E || (F = e.tileIds) != null && F.length && !e.tileIds.includes(x.id)) return !1;
1554
+ const c = (E.dimensions ?? []).some(
1553
1555
  (_e) => _e.schemaName === a && _e.name === o
1554
- ), q = (G.joinDatasources ?? []).some(
1556
+ ), j = (E.joinDatasources ?? []).some(
1555
1557
  (_e) => (_e.dimensions ?? []).some((ze) => ze.schemaName === a && ze.name === o)
1556
- ), N = (G.schemaNames ?? []).includes(a);
1557
- return c || q || N;
1558
+ ), V = (E.schemaNames ?? []).includes(a);
1559
+ return c || j || V;
1558
1560
  });
1559
1561
  if (!b.length) return [];
1560
- const V = (x, G) => {
1561
- const c = /* @__PURE__ */ new Map(), q = (N) => {
1562
- const ce = `${N.schemaName}:${N.name}:${N.operator}:${N.option ?? ""}:${N.dataFormula ?? ""}`, g = c.get(ce);
1563
- g ? [W.Like, W.NotLike].includes(N.operator) ? g.values = Array.from(/* @__PURE__ */ new Set([...g.values ?? [], ...N.values ?? []])) : c.set(ce, { ...N }) : c.set(ce, { ...N });
1562
+ const T = (x, E) => {
1563
+ const c = /* @__PURE__ */ new Map(), j = (V) => {
1564
+ const de = `${V.schemaName}:${V.name}:${V.operator}:${V.option ?? ""}:${V.dataFormula ?? ""}`, F = c.get(de);
1565
+ F ? [W.Like, W.NotLike].includes(V.operator) ? F.values = Array.from(/* @__PURE__ */ new Set([...F.values ?? [], ...V.values ?? []])) : c.set(de, { ...V }) : c.set(de, { ...V });
1564
1566
  };
1565
- return x.forEach(q), G.forEach(q), Array.from(c.values());
1567
+ return x.forEach(j), E.forEach(j), Array.from(c.values());
1566
1568
  }, y = (x) => {
1567
1569
  var c;
1568
- const G = (c = x.dimensions) == null ? void 0 : c.find(
1569
- (q) => q.schemaName === a && q.name === o
1570
+ const E = (c = x.dimensions) == null ? void 0 : c.find(
1571
+ (j) => j.schemaName === a && j.name === o
1570
1572
  );
1571
1573
  return {
1572
1574
  name: o,
1573
1575
  schemaName: a,
1574
- label: (G == null ? void 0 : G.label) ?? o,
1576
+ label: (E == null ? void 0 : E.label) ?? o,
1575
1577
  hide: !1,
1576
1578
  option: e.option ?? null,
1577
- dataFormula: G == null ? void 0 : G.dataFormula
1579
+ dataFormula: E == null ? void 0 : E.dataFormula
1578
1580
  };
1579
1581
  };
1580
- return b.reduce((x, G) => {
1582
+ return b.reduce((x, E) => {
1581
1583
  var ze, Gt;
1582
- const c = (ze = G == null ? void 0 : G.widget) == null ? void 0 : ze.config;
1584
+ const c = (ze = E == null ? void 0 : E.widget) == null ? void 0 : ze.config;
1583
1585
  if (!c) return x;
1584
- const q = y(c), N = (c.dimensions ?? []).some((Ne) => Ne.schemaName === a) || (c.schemaNames ?? []).includes(a), ce = V(
1586
+ const j = y(c), V = (c.dimensions ?? []).some((Ne) => Ne.schemaName === a) || (c.schemaNames ?? []).includes(a), de = T(
1585
1587
  c.filters ?? [],
1586
1588
  (e.filters ?? []).filter((Ne) => {
1587
1589
  var Re;
1588
1590
  return (Re = c.schemaNames) == null ? void 0 : Re.includes(Ne.schemaName);
1589
1591
  })
1590
- ), g = (Gt = c.joinDatasources) == null ? void 0 : Gt.find(
1592
+ ), F = (Gt = c.joinDatasources) == null ? void 0 : Gt.find(
1591
1593
  (Ne) => (Ne.schemaNames ?? []).includes(a) || (Ne.dimensions ?? []).some((Re) => Re.schemaName === a)
1592
- ), _e = V(
1593
- (g == null ? void 0 : g.filters) ?? [],
1594
+ ), _e = T(
1595
+ (F == null ? void 0 : F.filters) ?? [],
1594
1596
  (e.filters ?? []).filter((Ne) => {
1595
1597
  var Re;
1596
- return (Re = g == null ? void 0 : g.schemaNames) == null ? void 0 : Re.includes(Ne.schemaName);
1598
+ return (Re = F == null ? void 0 : F.schemaNames) == null ? void 0 : Re.includes(Ne.schemaName);
1597
1599
  })
1598
1600
  );
1599
1601
  return x.push({
@@ -1602,13 +1604,13 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
1602
1604
  config: {
1603
1605
  schemaNames: c.schemaNames,
1604
1606
  schemas: c.schemas,
1605
- dimensions: N ? [q] : [],
1606
- filters: ce,
1607
- sorts: N ? [{ name: o, schemaName: a, type: Pt.Asc, aggregation: null, dimensionOption: null }] : [],
1608
- joinDatasources: !N && g ? [
1607
+ dimensions: V ? [j] : [],
1608
+ filters: de,
1609
+ sorts: V ? [{ name: o, schemaName: a, type: Pt.Asc, aggregation: null, dimensionOption: null }] : [],
1610
+ joinDatasources: !V && F ? [
1609
1611
  {
1610
- ...g,
1611
- dimensions: [q],
1612
+ ...F,
1613
+ dimensions: [j],
1612
1614
  sorts: [
1613
1615
  {
1614
1616
  name: o,
@@ -1649,7 +1651,7 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
1649
1651
  return Ee(e).includes(t);
1650
1652
  }
1651
1653
  const _t = Se(
1652
- () => L.value.map((e) => {
1654
+ () => z.value.map((e) => {
1653
1655
  const t = e.options, o = e.search.toLowerCase() ?? "";
1654
1656
  return t.filter(
1655
1657
  (b) => b.label.toLowerCase().includes(o.toLowerCase())
@@ -1657,10 +1659,10 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
1657
1659
  })
1658
1660
  );
1659
1661
  function gl(e) {
1660
- e.visibleCount += 50, ae(e.globalFilter, R(e.id), 50);
1662
+ e.visibleCount += 50, te(e.globalFilter, R(e.id), 50);
1661
1663
  }
1662
1664
  function Fl(e, t) {
1663
- D(e.globalFilter, R(e.id), { search: t });
1665
+ S(e.globalFilter, R(e.id), { search: t });
1664
1666
  }
1665
1667
  function Be(e) {
1666
1668
  var t, o;
@@ -1671,11 +1673,11 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
1671
1673
  return !((t = e.globalFilter.tileIds) != null && t.length);
1672
1674
  }
1673
1675
  function Rt() {
1674
- return (n.isDialogGlobalFilter || !!p.value) && !ue.value;
1676
+ return (n.isDialogGlobalFilter || !!p.value) && !ce.value;
1675
1677
  }
1676
1678
  function It() {
1677
1679
  var e;
1678
- return n.isDialogGlobalFilter && ue.value && ((e = d.value) != null && e.id) ? d.value.id : H.value;
1680
+ return n.isDialogGlobalFilter && ce.value && ((e = d.value) != null && e.id) ? d.value.id : H.value;
1679
1681
  }
1680
1682
  function Ze(e) {
1681
1683
  return String(e ?? "").trim() === "" ? Ce : String(e);
@@ -1712,14 +1714,14 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
1712
1714
  e.selectedValues = o.length ? [...o] : [...e.selectedValues || []];
1713
1715
  } else {
1714
1716
  const o = Z(Te(e));
1715
- e.options = e.options.filter((V) => V.available !== !1);
1716
- const a = new Set(e.options.map((V) => V.value)), b = o.filter(
1717
- (V) => a.has(V)
1717
+ e.options = e.options.filter((T) => T.available !== !1);
1718
+ const a = new Set(e.options.map((T) => T.value)), b = o.filter(
1719
+ (T) => a.has(T)
1718
1720
  );
1719
1721
  e.selectedValues = b;
1720
1722
  }
1721
1723
  const t = Je(e);
1722
- e.selectedValues = [...t], D(e.globalFilter, R(e.id), {
1724
+ e.selectedValues = [...t], S(e.globalFilter, R(e.id), {
1723
1725
  selectedValues: t
1724
1726
  });
1725
1727
  }
@@ -1735,18 +1737,18 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
1735
1737
  return;
1736
1738
  }
1737
1739
  switch (e.type) {
1738
- case fe.String:
1740
+ case be.String:
1739
1741
  try {
1740
1742
  const a = yl(e.globalFilter);
1741
1743
  if (!a.length) {
1742
1744
  e.options = [];
1743
1745
  return;
1744
1746
  }
1745
- const b = Rt(), V = [];
1747
+ const b = Rt(), T = [];
1746
1748
  for (const c of a) {
1747
1749
  if (t.aborted) return;
1748
1750
  if (b) {
1749
- const N = await nn({
1751
+ const V = await nn({
1750
1752
  widget: c,
1751
1753
  signal: t,
1752
1754
  scopedLocationIds: n.locationIds,
@@ -1754,22 +1756,22 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
1754
1756
  scopedDateRange: n.dateRange,
1755
1757
  scopedGlobalFilters: n.globalFilters
1756
1758
  });
1757
- (N == null ? void 0 : N.type) === Mt.Table && V.push(...N.rows.map((ce) => {
1758
- var g;
1759
- return ((g = ce.cells) == null ? void 0 : g[0]) ?? " ";
1759
+ (V == null ? void 0 : V.type) === Mt.Table && T.push(...V.rows.map((de) => {
1760
+ var F;
1761
+ return ((F = de.cells) == null ? void 0 : F[0]) ?? " ";
1760
1762
  }));
1761
1763
  continue;
1762
1764
  }
1763
- const q = te(
1765
+ const j = le(
1764
1766
  Lt(e.globalFilter, It())
1765
1767
  );
1766
- V.push(...q);
1768
+ T.push(...j);
1767
1769
  }
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);
1770
+ const y = Array.from(new Set(T)), G = Te(e), M = e.keepSelection ? Array.from(/* @__PURE__ */ new Set([...y, ...G])) : y, x = new Set(T), E = new Set(y);
1769
1771
  e.options = rt(
1770
1772
  Bl(M, {
1771
- unknownLabel: O.value,
1772
- getAvailable: (c) => e.keepSelection ? x.has(c) : G.has(c)
1773
+ unknownLabel: k.value,
1774
+ getAvailable: (c) => e.keepSelection ? x.has(c) : E.has(c)
1773
1775
  })
1774
1776
  ), Ye(e);
1775
1777
  } catch (a) {
@@ -1778,60 +1780,60 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
1778
1780
  throw a;
1779
1781
  }
1780
1782
  break;
1781
- case fe.Bool: {
1783
+ case be.Bool: {
1782
1784
  e.options = [
1783
1785
  { label: s("report.common.yes"), value: !0 },
1784
1786
  { label: s("report.common.no"), value: !1 }
1785
1787
  ], Ye(e);
1786
1788
  break;
1787
1789
  }
1788
- case fe.Timestamp:
1790
+ case be.Timestamp:
1789
1791
  if (e.globalFilter.option !== B.DateTime && e.globalFilter.option !== B.TimeOfDay) {
1790
1792
  const a = e.globalFilter.option;
1791
1793
  e.options = pt({ dimensionOption: a, t: s }), e.globalFilter.values = e.options.length ? e.options.map((b) => b.value) : ["NULL"];
1792
1794
  }
1793
1795
  Ye(e);
1794
1796
  break;
1795
- case fe.Numeric:
1797
+ case be.Numeric:
1796
1798
  break;
1797
1799
  }
1798
1800
  }
1799
1801
  }
1800
1802
  async function Xe() {
1801
- if (!H.value || !L.value.length) return;
1802
- Q && Q.abort();
1803
+ if (!H.value || !z.value.length) return;
1804
+ U && U.abort();
1803
1805
  const e = new AbortController();
1804
- Q = e, w.value = !0, n.isDialogGlobalFilter && ($.value = !0);
1806
+ U = e, C.value = !0, n.isDialogGlobalFilter && (_.value = !0);
1805
1807
  try {
1806
1808
  await Promise.all(
1807
- L.value.map(
1809
+ z.value.map(
1808
1810
  (t) => Vl(t, e.signal)
1809
1811
  )
1810
1812
  );
1811
1813
  } finally {
1812
- Q === e && (w.value = !1), n.isDialogGlobalFilter && Q === e && ($.value = !1);
1814
+ U === e && (C.value = !1), n.isDialogGlobalFilter && U === e && (_.value = !1);
1813
1815
  }
1814
1816
  }
1815
1817
  function $t(e, t) {
1816
1818
  const o = ot(e), a = Ee(e);
1817
1819
  if (a.includes(t)) {
1818
- const y = a.filter((A) => A !== t);
1820
+ const y = a.filter((G) => G !== t);
1819
1821
  e.selectedValues = y.length > 0 ? y : [Fe];
1820
1822
  } else {
1821
- const y = [...a, t], A = o.length > 0 && o.every((M) => y.includes(M));
1822
- e.selectedValues = A ? [] : y;
1823
+ const y = [...a, t], G = o.length > 0 && o.every((M) => y.includes(M));
1824
+ e.selectedValues = G ? [] : y;
1823
1825
  }
1824
- const V = Je(e);
1825
- e.selectedValues = [...V], D(e.globalFilter, R(e.id), {
1826
- selectedValues: V
1826
+ const T = Je(e);
1827
+ e.selectedValues = [...T], S(e.globalFilter, R(e.id), {
1828
+ selectedValues: T
1827
1829
  });
1828
1830
  }
1829
1831
  function xt(e, t) {
1830
1832
  const o = e.globalFilter, a = t ? [
1831
- I(t.startDate).tz(i.value).startOf("day").utc().toISOString(),
1832
- I(t.endDate).tz(i.value).endOf("day").utc().toISOString()
1833
+ $(t.startDate).tz(u.value).startOf("day").utc().toISOString(),
1834
+ $(t.endDate).tz(u.value).endOf("day").utc().toISOString()
1833
1835
  ] : [];
1834
- t === null ? o.values = [] : o.values = a, e.selectedValues = [...a], e.keepSelection = t !== null, D(e.globalFilter, R(e.id), {
1836
+ t === null ? o.values = [] : o.values = a, e.selectedValues = [...a], e.keepSelection = t !== null, S(e.globalFilter, R(e.id), {
1835
1837
  keepSelection: e.keepSelection,
1836
1838
  selectedValues: [...a]
1837
1839
  }), se(e.globalFilter);
@@ -1844,21 +1846,21 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
1844
1846
  return s("report.section.filter.search");
1845
1847
  }
1846
1848
  function et(e) {
1847
- const t = C(e.globalFilter), o = e.options.length > 0 ? "(0 selected)" : "";
1848
- if (e.type === fe.Timestamp && !Be(e.globalFilter)) {
1849
- const y = me(e), A = y.length === 2;
1849
+ const t = N(e.globalFilter), o = e.options.length > 0 ? "(0 selected)" : "";
1850
+ if (e.type === be.Timestamp && !Be(e.globalFilter)) {
1851
+ const y = pe(e), G = y.length === 2;
1850
1852
  if (e.globalFilter.option === B.DateTime)
1851
- return { preview: A ? `${t} is between ${El({
1853
+ return { preview: G ? `${t} is between ${El({
1852
1854
  startDate: y[0] || null,
1853
1855
  endDate: y[1] || null,
1854
1856
  locale: r.value,
1855
- timezone: i.value
1857
+ timezone: u.value
1856
1858
  })}` : t, suffix: "" };
1857
1859
  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),
1860
+ const M = y[0] ? $(y[0]).tz(u.value) : null, x = y[1] ? $(y[1]).tz(u.value) : null, E = (j) => j && j.isValid() ? { hour: j.hour(), minute: j.minute() } : null;
1861
+ return { preview: G ? `${t} is between ${jt({
1862
+ startTime: E(M),
1863
+ endTime: E(x),
1862
1864
  locale: r.value
1863
1865
  })}` : t, suffix: "" };
1864
1866
  }
@@ -1866,16 +1868,16 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
1866
1868
  const M = pt({
1867
1869
  dimensionOption: e.globalFilter.option,
1868
1870
  t: s
1869
- }), x = new Map(M.map((N) => [String(N.value), N.label])), c = Ee(e).map((N) => x.get(String(N)) ?? String(N)), q = c.map((N) => N.length > 20 ? `${N.slice(0, 20)}…` : N).join(", ");
1871
+ }), x = new Map(M.map((V) => [String(V.value), V.label])), c = Ee(e).map((V) => x.get(String(V)) ?? String(V)), j = c.map((V) => V.length > 20 ? `${V.slice(0, 20)}…` : V).join(", ");
1870
1872
  return c.length ? {
1871
- preview: `${t}: ${q}`,
1873
+ preview: `${t}: ${j}`,
1872
1874
  suffix: `(${c.length} selected)`
1873
1875
  } : { preview: t, suffix: o };
1874
1876
  }
1875
1877
  }
1876
- const b = Ee(e).map((y) => y === !0 ? s("report.common.yes") || "Yes" : y === !1 ? s("report.common.no") || "No" : String(y).trim() === "" ? O.value : String(y)), V = b.map((y) => y.length > 20 ? `${y.slice(0, 20)}…` : y).join(", ");
1878
+ const b = Ee(e).map((y) => y === !0 ? s("report.common.yes") || "Yes" : y === !1 ? s("report.common.no") || "No" : String(y).trim() === "" ? k.value : String(y)), T = b.map((y) => y.length > 20 ? `${y.slice(0, 20)}…` : y).join(", ");
1877
1879
  return b.length ? {
1878
- preview: `${t}: ${V}`,
1880
+ preview: `${t}: ${T}`,
1879
1881
  suffix: `(${b.length} selected)`
1880
1882
  } : { preview: t, suffix: o };
1881
1883
  }
@@ -1883,199 +1885,199 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
1883
1885
  st(e), se(e.globalFilter), document.body.click();
1884
1886
  }
1885
1887
  function kl(e) {
1886
- const t = k(
1888
+ const t = A(
1887
1889
  e.globalFilter,
1888
1890
  R(e.id)
1889
1891
  ).selectedValues;
1890
- e.selectedValues = t.length ? [...t] : [...e.globalFilter.values || []], D(e.globalFilter, R(e.id), {
1892
+ e.selectedValues = t.length ? [...t] : [...e.globalFilter.values || []], S(e.globalFilter, R(e.id), {
1891
1893
  selectedValues: e.selectedValues
1892
1894
  }), document.body.click();
1893
1895
  }
1894
1896
  function _l(e) {
1895
- e.showAdvanced = !e.showAdvanced, D(e.globalFilter, R(e.id), {
1897
+ e.showAdvanced = !e.showAdvanced, S(e.globalFilter, R(e.id), {
1896
1898
  showAdvanced: e.showAdvanced
1897
1899
  });
1898
1900
  }
1899
1901
  function Rl(e) {
1900
- e.keepSelection = !e.keepSelection, u(e.keepSelection), D(e.globalFilter, R(e.id), {
1902
+ e.keepSelection = !e.keepSelection, i(e.keepSelection), S(e.globalFilter, R(e.id), {
1901
1903
  keepSelection: e.keepSelection
1902
1904
  }), Tl(e);
1903
1905
  }
1904
1906
  function Il(e, t) {
1905
- return e ? e.length > t ? `${e.slice(0, t)}…` : e : O.value;
1907
+ return e ? e.length > t ? `${e.slice(0, t)}…` : e : k.value;
1906
1908
  }
1907
1909
  function At(e, t) {
1908
- var b, V, y, A;
1910
+ var b, T, y, G;
1909
1911
  const o = e.globalFilter;
1910
1912
  let a = [];
1911
1913
  if (t === null)
1912
1914
  o.values = [];
1913
1915
  else {
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();
1916
+ const M = $().tz(u.value).set("hour", Number((b = t.start) == null ? void 0 : b.hour)).set("minute", Number((T = t.start) == null ? void 0 : T.minute)).toISOString(), x = $().tz(u.value).set("hour", Number((y = t.end) == null ? void 0 : y.hour)).set("minute", Number((G = t.end) == null ? void 0 : G.minute)).toISOString();
1915
1917
  a = [M, x], o.values = a;
1916
1918
  }
1917
- e.selectedValues = [...a], e.keepSelection = t !== null, D(e.globalFilter, R(e.id), {
1919
+ e.selectedValues = [...a], e.keepSelection = t !== null, S(e.globalFilter, R(e.id), {
1918
1920
  keepSelection: e.keepSelection,
1919
1921
  selectedValues: [...a]
1920
1922
  }), se(e.globalFilter);
1921
1923
  }
1922
1924
  return (e, t) => {
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", {
1925
+ const o = ee("FmCircularProgress"), a = ee("FmTextField"), b = ee("FmMenuItem"), T = ee("FmTooltip"), y = ee("FmIcon"), G = ee("FmMenuDivider"), M = ee("FmSwitch"), x = ee("FmButton"), E = ee("FmMenu");
1926
+ return J(), fe("div", yn, [
1927
+ (J(!0), fe(Le, null, ht(z.value, (c, j) => (J(), fe("div", {
1926
1928
  key: c.id
1927
1929
  }, [
1928
- c.globalFilter.option === T(B).DateTime && !Be(c.globalFilter) ? (J(), we(Gl, {
1930
+ c.globalFilter.option === D(B).DateTime && !Be(c.globalFilter) ? (J(), we(Gl, {
1929
1931
  key: 0,
1930
1932
  "date-range": {
1931
- startDate: me(c)[0],
1932
- endDate: me(c)[1]
1933
+ startDate: pe(c)[0],
1934
+ endDate: pe(c)[1]
1933
1935
  },
1934
1936
  class: "w-full",
1935
1937
  label: et(c).preview,
1936
- removable: me(c).length === 2,
1937
- onUpdate: (N) => xt(c, N),
1938
+ removable: pe(c).length === 2,
1939
+ onUpdate: (V) => xt(c, V),
1938
1940
  onChipClosed: () => xt(c, null)
1939
- }, null, 8, ["date-range", "label", "removable", "onUpdate", "onChipClosed"])) : c.globalFilter.option === T(B).TimeOfDay && !Be(c.globalFilter) ? (J(), we(hn, {
1941
+ }, null, 8, ["date-range", "label", "removable", "onUpdate", "onChipClosed"])) : c.globalFilter.option === D(B).TimeOfDay && !Be(c.globalFilter) ? (J(), we(hn, {
1940
1942
  key: 1,
1941
1943
  "time-range": {
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()
1944
+ start: pe(c)[0] ? {
1945
+ hour: D($)(pe(c)[0]).tz(D(u)).hour(),
1946
+ minute: D($)(pe(c)[0]).tz(D(u)).minute()
1945
1947
  } : null,
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()
1948
+ end: pe(c)[1] ? {
1949
+ hour: D($)(pe(c)[1]).tz(D(u)).hour(),
1950
+ minute: D($)(pe(c)[1]).tz(D(u)).minute()
1949
1951
  } : null
1950
1952
  },
1951
1953
  class: "w-full",
1952
1954
  label: et(c).preview,
1953
- removable: me(c).length === 2,
1954
- onUpdate: (N) => At(c, N),
1955
+ removable: pe(c).length === 2,
1956
+ onUpdate: (V) => At(c, V),
1955
1957
  onChipClosed: () => At(c, null)
1956
- }, null, 8, ["time-range", "label", "removable", "onUpdate", "onChipClosed"])) : (J(), we(G, {
1958
+ }, null, 8, ["time-range", "label", "removable", "onUpdate", "onChipClosed"])) : (J(), we(E, {
1957
1959
  key: 2,
1958
1960
  "close-on-click": !1,
1959
1961
  shift: !0,
1960
- open: T(v)(c.id)
1962
+ open: D(h)(c.id)
1961
1963
  }, {
1962
- "menu-button": ie(() => [
1963
- j("div", Sn, [
1964
+ "menu-button": ue(() => [
1965
+ Q("div", Sn, [
1964
1966
  P(Qt, {
1965
1967
  "left-icon": "filter_alt",
1966
1968
  "trailing-icon": "expand_more",
1967
- loading: ve(c),
1969
+ loading: oe(c),
1968
1970
  label: et(c).preview,
1969
1971
  class: "w-full"
1970
1972
  }, {
1971
- default: ie(() => [
1972
- nt(be(et(c).suffix), 1)
1973
+ default: ue(() => [
1974
+ nt(he(et(c).suffix), 1)
1973
1975
  ]),
1974
1976
  _: 2
1975
1977
  }, 1032, ["loading", "label"])
1976
1978
  ])
1977
1979
  ]),
1978
- "menu-wrapper": ie(({ maxHeight: N, width: ce }) => [
1979
- j("div", {
1980
+ "menu-wrapper": ue(({ maxHeight: V, width: de }) => [
1981
+ Q("div", {
1980
1982
  class: "flex flex-col bg-fm-color-neutral-white p-2 rounded-lg shadow-light-300",
1981
- style: Al({ maxHeight: `${N}px`, width: ce })
1983
+ style: Al({ maxHeight: `${V}px`, width: de })
1982
1984
  }, [
1983
- ve(c) ? (J(), pe("div", gn, [
1985
+ oe(c) ? (J(), fe("div", gn, [
1984
1986
  P(o)
1985
- ])) : c.options.length > 0 ? (J(), pe(Le, { key: 1 }, [
1986
- j("div", Fn, [
1987
+ ])) : c.options.length > 0 ? (J(), fe(Le, { key: 1 }, [
1988
+ Q("div", Fn, [
1987
1989
  P(a, {
1988
1990
  modelValue: c.search,
1989
- "onUpdate:modelValue": [(g) => c.search = g, (g) => Fl(c, g)],
1991
+ "onUpdate:modelValue": [(F) => c.search = F, (F) => Fl(c, F)],
1990
1992
  type: "text",
1991
1993
  "prepend-icon": "search",
1992
1994
  placeholder: Cl(),
1993
1995
  class: "border px-2 pb-8 text-sm mb-1 rounded"
1994
1996
  }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])
1995
1997
  ]),
1996
- j("div", wn, [
1997
- j("div", Dn, [
1998
+ Q("div", wn, [
1999
+ Q("div", Dn, [
1998
2000
  P(b, {
1999
2001
  label: Nl(c),
2000
2002
  "has-checkbox": !0,
2001
2003
  "model-value": Ot(c),
2002
2004
  indeterminate: !0,
2003
- onClick: (g) => Sl(c)
2005
+ onClick: (F) => Sl(c)
2004
2006
  }, null, 8, ["label", "model-value", "onClick"]),
2005
- (J(!0), pe(Le, null, ht(_t.value[q], (g) => (J(), pe(Le, {
2006
- key: g.value
2007
+ (J(!0), fe(Le, null, ht(_t.value[j], (F) => (J(), fe(Le, {
2008
+ key: F.value
2007
2009
  }, [
2008
- g.label && g.label.length > 110 ? (J(), we(V, {
2010
+ F.label && F.label.length > 110 ? (J(), we(T, {
2009
2011
  key: 0,
2010
2012
  placement: "right",
2011
2013
  "hide-arrow": !0,
2012
2014
  "z-index": 2e3
2013
2015
  }, {
2014
- content: ie(() => [
2015
- nt(be(g.label), 1)
2016
+ content: ue(() => [
2017
+ nt(he(F.label), 1)
2016
2018
  ]),
2017
- default: ie(() => [
2018
- j("div", Tn, [
2019
+ default: ue(() => [
2020
+ Q("div", Tn, [
2019
2021
  P(b, {
2020
- label: Il(g.label, 110),
2022
+ label: Il(F.label, 110),
2021
2023
  "has-checkbox": !0,
2022
- "model-value": kt(c, g.value),
2024
+ "model-value": kt(c, F.value),
2023
2025
  class: Et([
2024
2026
  "flex-1 text-left",
2025
- { "bg-gray-200": g.available === !1 }
2027
+ { "bg-gray-200": F.available === !1 }
2026
2028
  ]),
2027
- onClick: () => $t(c, g.value)
2029
+ onClick: () => $t(c, F.value)
2028
2030
  }, null, 8, ["label", "model-value", "class", "onClick"])
2029
2031
  ])
2030
2032
  ]),
2031
2033
  _: 2
2032
2034
  }, 1024)) : (J(), we(b, {
2033
2035
  key: 1,
2034
- label: g.label,
2036
+ label: F.label,
2035
2037
  "has-checkbox": !0,
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)
2038
+ "model-value": kt(c, F.value),
2039
+ class: Et(["flex-1 text-left", { "bg-gray-100": F.available === !1 }]),
2040
+ onClick: () => $t(c, F.value)
2039
2041
  }, null, 8, ["label", "model-value", "class", "onClick"]))
2040
2042
  ], 64))), 128)),
2041
- _t.value[q].length < c.options.length && !c.search ? (J(), we(b, {
2043
+ _t.value[j].length < c.options.length && !c.search ? (J(), we(b, {
2042
2044
  key: 0,
2043
2045
  class: "fm-typo-en-body-md-400 -ml-2",
2044
- label: T(s)("report.section.filter.loadMore"),
2045
- onClick: dt((g) => gl(c), ["stop"]),
2046
+ label: D(s)("report.section.filter.loadMore"),
2047
+ onClick: dt((F) => gl(c), ["stop"]),
2046
2048
  icon: "autorenew"
2047
2049
  }, null, 8, ["label", "onClick"])) : bt("", !0)
2048
2050
  ])
2049
2051
  ]),
2050
- j("div", {
2052
+ Q("div", {
2051
2053
  class: "px-12 py-2 flex items-center gap-2 cursor-pointer hover:bg-fm-color-neutral-50 transition-colors",
2052
- onClick: (g) => _l(c)
2054
+ onClick: (F) => _l(c)
2053
2055
  }, [
2054
2056
  P(y, {
2055
2057
  name: c.showAdvanced ? "keyboard_arrow_up" : "keyboard_arrow_down",
2056
2058
  size: "md",
2057
2059
  class: ""
2058
2060
  }, null, 8, ["name"]),
2059
- j("span", Nn, be(T(s)("report.section.filter.advanced")), 1)
2061
+ Q("span", Nn, he(D(s)("report.section.filter.advanced")), 1)
2060
2062
  ], 8, Vn),
2061
- P(A),
2062
- c.showAdvanced ? (J(), pe("div", Cn, [
2063
- j("div", On, [
2064
- j("div", kn, [
2063
+ P(G),
2064
+ c.showAdvanced ? (J(), fe("div", Cn, [
2065
+ Q("div", On, [
2066
+ Q("div", kn, [
2065
2067
  P(M, {
2066
2068
  "model-value": c.keepSelection,
2067
- label: T(s)("report.section.filter.keepSelection"),
2069
+ label: D(s)("report.section.filter.keepSelection"),
2068
2070
  labelPlacement: "right",
2069
2071
  "onUpdate:modelValue": () => Rl(c)
2070
2072
  }, null, 8, ["model-value", "label", "onUpdate:modelValue"]),
2071
- P(V, {
2073
+ P(T, {
2072
2074
  placement: "top",
2073
2075
  "z-index": 2e3
2074
2076
  }, {
2075
- content: ie(() => [
2076
- j("div", _n, be(T(s)("report.section.filter.keepSelectionTooltip")), 1)
2077
+ content: ue(() => [
2078
+ Q("div", _n, he(D(s)("report.section.filter.keepSelectionTooltip")), 1)
2077
2079
  ]),
2078
- default: ie(() => [
2080
+ default: ue(() => [
2079
2081
  P(y, {
2080
2082
  name: "info",
2081
2083
  size: "md",
@@ -2087,22 +2089,22 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
2087
2089
  ])
2088
2090
  ])
2089
2091
  ])) : bt("", !0),
2090
- j("div", Rn, [
2092
+ Q("div", Rn, [
2091
2093
  P(x, {
2092
2094
  variant: "tertiary",
2093
- label: T(s)("report.common.cancel"),
2094
- onClick: dt((g) => kl(c), ["stop"])
2095
+ label: D(s)("report.common.cancel"),
2096
+ onClick: dt((F) => kl(c), ["stop"])
2095
2097
  }, null, 8, ["label", "onClick"]),
2096
2098
  P(x, {
2097
2099
  color: "primary",
2098
- onClick: dt((g) => Ol(c), ["stop"]),
2099
- label: T(s)("report.common.apply")
2100
+ onClick: dt((F) => Ol(c), ["stop"]),
2101
+ label: D(s)("report.common.apply")
2100
2102
  }, null, 8, ["onClick", "label"])
2101
2103
  ])
2102
2104
  ], 64)) : (J(), we(zl, {
2103
2105
  key: 2,
2104
- title: ct(c) ? T(s)("report.messages.noWidgetsApplied") : void 0,
2105
- "sub-title": ct(c) ? T(s)("report.messages.assignWidgetsToUseThisFilter") : void 0
2106
+ title: ct(c) ? D(s)("report.messages.noWidgetsApplied") : void 0,
2107
+ "sub-title": ct(c) ? D(s)("report.messages.assignWidgetsToUseThisFilter") : void 0
2106
2108
  }, null, 8, ["title", "sub-title"]))
2107
2109
  ], 4)
2108
2110
  ]),