@feedmepos/mf-report 5.28.1 → 5.28.2-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-BQcj7ZgK.js → App-BXAJux6l.js} +37 -37
  2. package/dist/{DateRangeSelect-TQA-9XXm.js → DateRangeSelect-CTRmA328.js} +1 -1
  3. package/dist/{Default.vue_vue_type_script_setup_true_lang-2PkkRpW_.js → Default.vue_vue_type_script_setup_true_lang-BG2jxJPI.js} +1 -1
  4. package/dist/{DynamicWidget.vue_vue_type_script_setup_true_lang-BpZh4FDA.js → DynamicWidget.vue_vue_type_script_setup_true_lang-C_DJ9FoF.js} +5 -5
  5. package/dist/{GlobalFilterSelect.vue_vue_type_script_setup_true_lang-Ddimiuh3.js → GlobalFilterSelect.vue_vue_type_script_setup_true_lang-DYRTdidI.js} +567 -563
  6. package/dist/{InsightView-BG5IeWD1.js → InsightView-DaOWIctS.js} +5 -5
  7. package/dist/{Integration-DUBg0wiX.js → Integration-BpGek4aO.js} +3 -3
  8. package/dist/{Integrations-CerT8IlU.js → Integrations-14q5kVTI.js} +2 -2
  9. package/dist/{Layout-Rr16bUkn.js → Layout-DvcgX7Iv.js} +1 -1
  10. package/dist/{LocationSelect.vue_vue_type_script_setup_true_lang-BEUDpozo.js → LocationSelect.vue_vue_type_script_setup_true_lang-C_CDdD0A.js} +2 -2
  11. package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-Ca-Vlwmm.js → MenuTab.vue_vue_type_script_setup_true_lang-DDzDc9Jf.js} +5 -5
  12. package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-IJ7NUGbC.js → NavigationTab.vue_vue_type_script_setup_true_lang-CQQhOfTk.js} +5 -5
  13. package/dist/{OverviewView-D5q_5KwX.js → OverviewView-COpmh0Kb.js} +4 -4
  14. package/dist/{Report-CDk8BkDF.js → Report-CKz6bZsI.js} +3 -3
  15. package/dist/{ReportCanvasView-BNy6YAj6.js → ReportCanvasView-1XK-YyTM.js} +3 -3
  16. package/dist/{ReportEditor-JAgqGYhA.js → ReportEditor-CCheaXAp.js} +849 -830
  17. package/dist/ReportView-QNB3gvs4.js +333 -0
  18. package/dist/{ReportViewRoute-NmDrsao2.js → ReportViewRoute-Dx_TqR4V.js} +2 -2
  19. package/dist/{Setting-BCBWGuMP.js → Setting-CL9fHaC_.js} +3 -3
  20. package/dist/{Template-B0Z7IA2P.js → Template-CQXJLmIR.js} +3 -3
  21. package/dist/{TileEditor-CUUIrvVX.js → TileEditor-dRlM0Rt9.js} +6 -6
  22. package/dist/{TilePageStack.vue_vue_type_script_setup_true_lang-ByOoDTHP.js → TilePageStack.vue_vue_type_script_setup_true_lang-DsvTr7fz.js} +2 -2
  23. package/dist/{TransitionFade-DVVKEBlH.js → TransitionFade-BmUpvHUW.js} +5 -5
  24. package/dist/{app-CVVEOyIu.js → app-DajOeQ5X.js} +721 -717
  25. package/dist/app.js +1 -1
  26. package/dist/assets/{formatChartData.worker-BeBGCyYW.js → formatChartData.worker-Dx1USoTn.js} +5 -1
  27. package/dist/assets/{processTableData.worker-frTYV0ok.js → processTableData.worker-clNopMr8.js} +5 -1
  28. package/dist/{report-35Rm6TvO.js → report-a3OefqFb.js} +157 -153
  29. package/dist/style.css +1 -1
  30. package/dist/{useRestaurantPermission-BAkRCzWY.js → useRestaurantPermission-xyo71b-g.js} +1 -1
  31. package/package.json +1 -1
  32. package/dist/ReportView-C3LFd5yk.js +0 -329
@@ -1,7 +1,7 @@
1
- import { ref as h1, computed as g1, defineComponent as wt, mergeModels as et, useModel as St, watch as Z1, resolveComponent as e1, createElementBlock as O1, openBlock as j0, createVNode as J0, withCtx as l1, createElementVNode as Y0, createCommentVNode as Et, Fragment as pe, renderList as Tt, createBlock as F1, unref as g0, createTextVNode as tt, withDirectives as la, toDisplayString as f1, vShow as pa, renderSlot as vr, normalizeStyle as ca, normalizeClass as Dr, withModifiers as ft } from "vue";
2
- import { c as Pr, _ as Jr, D as Ma, e as ba } from "./DateRangeSelect-TQA-9XXm.js";
3
- import { $ as _a, Y as da, d as F0, u as G1, c as Fe, a as de, F as V1, X as vt, r as ne, g as za, h as Aa } from "./app-CVVEOyIu.js";
4
- import { b as H0, C as k0, Q as Ve, u as ze, o as oe, p as Te, D as D1, a as Oa, x as fr, W as yr, A as Da, S as $r } from "./report-35Rm6TvO.js";
1
+ import { ref as S1, computed as g1, defineComponent as wt, mergeModels as et, useModel as ht, watch as Z1, resolveComponent as e1, createElementBlock as O1, openBlock as j0, createVNode as J0, withCtx as l1, createElementVNode as Y0, createCommentVNode as Et, Fragment as pe, renderList as Tt, createBlock as F1, unref as g0, createTextVNode as tt, withDirectives as la, toDisplayString as f1, vShow as pa, renderSlot as vr, normalizeStyle as ca, normalizeClass as Dr, withModifiers as ft } from "vue";
2
+ import { c as Pr, _ as Jr, D as Ma, e as ba } from "./DateRangeSelect-CTRmA328.js";
3
+ import { $ as _a, Y as da, d as F0, u as G1, c as Fe, a as de, F as V1, X as vt, r as ne, g as za, h as Aa } from "./app-DajOeQ5X.js";
4
+ import { b as H0, C as k0, Q as Ve, u as ze, o as oe, p as Te, D as D1, a as Oa, x as fr, W as yr, A as Da, S as $r } from "./report-a3OefqFb.js";
5
5
  import { defineStore as Hr, storeToRefs as o1 } from "pinia";
6
6
  import { detectLocale as te } from "@feedmepos/mf-common";
7
7
  import { u as Xr } from "./_plugin-vue_export-helper-C6QDExPN.js";
@@ -272,8 +272,8 @@ var Ur = {};
272
272
  }
273
273
  },
274
274
  Sort__dualPivotQuicksort(r, e, n, a) {
275
- var o, s, u, p, c, b, _, A, D, $, q = l.JSInt_methods._tdivFast$1(n - e + 1, 6), h = e + q, T = n - q, C = l.JSInt_methods._tdivFast$1(e + n, 2), F = C - q, B = C + q, v = i.getInterceptor$asx(r), I = v.$index(r, h), J = v.$index(r, F), H = v.$index(r, C), Y = v.$index(r, B), j = v.$index(r, T);
276
- if (a.call$2(I, J) > 0 && (o = J, J = I, I = o), a.call$2(Y, j) > 0 && (o = j, j = Y, Y = o), a.call$2(I, H) > 0 && (o = H, H = I, I = o), a.call$2(J, H) > 0 && (o = H, H = J, J = o), a.call$2(I, Y) > 0 && (o = Y, Y = I, I = o), a.call$2(H, Y) > 0 && (o = Y, Y = H, H = o), a.call$2(J, j) > 0 && (o = j, j = J, J = o), a.call$2(J, H) > 0 && (o = H, H = J, J = o), a.call$2(Y, j) > 0 && (o = j, j = Y, Y = o), v.$indexSet(r, h, I), v.$indexSet(r, C, H), v.$indexSet(r, T, j), v.$indexSet(r, F, v.$index(r, e)), v.$indexSet(r, B, v.$index(r, n)), s = e + 1, u = n - 1, i.$eq$(a.call$2(J, Y), 0)) {
275
+ var o, s, u, p, c, b, _, A, D, $, q = l.JSInt_methods._tdivFast$1(n - e + 1, 6), S = e + q, T = n - q, C = l.JSInt_methods._tdivFast$1(e + n, 2), F = C - q, B = C + q, v = i.getInterceptor$asx(r), I = v.$index(r, S), J = v.$index(r, F), H = v.$index(r, C), Y = v.$index(r, B), j = v.$index(r, T);
276
+ if (a.call$2(I, J) > 0 && (o = J, J = I, I = o), a.call$2(Y, j) > 0 && (o = j, j = Y, Y = o), a.call$2(I, H) > 0 && (o = H, H = I, I = o), a.call$2(J, H) > 0 && (o = H, H = J, J = o), a.call$2(I, Y) > 0 && (o = Y, Y = I, I = o), a.call$2(H, Y) > 0 && (o = Y, Y = H, H = o), a.call$2(J, j) > 0 && (o = j, j = J, J = o), a.call$2(J, H) > 0 && (o = H, H = J, J = o), a.call$2(Y, j) > 0 && (o = j, j = Y, Y = o), v.$indexSet(r, S, I), v.$indexSet(r, C, H), v.$indexSet(r, T, j), v.$indexSet(r, F, v.$index(r, e)), v.$indexSet(r, B, v.$index(r, n)), s = e + 1, u = n - 1, i.$eq$(a.call$2(J, Y), 0)) {
277
277
  for (p = s; p <= u; ++p)
278
278
  if (c = v.$index(r, p), b = a.call$2(c, J), b !== 0)
279
279
  if (b < 0)
@@ -308,7 +308,7 @@ var Ur = {};
308
308
  D = !1;
309
309
  }
310
310
  if ($ = s - 1, v.$indexSet(r, e, v.$index(r, $)), v.$indexSet(r, $, J), $ = u + 1, v.$indexSet(r, n, v.$index(r, $)), v.$indexSet(r, $, Y), t.Sort__doSort(r, e, s - 2, a), t.Sort__doSort(r, u + 2, n, a), !D)
311
- if (s < h && u > T) {
311
+ if (s < S && u > T) {
312
312
  for (; i.$eq$(a.call$2(v.$index(r, s), J), 0); )
313
313
  ++s;
314
314
  for (; i.$eq$(a.call$2(v.$index(r, u), Y), 0); )
@@ -576,34 +576,34 @@ var Ur = {};
576
576
  return t.Primitives__generalApplyFunction(r, e, n);
577
577
  },
578
578
  Primitives__generalApplyFunction(r, e, n) {
579
- var a, o, s, u, p, c, b, _, A, D, $, q, h = Array.isArray(e) ? e : t.List_List$of(e, !0, z.dynamic), T = h.length, C = r.$requiredArgCount;
579
+ var a, o, s, u, p, c, b, _, A, D, $, q, S = Array.isArray(e) ? e : t.List_List$of(e, !0, z.dynamic), T = S.length, C = r.$requiredArgCount;
580
580
  if (T < C)
581
- return t.Primitives_functionNoSuchMethod(r, h, n);
581
+ return t.Primitives_functionNoSuchMethod(r, S, n);
582
582
  if (a = r.$defaultValues, o = a == null, s = o ? null : a(), u = i.getInterceptor$(r), p = u["call*"], typeof p == "string" && (p = u[p]), o)
583
- return n != null && n.__js_helper$_length !== 0 ? t.Primitives_functionNoSuchMethod(r, h, n) : T === C ? p.apply(r, h) : t.Primitives_functionNoSuchMethod(r, h, n);
583
+ return n != null && n.__js_helper$_length !== 0 ? t.Primitives_functionNoSuchMethod(r, S, n) : T === C ? p.apply(r, S) : t.Primitives_functionNoSuchMethod(r, S, n);
584
584
  if (Array.isArray(s))
585
- return n != null && n.__js_helper$_length !== 0 ? t.Primitives_functionNoSuchMethod(r, h, n) : (c = C + s.length, T > c ? t.Primitives_functionNoSuchMethod(r, h, null) : (T < c && (b = s.slice(T - C), h === e && (h = t.List_List$of(h, !0, z.dynamic)), l.JSArray_methods.addAll$1(h, b)), p.apply(r, h)));
585
+ return n != null && n.__js_helper$_length !== 0 ? t.Primitives_functionNoSuchMethod(r, S, n) : (c = C + s.length, T > c ? t.Primitives_functionNoSuchMethod(r, S, null) : (T < c && (b = s.slice(T - C), S === e && (S = t.List_List$of(S, !0, z.dynamic)), l.JSArray_methods.addAll$1(S, b)), p.apply(r, S)));
586
586
  if (T > C)
587
- return t.Primitives_functionNoSuchMethod(r, h, n);
588
- if (h === e && (h = t.List_List$of(h, !0, z.dynamic)), _ = Object.keys(s), n == null)
587
+ return t.Primitives_functionNoSuchMethod(r, S, n);
588
+ if (S === e && (S = t.List_List$of(S, !0, z.dynamic)), _ = Object.keys(s), n == null)
589
589
  for (o = _.length, A = 0; A < _.length; _.length === o || (0, t.throwConcurrentModificationError)(_), ++A) {
590
590
  if (D = s[_[A]], l.C__Required === D)
591
- return t.Primitives_functionNoSuchMethod(r, h, n);
592
- l.JSArray_methods.add$1(h, D);
591
+ return t.Primitives_functionNoSuchMethod(r, S, n);
592
+ l.JSArray_methods.add$1(S, D);
593
593
  }
594
594
  else {
595
595
  for (o = _.length, $ = 0, A = 0; A < _.length; _.length === o || (0, t.throwConcurrentModificationError)(_), ++A)
596
596
  if (q = _[A], n.containsKey$1(q))
597
- ++$, l.JSArray_methods.add$1(h, n.$index(0, q));
597
+ ++$, l.JSArray_methods.add$1(S, n.$index(0, q));
598
598
  else {
599
599
  if (D = s[q], l.C__Required === D)
600
- return t.Primitives_functionNoSuchMethod(r, h, n);
601
- l.JSArray_methods.add$1(h, D);
600
+ return t.Primitives_functionNoSuchMethod(r, S, n);
601
+ l.JSArray_methods.add$1(S, D);
602
602
  }
603
603
  if ($ !== n.__js_helper$_length)
604
- return t.Primitives_functionNoSuchMethod(r, h, n);
604
+ return t.Primitives_functionNoSuchMethod(r, S, n);
605
605
  }
606
- return p.apply(r, h);
606
+ return p.apply(r, S);
607
607
  },
608
608
  diagnoseIndexError(r, e) {
609
609
  var n, a = "index";
@@ -662,24 +662,24 @@ var Ur = {};
662
662
  return z.Error._is(e) && e.$thrownJsError == null && (e.$thrownJsError = r), e;
663
663
  },
664
664
  _unwrapNonDartException(r) {
665
- var e, n, a, o, s, u, p, c, b, _, A, D, $, q, h = null;
665
+ var e, n, a, o, s, u, p, c, b, _, A, D, $, q, S = null;
666
666
  if (!("message" in r))
667
667
  return r;
668
668
  if (e = r.message, "number" in r && typeof r.number == "number" && (n = r.number, a = n & 65535, (l.JSInt_methods._shrOtherPositive$1(n, 16) & 8191) === 10))
669
669
  switch (a) {
670
670
  case 438:
671
- return t.saveStackTrace(r, t.JsNoSuchMethodError$(t.S(e) + " (Error " + a + ")", h));
671
+ return t.saveStackTrace(r, t.JsNoSuchMethodError$(t.S(e) + " (Error " + a + ")", S));
672
672
  case 445:
673
673
  case 5007:
674
- return o = t.S(e), t.saveStackTrace(r, new t.NullError(o + " (Error " + a + ")", h));
674
+ return o = t.S(e), t.saveStackTrace(r, new t.NullError(o + " (Error " + a + ")", S));
675
675
  }
676
- return r instanceof TypeError ? (s = g.$get$TypeErrorDecoder_noSuchMethodPattern(), u = g.$get$TypeErrorDecoder_notClosurePattern(), p = g.$get$TypeErrorDecoder_nullCallPattern(), c = g.$get$TypeErrorDecoder_nullLiteralCallPattern(), b = g.$get$TypeErrorDecoder_undefinedCallPattern(), _ = g.$get$TypeErrorDecoder_undefinedLiteralCallPattern(), A = g.$get$TypeErrorDecoder_nullPropertyPattern(), g.$get$TypeErrorDecoder_nullLiteralPropertyPattern(), D = g.$get$TypeErrorDecoder_undefinedPropertyPattern(), $ = g.$get$TypeErrorDecoder_undefinedLiteralPropertyPattern(), q = s.matchTypeError$1(e), q != null ? t.saveStackTrace(r, t.JsNoSuchMethodError$(e, q)) : (q = u.matchTypeError$1(e), q != null ? (q.method = "call", t.saveStackTrace(r, t.JsNoSuchMethodError$(e, q))) : (q = p.matchTypeError$1(e), q == null ? (q = c.matchTypeError$1(e), q == null ? (q = b.matchTypeError$1(e), q == null ? (q = _.matchTypeError$1(e), q == null ? (q = A.matchTypeError$1(e), q == null ? (q = c.matchTypeError$1(e), q == null ? (q = D.matchTypeError$1(e), q == null ? (q = $.matchTypeError$1(e), o = q != null) : o = !0) : o = !0) : o = !0) : o = !0) : o = !0) : o = !0) : o = !0, o ? t.saveStackTrace(r, new t.NullError(e, q == null ? h : q.method)) : t.saveStackTrace(r, new t.UnknownJsTypeError(typeof e == "string" ? e : ""))))) : r instanceof RangeError ? typeof e == "string" && e.indexOf("call stack") !== -1 ? new t.StackOverflowError() : (e = function(T) {
676
+ return r instanceof TypeError ? (s = g.$get$TypeErrorDecoder_noSuchMethodPattern(), u = g.$get$TypeErrorDecoder_notClosurePattern(), p = g.$get$TypeErrorDecoder_nullCallPattern(), c = g.$get$TypeErrorDecoder_nullLiteralCallPattern(), b = g.$get$TypeErrorDecoder_undefinedCallPattern(), _ = g.$get$TypeErrorDecoder_undefinedLiteralCallPattern(), A = g.$get$TypeErrorDecoder_nullPropertyPattern(), g.$get$TypeErrorDecoder_nullLiteralPropertyPattern(), D = g.$get$TypeErrorDecoder_undefinedPropertyPattern(), $ = g.$get$TypeErrorDecoder_undefinedLiteralPropertyPattern(), q = s.matchTypeError$1(e), q != null ? t.saveStackTrace(r, t.JsNoSuchMethodError$(e, q)) : (q = u.matchTypeError$1(e), q != null ? (q.method = "call", t.saveStackTrace(r, t.JsNoSuchMethodError$(e, q))) : (q = p.matchTypeError$1(e), q == null ? (q = c.matchTypeError$1(e), q == null ? (q = b.matchTypeError$1(e), q == null ? (q = _.matchTypeError$1(e), q == null ? (q = A.matchTypeError$1(e), q == null ? (q = c.matchTypeError$1(e), q == null ? (q = D.matchTypeError$1(e), q == null ? (q = $.matchTypeError$1(e), o = q != null) : o = !0) : o = !0) : o = !0) : o = !0) : o = !0) : o = !0) : o = !0, o ? t.saveStackTrace(r, new t.NullError(e, q == null ? S : q.method)) : t.saveStackTrace(r, new t.UnknownJsTypeError(typeof e == "string" ? e : ""))))) : r instanceof RangeError ? typeof e == "string" && e.indexOf("call stack") !== -1 ? new t.StackOverflowError() : (e = function(T) {
677
677
  try {
678
678
  return String(T);
679
679
  } catch {
680
680
  }
681
681
  return null;
682
- }(r), t.saveStackTrace(r, new t.ArgumentError(!1, h, h, typeof e == "string" ? e.replace(/^RangeError:\s*/, "") : e))) : typeof InternalError == "function" && r instanceof InternalError && typeof e == "string" && e === "too much recursion" ? new t.StackOverflowError() : r;
682
+ }(r), t.saveStackTrace(r, new t.ArgumentError(!1, S, S, typeof e == "string" ? e.replace(/^RangeError:\s*/, "") : e))) : typeof InternalError == "function" && r instanceof InternalError && typeof e == "string" && e === "too much recursion" ? new t.StackOverflowError() : r;
683
683
  },
684
684
  objectHashCode(r) {
685
685
  return r == null || typeof r != "object" ? i.get$hashCode$(r) : t.Primitives_objectHashCode(r);
@@ -697,13 +697,13 @@ var Ur = {};
697
697
  return e;
698
698
  },
699
699
  Closure_fromTearOff(r) {
700
- var e, n, a, o, s, u, p, c, b, _, A = r.co, D = r.iS, $ = r.iI, q = r.nDA, h = r.aI, T = r.fs, C = r.cs, F = T[0], B = C[0], v = A[F], I = r.fT;
700
+ var e, n, a, o, s, u, p, c, b, _, A = r.co, D = r.iS, $ = r.iI, q = r.nDA, S = r.aI, T = r.fs, C = r.cs, F = T[0], B = C[0], v = A[F], I = r.fT;
701
701
  for (I.toString, e = Object.create(D ? new t.StaticClosure().constructor.prototype : new t.BoundClosure(null, null).constructor.prototype), e.$initialize = e.constructor, D ? n = function() {
702
702
  this.$initialize();
703
703
  } : n = function(H, Y) {
704
704
  this.$initialize(H, Y);
705
705
  }, e.constructor = n, n.prototype = e, e.$_name = F, e.$_target = v, a = !D, a ? o = t.Closure_forwardCallTo(F, v, $, q) : (e.$static_name = F, o = v), e.$signature = t.Closure__computeSignatureFunctionNewRti(I, D, $), e[B] = o, s = o, u = 1; u < T.length; ++u)
706
- p = T[u], typeof p == "string" ? (c = A[p], b = p, p = c) : b = "", _ = C[u], _ != null && (a && (p = t.Closure_forwardCallTo(b, p, $, q)), e[_] = p), u === h && (s = p);
706
+ p = T[u], typeof p == "string" ? (c = A[p], b = p, p = c) : b = "", _ = C[u], _ != null && (a && (p = t.Closure_forwardCallTo(b, p, $, q)), e[_] = p), u === S && (s = p);
707
707
  return e["call*"] = s, e.$requiredArgCount = r.rC, e.$defaultValues = r.dV, n;
708
708
  },
709
709
  Closure__computeSignatureFunctionNewRti(r, e, n) {
@@ -1149,7 +1149,7 @@ var Ur = {};
1149
1149
  return t._Universe_eval(L.typeUniverse, r, !1);
1150
1150
  },
1151
1151
  _substitute(r, e, n, a) {
1152
- var o, s, u, p, c, b, _, A, D, $, q, h, T, C, F, B, v = e._kind;
1152
+ var o, s, u, p, c, b, _, A, D, $, q, S, T, C, F, B, v = e._kind;
1153
1153
  switch (v) {
1154
1154
  case 5:
1155
1155
  case 1:
@@ -1168,7 +1168,7 @@ var Ur = {};
1168
1168
  case 10:
1169
1169
  return c = e._primary, b = t._substitute(r, c, n, a), _ = e._rest, A = t._substituteArray(r, _, n, a), b === c && A === _ ? e : t._Universe__lookupBindingRti(r, b, A);
1170
1170
  case 12:
1171
- return D = e._primary, $ = t._substitute(r, D, n, a), q = e._rest, h = t._substituteFunctionParameters(r, q, n, a), $ === D && h === q ? e : t._Universe__lookupFunctionRti(r, $, h);
1171
+ return D = e._primary, $ = t._substitute(r, D, n, a), q = e._rest, S = t._substituteFunctionParameters(r, q, n, a), $ === D && S === q ? e : t._Universe__lookupFunctionRti(r, $, S);
1172
1172
  case 13:
1173
1173
  return T = e._rest, a += T.length, C = t._substituteArray(r, T, n, a), c = e._primary, b = t._substitute(r, c, n, a), C === T && b === c ? e : t._Universe__lookupGenericFunctionRti(r, b, C, !0);
1174
1174
  case 14:
@@ -1432,7 +1432,7 @@ var Ur = {};
1432
1432
  return s + "})";
1433
1433
  },
1434
1434
  _functionRtiToString(r, e, n) {
1435
- var a, o, s, u, p, c, b, _, A, D, $, q, h, T, C, F, B, v, I, J, H, Y = ", ";
1435
+ var a, o, s, u, p, c, b, _, A, D, $, q, S, T, C, F, B, v, I, J, H, Y = ", ";
1436
1436
  if (n != null) {
1437
1437
  for (a = n.length, e == null ? (e = t._setArrayType([], z.JSArray_String), o = null) : o = e.length, s = e.length, u = a; u > 0; --u)
1438
1438
  e.push("T" + (s + u));
@@ -1441,8 +1441,8 @@ var Ur = {};
1441
1441
  b += ">";
1442
1442
  } else
1443
1443
  b = "", o = null;
1444
- for (p = r._primary, q = r._rest, h = q._requiredPositional, T = h.length, C = q._optionalPositional, F = C.length, B = q._named, v = B.length, I = t._rtiToString(p, e), J = "", H = "", u = 0; u < T; ++u, H = Y)
1445
- J += H + t._rtiToString(h[u], e);
1444
+ for (p = r._primary, q = r._rest, S = q._requiredPositional, T = S.length, C = q._optionalPositional, F = C.length, B = q._named, v = B.length, I = t._rtiToString(p, e), J = "", H = "", u = 0; u < T; ++u, H = Y)
1445
+ J += H + t._rtiToString(S[u], e);
1446
1446
  if (F > 0) {
1447
1447
  for (J += H + "[", H = "", u = 0; u < F; ++u, H = Y)
1448
1448
  J += H + t._rtiToString(C[u], e);
@@ -1573,8 +1573,8 @@ var Ur = {};
1573
1573
  return u ?? (a = new t.Rti(null, null), a._kind = 11, a._primary = e, a._rest = n, a._canonicalRecipe = s, o = t._Universe__installTypeTests(r, a), r.eC.set(s, o), o);
1574
1574
  },
1575
1575
  _Universe__lookupFunctionRti(r, e, n) {
1576
- var a, o, s, u, p, c = e._canonicalRecipe, b = n._requiredPositional, _ = b.length, A = n._optionalPositional, D = A.length, $ = n._named, q = $.length, h = "(" + t._Universe__canonicalRecipeJoin(b);
1577
- return D > 0 && (a = _ > 0 ? "," : "", h += a + "[" + t._Universe__canonicalRecipeJoin(A) + "]"), q > 0 && (a = _ > 0 ? "," : "", h += a + "{" + t._Universe__canonicalRecipeJoinNamed($) + "}"), o = c + (h + ")"), s = r.eC.get(o), s ?? (u = new t.Rti(null, null), u._kind = 12, u._primary = e, u._rest = n, u._canonicalRecipe = o, p = t._Universe__installTypeTests(r, u), r.eC.set(o, p), p);
1576
+ var a, o, s, u, p, c = e._canonicalRecipe, b = n._requiredPositional, _ = b.length, A = n._optionalPositional, D = A.length, $ = n._named, q = $.length, S = "(" + t._Universe__canonicalRecipeJoin(b);
1577
+ return D > 0 && (a = _ > 0 ? "," : "", S += a + "[" + t._Universe__canonicalRecipeJoin(A) + "]"), q > 0 && (a = _ > 0 ? "," : "", S += a + "{" + t._Universe__canonicalRecipeJoinNamed($) + "}"), o = c + (S + ")"), s = r.eC.get(o), s ?? (u = new t.Rti(null, null), u._kind = 12, u._primary = e, u._rest = n, u._canonicalRecipe = o, p = t._Universe__installTypeTests(r, u), r.eC.set(o, p), p);
1578
1578
  },
1579
1579
  _Universe__lookupGenericFunctionRti(r, e, n, a) {
1580
1580
  var o, s = e._canonicalRecipe + ("<" + t._Universe__canonicalRecipeJoin(n) + ">"), u = r.eC.get(s);
@@ -1811,8 +1811,8 @@ var Ur = {};
1811
1811
  return c === 12 ? e === z.JavaScriptFunction ? !0 : s ? !1 : t._isFunctionSubtype(r, e, n, a, o) : u === 9 ? c !== 9 ? !1 : t._isInterfaceSubtype(r, e, n, a, o) : (s = u === 11, s && a === z.Record ? !0 : s && c === 11 ? t._isRecordSubtype(r, e, n, a, o) : !1);
1812
1812
  },
1813
1813
  _isFunctionSubtype(r, e, n, a, o) {
1814
- var s, u, p, c, b, _, A, D, $, q, h, T, C, F, B, v, I, J, H, Y, j, A0;
1815
- if (!t._isSubtype(r, e._primary, n, a._primary, o) || (s = e._rest, u = a._rest, p = s._requiredPositional, c = u._requiredPositional, b = p.length, _ = c.length, b > _) || (A = _ - b, D = s._optionalPositional, $ = u._optionalPositional, q = D.length, h = $.length, b + q < _ + h))
1814
+ var s, u, p, c, b, _, A, D, $, q, S, T, C, F, B, v, I, J, H, Y, j, A0;
1815
+ if (!t._isSubtype(r, e._primary, n, a._primary, o) || (s = e._rest, u = a._rest, p = s._requiredPositional, c = u._requiredPositional, b = p.length, _ = c.length, b > _) || (A = _ - b, D = s._optionalPositional, $ = u._optionalPositional, q = D.length, S = $.length, b + q < _ + S))
1816
1816
  return !1;
1817
1817
  for (T = 0; T < b; ++T)
1818
1818
  if (C = p[T], !t._isSubtype(r, c[T], o, C, n))
@@ -1820,7 +1820,7 @@ var Ur = {};
1820
1820
  for (T = 0; T < A; ++T)
1821
1821
  if (C = D[T], !t._isSubtype(r, c[b + T], o, C, n))
1822
1822
  return !1;
1823
- for (T = 0; T < h; ++T)
1823
+ for (T = 0; T < S; ++T)
1824
1824
  if (C = D[A + T], !t._isSubtype(r, $[T], o, C, n))
1825
1825
  return !1;
1826
1826
  for (F = s._named, B = u._named, v = F.length, I = B.length, J = 0, H = 0; H < I; H += 3)
@@ -2297,11 +2297,11 @@ var Ur = {};
2297
2297
  return new t.DateTime(Date.now(), !1);
2298
2298
  },
2299
2299
  DateTime_parse(r) {
2300
- var e, n, a, o, s, u, p, c, b, _, A, D, $, q, h, T, C = g.$get$DateTime__parseFormat().firstMatch$1(r);
2300
+ var e, n, a, o, s, u, p, c, b, _, A, D, $, q, S, T, C = g.$get$DateTime__parseFormat().firstMatch$1(r);
2301
2301
  if (C != null) {
2302
- if (e = new t.DateTime_parse_parseIntOrZero(), n = C._match, a = n[1], a.toString, o = t.int_parse(a), a = n[2], a.toString, s = t.int_parse(a), a = n[3], a.toString, u = t.int_parse(a), p = e.call$1(n[4]), c = e.call$1(n[5]), b = e.call$1(n[6]), _ = new t.DateTime_parse_parseMilliAndMicroseconds().call$1(n[7]), A = l.JSInt_methods._tdivFast$1(_, 1e3), n[8] != null ? (D = n[9], D != null && ($ = D === "-" ? -1 : 1, a = n[10], a.toString, q = t.int_parse(a), c -= $ * (e.call$1(n[11]) + 60 * q)), h = !0) : h = !1, T = t.Primitives_valueFromDecomposedDate(o, s, u, p, c, b, A + l.JSNumber_methods.round$0(_ % 1e3 / 1e3), h), T == null)
2302
+ if (e = new t.DateTime_parse_parseIntOrZero(), n = C._match, a = n[1], a.toString, o = t.int_parse(a), a = n[2], a.toString, s = t.int_parse(a), a = n[3], a.toString, u = t.int_parse(a), p = e.call$1(n[4]), c = e.call$1(n[5]), b = e.call$1(n[6]), _ = new t.DateTime_parse_parseMilliAndMicroseconds().call$1(n[7]), A = l.JSInt_methods._tdivFast$1(_, 1e3), n[8] != null ? (D = n[9], D != null && ($ = D === "-" ? -1 : 1, a = n[10], a.toString, q = t.int_parse(a), c -= $ * (e.call$1(n[11]) + 60 * q)), S = !0) : S = !1, T = t.Primitives_valueFromDecomposedDate(o, s, u, p, c, b, A + l.JSNumber_methods.round$0(_ % 1e3 / 1e3), S), T == null)
2303
2303
  throw t.wrapException(t.FormatException$("Time out of range", r, null));
2304
- return t.DateTime$_withValue(T, h);
2304
+ return t.DateTime$_withValue(T, S);
2305
2305
  } else
2306
2306
  throw t.wrapException(t.FormatException$("Invalid date format", r, null));
2307
2307
  },
@@ -2507,9 +2507,9 @@ var Ur = {};
2507
2507
  var u = this;
2508
2508
  u.digest = e, u._extended = n, u._hash_sink$_sink = a, u._currentChunk = o, u._lengthInBytes = 0, u._pendingData = s, u._isClosed = !1;
2509
2509
  },
2510
- DateSymbols: function(e, n, a, o, s, u, p, c, b, _, A, D, $, q, h) {
2510
+ DateSymbols: function(e, n, a, o, s, u, p, c, b, _, A, D, $, q, S) {
2511
2511
  var T = this;
2512
- T.NAME = e, T.ERAS = n, T.ERANAMES = a, T.NARROWMONTHS = o, T.STANDALONENARROWMONTHS = s, T.MONTHS = u, T.STANDALONEMONTHS = p, T.SHORTMONTHS = c, T.STANDALONESHORTMONTHS = b, T.WEEKDAYS = _, T.STANDALONEWEEKDAYS = A, T.SHORTWEEKDAYS = D, T.STANDALONESHORTWEEKDAYS = $, T.STANDALONENARROWWEEKDAYS = q, T.AMPMS = h;
2512
+ T.NAME = e, T.ERAS = n, T.ERANAMES = a, T.NARROWMONTHS = o, T.STANDALONENARROWMONTHS = s, T.MONTHS = u, T.STANDALONEMONTHS = p, T.SHORTMONTHS = c, T.STANDALONESHORTMONTHS = b, T.WEEKDAYS = _, T.STANDALONEWEEKDAYS = A, T.SHORTWEEKDAYS = D, T.STANDALONESHORTWEEKDAYS = $, T.STANDALONENARROWWEEKDAYS = q, T.AMPMS = S;
2513
2513
  },
2514
2514
  DateBuilder: function(e, n) {
2515
2515
  var a = this;
@@ -2811,7 +2811,7 @@ var Ur = {};
2811
2811
  `;
2812
2812
  },
2813
2813
  Materialize_getMergeSql(r, e, n, a, o, s, u) {
2814
- var p, c, b, _, A, D, $, q, h, T, C, F, B = "') AND TIMESTAMP('", v = "and target_table.restaurantId in UNNEST(@restaurantIds)", I = r.source;
2814
+ var p, c, b, _, A, D, $, q, S, T, C, F, B = "') AND TIMESTAMP('", v = "and target_table.restaurantId in UNNEST(@restaurantIds)", I = r.source;
2815
2815
  return I.type === l.SOURCE_TYPE_2 ? (p = I.uniqueKey, p.toString, c = i.getInterceptor$asx(p), b = c.get$length(p) === 1 ? "CAST(" + t.S(c.get$first(p)) + " AS STRING)" : "CONCAT(" + c.map$1$1(p, new t.Materialize_getMergeSql_closure(), z.String).join$1(0, ", '_', ") + ")", _ = I.timeColumn, _.toString, A = `WITH docs as
2816
2816
  (
2817
2817
  select * from (SELECT TO_JSON_STRING(src) AS data, ` + b + " AS id, '' AS db_name, " + _ + " AS publish_time, false AS deleted, ROW_NUMBER() OVER (PARTITION BY " + c.join$1(p, ",") + " ORDER BY " + _ + " DESC) as rn \n FROM `" + r.get$fullRawTableName() + "` AS src\n WHERE " + _ + " between TIMESTAMP('" + a + B + n + `')) WHERE rn=1
@@ -2826,7 +2826,7 @@ var Ur = {};
2826
2826
  SELECT
2827
2827
  ` + $ + `
2828
2828
  FROM raw_table ` + I + `
2829
- `, I = _.where$1(c, new t.Materialize_getMergeSql_closure2()), h = new t.MappedIterable(I, new t.Materialize_getMergeSql_closure3(), I.$ti._eval$1("MappedIterable<1,String>")).join$1(0, ","), I = i.getInterceptor$asx(u), I.get$isEmpty(u) ? T = "" : r.mergeFilterType === l.MERGE_FILTER_TYPE_1 ? (C = I.map$1$1(u, t.core_DateTime_parse$closure(), z.DateTime).toList$0(0), l.JSArray_methods.sort$0(C), T = "and target_table.createdAt >= TIMESTAMP('" + l.JSArray_methods.get$first(C).toUtc$0().toIso8601String$0() + "') and target_table.createdAt < TIMESTAMP('" + l.JSArray_methods.get$last(C).toUtc$0().add$1(0, l.Duration_86400000000).toIso8601String$0() + "')") : T = "and TIMESTAMP_TRUNC(target_table.createdAt, DAY, 'UTC') in UNNEST(@updateTimestamps)", I = r.get$fullMaterializedTableName(), p = i.getInterceptor$asx(o), $ = p.get$isNotEmpty(o) ? v : "", c = _.where$1(c, new t.Materialize_getMergeSql_closure4()), c = new t.MappedIterable(c, new t.Materialize_getMergeSql_closure5(), c.$ti._eval$1("MappedIterable<1,String>")).join$1(0, `,
2829
+ `, I = _.where$1(c, new t.Materialize_getMergeSql_closure2()), S = new t.MappedIterable(I, new t.Materialize_getMergeSql_closure3(), I.$ti._eval$1("MappedIterable<1,String>")).join$1(0, ","), I = i.getInterceptor$asx(u), I.get$isEmpty(u) ? T = "" : r.mergeFilterType === l.MERGE_FILTER_TYPE_1 ? (C = I.map$1$1(u, t.core_DateTime_parse$closure(), z.DateTime).toList$0(0), l.JSArray_methods.sort$0(C), T = "and target_table.createdAt >= TIMESTAMP('" + l.JSArray_methods.get$first(C).toUtc$0().toIso8601String$0() + "') and target_table.createdAt < TIMESTAMP('" + l.JSArray_methods.get$last(C).toUtc$0().add$1(0, l.Duration_86400000000).toIso8601String$0() + "')") : T = "and TIMESTAMP_TRUNC(target_table.createdAt, DAY, 'UTC') in UNNEST(@updateTimestamps)", I = r.get$fullMaterializedTableName(), p = i.getInterceptor$asx(o), $ = p.get$isNotEmpty(o) ? v : "", c = _.where$1(c, new t.Materialize_getMergeSql_closure4()), c = new t.MappedIterable(c, new t.Materialize_getMergeSql_closure5(), c.$ti._eval$1("MappedIterable<1,String>")).join$1(0, `,
2830
2830
  `), i.get$isNotEmpty$asx(e) ? (_ = r.get$fullMaterializedTableName(), p = p.get$isNotEmpty(o) ? v : "", F = "DELETE FROM `" + _ + "` target_table WHERE NOT EXISTS (\n select id,docId from (" + q + `) source_table
2831
2831
  WHERE source_table.id = target_table.id
2832
2832
  and source_table.docId = target_table.docId
@@ -2846,20 +2846,20 @@ and target_table.docId in UNNEST(@docIds)
2846
2846
  then update set
2847
2847
  ` + c + `
2848
2848
  when not matched by target
2849
- then insert (` + h + ") values (" + h + `);
2849
+ then insert (` + S + ") values (" + S + `);
2850
2850
 
2851
2851
  ` + F + `
2852
2852
  `;
2853
2853
  },
2854
2854
  Materialize_getMaterializeInfoSql(r, e, n, a, o) {
2855
- var s, u, p, c, b, _, A, D, $, q, h = '") AND TIMESTAMP("', T = "CAST(JSON_VALUE(", C = ", '$._restaurantId') AS STRING) AS restaurantId,", F = r.source, B = F.field, v = B != null;
2856
- return F.type === l.SOURCE_TYPE_2 ? (s = F.uniqueKey, s.toString, u = i.getInterceptor$asx(s), p = u.get$length(s) === 1 ? "CAST(" + t.S(u.get$first(s)) + " AS STRING)" : "CONCAT(" + u.map$1$1(s, new t.Materialize_getMaterializeInfoSql_closure(), z.String).join$1(0, ", '_', ") + ")", c = F.timeColumn, c.toString, b = u.join$1(s, ","), _ = F.dateColumns, _ == null && (_ = t._setArrayType([], z.JSArray_String)), A = c + ' between TIMESTAMP("' + a + h + e + '")', F = i.getInterceptor$asx(_), D = F.get$isNotEmpty(_) ? "SELECT * REPLACE(" + F.map$1$1(_, new t.Materialize_getMaterializeInfoSql_closure0(o), z.String).join$1(0, ", ") + ") FROM `" + r.get$fullRawTableName() + "` WHERE " + A : "SELECT * FROM `" + r.get$fullRawTableName() + "` WHERE " + A, $ = `docs AS (
2855
+ var s, u, p, c, b, _, A, D, $, q, S = '") AND TIMESTAMP("', T = "CAST(JSON_VALUE(", C = ", '$._restaurantId') AS STRING) AS restaurantId,", F = r.source, B = F.field, v = B != null;
2856
+ return F.type === l.SOURCE_TYPE_2 ? (s = F.uniqueKey, s.toString, u = i.getInterceptor$asx(s), p = u.get$length(s) === 1 ? "CAST(" + t.S(u.get$first(s)) + " AS STRING)" : "CONCAT(" + u.map$1$1(s, new t.Materialize_getMaterializeInfoSql_closure(), z.String).join$1(0, ", '_', ") + ")", c = F.timeColumn, c.toString, b = u.join$1(s, ","), _ = F.dateColumns, _ == null && (_ = t._setArrayType([], z.JSArray_String)), A = c + ' between TIMESTAMP("' + a + S + e + '")', F = i.getInterceptor$asx(_), D = F.get$isNotEmpty(_) ? "SELECT * REPLACE(" + F.map$1$1(_, new t.Materialize_getMaterializeInfoSql_closure0(o), z.String).join$1(0, ", ") + ") FROM `" + r.get$fullRawTableName() + "` WHERE " + A : "SELECT * FROM `" + r.get$fullRawTableName() + "` WHERE " + A, $ = `docs AS (
2857
2857
  SELECT * FROM (
2858
2858
  SELECT TO_JSON_STRING(src) AS data, ` + p + " AS id, '' AS db_name, " + c + ` AS publish_time, false AS deleted,
2859
2859
  ROW_NUMBER() OVER (PARTITION BY ` + b + " ORDER BY " + c + ` DESC) as rn
2860
2860
  FROM (` + D + `) AS src
2861
2861
  ) WHERE rn=1
2862
- )`) : $ = "docs AS (\n SELECT data, db_name, publish_time, deleted, id FROM `" + r.get$fullRawTableName() + '`\n WHERE publish_time between TIMESTAMP("' + a + h + e + `")
2862
+ )`) : $ = "docs AS (\n SELECT data, db_name, publish_time, deleted, id FROM `" + r.get$fullRawTableName() + '`\n WHERE publish_time between TIMESTAMP("' + a + S + e + `")
2863
2863
  )`, F = r.getTransformedTableQuery$1$getParentDocs(!0), s = v ? `child_table AS (
2864
2864
  ` + r.getTransformedTableQuery$1$getParentDocs(!1) + `
2865
2865
  ),
@@ -2979,16 +2979,16 @@ select
2979
2979
  Index$(r, e, n, a) {
2980
2980
  return new t.Index(r, e, a, n);
2981
2981
  },
2982
- Schema$(r, e, n, a, o, s, u, p, c, b, _, A, D, $, q, h, T, C, F, B, v, I, J, H, Y, j) {
2983
- return new t.Schema(B, h, s, q, j, Y, D, $, _, A, c, I, J, o, C, T, v, H, a, p, u, b, e, r, n, F);
2982
+ Schema$(r, e, n, a, o, s, u, p, c, b, _, A, D, $, q, S, T, C, F, B, v, I, J, H, Y, j) {
2983
+ return new t.Schema(B, S, s, q, j, Y, D, $, _, A, c, I, J, o, C, T, v, H, a, p, u, b, e, r, n, F);
2984
2984
  },
2985
- Schema_Schema$build(r, e, n, a, o, s, u, p, c, b, _, A, D, $, q, h, T, C, F, B, v, I, J, H, Y, j) {
2985
+ Schema_Schema$build(r, e, n, a, o, s, u, p, c, b, _, A, D, $, q, S, T, C, F, B, v, I, J, H, Y, j) {
2986
2986
  var A0 = s.call$1(B), a0 = q.call$1(B);
2987
- return t.Schema$(r, e, n, a, o, A0, u, p, c ?? 300, b, _, A, D, $, a0, h, T, C, F, B, v, I, J, H, Y, j);
2987
+ return t.Schema$(r, e, n, a, o, A0, u, p, c ?? 300, b, _, A, D, $, a0, S, T, C, F, B, v, I, J, H, Y, j);
2988
2988
  },
2989
2989
  Schema_fromJson(r) {
2990
- var e, n, a, o, s, u, p, c, b, _, A, D, $, q, h, T, C, F, B, v, I = null, J = i.map$1$ax(r.$index(0, "fields"), new t.Schema_fromJson_closure()).toList$0(0), H = r.$index(0, "label"), Y = t.EnumByName_byName(l.List_Mu6, r.$index(0, "name")), j = i.map$1$ax(r.$index(0, "joins"), new t.Schema_fromJson_closure0()).toList$0(0), A0 = t.TopLevelFilters_fromJson(r.$index(0, "topLevelFilters")), a0 = r.$index(0, "source"), Q0 = t.EnumByName_byName(l.List_ytA, a0.$index(0, "type")), K0 = a0.$index(0, "table"), t1 = a0.$index(0, "field"), a1 = a0.$index(0, "dataset"), X0 = z.nullable_List_dynamic, r1 = X0._as(a0.$index(0, "uniqueKey"));
2991
- return r1 = r1 == null ? I : i.cast$1$0$ax(r1, z.String), e = a0.$index(0, "timeColumn"), a0 = X0._as(a0.$index(0, "dateColumns")), a0 = a0 == null ? I : i.cast$1$0$ax(a0, z.String), n = r.$index(0, "rawTableName"), a = r.$index(0, "rawTopicName"), o = r.$index(0, "dynamicRawTable"), s = r.$index(0, "materializedTableName"), u = r.$index(0, "materializedPostgresqlTableName"), p = r.$index(0, "isJoinOnly"), c = r.$index(0, "isMaterializeOnly"), b = r.$index(0, "isContinuousUpdate"), _ = r.$index(0, "interval"), A = r.$index(0, "partition"), D = r.$index(0, "requirePartitionFilter"), D == null && (D = !0), $ = r.$index(0, "clusters"), $ == null && ($ = t._setArrayType([], z.JSArray_String)), q = r.$index(0, "indexes"), q = q == null ? I : i.map$1$ax(q, new t.Schema_fromJson_closure1()), q == null && (q = t._setArrayType([], z.JSArray_Index)), h = r.$index(0, "filters"), h = h == null ? I : i.map$1$ax(h, new t.Schema_fromJson_closure2()).toList$0(0), h == null && (h = t._setArrayType([], z.JSArray_QueryRequestFilter)), T = r.$index(0, "isGlobal"), T == null && (T = !1), C = r.$index(0, "isAiHidden"), C == null && (C = !1), X0 = X0._as(r.$index(0, "aiKeywords")), X0 = X0 == null ? I : i.cast$1$0$ax(X0, z.String), X0 == null && (X0 = t._setArrayType([], z.JSArray_String)), F = r.$index(0, "aiCategory"), B = r.$index(0, "aiPriority"), B == null && (B = 3), v = r.$index(0, "mergeFilterType"), t.Schema$(F, X0, B, $, o, J, h, q, _, C, b, T, p, c, j, H, u, s, t.EnumByName_byName(l.List_EfK, v ?? "dates"), Y, A, n, a, D, new t.Source(Q0, K0, t1, a1, r1, e, a0), A0);
2990
+ var e, n, a, o, s, u, p, c, b, _, A, D, $, q, S, T, C, F, B, v, I = null, J = i.map$1$ax(r.$index(0, "fields"), new t.Schema_fromJson_closure()).toList$0(0), H = r.$index(0, "label"), Y = t.EnumByName_byName(l.List_Mu6, r.$index(0, "name")), j = i.map$1$ax(r.$index(0, "joins"), new t.Schema_fromJson_closure0()).toList$0(0), A0 = t.TopLevelFilters_fromJson(r.$index(0, "topLevelFilters")), a0 = r.$index(0, "source"), Q0 = t.EnumByName_byName(l.List_ytA, a0.$index(0, "type")), K0 = a0.$index(0, "table"), t1 = a0.$index(0, "field"), a1 = a0.$index(0, "dataset"), X0 = z.nullable_List_dynamic, r1 = X0._as(a0.$index(0, "uniqueKey"));
2991
+ return r1 = r1 == null ? I : i.cast$1$0$ax(r1, z.String), e = a0.$index(0, "timeColumn"), a0 = X0._as(a0.$index(0, "dateColumns")), a0 = a0 == null ? I : i.cast$1$0$ax(a0, z.String), n = r.$index(0, "rawTableName"), a = r.$index(0, "rawTopicName"), o = r.$index(0, "dynamicRawTable"), s = r.$index(0, "materializedTableName"), u = r.$index(0, "materializedPostgresqlTableName"), p = r.$index(0, "isJoinOnly"), c = r.$index(0, "isMaterializeOnly"), b = r.$index(0, "isContinuousUpdate"), _ = r.$index(0, "interval"), A = r.$index(0, "partition"), D = r.$index(0, "requirePartitionFilter"), D == null && (D = !0), $ = r.$index(0, "clusters"), $ == null && ($ = t._setArrayType([], z.JSArray_String)), q = r.$index(0, "indexes"), q = q == null ? I : i.map$1$ax(q, new t.Schema_fromJson_closure1()), q == null && (q = t._setArrayType([], z.JSArray_Index)), S = r.$index(0, "filters"), S = S == null ? I : i.map$1$ax(S, new t.Schema_fromJson_closure2()).toList$0(0), S == null && (S = t._setArrayType([], z.JSArray_QueryRequestFilter)), T = r.$index(0, "isGlobal"), T == null && (T = !1), C = r.$index(0, "isAiHidden"), C == null && (C = !1), X0 = X0._as(r.$index(0, "aiKeywords")), X0 = X0 == null ? I : i.cast$1$0$ax(X0, z.String), X0 == null && (X0 = t._setArrayType([], z.JSArray_String)), F = r.$index(0, "aiCategory"), B = r.$index(0, "aiPriority"), B == null && (B = 3), v = r.$index(0, "mergeFilterType"), t.Schema$(F, X0, B, $, o, J, S, q, _, C, b, T, p, c, j, H, u, s, t.EnumByName_byName(l.List_EfK, v ?? "dates"), Y, A, n, a, D, new t.Source(Q0, K0, t1, a1, r1, e, a0), A0);
2992
2992
  },
2993
2993
  Field_Field$numeric(r, e, n, a, o, s, u, p, c) {
2994
2994
  return new t._NumericField(s, u, l.DATA_TYPE_3, e, o, p, n, c, a, !1, r);
@@ -3003,16 +3003,16 @@ select
3003
3003
  return new t._BoolField(s, u, l.DATA_TYPE_2, e, o, p, n, c, a, !1, r);
3004
3004
  },
3005
3005
  Field_fromJson(r) {
3006
- var e, n, a, o, s, u, p, c, b = "name", _ = "schemaName", A = "pointTo", D = "formula", $ = "label", q = "hidden", h = "isAiHidden", T = null, C = "description";
3006
+ var e, n, a, o, s, u, p, c, b = "name", _ = "schemaName", A = "pointTo", D = "formula", $ = "label", q = "hidden", S = "isAiHidden", T = null, C = "description";
3007
3007
  switch (t.EnumByName_byName(l.List_k6a, r.$index(0, "type")).index) {
3008
3008
  case 0:
3009
- return e = r.$index(0, b), n = t.EnumByName_byName(l.List_Mu6, r.$index(0, _)), a = r.$index(0, A), o = r.$index(0, D), s = r.$index(0, $), u = r.$index(0, q), p = r.$index(0, h), c = r.$index(0, "isCompareIgnoreSpaces"), c == null && (c = !1), t.Field_Field$string(r.$index(0, C), o, u, p, c, s, e, a, T, n);
3009
+ return e = r.$index(0, b), n = t.EnumByName_byName(l.List_Mu6, r.$index(0, _)), a = r.$index(0, A), o = r.$index(0, D), s = r.$index(0, $), u = r.$index(0, q), p = r.$index(0, S), c = r.$index(0, "isCompareIgnoreSpaces"), c == null && (c = !1), t.Field_Field$string(r.$index(0, C), o, u, p, c, s, e, a, T, n);
3010
3010
  case 2:
3011
- return e = r.$index(0, b), n = t.EnumByName_byName(l.List_Mu6, r.$index(0, _)), a = r.$index(0, A), o = r.$index(0, D), s = r.$index(0, $), u = r.$index(0, q), p = r.$index(0, h), t.Field_Field$bool(r.$index(0, C), o, u, p, s, e, a, T, n);
3011
+ return e = r.$index(0, b), n = t.EnumByName_byName(l.List_Mu6, r.$index(0, _)), a = r.$index(0, A), o = r.$index(0, D), s = r.$index(0, $), u = r.$index(0, q), p = r.$index(0, S), t.Field_Field$bool(r.$index(0, C), o, u, p, s, e, a, T, n);
3012
3012
  case 3:
3013
- return e = r.$index(0, b), n = t.EnumByName_byName(l.List_Mu6, r.$index(0, _)), a = r.$index(0, A), o = r.$index(0, D), s = r.$index(0, $), u = r.$index(0, q), p = r.$index(0, h), t.Field_Field$numeric(r.$index(0, C), o, u, p, s, e, a, T, n);
3013
+ return e = r.$index(0, b), n = t.EnumByName_byName(l.List_Mu6, r.$index(0, _)), a = r.$index(0, A), o = r.$index(0, D), s = r.$index(0, $), u = r.$index(0, q), p = r.$index(0, S), t.Field_Field$numeric(r.$index(0, C), o, u, p, s, e, a, T, n);
3014
3014
  case 1:
3015
- return e = r.$index(0, b), n = t.EnumByName_byName(l.List_Mu6, r.$index(0, _)), a = r.$index(0, A), o = r.$index(0, D), s = r.$index(0, $), u = r.$index(0, q), p = r.$index(0, h), t.Field_Field$timestamp(r.$index(0, C), o, u, p, s, e, a, T, n);
3015
+ return e = r.$index(0, b), n = t.EnumByName_byName(l.List_Mu6, r.$index(0, _)), a = r.$index(0, A), o = r.$index(0, D), s = r.$index(0, $), u = r.$index(0, q), p = r.$index(0, S), t.Field_Field$timestamp(r.$index(0, C), o, u, p, s, e, a, T, n);
3016
3016
  }
3017
3017
  },
3018
3018
  Join_fromJson(r) {
@@ -3115,9 +3115,9 @@ select
3115
3115
  var s = this;
3116
3116
  s.column = e, s.customName = n, s.indexMethod = a, s.include = o;
3117
3117
  },
3118
- Schema: function(e, n, a, o, s, u, p, c, b, _, A, D, $, q, h, T, C, F, B, v, I, J, H, Y, j, A0) {
3118
+ Schema: function(e, n, a, o, s, u, p, c, b, _, A, D, $, q, S, T, C, F, B, v, I, J, H, Y, j, A0) {
3119
3119
  var a0 = this;
3120
- a0.name = e, a0.label = n, a0.fields = a, a0.joins = o, a0.topLevelFilters = s, a0.source = u, a0.isJoinOnly = p, a0.isMaterializeOnly = c, a0.isContinuousUpdate = b, a0.isGlobal = _, a0.interval = A, a0.rawTableName = D, a0.rawTopicName = $, a0.dynamicRawTable = q, a0.materializedTableName = h, a0.materializedPostgresqlTableName = T, a0.partition = C, a0.requirePartitionFilter = F, a0.clusters = B, a0.indexes = v, a0._materializeTablePrefix = a0._rawTablePrefix = "", a0.filters = I, a0.isAiHidden = J, a0.aiKeywords = H, a0.aiCategory = Y, a0.aiPriority = j, a0.mergeFilterType = A0;
3120
+ a0.name = e, a0.label = n, a0.fields = a, a0.joins = o, a0.topLevelFilters = s, a0.source = u, a0.isJoinOnly = p, a0.isMaterializeOnly = c, a0.isContinuousUpdate = b, a0.isGlobal = _, a0.interval = A, a0.rawTableName = D, a0.rawTopicName = $, a0.dynamicRawTable = q, a0.materializedTableName = S, a0.materializedPostgresqlTableName = T, a0.partition = C, a0.requirePartitionFilter = F, a0.clusters = B, a0.indexes = v, a0._materializeTablePrefix = a0._rawTablePrefix = "", a0.filters = I, a0.isAiHidden = J, a0.aiKeywords = H, a0.aiCategory = Y, a0.aiPriority = j, a0.mergeFilterType = A0;
3121
3121
  },
3122
3122
  Schema_visualizationSchema_closure: function() {
3123
3123
  },
@@ -3315,9 +3315,9 @@ select
3315
3315
  var s = this;
3316
3316
  s.field = e, s.id = n, s.alias = a, s.formula = o;
3317
3317
  },
3318
- QueryRequest: function(e, n, a, o, s, u, p, c, b, _, A, D, $, q, h) {
3318
+ QueryRequest: function(e, n, a, o, s, u, p, c, b, _, A, D, $, q, S) {
3319
3319
  var T = this;
3320
- T.schemaName = e, T.dimensions = n, T.metrics = a, T.joins = o, T.timeDimension = s, T.restaurantIds = u, T.warehouseIds = p, T.businessIds = c, T.filters = b, T.sorts = _, T.limit = A, T.timezone = D, T.rollup = $, T.rollupPosition = q, T.blendConditions = h;
3320
+ T.schemaName = e, T.dimensions = n, T.metrics = a, T.joins = o, T.timeDimension = s, T.restaurantIds = u, T.warehouseIds = p, T.businessIds = c, T.filters = b, T.sorts = _, T.limit = A, T.timezone = D, T.rollup = $, T.rollupPosition = q, T.blendConditions = S;
3321
3321
  },
3322
3322
  QueryRequest_closure: function() {
3323
3323
  },
@@ -4133,9 +4133,9 @@ select
4133
4133
  DataSourceRowColumnConfig_columnIds_closure1: function(e) {
4134
4134
  this.$this = e;
4135
4135
  },
4136
- TableDatasourceConfigModel: function(e, n, a, o, s, u, p, c, b, _, A, D, $, q, h, T, C, F, B, v) {
4136
+ TableDatasourceConfigModel: function(e, n, a, o, s, u, p, c, b, _, A, D, $, q, S, T, C, F, B, v) {
4137
4137
  var I = this;
4138
- I.columnsWidth = e, I.isDrillable = n, I.showGrandTotal = a, I.rollup = o, I.rollupPosition = s, I.rowsPerPage = u, I.isBlend = p, I._table_datasource_config_model$_drillDimension = c, I._rowIds = b, I._columnIds = _, I._table_datasource_config_model$_joinDatasources = A, I.schemaNames = D, I.dimensions = $, I.metrics = q, I.filters = h, I.sorts = T, I.limit = C, I.isComparable = F, I.periodType = B, I.timezone = v;
4138
+ I.columnsWidth = e, I.isDrillable = n, I.showGrandTotal = a, I.rollup = o, I.rollupPosition = s, I.rowsPerPage = u, I.isBlend = p, I._table_datasource_config_model$_drillDimension = c, I._rowIds = b, I._columnIds = _, I._table_datasource_config_model$_joinDatasources = A, I.schemaNames = D, I.dimensions = $, I.metrics = q, I.filters = S, I.sorts = T, I.limit = C, I.isComparable = F, I.periodType = B, I.timezone = v;
4139
4139
  },
4140
4140
  TableDatasourceConfigModel_drilledDimensions_closure: function(e) {
4141
4141
  this.$this = e;
@@ -4197,9 +4197,9 @@ select
4197
4197
  var e, n, a, o, s, u = "breakdownDimension", p = t.BaseDatasourceConfigModel_BaseDatasourceConfigModel$fromJson(r), c = r.$index(0, u) != null ? t.QueryRequestDimension_fromJson(r.$index(0, u)) : null, b = r.$index(0, "isTransposed");
4198
4198
  return b == null && (b = !1), e = r.$index(0, "showLabel"), e == null && (e = !1), n = r.$index(0, "drillDimension"), a = r.$index(0, "isBlend"), a == null && (a = !1), o = r.$index(0, "joinDatasources"), o == null && (o = []), o = t.List_List$from(o, z.Map_String_dynamic), s = t._arrayInstanceType(o)._eval$1("MappedListIterable<1,JoinDatasourceConfig>"), s = t.List_List$of(new t.MappedListIterable(o, new t.BaseXYDatasourceConfigModel_BaseXYDatasourceConfigModel$fromJson_closure(p), s), !0, s._eval$1("ListIterable.E")), new t.BaseXYDatasourceConfigModel(e, n, c, b, a, r.$index(0, "isCumulative"), s, p.schemaNames, p.dimensions, p.metrics, p.filters, p.sorts, p.limit, p.isComparable, p.periodType, p.timezone);
4199
4199
  },
4200
- BaseXYDatasourceConfigModel: function(e, n, a, o, s, u, p, c, b, _, A, D, $, q, h, T) {
4200
+ BaseXYDatasourceConfigModel: function(e, n, a, o, s, u, p, c, b, _, A, D, $, q, S, T) {
4201
4201
  var C = this;
4202
- C.showLabel = e, C._xy_datasource_config_model$_drillDimension = n, C.breakdownDimension = a, C.isTransposed = o, C.isBlend = s, C.isCumulative = u, C._joinDatasources = p, C.schemaNames = c, C.dimensions = b, C.metrics = _, C.filters = A, C.sorts = D, C.limit = $, C.isComparable = q, C.periodType = h, C.timezone = T;
4202
+ C.showLabel = e, C._xy_datasource_config_model$_drillDimension = n, C.breakdownDimension = a, C.isTransposed = o, C.isBlend = s, C.isCumulative = u, C._joinDatasources = p, C.schemaNames = c, C.dimensions = b, C.metrics = _, C.filters = A, C.sorts = D, C.limit = $, C.isComparable = q, C.periodType = S, C.timezone = T;
4203
4203
  },
4204
4204
  BaseXYDatasourceConfigModel_joinDatasources_closure: function(e) {
4205
4205
  this.$this = e;
@@ -4354,8 +4354,8 @@ select
4354
4354
  return a = t.ListExtensions_mapIndexed(i.map$1$ax(a.$index(n, "requests"), new t.sqlResponsesToQueryResponses_closure()).toList$0(0), new t.sqlResponsesToQueryResponses_closure0(a.$index(n, "sqlResponses"), o), z.QueryRequest, z.QueryResponse), e = t.List_List$of(a, !0, a.$ti._eval$1("Iterable.E")), a = t._arrayInstanceType(e)._eval$1("MappedListIterable<1,Map<String,@>>"), f.JSON.parse(l.C_JsonCodec.encode$2$toEncodable(t.List_List$of(new t.MappedListIterable(e, new t.sqlResponsesToQueryResponses_closure1(), a), !0, a._eval$1("ListIterable.E")), null));
4355
4355
  },
4356
4356
  getQueryRequests(r) {
4357
- var e, n, a, o, s, u, p, c, b, _, A = l.C_JsonCodec.decode$2$reviver(f.JSON.stringify(r), null), D = i.getInterceptor$asx(A), $ = t.ReportWidgetModel_fromJson(D.$index(A, "widget")), q = i.map$1$ax(D.$index(A, "dateRange"), new t.getQueryRequests_closure()).toList$0(0), h = D.$index(A, "compareDateRange");
4358
- return h == null && (h = []), e = i.map$1$ax(h, new t.getQueryRequests_closure0()).toList$0(0), n = i.map$1$ax(D.$index(A, "timeRange"), new t.getQueryRequests_closure1()).toList$0(0), a = i.map$1$ax(D.$index(A, "restaurantIds"), new t.getQueryRequests_closure2()).toList$0(0), o = i.map$1$ax(D.$index(A, "warehouseIds"), new t.getQueryRequests_closure3()).toList$0(0), s = i.map$1$ax(D.$index(A, "businessIds"), new t.getQueryRequests_closure4()).toList$0(0), u = D.$index(A, "timezone"), D = $.config, h = t._arrayInstanceType(q)._eval$1("MappedListIterable<1,@>"), p = t._arrayInstanceType(n)._eval$1("MappedListIterable<1,@>"), c = p._eval$1("ListIterable.E"), b = D.toRequests$1(new t.GlobalFilterModel(t.List_List$of(new t.MappedListIterable(q, new t.getQueryRequests_closure5(), h), !0, h._eval$1("ListIterable.E")), t.List_List$of(new t.MappedListIterable(n, new t.getQueryRequests_closure6(), p), !0, c), a, o, s, !1, u)), e.length !== 0 && D.isComparable === !0 && (h = t.List_List$of(b, !0, z.QueryRequest), _ = t._arrayInstanceType(e)._eval$1("MappedListIterable<1,@>"), l.JSArray_methods.addAll$1(h, D.toRequests$1(new t.GlobalFilterModel(t.List_List$of(new t.MappedListIterable(e, new t.getQueryRequests_closure7(), _), !0, _._eval$1("ListIterable.E")), t.List_List$of(new t.MappedListIterable(n, new t.getQueryRequests_closure8(), p), !0, c), a, o, s, !0, u))), b = h), D = t._arrayInstanceType(b)._eval$1("MappedListIterable<1,Map<String,@>>"), f.JSON.parse(l.C_JsonCodec.encode$2$toEncodable(t.List_List$of(new t.MappedListIterable(b, new t.getQueryRequests_closure9(), D), !0, D._eval$1("ListIterable.E")), null));
4357
+ var e, n, a, o, s, u, p, c, b, _, A = l.C_JsonCodec.decode$2$reviver(f.JSON.stringify(r), null), D = i.getInterceptor$asx(A), $ = t.ReportWidgetModel_fromJson(D.$index(A, "widget")), q = i.map$1$ax(D.$index(A, "dateRange"), new t.getQueryRequests_closure()).toList$0(0), S = D.$index(A, "compareDateRange");
4358
+ return S == null && (S = []), e = i.map$1$ax(S, new t.getQueryRequests_closure0()).toList$0(0), n = i.map$1$ax(D.$index(A, "timeRange"), new t.getQueryRequests_closure1()).toList$0(0), a = i.map$1$ax(D.$index(A, "restaurantIds"), new t.getQueryRequests_closure2()).toList$0(0), o = i.map$1$ax(D.$index(A, "warehouseIds"), new t.getQueryRequests_closure3()).toList$0(0), s = i.map$1$ax(D.$index(A, "businessIds"), new t.getQueryRequests_closure4()).toList$0(0), u = D.$index(A, "timezone"), D = $.config, S = t._arrayInstanceType(q)._eval$1("MappedListIterable<1,@>"), p = t._arrayInstanceType(n)._eval$1("MappedListIterable<1,@>"), c = p._eval$1("ListIterable.E"), b = D.toRequests$1(new t.GlobalFilterModel(t.List_List$of(new t.MappedListIterable(q, new t.getQueryRequests_closure5(), S), !0, S._eval$1("ListIterable.E")), t.List_List$of(new t.MappedListIterable(n, new t.getQueryRequests_closure6(), p), !0, c), a, o, s, !1, u)), e.length !== 0 && D.isComparable === !0 && (S = t.List_List$of(b, !0, z.QueryRequest), _ = t._arrayInstanceType(e)._eval$1("MappedListIterable<1,@>"), l.JSArray_methods.addAll$1(S, D.toRequests$1(new t.GlobalFilterModel(t.List_List$of(new t.MappedListIterable(e, new t.getQueryRequests_closure7(), _), !0, _._eval$1("ListIterable.E")), t.List_List$of(new t.MappedListIterable(n, new t.getQueryRequests_closure8(), p), !0, c), a, o, s, !0, u))), b = S), D = t._arrayInstanceType(b)._eval$1("MappedListIterable<1,Map<String,@>>"), f.JSON.parse(l.C_JsonCodec.encode$2$toEncodable(t.List_List$of(new t.MappedListIterable(b, new t.getQueryRequests_closure9(), D), !0, D._eval$1("ListIterable.E")), null));
4359
4359
  },
4360
4360
  getCreateMaterializedTableSql(r) {
4361
4361
  var e = l.C_JsonCodec.decode$2$reviver(f.JSON.stringify(r), null), n = i.getInterceptor$asx(e), a = t._getQueryEngine(n.$index(e, "bigQuery"));
@@ -4701,11 +4701,11 @@ select
4701
4701
  }, z.Location);
4702
4702
  },
4703
4703
  _deserializeLocation(r) {
4704
- var e, n, a, o, s = t.NativeByteData_NativeByteData$view(r.buffer, r.byteOffset, r.byteLength), u = s.getUint32(0, !1), p = s.getUint32(4, !1), c = s.getUint32(8, !1), b = s.getUint32(12, !1), _ = s.getUint32(16, !1), A = s.getUint32(20, !1), D = s.getUint32(24, !1), $ = s.getUint32(28, !1), q = l.C_AsciiCodec.decode$1(t.NativeUint8List_NativeUint8List$view(r.buffer, r.byteOffset + u, p)), h = t._setArrayType([], z.JSArray_String), T = t._setArrayType([], z.JSArray_TimeZone), C = z.JSArray_int, F = t._setArrayType([], C), B = t._setArrayType([], C), v = c + b;
4704
+ var e, n, a, o, s = t.NativeByteData_NativeByteData$view(r.buffer, r.byteOffset, r.byteLength), u = s.getUint32(0, !1), p = s.getUint32(4, !1), c = s.getUint32(8, !1), b = s.getUint32(12, !1), _ = s.getUint32(16, !1), A = s.getUint32(20, !1), D = s.getUint32(24, !1), $ = s.getUint32(28, !1), q = l.C_AsciiCodec.decode$1(t.NativeUint8List_NativeUint8List$view(r.buffer, r.byteOffset + u, p)), S = t._setArrayType([], z.JSArray_String), T = t._setArrayType([], z.JSArray_TimeZone), C = z.JSArray_int, F = t._setArrayType([], C), B = t._setArrayType([], C), v = c + b;
4705
4705
  for (e = c, n = e; e < v; ++e)
4706
- r[e] === 0 && (C = r.buffer, a = r.byteOffset, C = new Uint8Array(C, a + n, e - n), h.push(l.C_AsciiCodec.decode$1(C)), n = e + 1);
4706
+ r[e] === 0 && (C = r.buffer, a = r.byteOffset, C = new Uint8Array(C, a + n, e - n), S.push(l.C_AsciiCodec.decode$1(C)), n = e + 1);
4707
4707
  for (n = _, e = 0; e < A; ++e, n = o)
4708
- o = n + 8, T.push(new t.TimeZone(s.getInt32(n, !1) * 1e3, s.getUint8(n + 4) === 1, h[s.getUint8(n + 5)]));
4708
+ o = n + 8, T.push(new t.TimeZone(s.getInt32(n, !1) * 1e3, s.getUint8(n + 4) === 1, S[s.getUint8(n + 5)]));
4709
4709
  for (n = D, e = 0; e < $; ++e)
4710
4710
  F.push(l.JSNumber_methods.toInt$0(s.getFloat64(n, !1)) * 1e3), n += 8;
4711
4711
  for (e = 0; e < $; ++e)
@@ -6997,21 +6997,21 @@ Arguments: [` + c + "]";
6997
6997
  }
6998
6998
  }, t.FormatException.prototype = {
6999
6999
  toString$0(r) {
7000
- var e, n, a, o, s, u, p, c, b, _, A, D = this.message, $ = D !== "" ? "FormatException: " + D : "FormatException", q = this.offset, h = this.source;
7001
- if (typeof h == "string") {
7002
- if (q != null ? e = q < 0 || q > h.length : e = !1, e && (q = null), q == null)
7003
- return h.length > 78 && (h = l.JSString_methods.substring$2(h, 0, 75) + "..."), $ + `
7004
- ` + h;
7000
+ var e, n, a, o, s, u, p, c, b, _, A, D = this.message, $ = D !== "" ? "FormatException: " + D : "FormatException", q = this.offset, S = this.source;
7001
+ if (typeof S == "string") {
7002
+ if (q != null ? e = q < 0 || q > S.length : e = !1, e && (q = null), q == null)
7003
+ return S.length > 78 && (S = l.JSString_methods.substring$2(S, 0, 75) + "..."), $ + `
7004
+ ` + S;
7005
7005
  for (n = 1, a = 0, o = !1, s = 0; s < q; ++s)
7006
- u = l.JSString_methods._codeUnitAt$1(h, s), u === 10 ? ((a !== s || !o) && ++n, a = s + 1, o = !1) : u === 13 && (++n, a = s + 1, o = !0);
7006
+ u = l.JSString_methods._codeUnitAt$1(S, s), u === 10 ? ((a !== s || !o) && ++n, a = s + 1, o = !1) : u === 13 && (++n, a = s + 1, o = !0);
7007
7007
  for ($ = n > 1 ? $ + (" (at line " + n + ", character " + (q - a + 1) + `)
7008
7008
  `) : $ + (" (at character " + (q + 1) + `)
7009
- `), p = h.length, s = q; s < p; ++s)
7010
- if (u = l.JSString_methods.codeUnitAt$1(h, s), u === 10 || u === 13) {
7009
+ `), p = S.length, s = q; s < p; ++s)
7010
+ if (u = l.JSString_methods.codeUnitAt$1(S, s), u === 10 || u === 13) {
7011
7011
  p = s;
7012
7012
  break;
7013
7013
  }
7014
- return p - a > 78 ? q - a < 75 ? (c = a + 75, b = a, _ = "", A = "...") : (p - q < 75 ? (b = p - 75, c = p, A = "") : (b = q - 36, c = q + 36, A = "..."), _ = "...") : (c = p, b = a, _ = "", A = ""), $ + _ + l.JSString_methods.substring$2(h, b, c) + A + `
7014
+ return p - a > 78 ? q - a < 75 ? (c = a + 75, b = a, _ = "", A = "...") : (p - q < 75 ? (b = p - 75, c = p, A = "") : (b = q - 36, c = q + 36, A = "..."), _ = "...") : (c = p, b = a, _ = "", A = ""), $ + _ + l.JSString_methods.substring$2(S, b, c) + A + `
7015
7015
  ` + l.JSString_methods.$mul(" ", q - b + _.length) + `^
7016
7016
  `;
7017
7017
  } else
@@ -8318,8 +8318,8 @@ Arguments: [` + c + "]";
8318
8318
  return l.JSArray_methods.fold$2(this._getJoins$1(r), "", new t.QueryRequest__getSqlJoins_closure(this, r));
8319
8319
  },
8320
8320
  _getRollupSelect$4$rollupIndex$schemaLibrary$sourceTableName$useFormula(r, e, n, a) {
8321
- var o, s, u, p, c, b, _, A, D = this, $ = r != null, q = D.dimensions, h = z.QueryRequestDimension, T = t.ListExtensions_whereIndexed(q, new t.QueryRequest__getRollupSelect_closure(r), h), C = T.get$isEmpty(T) ? "" : "PARTITION BY " + t.MappedIterable_MappedIterable(T, new t.QueryRequest__getRollupSelect_closure0(), T.$ti._eval$1("Iterable.E"), z.String).join$1(0, ","), F = z.String;
8322
- return h = t.List_List$of(t.ListExtensions_mapIndexed(q, new t.QueryRequest__getRollupSelect_closure1(D, e, r, C), h, F), !0, F), o = D.metrics, s = z.JSArray_String, l.JSArray_methods.addAll$1(h, t.IterableExtension_foldIndexed(o, t._setArrayType([], s), new t.QueryRequest__getRollupSelect_closure2(D, e, r, C))), u = D.sorts, p = t._arrayInstanceType(u), c = p._eval$1("MappedListIterable<1,String>"), l.JSArray_methods.addAll$1(h, new t.MappedListIterable(u, new t.QueryRequest__getRollupSelect_closure3(D, e, r, C), c)), h = l.JSArray_methods.join$1(h, ","), b = i.getInterceptor$ax(q), _ = t.List_List$of(b.map$1$1(q, new t.QueryRequest__getRollupSelect_closure4(a), F), !0, F), l.JSArray_methods.addAll$1(_, i.fold$2$ax(o, t._setArrayType([], s), new t.QueryRequest__getRollupSelect_closure5(a, $))), l.JSArray_methods.addAll$1(_, new t.MappedListIterable(u, new t.QueryRequest__getRollupSelect_closure6(), c)), _.push("" + $ + " _is_rollup"), A = "select " + l.JSArray_methods.join$1(_, ",") + " from (" + ("select " + h + " from " + n) + ")", b.get$isNotEmpty(q) && (q = t.List_List$of(b.map$1$1(q, new t.QueryRequest__getRollupSelect_closure7(), F), !0, F), h = p._eval$1("MappedIterable<1,String>"), l.JSArray_methods.addAll$1(q, t.List_List$of(new t.MappedIterable(new t.WhereIterable(u, new t.QueryRequest__getRollupSelect_closure8(), p._eval$1("WhereIterable<1>")), new t.QueryRequest__getRollupSelect_closure9(), h), !0, h._eval$1("Iterable.E"))), A = A + " group by " + l.JSArray_methods.join$1(q, ",")), A;
8321
+ var o, s, u, p, c, b, _, A, D = this, $ = r != null, q = D.dimensions, S = z.QueryRequestDimension, T = t.ListExtensions_whereIndexed(q, new t.QueryRequest__getRollupSelect_closure(r), S), C = T.get$isEmpty(T) ? "" : "PARTITION BY " + t.MappedIterable_MappedIterable(T, new t.QueryRequest__getRollupSelect_closure0(), T.$ti._eval$1("Iterable.E"), z.String).join$1(0, ","), F = z.String;
8322
+ return S = t.List_List$of(t.ListExtensions_mapIndexed(q, new t.QueryRequest__getRollupSelect_closure1(D, e, r, C), S, F), !0, F), o = D.metrics, s = z.JSArray_String, l.JSArray_methods.addAll$1(S, t.IterableExtension_foldIndexed(o, t._setArrayType([], s), new t.QueryRequest__getRollupSelect_closure2(D, e, r, C))), u = D.sorts, p = t._arrayInstanceType(u), c = p._eval$1("MappedListIterable<1,String>"), l.JSArray_methods.addAll$1(S, new t.MappedListIterable(u, new t.QueryRequest__getRollupSelect_closure3(D, e, r, C), c)), S = l.JSArray_methods.join$1(S, ","), b = i.getInterceptor$ax(q), _ = t.List_List$of(b.map$1$1(q, new t.QueryRequest__getRollupSelect_closure4(a), F), !0, F), l.JSArray_methods.addAll$1(_, i.fold$2$ax(o, t._setArrayType([], s), new t.QueryRequest__getRollupSelect_closure5(a, $))), l.JSArray_methods.addAll$1(_, new t.MappedListIterable(u, new t.QueryRequest__getRollupSelect_closure6(), c)), _.push("" + $ + " _is_rollup"), A = "select " + l.JSArray_methods.join$1(_, ",") + " from (" + ("select " + S + " from " + n) + ")", b.get$isNotEmpty(q) && (q = t.List_List$of(b.map$1$1(q, new t.QueryRequest__getRollupSelect_closure7(), F), !0, F), S = p._eval$1("MappedIterable<1,String>"), l.JSArray_methods.addAll$1(q, t.List_List$of(new t.MappedIterable(new t.WhereIterable(u, new t.QueryRequest__getRollupSelect_closure8(), p._eval$1("WhereIterable<1>")), new t.QueryRequest__getRollupSelect_closure9(), S), !0, S._eval$1("Iterable.E"))), A = A + " group by " + l.JSArray_methods.join$1(q, ",")), A;
8323
8323
  },
8324
8324
  get$_hasFillGap() {
8325
8325
  var r = i.where$1$ax(this.dimensions, new t.QueryRequest__hasFillGap_closure());
@@ -8349,10 +8349,10 @@ Arguments: [` + c + "]";
8349
8349
  return new t._GetSourceTableResponse("SELECT " + new t.MappedListIterable(a, new t.QueryRequest__getSourceTable_closure0(A), o).join$1(0, ",") + " FROM (" + ("SELECT " + s + " FROM `" + u + "` AS " + p + c + b + _) + ")", A);
8350
8350
  },
8351
8351
  _getFillGapTable$2$schemaLibrary$sourceTableName(r, e) {
8352
- var n, a, o, s, u, p, c, b, _, A, D, $ = this, q = " CROSS JOIN ", h = z.JSArray_String, T = t._setArrayType([], h), C = $._getTimeFilters$1(r.getSchema$1($.schemaName));
8352
+ var n, a, o, s, u, p, c, b, _, A, D, $ = this, q = " CROSS JOIN ", S = z.JSArray_String, T = t._setArrayType([], S), C = $._getTimeFilters$1(r.getSchema$1($.schemaName));
8353
8353
  for (n = $.dimensions, a = i.getInterceptor$ax(n), o = a.get$iterator(n), s = $.timeDimension != null, u = $.timezone; o.moveNext$0(); )
8354
8354
  p = o.get$current(), c = p.getColumn$1(r), p.fillGap && c.dataType === l.DATA_TYPE_1 && s && (b = p.generateTimestampArraySql$2$timeFilters$timezone(C, u), c = p.option, c.toString, T.push("SELECT " + t.DimensionOptionExtension_formatSql(c, t.uniqueAlias(p.get$alias()), u) + " " + t.uniqueAlias(p.get$alias()) + " FROM " + t.S(b) + " " + t.uniqueAlias(p.get$alias()) + " GROUP BY " + t.uniqueAlias(p.get$alias())));
8355
- return o = z.String, _ = t.ListExtensions_mapIndexed(T, new t.QueryRequest__getFillGapTable_closure(), o, o).join$1(0, q), o = t.List_List$of(a.map$1$1(n, new t.QueryRequest__getFillGapTable_closure0(), o), !0, o), l.JSArray_methods.addAll$1(o, i.fold$2$ax($.metrics, t._setArrayType([], h), new t.QueryRequest__getFillGapTable_closure1($, r))), s = $.sorts, l.JSArray_methods.addAll$1(o, new t.MappedListIterable(s, new t.QueryRequest__getFillGapTable_closure2($, r), t._arrayInstanceType(s)._eval$1("MappedListIterable<1,String>"))), A = t._setArrayType(["SELECT " + l.JSArray_methods.join$1(o, ",") + " FROM (" + _ + ")"], h), D = a.where$1(n, new t.QueryRequest__getFillGapTable_closure3()), D.get$isEmpty(D) || A.push("(SELECT DISTINCT " + new t.MappedIterable(D, new t.QueryRequest__getFillGapTable_closure4(), D.$ti._eval$1("MappedIterable<1,String>")).join$1(0, ",") + " FROM " + e + ")"), l.JSArray_methods.join$1(A, q);
8355
+ return o = z.String, _ = t.ListExtensions_mapIndexed(T, new t.QueryRequest__getFillGapTable_closure(), o, o).join$1(0, q), o = t.List_List$of(a.map$1$1(n, new t.QueryRequest__getFillGapTable_closure0(), o), !0, o), l.JSArray_methods.addAll$1(o, i.fold$2$ax($.metrics, t._setArrayType([], S), new t.QueryRequest__getFillGapTable_closure1($, r))), s = $.sorts, l.JSArray_methods.addAll$1(o, new t.MappedListIterable(s, new t.QueryRequest__getFillGapTable_closure2($, r), t._arrayInstanceType(s)._eval$1("MappedListIterable<1,String>"))), A = t._setArrayType(["SELECT " + l.JSArray_methods.join$1(o, ",") + " FROM (" + _ + ")"], S), D = a.where$1(n, new t.QueryRequest__getFillGapTable_closure3()), D.get$isEmpty(D) || A.push("(SELECT DISTINCT " + new t.MappedIterable(D, new t.QueryRequest__getFillGapTable_closure4(), D.$ti._eval$1("MappedIterable<1,String>")).join$1(0, ",") + " FROM " + e + ")"), l.JSArray_methods.join$1(A, q);
8356
8356
  },
8357
8357
  _getFullTable$3$fillGapTableName$schemaLibrary$sourceTableName(r, e, n) {
8358
8358
  var a, o = "fill_gap_table", s = this.dimensions, u = z.String, p = i.getInterceptor$ax(s), c = t.List_List$of(p.map$1$1(s, new t.QueryRequest__getFullTable_closure(o, n), u), !0, u);
@@ -8987,8 +8987,8 @@ Arguments: [` + c + "]";
8987
8987
  $signature: 1
8988
8988
  }, t.billSchema_closure.prototype = {
8989
8989
  call$1(r) {
8990
- var e = null, n = "seqNumber", a = "deliveryName", o = "isRefund", s = "isPickup", u = "isInHouseDelivery", p = "isDelivery", c = "completedAt", b = "integratedOrderId", _ = "itemCount", A = "taxTotal", D = "discountTotal", $ = "grossTotal", q = "rounding", h = "takeawayPrice", T = "thirdPartyExtraCharge", C = "deliveryFee", F = "nettTotal", B = "deliveryFeeWithTax", v = "deliveryFeeWithoutTax", I = "otherChargeWithTax", J = "otherChargeWithoutTax", H = "discountInclusiveTaxTotal", Y = "customerName", j = "customerPhone", A0 = "customerAddress", a0 = "customerRemark", Q0 = "fulfillmentAt";
8991
- return t._setArrayType([t.Field_Field$string(e, e, !1, !1, !1, "ID", "id", "_id", e, r), t.Field_Field$string(e, e, !0, !1, !1, e, "docId", "_docId", e, r), t.Field_Field$timestamp(e, e, !0, !1, e, "publishedAt", "_publishedAt", e, r), t.Field_Field$timestamp(e, e, !1, !1, "Time", "createdAt", "_createdAt", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Restaurant ID", "restaurantId", "_restaurantId", e, r), t.Field_Field$string("Values: COMPLETED, DRAFT, VOIDED, REFUNDED", e, !1, !1, !1, "Status", "status", "status", e, r), t.Field_Field$string(e, e, !1, !1, !1, "No.", n, n, e, r), t.Field_Field$string("Dine-in table name/identifier", e, !1, !1, !1, "Table", "slot", "slot", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Delivery", a, a, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Refund ID", "refundFrom", "refundedFrom", e, r), t.Field_Field$bool(e, e, !1, !1, "Refund", o, o, e, r), t.Field_Field$string(e, e, !0, !1, !1, e, "refundApprovedById", "refund.approvedBy.id", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Refund approver", "refundApprovedByName", "refund.approvedBy.name", e, r), t.Field_Field$string(e, e, !0, !1, !1, e, "refundedById", "refund.by.id", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Refund user", "refundedByName", "refund.by.name", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Refund reason", "refundReason", "refund.reason", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Member ID", "memberId", "membership.id", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Member user ID", "memberUserId", "membership.userId", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Member name", "memberUserName", "membership.name", e, r), t.Field_Field$string(e, e, !0, !1, !1, "Member phone", "memberPhoneNumber", "membership.phoneNumber", e, r), t.Field_Field$timestamp(e, e, !1, !1, "Member birthday", "memberBirthday", "membership.birthday", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Remark", "remark", "remark", e, r), t.Field_Field$string("Order source. Values: FEEDME (POS), GRABFOOD, FOODPANDA, SHOPEEFOOD, etc.", e, !1, !1, !1, "Source", "source", "source", R.x28case_x28, r), t.Field_Field$string("Order type. Values: DINE IN, TAKEAWAY, PICKUP, DELIVERY, DRIVE THRU", e, !1, !1, !1, "Type", "type", "type", "(case when upper(@type) in ('PICKUP','DELIVERY','DRIVE THRU','KIOSK') then upper(@type) when @is_takeaway is true then 'TAKEAWAY' else upper(@type) end)", r), t.Field_Field$bool(e, e, !0, !1, "Pickup", s, s, e, r), t.Field_Field$bool(e, e, !0, !1, "Is in house delivery", u, u, e, r), t.Field_Field$bool(e, e, !0, !1, "Is other delivery", p, p, e, r), t.Field_Field$bool(e, e, !0, !1, "Is takeaway", "isTakeaway", "is.takeaway", e, r), t.Field_Field$timestamp(e, e, !1, !1, "Closed at", c, c, e, r), t.Field_Field$string(e, e, !0, !1, !1, "Inclusive SST", "sstInclusive", "nettTaxes.SST.inclusive", e, r), t.Field_Field$string(e, e, !0, !1, !1, "SST before discount", "sstBeforeDiscount", "nettTaxes.SST.beforeDiscount", e, r), t.Field_Field$string(e, e, !0, !1, !1, "Inclusive SC", "serviceChargeInclusive", "nettTaxes.SERVICE_CHARGE.inclusive", e, r), t.Field_Field$string(e, e, !0, !1, !1, "SC before discount", "serviceChargeBeforeDiscount", "nettTaxes.SERVICE_CHARGE.beforeDiscount", e, r), t.Field_Field$numeric("Number of guests. Negated for refund, 0 for voided", "IF(@status = 'VOIDED', 0, IFNULL(@pax,0)*IF(@isRefund, -1, 1))", !1, !1, "Pax", "pax", "person", "(CASE WHEN @status = 'VOIDED' THEN 0 ELSE (COALESCE(@pax,0)*CASE WHEN @is_refund THEN -1 ELSE 1 END) END)", r), t.Field_Field$string(e, e, !1, !1, !1, "Integrated order ID", b, b, e, r), t.Field_Field$numeric(e, R.IFNULLi, !0, !1, "Item count", _, _, R.COALESi, r), t.Field_Field$numeric(e, R.IFNULLtax, !1, !1, "Tax", A, A, R.COALEStax_, r), t.Field_Field$numeric(e, R.IFNULLdiT, !1, !1, "Discount", D, D, R.COALESdit, r), t.Field_Field$numeric(e, R.IFNULLg, !1, !1, "Item gross", $, $, R.COALESg, r), t.Field_Field$numeric(e, "(IFNULL(@nettTotal,0)-IFNULL(@rounding,0)-IFNULL(@discountTotal,0)-IFNULL(@thirdPartyExtraCharge,0)-IFNULL(@deliveryFee,0)-IFNULL(@taxTotal,IFNULL(@sstTotal, 0))-IFNULL(@serviceChargeTotal,0))*IF(@isRefund, -1, 1)", !1, !1, "Bill gross", "billGrossTotal", e, "(COALESCE(@nett_total,0)-COALESCE(@rounding,0)-COALESCE(@discount_total,0)-COALESCE(@third_party_extra_charge,0)-COALESCE(@delivery_fee,0)-COALESCE(@tax_total,@sst_total,0)-COALESCE(@service_charge_total,0))*CASE WHEN @is_refund THEN -1 ELSE 1 END", r), t.Field_Field$numeric(e, "IFNULL(@rounding,0)*IF(@isRefund, -1, 1)", !1, !1, "Rounding", q, q, R.COALESr, r), t.Field_Field$numeric(e, "IFNULL(@sstTotal,0)*IF(@isRefund, -1, 1)", !0, !1, "SST", "sstTotal", "nettTaxes.SST.total", R.COALESss, r), t.Field_Field$string(e, e, !0, !1, !1, "SST %", "sstPercentage", "nettTaxes.SST.percentage", e, r), t.Field_Field$numeric(e, R.IFNULLs, !1, !1, "SC", "serviceChargeTotal", "nettTaxes.SERVICE_CHARGE.total", R.COALESse, r), t.Field_Field$string(e, e, !0, !1, !1, "SC %", "serviceChargePercentage", "nettTaxes.SERVICE_CHARGE.percentage", e, r), t.Field_Field$numeric(e, R.x28IFNULo, !1, !1, "Other charge", "otherChargeTotal", "nettTaxes.OTHER_CHARGE.total", R.x28COALEo, r), t.Field_Field$numeric(e, R.x28IFNULgx2d, !1, !1, "Gross w/ takeaway", "subTotalWithoutTakeaway", e, R.x28COALEgx2d, r), t.Field_Field$numeric(e, R.IFNULLtak, !1, !1, "Takeaway", h, h, R.COALEStak, r), t.Field_Field$numeric(e, R.IFNULLth, !1, !1, "Extra charge", T, T, R.COALESth, r), t.Field_Field$numeric(e, R.IFNULLde_, !1, !1, "Delivery fee", C, C, R.COALESdex2c, r), t.Field_Field$numeric(e, R.IFNULLn, !1, !1, "Nett", F, F, R.COALESn, r), t.Field_Field$numeric(e, "(IFNULL(@grossTotal,0)+(case when @deliveryFeeWithTax>0 then IFNULL(@deliveryFee,0) else 0 end)+IFNULL(case when @otherChargeWithTax>0 then IFNULL(@thirdPartyExtraCharge,0) else 0 end)+IFNULL(@discountTotal,0))*IF(@isRefund, -1, 1)", !1, !1, "Item gross before charges", "grossBeforeCharges", e, "(COALESCE(@gross_total,0)+(case when @delivery_fee_with_tax>0 then COALESCE(@delivery_fee,0) else 0 end)+(case when @other_charge_with_tax>0 then COALESCE(@third_party_extra_charge,0) else 0 end)+COALESCE(@discount_total,0))*CASE WHEN @is_refund THEN -1 ELSE 1 END", r), t.Field_Field$numeric(e, "(IFNULL(@nettTotal,0)-IFNULL(@rounding,0)-(case when @otherChargeWithTax>0 then 0 else IFNULL(@thirdPartyExtraCharge,0) end)-(case when @deliveryFeeWithTax>0 then 0 else IFNULL(@deliveryFee,0) end)-IFNULL(@taxTotal,IFNULL(@sstTotal,0))-IFNULL(@serviceChargeTotal,0))*IF(@isRefund, -1, 1)", !1, !1, "Bill gross before charges", "billGrossBeforeCharges", e, "(COALESCE(@nett_total,0)-COALESCE(@rounding,0)-(case when @other_charge_with_tax>0 then 0 else COALESCE(@third_party_extra_charge,0) end)-(case when @delivery_fee_with_tax>0 then 0 else COALESCE(@delivery_fee,0) end)-COALESCE(@tax_total,@sst_total,0)-COALESCE(@service_charge_total,0))*CASE WHEN @is_refund THEN -1 ELSE 1 END", r), t.Field_Field$numeric(e, e, !1, !1, "Member Recency", "recency", e, R.MIN_EX, r), t.Field_Field$numeric(e, e, !1, !1, "Member frequency", "frequency", e, R.COUNT_, r), t.Field_Field$numeric(e, e, !1, !1, "Member monetary", "monetary", e, R.SUM__n, r), t.Field_Field$numeric(e, R.IFNULLdeWT, !1, !1, "Delivery fee with tax", B, B, R.COALESdex5f_, r), t.Field_Field$numeric(e, R.IFNULLdeWo, !1, !1, "Delivery fee without tax", v, v, R.COALESdex5fo, r), t.Field_Field$numeric(e, R.IFNULLoT, !1, !1, "Other charge with tax", I, I, R.COALESo_, r), t.Field_Field$numeric(e, R.IFNULLoo, !1, !1, "Other charge without tax", J, J, R.COALESoo, r), t.Field_Field$numeric("Bill duration in seconds from creation to completion", e, !1, !1, "Duration", "duration", e, R.EXTRAC, r), t.Field_Field$string(e, e, !1, !1, !1, "Restaurant", "restaurantName", e, R.x28selecn, r), t.Field_Field$numeric(e, e, !1, !1, "Labour hour", "labourHour", e, R.x28selecS, r), t.Field_Field$string(e, e, !1, !1, !1, "Payments", "payments", e, R.x28selecstn, r), t.Field_Field$string(e, e, !1, !1, !1, "Items", "items", e, "(select string_agg(CONCAT(flatten_items.quantity,'x ',ARRAY_TO_STRING(ARRAY[CASE WHEN flatten_items.code='' THEN NULL ELSE flatten_items.code END, flatten_items.name], ' ')), ',') from flatten_items where flatten_items.bill_id=@id and flatten_items.restaurant_id=@restaurant_id and flatten_items.layer=0 and flatten_items.status!='VOIDED')", r), t.Field_Field$string(e, e, !1, !1, !1, "Discount reasons", "discountReasons", e, R.x28selecsta, r), t.Field_Field$numeric(e, R.IFNULLdiI, !1, !1, "Discount inc tax", H, H, R.COALESdii, r), t.Field_Field$string(e, e, !1, !1, !1, "Payment Summaries", "paymentSummaries", e, "(select string_agg(distinct CONCAT(name, CASE WHEN card_type is not null THEN CONCAT(' (',UPPER(card_type), ')') WHEN payment_gateway_issuer is not null THEN CONCAT(' (',payment_gateway_issuer, ')') ELSE '' END), ',') from payments where payments.bill_id=@id and payments.restaurant_id=@restaurant_id)", r), t.Field_Field$numeric(e, e, !1, !1, "Is new member", "isNewMember", e, "(CASE WHEN EXISTS (SELECT 1 FROM members WHERE members.id=@member_id AND members.created_at::date = @created_at::date) THEN 1 ELSE 0 END)", r), t.Field_Field$numeric(e, e, !1, !1, "Is 30 days recency", "is30DaysRecency", e, "(CASE WHEN EXISTS (SELECT 1 FROM bills WHERE bills.member_id = @member_id AND bills.status != 'VOIDED' AND bills.restaurant_id = @restaurant_id AND bills.created_at >= @created_at - INTERVAL '30 days' AND bills.created_at < @created_at) THEN 1 ELSE 0 END)", r), t.Field_Field$numeric(e, e, !1, !1, "Is 60 days recency", "is60DaysRecency", e, "(CASE WHEN EXISTS (SELECT 1 FROM bills WHERE bills.member_id = @member_id AND bills.status != 'VOIDED' AND bills.restaurant_id = @restaurant_id AND bills.created_at >= @created_at - INTERVAL '60 days' AND bills.created_at < @created_at) THEN 1 ELSE 0 END)", r), t.Field_Field$numeric("Bill count flag: 1 normal, -1 refund, 0 voided. Use SUM to count bills", "IF(@status = 'VOIDED', 0, IF(@isRefund, -1, 1))", !1, !1, "Table count", "tableCount", e, "(CASE WHEN @status = 'VOIDED' THEN 0 ELSE (CASE WHEN @is_refund THEN -1 ELSE 1 END) END)", r), t.Field_Field$numeric("Member count flag: 1 normal, -1 refund, 0 voided. Use SUM to count members", "IF((@status = 'VOIDED' OR @memberId is null), 0, IF(@isRefund, -1, 1))", !1, !1, "Member count", "memberCount", e, "(CASE WHEN (@status = 'VOIDED' OR @member_id is null) THEN 0 ELSE (CASE WHEN @is_refund THEN -1 ELSE 1 END) END)", r), t.Field_Field$string("Customer name from pickup / in-house delivery / delivery channel", e, !1, !1, !1, "Customer", Y, Y, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Customer phone", j, j, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Customer address", A0, A0, e, r), t.Field_Field$string("Remark on the pickup / delivery order", e, !1, !1, !1, "Customer remark", a0, a0, e, r), t.Field_Field$timestamp("Scheduled pickup / delivery time", e, !1, !1, "Fulfillment time", Q0, Q0, e, r), t.Field_Field$string("Pax count by type (e.g. ADULTS, CHILDREN)", e, !1, !1, !1, "Pax breakdown", "paxBreakdown", "personMetaBreakdown", e, r)], z.JSArray_Field);
8990
+ var e = null, n = "seqNumber", a = "deliveryName", o = "isRefund", s = "isPickup", u = "isInHouseDelivery", p = "isDelivery", c = "completedAt", b = "integratedOrderId", _ = "itemCount", A = "taxTotal", D = "discountTotal", $ = "grossTotal", q = "rounding", S = "takeawayPrice", T = "thirdPartyExtraCharge", C = "deliveryFee", F = "nettTotal", B = "deliveryFeeWithTax", v = "deliveryFeeWithoutTax", I = "otherChargeWithTax", J = "otherChargeWithoutTax", H = "discountInclusiveTaxTotal", Y = "customerName", j = "customerPhone", A0 = "customerAddress", a0 = "customerRemark", Q0 = "fulfillmentAt";
8991
+ return t._setArrayType([t.Field_Field$string(e, e, !1, !1, !1, "ID", "id", "_id", e, r), t.Field_Field$string(e, e, !0, !1, !1, e, "docId", "_docId", e, r), t.Field_Field$timestamp(e, e, !0, !1, e, "publishedAt", "_publishedAt", e, r), t.Field_Field$timestamp(e, e, !1, !1, "Time", "createdAt", "_createdAt", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Restaurant ID", "restaurantId", "_restaurantId", e, r), t.Field_Field$string("Values: COMPLETED, DRAFT, VOIDED, REFUNDED", e, !1, !1, !1, "Status", "status", "status", e, r), t.Field_Field$string(e, e, !1, !1, !1, "No.", n, n, e, r), t.Field_Field$string("Dine-in table name/identifier", e, !1, !1, !1, "Table", "slot", "slot", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Delivery", a, a, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Refund ID", "refundFrom", "refundedFrom", e, r), t.Field_Field$bool(e, e, !1, !1, "Refund", o, o, e, r), t.Field_Field$string(e, e, !0, !1, !1, e, "refundApprovedById", "refund.approvedBy.id", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Refund approver", "refundApprovedByName", "refund.approvedBy.name", e, r), t.Field_Field$string(e, e, !0, !1, !1, e, "refundedById", "refund.by.id", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Refund user", "refundedByName", "refund.by.name", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Refund reason", "refundReason", "refund.reason", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Member ID", "memberId", "membership.id", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Member user ID", "memberUserId", "membership.userId", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Member name", "memberUserName", "membership.name", e, r), t.Field_Field$string(e, e, !0, !1, !1, "Member phone", "memberPhoneNumber", "membership.phoneNumber", e, r), t.Field_Field$timestamp(e, e, !1, !1, "Member birthday", "memberBirthday", "membership.birthday", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Remark", "remark", "remark", e, r), t.Field_Field$string("Order source. Values: FEEDME (POS), GRABFOOD, FOODPANDA, SHOPEEFOOD, etc.", e, !1, !1, !1, "Source", "source", "source", R.x28case_x28, r), t.Field_Field$string("Order type. Values: DINE IN, TAKEAWAY, PICKUP, DELIVERY, DRIVE THRU", e, !1, !1, !1, "Type", "type", "type", "(case when upper(@type) in ('PICKUP','DELIVERY','DRIVE THRU','KIOSK') then upper(@type) when @is_takeaway is true then 'TAKEAWAY' else upper(@type) end)", r), t.Field_Field$bool(e, e, !0, !1, "Pickup", s, s, e, r), t.Field_Field$bool(e, e, !0, !1, "Is in house delivery", u, u, e, r), t.Field_Field$bool(e, e, !0, !1, "Is other delivery", p, p, e, r), t.Field_Field$bool(e, e, !0, !1, "Is takeaway", "isTakeaway", "is.takeaway", e, r), t.Field_Field$timestamp(e, e, !1, !1, "Closed at", c, c, e, r), t.Field_Field$string(e, e, !0, !1, !1, "Inclusive SST", "sstInclusive", "nettTaxes.SST.inclusive", e, r), t.Field_Field$string(e, e, !0, !1, !1, "SST before discount", "sstBeforeDiscount", "nettTaxes.SST.beforeDiscount", e, r), t.Field_Field$string(e, e, !0, !1, !1, "Inclusive SC", "serviceChargeInclusive", "nettTaxes.SERVICE_CHARGE.inclusive", e, r), t.Field_Field$string(e, e, !0, !1, !1, "SC before discount", "serviceChargeBeforeDiscount", "nettTaxes.SERVICE_CHARGE.beforeDiscount", e, r), t.Field_Field$numeric("Number of guests. Negated for refund, 0 for voided", "IF(@status = 'VOIDED', 0, IFNULL(@pax,0)*IF(@isRefund, -1, 1))", !1, !1, "Pax", "pax", "person", "(CASE WHEN @status = 'VOIDED' THEN 0 ELSE (COALESCE(@pax,0)*CASE WHEN @is_refund THEN -1 ELSE 1 END) END)", r), t.Field_Field$string(e, e, !1, !1, !1, "Integrated order ID", b, b, e, r), t.Field_Field$numeric(e, R.IFNULLi, !0, !1, "Item count", _, _, R.COALESi, r), t.Field_Field$numeric(e, R.IFNULLtax, !1, !1, "Tax", A, A, R.COALEStax_, r), t.Field_Field$numeric(e, R.IFNULLdiT, !1, !1, "Discount", D, D, R.COALESdit, r), t.Field_Field$numeric(e, R.IFNULLg, !1, !1, "Item gross", $, $, R.COALESg, r), t.Field_Field$numeric(e, "(IFNULL(@nettTotal,0)-IFNULL(@rounding,0)-IFNULL(@discountTotal,0)-IFNULL(@thirdPartyExtraCharge,0)-IFNULL(@deliveryFee,0)-IFNULL(@taxTotal,IFNULL(@sstTotal, 0))-IFNULL(@serviceChargeTotal,0))*IF(@isRefund, -1, 1)", !1, !1, "Bill gross", "billGrossTotal", e, "(COALESCE(@nett_total,0)-COALESCE(@rounding,0)-COALESCE(@discount_total,0)-COALESCE(@third_party_extra_charge,0)-COALESCE(@delivery_fee,0)-COALESCE(@tax_total,@sst_total,0)-COALESCE(@service_charge_total,0))*CASE WHEN @is_refund THEN -1 ELSE 1 END", r), t.Field_Field$numeric(e, "IFNULL(@rounding,0)*IF(@isRefund, -1, 1)", !1, !1, "Rounding", q, q, R.COALESr, r), t.Field_Field$numeric(e, "IFNULL(@sstTotal,0)*IF(@isRefund, -1, 1)", !0, !1, "SST", "sstTotal", "nettTaxes.SST.total", R.COALESss, r), t.Field_Field$string(e, e, !0, !1, !1, "SST %", "sstPercentage", "nettTaxes.SST.percentage", e, r), t.Field_Field$numeric(e, R.IFNULLs, !1, !1, "SC", "serviceChargeTotal", "nettTaxes.SERVICE_CHARGE.total", R.COALESse, r), t.Field_Field$string(e, e, !0, !1, !1, "SC %", "serviceChargePercentage", "nettTaxes.SERVICE_CHARGE.percentage", e, r), t.Field_Field$numeric(e, R.x28IFNULo, !1, !1, "Other charge", "otherChargeTotal", "nettTaxes.OTHER_CHARGE.total", R.x28COALEo, r), t.Field_Field$numeric(e, R.x28IFNULgx2d, !1, !1, "Gross w/ takeaway", "subTotalWithoutTakeaway", e, R.x28COALEgx2d, r), t.Field_Field$numeric(e, R.IFNULLtak, !1, !1, "Takeaway", S, S, R.COALEStak, r), t.Field_Field$numeric(e, R.IFNULLth, !1, !1, "Extra charge", T, T, R.COALESth, r), t.Field_Field$numeric(e, R.IFNULLde_, !1, !1, "Delivery fee", C, C, R.COALESdex2c, r), t.Field_Field$numeric(e, R.IFNULLn, !1, !1, "Nett", F, F, R.COALESn, r), t.Field_Field$numeric(e, "(IFNULL(@grossTotal,0)+(case when @deliveryFeeWithTax>0 then IFNULL(@deliveryFee,0) else 0 end)+IFNULL(case when @otherChargeWithTax>0 then IFNULL(@thirdPartyExtraCharge,0) else 0 end)+IFNULL(@discountTotal,0))*IF(@isRefund, -1, 1)", !1, !1, "Item gross before charges", "grossBeforeCharges", e, "(COALESCE(@gross_total,0)+(case when @delivery_fee_with_tax>0 then COALESCE(@delivery_fee,0) else 0 end)+(case when @other_charge_with_tax>0 then COALESCE(@third_party_extra_charge,0) else 0 end)+COALESCE(@discount_total,0))*CASE WHEN @is_refund THEN -1 ELSE 1 END", r), t.Field_Field$numeric(e, "(IFNULL(@nettTotal,0)-IFNULL(@rounding,0)-(case when @otherChargeWithTax>0 then 0 else IFNULL(@thirdPartyExtraCharge,0) end)-(case when @deliveryFeeWithTax>0 then 0 else IFNULL(@deliveryFee,0) end)-IFNULL(@taxTotal,IFNULL(@sstTotal,0))-IFNULL(@serviceChargeTotal,0))*IF(@isRefund, -1, 1)", !1, !1, "Bill gross before charges", "billGrossBeforeCharges", e, "(COALESCE(@nett_total,0)-COALESCE(@rounding,0)-(case when @other_charge_with_tax>0 then 0 else COALESCE(@third_party_extra_charge,0) end)-(case when @delivery_fee_with_tax>0 then 0 else COALESCE(@delivery_fee,0) end)-COALESCE(@tax_total,@sst_total,0)-COALESCE(@service_charge_total,0))*CASE WHEN @is_refund THEN -1 ELSE 1 END", r), t.Field_Field$numeric(e, e, !1, !1, "Member Recency", "recency", e, R.MIN_EX, r), t.Field_Field$numeric(e, e, !1, !1, "Member frequency", "frequency", e, R.COUNT_, r), t.Field_Field$numeric(e, e, !1, !1, "Member monetary", "monetary", e, R.SUM__n, r), t.Field_Field$numeric(e, R.IFNULLdeWT, !1, !1, "Delivery fee with tax", B, B, R.COALESdex5f_, r), t.Field_Field$numeric(e, R.IFNULLdeWo, !1, !1, "Delivery fee without tax", v, v, R.COALESdex5fo, r), t.Field_Field$numeric(e, R.IFNULLoT, !1, !1, "Other charge with tax", I, I, R.COALESo_, r), t.Field_Field$numeric(e, R.IFNULLoo, !1, !1, "Other charge without tax", J, J, R.COALESoo, r), t.Field_Field$numeric("Bill duration in seconds from creation to completion", e, !1, !1, "Duration", "duration", e, R.EXTRAC, r), t.Field_Field$string(e, e, !1, !1, !1, "Restaurant", "restaurantName", e, R.x28selecn, r), t.Field_Field$numeric(e, e, !1, !1, "Labour hour", "labourHour", e, R.x28selecS, r), t.Field_Field$string(e, e, !1, !1, !1, "Payments", "payments", e, R.x28selecstn, r), t.Field_Field$string(e, e, !1, !1, !1, "Items", "items", e, "(select string_agg(CONCAT(flatten_items.quantity,'x ',ARRAY_TO_STRING(ARRAY[CASE WHEN flatten_items.code='' THEN NULL ELSE flatten_items.code END, flatten_items.name], ' ')), ',') from flatten_items where flatten_items.bill_id=@id and flatten_items.restaurant_id=@restaurant_id and flatten_items.layer=0 and flatten_items.status!='VOIDED')", r), t.Field_Field$string(e, e, !1, !1, !1, "Discount reasons", "discountReasons", e, R.x28selecsta, r), t.Field_Field$numeric(e, R.IFNULLdiI, !1, !1, "Discount inc tax", H, H, R.COALESdii, r), t.Field_Field$string(e, e, !1, !1, !1, "Payment Summaries", "paymentSummaries", e, "(select string_agg(distinct CONCAT(name, CASE WHEN card_type is not null THEN CONCAT(' (',UPPER(card_type), ')') WHEN payment_gateway_issuer is not null THEN CONCAT(' (',payment_gateway_issuer, ')') ELSE '' END), ',') from payments where payments.bill_id=@id and payments.restaurant_id=@restaurant_id)", r), t.Field_Field$numeric(e, e, !1, !1, "Is new member", "isNewMember", e, "(CASE WHEN EXISTS (SELECT 1 FROM members WHERE members.id=@member_id AND members.created_at::date = @created_at::date) THEN 1 ELSE 0 END)", r), t.Field_Field$numeric(e, e, !1, !1, "Is 30 days recency", "is30DaysRecency", e, "(CASE WHEN EXISTS (SELECT 1 FROM bills WHERE bills.member_id = @member_id AND bills.status != 'VOIDED' AND bills.restaurant_id = @restaurant_id AND bills.created_at >= @created_at - INTERVAL '30 days' AND bills.created_at < @created_at) THEN 1 ELSE 0 END)", r), t.Field_Field$numeric(e, e, !1, !1, "Is 60 days recency", "is60DaysRecency", e, "(CASE WHEN EXISTS (SELECT 1 FROM bills WHERE bills.member_id = @member_id AND bills.status != 'VOIDED' AND bills.restaurant_id = @restaurant_id AND bills.created_at >= @created_at - INTERVAL '60 days' AND bills.created_at < @created_at) THEN 1 ELSE 0 END)", r), t.Field_Field$numeric("Bill count flag: 1 normal, -1 refund, 0 voided. Use SUM to count bills", "IF(@status = 'VOIDED', 0, IF(@isRefund, -1, 1))", !1, !1, "Table count", "tableCount", e, "(CASE WHEN @status = 'VOIDED' THEN 0 ELSE (CASE WHEN @is_refund THEN -1 ELSE 1 END) END)", r), t.Field_Field$numeric("Member count flag: 1 normal, -1 refund, 0 voided. Use SUM to count members", "IF((@status = 'VOIDED' OR @memberId is null), 0, IF(@isRefund, -1, 1))", !1, !1, "Member count", "memberCount", e, "(CASE WHEN (@status = 'VOIDED' OR @member_id is null) THEN 0 ELSE (CASE WHEN @is_refund THEN -1 ELSE 1 END) END)", r), t.Field_Field$string("Customer name from pickup / in-house delivery / delivery channel", e, !1, !1, !1, "Customer", Y, Y, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Customer phone", j, j, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Customer address", A0, A0, e, r), t.Field_Field$string("Remark on the pickup / delivery order", e, !1, !1, !1, "Customer remark", a0, a0, e, r), t.Field_Field$timestamp("Scheduled pickup / delivery time", e, !1, !1, "Fulfillment time", Q0, Q0, e, r), t.Field_Field$string("Pax count by type (e.g. ADULTS, CHILDREN)", e, !1, !1, !1, "Pax breakdown", "paxBreakdown", "personMetaBreakdown", e, r)], z.JSArray_Field);
8992
8992
  },
8993
8993
  $signature: 0
8994
8994
  }, t.billSchema_closure0.prototype = {
@@ -9127,8 +9127,8 @@ Arguments: [` + c + "]";
9127
9127
  $signature: 1
9128
9128
  }, t.completeTimeBillSchema_closure.prototype = {
9129
9129
  call$1(r) {
9130
- var e = null, n = "seqNumber", a = "deliveryName", o = "isRefund", s = "isPickup", u = "isInHouseDelivery", p = "isDelivery", c = "completedAt", b = "integratedOrderId", _ = "itemCount", A = "taxTotal", D = "discountTotal", $ = "grossTotal", q = "rounding", h = "takeawayPrice", T = "thirdPartyExtraCharge", C = "deliveryFee", F = "nettTotal", B = "deliveryFeeWithTax", v = "deliveryFeeWithoutTax", I = "otherChargeWithTax", J = "otherChargeWithoutTax", H = "discountInclusiveTaxTotal";
9131
- return t._setArrayType([t.Field_Field$string(e, e, !1, !1, !1, "ID", "id", "_id", e, r), t.Field_Field$string(e, e, !0, !1, !1, e, "docId", "_docId", e, r), t.Field_Field$timestamp(e, e, !0, !1, e, "publishedAt", "_publishedAt", e, r), t.Field_Field$timestamp(e, e, !1, !1, "Time", "createdAt", "_createdAt", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Restaurant ID", "restaurantId", "_restaurantId", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Status", "status", "status", e, r), t.Field_Field$string(e, e, !1, !1, !1, "No.", n, n, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Table", "slot", "slot", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Delivery", a, a, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Refund ID", "refundFrom", "refundedFrom", e, r), t.Field_Field$bool(e, e, !1, !1, "Refund", o, o, e, r), t.Field_Field$string(e, e, !0, !1, !1, e, "refundApprovedById", "refund.approvedBy.id", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Refund approver", "refundApprovedByName", "refund.approvedBy.name", e, r), t.Field_Field$string(e, e, !0, !1, !1, e, "refundedById", "refund.by.id", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Refund user", "refundedByName", "refund.by.name", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Refund reason", "refundReason", "refund.reason", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Member ID", "memberId", "membership.id", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Member user ID", "memberUserId", "membership.userId", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Member name", "memberUserName", "membership.name", e, r), t.Field_Field$string(e, e, !0, !1, !1, "Member phone", "memberPhoneNumber", "membership.phoneNumber", e, r), t.Field_Field$timestamp(e, e, !1, !1, "Member birthday", "memberBirthday", "membership.birthday", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Remark", "remark", "remark", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Source", "source", "source", R.x28case_x28, r), t.Field_Field$string(e, e, !1, !1, !1, "Type", "type", "type", "(case when upper(@type)='PICKUP' then upper(@type) when upper(@type)='DELIVERY' then upper(@type) when @is_takeaway is true then 'TAKEAWAY' else upper(@type) end)", r), t.Field_Field$bool(e, e, !0, !1, "Pickup", s, s, e, r), t.Field_Field$bool(e, e, !0, !1, "Is in house delivery", u, u, e, r), t.Field_Field$bool(e, e, !0, !1, "Is other delivery", p, p, e, r), t.Field_Field$bool(e, e, !0, !1, "Is takeaway", "isTakeaway", "is.takeaway", e, r), t.Field_Field$timestamp(e, e, !1, !1, "Closed at", c, c, e, r), t.Field_Field$string(e, e, !0, !1, !1, "Inclusive SST", "sstInclusive", "nettTaxes.SST.inclusive", e, r), t.Field_Field$string(e, e, !0, !1, !1, "SST before discount", "sstBeforeDiscount", "nettTaxes.SST.beforeDiscount", e, r), t.Field_Field$string(e, e, !0, !1, !1, "Inclusive SC", "serviceChargeInclusive", "nettTaxes.SERVICE_CHARGE.inclusive", e, r), t.Field_Field$string(e, e, !0, !1, !1, "SC before discount", "serviceChargeBeforeDiscount", "nettTaxes.SERVICE_CHARGE.beforeDiscount", e, r), t.Field_Field$numeric(e, "IFNULL(@pax,0)*IF(@isRefund, -1, 1)", !1, !1, "Pax", "pax", "person", R.COALESp, r), t.Field_Field$string(e, e, !1, !1, !1, "Integrated order ID", b, b, e, r), t.Field_Field$numeric(e, R.IFNULLi, !0, !1, "Item count", _, _, R.COALESi, r), t.Field_Field$numeric(e, "IFNULL(@taxTotal,0)*IF(@isRefund, -1, 1)", !1, !1, "Tax", A, A, R.COALEStax0, r), t.Field_Field$numeric(e, R.IFNULLdiT, !1, !1, "Discount", D, D, R.COALESdit, r), t.Field_Field$numeric(e, R.IFNULLg, !1, !1, "Item gross", $, $, R.COALESg, r), t.Field_Field$numeric(e, "(IFNULL(@nettTotal,0)-IFNULL(@rounding,0)-IFNULL(@discountTotal,0)-IFNULL(@thirdPartyExtraCharge,0)-IFNULL(@deliveryFee,0)-IFNULL(@taxTotal,0)-IFNULL(@serviceChargeTotal,0))*IF(@isRefund, -1, 1)", !1, !1, "Bill gross", "billGrossTotal", e, "(COALESCE(@nett_total,0)-COALESCE(@rounding,0)-COALESCE(@discount_total,0)-COALESCE(@third_party_extra_charge,0)-COALESCE(@delivery_fee,0)-COALESCE(@tax_total,0)-COALESCE(@service_charge_total,0))*CASE WHEN @is_refund THEN -1 ELSE 1 END", r), t.Field_Field$numeric(e, "IFNULL(@rounding,0)*IF(@isRefund, -1, 1)", !1, !1, "Rounding", q, q, R.COALESr, r), t.Field_Field$numeric(e, "IFNULL(@sstTotal,0)*IF(@isRefund, -1, 1)", !0, !1, "SST", "sstTotal", "nettTaxes.SST.total", R.COALESss, r), t.Field_Field$string(e, e, !0, !1, !1, "SST %", "sstPercentage", "nettTaxes.SST.percentage", e, r), t.Field_Field$numeric(e, R.IFNULLs, !1, !1, "SC", "serviceChargeTotal", "nettTaxes.SERVICE_CHARGE.total", R.COALESse, r), t.Field_Field$string(e, e, !0, !1, !1, "SC %", "serviceChargePercentage", "nettTaxes.SERVICE_CHARGE.percentage", e, r), t.Field_Field$numeric(e, R.x28IFNULo, !1, !1, "Other charge", "otherChargeTotal", "nettTaxes.OTHER_CHARGE.total", R.x28COALEo, r), t.Field_Field$numeric(e, R.x28IFNULgx2d, !1, !1, "Gross w/ takeaway", "subTotalWithoutTakeaway", e, R.x28COALEgx2d, r), t.Field_Field$numeric(e, R.IFNULLtak, !1, !1, "Takeaway", h, h, R.COALEStak, r), t.Field_Field$numeric(e, R.IFNULLth, !1, !1, "Extra charge", T, T, R.COALESth, r), t.Field_Field$numeric(e, R.IFNULLde_, !1, !1, "Delivery fee", C, C, R.COALESdex2c, r), t.Field_Field$numeric(e, R.IFNULLn, !1, !1, "Nett", F, F, R.COALESn, r), t.Field_Field$numeric(e, "(IFNULL(@grossTotal,0)+IFNULL(@deliveryFeeWithTax,0)+IFNULL(@otherChargeWithTax,0)+IFNULL(@discountTotal,0))*IF(@isRefund, -1, 1)", !1, !1, "Item gross before charges", "grossBeforeCharges", e, "(COALESCE(@gross_total,0)+COALESCE(@delivery_fee_with_tax,0)+COALESCE(@other_charge_with_tax,0)+COALESCE(@discount_total,0))*CASE WHEN @is_refund THEN -1 ELSE 1 END", r), t.Field_Field$numeric(e, "(IFNULL(@nettTotal,0)-IFNULL(@rounding,0)-(case when @otherChargeWithTax>0 then 0 else IFNULL(@thirdPartyExtraCharge,0) end)-(case when @deliveryFeeWithTax>0 then 0 else IFNULL(@deliveryFee,0) end)-IFNULL(@taxTotal,0)-IFNULL(@serviceChargeTotal,0))*IF(@isRefund, -1, 1)", !1, !1, "Bill gross before charges", "billGrossBeforeCharges", e, "(COALESCE(@nett_total,0)-COALESCE(@rounding,0)-(case when @other_charge_with_tax>0 then 0 else COALESCE(@third_party_extra_charge,0) end)-(case when @delivery_fee_with_tax>0 then 0 else COALESCE(@delivery_fee,0) end)-COALESCE(@tax_total,0)-COALESCE(@service_charge_total,0))*CASE WHEN @is_refund THEN -1 ELSE 1 END", r), t.Field_Field$numeric(e, e, !1, !1, "Member Recency", "recency", e, R.MIN_EX, r), t.Field_Field$numeric(e, e, !1, !1, "Member frequency", "frequency", e, R.COUNT_, r), t.Field_Field$numeric(e, e, !1, !1, "Member monetary", "monetary", e, R.SUM__n, r), t.Field_Field$numeric(e, R.IFNULLdeWT, !1, !1, "Delivery fee with tax", B, B, R.COALESdex5f_, r), t.Field_Field$numeric(e, R.IFNULLdeWo, !1, !1, "Delivery fee without tax", v, v, R.COALESdex5fo, r), t.Field_Field$numeric(e, R.IFNULLoT, !1, !1, "Other charge with tax", I, I, R.COALESo_, r), t.Field_Field$numeric(e, R.IFNULLoo, !1, !1, "Other charge without tax", J, J, R.COALESoo, r), t.Field_Field$numeric(e, e, !1, !1, "Duration", "duration", e, R.EXTRAC, r), t.Field_Field$string(e, e, !1, !1, !1, "Restaurant", "restaurantName", e, R.x28selecn, r), t.Field_Field$numeric(e, e, !1, !1, "Labour hour", "labourHour", e, R.x28selecS, r), t.Field_Field$string(e, e, !1, !1, !1, "Payments", "payments", e, R.x28selecstn, r), t.Field_Field$string(e, e, !1, !1, !1, "Items", "items", e, "(select string_agg(CONCAT(flatten_items.quantity,'x ',ARRAY_TO_STRING(ARRAY[CASE WHEN flatten_items.code='' THEN NULL ELSE flatten_items.code END, flatten_items.name], ' ')), ',') from flatten_items where flatten_items.bill_id=@id and flatten_items.restaurant_id=@restaurant_id and flatten_items.layer=0)", r), t.Field_Field$string(e, e, !1, !1, !1, "Discount reasons", "discountReasons", e, R.x28selecsta, r), t.Field_Field$numeric(e, R.IFNULLdiI, !1, !1, "Discount inc tax", H, H, R.COALESdii, r), t.Field_Field$string(e, e, !1, !1, !1, "Payment Summaries", "paymentSummaries", e, "(select string_agg(distinct CONCAT(name, CASE WHEN card_type is not null THEN CONCAT(' (',card_type, ')') WHEN payment_gateway_issuer is not null THEN CONCAT(' (',payment_gateway_issuer, ')') ELSE '' END), ',') from payments where payments.bill_id=@id and payments.restaurant_id=@restaurant_id)", r)], z.JSArray_Field);
9130
+ var e = null, n = "seqNumber", a = "deliveryName", o = "isRefund", s = "isPickup", u = "isInHouseDelivery", p = "isDelivery", c = "completedAt", b = "integratedOrderId", _ = "itemCount", A = "taxTotal", D = "discountTotal", $ = "grossTotal", q = "rounding", S = "takeawayPrice", T = "thirdPartyExtraCharge", C = "deliveryFee", F = "nettTotal", B = "deliveryFeeWithTax", v = "deliveryFeeWithoutTax", I = "otherChargeWithTax", J = "otherChargeWithoutTax", H = "discountInclusiveTaxTotal";
9131
+ return t._setArrayType([t.Field_Field$string(e, e, !1, !1, !1, "ID", "id", "_id", e, r), t.Field_Field$string(e, e, !0, !1, !1, e, "docId", "_docId", e, r), t.Field_Field$timestamp(e, e, !0, !1, e, "publishedAt", "_publishedAt", e, r), t.Field_Field$timestamp(e, e, !1, !1, "Time", "createdAt", "_createdAt", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Restaurant ID", "restaurantId", "_restaurantId", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Status", "status", "status", e, r), t.Field_Field$string(e, e, !1, !1, !1, "No.", n, n, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Table", "slot", "slot", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Delivery", a, a, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Refund ID", "refundFrom", "refundedFrom", e, r), t.Field_Field$bool(e, e, !1, !1, "Refund", o, o, e, r), t.Field_Field$string(e, e, !0, !1, !1, e, "refundApprovedById", "refund.approvedBy.id", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Refund approver", "refundApprovedByName", "refund.approvedBy.name", e, r), t.Field_Field$string(e, e, !0, !1, !1, e, "refundedById", "refund.by.id", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Refund user", "refundedByName", "refund.by.name", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Refund reason", "refundReason", "refund.reason", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Member ID", "memberId", "membership.id", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Member user ID", "memberUserId", "membership.userId", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Member name", "memberUserName", "membership.name", e, r), t.Field_Field$string(e, e, !0, !1, !1, "Member phone", "memberPhoneNumber", "membership.phoneNumber", e, r), t.Field_Field$timestamp(e, e, !1, !1, "Member birthday", "memberBirthday", "membership.birthday", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Remark", "remark", "remark", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Source", "source", "source", R.x28case_x28, r), t.Field_Field$string(e, e, !1, !1, !1, "Type", "type", "type", "(case when upper(@type)='PICKUP' then upper(@type) when upper(@type)='DELIVERY' then upper(@type) when @is_takeaway is true then 'TAKEAWAY' else upper(@type) end)", r), t.Field_Field$bool(e, e, !0, !1, "Pickup", s, s, e, r), t.Field_Field$bool(e, e, !0, !1, "Is in house delivery", u, u, e, r), t.Field_Field$bool(e, e, !0, !1, "Is other delivery", p, p, e, r), t.Field_Field$bool(e, e, !0, !1, "Is takeaway", "isTakeaway", "is.takeaway", e, r), t.Field_Field$timestamp(e, e, !1, !1, "Closed at", c, c, e, r), t.Field_Field$string(e, e, !0, !1, !1, "Inclusive SST", "sstInclusive", "nettTaxes.SST.inclusive", e, r), t.Field_Field$string(e, e, !0, !1, !1, "SST before discount", "sstBeforeDiscount", "nettTaxes.SST.beforeDiscount", e, r), t.Field_Field$string(e, e, !0, !1, !1, "Inclusive SC", "serviceChargeInclusive", "nettTaxes.SERVICE_CHARGE.inclusive", e, r), t.Field_Field$string(e, e, !0, !1, !1, "SC before discount", "serviceChargeBeforeDiscount", "nettTaxes.SERVICE_CHARGE.beforeDiscount", e, r), t.Field_Field$numeric(e, "IFNULL(@pax,0)*IF(@isRefund, -1, 1)", !1, !1, "Pax", "pax", "person", R.COALESp, r), t.Field_Field$string(e, e, !1, !1, !1, "Integrated order ID", b, b, e, r), t.Field_Field$numeric(e, R.IFNULLi, !0, !1, "Item count", _, _, R.COALESi, r), t.Field_Field$numeric(e, "IFNULL(@taxTotal,0)*IF(@isRefund, -1, 1)", !1, !1, "Tax", A, A, R.COALEStax0, r), t.Field_Field$numeric(e, R.IFNULLdiT, !1, !1, "Discount", D, D, R.COALESdit, r), t.Field_Field$numeric(e, R.IFNULLg, !1, !1, "Item gross", $, $, R.COALESg, r), t.Field_Field$numeric(e, "(IFNULL(@nettTotal,0)-IFNULL(@rounding,0)-IFNULL(@discountTotal,0)-IFNULL(@thirdPartyExtraCharge,0)-IFNULL(@deliveryFee,0)-IFNULL(@taxTotal,0)-IFNULL(@serviceChargeTotal,0))*IF(@isRefund, -1, 1)", !1, !1, "Bill gross", "billGrossTotal", e, "(COALESCE(@nett_total,0)-COALESCE(@rounding,0)-COALESCE(@discount_total,0)-COALESCE(@third_party_extra_charge,0)-COALESCE(@delivery_fee,0)-COALESCE(@tax_total,0)-COALESCE(@service_charge_total,0))*CASE WHEN @is_refund THEN -1 ELSE 1 END", r), t.Field_Field$numeric(e, "IFNULL(@rounding,0)*IF(@isRefund, -1, 1)", !1, !1, "Rounding", q, q, R.COALESr, r), t.Field_Field$numeric(e, "IFNULL(@sstTotal,0)*IF(@isRefund, -1, 1)", !0, !1, "SST", "sstTotal", "nettTaxes.SST.total", R.COALESss, r), t.Field_Field$string(e, e, !0, !1, !1, "SST %", "sstPercentage", "nettTaxes.SST.percentage", e, r), t.Field_Field$numeric(e, R.IFNULLs, !1, !1, "SC", "serviceChargeTotal", "nettTaxes.SERVICE_CHARGE.total", R.COALESse, r), t.Field_Field$string(e, e, !0, !1, !1, "SC %", "serviceChargePercentage", "nettTaxes.SERVICE_CHARGE.percentage", e, r), t.Field_Field$numeric(e, R.x28IFNULo, !1, !1, "Other charge", "otherChargeTotal", "nettTaxes.OTHER_CHARGE.total", R.x28COALEo, r), t.Field_Field$numeric(e, R.x28IFNULgx2d, !1, !1, "Gross w/ takeaway", "subTotalWithoutTakeaway", e, R.x28COALEgx2d, r), t.Field_Field$numeric(e, R.IFNULLtak, !1, !1, "Takeaway", S, S, R.COALEStak, r), t.Field_Field$numeric(e, R.IFNULLth, !1, !1, "Extra charge", T, T, R.COALESth, r), t.Field_Field$numeric(e, R.IFNULLde_, !1, !1, "Delivery fee", C, C, R.COALESdex2c, r), t.Field_Field$numeric(e, R.IFNULLn, !1, !1, "Nett", F, F, R.COALESn, r), t.Field_Field$numeric(e, "(IFNULL(@grossTotal,0)+IFNULL(@deliveryFeeWithTax,0)+IFNULL(@otherChargeWithTax,0)+IFNULL(@discountTotal,0))*IF(@isRefund, -1, 1)", !1, !1, "Item gross before charges", "grossBeforeCharges", e, "(COALESCE(@gross_total,0)+COALESCE(@delivery_fee_with_tax,0)+COALESCE(@other_charge_with_tax,0)+COALESCE(@discount_total,0))*CASE WHEN @is_refund THEN -1 ELSE 1 END", r), t.Field_Field$numeric(e, "(IFNULL(@nettTotal,0)-IFNULL(@rounding,0)-(case when @otherChargeWithTax>0 then 0 else IFNULL(@thirdPartyExtraCharge,0) end)-(case when @deliveryFeeWithTax>0 then 0 else IFNULL(@deliveryFee,0) end)-IFNULL(@taxTotal,0)-IFNULL(@serviceChargeTotal,0))*IF(@isRefund, -1, 1)", !1, !1, "Bill gross before charges", "billGrossBeforeCharges", e, "(COALESCE(@nett_total,0)-COALESCE(@rounding,0)-(case when @other_charge_with_tax>0 then 0 else COALESCE(@third_party_extra_charge,0) end)-(case when @delivery_fee_with_tax>0 then 0 else COALESCE(@delivery_fee,0) end)-COALESCE(@tax_total,0)-COALESCE(@service_charge_total,0))*CASE WHEN @is_refund THEN -1 ELSE 1 END", r), t.Field_Field$numeric(e, e, !1, !1, "Member Recency", "recency", e, R.MIN_EX, r), t.Field_Field$numeric(e, e, !1, !1, "Member frequency", "frequency", e, R.COUNT_, r), t.Field_Field$numeric(e, e, !1, !1, "Member monetary", "monetary", e, R.SUM__n, r), t.Field_Field$numeric(e, R.IFNULLdeWT, !1, !1, "Delivery fee with tax", B, B, R.COALESdex5f_, r), t.Field_Field$numeric(e, R.IFNULLdeWo, !1, !1, "Delivery fee without tax", v, v, R.COALESdex5fo, r), t.Field_Field$numeric(e, R.IFNULLoT, !1, !1, "Other charge with tax", I, I, R.COALESo_, r), t.Field_Field$numeric(e, R.IFNULLoo, !1, !1, "Other charge without tax", J, J, R.COALESoo, r), t.Field_Field$numeric(e, e, !1, !1, "Duration", "duration", e, R.EXTRAC, r), t.Field_Field$string(e, e, !1, !1, !1, "Restaurant", "restaurantName", e, R.x28selecn, r), t.Field_Field$numeric(e, e, !1, !1, "Labour hour", "labourHour", e, R.x28selecS, r), t.Field_Field$string(e, e, !1, !1, !1, "Payments", "payments", e, R.x28selecstn, r), t.Field_Field$string(e, e, !1, !1, !1, "Items", "items", e, "(select string_agg(CONCAT(flatten_items.quantity,'x ',ARRAY_TO_STRING(ARRAY[CASE WHEN flatten_items.code='' THEN NULL ELSE flatten_items.code END, flatten_items.name], ' ')), ',') from flatten_items where flatten_items.bill_id=@id and flatten_items.restaurant_id=@restaurant_id and flatten_items.layer=0)", r), t.Field_Field$string(e, e, !1, !1, !1, "Discount reasons", "discountReasons", e, R.x28selecsta, r), t.Field_Field$numeric(e, R.IFNULLdiI, !1, !1, "Discount inc tax", H, H, R.COALESdii, r), t.Field_Field$string(e, e, !1, !1, !1, "Payment Summaries", "paymentSummaries", e, "(select string_agg(distinct CONCAT(name, CASE WHEN card_type is not null THEN CONCAT(' (',card_type, ')') WHEN payment_gateway_issuer is not null THEN CONCAT(' (',payment_gateway_issuer, ')') ELSE '' END), ',') from payments where payments.bill_id=@id and payments.restaurant_id=@restaurant_id)", r)], z.JSArray_Field);
9132
9132
  },
9133
9133
  $signature: 0
9134
9134
  }, t.completeTimeBillSchema_closure0.prototype = {
@@ -9197,10 +9197,10 @@ Arguments: [` + c + "]";
9197
9197
  $signature: 1
9198
9198
  }, t.flattenItemSchema_closure.prototype = {
9199
9199
  call$1(r) {
9200
- var e = null, n = "itemCreatedAt", a = "billCompletedAt", o = "perXUnit", s = "takeawayId", u = "takeawayName", p = "productId", c = "isRefund", b = "servedAt", _ = "isTakeaway", A = "quantity", D = "unitQuantity", $ = "billAdjustmentTotal", q = "itemAdjustmentTotal", h = "grossTotal", T = "takeawayPrice", C = "nettTotal", F = "layerNettTotal", B = "layerBillAdjustmentTotal", v = "layerItemAdjustmentTotal", I = "layerGrossTotal", J = "layerTakeawayPrice", H = "layerTaxTotal", Y = "layerScTotal", j = "layerOtherChargeTotal", A0 = "customAttributes", a0 = "layerZeroParentId", Q0 = "collectedAt", K0 = "subCategories", t1 = "billAdjustmentInclusiveTaxTotal", a1 = "itemAdjustmentInclusiveTaxTotal", X0 = "layerBillAdjustmentInclusiveTaxTotal", r1 = "layerItemAdjustmentInclusiveTaxTotal", i1 = "billAdjustmentExclusiveTaxTotal", p1 = "itemAdjustmentExclusiveTaxTotal", M1 = "layerBillAdjustmentExclusiveTaxTotal", s1 = "layerItemAdjustmentExclusiveTaxTotal", A1 = "priceGroup", fe = "originalPrice", Je = "catalogId", ye = "baseItemPrice", He = "catalogName";
9200
+ var e = null, n = "itemCreatedAt", a = "billCompletedAt", o = "perXUnit", s = "takeawayId", u = "takeawayName", p = "productId", c = "isRefund", b = "servedAt", _ = "isTakeaway", A = "quantity", D = "unitQuantity", $ = "billAdjustmentTotal", q = "itemAdjustmentTotal", S = "grossTotal", T = "takeawayPrice", C = "nettTotal", F = "layerNettTotal", B = "layerBillAdjustmentTotal", v = "layerItemAdjustmentTotal", I = "layerGrossTotal", J = "layerTakeawayPrice", H = "layerTaxTotal", Y = "layerScTotal", j = "layerOtherChargeTotal", A0 = "customAttributes", a0 = "layerZeroParentId", Q0 = "collectedAt", K0 = "subCategories", t1 = "billAdjustmentInclusiveTaxTotal", a1 = "itemAdjustmentInclusiveTaxTotal", X0 = "layerBillAdjustmentInclusiveTaxTotal", r1 = "layerItemAdjustmentInclusiveTaxTotal", i1 = "billAdjustmentExclusiveTaxTotal", p1 = "itemAdjustmentExclusiveTaxTotal", M1 = "layerBillAdjustmentExclusiveTaxTotal", s1 = "layerItemAdjustmentExclusiveTaxTotal", A1 = "priceGroup", fe = "originalPrice", Je = "catalogId", ye = "baseItemPrice", He = "catalogName";
9201
9201
  return t._setArrayType([t.Field_Field$string(e, e, !1, !1, !1, "ID", "id", "_id", e, r), t.Field_Field$string(e, e, !0, !1, !1, e, "docId", "_docId", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Restaurant ID", "restaurantId", "_restaurantId", e, r), t.Field_Field$timestamp(e, e, !1, !1, "Time", "createdAt", "_createdAt", e, r), t.Field_Field$timestamp(e, e, !0, !1, e, "publishedAt", "_publishedAt", e, r), t.Field_Field$timestamp(e, e, !1, !1, "Item time", n, n, e, r), t.Field_Field$timestamp(e, e, !1, !1, "Bill close time", a, a, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Bill ID", "billId", "billId", e, r), t.Field_Field$string("Values: DRAFT, VOIDED, SENT. DRAFT and SENT both considered valid sales.", e, !1, !1, !1, "Status", "status", "status", e, r), t.Field_Field$string(e, e, !1, !1, !0, "Name", "name", "name", e, r), t.Field_Field$numeric(e, e, !1, !1, "Per unit", o, o, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Unit", "unit", "unit", e, r), t.Field_Field$string(e, `IF(@categoryName IS NULL OR @productId IS NULL OR REGEXP_CONTAINS(@productId, r'^\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d\\.\\d+([+-][0-2]\\d:[0-5]\\d|Z)$'), 'Other', @categoryName)
9202
9202
  `, !1, !1, !0, "Category", "categoryName", "category", `CASE WHEN @category_name IS NULL OR @product_id IS NULL OR @product_id ~ '^\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d\\.\\d+([+-][0-2]\\d:[0-5]\\d|Z)$' THEN 'Other' ELSE @category_name END
9203
- `, r), t.Field_Field$string(e, e, !1, !1, !1, "Takeaway ID", s, s, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Takeaway name", u, u, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Code", "code", "code", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Remark", "remark", "remark", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Product ID", p, p, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Variant ID", "variantId", "variant.id", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Variant", "variantName", "variant.name", e, r), t.Field_Field$bool(e, e, !1, !1, "Refund", c, c, e, r), t.Field_Field$string(e, e, !1, !1, !1, "User id", "createdById", "createdBy.id", e, r), t.Field_Field$string(e, e, !1, !1, !1, "User", "createdByName", "createdBy.name", e, r), t.Field_Field$timestamp(e, e, !1, !1, "Sent time", "sentAt", "sentAt", e, r), t.Field_Field$timestamp(e, e, !1, !1, "Served time", b, b, e, r), t.Field_Field$timestamp(e, e, !1, !1, "Printed time", "printedAt", "printBy.printAt", e, r), t.Field_Field$timestamp(e, e, !1, !1, "Void time", "voidAt", "void.voidAt", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Void reason", "voidReason", "void.reason", e, r), t.Field_Field$string(e, e, !0, !1, !1, e, "voidedById", "void.by.id", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Void user", "voidedByName", "void.by.name", e, r), t.Field_Field$string(e, e, !0, !1, !1, e, "voidApprovedById", "void.approvedBy.id", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Void approver", "voidApprovedByName", "void.approvedBy.name", e, r), t.Field_Field$bool(e, e, !0, !1, "SST before discount", "sstBeforeDiscount", "sst.beforeDiscount", e, r), t.Field_Field$bool(e, e, !0, !1, "SC before discount", "serviceChargeBeforeDiscount", "sc.beforeDiscount", e, r), t.Field_Field$bool(e, e, !1, !1, "Takeaway", _, _, e, r), t.Field_Field$numeric(e, "@quantity*IF(@isRefund, -1, 1)", !1, !1, "Qty", A, A, R.x40quant, r), t.Field_Field$numeric(e, "@unitQuantity*IF(@isRefund, -1, 1)", !1, !1, "Unit qty", D, D, R.x40unit_, r), t.Field_Field$numeric(e, "@sstTotal*IF(@isRefund, -1, 1)", !1, !1, "SST", "sstTotal", "sst.total", R.x40sst_t, r), t.Field_Field$numeric(e, e, !0, !1, "SST %", "sstPercentage", "sst.percentage", e, r), t.Field_Field$numeric(e, e, !0, !1, "SC %", "serviceChargePercentage", "sc.percentage", e, r), t.Field_Field$numeric(e, "@serviceChargeTotal*IF(@isRefund, -1, 1)", !1, !1, "SC", "serviceChargeTotal", "sc.total", R.x40servi, r), t.Field_Field$numeric(e, "@otherChargeTotal*IF(@isRefund, -1, 1)", !1, !1, "Other charge", "otherChargeTotal", "otherCharge.total", R.x40other, r), t.Field_Field$numeric(e, R.x40billA, !1, !1, "Bill discount", $, $, R.x40bill_, r), t.Field_Field$numeric(e, R.x40itemA, !1, !1, "Item discount", q, q, R.x40item_, r), t.Field_Field$numeric(e, "@grossTotal*IF(@isRefund, -1, 1)", !1, !1, "Gross", h, h, R.x40gross, r), t.Field_Field$numeric(e, R.x28_grosT, !1, !1, "Gross w/ takeaway", "grossTotalWithoutTakeaway", e, R.x28_gros_, r), t.Field_Field$numeric(e, "@takeawayPrice*IF(@isRefund, -1, 1)", !1, !1, "Takeaway price", T, T, R.x40takea, r), t.Field_Field$numeric(e, "@nettTotal*IF(@isRefund, -1, 1)", !1, !1, "Nett", C, C, R.x40nett_, r), t.Field_Field$string(e, e, !1, !1, !1, "Parent ID", "parentId", "parent.id", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Parent name", "parentName", "parent.name", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Addon type", "addonType", "addon.type", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Addon ID", "addonId", "addon.selectionId", e, r), t.Field_Field$string(e, "SPLIT(@addonId, '/')[OFFSET(0)]", !1, !1, !1, "Group ID", "groupId", e, "SPLIT_PART(@addon_id, '/',1)", r), t.Field_Field$numeric("Item depth: 0 = main item. 1+ = addon/modifier level. -1 = bill level modifier, usually not consider item sales.", e, !1, !1, "Layer", "layer", "layer", e, r), t.Field_Field$numeric(e, "@addonPrice*IF(@isRefund, -1, 1)", !1, !1, "Addon price", "addonPrice", "addon.price", R.x40addon, r), t.Field_Field$numeric(e, R.IFNULLtax, !1, !1, "Tax", "taxTotal", "tax.total", R.COALEStax_, r), t.Field_Field$numeric(e, R.x28IFNULb, !1, !1, "Discount", "discountTotal", e, R.x28COALEb, r), t.Field_Field$numeric(e, R.x28IFNULgx2b, !1, !1, "Gross before charges", "grossBeforeCharges", e, R.x28COALEgx2b, r), t.Field_Field$string(e, "CONCAT(@quantity,'x ',ARRAY_TO_STRING([IF(@code='', NULL, @code), @name], ' '))", !1, !1, !1, "Summary", "summary", e, "CONCAT(@quantity,'x ',ARRAY_TO_STRING(ARRAY[CASE WHEN @code='' THEN NULL ELSE @code END, @name], ' '))", r), t.Field_Field$numeric(e, "@layerNettTotal*IF(@isRefund, -1, 1)", !1, !1, "Layer nett", F, F, "@layer_nett_total*CASE WHEN @is_refund THEN -1 ELSE 1 END", r), t.Field_Field$numeric(e, "@layerBillAdjustmentTotal*IF(@isRefund, -1, 1)", !1, !1, "Layer bill discount", B, B, "@layer_bill_adjustment_total*CASE WHEN @is_refund THEN -1 ELSE 1 END", r), t.Field_Field$numeric(e, "@layerItemAdjustmentTotal*IF(@isRefund, -1, 1)", !1, !1, "Layer item discount", v, v, "@layer_item_adjustment_total*CASE WHEN @is_refund THEN -1 ELSE 1 END", r), t.Field_Field$numeric(e, "@layerGrossTotal*IF(@isRefund, -1, 1)", !1, !1, "Layer gross total", I, I, "@layer_gross_total*CASE WHEN @is_refund THEN -1 ELSE 1 END", r), t.Field_Field$numeric(e, "@layerTakeawayPrice*IF(@isRefund, -1, 1)", !1, !1, "Layer takeaway price", J, J, "@layer_takeaway_price*CASE WHEN @is_refund THEN -1 ELSE 1 END", r), t.Field_Field$numeric(e, "@layerTaxTotal*IF(@isRefund, -1, 1)", !1, !1, "Layer tax total", H, H, "@layer_tax_total*CASE WHEN @is_refund THEN -1 ELSE 1 END", r), t.Field_Field$numeric(e, "@layerScTotal*IF(@isRefund, -1, 1)", !1, !1, "Layer sc", Y, Y, "@layer_sc_total*CASE WHEN @is_refund THEN -1 ELSE 1 END", r), t.Field_Field$numeric(e, "@layerOtherChargeTotal*IF(@isRefund, -1, 1)", !1, !1, "Layer other charge", j, j, "@layer_other_charge_total*CASE WHEN @is_refund THEN -1 ELSE 1 END", r), t.Field_Field$numeric(e, "(IFNULL(@layerGrossTotal,0)+IFNULL(@layerBillAdjustmentTotal,0)+IFNULL(@layerItemAdjustmentTotal,0))*IF(@isRefund, -1, 1)", !1, !1, "Layer gross before charges", "layerGrossBeforeCharges", e, "(COALESCE(@layer_gross_total,0)+COALESCE(@layer_bill_adjustment_total,0)+COALESCE(@layer_item_adjustment_total,0))*CASE WHEN @is_refund THEN -1 ELSE 1 END", r), t.Field_Field$string(e, e, !1, !1, !1, "Custom attributes", A0, A0, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Layer 0 parent ID", a0, a0, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Charge variant", "chargeVariant", e, "(select variant from charges where charges.parent_id=@layer_zero_parent_id and charges.restaurant_id=@restaurant_id and charges.bill_id=@bill_id and charges.code != 'SERVICE_CHARGE')", r), t.Field_Field$timestamp(e, e, !1, !1, "Collected time", Q0, Q0, e, r), t.Field_Field$numeric(e, e, !1, !1, "Costing", "costing", "costing", e, r), t.Field_Field$numeric(e, "ROUND(TIMESTAMP_DIFF(IFNULL(@servedAt, CURRENT_TIMESTAMP), @sentAt, SECOND),0)", !1, !1, "Preparation seconds", "preparationSeconds", e, "ROUND(EXTRACT(EPOCH FROM AGE(COALESCE(@served_at, CURRENT_TIMESTAMP),@sent_at)),0)", r), t.Field_Field$numeric("Computed: nett total minus costing", "((@nettTotal-coalesce(@costing, 0))*IF(@isRefund, -1, 1))", !1, !1, "Profit", "profit", e, "((@nett_total-coalesce(@costing, 0))*CASE WHEN @is_refund THEN -1 ELSE 1 END)", r), t.Field_Field$string(e, e, !1, !1, !1, "Layer 0 parent name", "layerZeroParentName", e, "(select name from flatten_items where flatten_items.id=@layer_zero_parent_id and flatten_items.restaurant_id=@restaurant_id and flatten_items.bill_id=@bill_id)", r), t.Field_Field$string(e, e, !1, !1, !1, "Layer 0 parent code", "layerZeroParentCode", e, "(select code from flatten_items where flatten_items.id=@layer_zero_parent_id and flatten_items.restaurant_id=@restaurant_id and flatten_items.bill_id=@bill_id)", r), t.Field_Field$string(e, e, !1, !1, !1, "Layer 0 parent category", "layerZeroParentCategory", e, "(select category_name from flatten_items where flatten_items.id=@layer_zero_parent_id and flatten_items.restaurant_id=@restaurant_id and flatten_items.bill_id=@bill_id)", r), t.Field_Field$string(e, e, !1, !1, !1, "Sub categories", K0, K0, e, r), t.Field_Field$numeric(e, "@billAdjustmentInclusiveTaxTotal*IF(@isRefund, -1, 1)", !1, !1, "Bill discount inc tax", t1, t1, "@bill_adjustment_inclusive_tax_total*CASE WHEN @is_refund THEN -1 ELSE 1 END", r), t.Field_Field$numeric(e, "@itemAdjustmentInclusiveTaxTotal*IF(@isRefund, -1, 1)", !1, !1, "Item discount inc tax", a1, a1, "@item_adjustment_inclusive_tax_total*CASE WHEN @is_refund THEN -1 ELSE 1 END", r), t.Field_Field$numeric(e, "@layerBillAdjustmentInclusiveTaxTotal*IF(@isRefund, -1, 1)", !1, !1, "Layer bill discount inc tax", X0, X0, "@layer_bill_adjustment_inclusive_tax_total*CASE WHEN @is_refund THEN -1 ELSE 1 END", r), t.Field_Field$numeric(e, "@layerItemAdjustmentInclusiveTaxTotal*IF(@isRefund, -1, 1)", !1, !1, "Layer item discount inc tax", r1, r1, "@layer_item_adjustment_inclusive_tax_total*CASE WHEN @is_refund THEN -1 ELSE 1 END", r), t.Field_Field$numeric(e, "@billAdjustmentExclusiveTaxTotal*IF(@isRefund, -1, 1)", !1, !1, "Bill discount exc tax", i1, i1, "@bill_adjustment_exclusive_tax_total*CASE WHEN @is_refund THEN -1 ELSE 1 END", r), t.Field_Field$numeric(e, "@itemAdjustmentExclusiveTaxTotal*IF(@isRefund, -1, 1)", !1, !1, "Item discount exc tax", p1, p1, "@item_adjustment_exclusive_tax_total*CASE WHEN @is_refund THEN -1 ELSE 1 END", r), t.Field_Field$numeric(e, "@layerBillAdjustmentExclusiveTaxTotal*IF(@isRefund, -1, 1)", !1, !1, "Layer bill discount exc tax", M1, M1, "@layer_bill_adjustment_exclusive_tax_total*CASE WHEN @is_refund THEN -1 ELSE 1 END", r), t.Field_Field$numeric(e, "@layerItemAdjustmentExclusiveTaxTotal*IF(@isRefund, -1, 1)", !1, !1, "Layer item discount exc tax", s1, s1, "@layer_item_adjustment_exclusive_tax_total*CASE WHEN @is_refund THEN -1 ELSE 1 END", r), t.Field_Field$string(e, "IF(@variantId IS NULL OR @variantId = '', @productId, CONCAT(@productId, '/', @variantId))", !0, !1, !1, "Menu item ID", "menuItemId", e, "CASE WHEN @variant_id IS NULL OR @variant_id = '' THEN @product_id ELSE @product_id || '/' || @variant_id END", r), t.Field_Field$string("Special-price tier when a member/promotion PRICE_CHANGE effect set the item price (e.g. vip). Null for normal sales.", e, !1, !1, !1, "Price group", A1, A1, e, r), t.Field_Field$numeric(e, e, !1, !1, "Original price", fe, fe, e, r), t.Field_Field$numeric(e, e, !1, !1, "Price", "price", "price", e, r), t.Field_Field$numeric("Sold price minus original price, per unit (not multiplied by quantity). Positive means marked up. Non-zero for member/promotion price tiers, open price (original price is 0, so this equals the full price) and manual overrides. Null when either side is unknown.", "@price - @originalPrice", !1, !1, "Price difference", "priceDifference", e, "@price - @original_price", r), t.Field_Field$string(e, e, !1, !1, !1, "Addons", "addons", e, "(select string_agg(distinct name, ',' order by name) from flatten_items where flatten_items.parent_id=@id and flatten_items.restaurant_id=@restaurant_id)", r), t.Field_Field$string("Catalog used at order time. Null means not recorded; an empty string means the base menu.", e, !1, !1, !1, "Catalog ID", Je, Je, e, r), t.Field_Field$numeric("Item price in the base menu at order time, before catalog markup or overrides.", e, !1, !1, "Base item price", ye, ye, e, r), t.Field_Field$string("Catalog name recorded on the item at order time.", e, !1, !1, !1, "Catalog name", He, He, e, r)], z.JSArray_Field);
9203
+ `, r), t.Field_Field$string(e, e, !1, !1, !1, "Takeaway ID", s, s, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Takeaway name", u, u, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Code", "code", "code", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Remark", "remark", "remark", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Product ID", p, p, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Variant ID", "variantId", "variant.id", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Variant", "variantName", "variant.name", e, r), t.Field_Field$bool(e, e, !1, !1, "Refund", c, c, e, r), t.Field_Field$string(e, e, !1, !1, !1, "User id", "createdById", "createdBy.id", e, r), t.Field_Field$string(e, e, !1, !1, !1, "User", "createdByName", "createdBy.name", e, r), t.Field_Field$timestamp(e, e, !1, !1, "Sent time", "sentAt", "sentAt", e, r), t.Field_Field$timestamp(e, e, !1, !1, "Served time", b, b, e, r), t.Field_Field$timestamp(e, e, !1, !1, "Printed time", "printedAt", "printBy.printAt", e, r), t.Field_Field$timestamp(e, e, !1, !1, "Void time", "voidAt", "void.voidAt", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Void reason", "voidReason", "void.reason", e, r), t.Field_Field$string(e, e, !0, !1, !1, e, "voidedById", "void.by.id", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Void user", "voidedByName", "void.by.name", e, r), t.Field_Field$string(e, e, !0, !1, !1, e, "voidApprovedById", "void.approvedBy.id", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Void approver", "voidApprovedByName", "void.approvedBy.name", e, r), t.Field_Field$bool(e, e, !0, !1, "SST before discount", "sstBeforeDiscount", "sst.beforeDiscount", e, r), t.Field_Field$bool(e, e, !0, !1, "SC before discount", "serviceChargeBeforeDiscount", "sc.beforeDiscount", e, r), t.Field_Field$bool(e, e, !1, !1, "Takeaway", _, _, e, r), t.Field_Field$numeric(e, "@quantity*IF(@isRefund, -1, 1)", !1, !1, "Qty", A, A, R.x40quant, r), t.Field_Field$numeric(e, "@unitQuantity*IF(@isRefund, -1, 1)", !1, !1, "Unit qty", D, D, R.x40unit_, r), t.Field_Field$numeric(e, "@sstTotal*IF(@isRefund, -1, 1)", !1, !1, "SST", "sstTotal", "sst.total", R.x40sst_t, r), t.Field_Field$numeric(e, e, !0, !1, "SST %", "sstPercentage", "sst.percentage", e, r), t.Field_Field$numeric(e, e, !0, !1, "SC %", "serviceChargePercentage", "sc.percentage", e, r), t.Field_Field$numeric(e, "@serviceChargeTotal*IF(@isRefund, -1, 1)", !1, !1, "SC", "serviceChargeTotal", "sc.total", R.x40servi, r), t.Field_Field$numeric(e, "@otherChargeTotal*IF(@isRefund, -1, 1)", !1, !1, "Other charge", "otherChargeTotal", "otherCharge.total", R.x40other, r), t.Field_Field$numeric(e, R.x40billA, !1, !1, "Bill discount", $, $, R.x40bill_, r), t.Field_Field$numeric(e, R.x40itemA, !1, !1, "Item discount", q, q, R.x40item_, r), t.Field_Field$numeric(e, "@grossTotal*IF(@isRefund, -1, 1)", !1, !1, "Gross", S, S, R.x40gross, r), t.Field_Field$numeric(e, R.x28_grosT, !1, !1, "Gross w/ takeaway", "grossTotalWithoutTakeaway", e, R.x28_gros_, r), t.Field_Field$numeric(e, "@takeawayPrice*IF(@isRefund, -1, 1)", !1, !1, "Takeaway price", T, T, R.x40takea, r), t.Field_Field$numeric(e, "@nettTotal*IF(@isRefund, -1, 1)", !1, !1, "Nett", C, C, R.x40nett_, r), t.Field_Field$string(e, e, !1, !1, !1, "Parent ID", "parentId", "parent.id", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Parent name", "parentName", "parent.name", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Addon type", "addonType", "addon.type", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Addon ID", "addonId", "addon.selectionId", e, r), t.Field_Field$string(e, "SPLIT(@addonId, '/')[OFFSET(0)]", !1, !1, !1, "Group ID", "groupId", e, "SPLIT_PART(@addon_id, '/',1)", r), t.Field_Field$numeric("Item depth: 0 = main item. 1+ = addon/modifier level. -1 = bill level modifier, usually not consider item sales.", e, !1, !1, "Layer", "layer", "layer", e, r), t.Field_Field$numeric(e, "@addonPrice*IF(@isRefund, -1, 1)", !1, !1, "Addon price", "addonPrice", "addon.price", R.x40addon, r), t.Field_Field$numeric(e, R.IFNULLtax, !1, !1, "Tax", "taxTotal", "tax.total", R.COALEStax_, r), t.Field_Field$numeric(e, R.x28IFNULb, !1, !1, "Discount", "discountTotal", e, R.x28COALEb, r), t.Field_Field$numeric(e, R.x28IFNULgx2b, !1, !1, "Gross before charges", "grossBeforeCharges", e, R.x28COALEgx2b, r), t.Field_Field$string(e, "CONCAT(@quantity,'x ',ARRAY_TO_STRING([IF(@code='', NULL, @code), @name], ' '))", !1, !1, !1, "Summary", "summary", e, "CONCAT(@quantity,'x ',ARRAY_TO_STRING(ARRAY[CASE WHEN @code='' THEN NULL ELSE @code END, @name], ' '))", r), t.Field_Field$numeric(e, "@layerNettTotal*IF(@isRefund, -1, 1)", !1, !1, "Layer nett", F, F, "@layer_nett_total*CASE WHEN @is_refund THEN -1 ELSE 1 END", r), t.Field_Field$numeric(e, "@layerBillAdjustmentTotal*IF(@isRefund, -1, 1)", !1, !1, "Layer bill discount", B, B, "@layer_bill_adjustment_total*CASE WHEN @is_refund THEN -1 ELSE 1 END", r), t.Field_Field$numeric(e, "@layerItemAdjustmentTotal*IF(@isRefund, -1, 1)", !1, !1, "Layer item discount", v, v, "@layer_item_adjustment_total*CASE WHEN @is_refund THEN -1 ELSE 1 END", r), t.Field_Field$numeric(e, "@layerGrossTotal*IF(@isRefund, -1, 1)", !1, !1, "Layer gross total", I, I, "@layer_gross_total*CASE WHEN @is_refund THEN -1 ELSE 1 END", r), t.Field_Field$numeric(e, "@layerTakeawayPrice*IF(@isRefund, -1, 1)", !1, !1, "Layer takeaway price", J, J, "@layer_takeaway_price*CASE WHEN @is_refund THEN -1 ELSE 1 END", r), t.Field_Field$numeric(e, "@layerTaxTotal*IF(@isRefund, -1, 1)", !1, !1, "Layer tax total", H, H, "@layer_tax_total*CASE WHEN @is_refund THEN -1 ELSE 1 END", r), t.Field_Field$numeric(e, "@layerScTotal*IF(@isRefund, -1, 1)", !1, !1, "Layer sc", Y, Y, "@layer_sc_total*CASE WHEN @is_refund THEN -1 ELSE 1 END", r), t.Field_Field$numeric(e, "@layerOtherChargeTotal*IF(@isRefund, -1, 1)", !1, !1, "Layer other charge", j, j, "@layer_other_charge_total*CASE WHEN @is_refund THEN -1 ELSE 1 END", r), t.Field_Field$numeric(e, "(IFNULL(@layerGrossTotal,0)+IFNULL(@layerBillAdjustmentTotal,0)+IFNULL(@layerItemAdjustmentTotal,0))*IF(@isRefund, -1, 1)", !1, !1, "Layer gross before charges", "layerGrossBeforeCharges", e, "(COALESCE(@layer_gross_total,0)+COALESCE(@layer_bill_adjustment_total,0)+COALESCE(@layer_item_adjustment_total,0))*CASE WHEN @is_refund THEN -1 ELSE 1 END", r), t.Field_Field$string(e, e, !1, !1, !1, "Custom attributes", A0, A0, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Layer 0 parent ID", a0, a0, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Charge variant", "chargeVariant", e, "(select variant from charges where charges.parent_id=@layer_zero_parent_id and charges.restaurant_id=@restaurant_id and charges.bill_id=@bill_id and charges.code != 'SERVICE_CHARGE')", r), t.Field_Field$timestamp(e, e, !1, !1, "Collected time", Q0, Q0, e, r), t.Field_Field$numeric(e, e, !1, !1, "Costing", "costing", "costing", e, r), t.Field_Field$numeric(e, "ROUND(TIMESTAMP_DIFF(IFNULL(@servedAt, CURRENT_TIMESTAMP), @sentAt, SECOND),0)", !1, !1, "Preparation seconds", "preparationSeconds", e, "ROUND(EXTRACT(EPOCH FROM AGE(COALESCE(@served_at, CURRENT_TIMESTAMP),@sent_at)),0)", r), t.Field_Field$numeric("Computed: nett total minus costing", "((@nettTotal-coalesce(@costing, 0))*IF(@isRefund, -1, 1))", !1, !1, "Profit", "profit", e, "((@nett_total-coalesce(@costing, 0))*CASE WHEN @is_refund THEN -1 ELSE 1 END)", r), t.Field_Field$string(e, e, !1, !1, !1, "Layer 0 parent name", "layerZeroParentName", e, "(select name from flatten_items where flatten_items.id=@layer_zero_parent_id and flatten_items.restaurant_id=@restaurant_id and flatten_items.bill_id=@bill_id)", r), t.Field_Field$string(e, e, !1, !1, !1, "Layer 0 parent code", "layerZeroParentCode", e, "(select code from flatten_items where flatten_items.id=@layer_zero_parent_id and flatten_items.restaurant_id=@restaurant_id and flatten_items.bill_id=@bill_id)", r), t.Field_Field$string(e, e, !1, !1, !1, "Layer 0 parent category", "layerZeroParentCategory", e, "(select category_name from flatten_items where flatten_items.id=@layer_zero_parent_id and flatten_items.restaurant_id=@restaurant_id and flatten_items.bill_id=@bill_id)", r), t.Field_Field$string(e, e, !1, !1, !1, "Sub categories", K0, K0, e, r), t.Field_Field$numeric(e, "@billAdjustmentInclusiveTaxTotal*IF(@isRefund, -1, 1)", !1, !1, "Bill discount inc tax", t1, t1, "@bill_adjustment_inclusive_tax_total*CASE WHEN @is_refund THEN -1 ELSE 1 END", r), t.Field_Field$numeric(e, "@itemAdjustmentInclusiveTaxTotal*IF(@isRefund, -1, 1)", !1, !1, "Item discount inc tax", a1, a1, "@item_adjustment_inclusive_tax_total*CASE WHEN @is_refund THEN -1 ELSE 1 END", r), t.Field_Field$numeric(e, "@layerBillAdjustmentInclusiveTaxTotal*IF(@isRefund, -1, 1)", !1, !1, "Layer bill discount inc tax", X0, X0, "@layer_bill_adjustment_inclusive_tax_total*CASE WHEN @is_refund THEN -1 ELSE 1 END", r), t.Field_Field$numeric(e, "@layerItemAdjustmentInclusiveTaxTotal*IF(@isRefund, -1, 1)", !1, !1, "Layer item discount inc tax", r1, r1, "@layer_item_adjustment_inclusive_tax_total*CASE WHEN @is_refund THEN -1 ELSE 1 END", r), t.Field_Field$numeric(e, "@billAdjustmentExclusiveTaxTotal*IF(@isRefund, -1, 1)", !1, !1, "Bill discount exc tax", i1, i1, "@bill_adjustment_exclusive_tax_total*CASE WHEN @is_refund THEN -1 ELSE 1 END", r), t.Field_Field$numeric(e, "@itemAdjustmentExclusiveTaxTotal*IF(@isRefund, -1, 1)", !1, !1, "Item discount exc tax", p1, p1, "@item_adjustment_exclusive_tax_total*CASE WHEN @is_refund THEN -1 ELSE 1 END", r), t.Field_Field$numeric(e, "@layerBillAdjustmentExclusiveTaxTotal*IF(@isRefund, -1, 1)", !1, !1, "Layer bill discount exc tax", M1, M1, "@layer_bill_adjustment_exclusive_tax_total*CASE WHEN @is_refund THEN -1 ELSE 1 END", r), t.Field_Field$numeric(e, "@layerItemAdjustmentExclusiveTaxTotal*IF(@isRefund, -1, 1)", !1, !1, "Layer item discount exc tax", s1, s1, "@layer_item_adjustment_exclusive_tax_total*CASE WHEN @is_refund THEN -1 ELSE 1 END", r), t.Field_Field$string(e, "IF(@variantId IS NULL OR @variantId = '', @productId, CONCAT(@productId, '/', @variantId))", !0, !1, !1, "Menu item ID", "menuItemId", e, "CASE WHEN @variant_id IS NULL OR @variant_id = '' THEN @product_id ELSE @product_id || '/' || @variant_id END", r), t.Field_Field$string("Special-price tier when a member/promotion PRICE_CHANGE effect set the item price (e.g. vip). Null for normal sales.", e, !1, !1, !1, "Price group", A1, A1, e, r), t.Field_Field$numeric(e, e, !1, !1, "Original price", fe, fe, e, r), t.Field_Field$numeric(e, e, !1, !1, "Price", "price", "price", e, r), t.Field_Field$numeric("Sold price minus original price, per unit (not multiplied by quantity). Positive means marked up. Non-zero for member/promotion price tiers, open price (original price is 0, so this equals the full price) and manual overrides. Null when either side is unknown.", "@price - @originalPrice", !1, !1, "Price difference", "priceDifference", e, "@price - @original_price", r), t.Field_Field$string(e, e, !1, !1, !1, "Addons", "addons", e, "(select string_agg(distinct name || coalesce(' (' || nullif(variant_name, '') || ')', ''), ',' order by name || coalesce(' (' || nullif(variant_name, '') || ')', '')) from flatten_items where flatten_items.parent_id=@id and flatten_items.restaurant_id=@restaurant_id)", r), t.Field_Field$string("Catalog used at order time. Null means not recorded; an empty string means the base menu.", e, !1, !1, !1, "Catalog ID", Je, Je, e, r), t.Field_Field$numeric("Item price in the base menu at order time, before catalog markup or overrides.", e, !1, !1, "Base item price", ye, ye, e, r), t.Field_Field$string("Catalog name recorded on the item at order time.", e, !1, !1, !1, "Catalog name", He, He, e, r)], z.JSArray_Field);
9204
9204
  },
9205
9205
  $signature: 0
9206
9206
  }, t.flattenItemSchema_closure0.prototype = {
@@ -9354,8 +9354,8 @@ Arguments: [` + c + "]";
9354
9354
  $signature: 1
9355
9355
  }, t.inventoryAdjustmentSkuSchema_closure.prototype = {
9356
9356
  call$1(r) {
9357
- var e = null, n = "locationId", a = "inventoryAdjustmentId", o = "fromBalance", s = "toBalance", u = "unitPrecision", p = "unitName", c = "unitAbbrev", b = "amountCost", _ = "fromBalanceCost", A = "toBalanceCost", D = "trackingAmount", $ = "trackingUnitName", q = "trackingUnitAbbrev", h = "conversion", T = "customAttributes", C = "defaultCostPerUnit";
9358
- return t._setArrayType([t.Field_Field$string(e, e, !1, !1, !1, "ID", "id", "_id", e, r), t.Field_Field$string(e, e, !0, !1, !1, e, "docId", "_docId", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Restaurant ID", "restaurantId", "_restaurantId", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Warehouse ID", "warehouseId", "_warehouseId", e, r), t.Field_Field$timestamp(e, e, !1, !1, "Time", "createdAt", "_createdAt", e, r), t.Field_Field$timestamp(e, e, !0, !1, e, "publishedAt", "_publishedAt", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Location ID", n, n, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Inventory Adjustment ID", a, a, e, r), t.Field_Field$numeric("Stock quantity change. Positive = in, negative = out", e, !1, !1, "Amount", "amount", "amount", e, r), t.Field_Field$numeric(e, "IF(@amount>=0, @amount, 0)", !1, !1, "In", "in", e, R.CASE_Wx40ax3e, r), t.Field_Field$numeric(e, "IF(@amount<0, @amount, 0)", !1, !1, "Out", "out", e, R.CASE_Wx40ax3c, r), t.Field_Field$string(e, e, !1, !1, !1, "Remark", "remark", "remark", e, r), t.Field_Field$string("Values: SALES, DAMAGE, PURCHASE, TRANSFER, ADJUSTMENT, OPENING, PRODUCTION", e, !1, !1, !1, "Type", "type", "type", e, r), t.Field_Field$numeric(e, e, !1, !1, "From balance", o, o, e, r), t.Field_Field$numeric(e, e, !1, !1, "To balance", s, s, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Name", "name", "name", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Code", "code", "code", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Unit ID", "unitId", "unitId", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Unit Precision", u, u, e, r), t.Field_Field$string(e, e, !1, !1, !1, "SKU ID", "skuId", "skuId", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Unit", p, p, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Unit abbrev.", c, c, e, r), t.Field_Field$numeric(e, e, !1, !1, "Amount cost", b, b, "case when @amount<0 then -@amount_cost else @amount_cost end", r), t.Field_Field$numeric(e, e, !1, !1, "From balance cost", _, _, e, r), t.Field_Field$numeric(e, e, !1, !1, "To balance cost", A, A, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Name (unit)", "nameUnit", e, "concat(@name,' (',@unit_abbrev,')')", r), t.Field_Field$numeric(e, e, !1, !1, "Daily consumption", "dailyConsumption", e, "(sum(@amount) filter (where type in ('SALES','DAMAGE')) over (partition by @name)/(EXTRACT(DAY FROM (!end - !start))+1))", r), t.Field_Field$numeric(e, e, !1, !1, "Days outstanding", "daysOutstanding", e, "-(last_value(@to_balance) over (partition by @name order by @created_at asc ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING)/(sum(@amount) filter (where type in ('SALES','DAMAGE')) over (partition by @name)/(EXTRACT(DAY FROM (!end - !start))+1)))", r), t.Field_Field$numeric(e, e, !1, !1, "Tracking amount", D, D, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Tracking unit", $, $, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Tracking unit abbrev.", q, q, e, r), t.Field_Field$numeric(e, e, !1, !1, "Conversion", h, h, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Custom attributes", T, T, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Ref", "ref", "ref", e, r), t.Field_Field$numeric(e, e, !1, !1, "Default unit cost", C, C, e, r), t.Field_Field$bool(e, e, !1, !1, "From closing template", "fromClosingTemplate", e, "((select 1 from closing_draft_skus where closing_adjustment_id = @inventory_adjustment_id and sku_id = @sku_id limit 1) is not null)", r), t.Field_Field$numeric(e, e, !1, !1, "Default cost", "defaultCost", e, "@default_cost_per_unit*@amount", r)], z.JSArray_Field);
9357
+ var e = null, n = "locationId", a = "inventoryAdjustmentId", o = "fromBalance", s = "toBalance", u = "unitPrecision", p = "unitName", c = "unitAbbrev", b = "amountCost", _ = "fromBalanceCost", A = "toBalanceCost", D = "trackingAmount", $ = "trackingUnitName", q = "trackingUnitAbbrev", S = "conversion", T = "customAttributes", C = "defaultCostPerUnit";
9358
+ return t._setArrayType([t.Field_Field$string(e, e, !1, !1, !1, "ID", "id", "_id", e, r), t.Field_Field$string(e, e, !0, !1, !1, e, "docId", "_docId", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Restaurant ID", "restaurantId", "_restaurantId", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Warehouse ID", "warehouseId", "_warehouseId", e, r), t.Field_Field$timestamp(e, e, !1, !1, "Time", "createdAt", "_createdAt", e, r), t.Field_Field$timestamp(e, e, !0, !1, e, "publishedAt", "_publishedAt", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Location ID", n, n, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Inventory Adjustment ID", a, a, e, r), t.Field_Field$numeric("Stock quantity change. Positive = in, negative = out", e, !1, !1, "Amount", "amount", "amount", e, r), t.Field_Field$numeric(e, "IF(@amount>=0, @amount, 0)", !1, !1, "In", "in", e, R.CASE_Wx40ax3e, r), t.Field_Field$numeric(e, "IF(@amount<0, @amount, 0)", !1, !1, "Out", "out", e, R.CASE_Wx40ax3c, r), t.Field_Field$string(e, e, !1, !1, !1, "Remark", "remark", "remark", e, r), t.Field_Field$string("Values: SALES, DAMAGE, PURCHASE, TRANSFER, ADJUSTMENT, OPENING, PRODUCTION", e, !1, !1, !1, "Type", "type", "type", e, r), t.Field_Field$numeric(e, e, !1, !1, "From balance", o, o, e, r), t.Field_Field$numeric(e, e, !1, !1, "To balance", s, s, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Name", "name", "name", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Code", "code", "code", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Unit ID", "unitId", "unitId", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Unit Precision", u, u, e, r), t.Field_Field$string(e, e, !1, !1, !1, "SKU ID", "skuId", "skuId", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Unit", p, p, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Unit abbrev.", c, c, e, r), t.Field_Field$numeric(e, e, !1, !1, "Amount cost", b, b, "case when @amount<0 then -@amount_cost else @amount_cost end", r), t.Field_Field$numeric(e, e, !1, !1, "From balance cost", _, _, e, r), t.Field_Field$numeric(e, e, !1, !1, "To balance cost", A, A, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Name (unit)", "nameUnit", e, "concat(@name,' (',@unit_abbrev,')')", r), t.Field_Field$numeric(e, e, !1, !1, "Daily consumption", "dailyConsumption", e, "(sum(@amount) filter (where type in ('SALES','DAMAGE')) over (partition by @name)/(EXTRACT(DAY FROM (!end - !start))+1))", r), t.Field_Field$numeric(e, e, !1, !1, "Days outstanding", "daysOutstanding", e, "-(last_value(@to_balance) over (partition by @name order by @created_at asc ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING)/(sum(@amount) filter (where type in ('SALES','DAMAGE')) over (partition by @name)/(EXTRACT(DAY FROM (!end - !start))+1)))", r), t.Field_Field$numeric(e, e, !1, !1, "Tracking amount", D, D, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Tracking unit", $, $, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Tracking unit abbrev.", q, q, e, r), t.Field_Field$numeric(e, e, !1, !1, "Conversion", S, S, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Custom attributes", T, T, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Ref", "ref", "ref", e, r), t.Field_Field$numeric(e, e, !1, !1, "Default unit cost", C, C, e, r), t.Field_Field$bool(e, e, !1, !1, "From closing template", "fromClosingTemplate", e, "((select 1 from closing_draft_skus where closing_adjustment_id = @inventory_adjustment_id and sku_id = @sku_id limit 1) is not null)", r), t.Field_Field$numeric(e, e, !1, !1, "Default cost", "defaultCost", e, "@default_cost_per_unit*@amount", r)], z.JSArray_Field);
9359
9359
  },
9360
9360
  $signature: 0
9361
9361
  }, t.inventoryAdjustmentSkuSchema_closure0.prototype = {
@@ -9367,7 +9367,7 @@ Arguments: [` + c + "]";
9367
9367
  }, t.inventorySkuBalanceSchema_closure.prototype = {
9368
9368
  call$1(r) {
9369
9369
  var e = null;
9370
- return t._setArrayType([t.Field_Field$string(e, e, !1, !1, !1, "Location ID", "locationId", e, e, r), t.Field_Field$string(e, e, !1, !1, !1, "SKU ID", "skuId", e, e, r), t.Field_Field$numeric(e, e, !1, !1, "Balance", "toBalance", e, e, r), t.Field_Field$timestamp(e, e, !1, !1, "Last adjusted at", "createdAt", e, e, r), t.Field_Field$timestamp(e, e, !0, !1, e, "publishedAt", e, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Name", "name", e, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Code", "code", e, e, r), t.Field_Field$string(e, e, !0, !1, !1, "Unit ID", "unitId", e, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Unit", "unitName", e, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Unit abbrev.", "unitAbbrev", e, e, r), t.Field_Field$bool(e, e, !1, !1, "Inactive", "isInactive", e, e, r), t.Field_Field$timestamp(e, e, !1, !1, "Date", "date", e, e, r)], z.JSArray_Field);
9370
+ return t._setArrayType([t.Field_Field$string(e, e, !1, !1, !1, "Location ID", "locationId", e, e, r), t.Field_Field$string(e, e, !1, !1, !1, "SKU ID", "skuId", e, e, r), t.Field_Field$numeric(e, e, !1, !1, "Balance", "toBalance", e, e, r), t.Field_Field$timestamp(e, e, !1, !1, "Last adjusted at", "createdAt", e, e, r), t.Field_Field$timestamp(e, e, !0, !1, e, "publishedAt", e, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Name", "name", e, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Code", "code", e, e, r), t.Field_Field$string(e, e, !0, !1, !1, "Unit ID", "unitId", e, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Unit", "unitName", e, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Unit abbrev.", "unitAbbrev", e, e, r), t.Field_Field$bool(e, e, !1, !1, "Inactive", "isInactive", e, e, r), t.Field_Field$timestamp(e, e, !1, !1, "Date", "date", e, e, r), t.Field_Field$numeric(e, e, !1, !1, "Balance cost", "toBalanceCost", e, e, r), t.Field_Field$numeric(e, e, !1, !1, "Default unit cost", "defaultCostPerUnit", e, e, r), t.Field_Field$numeric(e, e, !1, !1, "Default cost", "defaultCost", e, "@default_cost_per_unit*@to_balance", r)], z.JSArray_Field);
9371
9371
  },
9372
9372
  $signature: 0
9373
9373
  }, t.inventorySkuBalanceSchema_closure0.prototype = {
@@ -9819,8 +9819,8 @@ where collectible_collections.type = 'TITLE' and collectible_collections.user_id
9819
9819
  $signature: 1
9820
9820
  }, t.refundBillSchema_closure.prototype = {
9821
9821
  call$1(r) {
9822
- var e = null, n = "seqNumber", a = "deliveryName", o = "isRefund", s = "isPickup", u = "isInHouseDelivery", p = "isDelivery", c = "Takeaway", b = "completedAt", _ = "integratedOrderId", A = "itemCount", D = "taxTotal", $ = "discountTotal", q = "grossTotal", h = "rounding", T = "takeawayPrice", C = "thirdPartyExtraCharge", F = "deliveryFee", B = "nettTotal";
9823
- return t._setArrayType([t.Field_Field$string(e, "_", !1, !1, !1, "ID", "id", "_id", e, r), t.Field_Field$string(e, e, !0, !1, !1, e, "docId", "_docId", e, r), t.Field_Field$timestamp(e, e, !0, !1, e, "publishedAt", "_publishedAt", e, r), t.Field_Field$timestamp(e, e, !1, !1, "Time", "createdAt", "_createdAt", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Restaurant ID", "restaurantId", "_restaurantId", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Status", "status", "status", e, r), t.Field_Field$string(e, e, !1, !1, !1, "No.", n, n, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Table", "slot", "slot", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Delivery", a, a, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Refund ID", "refundFrom", "refundedFrom", e, r), t.Field_Field$bool(e, e, !1, !1, "Refund", o, o, e, r), t.Field_Field$string(e, e, !0, !1, !1, e, "refundApprovedById", "refund.approvedBy.id", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Refund approver", "refundApprovedByName", "refund.approvedBy.name", e, r), t.Field_Field$string(e, e, !0, !1, !1, e, "refundedById", "refund.by.id", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Refund user", "refundedByName", "refund.by.name", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Refund reason", "refundReason", "refund.reason", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Member ID", "memberId", "membership.id", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Member user ID", "memberUserId", "membership.userId", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Member name", "memberUserName", "membership.name", e, r), t.Field_Field$string(e, e, !0, !1, !1, "Member phone", "memberPhoneNumber", "membership.phoneNumber", e, r), t.Field_Field$timestamp(e, e, !1, !1, "Member birthday", "memberBirthday", "membership.birthday", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Remark", "remark", "remark", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Source", "source", "source", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Type", "type", "type", e, r), t.Field_Field$bool(e, e, !1, !1, "Pickup", s, s, e, r), t.Field_Field$bool(e, e, !1, !1, "Is in house delivery", u, u, e, r), t.Field_Field$bool(e, e, !1, !1, "Is other delivery", p, p, e, r), t.Field_Field$bool(e, e, !1, !1, c, "isTakeaway", "is.takeaway", e, r), t.Field_Field$timestamp(e, e, !1, !1, "Closed at", b, b, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Inclusive SST", "sstInclusive", "nettTaxes.SST.inclusive", e, r), t.Field_Field$string(e, e, !1, !1, !1, "SST before discount", "sstBeforeDiscount", "nettTaxes.SST.beforeDiscount", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Inclusive SC", "serviceChargeInclusive", "nettTaxes.SERVICE_CHARGE.inclusive", e, r), t.Field_Field$string(e, e, !1, !1, !1, "SC before discount", "serviceChargeBeforeDiscount", "nettTaxes.SERVICE_CHARGE.beforeDiscount", e, r), t.Field_Field$numeric(e, "IFNULL(@pax,0)*IF(@isRefund, -1, 1)", !1, !1, "Pax", "pax", "person", R.COALESp, r), t.Field_Field$string(e, e, !1, !1, !1, "Integrated order ID", _, _, e, r), t.Field_Field$numeric(e, R.IFNULLi, !0, !1, "Item count", A, A, R.COALESi, r), t.Field_Field$numeric(e, "IFNULL(@taxTotal,0)*IF(@isRefund, -1, 1)", !0, !1, e, D, D, R.COALEStax0, r), t.Field_Field$numeric(e, R.IFNULLdiT, !1, !1, "Discount", $, $, R.COALESdit, r), t.Field_Field$numeric(e, R.IFNULLg, !1, !1, "Gross", q, q, R.COALESg, r), t.Field_Field$numeric(e, "IFNULL(@rounding,0)*IF(@isRefund, -1, 1)", !1, !1, "Rounding", h, h, R.COALESr, r), t.Field_Field$numeric(e, "IFNULL(@sstTotal,0)*IF(@isRefund, -1, 1)", !1, !1, "SST", "sstTotal", "nettTaxes.SST.total", R.COALESss, r), t.Field_Field$string(e, e, !1, !1, !1, "SST %", "sstPercentage", "nettTaxes.SST.percentage", e, r), t.Field_Field$numeric(e, R.IFNULLs, !1, !1, "SC", "serviceChargeTotal", "nettTaxes.SERVICE_CHARGE.total", R.COALESse, r), t.Field_Field$string(e, e, !1, !1, !1, "SC %", "serviceChargePercentage", "nettTaxes.SERVICE_CHARGE.percentage", e, r), t.Field_Field$numeric(e, R.x28IFNULo, !1, !1, "Other charge", "otherChargeTotal", "nettTaxes.OTHER_CHARGE.total", R.x28COALEo, r), t.Field_Field$numeric(e, R.x28IFNULgx2d, !1, !1, "Gross w/ takeaway", "subTotalWithoutTakeaway", e, R.x28COALEgx2d, r), t.Field_Field$numeric(e, R.IFNULLtak, !1, !1, c, T, T, R.COALEStak, r), t.Field_Field$numeric(e, R.IFNULLth, !1, !1, "Extra charge", C, C, R.COALESth, r), t.Field_Field$numeric(e, R.IFNULLde_, !1, !1, "Delivery fee", F, F, R.COALESdex2c, r), t.Field_Field$numeric(e, R.IFNULLn, !1, !1, "Nett", B, B, R.COALESn, r), t.Field_Field$numeric(e, "IFNULL(@grossTotal,0)*IF(@isRefund, -1, 1)+IFNULL(@deliveryFee,0)*IF(@isRefund, -1, 1)+IFNULL(@discountTotal,0)*IF(@isRefund, -1, 1)", !1, !1, "Gross before charges", "grossBeforeCharges", e, "COALESCE(@gross_total,0)*CASE WHEN @is_refund THEN -1 ELSE 1 END+COALESCE(@delivery_fee,0)*CASE WHEN @is_refund THEN -1 ELSE 1 END+COALESCE(@discount_total,0)*CASE WHEN @is_refund THEN -1 ELSE 1 END", r), t.Field_Field$numeric(e, e, !1, !1, "Member Recency", "recency", e, R.MIN_EX, r), t.Field_Field$numeric(e, e, !1, !1, "Member frequency", "frequency", e, R.COUNT_, r), t.Field_Field$numeric(e, e, !1, !1, "Member monetary", "monetary", e, R.SUM__n, r)], z.JSArray_Field);
9822
+ var e = null, n = "seqNumber", a = "deliveryName", o = "isRefund", s = "isPickup", u = "isInHouseDelivery", p = "isDelivery", c = "Takeaway", b = "completedAt", _ = "integratedOrderId", A = "itemCount", D = "taxTotal", $ = "discountTotal", q = "grossTotal", S = "rounding", T = "takeawayPrice", C = "thirdPartyExtraCharge", F = "deliveryFee", B = "nettTotal";
9823
+ return t._setArrayType([t.Field_Field$string(e, "_", !1, !1, !1, "ID", "id", "_id", e, r), t.Field_Field$string(e, e, !0, !1, !1, e, "docId", "_docId", e, r), t.Field_Field$timestamp(e, e, !0, !1, e, "publishedAt", "_publishedAt", e, r), t.Field_Field$timestamp(e, e, !1, !1, "Time", "createdAt", "_createdAt", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Restaurant ID", "restaurantId", "_restaurantId", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Status", "status", "status", e, r), t.Field_Field$string(e, e, !1, !1, !1, "No.", n, n, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Table", "slot", "slot", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Delivery", a, a, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Refund ID", "refundFrom", "refundedFrom", e, r), t.Field_Field$bool(e, e, !1, !1, "Refund", o, o, e, r), t.Field_Field$string(e, e, !0, !1, !1, e, "refundApprovedById", "refund.approvedBy.id", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Refund approver", "refundApprovedByName", "refund.approvedBy.name", e, r), t.Field_Field$string(e, e, !0, !1, !1, e, "refundedById", "refund.by.id", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Refund user", "refundedByName", "refund.by.name", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Refund reason", "refundReason", "refund.reason", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Member ID", "memberId", "membership.id", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Member user ID", "memberUserId", "membership.userId", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Member name", "memberUserName", "membership.name", e, r), t.Field_Field$string(e, e, !0, !1, !1, "Member phone", "memberPhoneNumber", "membership.phoneNumber", e, r), t.Field_Field$timestamp(e, e, !1, !1, "Member birthday", "memberBirthday", "membership.birthday", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Remark", "remark", "remark", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Source", "source", "source", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Type", "type", "type", e, r), t.Field_Field$bool(e, e, !1, !1, "Pickup", s, s, e, r), t.Field_Field$bool(e, e, !1, !1, "Is in house delivery", u, u, e, r), t.Field_Field$bool(e, e, !1, !1, "Is other delivery", p, p, e, r), t.Field_Field$bool(e, e, !1, !1, c, "isTakeaway", "is.takeaway", e, r), t.Field_Field$timestamp(e, e, !1, !1, "Closed at", b, b, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Inclusive SST", "sstInclusive", "nettTaxes.SST.inclusive", e, r), t.Field_Field$string(e, e, !1, !1, !1, "SST before discount", "sstBeforeDiscount", "nettTaxes.SST.beforeDiscount", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Inclusive SC", "serviceChargeInclusive", "nettTaxes.SERVICE_CHARGE.inclusive", e, r), t.Field_Field$string(e, e, !1, !1, !1, "SC before discount", "serviceChargeBeforeDiscount", "nettTaxes.SERVICE_CHARGE.beforeDiscount", e, r), t.Field_Field$numeric(e, "IFNULL(@pax,0)*IF(@isRefund, -1, 1)", !1, !1, "Pax", "pax", "person", R.COALESp, r), t.Field_Field$string(e, e, !1, !1, !1, "Integrated order ID", _, _, e, r), t.Field_Field$numeric(e, R.IFNULLi, !0, !1, "Item count", A, A, R.COALESi, r), t.Field_Field$numeric(e, "IFNULL(@taxTotal,0)*IF(@isRefund, -1, 1)", !0, !1, e, D, D, R.COALEStax0, r), t.Field_Field$numeric(e, R.IFNULLdiT, !1, !1, "Discount", $, $, R.COALESdit, r), t.Field_Field$numeric(e, R.IFNULLg, !1, !1, "Gross", q, q, R.COALESg, r), t.Field_Field$numeric(e, "IFNULL(@rounding,0)*IF(@isRefund, -1, 1)", !1, !1, "Rounding", S, S, R.COALESr, r), t.Field_Field$numeric(e, "IFNULL(@sstTotal,0)*IF(@isRefund, -1, 1)", !1, !1, "SST", "sstTotal", "nettTaxes.SST.total", R.COALESss, r), t.Field_Field$string(e, e, !1, !1, !1, "SST %", "sstPercentage", "nettTaxes.SST.percentage", e, r), t.Field_Field$numeric(e, R.IFNULLs, !1, !1, "SC", "serviceChargeTotal", "nettTaxes.SERVICE_CHARGE.total", R.COALESse, r), t.Field_Field$string(e, e, !1, !1, !1, "SC %", "serviceChargePercentage", "nettTaxes.SERVICE_CHARGE.percentage", e, r), t.Field_Field$numeric(e, R.x28IFNULo, !1, !1, "Other charge", "otherChargeTotal", "nettTaxes.OTHER_CHARGE.total", R.x28COALEo, r), t.Field_Field$numeric(e, R.x28IFNULgx2d, !1, !1, "Gross w/ takeaway", "subTotalWithoutTakeaway", e, R.x28COALEgx2d, r), t.Field_Field$numeric(e, R.IFNULLtak, !1, !1, c, T, T, R.COALEStak, r), t.Field_Field$numeric(e, R.IFNULLth, !1, !1, "Extra charge", C, C, R.COALESth, r), t.Field_Field$numeric(e, R.IFNULLde_, !1, !1, "Delivery fee", F, F, R.COALESdex2c, r), t.Field_Field$numeric(e, R.IFNULLn, !1, !1, "Nett", B, B, R.COALESn, r), t.Field_Field$numeric(e, "IFNULL(@grossTotal,0)*IF(@isRefund, -1, 1)+IFNULL(@deliveryFee,0)*IF(@isRefund, -1, 1)+IFNULL(@discountTotal,0)*IF(@isRefund, -1, 1)", !1, !1, "Gross before charges", "grossBeforeCharges", e, "COALESCE(@gross_total,0)*CASE WHEN @is_refund THEN -1 ELSE 1 END+COALESCE(@delivery_fee,0)*CASE WHEN @is_refund THEN -1 ELSE 1 END+COALESCE(@discount_total,0)*CASE WHEN @is_refund THEN -1 ELSE 1 END", r), t.Field_Field$numeric(e, e, !1, !1, "Member Recency", "recency", e, R.MIN_EX, r), t.Field_Field$numeric(e, e, !1, !1, "Member frequency", "frequency", e, R.COUNT_, r), t.Field_Field$numeric(e, e, !1, !1, "Member monetary", "monetary", e, R.SUM__n, r)], z.JSArray_Field);
9824
9824
  },
9825
9825
  $signature: 0
9826
9826
  }, t.refundBillSchema_closure0.prototype = {
@@ -9853,8 +9853,8 @@ where collectible_collections.type = 'TITLE' and collectible_collections.user_id
9853
9853
  $signature: 1
9854
9854
  }, t.remoteOrderFlattenItemSchema_closure.prototype = {
9855
9855
  call$1(r) {
9856
- var e = null, n = "restaurantId", a = "itemCreatedAt", o = "orderStatus", s = "subCategories", u = "productId", p = "customAttributes", c = "quantity", b = "unitQuantity", _ = "perXUnit", A = "layerZeroParentId", D = "isTakeaway", $ = "takeawayId", q = "takeawayName", h = "servedAt", T = "collectedAt";
9857
- return t._setArrayType([t.Field_Field$string(e, e, !1, !1, !1, "ID", "id", "_id", e, r), t.Field_Field$string(e, e, !0, !1, !1, e, "docId", "_docId", e, r), t.Field_Field$timestamp(e, e, !1, !1, "Time", "createdAt", "_createdAt", e, r), t.Field_Field$timestamp(e, e, !0, !1, e, "publishedAt", "_publishedAt", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Restaurant ID", n, n, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Order ID", "orderId", "orderId", e, r), t.Field_Field$timestamp(e, e, !1, !1, "Item time", a, a, e, r), t.Field_Field$string(R.Status, e, !0, !1, !1, "Order status", o, o, e, r), t.Field_Field$string("Item status. Values: DRAFT, VOIDED, SENT", e, !1, !1, !1, "Status", "status", "status", e, r), t.Field_Field$string(e, e, !1, !1, !0, "Name", "name", "name", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Code", "code", "code", e, r), t.Field_Field$string(e, e, !1, !1, !0, "Category", "categoryName", "category", e, r), t.Field_Field$string("Comma-joined product sub categories", e, !1, !1, !1, "Sub categories", s, s, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Product ID", u, u, e, r), t.Field_Field$string(R.JSON_s, e, !1, !1, !1, "Custom attributes", p, p, e, r), t.Field_Field$numeric(R.Item_q, e, !1, !1, "Quantity", c, c, e, r), t.Field_Field$numeric(e, e, !0, !1, "Unit quantity", b, b, e, r), t.Field_Field$numeric(e, e, !0, !1, "Per unit", _, _, e, r), t.Field_Field$string(e, e, !0, !1, !1, "Unit", "unit", "unit", e, r), t.Field_Field$numeric(R.Item_d, e, !1, !1, "Layer", "layer", "layer", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Parent ID", "parentId", "parent.id", e, r), t.Field_Field$string(e, e, !0, !1, !1, "Parent name", "parentName", "parent.name", e, r), t.Field_Field$string(R.ID_of_, e, !1, !1, !1, "Layer zero parent ID", A, A, e, r), t.Field_Field$string(R.Valuesp, e, !0, !1, !1, "Addon type", "addonType", "addon.type", e, r), t.Field_Field$string(e, e, !0, !1, !1, e, "addonSelectionId", "addon.selectionId", e, r), t.Field_Field$string(e, e, !0, !1, !1, e, "variantId", "variant.id", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Variant", "variantName", "variant.name", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Remark", "remark", "remark", e, r), t.Field_Field$bool(e, e, !1, !1, "Takeaway", D, D, e, r), t.Field_Field$string(e, e, !0, !1, !1, e, $, $, e, r), t.Field_Field$string(e, e, !0, !1, !1, "Takeaway name", q, q, e, r), t.Field_Field$timestamp(e, e, !0, !1, "Served at", h, h, e, r), t.Field_Field$timestamp(e, e, !0, !1, "Collected at", T, T, e, r), t.Field_Field$string(e, e, !1, !1, !1, "User ID", "userId", e, "(select user_id from remote_orders where remote_orders.id=@order_id)", r), t.Field_Field$timestamp("Parent order placement time. Drives the report date filter", e, !1, !1, "Order time", "orderAt", e, e, r)], z.JSArray_Field);
9856
+ var e = null, n = "restaurantId", a = "itemCreatedAt", o = "orderStatus", s = "subCategories", u = "productId", p = "customAttributes", c = "quantity", b = "unitQuantity", _ = "perXUnit", A = "layerZeroParentId", D = "isTakeaway", $ = "takeawayId", q = "takeawayName", S = "servedAt", T = "collectedAt";
9857
+ return t._setArrayType([t.Field_Field$string(e, e, !1, !1, !1, "ID", "id", "_id", e, r), t.Field_Field$string(e, e, !0, !1, !1, e, "docId", "_docId", e, r), t.Field_Field$timestamp(e, e, !1, !1, "Time", "createdAt", "_createdAt", e, r), t.Field_Field$timestamp(e, e, !0, !1, e, "publishedAt", "_publishedAt", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Restaurant ID", n, n, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Order ID", "orderId", "orderId", e, r), t.Field_Field$timestamp(e, e, !1, !1, "Item time", a, a, e, r), t.Field_Field$string(R.Status, e, !0, !1, !1, "Order status", o, o, e, r), t.Field_Field$string("Item status. Values: DRAFT, VOIDED, SENT", e, !1, !1, !1, "Status", "status", "status", e, r), t.Field_Field$string(e, e, !1, !1, !0, "Name", "name", "name", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Code", "code", "code", e, r), t.Field_Field$string(e, e, !1, !1, !0, "Category", "categoryName", "category", e, r), t.Field_Field$string("Comma-joined product sub categories", e, !1, !1, !1, "Sub categories", s, s, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Product ID", u, u, e, r), t.Field_Field$string(R.JSON_s, e, !1, !1, !1, "Custom attributes", p, p, e, r), t.Field_Field$numeric(R.Item_q, e, !1, !1, "Quantity", c, c, e, r), t.Field_Field$numeric(e, e, !0, !1, "Unit quantity", b, b, e, r), t.Field_Field$numeric(e, e, !0, !1, "Per unit", _, _, e, r), t.Field_Field$string(e, e, !0, !1, !1, "Unit", "unit", "unit", e, r), t.Field_Field$numeric(R.Item_d, e, !1, !1, "Layer", "layer", "layer", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Parent ID", "parentId", "parent.id", e, r), t.Field_Field$string(e, e, !0, !1, !1, "Parent name", "parentName", "parent.name", e, r), t.Field_Field$string(R.ID_of_, e, !1, !1, !1, "Layer zero parent ID", A, A, e, r), t.Field_Field$string(R.Valuesp, e, !0, !1, !1, "Addon type", "addonType", "addon.type", e, r), t.Field_Field$string(e, e, !0, !1, !1, e, "addonSelectionId", "addon.selectionId", e, r), t.Field_Field$string(e, e, !0, !1, !1, e, "variantId", "variant.id", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Variant", "variantName", "variant.name", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Remark", "remark", "remark", e, r), t.Field_Field$bool(e, e, !1, !1, "Takeaway", D, D, e, r), t.Field_Field$string(e, e, !0, !1, !1, e, $, $, e, r), t.Field_Field$string(e, e, !0, !1, !1, "Takeaway name", q, q, e, r), t.Field_Field$timestamp(e, e, !0, !1, "Served at", S, S, e, r), t.Field_Field$timestamp(e, e, !0, !1, "Collected at", T, T, e, r), t.Field_Field$string(e, e, !1, !1, !1, "User ID", "userId", e, "(select user_id from remote_orders where remote_orders.id=@order_id)", r), t.Field_Field$timestamp("Parent order placement time. Drives the report date filter", e, !1, !1, "Order time", "orderAt", e, e, r)], z.JSArray_Field);
9858
9858
  },
9859
9859
  $signature: 0
9860
9860
  }, t.remoteOrderFlattenItemSchema_closure0.prototype = {
@@ -11328,8 +11328,8 @@ then EXTRACT(EPOCH FROM COALESCE(timesheets.ended_at,!end)-(timesheets.created_a
11328
11328
  return a.message;
11329
11329
  }
11330
11330
  }())), e(g, "DateTime__parseFormat", "$get$DateTime__parseFormat", () => t.RegExp_RegExp("^([+-]?\\d{4,6})-?(\\d\\d)-?(\\d\\d)(?:[ T](\\d\\d)(?::?(\\d\\d)(?::?(\\d\\d)(?:[.,](\\d+))?)?)?( ?[zZ]| ?([-+])(\\d\\d)(?::?(\\d\\d))?)?)?$", !1)), e(g, "_hashSeed", "$get$_hashSeed", () => t.objectHashCode(l.Type_Object_xQ6)), e(g, "Endian_host", "$get$Endian_host", () => t.NativeByteData_NativeByteData$view(t.NativeUint16List_NativeUint16List$fromList(t._setArrayType([1], z.JSArray_int)).buffer, 0, null).getInt8(0) === 1 ? l.C_Endian0 : l.C_Endian), e(g, "_clockKey", "$get$_clockKey", () => new t.Object()), e(g, "en_USSymbols", "$get$en_USSymbols", () => new t.DateSymbols("en_US", l.List_BC_AD, l.List_6xs, l.List_qpm, l.List_qpm, l.List_cIc, l.List_cIc, l.List_h8w, l.List_h8w, l.List_wMy, l.List_wMy, l.List_gc6, l.List_gc6, l.List_3US, l.List_AM_PM)), n(g, "_dateTimeSymbols", "$get$_dateTimeSymbols", () => t.UninitializedLocaleData$("initializeDateFormatting(<locale>)", g.$get$en_USSymbols())), n(g, "dateTimePatterns", "$get$dateTimePatterns", () => t.UninitializedLocaleData$("initializeDateFormatting(<locale>)", l.Map_EQ6TW)), e(g, "asciiZeroCodeUnit", "$get$asciiZeroCodeUnit", () => 48), e(g, "DateFormat__matchers", "$get$DateFormat__matchers", () => t._setArrayType([t.RegExp_RegExp("^'(?:[^']|'')*'", !1), t.RegExp_RegExp("^(?:G+|y+|M+|k+|S+|E+|a+|h+|K+|H+|c+|L+|Q+|d+|D+|m+|s+|v+|z+|Z+)", !1), t.RegExp_RegExp("^[^'GyMkSEahKHcLQdDmsvzZ]+", !1)], t.findType("JSArray<RegExp>"))), e(g, "_DateFormatQuotedField__twoEscapedQuotes", "$get$_DateFormatQuotedField__twoEscapedQuotes", () => t.RegExp_RegExp("''", !1)), e(g, "asciiDigitMatcher", "$get$asciiDigitMatcher", () => t.RegExp_RegExp("^\\d+", !1)), n(g, "_availableLocales", "$get$_availableLocales", () => {
11331
- var a, o, s = t.EnLocale$(l.StartOfWeek_1), u = t.EnLocale$(l.StartOfWeek_1), p = t.EnLocale$(l.StartOfWeek_1), c = t.EnLocale$(l.StartOfWeek_1), b = t.EnLocale$(l.StartOfWeek_1), _ = t.EnLocale$(l.StartOfWeek_2), A = t.EnLocale$(l.StartOfWeek_2), D = t.EnLocale$(l.StartOfWeek_1), $ = t.EnLocale$(l.StartOfWeek_1), q = t.EsLocale$(l.StartOfWeek_2), h = t.EsLocale$(l.StartOfWeek_2), T = t.EsLocale$(l.StartOfWeek_1), C = t.FrLocale$(l.StartOfWeek_2), F = t.FrLocale$(l.StartOfWeek_2), B = t.FrLocale$(l.StartOfWeek_1), v = t.ZhCnLocale$(l.StartOfWeek_1), I = t.ZhCnLocale$(l.StartOfWeek_1), J = t.ZhLocale$(l.StartOfWeek_1), H = t.ZhLocale$(l.StartOfWeek_1), Y = t.DeLocale$(l.StartOfWeek_2), j = t.DeLocale$(l.StartOfWeek_2), A0 = t.DeLocale$(l.StartOfWeek_2), a0 = t.DeLocale$(l.StartOfWeek_2), Q0 = t.ItLocale$(l.StartOfWeek_2), K0 = t.ItLocale$(l.StartOfWeek_2), t1 = t.ArLyLocale$(!0, l.StartOfWeek_0), a1 = t.ArLyLocale$(!1, l.StartOfWeek_0), X0 = t.ArSaMaDzKwTnLocale$(!1, l.StartOfWeek_1), r1 = t.ArSaMaDzKwTnLocale$(!1, l.StartOfWeek_1), i1 = t.ArSaMaDzKwTnLocale$(!0, l.StartOfWeek_1), p1 = t.ArSaMaDzKwTnLocale$(!1, l.StartOfWeek_0), M1 = t.ArSaMaDzKwTnLocale$(!1, l.StartOfWeek_0);
11332
- return t.createSentinel(), t.createSentinel(), t.createSentinel(), t.createSentinel(), t.createSentinel(), t.createSentinel(), t.createSentinel(), a = t.PtLocale$(l.StartOfWeek_2), o = t.PtLocale$(l.StartOfWeek_1), t.createSentinel(), t.createSentinel(), t.createSentinel(), t.createSentinel(), t.createSentinel(), t.createSentinel(), t.createSentinel(), t.createSentinel(), t.LinkedHashMap_LinkedHashMap$_literal(["en", s, "en_us", u, "en_sg", p, "en_au", c, "en_ca", b, "en_gb", _, "en_ie", A, "en_il", D, "en_nz", $, "es", q, "es_do", h, "es_us", T, "fr", C, "fr_ch", F, "fr_ca", B, "zh", v, "zh_cn", I, "zh_hk", J, "zh_tw", H, "de", Y, "de_de", j, "de_at", A0, "de_ch", a0, "it", Q0, "it_ch", K0, "ar", t1, "ar_ly", a1, "ar_dz", X0, "ar_kw", r1, "ar_sa", i1, "ar_ma", p1, "ar_tn", M1, "az", new t.AzLocale(), "id", new t.IdLocale(), "ja", new t.JaLocale(), "ko", new t.KoLocale(), "ru", new t.RuLocale(), "uk", new t.UkLocale(), "hi", new t.HiLocale(), "pt", a, "pt_br", o, "pl", new t.PlLocale(), "tr", new t.TrLocale(), "sv", new t.SvLocale(), "nb", new t.NbLocale(), "fa", new t.FaLocale(), "bn", new t.BnLocale(), "nl", new t.NlLocale(), "th", new t.ThLocale()], z.String, t.findType("Locale"));
11331
+ var a, o, s = t.EnLocale$(l.StartOfWeek_1), u = t.EnLocale$(l.StartOfWeek_1), p = t.EnLocale$(l.StartOfWeek_1), c = t.EnLocale$(l.StartOfWeek_1), b = t.EnLocale$(l.StartOfWeek_1), _ = t.EnLocale$(l.StartOfWeek_2), A = t.EnLocale$(l.StartOfWeek_2), D = t.EnLocale$(l.StartOfWeek_1), $ = t.EnLocale$(l.StartOfWeek_1), q = t.EsLocale$(l.StartOfWeek_2), S = t.EsLocale$(l.StartOfWeek_2), T = t.EsLocale$(l.StartOfWeek_1), C = t.FrLocale$(l.StartOfWeek_2), F = t.FrLocale$(l.StartOfWeek_2), B = t.FrLocale$(l.StartOfWeek_1), v = t.ZhCnLocale$(l.StartOfWeek_1), I = t.ZhCnLocale$(l.StartOfWeek_1), J = t.ZhLocale$(l.StartOfWeek_1), H = t.ZhLocale$(l.StartOfWeek_1), Y = t.DeLocale$(l.StartOfWeek_2), j = t.DeLocale$(l.StartOfWeek_2), A0 = t.DeLocale$(l.StartOfWeek_2), a0 = t.DeLocale$(l.StartOfWeek_2), Q0 = t.ItLocale$(l.StartOfWeek_2), K0 = t.ItLocale$(l.StartOfWeek_2), t1 = t.ArLyLocale$(!0, l.StartOfWeek_0), a1 = t.ArLyLocale$(!1, l.StartOfWeek_0), X0 = t.ArSaMaDzKwTnLocale$(!1, l.StartOfWeek_1), r1 = t.ArSaMaDzKwTnLocale$(!1, l.StartOfWeek_1), i1 = t.ArSaMaDzKwTnLocale$(!0, l.StartOfWeek_1), p1 = t.ArSaMaDzKwTnLocale$(!1, l.StartOfWeek_0), M1 = t.ArSaMaDzKwTnLocale$(!1, l.StartOfWeek_0);
11332
+ return t.createSentinel(), t.createSentinel(), t.createSentinel(), t.createSentinel(), t.createSentinel(), t.createSentinel(), t.createSentinel(), a = t.PtLocale$(l.StartOfWeek_2), o = t.PtLocale$(l.StartOfWeek_1), t.createSentinel(), t.createSentinel(), t.createSentinel(), t.createSentinel(), t.createSentinel(), t.createSentinel(), t.createSentinel(), t.createSentinel(), t.LinkedHashMap_LinkedHashMap$_literal(["en", s, "en_us", u, "en_sg", p, "en_au", c, "en_ca", b, "en_gb", _, "en_ie", A, "en_il", D, "en_nz", $, "es", q, "es_do", S, "es_us", T, "fr", C, "fr_ch", F, "fr_ca", B, "zh", v, "zh_cn", I, "zh_hk", J, "zh_tw", H, "de", Y, "de_de", j, "de_at", A0, "de_ch", a0, "it", Q0, "it_ch", K0, "ar", t1, "ar_ly", a1, "ar_dz", X0, "ar_kw", r1, "ar_sa", i1, "ar_ma", p1, "ar_tn", M1, "az", new t.AzLocale(), "id", new t.IdLocale(), "ja", new t.JaLocale(), "ko", new t.KoLocale(), "ru", new t.RuLocale(), "uk", new t.UkLocale(), "hi", new t.HiLocale(), "pt", a, "pt_br", o, "pl", new t.PlLocale(), "tr", new t.TrLocale(), "sv", new t.SvLocale(), "nb", new t.NbLocale(), "fa", new t.FaLocale(), "bn", new t.BnLocale(), "nl", new t.NlLocale(), "th", new t.ThLocale()], z.String, t.findType("Locale"));
11333
11333
  }), e(g, "addonFlattenItemSchema", "$get$addonFlattenItemSchema", () => {
11334
11334
  var a = "createdAt", o = null, s = t.Source_Source$couchdb("", ""), u = t.TopLevelFilters$(t._setArrayType([t.Permission_Permission$restaurant("restaurantId")], z.JSArray_Permission), a);
11335
11335
  return t.Schema_Schema$build(o, l.List_empty0, 3, t._setArrayType(["restaurantId"], z.JSArray_String), o, new t.addonFlattenItemSchema_closure(), l.List_empty, o, o, !0, !1, !1, !0, !1, new t.addonFlattenItemSchema_closure0(), "Addon", "flatten_items", "flatten_item", l.MERGE_FILTER_TYPE_0, l.SCHEMA_NAME_7, a, "", "", !0, s, u);
@@ -11517,6 +11517,8 @@ SELECT * FROM (
11517
11517
  isk.location_id,
11518
11518
  isk.sku_id,
11519
11519
  COALESCE(ias.to_balance, 0) AS to_balance,
11520
+ CASE WHEN ias.created_at IS NULL THEN 0 ELSE ias.to_balance_cost END AS to_balance_cost,
11521
+ ias.default_cost_per_unit,
11520
11522
  ias.created_at,
11521
11523
  (d.local_day AT TIME ZONE @TIMEZONE) AS date,
11522
11524
  isk.is_inactive,
@@ -11530,6 +11532,8 @@ SELECT * FROM (
11530
11532
  LEFT JOIN LATERAL (
11531
11533
  SELECT
11532
11534
  ias.to_balance,
11535
+ ias.to_balance_cost,
11536
+ ias.default_cost_per_unit,
11533
11537
  ias.created_at
11534
11538
  FROM inventory_adjustment_skus ias
11535
11539
  WHERE ias.sku_id = isk.sku_id
@@ -12318,7 +12322,7 @@ var $a = ya, Yr = {};
12318
12322
  }
12319
12323
  },
12320
12324
  Sort__dualPivotQuicksort(e, n, a, o) {
12321
- var s, u, p, c, b, _, A, D, $, q, h = O.JSInt_methods._tdivFast$1(a - n + 1, 6), T = n + h, C = a - h, F = O.JSInt_methods._tdivFast$1(n + a, 2), B = F - h, v = F + h, I = l.getInterceptor$asx(e), J = I.$index(e, T), H = I.$index(e, B), Y = I.$index(e, F), j = I.$index(e, v), A0 = I.$index(e, C);
12325
+ var s, u, p, c, b, _, A, D, $, q, S = O.JSInt_methods._tdivFast$1(a - n + 1, 6), T = n + S, C = a - S, F = O.JSInt_methods._tdivFast$1(n + a, 2), B = F - S, v = F + S, I = l.getInterceptor$asx(e), J = I.$index(e, T), H = I.$index(e, B), Y = I.$index(e, F), j = I.$index(e, v), A0 = I.$index(e, C);
12322
12326
  if (o.call$2(J, H) > 0 && (s = H, H = J, J = s), o.call$2(j, A0) > 0 && (s = A0, A0 = j, j = s), o.call$2(J, Y) > 0 && (s = Y, Y = J, J = s), o.call$2(H, Y) > 0 && (s = Y, Y = H, H = s), o.call$2(J, j) > 0 && (s = j, j = J, J = s), o.call$2(Y, j) > 0 && (s = j, j = Y, Y = s), o.call$2(H, A0) > 0 && (s = A0, A0 = H, H = s), o.call$2(H, Y) > 0 && (s = Y, Y = H, H = s), o.call$2(j, A0) > 0 && (s = A0, A0 = j, j = s), I.$indexSet(e, T, J), I.$indexSet(e, F, Y), I.$indexSet(e, C, A0), I.$indexSet(e, B, I.$index(e, n)), I.$indexSet(e, v, I.$index(e, a)), u = n + 1, p = a - 1, l.$eq$(o.call$2(H, j), 0)) {
12323
12327
  for (c = u; c <= p; ++c)
12324
12328
  if (b = I.$index(e, c), _ = o.call$2(b, H), _ !== 0)
@@ -12611,7 +12615,7 @@ var $a = ya, Yr = {};
12611
12615
  return i.Primitives__generalApplyFunction(e, n, a);
12612
12616
  },
12613
12617
  Primitives__generalApplyFunction(e, n, a) {
12614
- var o, s, u, p, c, b, _, A, D, $, q, h, T = Array.isArray(n) ? n : i.List_List$of(n, !0, r.dynamic), C = T.length, F = e.$requiredArgCount;
12618
+ var o, s, u, p, c, b, _, A, D, $, q, S, T = Array.isArray(n) ? n : i.List_List$of(n, !0, r.dynamic), C = T.length, F = e.$requiredArgCount;
12615
12619
  if (C < F)
12616
12620
  return i.Primitives_functionNoSuchMethod(e, T, a);
12617
12621
  if (o = e.$defaultValues, s = o == null, u = s ? null : o(), p = l.getInterceptor$(e), c = p["call*"], typeof c == "string" && (c = p[c]), s)
@@ -12628,10 +12632,10 @@ var $a = ya, Yr = {};
12628
12632
  }
12629
12633
  else {
12630
12634
  for (s = A.length, q = 0, D = 0; D < A.length; A.length === s || (0, i.throwConcurrentModificationError)(A), ++D)
12631
- if (h = A[D], a.containsKey$1(h))
12632
- ++q, O.JSArray_methods.add$1(T, a.$index(0, h));
12635
+ if (S = A[D], a.containsKey$1(S))
12636
+ ++q, O.JSArray_methods.add$1(T, a.$index(0, S));
12633
12637
  else {
12634
- if ($ = u[h], O.C__Required === $)
12638
+ if ($ = u[S], O.C__Required === $)
12635
12639
  return i.Primitives_functionNoSuchMethod(e, T, a);
12636
12640
  O.JSArray_methods.add$1(T, $);
12637
12641
  }
@@ -12697,7 +12701,7 @@ var $a = ya, Yr = {};
12697
12701
  return r.Error._is(n) && n.$thrownJsError == null && (n.$thrownJsError = e), n;
12698
12702
  },
12699
12703
  _unwrapNonDartException(e) {
12700
- var n, a, o, s, u, p, c, b, _, A, D, $, q, h, T = null;
12704
+ var n, a, o, s, u, p, c, b, _, A, D, $, q, S, T = null;
12701
12705
  if (!("message" in e))
12702
12706
  return e;
12703
12707
  if (n = e.message, "number" in e && typeof e.number == "number" && (a = e.number, o = a & 65535, (O.JSInt_methods._shrOtherPositive$1(a, 16) & 8191) === 10))
@@ -12708,7 +12712,7 @@ var $a = ya, Yr = {};
12708
12712
  case 5007:
12709
12713
  return s = i.S(n), i.saveStackTrace(e, new i.NullError(s + " (Error " + o + ")", T));
12710
12714
  }
12711
- return e instanceof TypeError ? (u = L.$get$TypeErrorDecoder_noSuchMethodPattern(), p = L.$get$TypeErrorDecoder_notClosurePattern(), c = L.$get$TypeErrorDecoder_nullCallPattern(), b = L.$get$TypeErrorDecoder_nullLiteralCallPattern(), _ = L.$get$TypeErrorDecoder_undefinedCallPattern(), A = L.$get$TypeErrorDecoder_undefinedLiteralCallPattern(), D = L.$get$TypeErrorDecoder_nullPropertyPattern(), L.$get$TypeErrorDecoder_nullLiteralPropertyPattern(), $ = L.$get$TypeErrorDecoder_undefinedPropertyPattern(), q = L.$get$TypeErrorDecoder_undefinedLiteralPropertyPattern(), h = u.matchTypeError$1(n), h != null ? i.saveStackTrace(e, i.JsNoSuchMethodError$(n, h)) : (h = p.matchTypeError$1(n), h != null ? (h.method = "call", i.saveStackTrace(e, i.JsNoSuchMethodError$(n, h))) : (h = c.matchTypeError$1(n), h == null ? (h = b.matchTypeError$1(n), h == null ? (h = _.matchTypeError$1(n), h == null ? (h = A.matchTypeError$1(n), h == null ? (h = D.matchTypeError$1(n), h == null ? (h = b.matchTypeError$1(n), h == null ? (h = $.matchTypeError$1(n), h == null ? (h = q.matchTypeError$1(n), s = h != null) : s = !0) : s = !0) : s = !0) : s = !0) : s = !0) : s = !0) : s = !0, s ? i.saveStackTrace(e, new i.NullError(n, h == null ? T : h.method)) : i.saveStackTrace(e, new i.UnknownJsTypeError(typeof n == "string" ? n : ""))))) : e instanceof RangeError ? typeof n == "string" && n.indexOf("call stack") !== -1 ? new i.StackOverflowError() : (n = function(C) {
12715
+ return e instanceof TypeError ? (u = L.$get$TypeErrorDecoder_noSuchMethodPattern(), p = L.$get$TypeErrorDecoder_notClosurePattern(), c = L.$get$TypeErrorDecoder_nullCallPattern(), b = L.$get$TypeErrorDecoder_nullLiteralCallPattern(), _ = L.$get$TypeErrorDecoder_undefinedCallPattern(), A = L.$get$TypeErrorDecoder_undefinedLiteralCallPattern(), D = L.$get$TypeErrorDecoder_nullPropertyPattern(), L.$get$TypeErrorDecoder_nullLiteralPropertyPattern(), $ = L.$get$TypeErrorDecoder_undefinedPropertyPattern(), q = L.$get$TypeErrorDecoder_undefinedLiteralPropertyPattern(), S = u.matchTypeError$1(n), S != null ? i.saveStackTrace(e, i.JsNoSuchMethodError$(n, S)) : (S = p.matchTypeError$1(n), S != null ? (S.method = "call", i.saveStackTrace(e, i.JsNoSuchMethodError$(n, S))) : (S = c.matchTypeError$1(n), S == null ? (S = b.matchTypeError$1(n), S == null ? (S = _.matchTypeError$1(n), S == null ? (S = A.matchTypeError$1(n), S == null ? (S = D.matchTypeError$1(n), S == null ? (S = b.matchTypeError$1(n), S == null ? (S = $.matchTypeError$1(n), S == null ? (S = q.matchTypeError$1(n), s = S != null) : s = !0) : s = !0) : s = !0) : s = !0) : s = !0) : s = !0) : s = !0, s ? i.saveStackTrace(e, new i.NullError(n, S == null ? T : S.method)) : i.saveStackTrace(e, new i.UnknownJsTypeError(typeof n == "string" ? n : ""))))) : e instanceof RangeError ? typeof n == "string" && n.indexOf("call stack") !== -1 ? new i.StackOverflowError() : (n = function(C) {
12712
12716
  try {
12713
12717
  return String(C);
12714
12718
  } catch {
@@ -12726,13 +12730,13 @@ var $a = ya, Yr = {};
12726
12730
  return n;
12727
12731
  },
12728
12732
  Closure_fromTearOff(e) {
12729
- var n, a, o, s, u, p, c, b, _, A, D = e.co, $ = e.iS, q = e.iI, h = e.nDA, T = e.aI, C = e.fs, F = e.cs, B = C[0], v = F[0], I = D[B], J = e.fT;
12733
+ var n, a, o, s, u, p, c, b, _, A, D = e.co, $ = e.iS, q = e.iI, S = e.nDA, T = e.aI, C = e.fs, F = e.cs, B = C[0], v = F[0], I = D[B], J = e.fT;
12730
12734
  for (J.toString, n = Object.create($ ? new i.StaticClosure().constructor.prototype : new i.BoundClosure(null, null).constructor.prototype), n.$initialize = n.constructor, $ ? a = function() {
12731
12735
  this.$initialize();
12732
12736
  } : a = function(Y, j) {
12733
12737
  this.$initialize(Y, j);
12734
- }, n.constructor = a, a.prototype = n, n.$_name = B, n.$_target = I, o = !$, o ? s = i.Closure_forwardCallTo(B, I, q, h) : (n.$static_name = B, s = I), n.$signature = i.Closure__computeSignatureFunctionNewRti(J, $, q), n[v] = s, u = s, p = 1; p < C.length; ++p)
12735
- c = C[p], typeof c == "string" ? (b = D[c], _ = c, c = b) : _ = "", A = F[p], A != null && (o && (c = i.Closure_forwardCallTo(_, c, q, h)), n[A] = c), p === T && (u = c);
12738
+ }, n.constructor = a, a.prototype = n, n.$_name = B, n.$_target = I, o = !$, o ? s = i.Closure_forwardCallTo(B, I, q, S) : (n.$static_name = B, s = I), n.$signature = i.Closure__computeSignatureFunctionNewRti(J, $, q), n[v] = s, u = s, p = 1; p < C.length; ++p)
12739
+ c = C[p], typeof c == "string" ? (b = D[c], _ = c, c = b) : _ = "", A = F[p], A != null && (o && (c = i.Closure_forwardCallTo(_, c, q, S)), n[A] = c), p === T && (u = c);
12736
12740
  return n["call*"] = u, n.$requiredArgCount = e.rC, n.$defaultValues = e.dV, a;
12737
12741
  },
12738
12742
  Closure__computeSignatureFunctionNewRti(e, n, a) {
@@ -12946,8 +12950,8 @@ var $a = ya, Yr = {};
12946
12950
  var p = n ? "m" : "", c = a ? "" : "i", b = o ? "u" : "", _ = s ? "s" : "", A = u ? "g" : "", D = function($, q) {
12947
12951
  try {
12948
12952
  return new RegExp($, q);
12949
- } catch (h) {
12950
- return h;
12953
+ } catch (S) {
12954
+ return S;
12951
12955
  }
12952
12956
  }(e, p + c + b + _ + A);
12953
12957
  if (D instanceof RegExp)
@@ -13179,7 +13183,7 @@ var $a = ya, Yr = {};
13179
13183
  return i._Universe_eval(R.typeUniverse, e, !1);
13180
13184
  },
13181
13185
  _substitute(e, n, a, o) {
13182
- var s, u, p, c, b, _, A, D, $, q, h, T, C, F, B, v, I = n._kind;
13186
+ var s, u, p, c, b, _, A, D, $, q, S, T, C, F, B, v, I = n._kind;
13183
13187
  switch (I) {
13184
13188
  case 5:
13185
13189
  case 1:
@@ -13198,7 +13202,7 @@ var $a = ya, Yr = {};
13198
13202
  case 10:
13199
13203
  return b = n._primary, _ = i._substitute(e, b, a, o), A = n._rest, D = i._substituteArray(e, A, a, o), _ === b && D === A ? n : i._Universe__lookupBindingRti(e, _, D);
13200
13204
  case 12:
13201
- return $ = n._primary, q = i._substitute(e, $, a, o), h = n._rest, T = i._substituteFunctionParameters(e, h, a, o), q === $ && T === h ? n : i._Universe__lookupFunctionRti(e, q, T);
13205
+ return $ = n._primary, q = i._substitute(e, $, a, o), S = n._rest, T = i._substituteFunctionParameters(e, S, a, o), q === $ && T === S ? n : i._Universe__lookupFunctionRti(e, q, T);
13202
13206
  case 13:
13203
13207
  return C = n._rest, o += C.length, F = i._substituteArray(e, C, a, o), b = n._primary, _ = i._substitute(e, b, a, o), F === C && _ === b ? n : i._Universe__lookupGenericFunctionRti(e, _, F, !0);
13204
13208
  case 14:
@@ -13466,7 +13470,7 @@ var $a = ya, Yr = {};
13466
13470
  return u + "})";
13467
13471
  },
13468
13472
  _functionRtiToString(e, n, a) {
13469
- var o, s, u, p, c, b, _, A, D, $, q, h, T, C, F, B, v, I, J, H, Y, j = ", ";
13473
+ var o, s, u, p, c, b, _, A, D, $, q, S, T, C, F, B, v, I, J, H, Y, j = ", ";
13470
13474
  if (a != null) {
13471
13475
  for (o = a.length, n == null ? (n = i._setArrayType([], r.JSArray_String), s = null) : s = n.length, u = n.length, p = o; p > 0; --p)
13472
13476
  n.push("T" + (u + p));
@@ -13475,7 +13479,7 @@ var $a = ya, Yr = {};
13475
13479
  _ += ">";
13476
13480
  } else
13477
13481
  _ = "", s = null;
13478
- for (c = e._primary, h = e._rest, T = h._requiredPositional, C = T.length, F = h._optionalPositional, B = F.length, v = h._named, I = v.length, J = i._rtiToString(c, n), H = "", Y = "", p = 0; p < C; ++p, Y = j)
13482
+ for (c = e._primary, S = e._rest, T = S._requiredPositional, C = T.length, F = S._optionalPositional, B = F.length, v = S._named, I = v.length, J = i._rtiToString(c, n), H = "", Y = "", p = 0; p < C; ++p, Y = j)
13479
13483
  H += Y + i._rtiToString(T[p], n);
13480
13484
  if (B > 0) {
13481
13485
  for (H += Y + "[", Y = "", p = 0; p < B; ++p, Y = j)
@@ -13607,8 +13611,8 @@ var $a = ya, Yr = {};
13607
13611
  return p ?? (o = new i.Rti(null, null), o._kind = 11, o._primary = n, o._rest = a, o._canonicalRecipe = u, s = i._Universe__installTypeTests(e, o), e.eC.set(u, s), s);
13608
13612
  },
13609
13613
  _Universe__lookupFunctionRti(e, n, a) {
13610
- var o, s, u, p, c, b = n._canonicalRecipe, _ = a._requiredPositional, A = _.length, D = a._optionalPositional, $ = D.length, q = a._named, h = q.length, T = "(" + i._Universe__canonicalRecipeJoin(_);
13611
- return $ > 0 && (o = A > 0 ? "," : "", T += o + "[" + i._Universe__canonicalRecipeJoin(D) + "]"), h > 0 && (o = A > 0 ? "," : "", T += o + "{" + i._Universe__canonicalRecipeJoinNamed(q) + "}"), s = b + (T + ")"), u = e.eC.get(s), u ?? (p = new i.Rti(null, null), p._kind = 12, p._primary = n, p._rest = a, p._canonicalRecipe = s, c = i._Universe__installTypeTests(e, p), e.eC.set(s, c), c);
13614
+ var o, s, u, p, c, b = n._canonicalRecipe, _ = a._requiredPositional, A = _.length, D = a._optionalPositional, $ = D.length, q = a._named, S = q.length, T = "(" + i._Universe__canonicalRecipeJoin(_);
13615
+ return $ > 0 && (o = A > 0 ? "," : "", T += o + "[" + i._Universe__canonicalRecipeJoin(D) + "]"), S > 0 && (o = A > 0 ? "," : "", T += o + "{" + i._Universe__canonicalRecipeJoinNamed(q) + "}"), s = b + (T + ")"), u = e.eC.get(s), u ?? (p = new i.Rti(null, null), p._kind = 12, p._primary = n, p._rest = a, p._canonicalRecipe = s, c = i._Universe__installTypeTests(e, p), e.eC.set(s, c), c);
13612
13616
  },
13613
13617
  _Universe__lookupGenericFunctionRti(e, n, a, o) {
13614
13618
  var s, u = n._canonicalRecipe + ("<" + i._Universe__canonicalRecipeJoin(a) + ">"), p = e.eC.get(u);
@@ -13805,7 +13809,7 @@ var $a = ya, Yr = {};
13805
13809
  throw i.wrapException(i.AssertionError$("Bad index " + a + " for " + n.toString$0(0)));
13806
13810
  },
13807
13811
  _isSubtype(e, n, a, o, s) {
13808
- var u, p, c, b, _, A, D, $, q, h;
13812
+ var u, p, c, b, _, A, D, $, q, S;
13809
13813
  if (n === o || (i.isStrongTopType(o) ? u = !0 : o !== r.legacy_Object ? u = !1 : u = !0, u) || (p = n._kind, p === 4))
13810
13814
  return !0;
13811
13815
  if (i.isStrongTopType(n))
@@ -13838,15 +13842,15 @@ var $a = ya, Yr = {};
13838
13842
  if (p !== 13 || (_ = n._rest, A = o._rest, D = _.length, D !== A.length))
13839
13843
  return !1;
13840
13844
  for (a = a == null ? _ : _.concat(a), s = s == null ? A : A.concat(s), $ = 0; $ < D; ++$)
13841
- if (q = _[$], h = A[$], !i._isSubtype(e, q, a, h, s) || !i._isSubtype(e, h, s, q, a))
13845
+ if (q = _[$], S = A[$], !i._isSubtype(e, q, a, S, s) || !i._isSubtype(e, S, s, q, a))
13842
13846
  return !1;
13843
13847
  return i._isFunctionSubtype(e, n._primary, a, o._primary, s);
13844
13848
  }
13845
13849
  return b === 12 ? n === r.JavaScriptFunction ? !0 : u ? !1 : i._isFunctionSubtype(e, n, a, o, s) : p === 9 ? b !== 9 ? !1 : i._isInterfaceSubtype(e, n, a, o, s) : (u = p === 11, u && o === r.Record ? !0 : u && b === 11 ? i._isRecordSubtype(e, n, a, o, s) : !1);
13846
13850
  },
13847
13851
  _isFunctionSubtype(e, n, a, o, s) {
13848
- var u, p, c, b, _, A, D, $, q, h, T, C, F, B, v, I, J, H, Y, j, A0, a0;
13849
- if (!i._isSubtype(e, n._primary, a, o._primary, s) || (u = n._rest, p = o._rest, c = u._requiredPositional, b = p._requiredPositional, _ = c.length, A = b.length, _ > A) || (D = A - _, $ = u._optionalPositional, q = p._optionalPositional, h = $.length, T = q.length, _ + h < A + T))
13852
+ var u, p, c, b, _, A, D, $, q, S, T, C, F, B, v, I, J, H, Y, j, A0, a0;
13853
+ if (!i._isSubtype(e, n._primary, a, o._primary, s) || (u = n._rest, p = o._rest, c = u._requiredPositional, b = p._requiredPositional, _ = c.length, A = b.length, _ > A) || (D = A - _, $ = u._optionalPositional, q = p._optionalPositional, S = $.length, T = q.length, _ + S < A + T))
13850
13854
  return !1;
13851
13855
  for (C = 0; C < _; ++C)
13852
13856
  if (F = c[C], !i._isSubtype(e, b[C], s, F, a))
@@ -14303,9 +14307,9 @@ var $a = ya, Yr = {};
14303
14307
  return new i.DateTime(Date.now(), !1);
14304
14308
  },
14305
14309
  DateTime_parse(e) {
14306
- var n, a, o, s, u, p, c, b, _, A, D, $, q, h, T, C, F = L.$get$DateTime__parseFormat().firstMatch$1(e);
14310
+ var n, a, o, s, u, p, c, b, _, A, D, $, q, S, T, C, F = L.$get$DateTime__parseFormat().firstMatch$1(e);
14307
14311
  if (F != null) {
14308
- if (n = new i.DateTime_parse_parseIntOrZero(), a = F.__js_helper$_match, o = a[1], o.toString, s = i.int_parse(o), o = a[2], o.toString, u = i.int_parse(o), o = a[3], o.toString, p = i.int_parse(o), c = n.call$1(a[4]), b = n.call$1(a[5]), _ = n.call$1(a[6]), A = new i.DateTime_parse_parseMilliAndMicroseconds().call$1(a[7]), D = O.JSInt_methods._tdivFast$1(A, 1e3), a[8] != null ? ($ = a[9], $ != null && (q = $ === "-" ? -1 : 1, o = a[10], o.toString, h = i.int_parse(o), b -= q * (n.call$1(a[11]) + 60 * h)), T = !0) : T = !1, C = i.Primitives_valueFromDecomposedDate(s, u, p, c, b, _, D + O.JSNumber_methods.round$0(A % 1e3 / 1e3), T), C == null)
14312
+ if (n = new i.DateTime_parse_parseIntOrZero(), a = F.__js_helper$_match, o = a[1], o.toString, s = i.int_parse(o), o = a[2], o.toString, u = i.int_parse(o), o = a[3], o.toString, p = i.int_parse(o), c = n.call$1(a[4]), b = n.call$1(a[5]), _ = n.call$1(a[6]), A = new i.DateTime_parse_parseMilliAndMicroseconds().call$1(a[7]), D = O.JSInt_methods._tdivFast$1(A, 1e3), a[8] != null ? ($ = a[9], $ != null && (q = $ === "-" ? -1 : 1, o = a[10], o.toString, S = i.int_parse(o), b -= q * (n.call$1(a[11]) + 60 * S)), T = !0) : T = !1, C = i.Primitives_valueFromDecomposedDate(s, u, p, c, b, _, D + O.JSNumber_methods.round$0(A % 1e3 / 1e3), T), C == null)
14309
14313
  throw i.wrapException(i.FormatException$("Time out of range", e, null));
14310
14314
  return i.DateTime$_withValue(C, T);
14311
14315
  } else
@@ -14512,8 +14516,8 @@ var $a = ya, Yr = {};
14512
14516
  ListExtensions_mapIndexed$body(e, n, a, o, s) {
14513
14517
  return i._makeSyncStarIterable(function() {
14514
14518
  var u = e, p = n, c = 0, b = 1, _, A, D;
14515
- return function(q, h) {
14516
- for (q === 1 && (_ = h, c = b); ; )
14519
+ return function(q, S) {
14520
+ for (q === 1 && (_ = S, c = b); ; )
14517
14521
  switch (c) {
14518
14522
  case 0:
14519
14523
  A = l.getInterceptor$asx(u), D = 0;
@@ -14565,9 +14569,9 @@ var $a = ya, Yr = {};
14565
14569
  var p = this;
14566
14570
  p.digest = n, p._extended = a, p._hash_sink$_sink = o, p._currentChunk = s, p._lengthInBytes = 0, p._pendingData = u, p._isClosed = !1;
14567
14571
  },
14568
- DateSymbols: function(n, a, o, s, u, p, c, b, _, A, D, $, q, h, T, C, F) {
14572
+ DateSymbols: function(n, a, o, s, u, p, c, b, _, A, D, $, q, S, T, C, F) {
14569
14573
  var B = this;
14570
- B.NAME = n, B.ERAS = a, B.ERANAMES = o, B.NARROWMONTHS = s, B.STANDALONENARROWMONTHS = u, B.MONTHS = p, B.STANDALONEMONTHS = c, B.SHORTMONTHS = b, B.STANDALONESHORTMONTHS = _, B.WEEKDAYS = A, B.STANDALONEWEEKDAYS = D, B.SHORTWEEKDAYS = $, B.STANDALONESHORTWEEKDAYS = q, B.STANDALONENARROWWEEKDAYS = h, B.SHORTQUARTERS = T, B.QUARTERS = C, B.AMPMS = F;
14574
+ B.NAME = n, B.ERAS = a, B.ERANAMES = o, B.NARROWMONTHS = s, B.STANDALONENARROWMONTHS = u, B.MONTHS = p, B.STANDALONEMONTHS = c, B.SHORTMONTHS = b, B.STANDALONESHORTMONTHS = _, B.WEEKDAYS = A, B.STANDALONEWEEKDAYS = D, B.SHORTWEEKDAYS = $, B.STANDALONESHORTWEEKDAYS = q, B.STANDALONENARROWWEEKDAYS = S, B.SHORTQUARTERS = T, B.QUARTERS = C, B.AMPMS = F;
14571
14575
  },
14572
14576
  DateBuilder: function(n, a) {
14573
14577
  var o = this;
@@ -14931,8 +14935,8 @@ var $a = ya, Yr = {};
14931
14935
  this._name = n;
14932
14936
  },
14933
14937
  QueryResponseColumn: function(n, a, o, s, u, p, c, b, _, A, D, $, q) {
14934
- var h = this;
14935
- h.schema = n, h.label = a, h.dataType = o, h.fieldType = s, h.id = u, h.aggregationType = p, h.optionType = c, h.decimal = b, h.timeFormatter = _, h.formatter = A, h.nullable = D, h.hide = $, h.dateComparison = q;
14938
+ var S = this;
14939
+ S.schema = n, S.label = a, S.dataType = o, S.fieldType = s, S.id = u, S.aggregationType = p, S.optionType = c, S.decimal = b, S.timeFormatter = _, S.formatter = A, S.nullable = D, S.hide = $, S.dateComparison = q;
14936
14940
  },
14937
14941
  DateTimeRange: function(n, a) {
14938
14942
  this.start = n, this.end = a;
@@ -14971,7 +14975,7 @@ var $a = ya, Yr = {};
14971
14975
  }
14972
14976
  },
14973
14977
  DataTypeExtension__formatTime(e, n, a) {
14974
- var o, s, u, p, c, b, _, A, D, $, q, h;
14978
+ var o, s, u, p, c, b, _, A, D, $, q, S;
14975
14979
  switch (n) {
14976
14980
  case O.TIME_FORMATTER_0:
14977
14981
  case O.FORMATTER_TYPE_0:
@@ -15004,10 +15008,10 @@ var $a = ya, Yr = {};
15004
15008
  o = 0, s = !0, u = !1;
15005
15009
  break;
15006
15010
  }
15007
- return u ? (p = O.JSInt_methods._tdivFast$1(O.JSNumber_methods.floor$0(o), 60), "" + O.JSInt_methods._tdivFast$1(p, 60) + "h" + O.JSString_methods.padLeft$2(O.JSInt_methods.toString$0(O.JSInt_methods.$mod(p, 60)), 2, "0") + "m") : (c = O.JSNumber_methods.round$0(o), b = O.JSInt_methods._tdivFast$1(O.JSInt_methods.$mod(c, 3600), 60), _ = O.JSInt_methods.$mod(c, 60), A = r.JSArray_int, D = r.MappedListIterable_int_String, s ? ($ = O.JSNumber_methods.floor$0(o / 86400), q = new i.MappedListIterable(i._setArrayType([O.JSNumber_methods.floor$0(O.JSNumber_methods.$mod(o, 86400) / 3600), b, _], A), new i.DataTypeExtension__formatTime_closure(), D).join$1(0, ":"), $ > 0 ? (A = $ > 1 ? "s" : "", h = "" + $ + " day" + A + " ") : h = "", h + q) : new i.MappedListIterable(i._setArrayType([O.JSNumber_methods.floor$0(o / 3600), b, _], A), new i.DataTypeExtension__formatTime_closure0(), D).join$1(0, ":"));
15011
+ return u ? (p = O.JSInt_methods._tdivFast$1(O.JSNumber_methods.floor$0(o), 60), "" + O.JSInt_methods._tdivFast$1(p, 60) + "h" + O.JSString_methods.padLeft$2(O.JSInt_methods.toString$0(O.JSInt_methods.$mod(p, 60)), 2, "0") + "m") : (c = O.JSNumber_methods.round$0(o), b = O.JSInt_methods._tdivFast$1(O.JSInt_methods.$mod(c, 3600), 60), _ = O.JSInt_methods.$mod(c, 60), A = r.JSArray_int, D = r.MappedListIterable_int_String, s ? ($ = O.JSNumber_methods.floor$0(o / 86400), q = new i.MappedListIterable(i._setArrayType([O.JSNumber_methods.floor$0(O.JSNumber_methods.$mod(o, 86400) / 3600), b, _], A), new i.DataTypeExtension__formatTime_closure(), D).join$1(0, ":"), $ > 0 ? (A = $ > 1 ? "s" : "", S = "" + $ + " day" + A + " ") : S = "", S + q) : new i.MappedListIterable(i._setArrayType([O.JSNumber_methods.floor$0(o / 3600), b, _], A), new i.DataTypeExtension__formatTime_closure0(), D).join$1(0, ":"));
15008
15012
  },
15009
15013
  DataTypeExtension__toDisplay(e, n, a, o, s, u, p, c, b, _) {
15010
- var A, D, $, q, h;
15014
+ var A, D, $, q, S;
15011
15015
  switch (e) {
15012
15016
  case O.DATA_TYPE_2:
15013
15017
  if (_ == null)
@@ -15018,22 +15022,22 @@ var $a = ya, Yr = {};
15018
15022
  case O.DATA_TYPE_1:
15019
15023
  if (D = _ == null, D || l.$eq$(_, ""))
15020
15024
  return "";
15021
- switch ($ = b ?? "Asia/Kuala_Lumpur", q = L.$get$_database()._locations, q.__js_helper$_length === 0 && i.throwExpression(i.LocationNotFoundException$("Tried to get location before initializing timezone database")), h = q.$index(0, $), h == null && i.throwExpression(i.LocationNotFoundException$('Location with the name "' + $ + `" doesn't exist`)), s) {
15025
+ switch ($ = b ?? "Asia/Kuala_Lumpur", q = L.$get$_database()._locations, q.__js_helper$_length === 0 && i.throwExpression(i.LocationNotFoundException$("Tried to get location before initializing timezone database")), S = q.$index(0, $), S == null && i.throwExpression(i.LocationNotFoundException$('Location with the name "' + $ + `" doesn't exist`)), s) {
15022
15026
  case O.DIMENSION_OPTION_0:
15023
- return i.DateFormat$("dd/MM/yyyy HH:mm:ss").format$1(i.TZDateTime$from(i.DateTime_parse(l.toString$0$(_)), h));
15027
+ return i.DateFormat$("dd/MM/yyyy HH:mm:ss").format$1(i.TZDateTime$from(i.DateTime_parse(l.toString$0$(_)), S));
15024
15028
  case O.DIMENSION_OPTION_6:
15025
15029
  return l.toString$0$(_);
15026
15030
  case O.DIMENSION_OPTION_1:
15027
- return i.DateFormat$("dd/MM/yyyy HH:mm").format$1(i.TZDateTime$from(i.DateTime_parse(l.toString$0$(_)), h));
15031
+ return i.DateFormat$("dd/MM/yyyy HH:mm").format$1(i.TZDateTime$from(i.DateTime_parse(l.toString$0$(_)), S));
15028
15032
  case O.DIMENSION_OPTION_2:
15029
15033
  case O.DIMENSION_OPTION_3:
15030
- return i.DateFormat$("dd/MM/yyyy").format$1(i.TZDateTime$from(i.DateTime_parse(l.toString$0$(_)), h));
15034
+ return i.DateFormat$("dd/MM/yyyy").format$1(i.TZDateTime$from(i.DateTime_parse(l.toString$0$(_)), S));
15031
15035
  case O.DIMENSION_OPTION_4:
15032
- return i.DateFormat$("MM/yyyy").format$1(i.TZDateTime$from(i.DateTime_parse(l.toString$0$(_)), h));
15036
+ return i.DateFormat$("MM/yyyy").format$1(i.TZDateTime$from(i.DateTime_parse(l.toString$0$(_)), S));
15033
15037
  case O.DIMENSION_OPTION_7:
15034
15038
  return D = r.String, D = i.LinkedHashMap_LinkedHashMap$_literal(["1", "Sun", "2", "Mon", "3", "Tue", "4", "Wed", "5", "Thu", "6", "Fri", "7", "Sat"], D, D).$index(0, _), D ?? _;
15035
15039
  case O.DIMENSION_OPTION_11:
15036
- return i.DateFormat$("yyyy/MM/dd").format$1(i.TZDateTime$from(i.DateTime_parse(l.toString$0$(_)), h));
15040
+ return i.DateFormat$("yyyy/MM/dd").format$1(i.TZDateTime$from(i.DateTime_parse(l.toString$0$(_)), S));
15037
15041
  default:
15038
15042
  return D = D ? null : l.toString$0$(_), D ?? "";
15039
15043
  }
@@ -15182,8 +15186,8 @@ var $a = ya, Yr = {};
15182
15186
  var $ = this;
15183
15187
  $.sparklineDimension = n, $.isCumulative = a, $.schemaNames = o, $.dimensions = s, $.metrics = u, $.filters = p, $.sorts = c, $.limit = b, $.isComparable = _, $.periodType = A, $.timezone = D;
15184
15188
  },
15185
- TableDatasourceConfigModel$(e, n, a, o, s, u, p, c, b, _, A, D, $, q, h, T, C, F, B, v) {
15186
- return new i.TableDatasourceConfigModel(n, c, F, $, q, T, u, o, h, e, b, C, a, A, s, B, _, p, D, v);
15189
+ TableDatasourceConfigModel$(e, n, a, o, s, u, p, c, b, _, A, D, $, q, S, T, C, F, B, v) {
15190
+ return new i.TableDatasourceConfigModel(n, c, F, $, q, T, u, o, S, e, b, C, a, A, s, B, _, p, D, v);
15187
15191
  },
15188
15192
  TableDatasourceConfigModel_TableDatasourceConfigModel$fromJson(e) {
15189
15193
  var n, a, o, s, u, p, c, b, _, A = "showGrandTotal", D = i.BaseDatasourceConfigModel_BaseDatasourceConfigModel$fromJson(e), $ = e.$index(0, "rollup");
@@ -15227,9 +15231,9 @@ var $a = ya, Yr = {};
15227
15231
  DataSourceRowColumnConfig_columnIds_closure1: function(n) {
15228
15232
  this.$this = n;
15229
15233
  },
15230
- TableDatasourceConfigModel: function(n, a, o, s, u, p, c, b, _, A, D, $, q, h, T, C, F, B, v, I) {
15234
+ TableDatasourceConfigModel: function(n, a, o, s, u, p, c, b, _, A, D, $, q, S, T, C, F, B, v, I) {
15231
15235
  var J = this;
15232
- J.columnsWidth = n, J.isDrillable = a, J.showGrandTotal = o, J.rollup = s, J.rollupPosition = u, J.rowsPerPage = p, J.isBlend = c, J._drillDimension = b, J._rowIds = _, J._columnIds = A, J._joinDatasources = D, J.schemaNames = $, J.dimensions = q, J.metrics = h, J.filters = T, J.sorts = C, J.limit = F, J.isComparable = B, J.periodType = v, J.timezone = I;
15236
+ J.columnsWidth = n, J.isDrillable = a, J.showGrandTotal = o, J.rollup = s, J.rollupPosition = u, J.rowsPerPage = p, J.isBlend = c, J._drillDimension = b, J._rowIds = _, J._columnIds = A, J._joinDatasources = D, J.schemaNames = $, J.dimensions = q, J.metrics = S, J.filters = T, J.sorts = C, J.limit = F, J.isComparable = B, J.periodType = v, J.timezone = I;
15233
15237
  },
15234
15238
  TableDatasourceConfigModel_drilledDimensions_closure: function(n) {
15235
15239
  this.$this = n;
@@ -15255,8 +15259,8 @@ var $a = ya, Yr = {};
15255
15259
  this.mainField = n;
15256
15260
  },
15257
15261
  JoinDatasourceConfig: function(n, a, o, s, u, p, c, b, _, A, D, $, q) {
15258
- var h = this;
15259
- h.conditions = n, h.mainDimensions = a, h._rowIds = o, h._columnIds = s, h.schemaNames = u, h.dimensions = p, h.metrics = c, h.filters = b, h.sorts = _, h.limit = A, h.isComparable = D, h.periodType = $, h.timezone = q;
15262
+ var S = this;
15263
+ S.conditions = n, S.mainDimensions = a, S._rowIds = o, S._columnIds = s, S.schemaNames = u, S.dimensions = p, S.metrics = c, S.filters = b, S.sorts = _, S.limit = A, S.isComparable = D, S.periodType = $, S.timezone = q;
15260
15264
  },
15261
15265
  JoinDatasourceConfig_JoinDatasourceConfig$fromJson_closure: function() {
15262
15266
  },
@@ -15279,9 +15283,9 @@ var $a = ya, Yr = {};
15279
15283
  var n, a, o, s, u = "breakdownDimension", p = i.BaseDatasourceConfigModel_BaseDatasourceConfigModel$fromJson(e), c = e.$index(0, u) != null ? i.QueryRequestDimension_fromJson(e.$index(0, u)) : null, b = e.$index(0, "isTransposed");
15280
15284
  return b == null && (b = !1), n = e.$index(0, "showLabel"), n == null && (n = !1), a = e.$index(0, "drillDimension"), e.$index(0, "isBlend"), o = e.$index(0, "joinDatasources"), o == null && (o = []), o = i.List_List$from(o, r.Map_String_dynamic), s = i._arrayInstanceType(o)._eval$1("MappedListIterable<1,JoinDatasourceConfig>"), i.List_List$of(new i.MappedListIterable(o, new i.BaseXYDatasourceConfigModel_BaseXYDatasourceConfigModel$fromJson_closure(p), s), !0, s._eval$1("ListIterable.E")), new i.BaseXYDatasourceConfigModel(n, a, c, b, e.$index(0, "isCumulative"), p.schemaNames, p.dimensions, p.metrics, p.filters, p.sorts, p.limit, p.isComparable, p.periodType, p.timezone);
15281
15285
  },
15282
- BaseXYDatasourceConfigModel: function(n, a, o, s, u, p, c, b, _, A, D, $, q, h) {
15286
+ BaseXYDatasourceConfigModel: function(n, a, o, s, u, p, c, b, _, A, D, $, q, S) {
15283
15287
  var T = this;
15284
- T.showLabel = n, T._xy_datasource_config_model$_drillDimension = a, T.breakdownDimension = o, T.isTransposed = s, T.isCumulative = u, T.schemaNames = p, T.dimensions = c, T.metrics = b, T.filters = _, T.sorts = A, T.limit = D, T.isComparable = $, T.periodType = q, T.timezone = h;
15288
+ T.showLabel = n, T._xy_datasource_config_model$_drillDimension = a, T.breakdownDimension = o, T.isTransposed = s, T.isCumulative = u, T.schemaNames = p, T.dimensions = c, T.metrics = b, T.filters = _, T.sorts = A, T.limit = D, T.isComparable = $, T.periodType = q, T.timezone = S;
15285
15289
  },
15286
15290
  BaseXYDatasourceConfigModel_BaseXYDatasourceConfigModel$fromJson_closure: function(n) {
15287
15291
  this.baseConfig = n;
@@ -15313,10 +15317,10 @@ var $a = ya, Yr = {};
15313
15317
  return e instanceof i.BaseXYDatasourceConfigModel && e.isCumulative === !0 ? a = !0 : a = e instanceof i.ScorecardDatasourceConfigModel && e.isCumulative, a ? (a = r.XYDatasetModel, i.List_List$of(i.ListExtensions_mapIndexed(n, new i.accumulate_closure(e), a, a), !0, a)) : n;
15314
15318
  },
15315
15319
  formatBaseXYChartData(e, n, a, o, s) {
15316
- var u, p, c, b, _, A, D, $, q, h, T, C, F, B, v, I, J, H, Y, j, A0, a0, Q0, K0, t1, a1, X0, r1, i1, p1, M1, s1, A1 = null;
15320
+ var u, p, c, b, _, A, D, $, q, S, T, C, F, B, v, I, J, H, Y, j, A0, a0, Q0, K0, t1, a1, X0, r1, i1, p1, M1, s1, A1 = null;
15317
15321
  if (a.length === 0)
15318
15322
  return u = i._setArrayType([], r.JSArray_String), p = i._setArrayType([], r.JSArray_XYDatasetModel), c = i.IterableExtension_get_firstOrNull(a), new i.BaseXYChartDataModel(e, u, p, new i.DateComparison(c == null ? A1 : c.dateRange, A1));
15319
- for (b = O.JSArray_methods.get$first(a).columns, u = i._arrayInstanceType(b), p = u._eval$1("WhereIterable<1>"), _ = i.List_List$of(new i.WhereIterable(b, new i.formatBaseXYChartData_closure(), p), !0, p._eval$1("Iterable.E")), p = i._arrayInstanceType(_)._eval$1("WhereIterable<1>"), A = i.List_List$of(new i.WhereIterable(_, new i.formatBaseXYChartData_closure0(), p), !0, p._eval$1("Iterable.E")), p = r.QueryResponse, D = i._formatRows(i.ListExtension_sublistOrEmpty(a, 0, 1, p), s), $ = i._formatRows(i.ListExtension_sublistOrEmpty(a, 1, 2, p), s), $.length !== 0 && (u = u._eval$1("MappedListIterable<1,ComparisonDataColumn>"), q = i.List_List$of(new i.MappedListIterable(b, new i.formatBaseXYChartData_closure1(), u), !0, u._eval$1("ListIterable.E")), h = i.compare(new i.ComparisonData(q, $), new i.ComparisonData(q, D)), $ = h.comparison, D = h.main), u = r.String, p = i.LinkedHashMap_LinkedHashMap$_empty(u, r.bool), c = A.length, T = 0; C = A.length, T < C; A.length === c || (0, i.throwConcurrentModificationError)(A), ++T)
15323
+ for (b = O.JSArray_methods.get$first(a).columns, u = i._arrayInstanceType(b), p = u._eval$1("WhereIterable<1>"), _ = i.List_List$of(new i.WhereIterable(b, new i.formatBaseXYChartData_closure(), p), !0, p._eval$1("Iterable.E")), p = i._arrayInstanceType(_)._eval$1("WhereIterable<1>"), A = i.List_List$of(new i.WhereIterable(_, new i.formatBaseXYChartData_closure0(), p), !0, p._eval$1("Iterable.E")), p = r.QueryResponse, D = i._formatRows(i.ListExtension_sublistOrEmpty(a, 0, 1, p), s), $ = i._formatRows(i.ListExtension_sublistOrEmpty(a, 1, 2, p), s), $.length !== 0 && (u = u._eval$1("MappedListIterable<1,ComparisonDataColumn>"), q = i.List_List$of(new i.MappedListIterable(b, new i.formatBaseXYChartData_closure1(), u), !0, u._eval$1("ListIterable.E")), S = i.compare(new i.ComparisonData(q, $), new i.ComparisonData(q, D)), $ = S.comparison, D = S.main), u = r.String, p = i.LinkedHashMap_LinkedHashMap$_empty(u, r.bool), c = A.length, T = 0; C = A.length, T < C; A.length === c || (0, i.throwConcurrentModificationError)(A), ++T)
15320
15324
  F = A[T], p.$indexSet(0, F.id, F.nullable);
15321
15325
  for (c = i.LinkedHashMap_LinkedHashMap$_empty(u, u), T = 0; T < A.length; A.length === C || (0, i.throwConcurrentModificationError)(A), ++T)
15322
15326
  F = A[T], c.$indexSet(0, F.id, F.label);
@@ -15405,13 +15409,13 @@ var $a = ya, Yr = {};
15405
15409
  return n.length === 0 ? i._setArrayType([], r.JSArray_List_dynamic) : (o = O.JSArray_methods.get$first(n), s = o.rows, u = i._arrayInstanceType(s)._eval$1("MappedListIterable<1,List<@>>"), i.List_List$of(new i.MappedListIterable(s, new i._formatRows_closure0(o, a), u), !0, u._eval$1("ListIterable.E")));
15406
15410
  },
15407
15411
  formatCircularChartData(e, n, a, o) {
15408
- var s, u, p, c, b, _, A, D, $, q, h, T, C, F, B = null;
15412
+ var s, u, p, c, b, _, A, D, $, q, S, T, C, F, B = null;
15409
15413
  if (n.length === 0)
15410
15414
  return s = i._setArrayType([], r.JSArray_String), new i.CircularDataModel(i._setArrayType([], r.JSArray_CircularDatasetModel), s, new i.DateComparison(B, B));
15411
15415
  for (s = r.QueryResponse, u = i._formatRows0(e, i.ListExtension_sublistOrEmpty(n, 0, 1, s), o), p = i._formatRows0(e, i.ListExtension_sublistOrEmpty(n, 1, 2, s), o), c = O.JSArray_methods.get$first(n).columns, p.length !== 0 && (s = i._arrayInstanceType(c)._eval$1("MappedListIterable<1,ComparisonDataColumn>"), b = i.List_List$of(new i.MappedListIterable(c, new i.formatCircularChartData_closure(), s), !0, s._eval$1("ListIterable.E")), _ = i.compare(new i.ComparisonData(b, p), new i.ComparisonData(b, u)), p = _.comparison, u = _.main), s = r.JSArray_String, A = i._setArrayType([], s), D = u.length, $ = 0; $ < u.length; u.length === D || (0, i.throwConcurrentModificationError)(u), ++$)
15412
15416
  A.push(l.toString$0$(l.$index$asx(u[$], 0)));
15413
15417
  for (D = i.LinkedHashSet_LinkedHashSet$from(A, r.String), A = i.List_List$of(D, !0, i._instanceType(D)._precomputed1), q = i._setArrayType([], r.JSArray_CircularDatasetModel), D = A.length, $ = 0; $ < D; ++$)
15414
- h = A[$], T = i.IterableExtension_firstWhereOrNull(u, new i.formatCircularChartData_closure0(h)), C = T == null ? B : i.ListExtension_elementAtOrNull(T, 1), C == null && (C = 0), p.length !== 0 ? (T = i.IterableExtension_firstWhereOrNull(p, new i.formatCircularChartData_closure1(h)), F = T == null ? B : i.ListExtension_elementAtOrNull(T, 1), F == null && (F = 0)) : F = B, q.push(new i.CircularDatasetModel(h, i.num_parse(C), F));
15418
+ S = A[$], T = i.IterableExtension_firstWhereOrNull(u, new i.formatCircularChartData_closure0(S)), C = T == null ? B : i.ListExtension_elementAtOrNull(T, 1), C == null && (C = 0), p.length !== 0 ? (T = i.IterableExtension_firstWhereOrNull(p, new i.formatCircularChartData_closure1(S)), F = T == null ? B : i.ListExtension_elementAtOrNull(T, 1), F == null && (F = 0)) : F = B, q.push(new i.CircularDatasetModel(S, i.num_parse(C), F));
15415
15419
  return s = i.IterableExtension_foldIndexed(c, i._setArrayType([], s), new i.formatCircularChartData_closure2()), D = i.IterableExtension_get_firstOrNull(n), D = D == null ? B : D.dateRange, T = i.ListExtension_elementAtOrNull(n, 1), new i.CircularDataModel(q, s, new i.DateComparison(D, T == null ? B : T.dateRange));
15416
15420
  },
15417
15421
  _formatRows_closure0: function(n, a) {
@@ -15441,9 +15445,9 @@ var $a = ya, Yr = {};
15441
15445
  return new i.RowInfo(u, l.map$1$1$ax(a, new i._getRowInfo_closure(e, n, o, u), s).join$0(0));
15442
15446
  },
15443
15447
  compare(e, n) {
15444
- var a, o, s, u, p, c, b, _, A, D, $, q, h, T, C, F, B, v, I, J, H = {};
15448
+ var a, o, s, u, p, c, b, _, A, D, $, q, S, T, C, F, B, v, I, J, H = {};
15445
15449
  for (H.comparisonDateIndex = H.mainDateIndex = null, a = H.comparisonIndexesCompleted = H.mainIndexesCompleted = !1, o = n.columns, s = r.JSArray_int, u = i.IterableExtension_foldIndexed(o, i._setArrayType([], s), new i.compare_closure(H)), p = i.IterableExtension_foldIndexed(e.columns, i._setArrayType([], s), new i.compare_closure0(H)), s = r.JSArray_String, H.dates = i._setArrayType([], s), (H.mainDateIndex != null ? H.comparisonDateIndex != null : a) && (a = r.String, a = i.ListExtensions_mapIndexed(O.JSArray_methods.fold$2(n.rows, i._setArrayType([], s), new i.compare_closure1(H)), new i.compare_closure2(O.JSArray_methods.fold$2(e.rows, i._setArrayType([], s), new i.compare_closure3(H))), a, a), H.dates = i.List_List$of(a, !0, a.$ti._eval$1("Iterable.E"))), c = O.JSArray_methods.fold$2(e.rows, i.LinkedHashMap_LinkedHashMap$_empty(r.String, r.List_dynamic), new i.compare_closure4(H, e, p)), a = r.JSArray_List_dynamic, s = i._setArrayType([], a), a = i._setArrayType([], a), b = n.rows, _ = b.length, A = r.JSArray_dynamic, D = l.getInterceptor$asx(u), $ = r.dynamic, q = 0; q < b.length; b.length === _ || (0, i.throwConcurrentModificationError)(b), ++q) {
15446
- if (h = b[q], T = i._getRowInfo(o, H.dates, u, h), C = c.$index(0, T.id), F = C == null ? null : l.toList$0$ax(C), F == null) {
15450
+ if (S = b[q], T = i._getRowInfo(o, H.dates, u, S), C = c.$index(0, T.id), F = C == null ? null : l.toList$0$ax(C), F == null) {
15447
15451
  for (C = T.row, B = i.List_List$of(i.ListExtensions_slice(C, 0, D.get$length(u), $), !0, $), v = C.length - D.get$length(u), v < 0 && i.throwExpression(i.ArgumentError$("Length must be a non-negative integer: " + v)), I = i._setArrayType(new Array(v), A), J = 0; J < v; ++J)
15448
15452
  I[J] = null;
15449
15453
  O.JSArray_methods.addAll$1(B, I), F = B;
@@ -15490,21 +15494,21 @@ var $a = ya, Yr = {};
15490
15494
  this._box_0 = n, this.comparison = a, this.comparisonIndexes = o;
15491
15495
  },
15492
15496
  _formatSparkline(e, n, a, o) {
15493
- var s, u, p, c, b, _, A, D, $, q, h, T, C;
15497
+ var s, u, p, c, b, _, A, D, $, q, S, T, C;
15494
15498
  if (n == null)
15495
15499
  return null;
15496
15500
  for (s = n.rows, u = i._arrayInstanceType(s)._eval$1("MappedListIterable<1,List<@>>"), p = i.List_List$of(new i.MappedListIterable(s, new i._formatSparkline_closure(n, a, o), u), !0, u._eval$1("ListIterable.E")), u = i._arrayInstanceType(p)._eval$1("MappedListIterable<1,List<@>>"), p = i.List_List$of(new i.MappedListIterable(p, new i._formatSparkline_closure0(n, O.JSArray_methods.indexWhere$1(n.columns, new i._formatSparkline_closure1())), u), !0, u._eval$1("ListIterable.E")), u = r.JSArray_String, c = i._setArrayType([], u), b = i._setArrayType([], u), s = p.length, _ = 0; _ < p.length; p.length === s || (0, i.throwConcurrentModificationError)(p), ++_)
15497
15501
  A = p[_], u = l.getInterceptor$asx(A), c.push(l.toString$0$(u.$index(A, 0))), b.push(l.toString$0$(u.$index(A, 1)));
15498
15502
  for (s = r.String, u = i.LinkedHashSet_LinkedHashSet$from(c, s), c = i.List_List$of(u, !0, i._instanceType(u)._precomputed1), s = i.LinkedHashSet_LinkedHashSet$from(b, s), b = i.List_List$of(s, !0, i._instanceType(s)._precomputed1), D = i._setArrayType([], r.JSArray_XYDatasetModel), s = b.length, u = r.JSArray_num, _ = 0; _ < b.length; b.length === s || (0, i.throwConcurrentModificationError)(b), ++_) {
15499
- for ($ = b[_], q = i._setArrayType([], u), h = c.length, T = 0; T < c.length; c.length === h || (0, i.throwConcurrentModificationError)(c), ++T)
15503
+ for ($ = b[_], q = i._setArrayType([], u), S = c.length, T = 0; T < c.length; c.length === S || (0, i.throwConcurrentModificationError)(c), ++T)
15500
15504
  C = i.IterableExtension_firstWhereOrNull(p, new i._formatSparkline_closure2(c[T], $)), C = C == null ? null : i.ListExtension_elementAtOrNull(C, 2), q.push(C ?? 0);
15501
15505
  D.push(new i.XYDatasetModel($, !1, q));
15502
15506
  }
15503
15507
  return new i.SparklineDataModel(O.SparklineType_0, c, i.accumulate(e, D));
15504
15508
  },
15505
15509
  formatScoreCardChartData(e, n, a, o) {
15506
- var s, u, p, c, b, _, A, D, $, q, h, T, C, F, B = null;
15507
- return n.length === 0 ? new i.ScorecardDataModel(B, B, B, B) : (s = O.JSArray_methods.get$first(n).columns, s = new i.WhereIterable(s, new i.formatScoreCardChartData_closure(), i._arrayInstanceType(s)._eval$1("WhereIterable<1>")), u = s.get$first(s), s = r.QueryResponse, p = i.IterableExtension_get_firstOrNull(i.ListExtension_sublistOrEmpty(n, 0, 1, s)), c = p == null ? B : i.IterableExtension_get_firstOrNull(p.rows), b = e.sparklineDimension != null, _ = b ? i.IterableExtension_get_firstOrNull(i.ListExtension_sublistOrEmpty(n, 1, 2, s)) : B, A = b ? 2 : 1, s = i.IterableExtension_get_firstOrNull(i.ListExtension_sublistOrEmpty(n, A, A + 1, s)), D = s == null ? B : i.IterableExtension_get_firstOrNull(s.rows), s = u.dataType, p = c == null ? B : c.value.$index(0, u.id), $ = u.optionType, q = u.aggregationType, h = u.decimal, T = u.timeFormatter, C = u.formatter, p = i.DataTypeExtension_toDisplay(s, q, a, h, $, C, !1, T, o, p), F = D == null, (F ? B : D.value.$index(0, u.id)) != null ? s = i.DataTypeExtension_toDisplay(s, q, a, h, $, C, !1, T, o, F ? B : D.value.$index(0, u.id)) : s = B, new i.ScorecardDataModel(B, p, s, i._formatSparkline(e, _, a, o)));
15510
+ var s, u, p, c, b, _, A, D, $, q, S, T, C, F, B = null;
15511
+ return n.length === 0 ? new i.ScorecardDataModel(B, B, B, B) : (s = O.JSArray_methods.get$first(n).columns, s = new i.WhereIterable(s, new i.formatScoreCardChartData_closure(), i._arrayInstanceType(s)._eval$1("WhereIterable<1>")), u = s.get$first(s), s = r.QueryResponse, p = i.IterableExtension_get_firstOrNull(i.ListExtension_sublistOrEmpty(n, 0, 1, s)), c = p == null ? B : i.IterableExtension_get_firstOrNull(p.rows), b = e.sparklineDimension != null, _ = b ? i.IterableExtension_get_firstOrNull(i.ListExtension_sublistOrEmpty(n, 1, 2, s)) : B, A = b ? 2 : 1, s = i.IterableExtension_get_firstOrNull(i.ListExtension_sublistOrEmpty(n, A, A + 1, s)), D = s == null ? B : i.IterableExtension_get_firstOrNull(s.rows), s = u.dataType, p = c == null ? B : c.value.$index(0, u.id), $ = u.optionType, q = u.aggregationType, S = u.decimal, T = u.timeFormatter, C = u.formatter, p = i.DataTypeExtension_toDisplay(s, q, a, S, $, C, !1, T, o, p), F = D == null, (F ? B : D.value.$index(0, u.id)) != null ? s = i.DataTypeExtension_toDisplay(s, q, a, S, $, C, !1, T, o, F ? B : D.value.$index(0, u.id)) : s = B, new i.ScorecardDataModel(B, p, s, i._formatSparkline(e, _, a, o)));
15508
15512
  },
15509
15513
  _formatSparkline_closure: function(n, a, o) {
15510
15514
  this.response = n, this.country = a, this.timezone = o;
@@ -15527,28 +15531,28 @@ var $a = ya, Yr = {};
15527
15531
  formatScoreCardChartData_closure: function() {
15528
15532
  },
15529
15533
  _formatTableResponse(e, n, a, o) {
15530
- var s, u, p, c, b, _, A, D, $, q, h, T = null, C = a.columns, F = i._arrayInstanceType(C), B = F._eval$1("WhereIterable<1>"), v = r.String;
15534
+ var s, u, p, c, b, _, A, D, $, q, S, T = null, C = a.columns, F = i._arrayInstanceType(C), B = F._eval$1("WhereIterable<1>"), v = r.String;
15531
15535
  for (F = i.List_List$of(new i.MappedIterable(new i.WhereIterable(C, new i._formatTableResponse_closure(e), B), new i._formatTableResponse_closure0(), F._eval$1("MappedIterable<1,String>")), !0, v), s = e.get$rowIds(), u = r.List__Header_dynamic, s = i.List_List$of(new i.MappedListIterable(s, new i._formatTableResponse_closure1(a), i._arrayInstanceType(s)._eval$1("MappedListIterable<1,List<_Header<@>>>")), !0, u), p = r.JSArray_List__Header_dynamic, O.JSArray_methods.addAll$1(s, O.JSArray_methods.fold$2(F, i._setArrayType([], p), new i._formatTableResponse_closure2(a))), c = i.List_List$of(new i.WhereIterable(C, new i._formatTableResponse_closure3(), B), !0, B._eval$1("Iterable.E")), B = i.LinkedHashMap_LinkedHashMap$_empty(v, r.QueryResponseColumn), C = c.length, b = 0; b < c.length; c.length === C || (0, i.throwConcurrentModificationError)(c), ++b)
15532
15536
  _ = c[b], B.$indexSet(0, _.id, _);
15533
15537
  for (C = i.List_List$of(i.ListExtensions_mapIndexed(e.get$columnIds(), new i._formatTableResponse_closure4(e, B, a), v, u), !0, u), C.length !== 0 ? (A = i._setArrayType([], p), i._getRecursivePermutations(C, A, 0, i._setArrayType([], r.JSArray__Header_dynamic), r._Header_dynamic), D = A) : D = [], C = i.List_List$of(s, !0, u), F = D.length, b = 0; b < D.length; D.length === F || (0, i.throwConcurrentModificationError)(D), ++b)
15534
15538
  C.push(D[b]);
15535
15539
  for (e.get$columnIds().length === 0 && O.JSArray_methods.contains$1(e.get$rowIds(), "_metric_name") && C.push(i._setArrayType([new i._Header("_metric_value", "Value", T, T, O.DATA_TYPE_3, T, T, !1, T, T, T, !1)], r.JSArray__Header_dynamic)), C.push(i._setArrayType([new i._Header("_is_rollup", "Rollup", T, T, O.DATA_TYPE_2, T, T, !0, T, T, T, !1)], r.JSArray__Header_dynamic)), F = r.Map_String_dynamic, $ = i.LinkedHashMap_LinkedHashMap$_empty(v, F), B = l.get$iterator$ax(O.JSArray_methods.fold$2(a.rows, i._setArrayType([], r.JSArray_Map_String_dynamic), new i._formatTableResponse_closure5(C, c))), v = r.dynamic; B.moveNext$0(); )
15536
- s = B.get$current(), q = i._asString(s.$index(0, "id")), h = $.$index(0, q), h == null ? $.$indexSet(0, q, s) : (s = i.ListExtensions_mapIndexed(i.List_List$from(h.$index(0, "value"), v), new i._formatTableResponse_closure6(C, s), v, v), h.$indexSet(0, "value", i.List_List$of(s, !0, s.$ti._eval$1("Iterable.E"))));
15540
+ s = B.get$current(), q = i._asString(s.$index(0, "id")), S = $.$index(0, q), S == null ? $.$indexSet(0, q, s) : (s = i.ListExtensions_mapIndexed(i.List_List$from(S.$index(0, "value"), v), new i._formatTableResponse_closure6(C, s), v, v), S.$indexSet(0, "value", i.List_List$of(s, !0, s.$ti._eval$1("Iterable.E"))));
15537
15541
  return B = $.get$values($), F = i.ListExtensions_mapIndexed(i.List_List$of(B, !0, i._instanceType(B)._eval$1("Iterable.E")), new i._formatTableResponse_closure7(), F, r.TableRowModel), B = i._arrayInstanceType(C)._eval$1("MappedListIterable<1,TableColumnModel>"), new i.TableDataModel(i.List_List$of(F, !0, F.$ti._eval$1("Iterable.E")), i.List_List$of(new i.MappedListIterable(C, new i._formatTableResponse_closure8(n, o), B), !0, B._eval$1("ListIterable.E")));
15538
15542
  },
15539
15543
  _formatTableData(e, n, a, o) {
15540
- var s, u, p, c, b, _, A, D, $, q, h = {};
15544
+ var s, u, p, c, b, _, A, D, $, q, S = {};
15541
15545
  if (n.length === 0)
15542
15546
  return new i.TableDataModel(i._setArrayType([], r.JSArray_TableRowModel), i._setArrayType([], r.JSArray_TableColumnModel));
15543
- for (h.mainResponse = i._formatTableResponse(e, a, O.JSArray_methods.get$first(n), o), s = i.ListExtensions_mapIndexed(O.JSArray_methods.sublist$1(n, 1), new i._formatTableData_closure(e, a, o), r.QueryResponse, r.TableDataModel), u = i.List_List$of(s, !0, s.$ti._eval$1("Iterable.E")), s = r.TableColumnModel, p = 0; p < e.get$joinDatasources().length; ++p)
15544
- c = e.get$joinDatasources()[p].conditions, b = u[p], _ = i._arrayInstanceType(c), A = _._eval$1("MappedListIterable<1,int>"), D = i.List_List$of(new i.MappedListIterable(c, new i._formatTableData_closure0(b), A), !0, A._eval$1("ListIterable.E")), _ = _._eval$1("MappedListIterable<1,List<int>>"), $ = i.List_List$of(new i.MappedListIterable(c, new i._formatTableData_closure1(h), _), !0, _._eval$1("ListIterable.E")), _ = i.List_List$of(h.mainResponse.columns, !0, s), O.JSArray_methods.addAll$1(_, b.columns), A = h.mainResponse.rows, q = i._arrayInstanceType(A)._eval$1("MappedListIterable<1,TableRowModel>"), q = i.List_List$of(new i.MappedListIterable(A, new i._formatTableData_closure2(b, c, D, $), q), !0, q._eval$1("ListIterable.E")), h.mainResponse = new i.TableDataModel(q, _);
15545
- return s = h.mainResponse, _ = s.rows, A = i._arrayInstanceType(_)._eval$1("MappedListIterable<1,TableRowModel>"), s.copyWith$1$rows(i.List_List$of(new i.MappedListIterable(_, new i._formatTableData_closure3(), A), !0, A._eval$1("ListIterable.E")));
15547
+ for (S.mainResponse = i._formatTableResponse(e, a, O.JSArray_methods.get$first(n), o), s = i.ListExtensions_mapIndexed(O.JSArray_methods.sublist$1(n, 1), new i._formatTableData_closure(e, a, o), r.QueryResponse, r.TableDataModel), u = i.List_List$of(s, !0, s.$ti._eval$1("Iterable.E")), s = r.TableColumnModel, p = 0; p < e.get$joinDatasources().length; ++p)
15548
+ c = e.get$joinDatasources()[p].conditions, b = u[p], _ = i._arrayInstanceType(c), A = _._eval$1("MappedListIterable<1,int>"), D = i.List_List$of(new i.MappedListIterable(c, new i._formatTableData_closure0(b), A), !0, A._eval$1("ListIterable.E")), _ = _._eval$1("MappedListIterable<1,List<int>>"), $ = i.List_List$of(new i.MappedListIterable(c, new i._formatTableData_closure1(S), _), !0, _._eval$1("ListIterable.E")), _ = i.List_List$of(S.mainResponse.columns, !0, s), O.JSArray_methods.addAll$1(_, b.columns), A = S.mainResponse.rows, q = i._arrayInstanceType(A)._eval$1("MappedListIterable<1,TableRowModel>"), q = i.List_List$of(new i.MappedListIterable(A, new i._formatTableData_closure2(b, c, D, $), q), !0, q._eval$1("ListIterable.E")), S.mainResponse = new i.TableDataModel(q, _);
15549
+ return s = S.mainResponse, _ = s.rows, A = i._arrayInstanceType(_)._eval$1("MappedListIterable<1,TableRowModel>"), s.copyWith$1$rows(i.List_List$of(new i.MappedListIterable(_, new i._formatTableData_closure3(), A), !0, A._eval$1("ListIterable.E")));
15546
15550
  },
15547
15551
  formatTableChartData(e, n, a, o) {
15548
- var s, u, p, c, b, _, A, D, $, q, h, T, C, F, B, v, I, J, H, Y, j = {};
15552
+ var s, u, p, c, b, _, A, D, $, q, S, T, C, F, B, v, I, J, H, Y, j = {};
15549
15553
  if (n.length === 0)
15550
15554
  return new i.TableDataModel(i._setArrayType([], r.JSArray_TableRowModel), i._setArrayType([], r.JSArray_TableColumnModel));
15551
- for (e.isBlend && (s = i.List_List$of(e.get$dimensions(), !0, r.QueryRequestDimension), O.JSArray_methods.addAll$1(s, O.JSArray_methods.fold$2(e.get$joinDatasources(), i._setArrayType([], r.JSArray_QueryRequestDimension), new i.formatTableChartData_closure())), u = i.List_List$of(e.get$metrics(), !0, r.QueryRequestMetric), O.JSArray_methods.addAll$1(u, O.JSArray_methods.fold$2(e.get$joinDatasources(), i._setArrayType([], r.JSArray_QueryRequestMetric), new i.formatTableChartData_closure0())), p = i._setArrayType([], r.JSArray_JoinDatasourceConfig), c = e.rowsPerPage, b = e.get$columnIds(), _ = e.get$rowIds(), A = e.get$drillDimension(), e = i.TableDatasourceConfigModel$(b, e.columnsWidth, s, A, e.filters, !0, e.isComparable, e.isDrillable, p, e.limit, u, e.periodType, e.rollup, e.rollupPosition, _, c, e.schemaNames, e.showGrandTotal, e.sorts, e.timezone)), D = e.get$joinDatasources().length + 1, s = r.QueryResponse, $ = i._formatTableData(e, i.ListExtension_sublistOrEmpty(n, 0, D, s), a, o), q = j.comparison = i._formatTableData(e, i.ListExtension_sublistOrEmpty(n, D, D * 2, s), a, o), s = q.rows, s.length !== 0 && (u = $.rows, p = i._arrayInstanceType(u)._eval$1("MappedListIterable<1,List<@>>"), p = i.List_List$of(new i.MappedListIterable(u, new i.formatTableChartData_closure1(), p), !0, p._eval$1("ListIterable.E")), c = $.columns, b = i._arrayInstanceType(c)._eval$1("MappedListIterable<1,ComparisonDataColumn>"), b = i.List_List$of(new i.MappedListIterable(c, new i.formatTableChartData_closure2(), b), !0, b._eval$1("ListIterable.E")), c = i._arrayInstanceType(s)._eval$1("MappedListIterable<1,List<@>>"), c = i.List_List$of(new i.MappedListIterable(s, new i.formatTableChartData_closure3(), c), !0, c._eval$1("ListIterable.E")), _ = q.columns, A = i._arrayInstanceType(_)._eval$1("MappedListIterable<1,ComparisonDataColumn>"), h = i.compare(new i.ComparisonData(i.List_List$of(new i.MappedListIterable(_, new i.formatTableChartData_closure4(), A), !0, A._eval$1("ListIterable.E")), c), new i.ComparisonData(b, p)), p = r.TableRowModel, u = i.ListExtensions_mapIndexed(u, new i.formatTableChartData_closure5(h), p, p), $ = $.copyWith$1$rows(i.List_List$of(u, !0, u.$ti._eval$1("Iterable.E"))), p = i.ListExtensions_mapIndexed(s, new i.formatTableChartData_closure6(h), p, p), j.comparison = q.copyWith$1$rows(i.List_List$of(p, !0, p.$ti._eval$1("Iterable.E")))), s = $.columns, u = i._arrayInstanceType(s)._eval$1("WhereIterable<1>"), T = i.List_List$of(new i.WhereIterable(s, new i.formatTableChartData_closure7(), u), !0, u._eval$1("Iterable.E")), u = r.String, p = r.int, C = i.LinkedHashMap_LinkedHashMap$_empty(u, p), F = 0; F < s.length; ++F)
15555
+ for (e.isBlend && (s = i.List_List$of(e.get$dimensions(), !0, r.QueryRequestDimension), O.JSArray_methods.addAll$1(s, O.JSArray_methods.fold$2(e.get$joinDatasources(), i._setArrayType([], r.JSArray_QueryRequestDimension), new i.formatTableChartData_closure())), u = i.List_List$of(e.get$metrics(), !0, r.QueryRequestMetric), O.JSArray_methods.addAll$1(u, O.JSArray_methods.fold$2(e.get$joinDatasources(), i._setArrayType([], r.JSArray_QueryRequestMetric), new i.formatTableChartData_closure0())), p = i._setArrayType([], r.JSArray_JoinDatasourceConfig), c = e.rowsPerPage, b = e.get$columnIds(), _ = e.get$rowIds(), A = e.get$drillDimension(), e = i.TableDatasourceConfigModel$(b, e.columnsWidth, s, A, e.filters, !0, e.isComparable, e.isDrillable, p, e.limit, u, e.periodType, e.rollup, e.rollupPosition, _, c, e.schemaNames, e.showGrandTotal, e.sorts, e.timezone)), D = e.get$joinDatasources().length + 1, s = r.QueryResponse, $ = i._formatTableData(e, i.ListExtension_sublistOrEmpty(n, 0, D, s), a, o), q = j.comparison = i._formatTableData(e, i.ListExtension_sublistOrEmpty(n, D, D * 2, s), a, o), s = q.rows, s.length !== 0 && (u = $.rows, p = i._arrayInstanceType(u)._eval$1("MappedListIterable<1,List<@>>"), p = i.List_List$of(new i.MappedListIterable(u, new i.formatTableChartData_closure1(), p), !0, p._eval$1("ListIterable.E")), c = $.columns, b = i._arrayInstanceType(c)._eval$1("MappedListIterable<1,ComparisonDataColumn>"), b = i.List_List$of(new i.MappedListIterable(c, new i.formatTableChartData_closure2(), b), !0, b._eval$1("ListIterable.E")), c = i._arrayInstanceType(s)._eval$1("MappedListIterable<1,List<@>>"), c = i.List_List$of(new i.MappedListIterable(s, new i.formatTableChartData_closure3(), c), !0, c._eval$1("ListIterable.E")), _ = q.columns, A = i._arrayInstanceType(_)._eval$1("MappedListIterable<1,ComparisonDataColumn>"), S = i.compare(new i.ComparisonData(i.List_List$of(new i.MappedListIterable(_, new i.formatTableChartData_closure4(), A), !0, A._eval$1("ListIterable.E")), c), new i.ComparisonData(b, p)), p = r.TableRowModel, u = i.ListExtensions_mapIndexed(u, new i.formatTableChartData_closure5(S), p, p), $ = $.copyWith$1$rows(i.List_List$of(u, !0, u.$ti._eval$1("Iterable.E"))), p = i.ListExtensions_mapIndexed(s, new i.formatTableChartData_closure6(S), p, p), j.comparison = q.copyWith$1$rows(i.List_List$of(p, !0, p.$ti._eval$1("Iterable.E")))), s = $.columns, u = i._arrayInstanceType(s)._eval$1("WhereIterable<1>"), T = i.List_List$of(new i.WhereIterable(s, new i.formatTableChartData_closure7(), u), !0, u._eval$1("Iterable.E")), u = r.String, p = r.int, C = i.LinkedHashMap_LinkedHashMap$_empty(u, p), F = 0; F < s.length; ++F)
15552
15556
  B = s[F], C.$indexSet(0, B.key + "_" + B.hide, F);
15553
15557
  for (v = i.LinkedHashMap_LinkedHashMap$_empty(u, p), F = 0; s = j.comparison.columns, F < s.length; ++F)
15554
15558
  B = s[F], v.$indexSet(0, B.key + "_" + B.hide, F);
@@ -15801,8 +15805,8 @@ var $a = ya, Yr = {};
15801
15805
  IterableExtension_mapIndexed$body(e, n, a, o, s) {
15802
15806
  return i._makeSyncStarIterable(function() {
15803
15807
  var u = e, p = n, c = 0, b = 1, _, A, D, $;
15804
- return function(h, T) {
15805
- for (h === 1 && (_ = T, c = b); ; )
15808
+ return function(S, T) {
15809
+ for (S === 1 && (_ = T, c = b); ; )
15806
15810
  switch (c) {
15807
15811
  case 0:
15808
15812
  A = u.get$iterator(u), D = 0;
@@ -15950,7 +15954,7 @@ var $a = ya, Yr = {};
15950
15954
  }, r.Location);
15951
15955
  },
15952
15956
  _deserializeLocation(e) {
15953
- var n, a, o, s, u = i.NativeByteData_NativeByteData$view(e.buffer, e.byteOffset, e.byteLength), p = u.getUint32(0, !1), c = u.getUint32(4, !1), b = u.getUint32(8, !1), _ = u.getUint32(12, !1), A = u.getUint32(16, !1), D = u.getUint32(20, !1), $ = u.getUint32(24, !1), q = u.getUint32(28, !1), h = O.C_AsciiCodec.decode$1(i.NativeUint8List_NativeUint8List$view(e.buffer, e.byteOffset + p, c)), T = i._setArrayType([], r.JSArray_String), C = i._setArrayType([], r.JSArray_TimeZone), F = r.JSArray_int, B = i._setArrayType([], F), v = i._setArrayType([], F), I = b + _;
15957
+ var n, a, o, s, u = i.NativeByteData_NativeByteData$view(e.buffer, e.byteOffset, e.byteLength), p = u.getUint32(0, !1), c = u.getUint32(4, !1), b = u.getUint32(8, !1), _ = u.getUint32(12, !1), A = u.getUint32(16, !1), D = u.getUint32(20, !1), $ = u.getUint32(24, !1), q = u.getUint32(28, !1), S = O.C_AsciiCodec.decode$1(i.NativeUint8List_NativeUint8List$view(e.buffer, e.byteOffset + p, c)), T = i._setArrayType([], r.JSArray_String), C = i._setArrayType([], r.JSArray_TimeZone), F = r.JSArray_int, B = i._setArrayType([], F), v = i._setArrayType([], F), I = b + _;
15954
15958
  for (n = b, a = n; n < I; ++n)
15955
15959
  e[n] === 0 && (F = e.buffer, o = e.byteOffset, F = new Uint8Array(F, o + a, n - a), T.push(O.C_AsciiCodec.decode$1(F)), a = n + 1);
15956
15960
  for (a = A, n = 0; n < D; ++n, a = s)
@@ -15959,7 +15963,7 @@ var $a = ya, Yr = {};
15959
15963
  B.push(O.JSNumber_methods.toInt$0(u.getFloat64(a, !1)) * 1e3), a += 8;
15960
15964
  for (n = 0; n < q; ++n)
15961
15965
  v.push(u.getUint8(a)), ++a;
15962
- return i.Location$(h, B, v, C);
15966
+ return i.Location$(S, B, v, C);
15963
15967
  }
15964
15968
  }, l = {
15965
15969
  makeDispatchRecord(e, n, a, o) {
@@ -17972,25 +17976,25 @@ Arguments: [` + b + "]";
17972
17976
  }
17973
17977
  }, i.FormatException.prototype = {
17974
17978
  toString$0(e) {
17975
- var n, a, o, s, u, p, c, b, _, A, D, $ = this.message, q = $ !== "" ? "FormatException: " + $ : "FormatException", h = this.offset, T = this.source;
17979
+ var n, a, o, s, u, p, c, b, _, A, D, $ = this.message, q = $ !== "" ? "FormatException: " + $ : "FormatException", S = this.offset, T = this.source;
17976
17980
  if (typeof T == "string") {
17977
- if (h != null ? n = h < 0 || h > T.length : n = !1, n && (h = null), h == null)
17981
+ if (S != null ? n = S < 0 || S > T.length : n = !1, n && (S = null), S == null)
17978
17982
  return T.length > 78 && (T = O.JSString_methods.substring$2(T, 0, 75) + "..."), q + `
17979
17983
  ` + T;
17980
- for (a = 1, o = 0, s = !1, u = 0; u < h; ++u)
17984
+ for (a = 1, o = 0, s = !1, u = 0; u < S; ++u)
17981
17985
  p = O.JSString_methods._codeUnitAt$1(T, u), p === 10 ? ((o !== u || !s) && ++a, o = u + 1, s = !1) : p === 13 && (++a, o = u + 1, s = !0);
17982
- for (q = a > 1 ? q + (" (at line " + a + ", character " + (h - o + 1) + `)
17983
- `) : q + (" (at character " + (h + 1) + `)
17984
- `), c = T.length, u = h; u < c; ++u)
17986
+ for (q = a > 1 ? q + (" (at line " + a + ", character " + (S - o + 1) + `)
17987
+ `) : q + (" (at character " + (S + 1) + `)
17988
+ `), c = T.length, u = S; u < c; ++u)
17985
17989
  if (p = O.JSString_methods.codeUnitAt$1(T, u), p === 10 || p === 13) {
17986
17990
  c = u;
17987
17991
  break;
17988
17992
  }
17989
- return c - o > 78 ? h - o < 75 ? (b = o + 75, _ = o, A = "", D = "...") : (c - h < 75 ? (_ = c - 75, b = c, D = "") : (_ = h - 36, b = h + 36, D = "..."), A = "...") : (b = c, _ = o, A = "", D = ""), q + A + O.JSString_methods.substring$2(T, _, b) + D + `
17990
- ` + O.JSString_methods.$mul(" ", h - _ + A.length) + `^
17993
+ return c - o > 78 ? S - o < 75 ? (b = o + 75, _ = o, A = "", D = "...") : (c - S < 75 ? (_ = c - 75, b = c, D = "") : (_ = S - 36, b = S + 36, D = "..."), A = "...") : (b = c, _ = o, A = "", D = ""), q + A + O.JSString_methods.substring$2(T, _, b) + D + `
17994
+ ` + O.JSString_methods.$mul(" ", S - _ + A.length) + `^
17991
17995
  `;
17992
17996
  } else
17993
- return h != null ? q + (" (at offset " + i.S(h) + ")") : q;
17997
+ return S != null ? q + (" (at offset " + i.S(S) + ")") : q;
17994
17998
  }
17995
17999
  }, i.Iterable.prototype = {
17996
18000
  map$1$1(e, n, a) {
@@ -18995,8 +18999,8 @@ Arguments: [` + b + "]";
18995
18999
  }
18996
19000
  }, i.QueryResponse_fromJson_closure.prototype = {
18997
19001
  call$1(e) {
18998
- var n, a, o = null, s = "aggregationType", u = "optionType", p = "timeFormatter", c = "formatter", b = i.EnumByName_byName(O.List_UnH, e.$index(0, "schema")), _ = e.$index(0, "label"), A = i.EnumByName_byName(O.List_eOU, e.$index(0, "dataType")), D = i.EnumByName_byName(O.List_FIELD_TYPE_0_FIELD_TYPE_1, e.$index(0, "fieldType")), $ = e.$index(0, "id"), q = e.$index(0, s) != null ? i.EnumByName_byName(O.List_yzJ, e.$index(0, s)) : o, h = e.$index(0, u) != null ? i.EnumByName_byName(O.List_Ioo, e.$index(0, u)) : o, T = e.$index(0, "decimal"), C = e.$index(0, p) != null ? i.EnumByName_byName(O.List_YsB, e.$index(0, p)) : o, F = e.$index(0, c) != null ? i.EnumByName_byName(O.List_jXq, e.$index(0, c)) : o, B = e.$index(0, "nullable");
18999
- return B == null && (B = !1), n = e.$index(0, "hide"), n == null && (n = !1), a = e.$index(0, "dateComparison"), new i.QueryResponseColumn(b, _, A, D, $, q, h, T, C, F, B, n, a ?? !1);
19002
+ var n, a, o = null, s = "aggregationType", u = "optionType", p = "timeFormatter", c = "formatter", b = i.EnumByName_byName(O.List_UnH, e.$index(0, "schema")), _ = e.$index(0, "label"), A = i.EnumByName_byName(O.List_eOU, e.$index(0, "dataType")), D = i.EnumByName_byName(O.List_FIELD_TYPE_0_FIELD_TYPE_1, e.$index(0, "fieldType")), $ = e.$index(0, "id"), q = e.$index(0, s) != null ? i.EnumByName_byName(O.List_yzJ, e.$index(0, s)) : o, S = e.$index(0, u) != null ? i.EnumByName_byName(O.List_Ioo, e.$index(0, u)) : o, T = e.$index(0, "decimal"), C = e.$index(0, p) != null ? i.EnumByName_byName(O.List_YsB, e.$index(0, p)) : o, F = e.$index(0, c) != null ? i.EnumByName_byName(O.List_jXq, e.$index(0, c)) : o, B = e.$index(0, "nullable");
19003
+ return B == null && (B = !1), n = e.$index(0, "hide"), n == null && (n = !1), a = e.$index(0, "dateComparison"), new i.QueryResponseColumn(b, _, A, D, $, q, S, T, C, F, B, n, a ?? !1);
19000
19004
  },
19001
19005
  $signature: 96
19002
19006
  }, i.QueryResponse_fromJson_closure0.prototype = {
@@ -19784,8 +19788,8 @@ Arguments: [` + b + "]";
19784
19788
  $signature: 76
19785
19789
  }, i._formatTableResponse__closure10.prototype = {
19786
19790
  call$2(e, n) {
19787
- var a, o, s, u, p, c, b, _, A, D = null, $ = this._box_1, q = n.value.$index(0, $.columnId), h = $.columnId + ":" + i.S(q);
19788
- return i.IterableExtension_firstWhereOrNull(e, new i._formatTableResponse___closure(h)) == null && !n.isRollup && (a = i.IterableExtension_firstWhereOrNull(this.response.columns, new i._formatTableResponse___closure0($)), $ = $.columnId, o = a == null, s = o ? D : a.dataType, u = o ? D : a.aggregationType, p = o ? D : a.optionType, c = o ? D : a.hide, b = o ? D : a.decimal, _ = o ? D : a.timeFormatter, A = o ? D : a.formatter, o = o ? D : a.dateComparison, l.add$1$ax(e, new i._Header(h, q, $, q, s, u, p, c === !0, b, _, A, o === !0))), e;
19791
+ var a, o, s, u, p, c, b, _, A, D = null, $ = this._box_1, q = n.value.$index(0, $.columnId), S = $.columnId + ":" + i.S(q);
19792
+ return i.IterableExtension_firstWhereOrNull(e, new i._formatTableResponse___closure(S)) == null && !n.isRollup && (a = i.IterableExtension_firstWhereOrNull(this.response.columns, new i._formatTableResponse___closure0($)), $ = $.columnId, o = a == null, s = o ? D : a.dataType, u = o ? D : a.aggregationType, p = o ? D : a.optionType, c = o ? D : a.hide, b = o ? D : a.decimal, _ = o ? D : a.timeFormatter, A = o ? D : a.formatter, o = o ? D : a.dateComparison, l.add$1$ax(e, new i._Header(S, q, $, q, s, u, p, c === !0, b, _, A, o === !0))), e;
19789
19793
  },
19790
19794
  $signature: 77
19791
19795
  }, i._formatTableResponse___closure.prototype = {
@@ -19800,17 +19804,17 @@ Arguments: [` + b + "]";
19800
19804
  $signature: 0
19801
19805
  }, i._formatTableResponse_closure5.prototype = {
19802
19806
  call$2(e, n) {
19803
- var a, o, s, u, p, c, b, _, A, D, $, q, h, T, C, F, B, v, I, J, H = null, Y = r.JSArray_List_dynamic, j = i._setArrayType([[]], Y), A0 = i._setArrayType([[]], Y);
19807
+ var a, o, s, u, p, c, b, _, A, D, $, q, S, T, C, F, B, v, I, J, H = null, Y = r.JSArray_List_dynamic, j = i._setArrayType([[]], Y), A0 = i._setArrayType([[]], Y);
19804
19808
  for (Y = this.headers, a = n.value, o = r.dynamic, s = r.JSArray_String, u = r.String, p = this.metricColumns, c = 0; c < Y.length; ++c)
19805
19809
  if (b = Y[c], _ = l.getInterceptor$ax(b), A = _.map$1$1(b, new i._formatTableResponse__closure4(), u).join$1(0, "|"), i.IterableExtension_firstWhereOrNull(b, new i._formatTableResponse__closure5()) != null)
19806
- for (D = _.firstWhere$1(b, new i._formatTableResponse__closure6()), $ = _.fold$2(b, !0, new i._formatTableResponse__closure7(n)), _ = j.length, q = D.type, h = D.columnValue, T = 0; T < j.length; j.length === _ || (0, i.throwConcurrentModificationError)(j), ++T)
19807
- C = j[T], $ ? (F = a.$index(0, h), B = C.length, c >= B && O.JSArray_methods.addAll$1(C, i.List_List$filled(c - B + 1, H, !1, o)), C[c] = F) : (F = q == null ? H : i.DataTypeExtension_toData(q, H), B = C.length, c >= B && O.JSArray_methods.addAll$1(C, i.List_List$filled(c - B + 1, H, !1, o)), C[c] = F);
19810
+ for (D = _.firstWhere$1(b, new i._formatTableResponse__closure6()), $ = _.fold$2(b, !0, new i._formatTableResponse__closure7(n)), _ = j.length, q = D.type, S = D.columnValue, T = 0; T < j.length; j.length === _ || (0, i.throwConcurrentModificationError)(j), ++T)
19811
+ C = j[T], $ ? (F = a.$index(0, S), B = C.length, c >= B && O.JSArray_methods.addAll$1(C, i.List_List$filled(c - B + 1, H, !1, o)), C[c] = F) : (F = q == null ? H : i.DataTypeExtension_toData(q, H), B = C.length, c >= B && O.JSArray_methods.addAll$1(C, i.List_List$filled(c - B + 1, H, !1, o)), C[c] = F);
19808
19812
  else if (O.JSArray_methods.contains$1(i._setArrayType(["_metric_name", "_metric_value"], s), A))
19809
19813
  for (_ = A === "_metric_value", q = A === "_metric_name", v = 0; v < p.length; ++v)
19810
- I = p[v], i.ListExtension_elementAtOrNull(j, v) == null && (j.push(i.List_List$of(j[0], !0, o)), A0.push(i.List_List$of(A0[0], !0, o))), q ? (h = j[v], F = I.label, B = h.length, c >= B && O.JSArray_methods.addAll$1(h, i.List_List$filled(c - B + 1, H, !1, o)), h[c] = F, A0[v].push(F)) : _ && (h = j[v], F = a.$index(0, I.id), B = h.length, c >= B && O.JSArray_methods.addAll$1(h, i.List_List$filled(c - B + 1, H, !1, o)), h[c] = F);
19814
+ I = p[v], i.ListExtension_elementAtOrNull(j, v) == null && (j.push(i.List_List$of(j[0], !0, o)), A0.push(i.List_List$of(A0[0], !0, o))), q ? (S = j[v], F = I.label, B = S.length, c >= B && O.JSArray_methods.addAll$1(S, i.List_List$filled(c - B + 1, H, !1, o)), S[c] = F, A0[v].push(F)) : _ && (S = j[v], F = a.$index(0, I.id), B = S.length, c >= B && O.JSArray_methods.addAll$1(S, i.List_List$filled(c - B + 1, H, !1, o)), S[c] = F);
19811
19815
  else
19812
19816
  for (J = 0; J < j.length; ++J)
19813
- _ = j[J], q = a.$index(0, A), h = _.length, c >= h && O.JSArray_methods.addAll$1(_, i.List_List$filled(c - h + 1, H, !1, o)), _[c] = q, A0[J].push(a.$index(0, A));
19817
+ _ = j[J], q = a.$index(0, A), S = _.length, c >= S && O.JSArray_methods.addAll$1(_, i.List_List$filled(c - S + 1, H, !1, o)), _[c] = q, A0[J].push(a.$index(0, A));
19814
19818
  return l.addAll$1$ax(e, i.ListExtensions_mapIndexed(j, new i._formatTableResponse__closure8(A0, n), r.List_dynamic, r.Map_String_dynamic)), e;
19815
19819
  },
19816
19820
  $signature: 79
@@ -20050,9 +20054,9 @@ Arguments: [` + b + "]";
20050
20054
  $signature: 99
20051
20055
  }, i.formatTableChartData_closure9.prototype = {
20052
20056
  call$2(e, n) {
20053
- var a, o, s, u, p, c, b, _, A, D, $, q, h, T, C, F, B, v, I = this, J = [], H = [], Y = n.cells, j = l.getInterceptor$asx(Y), A0 = j.get$length(Y);
20057
+ var a, o, s, u, p, c, b, _, A, D, $, q, S, T, C, F, B, v, I = this, J = [], H = [], Y = n.cells, j = l.getInterceptor$asx(Y), A0 = j.get$length(Y);
20054
20058
  for (a = I.columnMappings, o = a.length, s = I.hasComparison, u = I.country, p = I.timezone, c = e < I.comparisonRowsLength, b = I._box_0, _ = 0; _ < a.length; a.length === o || (0, i.throwConcurrentModificationError)(a), ++_)
20055
- A = a[_], D = A.mainIndex, $ = D >= 0 && D < A0 ? j.$index(Y, D) : i.ListExtension_elementAtOrNull(Y, D), D = A.column, q = D.type, h = q == null, J.push(h ? null : i.DataTypeExtension_toDisplay(q, D.aggregationType, u, D.decimal, D.dimensionOption, D.formatter, !1, D.timeFormatter, p, $)), s && (c ? (T = b.comparison.rows[e].cells, C = l.getInterceptor$asx(T), F = C.get$length(T), B = A.comparisonIndex, v = B >= 0 && B < F ? C.$index(T, B) : i.ListExtension_elementAtOrNull(T, B)) : v = i.ListExtension_elementAtOrNull([], A.comparisonIndex), H.push(h ? null : i.DataTypeExtension_toDisplay(q, D.aggregationType, u, D.decimal, D.dimensionOption, D.formatter, !1, D.timeFormatter, p, v)));
20059
+ A = a[_], D = A.mainIndex, $ = D >= 0 && D < A0 ? j.$index(Y, D) : i.ListExtension_elementAtOrNull(Y, D), D = A.column, q = D.type, S = q == null, J.push(S ? null : i.DataTypeExtension_toDisplay(q, D.aggregationType, u, D.decimal, D.dimensionOption, D.formatter, !1, D.timeFormatter, p, $)), s && (c ? (T = b.comparison.rows[e].cells, C = l.getInterceptor$asx(T), F = C.get$length(T), B = A.comparisonIndex, v = B >= 0 && B < F ? C.$index(T, B) : i.ListExtension_elementAtOrNull(T, B)) : v = i.ListExtension_elementAtOrNull([], A.comparisonIndex), H.push(S ? null : i.DataTypeExtension_toDisplay(q, D.aggregationType, u, D.decimal, D.dimensionOption, D.formatter, !1, D.timeFormatter, p, v)));
20056
20060
  return n.copyWith$2$cells$comparisonCells(J, H);
20057
20061
  },
20058
20062
  $signature: 7
@@ -20491,8 +20495,8 @@ Arguments: [` + b + "]";
20491
20495
  return o.message;
20492
20496
  }
20493
20497
  }())), n(L, "DateTime__parseFormat", "$get$DateTime__parseFormat", () => i.RegExp_RegExp("^([+-]?\\d{4,6})-?(\\d\\d)-?(\\d\\d)(?:[ T](\\d\\d)(?::?(\\d\\d)(?::?(\\d\\d)(?:[.,](\\d+))?)?)?( ?[zZ]| ?([-+])(\\d\\d)(?::?(\\d\\d))?)?)?$", !1)), n(L, "_hashSeed", "$get$_hashSeed", () => i.objectHashCode(O.Type_Object_xQ6)), n(L, "Endian_host", "$get$Endian_host", () => i.NativeByteData_NativeByteData$view(i.NativeUint16List_NativeUint16List$fromList(i._setArrayType([1], r.JSArray_int)).buffer, 0, null).getInt8(0) === 1 ? O.C_Endian0 : O.C_Endian), n(L, "_clockKey", "$get$_clockKey", () => new i.Object()), n(L, "en_USSymbols", "$get$en_USSymbols", () => new i.DateSymbols("en_US", O.List_BC_AD, O.List_6xs, O.List_qpm, O.List_qpm, O.List_cIc, O.List_cIc, O.List_h8w, O.List_h8w, O.List_wMy, O.List_wMy, O.List_gc6, O.List_gc6, O.List_3US, O.List_Q1_Q2_Q3_Q4, O.List_bJM, O.List_AM_PM)), a(L, "_dateTimeSymbols", "$get$_dateTimeSymbols", () => i.UninitializedLocaleData$("initializeDateFormatting(<locale>)", L.$get$en_USSymbols())), a(L, "dateTimePatterns", "$get$dateTimePatterns", () => i.UninitializedLocaleData$("initializeDateFormatting(<locale>)", O.Map_EQ6TW)), n(L, "asciiZeroCodeUnit", "$get$asciiZeroCodeUnit", () => 48), n(L, "DateFormat__matchers", "$get$DateFormat__matchers", () => i._setArrayType([i.RegExp_RegExp("^'(?:[^']|'')*'", !1), i.RegExp_RegExp("^(?:G+|y+|M+|k+|S+|E+|a+|h+|K+|H+|c+|L+|Q+|d+|D+|m+|s+|v+|z+|Z+)", !1), i.RegExp_RegExp("^[^'GyMkSEahKHcLQdDmsvzZ]+", !1)], i.findType("JSArray<RegExp>"))), n(L, "_DateFormatQuotedField__twoEscapedQuotes", "$get$_DateFormatQuotedField__twoEscapedQuotes", () => i.RegExp_RegExp("''", !1)), n(L, "asciiDigitMatcher", "$get$asciiDigitMatcher", () => i.RegExp_RegExp("^\\d+", !1)), a(L, "_availableLocales", "$get$_availableLocales", () => {
20494
- var o, s, u = i.EnLocale$(O.StartOfWeek_1), p = i.EnLocale$(O.StartOfWeek_1), c = i.EnLocale$(O.StartOfWeek_1), b = i.EnLocale$(O.StartOfWeek_1), _ = i.EnLocale$(O.StartOfWeek_1), A = i.EnLocale$(O.StartOfWeek_2), D = i.EnLocale$(O.StartOfWeek_2), $ = i.EnLocale$(O.StartOfWeek_1), q = i.EnLocale$(O.StartOfWeek_1), h = i.EsLocale$(O.StartOfWeek_2), T = i.EsLocale$(O.StartOfWeek_2), C = i.EsLocale$(O.StartOfWeek_1), F = i.FrLocale$(O.StartOfWeek_2), B = i.FrLocale$(O.StartOfWeek_2), v = i.FrLocale$(O.StartOfWeek_1), I = i.ZhCnLocale$(O.StartOfWeek_1), J = i.ZhCnLocale$(O.StartOfWeek_1), H = i.ZhLocale$(O.StartOfWeek_1), Y = i.ZhLocale$(O.StartOfWeek_1), j = i.DeLocale$(O.StartOfWeek_2), A0 = i.DeLocale$(O.StartOfWeek_2), a0 = i.DeLocale$(O.StartOfWeek_2), Q0 = i.DeLocale$(O.StartOfWeek_2), K0 = i.ItLocale$(O.StartOfWeek_2), t1 = i.ItLocale$(O.StartOfWeek_2), a1 = i.ArLyLocale$(!0, O.StartOfWeek_0), X0 = i.ArLyLocale$(!1, O.StartOfWeek_0), r1 = i.ArSaMaDzKwTnLocale$(!1, O.StartOfWeek_1), i1 = i.ArSaMaDzKwTnLocale$(!1, O.StartOfWeek_1), p1 = i.ArSaMaDzKwTnLocale$(!0, O.StartOfWeek_1), M1 = i.ArSaMaDzKwTnLocale$(!1, O.StartOfWeek_0), s1 = i.ArSaMaDzKwTnLocale$(!1, O.StartOfWeek_0);
20495
- return i.createSentinel(), i.createSentinel(), i.createSentinel(), i.createSentinel(), i.createSentinel(), i.createSentinel(), i.createSentinel(), o = i.PtLocale$(O.StartOfWeek_2), s = i.PtLocale$(O.StartOfWeek_1), i.createSentinel(), i.createSentinel(), i.createSentinel(), i.createSentinel(), i.createSentinel(), i.createSentinel(), i.createSentinel(), i.createSentinel(), i.LinkedHashMap_LinkedHashMap$_literal(["en", u, "en_us", p, "en_sg", c, "en_au", b, "en_ca", _, "en_gb", A, "en_ie", D, "en_il", $, "en_nz", q, "es", h, "es_do", T, "es_us", C, "fr", F, "fr_ch", B, "fr_ca", v, "zh", I, "zh_cn", J, "zh_hk", H, "zh_tw", Y, "de", j, "de_de", A0, "de_at", a0, "de_ch", Q0, "it", K0, "it_ch", t1, "ar", a1, "ar_ly", X0, "ar_dz", r1, "ar_kw", i1, "ar_sa", p1, "ar_ma", M1, "ar_tn", s1, "az", new i.AzLocale(O.StartOfWeek_2), "id", new i.IdLocale(O.StartOfWeek_1), "ja", new i.JaLocale(O.StartOfWeek_1), "ko", new i.KoLocale(O.StartOfWeek_1), "ru", new i.RuLocale(O.StartOfWeek_2), "uk", new i.UkLocale(O.StartOfWeek_2), "hi", new i.HiLocale(O.StartOfWeek_1), "pt", o, "pt_br", s, "pl", new i.PlLocale(O.StartOfWeek_2), "tr", new i.TrLocale(O.StartOfWeek_2), "sv", new i.SvLocale(O.StartOfWeek_2), "nb", new i.NbLocale(O.StartOfWeek_2), "fa", new i.FaLocale(O.StartOfWeek_0), "bn", new i.BnLocale(O.StartOfWeek_1), "nl", new i.NlLocale(O.StartOfWeek_2), "th", new i.ThLocale(O.StartOfWeek_1)], r.String, i.findType("Locale"));
20498
+ var o, s, u = i.EnLocale$(O.StartOfWeek_1), p = i.EnLocale$(O.StartOfWeek_1), c = i.EnLocale$(O.StartOfWeek_1), b = i.EnLocale$(O.StartOfWeek_1), _ = i.EnLocale$(O.StartOfWeek_1), A = i.EnLocale$(O.StartOfWeek_2), D = i.EnLocale$(O.StartOfWeek_2), $ = i.EnLocale$(O.StartOfWeek_1), q = i.EnLocale$(O.StartOfWeek_1), S = i.EsLocale$(O.StartOfWeek_2), T = i.EsLocale$(O.StartOfWeek_2), C = i.EsLocale$(O.StartOfWeek_1), F = i.FrLocale$(O.StartOfWeek_2), B = i.FrLocale$(O.StartOfWeek_2), v = i.FrLocale$(O.StartOfWeek_1), I = i.ZhCnLocale$(O.StartOfWeek_1), J = i.ZhCnLocale$(O.StartOfWeek_1), H = i.ZhLocale$(O.StartOfWeek_1), Y = i.ZhLocale$(O.StartOfWeek_1), j = i.DeLocale$(O.StartOfWeek_2), A0 = i.DeLocale$(O.StartOfWeek_2), a0 = i.DeLocale$(O.StartOfWeek_2), Q0 = i.DeLocale$(O.StartOfWeek_2), K0 = i.ItLocale$(O.StartOfWeek_2), t1 = i.ItLocale$(O.StartOfWeek_2), a1 = i.ArLyLocale$(!0, O.StartOfWeek_0), X0 = i.ArLyLocale$(!1, O.StartOfWeek_0), r1 = i.ArSaMaDzKwTnLocale$(!1, O.StartOfWeek_1), i1 = i.ArSaMaDzKwTnLocale$(!1, O.StartOfWeek_1), p1 = i.ArSaMaDzKwTnLocale$(!0, O.StartOfWeek_1), M1 = i.ArSaMaDzKwTnLocale$(!1, O.StartOfWeek_0), s1 = i.ArSaMaDzKwTnLocale$(!1, O.StartOfWeek_0);
20499
+ return i.createSentinel(), i.createSentinel(), i.createSentinel(), i.createSentinel(), i.createSentinel(), i.createSentinel(), i.createSentinel(), o = i.PtLocale$(O.StartOfWeek_2), s = i.PtLocale$(O.StartOfWeek_1), i.createSentinel(), i.createSentinel(), i.createSentinel(), i.createSentinel(), i.createSentinel(), i.createSentinel(), i.createSentinel(), i.createSentinel(), i.LinkedHashMap_LinkedHashMap$_literal(["en", u, "en_us", p, "en_sg", c, "en_au", b, "en_ca", _, "en_gb", A, "en_ie", D, "en_il", $, "en_nz", q, "es", S, "es_do", T, "es_us", C, "fr", F, "fr_ch", B, "fr_ca", v, "zh", I, "zh_cn", J, "zh_hk", H, "zh_tw", Y, "de", j, "de_de", A0, "de_at", a0, "de_ch", Q0, "it", K0, "it_ch", t1, "ar", a1, "ar_ly", X0, "ar_dz", r1, "ar_kw", i1, "ar_sa", p1, "ar_ma", M1, "ar_tn", s1, "az", new i.AzLocale(O.StartOfWeek_2), "id", new i.IdLocale(O.StartOfWeek_1), "ja", new i.JaLocale(O.StartOfWeek_1), "ko", new i.KoLocale(O.StartOfWeek_1), "ru", new i.RuLocale(O.StartOfWeek_2), "uk", new i.UkLocale(O.StartOfWeek_2), "hi", new i.HiLocale(O.StartOfWeek_1), "pt", o, "pt_br", s, "pl", new i.PlLocale(O.StartOfWeek_2), "tr", new i.TrLocale(O.StartOfWeek_2), "sv", new i.SvLocale(O.StartOfWeek_2), "nb", new i.NbLocale(O.StartOfWeek_2), "fa", new i.FaLocale(O.StartOfWeek_0), "bn", new i.BnLocale(O.StartOfWeek_1), "nl", new i.NlLocale(O.StartOfWeek_2), "th", new i.ThLocale(O.StartOfWeek_1)], r.String, i.findType("Locale"));
20496
20500
  }), n(L, "_UTC", "$get$_UTC", () => {
20497
20501
  var o = r.JSArray_int;
20498
20502
  return i.Location$("UTC", i._setArrayType([-864e13], o), i._setArrayType([0], o), i._setArrayType([O.TimeZone_0_false_UTC], r.JSArray_TimeZone));
@@ -20635,7 +20639,7 @@ function ga(M, d) {
20635
20639
  const f = qr(M), y = qr(d);
20636
20640
  return !f && !y ? null : f ? y ? (f.type === y.type, f.value - y.value) : -1 : 1;
20637
20641
  }
20638
- function ha(M, d) {
20642
+ function Sa(M, d) {
20639
20643
  var y;
20640
20644
  const f = { isRollup: M.isRollup, rollupLevel: M.rollupLevel };
20641
20645
  for (let m = 0; m < d.length; m++) {
@@ -20647,7 +20651,7 @@ function ha(M, d) {
20647
20651
  }
20648
20652
  return f;
20649
20653
  }
20650
- function Sa(M, d) {
20654
+ function ha(M, d) {
20651
20655
  if (M <= 0) return [];
20652
20656
  const f = {};
20653
20657
  for (const y of d) f[y.key] = void 0;
@@ -20659,7 +20663,7 @@ function gr(M, d, f) {
20659
20663
  const y = f.findIndex((W) => W.key === d);
20660
20664
  return y >= 0 ? (E = M.cells) == null ? void 0 : E[y] : void 0;
20661
20665
  }
20662
- function hr(M) {
20666
+ function Sr(M) {
20663
20667
  if (typeof M == "number")
20664
20668
  return Number.isFinite(M) ? M : null;
20665
20669
  if (M == null) return null;
@@ -20683,7 +20687,7 @@ function Ea(M) {
20683
20687
  for (let f = M; f > 0; f >>>= 1) d += f & 1;
20684
20688
  return d;
20685
20689
  }
20686
- function Sr(M) {
20690
+ function hr(M) {
20687
20691
  if (!M.isRollup) return 0;
20688
20692
  const d = M.rollupLevel;
20689
20693
  return typeof d == "number" && d > 0 ? Ea(d) : 1;
@@ -20699,7 +20703,7 @@ function Ta(M, d) {
20699
20703
  m.push({ rank: 0, leaf: E, children: null });
20700
20704
  continue;
20701
20705
  }
20702
- const W = Sr(E), w = [];
20706
+ const W = hr(E), w = [];
20703
20707
  for (; m.length > 0 && m[m.length - 1].rank < W; )
20704
20708
  w.push(m.pop());
20705
20709
  w.reverse(), m.push({ rank: W, rollup: E, children: w });
@@ -20708,7 +20712,7 @@ function Ta(M, d) {
20708
20712
  }
20709
20713
  const f = [], y = [];
20710
20714
  for (const m of M) {
20711
- const E = Sr(m);
20715
+ const E = hr(m);
20712
20716
  for (; y.length > 0 && y[y.length - 1].rank <= E; ) y.pop();
20713
20717
  const W = y.length > 0 ? y[y.length - 1].children : f;
20714
20718
  if (!m.isRollup) {
@@ -20726,7 +20730,7 @@ function Ra(M, d, f) {
20726
20730
  for (const { key: P, type: N } of M) {
20727
20731
  const k = N === "ASC" ? 1 : -1, Z = gr(W, P, f) ?? "", i0 = gr(w, P, f) ?? "";
20728
20732
  if (d[P]) {
20729
- const u0 = hr(Z), e0 = hr(i0);
20733
+ const u0 = Sr(Z), e0 = Sr(i0);
20730
20734
  if (u0 !== null && e0 !== null) {
20731
20735
  const U = u0 - e0;
20732
20736
  if (U !== 0) return U * k;
@@ -20785,7 +20789,7 @@ function Wa(M) {
20785
20789
  (V) => (String(V ?? "").toLowerCase() || "").includes(
20786
20790
  m == null ? void 0 : m.toLowerCase()
20787
20791
  )
20788
- )))).map((U) => ha(U, f)));
20792
+ )))).map((U) => Sa(U, f)));
20789
20793
  let u0 = i0;
20790
20794
  if (Z) {
20791
20795
  const U = (W ?? E ?? Ca(i0)) === "BOTTOM", V = Ta(i0, U);
@@ -20795,7 +20799,7 @@ function Wa(M) {
20795
20799
  if (w > 0) {
20796
20800
  const U = u0.length % w;
20797
20801
  let V = 0;
20798
- U > 0 ? V = w - U : u0.length === 0 && (V = w), V > 0 && u0.push(...Sa(V, f));
20802
+ U > 0 ? V = w - U : u0.length === 0 && (V = w), V > 0 && u0.push(...ha(V, f));
20799
20803
  }
20800
20804
  return { data: u0 };
20801
20805
  }
@@ -21216,7 +21220,7 @@ function no(M, d, f) {
21216
21220
  function _t(M) {
21217
21221
  return M % 4 === 0 && M % 100 !== 0 || M % 400 === 0;
21218
21222
  }
21219
- var n1 = 0, B1 = 1, S1 = 2, Z0 = 3, y1 = 4, N1 = 5, re = 6, ao = 7, oo = 8;
21223
+ var n1 = 0, B1 = 1, h1 = 2, Z0 = 3, y1 = 4, N1 = 5, re = 6, ao = 7, oo = 8;
21220
21224
  b0("Y", 0, 0, function() {
21221
21225
  var M = this.year();
21222
21226
  return M <= 9999 ? E1(M, 4) : "+" + M;
@@ -21492,11 +21496,11 @@ function qo() {
21492
21496
  function go() {
21493
21497
  return this._week.doy;
21494
21498
  }
21495
- function ho(M) {
21499
+ function So(M) {
21496
21500
  var d = this.localeData().week(this);
21497
21501
  return M == null ? d : this.add((M - d) * 7, "d");
21498
21502
  }
21499
- function So(M) {
21503
+ function ho(M) {
21500
21504
  var d = We(this, 1, 4).week;
21501
21505
  return M == null ? d : this.add((M - d) * 7, "d");
21502
21506
  }
@@ -21822,7 +21826,7 @@ function ti() {
21822
21826
  }
21823
21827
  function tr(M) {
21824
21828
  var d, f = M._a;
21825
- return f && $0(M).overflow === -2 && (d = f[B1] < 0 || f[B1] > 11 ? B1 : f[S1] < 1 || f[S1] > Qt(f[n1], f[B1]) ? S1 : f[Z0] < 0 || f[Z0] > 24 || f[Z0] === 24 && (f[y1] !== 0 || f[N1] !== 0 || f[re] !== 0) ? Z0 : f[y1] < 0 || f[y1] > 59 ? y1 : f[N1] < 0 || f[N1] > 59 ? N1 : f[re] < 0 || f[re] > 999 ? re : -1, $0(M)._overflowDayOfYear && (d < n1 || d > S1) && (d = S1), $0(M)._overflowWeeks && d === -1 && (d = ao), $0(M)._overflowWeekday && d === -1 && (d = oo), $0(M).overflow = d), M;
21829
+ return f && $0(M).overflow === -2 && (d = f[B1] < 0 || f[B1] > 11 ? B1 : f[h1] < 1 || f[h1] > Qt(f[n1], f[B1]) ? h1 : f[Z0] < 0 || f[Z0] > 24 || f[Z0] === 24 && (f[y1] !== 0 || f[N1] !== 0 || f[re] !== 0) ? Z0 : f[y1] < 0 || f[y1] > 59 ? y1 : f[N1] < 0 || f[N1] > 59 ? N1 : f[re] < 0 || f[re] > 999 ? re : -1, $0(M)._overflowDayOfYear && (d < n1 || d > h1) && (d = h1), $0(M)._overflowWeeks && d === -1 && (d = ao), $0(M)._overflowWeekday && d === -1 && (d = oo), $0(M).overflow = d), M;
21826
21830
  }
21827
21831
  var ri = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, ni = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, ai = /Z|[+-]\d\d(?::?\d\d)?/, Ge = [
21828
21832
  ["YYYYYY-MM-DD", /[+-]\d{6}-\d\d-\d\d/],
@@ -21987,7 +21991,7 @@ function _i(M) {
21987
21991
  function rr(M) {
21988
21992
  var d, f, y = [], m, E, W;
21989
21993
  if (!M._d) {
21990
- for (m = _i(M), M._w && M._a[S1] == null && M._a[B1] == null && di(M), M._dayOfYear != null && (W = le(M._a[n1], m[n1]), (M._dayOfYear > Ee(W) || M._dayOfYear === 0) && ($0(M)._overflowDayOfYear = !0), f = Ce(W, 0, M._dayOfYear), M._a[B1] = f.getUTCMonth(), M._a[S1] = f.getUTCDate()), d = 0; d < 3 && M._a[d] == null; ++d)
21994
+ for (m = _i(M), M._w && M._a[h1] == null && M._a[B1] == null && di(M), M._dayOfYear != null && (W = le(M._a[n1], m[n1]), (M._dayOfYear > Ee(W) || M._dayOfYear === 0) && ($0(M)._overflowDayOfYear = !0), f = Ce(W, 0, M._dayOfYear), M._a[B1] = f.getUTCMonth(), M._a[h1] = f.getUTCDate()), d = 0; d < 3 && M._a[d] == null; ++d)
21991
21995
  M._a[d] = y[d] = m[d];
21992
21996
  for (; d < 7; d++)
21993
21997
  M._a[d] = y[d] = M._a[d] == null ? d === 2 ? 1 : 0 : M._a[d];
@@ -22118,7 +22122,7 @@ var gi = function() {
22118
22122
  "second",
22119
22123
  "millisecond"
22120
22124
  ];
22121
- function hi(M) {
22125
+ function Si(M) {
22122
22126
  var d, f = !1, y, m = ge.length;
22123
22127
  for (d in M)
22124
22128
  if (C0(M, d) && !(G0.call(ge, d) !== -1 && (M[d] == null || !isNaN(M[d]))))
@@ -22131,7 +22135,7 @@ function hi(M) {
22131
22135
  }
22132
22136
  return !0;
22133
22137
  }
22134
- function Si() {
22138
+ function hi() {
22135
22139
  return this._isValid;
22136
22140
  }
22137
22141
  function Ei() {
@@ -22139,7 +22143,7 @@ function Ei() {
22139
22143
  }
22140
22144
  function zt(M) {
22141
22145
  var d = Ut(M), f = d.year || 0, y = d.quarter || 0, m = d.month || 0, E = d.week || d.isoWeek || 0, W = d.day || 0, w = d.hour || 0, P = d.minute || 0, N = d.second || 0, k = d.millisecond || 0;
22142
- this._isValid = hi(d), this._milliseconds = +k + N * 1e3 + // 1000
22146
+ this._isValid = Si(d), this._milliseconds = +k + N * 1e3 + // 1000
22143
22147
  P * 6e4 + // 1000 * 60
22144
22148
  w * 1e3 * 60 * 60, this._days = +W + E * 7, this._months = +m + y * 3 + f * 12, this._data = {}, this._locale = P1(), this._bubble();
22145
22149
  }
@@ -22236,7 +22240,7 @@ function wi() {
22236
22240
  function vi() {
22237
22241
  return this.isValid() ? this._isUTC : !1;
22238
22242
  }
22239
- function hn() {
22243
+ function Sn() {
22240
22244
  return this.isValid() ? this._isUTC && this._offset === 0 : !1;
22241
22245
  }
22242
22246
  var Pi = /^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/, Ji = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;
@@ -22248,7 +22252,7 @@ function q1(M, d) {
22248
22252
  M: M._months
22249
22253
  } : v1(M) || !isNaN(+M) ? (f = {}, d ? f[d] = +M : f.milliseconds = +M) : (y = Pi.exec(M)) ? (m = y[1] === "-" ? -1 : 1, f = {
22250
22254
  y: 0,
22251
- d: E0(y[S1]) * m,
22255
+ d: E0(y[h1]) * m,
22252
22256
  h: E0(y[Z0]) * m,
22253
22257
  m: E0(y[y1]) * m,
22254
22258
  s: E0(y[N1]) * m,
@@ -22281,7 +22285,7 @@ function Hi(M, d) {
22281
22285
  var f;
22282
22286
  return M.isValid() && d.isValid() ? (d = or(d, M), M.isBefore(d) ? f = Lr(M, d) : (f = Lr(d, M), f.milliseconds = -f.milliseconds, f.months = -f.months), f) : { milliseconds: 0, months: 0 };
22283
22287
  }
22284
- function Sn(M, d) {
22288
+ function hn(M, d) {
22285
22289
  return function(f, y) {
22286
22290
  var m, E;
22287
22291
  return y !== null && !isNaN(+y) && (tn(
@@ -22294,7 +22298,7 @@ function En(M, d, f, y) {
22294
22298
  var m = d._milliseconds, E = It(d._days), W = It(d._months);
22295
22299
  M.isValid() && (y = y ?? !0, W && Mn(M, Re(M, "Month") + W * f), E && ln(M, "Date", Re(M, "Date") + E * f), m && M._d.setTime(M._d.valueOf() + m * f), y && n0.updateOffset(M, E || W));
22296
22300
  }
22297
- var Xi = Sn(1, "add"), ki = Sn(-1, "subtract");
22301
+ var Xi = hn(1, "add"), ki = hn(-1, "subtract");
22298
22302
  function Tn(M) {
22299
22303
  return typeof M == "string" || M instanceof String;
22300
22304
  }
@@ -22679,7 +22683,7 @@ L0(["yo"], function(M, d, f, y) {
22679
22683
  var m;
22680
22684
  f._locale._eraYearOrdinalRegex && (m = M.match(f._locale._eraYearOrdinalRegex)), f._locale.eraYearOrdinalParse ? d[n1] = f._locale.eraYearOrdinalParse(M, m) : d[n1] = parseInt(M, 10);
22681
22685
  });
22682
- function hs(M, d) {
22686
+ function Ss(M, d) {
22683
22687
  var f, y, m, E = this._eras || P1("en")._eras;
22684
22688
  for (f = 0, y = E.length; f < y; ++f) {
22685
22689
  switch (typeof E[f].since) {
@@ -22698,7 +22702,7 @@ function hs(M, d) {
22698
22702
  }
22699
22703
  return E;
22700
22704
  }
22701
- function Ss(M, d, f) {
22705
+ function hs(M, d, f) {
22702
22706
  var y, m, E = this.eras(), W, w, P;
22703
22707
  for (M = M.toUpperCase(), y = 0, m = E.length; y < m; ++y)
22704
22708
  if (W = E[y].name.toUpperCase(), w = E[y].abbr.toUpperCase(), P = E[y].narrow.toUpperCase(), f)
@@ -22869,9 +22873,9 @@ o0("DD", w0, c1);
22869
22873
  o0("Do", function(M, d) {
22870
22874
  return M ? d._dayOfMonthOrdinalParse || d._ordinalParse : d._dayOfMonthOrdinalParseLenient;
22871
22875
  });
22872
- L0(["D", "DD"], S1);
22876
+ L0(["D", "DD"], h1);
22873
22877
  L0("Do", function(M, d) {
22874
- d[S1] = E0(M.match(w0)[0]);
22878
+ d[h1] = E0(M.match(w0)[0]);
22875
22879
  });
22876
22880
  var Nn = De("Date", !0);
22877
22881
  b0("DDD", ["DDDD", 3], "DDDo", "dayOfYear");
@@ -22994,8 +22998,8 @@ K.isoWeekYear = vs;
22994
22998
  K.quarter = K.quarters = Us;
22995
22999
  K.month = bn;
22996
23000
  K.daysInMonth = Oo;
22997
- K.week = K.weeks = ho;
22998
- K.isoWeek = K.isoWeeks = So;
23001
+ K.week = K.weeks = So;
23002
+ K.isoWeek = K.isoWeeks = ho;
22999
23003
  K.weeksInYear = Hs;
23000
23004
  K.weeksInWeekYear = Xs;
23001
23005
  K.isoWeeksInYear = Ps;
@@ -23017,8 +23021,8 @@ K.hasAlignedHourOffset = Bi;
23017
23021
  K.isDST = Ni;
23018
23022
  K.isLocal = wi;
23019
23023
  K.isUtcOffset = vi;
23020
- K.isUtc = hn;
23021
- K.isUTC = hn;
23024
+ K.isUtc = Sn;
23025
+ K.isUTC = Sn;
23022
23026
  K.zoneAbbr = js;
23023
23027
  K.zoneName = Ks;
23024
23028
  K.dates = d1(
@@ -23060,8 +23064,8 @@ W0.postformat = wn;
23060
23064
  W0.relativeTime = Va;
23061
23065
  W0.pastFuture = Qa;
23062
23066
  W0.set = Ba;
23063
- W0.eras = hs;
23064
- W0.erasParse = Ss;
23067
+ W0.eras = Ss;
23068
+ W0.erasParse = hs;
23065
23069
  W0.erasConvertYear = Es;
23066
23070
  W0.erasAbbrRegex = Fs;
23067
23071
  W0.erasNameRegex = Ls;
@@ -23228,7 +23232,7 @@ function ie(M) {
23228
23232
  return this.isValid() ? this._data[M] : NaN;
23229
23233
  };
23230
23234
  }
23231
- var $u = ie("milliseconds"), mu = ie("seconds"), qu = ie("minutes"), gu = ie("hours"), hu = ie("days"), Su = ie("months"), Eu = ie("years");
23235
+ var $u = ie("milliseconds"), mu = ie("seconds"), qu = ie("minutes"), gu = ie("hours"), Su = ie("days"), hu = ie("months"), Eu = ie("years");
23232
23236
  function Tu() {
23233
23237
  return _1(this.days() / 7);
23234
23238
  }
@@ -23278,7 +23282,7 @@ function Ot() {
23278
23282
  return w ? (y = _1(M / 60), m = _1(y / 60), M %= 60, y %= 60, E = _1(f / 12), f %= 12, W = M ? M.toFixed(3).replace(/\.?0+$/, "") : "", P = w < 0 ? "-" : "", N = se(this._months) !== se(w) ? "-" : "", k = se(this._days) !== se(w) ? "-" : "", Z = se(this._milliseconds) !== se(w) ? "-" : "", P + "P" + (E ? N + E + "Y" : "") + (f ? N + f + "M" : "") + (d ? k + d + "D" : "") + (m || y || M ? "T" : "") + (m ? Z + m + "H" : "") + (y ? Z + y + "M" : "") + (M ? Z + W + "S" : "")) : "P0D";
23279
23283
  }
23280
23284
  var R0 = zt.prototype;
23281
- R0.isValid = Si;
23285
+ R0.isValid = hi;
23282
23286
  R0.abs = iu;
23283
23287
  R0.add = su;
23284
23288
  R0.subtract = uu;
@@ -23300,9 +23304,9 @@ R0.milliseconds = $u;
23300
23304
  R0.seconds = mu;
23301
23305
  R0.minutes = qu;
23302
23306
  R0.hours = gu;
23303
- R0.days = hu;
23307
+ R0.days = Su;
23304
23308
  R0.weeks = Tu;
23305
- R0.months = Su;
23309
+ R0.months = hu;
23306
23310
  R0.years = Eu;
23307
23311
  R0.humanize = Fu;
23308
23312
  R0.toISOString = Ot;
@@ -23397,11 +23401,11 @@ const Iu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
23397
23401
  return _ > 96 ? _ - 87 : _ > 64 ? _ - 29 : _ - 48;
23398
23402
  }
23399
23403
  function u0(_) {
23400
- var A = 0, D = _.split("."), $ = D[0], q = D[1] || "", h = 1, T, C = 0, F = 1;
23404
+ var A = 0, D = _.split("."), $ = D[0], q = D[1] || "", S = 1, T, C = 0, F = 1;
23401
23405
  for (_.charCodeAt(0) === 45 && (A = 1, F = -1), A; A < $.length; A++)
23402
23406
  T = i0($.charCodeAt(A)), C = 60 * C + T;
23403
23407
  for (A = 0; A < q.length; A++)
23404
- h = h / 60, T = i0(q.charCodeAt(A)), C += T * h;
23408
+ S = S / 60, T = i0(q.charCodeAt(A)), C += T * S;
23405
23409
  return C * F;
23406
23410
  }
23407
23411
  function e0(_) {
@@ -23440,9 +23444,9 @@ const Iu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
23440
23444
  return D - 1;
23441
23445
  if (_ >= A[D - 1])
23442
23446
  return -1;
23443
- for (var $, q = 0, h = D - 1; h - q > 1; )
23444
- $ = Math.floor((q + h) / 2), A[$] <= _ ? q = $ : h = $;
23445
- return h;
23447
+ for (var $, q = 0, S = D - 1; S - q > 1; )
23448
+ $ = Math.floor((q + S) / 2), A[$] <= _ ? q = $ : S = $;
23449
+ return S;
23446
23450
  }
23447
23451
  l0.prototype = {
23448
23452
  _set: function(_) {
@@ -23460,9 +23464,9 @@ const Iu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
23460
23464
  });
23461
23465
  },
23462
23466
  parse: function(_) {
23463
- var A = +_, D = this.offsets, $ = this.untils, q = $.length - 1, h, T, C, F;
23467
+ var A = +_, D = this.offsets, $ = this.untils, q = $.length - 1, S, T, C, F;
23464
23468
  for (F = 0; F < q; F++)
23465
- if (h = D[F], T = D[F + 1], C = D[F && F - 1], h < T && o.moveAmbiguousForward ? h = T : h > C && o.moveInvalidForward && (h = C), A < $[F] - h * 6e4)
23469
+ if (S = D[F], T = D[F + 1], C = D[F && F - 1], S < T && o.moveAmbiguousForward ? S = T : S > C && o.moveInvalidForward && (S = C), A < $[F] - S * 6e4)
23466
23470
  return D[F];
23467
23471
  return D[q];
23468
23472
  },
@@ -23495,9 +23499,9 @@ const Iu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
23495
23499
  return _;
23496
23500
  }
23497
23501
  function q0() {
23498
- var _ = (/* @__PURE__ */ new Date()).getFullYear() - 2, A = new s0(new Date(_, 0, 1)), D = A.offset, $ = [A], q, h, T, C;
23502
+ var _ = (/* @__PURE__ */ new Date()).getFullYear() - 2, A = new s0(new Date(_, 0, 1)), D = A.offset, $ = [A], q, S, T, C;
23499
23503
  for (C = 1; C < 48; C++)
23500
- T = new Date(_, C, 1).getTimezoneOffset(), T !== D && (h = new s0(new Date(_, C, 1)), q = M0(A, h), $.push(q), $.push(new s0(new Date(q.at + 6e4))), A = h, D = T);
23504
+ T = new Date(_, C, 1).getTimezoneOffset(), T !== D && (S = new s0(new Date(_, C, 1)), q = M0(A, S), $.push(q), $.push(new s0(new Date(q.at + 6e4))), A = S, D = T);
23501
23505
  for (C = 0; C < 4; C++)
23502
23506
  $.push(new s0(new Date(_ + C, 0, 1))), $.push(new s0(new Date(_ + C, 6, 1)));
23503
23507
  return $;
@@ -23511,16 +23515,16 @@ const Iu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
23511
23515
  $ = A[D], w[$] = w[$] || {}, w[$][_] = !0;
23512
23516
  }
23513
23517
  function r0(_) {
23514
- var A = _.length, D = {}, $ = [], q = {}, h, T, C, F;
23515
- for (h = 0; h < A; h++)
23516
- if (C = _[h].offset, !q.hasOwnProperty(C)) {
23518
+ var A = _.length, D = {}, $ = [], q = {}, S, T, C, F;
23519
+ for (S = 0; S < A; S++)
23520
+ if (C = _[S].offset, !q.hasOwnProperty(C)) {
23517
23521
  F = w[C] || {};
23518
23522
  for (T in F)
23519
23523
  F.hasOwnProperty(T) && (D[T] = !0);
23520
23524
  q[C] = !0;
23521
23525
  }
23522
- for (h in D)
23523
- D.hasOwnProperty(h) && $.push(W[h]);
23526
+ for (S in D)
23527
+ D.hasOwnProperty(S) && $.push(W[S]);
23524
23528
  return $;
23525
23529
  }
23526
23530
  function D0() {
@@ -23534,13 +23538,13 @@ const Iu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
23534
23538
  }
23535
23539
  } catch {
23536
23540
  }
23537
- var D = q0(), $ = D.length, q = r0(D), h = [], T, C, F;
23541
+ var D = q0(), $ = D.length, q = r0(D), S = [], T, C, F;
23538
23542
  for (C = 0; C < q.length; C++) {
23539
23543
  for (T = new z0(i(q[C])), F = 0; F < $; F++)
23540
23544
  T.scoreOffsetAt(D[F]);
23541
- h.push(T);
23545
+ S.push(T);
23542
23546
  }
23543
- return h.sort(y0), h.length > 0 ? h[0].zone.name : void 0;
23547
+ return S.sort(y0), S.length > 0 ? S[0].zone.name : void 0;
23544
23548
  }
23545
23549
  function T0(_) {
23546
23550
  return (!P || _) && (P = D0()), P;
@@ -24652,7 +24656,7 @@ function Gu(M) {
24652
24656
  `${d0}\0${r0.id}`
24653
24657
  ), U.push({
24654
24658
  name: N.length > 1 ? `${d0} - ${r0.label}` : d0,
24655
- values: [he(M0.value[r0.id], r0)],
24659
+ values: [Se(M0.value[r0.id], r0)],
24656
24660
  xAxisIndex: y0,
24657
24661
  dateRange: X
24658
24662
  });
@@ -24694,7 +24698,7 @@ function Gu(M) {
24694
24698
  k,
24695
24699
  E
24696
24700
  ) : "", D0 = e0.get(r0);
24697
- D0 != null && (q0[D0] = he(
24701
+ D0 != null && (q0[D0] = Se(
24698
24702
  d0.value[M0.id],
24699
24703
  M0
24700
24704
  ));
@@ -24717,7 +24721,7 @@ function Gu(M) {
24717
24721
  k,
24718
24722
  E
24719
24723
  ) : "", y0 = e0.get(q0);
24720
- y0 != null && (z0[y0] = he(
24724
+ y0 != null && (z0[y0] = Se(
24721
24725
  M0.value[s0.id],
24722
24726
  s0
24723
24727
  ));
@@ -24759,7 +24763,7 @@ function Gu(M) {
24759
24763
  for (const i of N)
24760
24764
  d0.has(p0) || d0.set(p0, /* @__PURE__ */ new Set()), d0.get(p0).add(`${t}\0${i.id}`), U.push({
24761
24765
  name: N.length > 1 ? `${t} - ${i.label}` : t,
24762
- values: [he(r0.value[i.id], i)],
24766
+ values: [Se(r0.value[i.id], i)],
24763
24767
  xAxisIndex: p0,
24764
24768
  isCompare: !0,
24765
24769
  dateRange: z0
@@ -24803,7 +24807,7 @@ function Gu(M) {
24803
24807
  k,
24804
24808
  E
24805
24809
  ) : "", l = y0.get(i), O = k != null && k.dateComparison ? l : e0.get(i);
24806
- O != null && (T0[O] = he(
24810
+ O != null && (T0[O] = Se(
24807
24811
  t.value[D0.id],
24808
24812
  D0
24809
24813
  ));
@@ -24948,7 +24952,7 @@ function st(M) {
24948
24952
  const d = typeof M == "number" ? M : Number(M);
24949
24953
  return Number.isNaN(d) ? 0 : d;
24950
24954
  }
24951
- function he(M, d) {
24955
+ function Se(M, d) {
24952
24956
  const f = st(M), y = d == null ? void 0 : d.decimal;
24953
24957
  if (y == null) return f;
24954
24958
  const m = Math.pow(10, y);
@@ -25124,7 +25128,7 @@ var lr = {
25124
25128
  ...sl,
25125
25129
  ...pl
25126
25130
  }, Xn = /* @__PURE__ */ ((M) => (M.generating = "GENERATING", M.completed = "COMPLETED", M.failed = "FAILED", M.canceled = "CANCELLED", M))(Xn || {});
25127
- const cl = "/assets/formatChartData.worker-BeBGCyYW.js", gt = /* @__PURE__ */ new Map();
25131
+ const cl = "/assets/formatChartData.worker-Dx1USoTn.js", gt = /* @__PURE__ */ new Map();
25128
25132
  function Br(M) {
25129
25133
  return new Worker(M, { type: "module" });
25130
25134
  }
@@ -25149,7 +25153,7 @@ async function bl(M, d) {
25149
25153
  });
25150
25154
  }
25151
25155
  const _l = "mf-reportreport-sort-store", kn = Hr(_l, () => {
25152
- const M = h1([]);
25156
+ const M = S1([]);
25153
25157
  function d(m, E) {
25154
25158
  if (m == null) return;
25155
25159
  const W = Array.isArray(E) ? E.filter((N) => N && N.key) : [], w = M.value.findIndex((N) => N.tileIndex === m), P = { tileIndex: m, sorts: W };
@@ -25164,7 +25168,7 @@ const _l = "mf-reportreport-sort-store", kn = Hr(_l, () => {
25164
25168
  }
25165
25169
  return { tileSort: M, setTileSorts: d, getTileSorts: f, clearTileSorts: y };
25166
25170
  }), Un = "__EMPTY__";
25167
- function Se(M = []) {
25171
+ function he(M = []) {
25168
25172
  return Array.from(new Set(M));
25169
25173
  }
25170
25174
  function dl(M) {
@@ -25189,7 +25193,7 @@ function Al(M, d) {
25189
25193
  name: M.name,
25190
25194
  operator: d.operator,
25191
25195
  option: M.option ?? null,
25192
- values: Se(d.values),
25196
+ values: he(d.values),
25193
25197
  dataFormula: M.dataFormula,
25194
25198
  isGlobalFilter: !0
25195
25199
  };
@@ -25296,7 +25300,7 @@ function Nr({
25296
25300
  return N(O0, c0) == null ? null : [O0, c0];
25297
25301
  }
25298
25302
  function u0(X, U) {
25299
- const V = Se(X.values), l0 = Se(U.values);
25303
+ const V = he(X.values), l0 = he(U.values);
25300
25304
  switch (U.operator) {
25301
25305
  case k0.Equal: {
25302
25306
  const O0 = new Set(l0), c0 = V.filter((s0) => O0.has(s0));
@@ -25304,7 +25308,7 @@ function Nr({
25304
25308
  }
25305
25309
  case k0.NotEqual:
25306
25310
  case k0.NotLike:
25307
- return Se([
25311
+ return he([
25308
25312
  ...V,
25309
25313
  ...l0
25310
25314
  ]);
@@ -25325,7 +25329,7 @@ function Nr({
25325
25329
  return;
25326
25330
  const U = {
25327
25331
  ...X,
25328
- values: Se(X.values)
25332
+ values: he(X.values)
25329
25333
  };
25330
25334
  if (U.option === H0.TimeOfDay && U.operator === k0.Between) {
25331
25335
  m.push(U);
@@ -25820,7 +25824,7 @@ const $l = async ({
25820
25824
  data: { email: M }
25821
25825
  });
25822
25826
  }, ql = "mf-reportwidget-result-store", gl = Hr(ql, () => {
25823
- const M = h1({}), d = h1(0), f = g1(() => d.value === 0);
25827
+ const M = S1({}), d = S1(0), f = g1(() => d.value === 0);
25824
25828
  function y() {
25825
25829
  d.value += 1;
25826
25830
  }
@@ -25852,14 +25856,14 @@ const $l = async ({
25852
25856
  getWidgetResult: W,
25853
25857
  clearAllWidgetResults: w
25854
25858
  };
25855
- }), xr = (M, d = "en") => F0().set("hour", M.hour).set("minute", M.minute).locale(d).format("h:mm A"), hl = (M, d) => {
25859
+ }), xr = (M, d = "en") => F0().set("hour", M.hour).set("minute", M.minute).locale(d).format("h:mm A"), Sl = (M, d) => {
25856
25860
  const f = F0().set("hour", M.hour).set("minute", M.minute);
25857
25861
  return F0().set("hour", d.hour).set("minute", d.minute) < f ? "+1" : "";
25858
25862
  };
25859
25863
  function wr(M, d) {
25860
25864
  return M.isSystem ? d("reportV5.reportHour.fullDay") : M.name;
25861
25865
  }
25862
- const Sl = { class: "px-24 py-16 rounded-lg shadow-light-300" }, El = { class: "text-fm-color-typo-primary" }, Tl = { class: "text-fm-color-typo-secondary" }, Rl = { class: "fm-typo-en-body-lg-600 mb-8" }, Cl = { class: "flex items-center justify-center w-full" }, Wl = { class: "fm-typo-en-body-lg-600 mb-8" }, Ll = { class: "flex items-center justify-center" }, Fl = { class: "flex flex-row mb-4 px-4 gap-2" }, Il = /* @__PURE__ */ wt({
25866
+ const hl = { class: "px-24 py-16 rounded-lg shadow-light-300" }, El = { class: "text-fm-color-typo-primary" }, Tl = { class: "text-fm-color-typo-secondary" }, Rl = { class: "fm-typo-en-body-lg-600 mb-8" }, Cl = { class: "flex items-center justify-center w-full" }, Wl = { class: "fm-typo-en-body-lg-600 mb-8" }, Ll = { class: "flex items-center justify-center" }, Fl = { class: "flex flex-row mb-4 px-4 gap-2" }, Il = /* @__PURE__ */ wt({
25863
25867
  __name: "TimeRangeSelect",
25864
25868
  props: /* @__PURE__ */ et({
25865
25869
  defaultDateRange: {
@@ -25901,7 +25905,7 @@ const Sl = { class: "px-24 py-16 rounded-lg shadow-light-300" }, El = { class: "
25901
25905
  }),
25902
25906
  emits: /* @__PURE__ */ et(["update", "chip-closed"], ["update:timeRange", "update:selectTimeDefault"]),
25903
25907
  setup(M, { emit: d }) {
25904
- const { t: f, locale: y } = Xr(), m = St(M, "timeRange"), E = d, W = St(M, "selectTimeDefault");
25908
+ const { t: f, locale: y } = Xr(), m = ht(M, "timeRange"), E = d, W = ht(M, "selectTimeDefault");
25905
25909
  function w(e0) {
25906
25910
  e0 && (m.value = e0, E("update", m.value)), Z.value = !1;
25907
25911
  }
@@ -25913,7 +25917,7 @@ const Sl = { class: "px-24 py-16 rounded-lg shadow-light-300" }, El = { class: "
25913
25917
  period: U.format("A")
25914
25918
  };
25915
25919
  }
25916
- const N = h1(JSON.parse(JSON.stringify(m.value)));
25920
+ const N = S1(JSON.parse(JSON.stringify(m.value)));
25917
25921
  function k(e0, X) {
25918
25922
  N.value.start = JSON.parse(JSON.stringify(e0)), N.value.end = JSON.parse(JSON.stringify(X));
25919
25923
  }
@@ -25932,7 +25936,7 @@ const Sl = { class: "px-24 py-16 rounded-lg shadow-light-300" }, El = { class: "
25932
25936
  },
25933
25937
  { deep: !0, immediate: !0 }
25934
25938
  );
25935
- const Z = h1(!1);
25939
+ const Z = S1(!1);
25936
25940
  function i0(e0) {
25937
25941
  E("chip-closed", e0);
25938
25942
  }
@@ -25960,7 +25964,7 @@ const Sl = { class: "px-24 py-16 rounded-lg shadow-light-300" }, El = { class: "
25960
25964
  default: l1(() => {
25961
25965
  var M0, q0, y0, d0;
25962
25966
  return [
25963
- Y0("div", Sl, [
25967
+ Y0("div", hl, [
25964
25968
  J0(O0, {
25965
25969
  modelValue: W.value,
25966
25970
  "onUpdate:modelValue": X[1] || (X[1] = (r0) => W.value = r0)
@@ -25983,7 +25987,7 @@ const Sl = { class: "px-24 py-16 rounded-lg shadow-light-300" }, El = { class: "
25983
25987
  [pa, r0.isDefault]
25984
25988
  ])
25985
25989
  ]),
25986
- Y0("p", Tl, f1(g0(xr)(r0.startTime, g0(te)())) + " - " + f1(g0(xr)(r0.endTime, g0(te)())) + " " + f1(g0(hl)(r0.startTime, r0.endTime)), 1)
25990
+ Y0("p", Tl, f1(g0(xr)(r0.startTime, g0(te)())) + " - " + f1(g0(xr)(r0.endTime, g0(te)())) + " " + f1(g0(Sl)(r0.startTime, r0.endTime)), 1)
25987
25991
  ]),
25988
25992
  _: 2
25989
25993
  }, 1032, ["value", "label", "onClick"]))), 128)),
@@ -26067,7 +26071,7 @@ const Sl = { class: "px-24 py-16 rounded-lg shadow-light-300" }, El = { class: "
26067
26071
  }),
26068
26072
  emits: /* @__PURE__ */ et(["confirm"], ["update:modelValue"]),
26069
26073
  setup(M, { emit: d }) {
26070
- const f = St(M, "modelValue"), y = M, m = d;
26074
+ const f = ht(M, "modelValue"), y = M, m = d;
26071
26075
  return Z1(f, () => {
26072
26076
  f.value ? document.body.style.overflow = "hidden" : document.body.style.overflow = "scroll";
26073
26077
  }), (E, W) => {
@@ -26272,7 +26276,7 @@ function Vn({
26272
26276
  };
26273
26277
  }
26274
26278
  }
26275
- function ht({
26279
+ function St({
26276
26280
  dimensionOption: M,
26277
26281
  t: d
26278
26282
  }) {
@@ -26312,25 +26316,25 @@ const Nl = { class: "flex flex-row flex-wrap gap-2" }, xl = { class: "inline-fle
26312
26316
  } = oe();
26313
26317
  const c0 = g1(() => f("report.input.empty")), s0 = ["NULL", "", " "];
26314
26318
  let z0;
26315
- const M0 = gl(), { getWidgetResult: q0 } = M0, { widgetResults: y0, isAllWidgetResultLoaded: d0 } = o1(M0), r0 = h1(!1), D0 = h1(!1), T0 = h1(""), p0 = h1({}), t = g1(() => {
26316
- var S;
26317
- return d.globalFilterId ?? ((S = m.value) == null ? void 0 : S.id) ?? "";
26318
- }), i = g1(() => d.report ?? m.value), l = h1([]);
26319
- function O(S) {
26320
- return `${t.value}|instance:${S}`;
26319
+ const M0 = gl(), { getWidgetResult: q0 } = M0, { widgetResults: y0, isAllWidgetResultLoaded: d0 } = o1(M0), r0 = S1(!1), D0 = S1(!1), T0 = S1(""), p0 = S1({}), t = g1(() => {
26320
+ var h;
26321
+ return d.globalFilterId ?? ((h = m.value) == null ? void 0 : h.id) ?? "";
26322
+ }), i = g1(() => d.report ?? m.value), l = S1([]);
26323
+ function O(h) {
26324
+ return `${t.value}|instance:${h}`;
26321
26325
  }
26322
- function g(S) {
26323
- return Dt(S) ? !1 : r0.value ? !0 : d.isDialogGlobalFilter ? D0.value : !d0.value && S.options.length === 0;
26326
+ function g(h) {
26327
+ return Dt(h) ? !1 : r0.value ? !0 : d.isDialogGlobalFilter ? D0.value : !d0.value && h.options.length === 0;
26324
26328
  }
26325
- function L(S, x) {
26326
- return (S == null ? void 0 : S.startDate) === (x == null ? void 0 : x.startDate) && (S == null ? void 0 : S.endDate) === (x == null ? void 0 : x.endDate);
26329
+ function L(h, x) {
26330
+ return (h == null ? void 0 : h.startDate) === (x == null ? void 0 : x.startDate) && (h == null ? void 0 : h.endDate) === (x == null ? void 0 : x.endDate);
26327
26331
  }
26328
- function R(S, x) {
26329
- var Q, G, _0, h0, f0, B0, v0, I0;
26330
- return ((Q = S == null ? void 0 : S.start) == null ? void 0 : Q.hour) === ((G = x == null ? void 0 : x.start) == null ? void 0 : G.hour) && ((_0 = S == null ? void 0 : S.start) == null ? void 0 : _0.minute) === ((h0 = x == null ? void 0 : x.start) == null ? void 0 : h0.minute) && ((f0 = S == null ? void 0 : S.end) == null ? void 0 : f0.hour) === ((B0 = x == null ? void 0 : x.end) == null ? void 0 : B0.hour) && ((v0 = S == null ? void 0 : S.end) == null ? void 0 : v0.minute) === ((I0 = x == null ? void 0 : x.end) == null ? void 0 : I0.minute);
26332
+ function R(h, x) {
26333
+ var Q, G, _0, S0, f0, B0, v0, I0;
26334
+ return ((Q = h == null ? void 0 : h.start) == null ? void 0 : Q.hour) === ((G = x == null ? void 0 : x.start) == null ? void 0 : G.hour) && ((_0 = h == null ? void 0 : h.start) == null ? void 0 : _0.minute) === ((S0 = x == null ? void 0 : x.start) == null ? void 0 : S0.minute) && ((f0 = h == null ? void 0 : h.end) == null ? void 0 : f0.hour) === ((B0 = x == null ? void 0 : x.end) == null ? void 0 : B0.hour) && ((v0 = h == null ? void 0 : h.end) == null ? void 0 : v0.minute) === ((I0 = x == null ? void 0 : x.end) == null ? void 0 : I0.minute);
26331
26335
  }
26332
- function z(S, x) {
26333
- return !S || !x ? S === x : S.length === x.length && S.every((Q, G) => Q === x[G]);
26336
+ function z(h, x) {
26337
+ return !h || !x ? h === x : h.length === x.length && h.every((Q, G) => Q === x[G]);
26334
26338
  }
26335
26339
  const r = g1(() => {
26336
26340
  if (!(d.isDialogGlobalFilter || !!E.value))
@@ -26338,96 +26342,96 @@ const Nl = { class: "flex flex-row flex-wrap gap-2" }, xl = { class: "inline-fle
26338
26342
  const x = d.dateRange ?? w.value, Q = d.timeRange ?? W.value, G = d.locationIds ?? P.value;
26339
26343
  return L(x, w.value) && R(Q, W.value) && z(G, P.value);
26340
26344
  });
26341
- function e(S) {
26342
- return S ? [...S.tileIds ?? []] : Array.from(new Set(t1.value.flatMap((x) => x.tileIds ?? [])));
26345
+ function e(h) {
26346
+ return h ? [...h.tileIds ?? []] : Array.from(new Set(t1.value.flatMap((x) => x.tileIds ?? [])));
26343
26347
  }
26344
- function n(S) {
26345
- d.isDialogGlobalFilter || O0(e(S));
26348
+ function n(h) {
26349
+ d.isDialogGlobalFilter || O0(e(h));
26346
26350
  }
26347
- function a(S) {
26348
- return S.filter((x) => x !== W1);
26351
+ function a(h) {
26352
+ return h.filter((x) => x !== W1);
26349
26353
  }
26350
- function o(S) {
26351
- const x = S.some(
26354
+ function o(h) {
26355
+ const x = h.some(
26352
26356
  (G) => G === X1 || G === "NULL" || typeof G == "string" && (G === "" || G === " ")
26353
- ), Q = S.flatMap(
26357
+ ), Q = h.flatMap(
26354
26358
  (G) => G === X1 ? [...s0] : [G]
26355
26359
  );
26356
26360
  return x ? Array.from(/* @__PURE__ */ new Set([...Q, ...s0])) : Array.from(new Set(Q));
26357
26361
  }
26358
- function s(S) {
26362
+ function s(h) {
26359
26363
  const x = u0(
26360
- S.globalFilter,
26361
- O(S.id)
26364
+ h.globalFilter,
26365
+ O(h.id)
26362
26366
  ).selectedValues;
26363
- return x != null && x.length ? x : S.selectedValues || [];
26367
+ return x != null && x.length ? x : h.selectedValues || [];
26364
26368
  }
26365
- function u(S) {
26366
- S.selectedValues = [], S.globalFilter.values = [], e0(S.globalFilter, O(S.id), { selectedValues: [] });
26369
+ function u(h) {
26370
+ h.selectedValues = [], h.globalFilter.values = [], e0(h.globalFilter, O(h.id), { selectedValues: [] });
26367
26371
  }
26368
- function p(S) {
26369
- const x = D(S);
26370
- S.selectedValues = [...x], S.globalFilter.values = A0(S), e0(S.globalFilter, O(S.id), {
26372
+ function p(h) {
26373
+ const x = D(h);
26374
+ h.selectedValues = [...x], h.globalFilter.values = A0(h), e0(h.globalFilter, O(h.id), {
26371
26375
  selectedValues: x
26372
26376
  });
26373
26377
  }
26374
- function c(S) {
26375
- S.options = [], u(S);
26378
+ function c(h) {
26379
+ h.options = [], u(h);
26376
26380
  }
26377
- function b(S) {
26378
- S.keepSelection || u(S);
26381
+ function b(h) {
26382
+ h.keepSelection || u(h);
26379
26383
  }
26380
- function _(S) {
26381
- const x = a(s(S));
26382
- p0.value[S.id] = [...x], u(S);
26384
+ function _(h) {
26385
+ const x = a(s(h));
26386
+ p0.value[h.id] = [...x], u(h);
26383
26387
  }
26384
26388
  function A() {
26385
- var G, _0, h0, f0;
26386
- const S = w.value, x = W.value, Q = P.value || [];
26389
+ var G, _0, S0, f0;
26390
+ const h = w.value, x = W.value, Q = P.value || [];
26387
26391
  return JSON.stringify({
26388
26392
  globalFilterId: t.value,
26389
- startDate: (S == null ? void 0 : S.startDate) ?? null,
26390
- endDate: (S == null ? void 0 : S.endDate) ?? null,
26393
+ startDate: (h == null ? void 0 : h.startDate) ?? null,
26394
+ endDate: (h == null ? void 0 : h.endDate) ?? null,
26391
26395
  startHour: ((G = x == null ? void 0 : x.start) == null ? void 0 : G.hour) ?? null,
26392
26396
  startMinute: ((_0 = x == null ? void 0 : x.start) == null ? void 0 : _0.minute) ?? null,
26393
- endHour: ((h0 = x == null ? void 0 : x.end) == null ? void 0 : h0.hour) ?? null,
26397
+ endHour: ((S0 = x == null ? void 0 : x.end) == null ? void 0 : S0.hour) ?? null,
26394
26398
  endMinute: ((f0 = x == null ? void 0 : x.end) == null ? void 0 : f0.minute) ?? null,
26395
26399
  locationIds: Q
26396
26400
  });
26397
26401
  }
26398
- function D(S) {
26399
- const x = S.selectedValues || [];
26400
- return h(x) ? [W1] : S.keepSelection ? a(x) : x;
26402
+ function D(h) {
26403
+ const x = h.selectedValues || [];
26404
+ return S(x) ? [W1] : h.keepSelection ? a(x) : x;
26401
26405
  }
26402
- function $(S) {
26403
- const x = a(S.selectedValues || []);
26406
+ function $(h) {
26407
+ const x = a(h.selectedValues || []);
26404
26408
  if (x.length)
26405
26409
  return x.map((G) => String(G));
26406
26410
  const Q = a(
26407
- u0(S.globalFilter, O(S.id)).selectedValues
26411
+ u0(h.globalFilter, O(h.id)).selectedValues
26408
26412
  );
26409
- return Q.length ? Q.map((G) => String(G)) : (S.globalFilter.values ?? []).map((G) => String(G));
26413
+ return Q.length ? Q.map((G) => String(G)) : (h.globalFilter.values ?? []).map((G) => String(G));
26410
26414
  }
26411
- function q(S) {
26412
- if (h(S.selectedValues || []))
26415
+ function q(h) {
26416
+ if (S(h.selectedValues || []))
26413
26417
  return [W1];
26414
- const x = a(S.selectedValues || []);
26418
+ const x = a(h.selectedValues || []);
26415
26419
  if (x.length)
26416
26420
  return x;
26417
26421
  const Q = u0(
26418
- S.globalFilter,
26419
- O(S.id)
26422
+ h.globalFilter,
26423
+ O(h.id)
26420
26424
  ).selectedValues;
26421
- return h(Q || []) ? [W1] : a(Q);
26425
+ return S(Q || []) ? [W1] : a(Q);
26422
26426
  }
26423
- function h(S) {
26424
- return S.includes(W1);
26427
+ function S(h) {
26428
+ return h.includes(W1);
26425
26429
  }
26426
- function T(S) {
26427
- return S === X1 || String(S ?? "").trim() === "";
26430
+ function T(h) {
26431
+ return h === X1 || String(h ?? "").trim() === "";
26428
26432
  }
26429
- function C(S) {
26430
- return [...S].sort((x, Q) => {
26433
+ function C(h) {
26434
+ return [...h].sort((x, Q) => {
26431
26435
  const G = T(x.value), _0 = T(Q.value);
26432
26436
  return G !== _0 ? G ? -1 : 1 : x.label.localeCompare(Q.label, y.value, {
26433
26437
  numeric: !0,
@@ -26435,126 +26439,126 @@ const Nl = { class: "flex flex-row flex-wrap gap-2" }, xl = { class: "inline-fle
26435
26439
  });
26436
26440
  });
26437
26441
  }
26438
- function F(S) {
26439
- return S.type === D1.String && !$e(S.globalFilter);
26442
+ function F(h) {
26443
+ return h.type === D1.String && !$e(h.globalFilter);
26440
26444
  }
26441
- function B(S) {
26442
- return (S.options || []).map((x) => x.value);
26445
+ function B(h) {
26446
+ return (h.options || []).map((x) => x.value);
26443
26447
  }
26444
- function v(S) {
26445
- return B(S).length > 0;
26448
+ function v(h) {
26449
+ return B(h).length > 0;
26446
26450
  }
26447
- function I(S) {
26448
- const x = a(S.selectedValues || []);
26449
- return x.length ? x : h(S.selectedValues || []) ? [] : v(S) ? B(S) : [];
26451
+ function I(h) {
26452
+ const x = a(h.selectedValues || []);
26453
+ return x.length ? x : S(h.selectedValues || []) ? [] : v(h) ? B(h) : [];
26450
26454
  }
26451
- function J(S, x) {
26452
- const Q = new Set((S.options || []).map((G) => G.value));
26455
+ function J(h, x) {
26456
+ const Q = new Set((h.options || []).map((G) => G.value));
26453
26457
  return a(x).filter((G) => Q.has(G));
26454
26458
  }
26455
- function H(S) {
26456
- const Q = u0(S.globalFilter, O(S.id)).selectedValues, G = d.isDialogGlobalFilter ? q(S) : [];
26457
- if (h(S.selectedValues || []))
26459
+ function H(h) {
26460
+ const Q = u0(h.globalFilter, O(h.id)).selectedValues, G = d.isDialogGlobalFilter ? q(h) : [];
26461
+ if (S(h.selectedValues || []))
26458
26462
  return [W1];
26459
- if (h(Q || []))
26463
+ if (S(Q || []))
26460
26464
  return [W1];
26461
- if ((S.options || []).map((h0) => h0.value).length > 0) {
26462
- const h0 = J(
26463
- S,
26465
+ if ((h.options || []).map((S0) => S0.value).length > 0) {
26466
+ const S0 = J(
26467
+ h,
26464
26468
  G
26465
26469
  );
26466
- if (h0.length)
26467
- return h0;
26468
- const f0 = J(S, Q);
26470
+ if (S0.length)
26471
+ return S0;
26472
+ const f0 = J(h, Q);
26469
26473
  if (f0.length)
26470
26474
  return f0;
26471
- if (S.keepSelection) {
26475
+ if (h.keepSelection) {
26472
26476
  const B0 = J(
26473
- S,
26474
- s(S)
26477
+ h,
26478
+ s(h)
26475
26479
  );
26476
26480
  if (B0.length)
26477
26481
  return B0;
26478
26482
  }
26479
26483
  return [];
26480
26484
  }
26481
- return G.length ? [...G] : Q.length ? [...Q] : S.keepSelection ? s(S) : [];
26485
+ return G.length ? [...G] : Q.length ? [...Q] : h.keepSelection ? s(h) : [];
26482
26486
  }
26483
- function Y(S, x) {
26487
+ function Y(h, x) {
26484
26488
  const Q = new Set(a(x));
26485
26489
  if (!Q.size) return !1;
26486
- const G = (S.options || []).map((_0) => _0.value);
26490
+ const G = (h.options || []).map((_0) => _0.value);
26487
26491
  return G.length ? G.every((_0) => Q.has(_0)) : !1;
26488
26492
  }
26489
- function j(S) {
26490
- const x = S.selectedValues || [];
26491
- return h(x) || !v(S) ? !1 : a(x).length === 0;
26493
+ function j(h) {
26494
+ const x = h.selectedValues || [];
26495
+ return S(x) || !v(h) ? !1 : a(x).length === 0;
26492
26496
  }
26493
- function A0(S) {
26494
- const x = D(S), Q = a(x), G = o(Q), _0 = h(x);
26495
- if (j(S))
26497
+ function A0(h) {
26498
+ const x = D(h), Q = a(x), G = o(Q), _0 = S(x);
26499
+ if (j(h))
26496
26500
  return [];
26497
- if (Y(S, x))
26501
+ if (Y(h, x))
26498
26502
  return [];
26499
- if (!S.keepSelection || d.isDialogGlobalFilter)
26503
+ if (!h.keepSelection || d.isDialogGlobalFilter)
26500
26504
  return G.length ? G : _0 ? [X1] : [];
26501
- if (!v(S))
26505
+ if (!v(h))
26502
26506
  return G.length ? G : _0 ? [X1] : [];
26503
- const h0 = new Set(
26504
- (S.options || []).filter((v0) => v0.available !== !1).map((v0) => v0.value)
26507
+ const S0 = new Set(
26508
+ (h.options || []).filter((v0) => v0.available !== !1).map((v0) => v0.value)
26505
26509
  ), f0 = Q.filter(
26506
- (v0) => h0.has(v0)
26510
+ (v0) => S0.has(v0)
26507
26511
  ), B0 = o(f0);
26508
26512
  return B0.length ? B0 : _0 ? [X1] : [];
26509
26513
  }
26510
- function a0(S) {
26511
- const x = p0.value[S.id];
26514
+ function a0(h) {
26515
+ const x = p0.value[h.id];
26512
26516
  if (x) {
26513
- S.selectedValues = [...x], p(S), delete p0.value[S.id];
26517
+ h.selectedValues = [...x], p(h), delete p0.value[h.id];
26514
26518
  return;
26515
26519
  }
26516
- S.selectedValues = H(S), p(S);
26520
+ h.selectedValues = H(h), p(h);
26517
26521
  }
26518
26522
  function Q0() {
26519
- l.value.forEach((S) => {
26520
- r.value || b(S);
26523
+ l.value.forEach((h) => {
26524
+ r.value || b(h);
26521
26525
  });
26522
26526
  }
26523
26527
  function K0() {
26524
- const S = A();
26525
- T0.value !== S && l.value.forEach((Q) => {
26528
+ const h = A();
26529
+ T0.value !== h && l.value.forEach((Q) => {
26526
26530
  if (Q.keepSelection) {
26527
26531
  _(Q);
26528
26532
  return;
26529
26533
  }
26530
26534
  b(Q);
26531
- }), T0.value = S;
26535
+ }), T0.value = h;
26532
26536
  }
26533
26537
  const t1 = g1(() => d.globalFilters ?? k.value);
26534
- function a1(S) {
26538
+ function a1(h) {
26535
26539
  return {
26536
- schemaName: S.schemaName,
26537
- name: S.name,
26538
- operator: S.operator,
26539
- option: S.option,
26540
- dataFormula: S.dataFormula,
26541
- tileIds: [...S.tileIds ?? []],
26542
- filters: S.filters ?? [],
26543
- customOptions: S.customOptions ?? [],
26544
- customTimeRanges: S.customTimeRanges ?? []
26540
+ schemaName: h.schemaName,
26541
+ name: h.name,
26542
+ operator: h.operator,
26543
+ option: h.option,
26544
+ dataFormula: h.dataFormula,
26545
+ tileIds: [...h.tileIds ?? []],
26546
+ filters: h.filters ?? [],
26547
+ customOptions: h.customOptions ?? [],
26548
+ customTimeRanges: h.customTimeRanges ?? []
26545
26549
  };
26546
26550
  }
26547
- function X0(S) {
26548
- return S.map((x) => a1(x));
26551
+ function X0(h) {
26552
+ return h.map((x) => a1(x));
26549
26553
  }
26550
- function r1(S, x) {
26551
- const Q = `${U(S, t.value)}|${x}`, G = u0(S, O(Q)), _0 = G.selectedValues.length ? [...G.selectedValues] : [...S.values ?? []];
26554
+ function r1(h, x) {
26555
+ const Q = `${U(h, t.value)}|${x}`, G = u0(h, O(Q)), _0 = G.selectedValues.length ? [...G.selectedValues] : [...h.values ?? []];
26552
26556
  return {
26553
26557
  id: Q,
26554
- globalFilter: S,
26558
+ globalFilter: h,
26555
26559
  search: G.search,
26556
26560
  options: G.options,
26557
- type: fe(S),
26561
+ type: fe(h),
26558
26562
  selectedValues: _0,
26559
26563
  visibleCount: G.visibleCount,
26560
26564
  keepSelection: G.keepSelection,
@@ -26563,17 +26567,17 @@ const Nl = { class: "flex flex-row flex-wrap gap-2" }, xl = { class: "inline-fle
26563
26567
  }
26564
26568
  function i1() {
26565
26569
  l.value = t1.value.map(
26566
- (S, x) => r1(S, x)
26570
+ (h, x) => r1(h, x)
26567
26571
  );
26568
26572
  }
26569
26573
  const p1 = g1(
26570
26574
  () => JSON.stringify(X0(t1.value))
26571
26575
  ), M1 = g1(() => {
26572
- const S = t1.value.map(
26576
+ const h = t1.value.map(
26573
26577
  (x) => fr(x, _r())
26574
26578
  );
26575
26579
  return JSON.stringify(
26576
- S.map((x) => ({
26580
+ h.map((x) => ({
26577
26581
  key: x,
26578
26582
  values: y0.value[x] ?? []
26579
26583
  }))
@@ -26584,10 +26588,10 @@ const Nl = { class: "flex flex-row flex-wrap gap-2" }, xl = { class: "inline-fle
26584
26588
  globalFilterId: t.value,
26585
26589
  globalFiltersConfigSignature: p1.value
26586
26590
  }),
26587
- (S, x) => {
26588
- x && x.globalFilterId !== S.globalFilterId && l.value.forEach((Q) => {
26591
+ (h, x) => {
26592
+ x && x.globalFilterId !== h.globalFilterId && l.value.forEach((Q) => {
26589
26593
  Q.options = [];
26590
- }), i1(), x && x.globalFiltersConfigSignature !== S.globalFiltersConfigSignature && n(), d0.value && ke();
26594
+ }), i1(), x && x.globalFiltersConfigSignature !== h.globalFiltersConfigSignature && n(), d0.value && ke();
26591
26595
  },
26592
26596
  { immediate: !0 }
26593
26597
  ), Z1(
@@ -26607,15 +26611,15 @@ const Nl = { class: "flex flex-row flex-wrap gap-2" }, xl = { class: "inline-fle
26607
26611
  ), Z1(
26608
26612
  [() => E.value],
26609
26613
  async () => {
26610
- l.value.forEach((S) => {
26611
- S.options = [];
26614
+ l.value.forEach((h) => {
26615
+ h.options = [];
26612
26616
  }), await ke();
26613
26617
  },
26614
26618
  { deep: !0 }
26615
26619
  ), Z1(
26616
26620
  () => M1.value,
26617
- async (S, x) => {
26618
- S !== x && x && (d.isDialogGlobalFilter || br() || await ke());
26621
+ async (h, x) => {
26622
+ h !== x && x && (d.isDialogGlobalFilter || br() || await ke());
26619
26623
  }
26620
26624
  ), Z1(
26621
26625
  () => y.value,
@@ -26623,48 +26627,48 @@ const Nl = { class: "flex flex-row flex-wrap gap-2" }, xl = { class: "inline-fle
26623
26627
  A1();
26624
26628
  }
26625
26629
  );
26626
- function s1(S, x) {
26630
+ function s1(h, x) {
26627
26631
  var Q;
26628
- return x === !0 ? f("report.common.yes") || "Yes" : x === !1 ? f("report.common.no") || "No" : String(x).trim() === "" || x === X1 ? c0.value : S.type === D1.Timestamp && S.globalFilter.option !== H0.DateTime && S.globalFilter.option !== H0.TimeOfDay ? ((Q = ht({
26629
- dimensionOption: S.globalFilter.option,
26632
+ return x === !0 ? f("report.common.yes") || "Yes" : x === !1 ? f("report.common.no") || "No" : String(x).trim() === "" || x === X1 ? c0.value : h.type === D1.Timestamp && h.globalFilter.option !== H0.DateTime && h.globalFilter.option !== H0.TimeOfDay ? ((Q = St({
26633
+ dimensionOption: h.globalFilter.option,
26630
26634
  t: f
26631
26635
  }).find((_0) => String(_0.value) === String(x))) == null ? void 0 : Q.label) ?? String(x) : String(x);
26632
26636
  }
26633
26637
  function A1() {
26634
- l.value.forEach((S) => {
26635
- if (!S.options.length) return;
26636
- const x = S.options.map((Q) => ({
26638
+ l.value.forEach((h) => {
26639
+ if (!h.options.length) return;
26640
+ const x = h.options.map((Q) => ({
26637
26641
  ...Q,
26638
- label: s1(S, Q.value)
26642
+ label: s1(h, Q.value)
26639
26643
  }));
26640
- S.options = F(S) ? C(x) : x;
26644
+ h.options = F(h) ? C(x) : x;
26641
26645
  });
26642
26646
  }
26643
- function fe(S) {
26647
+ function fe(h) {
26644
26648
  var Q;
26645
- const x = (Q = Z.value.find((G) => G.name === S.schemaName)) == null ? void 0 : Q.fields.find((G) => G.name === S.name);
26649
+ const x = (Q = Z.value.find((G) => G.name === h.schemaName)) == null ? void 0 : Q.fields.find((G) => G.name === h.name);
26646
26650
  return x == null ? void 0 : x.type;
26647
26651
  }
26648
- function Je(S) {
26652
+ function Je(h) {
26649
26653
  var B0, v0;
26650
26654
  if (!i.value && !E.value) return [];
26651
- if (!((B0 = S.tileIds) != null && B0.length)) return [];
26652
- const x = E.value ? [E.value] : Te((v0 = i.value) == null ? void 0 : v0.tiles), { name: Q = "", schemaName: G = "" } = S, _0 = x.filter((I0) => {
26655
+ if (!((B0 = h.tileIds) != null && B0.length)) return [];
26656
+ const x = E.value ? [E.value] : Te((v0 = i.value) == null ? void 0 : v0.tiles), { name: Q = "", schemaName: G = "" } = h, _0 = x.filter((I0) => {
26653
26657
  var b1, m0;
26654
26658
  const N0 = (b1 = I0 == null ? void 0 : I0.widget) == null ? void 0 : b1.config;
26655
- if (!N0 || (m0 = S.tileIds) != null && m0.length && !S.tileIds.includes(I0.id)) return !1;
26659
+ if (!N0 || (m0 = h.tileIds) != null && m0.length && !h.tileIds.includes(I0.id)) return !1;
26656
26660
  const t0 = (N0.dimensions ?? []).some(
26657
26661
  (Q1) => Q1.schemaName === G && Q1.name === Q
26658
26662
  ), U0 = (N0.joinDatasources ?? []).some(
26659
26663
  (Q1) => (Q1.dimensions ?? []).some((me) => me.schemaName === G && me.name === Q)
26660
- ), S0 = (N0.schemaNames ?? []).includes(G);
26661
- return t0 || U0 || S0;
26664
+ ), h0 = (N0.schemaNames ?? []).includes(G);
26665
+ return t0 || U0 || h0;
26662
26666
  });
26663
26667
  if (!_0.length) return [];
26664
- const h0 = (I0, N0) => {
26665
- const t0 = /* @__PURE__ */ new Map(), U0 = (S0) => {
26666
- const b1 = `${S0.schemaName}:${S0.name}:${S0.operator}:${S0.option ?? ""}:${S0.dataFormula ?? ""}`, m0 = t0.get(b1);
26667
- m0 ? [k0.Like, k0.NotLike].includes(S0.operator) ? m0.values = Array.from(/* @__PURE__ */ new Set([...m0.values ?? [], ...S0.values ?? []])) : t0.set(b1, { ...S0 }) : t0.set(b1, { ...S0 });
26668
+ const S0 = (I0, N0) => {
26669
+ const t0 = /* @__PURE__ */ new Map(), U0 = (h0) => {
26670
+ const b1 = `${h0.schemaName}:${h0.name}:${h0.operator}:${h0.option ?? ""}:${h0.dataFormula ?? ""}`, m0 = t0.get(b1);
26671
+ m0 ? [k0.Like, k0.NotLike].includes(h0.operator) ? m0.values = Array.from(/* @__PURE__ */ new Set([...m0.values ?? [], ...h0.values ?? []])) : t0.set(b1, { ...h0 }) : t0.set(b1, { ...h0 });
26668
26672
  };
26669
26673
  return I0.forEach(U0), N0.forEach(U0), Array.from(t0.values());
26670
26674
  }, f0 = (I0) => {
@@ -26677,7 +26681,7 @@ const Nl = { class: "flex flex-row flex-wrap gap-2" }, xl = { class: "inline-fle
26677
26681
  schemaName: G,
26678
26682
  label: (N0 == null ? void 0 : N0.label) ?? Q,
26679
26683
  hide: !1,
26680
- option: S.option ?? null,
26684
+ option: h.option ?? null,
26681
26685
  dataFormula: N0 == null ? void 0 : N0.dataFormula
26682
26686
  };
26683
26687
  };
@@ -26685,17 +26689,17 @@ const Nl = { class: "flex flex-row flex-wrap gap-2" }, xl = { class: "inline-fle
26685
26689
  var me, Or;
26686
26690
  const t0 = (me = N0 == null ? void 0 : N0.widget) == null ? void 0 : me.config;
26687
26691
  if (!t0) return I0;
26688
- const U0 = f0(t0), S0 = (t0.dimensions ?? []).some((H1) => H1.schemaName === G) || (t0.schemaNames ?? []).includes(G), b1 = h0(
26692
+ const U0 = f0(t0), h0 = (t0.dimensions ?? []).some((H1) => H1.schemaName === G) || (t0.schemaNames ?? []).includes(G), b1 = S0(
26689
26693
  t0.filters ?? [],
26690
- (S.filters ?? []).filter((H1) => {
26694
+ (h.filters ?? []).filter((H1) => {
26691
26695
  var j1;
26692
26696
  return (j1 = t0.schemaNames) == null ? void 0 : j1.includes(H1.schemaName);
26693
26697
  })
26694
26698
  ), m0 = (Or = t0.joinDatasources) == null ? void 0 : Or.find(
26695
26699
  (H1) => (H1.schemaNames ?? []).includes(G) || (H1.dimensions ?? []).some((j1) => j1.schemaName === G)
26696
- ), Q1 = h0(
26700
+ ), Q1 = S0(
26697
26701
  (m0 == null ? void 0 : m0.filters) ?? [],
26698
- (S.filters ?? []).filter((H1) => {
26702
+ (h.filters ?? []).filter((H1) => {
26699
26703
  var j1;
26700
26704
  return (j1 = m0 == null ? void 0 : m0.schemaNames) == null ? void 0 : j1.includes(H1.schemaName);
26701
26705
  })
@@ -26706,10 +26710,10 @@ const Nl = { class: "flex flex-row flex-wrap gap-2" }, xl = { class: "inline-fle
26706
26710
  config: {
26707
26711
  schemaNames: t0.schemaNames,
26708
26712
  schemas: t0.schemas,
26709
- dimensions: S0 ? [U0] : [],
26713
+ dimensions: h0 ? [U0] : [],
26710
26714
  filters: b1,
26711
- sorts: S0 ? [{ name: Q, schemaName: G, type: $r.Asc, aggregation: null, dimensionOption: null }] : [],
26712
- joinDatasources: !S0 && m0 ? [
26715
+ sorts: h0 ? [{ name: Q, schemaName: G, type: $r.Asc, aggregation: null, dimensionOption: null }] : [],
26716
+ joinDatasources: !h0 && m0 ? [
26713
26717
  {
26714
26718
  ...m0,
26715
26719
  dimensions: [U0],
@@ -26742,115 +26746,115 @@ const Nl = { class: "flex flex-row flex-wrap gap-2" }, xl = { class: "inline-fle
26742
26746
  }), I0;
26743
26747
  }, []);
26744
26748
  }
26745
- function ye(S) {
26746
- const x = new Set(I(S));
26747
- return S.options.every((Q) => x.has(Q.value));
26749
+ function ye(h) {
26750
+ const x = new Set(I(h));
26751
+ return h.options.every((Q) => x.has(Q.value));
26748
26752
  }
26749
- function He(S) {
26750
- ye(S) ? S.selectedValues = [W1] : S.selectedValues = [];
26753
+ function He(h) {
26754
+ ye(h) ? h.selectedValues = [W1] : h.selectedValues = [];
26751
26755
  }
26752
- function cr(S, x) {
26753
- return I(S).includes(x);
26756
+ function cr(h, x) {
26757
+ return I(h).includes(x);
26754
26758
  }
26755
26759
  const Mr = g1(
26756
- () => l.value.map((S) => {
26757
- const x = S.options, Q = S.search.toLowerCase() ?? "";
26760
+ () => l.value.map((h) => {
26761
+ const x = h.options, Q = h.search.toLowerCase() ?? "";
26758
26762
  return x.filter(
26759
26763
  (_0) => _0.label.toLowerCase().includes(Q.toLowerCase())
26760
- ).slice(0, S.visibleCount);
26764
+ ).slice(0, h.visibleCount);
26761
26765
  })
26762
26766
  );
26763
- function Qn(S) {
26764
- S.visibleCount += 50, i0(S.globalFilter, O(S.id), 50);
26767
+ function Qn(h) {
26768
+ h.visibleCount += 50, i0(h.globalFilter, O(h.id), 50);
26765
26769
  }
26766
- function jn(S, x) {
26767
- e0(S.globalFilter, O(S.id), { search: x });
26770
+ function jn(h, x) {
26771
+ e0(h.globalFilter, O(h.id), { search: x });
26768
26772
  }
26769
- function $e(S) {
26773
+ function $e(h) {
26770
26774
  var x, Q;
26771
- return (((x = S.customOptions) == null ? void 0 : x.length) ?? 0) > 0 || (((Q = S.customTimeRanges) == null ? void 0 : Q.length) ?? 0) > 0;
26775
+ return (((x = h.customOptions) == null ? void 0 : x.length) ?? 0) > 0 || (((Q = h.customTimeRanges) == null ? void 0 : Q.length) ?? 0) > 0;
26772
26776
  }
26773
- function Dt(S) {
26777
+ function Dt(h) {
26774
26778
  var x;
26775
- return !((x = S.globalFilter.tileIds) != null && x.length);
26779
+ return !((x = h.globalFilter.tileIds) != null && x.length);
26776
26780
  }
26777
26781
  function br() {
26778
26782
  return (d.isDialogGlobalFilter || !!E.value) && !r.value;
26779
26783
  }
26780
26784
  function _r() {
26781
- var S;
26782
- return d.isDialogGlobalFilter && r.value && ((S = m.value) != null && S.id) ? m.value.id : t.value;
26785
+ var h;
26786
+ return d.isDialogGlobalFilter && r.value && ((h = m.value) != null && h.id) ? m.value.id : t.value;
26783
26787
  }
26784
- function Xe(S) {
26785
- return String(S ?? "").trim() === "" ? X1 : String(S);
26788
+ function Xe(h) {
26789
+ return String(h ?? "").trim() === "" ? X1 : String(h);
26786
26790
  }
26787
- function Kn(S) {
26791
+ function Kn(h) {
26788
26792
  var x, Q;
26789
- return (((x = S.customTimeRanges) == null ? void 0 : x.length) ?? 0) > 0 ? S.customTimeRanges.map((G) => ({
26793
+ return (((x = h.customTimeRanges) == null ? void 0 : x.length) ?? 0) > 0 ? h.customTimeRanges.map((G) => ({
26790
26794
  label: Xe(G.name),
26791
26795
  value: Xe(G.name),
26792
26796
  available: !0
26793
- })) : (((Q = S.customOptions) == null ? void 0 : Q.length) ?? 0) > 0 ? S.customOptions.map((G) => ({
26797
+ })) : (((Q = h.customOptions) == null ? void 0 : Q.length) ?? 0) > 0 ? h.customOptions.map((G) => ({
26794
26798
  label: Xe(G.label),
26795
26799
  value: Xe(G.label),
26796
26800
  available: !0
26797
26801
  })) : [];
26798
26802
  }
26799
- function Zn(S) {
26800
- const x = a(S.selectedValues || []);
26803
+ function Zn(h) {
26804
+ const x = a(h.selectedValues || []);
26801
26805
  if (!x.length) return;
26802
- const Q = new Set(S.options.map((_0) => _0.value)), G = x.filter((_0) => !Q.has(_0)).map((_0) => ({
26806
+ const Q = new Set(h.options.map((_0) => _0.value)), G = x.filter((_0) => !Q.has(_0)).map((_0) => ({
26803
26807
  value: _0,
26804
- label: s1(S, _0),
26808
+ label: s1(h, _0),
26805
26809
  available: !1
26806
26810
  }));
26807
26811
  if (G.length) {
26808
- const _0 = [...S.options, ...G];
26809
- S.options = F(S) ? C(_0) : _0;
26812
+ const _0 = [...h.options, ...G];
26813
+ h.options = F(h) ? C(_0) : _0;
26810
26814
  }
26811
26815
  }
26812
- function ea(S) {
26813
- if (S.keepSelection) {
26814
- Zn(S);
26815
- const Q = s(S);
26816
- S.selectedValues = Q.length ? [...Q] : [...S.selectedValues || []];
26816
+ function ea(h) {
26817
+ if (h.keepSelection) {
26818
+ Zn(h);
26819
+ const Q = s(h);
26820
+ h.selectedValues = Q.length ? [...Q] : [...h.selectedValues || []];
26817
26821
  } else {
26818
- const Q = a(s(S));
26819
- S.options = S.options.filter((h0) => h0.available !== !1);
26820
- const G = new Set(S.options.map((h0) => h0.value)), _0 = Q.filter(
26821
- (h0) => G.has(h0)
26822
+ const Q = a(s(h));
26823
+ h.options = h.options.filter((S0) => S0.available !== !1);
26824
+ const G = new Set(h.options.map((S0) => S0.value)), _0 = Q.filter(
26825
+ (S0) => G.has(S0)
26822
26826
  );
26823
- S.selectedValues = _0;
26827
+ h.selectedValues = _0;
26824
26828
  }
26825
- const x = D(S);
26826
- S.selectedValues = [...x], e0(S.globalFilter, O(S.id), {
26829
+ const x = D(h);
26830
+ h.selectedValues = [...x], e0(h.globalFilter, O(h.id), {
26827
26831
  selectedValues: x
26828
26832
  });
26829
26833
  }
26830
- async function ta(S, x) {
26834
+ async function ta(h, x) {
26831
26835
  var Q;
26832
- if (S.options = [], !((Q = S.globalFilter.tileIds) != null && Q.length)) {
26833
- c(S);
26836
+ if (h.options = [], !((Q = h.globalFilter.tileIds) != null && Q.length)) {
26837
+ c(h);
26834
26838
  return;
26835
26839
  }
26836
- if (!(!S.type && (S.type = fe(S.globalFilter), !S.type))) {
26837
- if ($e(S.globalFilter)) {
26838
- S.options = Kn(S.globalFilter), a0(S);
26840
+ if (!(!h.type && (h.type = fe(h.globalFilter), !h.type))) {
26841
+ if ($e(h.globalFilter)) {
26842
+ h.options = Kn(h.globalFilter), a0(h);
26839
26843
  return;
26840
26844
  }
26841
- switch (S.type) {
26845
+ switch (h.type) {
26842
26846
  case D1.String:
26843
26847
  try {
26844
- const G = Je(S.globalFilter);
26848
+ const G = Je(h.globalFilter);
26845
26849
  if (!G.length) {
26846
- S.options = [];
26850
+ h.options = [];
26847
26851
  return;
26848
26852
  }
26849
- const _0 = br(), h0 = [];
26853
+ const _0 = br(), S0 = [];
26850
26854
  for (const t0 of G) {
26851
26855
  if (x.aborted) return;
26852
26856
  if (_0) {
26853
- const S0 = await ml({
26857
+ const h0 = await ml({
26854
26858
  widget: t0,
26855
26859
  signal: x,
26856
26860
  scopedLocationIds: d.locationIds,
@@ -26858,24 +26862,24 @@ const Nl = { class: "flex flex-row flex-wrap gap-2" }, xl = { class: "inline-fle
26858
26862
  scopedDateRange: d.dateRange,
26859
26863
  scopedGlobalFilters: d.globalFilters
26860
26864
  });
26861
- (S0 == null ? void 0 : S0.type) === yr.Table && h0.push(...S0.rows.map((b1) => {
26865
+ (h0 == null ? void 0 : h0.type) === yr.Table && S0.push(...h0.rows.map((b1) => {
26862
26866
  var m0;
26863
26867
  return ((m0 = b1.cells) == null ? void 0 : m0[0]) ?? " ";
26864
26868
  }));
26865
26869
  continue;
26866
26870
  }
26867
26871
  const U0 = q0(
26868
- fr(S.globalFilter, _r())
26872
+ fr(h.globalFilter, _r())
26869
26873
  );
26870
- h0.push(...U0);
26874
+ S0.push(...U0);
26871
26875
  }
26872
- const f0 = Array.from(new Set(h0)), B0 = s(S), v0 = S.keepSelection ? Array.from(/* @__PURE__ */ new Set([...f0, ...B0])) : f0, I0 = new Set(h0), N0 = new Set(f0);
26873
- S.options = C(
26876
+ const f0 = Array.from(new Set(S0)), B0 = s(h), v0 = h.keepSelection ? Array.from(/* @__PURE__ */ new Set([...f0, ...B0])) : f0, I0 = new Set(S0), N0 = new Set(f0);
26877
+ h.options = C(
26874
26878
  Da(v0, {
26875
26879
  unknownLabel: c0.value,
26876
- getAvailable: (t0) => S.keepSelection ? I0.has(t0) : N0.has(t0)
26880
+ getAvailable: (t0) => h.keepSelection ? I0.has(t0) : N0.has(t0)
26877
26881
  })
26878
- ), a0(S);
26882
+ ), a0(h);
26879
26883
  } catch (G) {
26880
26884
  if ((G == null ? void 0 : G.code) === "ERR_CANCELED" || (G == null ? void 0 : G.name) === "CanceledError")
26881
26885
  return;
@@ -26883,18 +26887,18 @@ const Nl = { class: "flex flex-row flex-wrap gap-2" }, xl = { class: "inline-fle
26883
26887
  }
26884
26888
  break;
26885
26889
  case D1.Bool: {
26886
- S.options = [
26890
+ h.options = [
26887
26891
  { label: f("report.common.yes"), value: !0 },
26888
26892
  { label: f("report.common.no"), value: !1 }
26889
- ], a0(S);
26893
+ ], a0(h);
26890
26894
  break;
26891
26895
  }
26892
26896
  case D1.Timestamp:
26893
- if (S.globalFilter.option !== H0.DateTime && S.globalFilter.option !== H0.TimeOfDay) {
26894
- const G = S.globalFilter.option;
26895
- S.options = ht({ dimensionOption: G, t: f }), S.globalFilter.values = S.options.length ? S.options.map((_0) => _0.value) : ["NULL"];
26897
+ if (h.globalFilter.option !== H0.DateTime && h.globalFilter.option !== H0.TimeOfDay) {
26898
+ const G = h.globalFilter.option;
26899
+ h.options = St({ dimensionOption: G, t: f }), h.globalFilter.values = h.options.length ? h.options.map((_0) => _0.value) : ["NULL"];
26896
26900
  }
26897
- a0(S);
26901
+ a0(h);
26898
26902
  break;
26899
26903
  case D1.Numeric:
26900
26904
  break;
@@ -26904,61 +26908,61 @@ const Nl = { class: "flex flex-row flex-wrap gap-2" }, xl = { class: "inline-fle
26904
26908
  async function ke() {
26905
26909
  if (!t.value || !l.value.length) return;
26906
26910
  z0 && z0.abort();
26907
- const S = new AbortController();
26908
- z0 = S, r0.value = !0, d.isDialogGlobalFilter && (D0.value = !0);
26911
+ const h = new AbortController();
26912
+ z0 = h, r0.value = !0, d.isDialogGlobalFilter && (D0.value = !0);
26909
26913
  try {
26910
26914
  await Promise.all(
26911
26915
  l.value.map(
26912
- (x) => ta(x, S.signal)
26916
+ (x) => ta(x, h.signal)
26913
26917
  )
26914
26918
  );
26915
26919
  } finally {
26916
- z0 === S && (r0.value = !1), d.isDialogGlobalFilter && z0 === S && (D0.value = !1);
26920
+ z0 === h && (r0.value = !1), d.isDialogGlobalFilter && z0 === h && (D0.value = !1);
26917
26921
  }
26918
26922
  }
26919
- function dr(S, x) {
26920
- const Q = B(S), G = I(S);
26923
+ function dr(h, x) {
26924
+ const Q = B(h), G = I(h);
26921
26925
  if (G.includes(x)) {
26922
26926
  const f0 = G.filter((B0) => B0 !== x);
26923
- S.selectedValues = f0.length > 0 ? f0 : [W1];
26927
+ h.selectedValues = f0.length > 0 ? f0 : [W1];
26924
26928
  } else {
26925
26929
  const f0 = [...G, x], B0 = Q.length > 0 && Q.every((v0) => f0.includes(v0));
26926
- S.selectedValues = B0 ? [] : f0;
26930
+ h.selectedValues = B0 ? [] : f0;
26927
26931
  }
26928
- const h0 = D(S);
26929
- S.selectedValues = [...h0], e0(S.globalFilter, O(S.id), {
26930
- selectedValues: h0
26932
+ const S0 = D(h);
26933
+ h.selectedValues = [...S0], e0(h.globalFilter, O(h.id), {
26934
+ selectedValues: S0
26931
26935
  });
26932
26936
  }
26933
- function zr(S, x) {
26934
- const Q = S.globalFilter, G = x ? [
26937
+ function zr(h, x) {
26938
+ const Q = h.globalFilter, G = x ? [
26935
26939
  F0(x.startDate).tz(N.value).startOf("day").utc().toISOString(),
26936
26940
  F0(x.endDate).tz(N.value).endOf("day").utc().toISOString()
26937
26941
  ] : [];
26938
- x === null ? Q.values = [] : Q.values = G, S.selectedValues = [...G], S.keepSelection = x !== null, e0(S.globalFilter, O(S.id), {
26939
- keepSelection: S.keepSelection,
26942
+ x === null ? Q.values = [] : Q.values = G, h.selectedValues = [...G], h.keepSelection = x !== null, e0(h.globalFilter, O(h.id), {
26943
+ keepSelection: h.keepSelection,
26940
26944
  selectedValues: [...G]
26941
- }), n(S.globalFilter);
26945
+ }), n(h.globalFilter);
26942
26946
  }
26943
- function ra(S) {
26944
- const x = I(S);
26945
- return `${f("report.section.filter.selectAll")} (${x.length}/${S.options.length})`;
26947
+ function ra(h) {
26948
+ const x = I(h);
26949
+ return `${f("report.section.filter.selectAll")} (${x.length}/${h.options.length})`;
26946
26950
  }
26947
26951
  function na() {
26948
26952
  return f("report.section.filter.search");
26949
26953
  }
26950
- function Ue(S) {
26951
- const x = l0(S.globalFilter), Q = S.options.length > 0 ? "(0 selected)" : "";
26952
- if (S.type === D1.Timestamp && !$e(S.globalFilter)) {
26953
- const f0 = $(S), B0 = f0.length === 2;
26954
- if (S.globalFilter.option === H0.DateTime)
26954
+ function Ue(h) {
26955
+ const x = l0(h.globalFilter), Q = h.options.length > 0 ? "(0 selected)" : "";
26956
+ if (h.type === D1.Timestamp && !$e(h.globalFilter)) {
26957
+ const f0 = $(h), B0 = f0.length === 2;
26958
+ if (h.globalFilter.option === H0.DateTime)
26955
26959
  return { preview: B0 ? `${x} is between ${ba({
26956
26960
  startDate: f0[0] || null,
26957
26961
  endDate: f0[1] || null,
26958
26962
  locale: y.value,
26959
26963
  timezone: N.value
26960
26964
  })}` : x, suffix: "" };
26961
- if (S.globalFilter.option === H0.TimeOfDay) {
26965
+ if (h.globalFilter.option === H0.TimeOfDay) {
26962
26966
  const v0 = f0[0] ? F0(f0[0]).tz(N.value) : null, I0 = f0[1] ? F0(f0[1]).tz(N.value) : null, N0 = (U0) => U0 && U0.isValid() ? { hour: U0.hour(), minute: U0.minute() } : null;
26963
26967
  return { preview: B0 ? `${x} is between ${Pr({
26964
26968
  startTime: N0(v0),
@@ -26966,65 +26970,65 @@ const Nl = { class: "flex flex-row flex-wrap gap-2" }, xl = { class: "inline-fle
26966
26970
  locale: y.value
26967
26971
  })}` : x, suffix: "" };
26968
26972
  }
26969
- if (S.globalFilter.option !== H0.DateTime && S.globalFilter.option !== H0.TimeOfDay) {
26970
- const v0 = ht({
26971
- dimensionOption: S.globalFilter.option,
26973
+ if (h.globalFilter.option !== H0.DateTime && h.globalFilter.option !== H0.TimeOfDay) {
26974
+ const v0 = St({
26975
+ dimensionOption: h.globalFilter.option,
26972
26976
  t: f
26973
- }), I0 = new Map(v0.map((S0) => [String(S0.value), S0.label])), t0 = I(S).map((S0) => I0.get(String(S0)) ?? String(S0)), U0 = t0.map((S0) => S0.length > 20 ? `${S0.slice(0, 20)}…` : S0).join(", ");
26977
+ }), I0 = new Map(v0.map((h0) => [String(h0.value), h0.label])), t0 = I(h).map((h0) => I0.get(String(h0)) ?? String(h0)), U0 = t0.map((h0) => h0.length > 20 ? `${h0.slice(0, 20)}…` : h0).join(", ");
26974
26978
  return t0.length ? {
26975
26979
  preview: `${x}: ${U0}`,
26976
26980
  suffix: `(${t0.length} selected)`
26977
26981
  } : { preview: x, suffix: Q };
26978
26982
  }
26979
26983
  }
26980
- const _0 = I(S).map((f0) => f0 === !0 ? f("report.common.yes") || "Yes" : f0 === !1 ? f("report.common.no") || "No" : String(f0).trim() === "" ? c0.value : String(f0)), h0 = _0.map((f0) => f0.length > 20 ? `${f0.slice(0, 20)}…` : f0).join(", ");
26984
+ const _0 = I(h).map((f0) => f0 === !0 ? f("report.common.yes") || "Yes" : f0 === !1 ? f("report.common.no") || "No" : String(f0).trim() === "" ? c0.value : String(f0)), S0 = _0.map((f0) => f0.length > 20 ? `${f0.slice(0, 20)}…` : f0).join(", ");
26981
26985
  return _0.length ? {
26982
- preview: `${x}: ${h0}`,
26986
+ preview: `${x}: ${S0}`,
26983
26987
  suffix: `(${_0.length} selected)`
26984
26988
  } : { preview: x, suffix: Q };
26985
26989
  }
26986
- function aa(S) {
26987
- p(S), n(S.globalFilter), document.body.click();
26990
+ function aa(h) {
26991
+ p(h), n(h.globalFilter), document.body.click();
26988
26992
  }
26989
- function oa(S) {
26993
+ function oa(h) {
26990
26994
  const x = u0(
26991
- S.globalFilter,
26992
- O(S.id)
26995
+ h.globalFilter,
26996
+ O(h.id)
26993
26997
  ).selectedValues;
26994
- S.selectedValues = x.length ? [...x] : [...S.globalFilter.values || []], e0(S.globalFilter, O(S.id), {
26995
- selectedValues: S.selectedValues
26998
+ h.selectedValues = x.length ? [...x] : [...h.globalFilter.values || []], e0(h.globalFilter, O(h.id), {
26999
+ selectedValues: h.selectedValues
26996
27000
  }), document.body.click();
26997
27001
  }
26998
- function ia(S) {
26999
- S.showAdvanced = !S.showAdvanced, e0(S.globalFilter, O(S.id), {
27000
- showAdvanced: S.showAdvanced
27002
+ function ia(h) {
27003
+ h.showAdvanced = !h.showAdvanced, e0(h.globalFilter, O(h.id), {
27004
+ showAdvanced: h.showAdvanced
27001
27005
  });
27002
27006
  }
27003
- function sa(S) {
27004
- S.keepSelection = !S.keepSelection, X(S.keepSelection), e0(S.globalFilter, O(S.id), {
27005
- keepSelection: S.keepSelection
27006
- }), ea(S);
27007
+ function sa(h) {
27008
+ h.keepSelection = !h.keepSelection, X(h.keepSelection), e0(h.globalFilter, O(h.id), {
27009
+ keepSelection: h.keepSelection
27010
+ }), ea(h);
27007
27011
  }
27008
- function ua(S, x) {
27009
- return S ? S.length > x ? `${S.slice(0, x)}…` : S : c0.value;
27012
+ function ua(h, x) {
27013
+ return h ? h.length > x ? `${h.slice(0, x)}…` : h : c0.value;
27010
27014
  }
27011
- function Ar(S, x) {
27012
- var _0, h0, f0, B0;
27013
- const Q = S.globalFilter;
27015
+ function Ar(h, x) {
27016
+ var _0, S0, f0, B0;
27017
+ const Q = h.globalFilter;
27014
27018
  let G = [];
27015
27019
  if (x === null)
27016
27020
  Q.values = [];
27017
27021
  else {
27018
- const v0 = F0().tz(N.value).set("hour", Number((_0 = x.start) == null ? void 0 : _0.hour)).set("minute", Number((h0 = x.start) == null ? void 0 : h0.minute)).toISOString(), I0 = F0().tz(N.value).set("hour", Number((f0 = x.end) == null ? void 0 : f0.hour)).set("minute", Number((B0 = x.end) == null ? void 0 : B0.minute)).toISOString();
27022
+ const v0 = F0().tz(N.value).set("hour", Number((_0 = x.start) == null ? void 0 : _0.hour)).set("minute", Number((S0 = x.start) == null ? void 0 : S0.minute)).toISOString(), I0 = F0().tz(N.value).set("hour", Number((f0 = x.end) == null ? void 0 : f0.hour)).set("minute", Number((B0 = x.end) == null ? void 0 : B0.minute)).toISOString();
27019
27023
  G = [v0, I0], Q.values = G;
27020
27024
  }
27021
- S.selectedValues = [...G], S.keepSelection = x !== null, e0(S.globalFilter, O(S.id), {
27022
- keepSelection: S.keepSelection,
27025
+ h.selectedValues = [...G], h.keepSelection = x !== null, e0(h.globalFilter, O(h.id), {
27026
+ keepSelection: h.keepSelection,
27023
27027
  selectedValues: [...G]
27024
- }), n(S.globalFilter);
27028
+ }), n(h.globalFilter);
27025
27029
  }
27026
- return (S, x) => {
27027
- const Q = e1("FmCircularProgress"), G = e1("FmTextField"), _0 = e1("FmMenuItem"), h0 = e1("FmTooltip"), f0 = e1("FmIcon"), B0 = e1("FmMenuDivider"), v0 = e1("FmSwitch"), I0 = e1("FmButton"), N0 = e1("FmMenu");
27030
+ return (h, x) => {
27031
+ const Q = e1("FmCircularProgress"), G = e1("FmTextField"), _0 = e1("FmMenuItem"), S0 = e1("FmTooltip"), f0 = e1("FmIcon"), B0 = e1("FmMenuDivider"), v0 = e1("FmSwitch"), I0 = e1("FmButton"), N0 = e1("FmMenu");
27028
27032
  return j0(), O1("div", Nl, [
27029
27033
  (j0(!0), O1(pe, null, Tt(l.value, (t0, U0) => (j0(), O1("div", {
27030
27034
  key: t0.id
@@ -27038,7 +27042,7 @@ const Nl = { class: "flex flex-row flex-wrap gap-2" }, xl = { class: "inline-fle
27038
27042
  class: "w-full",
27039
27043
  label: Ue(t0).preview,
27040
27044
  removable: $(t0).length === 2,
27041
- onUpdate: (S0) => zr(t0, S0),
27045
+ onUpdate: (h0) => zr(t0, h0),
27042
27046
  onChipClosed: () => zr(t0, null)
27043
27047
  }, null, 8, ["date-range", "label", "removable", "onUpdate", "onChipClosed"])) : t0.globalFilter.option === g0(H0).TimeOfDay && !$e(t0.globalFilter) ? (j0(), F1(Il, {
27044
27048
  key: 1,
@@ -27055,7 +27059,7 @@ const Nl = { class: "flex flex-row flex-wrap gap-2" }, xl = { class: "inline-fle
27055
27059
  class: "w-full",
27056
27060
  label: Ue(t0).preview,
27057
27061
  removable: $(t0).length === 2,
27058
- onUpdate: (S0) => Ar(t0, S0),
27062
+ onUpdate: (h0) => Ar(t0, h0),
27059
27063
  onChipClosed: () => Ar(t0, null)
27060
27064
  }, null, 8, ["time-range", "label", "removable", "onUpdate", "onChipClosed"])) : (j0(), F1(N0, {
27061
27065
  key: 2,
@@ -27079,10 +27083,10 @@ const Nl = { class: "flex flex-row flex-wrap gap-2" }, xl = { class: "inline-fle
27079
27083
  }, 1032, ["loading", "label"])
27080
27084
  ])
27081
27085
  ]),
27082
- "menu-wrapper": l1(({ maxHeight: S0, width: b1 }) => [
27086
+ "menu-wrapper": l1(({ maxHeight: h0, width: b1 }) => [
27083
27087
  Y0("div", {
27084
27088
  class: "flex flex-col bg-fm-color-neutral-white p-2 rounded-lg shadow-light-300",
27085
- style: ca({ maxHeight: `${S0}px`, width: b1 })
27089
+ style: ca({ maxHeight: `${h0}px`, width: b1 })
27086
27090
  }, [
27087
27091
  g(t0) ? (j0(), O1("div", wl, [
27088
27092
  J0(Q)
@@ -27109,7 +27113,7 @@ const Nl = { class: "flex flex-row flex-wrap gap-2" }, xl = { class: "inline-fle
27109
27113
  (j0(!0), O1(pe, null, Tt(Mr.value[U0], (m0) => (j0(), O1(pe, {
27110
27114
  key: m0.value
27111
27115
  }, [
27112
- m0.label && m0.label.length > 110 ? (j0(), F1(h0, {
27116
+ m0.label && m0.label.length > 110 ? (j0(), F1(S0, {
27113
27117
  key: 0,
27114
27118
  placement: "right",
27115
27119
  "hide-arrow": !0,
@@ -27172,7 +27176,7 @@ const Nl = { class: "flex flex-row flex-wrap gap-2" }, xl = { class: "inline-fle
27172
27176
  labelPlacement: "right",
27173
27177
  "onUpdate:modelValue": () => sa(t0)
27174
27178
  }, null, 8, ["model-value", "label", "onUpdate:modelValue"]),
27175
- J0(h0, {
27179
+ J0(S0, {
27176
27180
  placement: "top",
27177
27181
  "z-index": 2e3
27178
27182
  }, {
@@ -27213,7 +27217,7 @@ const Nl = { class: "flex flex-row flex-wrap gap-2" }, xl = { class: "inline-fle
27213
27217
  _: 2
27214
27218
  }, 1032, ["open"]))
27215
27219
  ]))), 128)),
27216
- vr(S.$slots, "default")
27220
+ vr(h.$slots, "default")
27217
27221
  ]);
27218
27222
  };
27219
27223
  }
@@ -27237,7 +27241,7 @@ export {
27237
27241
  sp as m,
27238
27242
  ml as q,
27239
27243
  up as r,
27240
- hl as s,
27244
+ Sl as s,
27241
27245
  xr as t,
27242
27246
  kn as u
27243
27247
  };