@kong-ui-public/dashboard-renderer 8.18.27 → 8.18.28

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.
@@ -1,6 +1,6 @@
1
- import { defineComponent as _e, computed as T, openBlock as M, createElementBlock as se, renderSlot as Xe, createTextVNode as Ke, toDisplayString as ae, createVNode as ve, withCtx as X, inject as qe, provide as as, toRaw as ls, isRef as us, isReactive as cs, toRef as st, hasInjectionContext as Qt, ref as V, onMounted as Rt, watch as Je, onUnmounted as lt, getCurrentInstance as ds, readonly as Lt, resolveComponent as be, withKeys as hs, unref as O, createElementVNode as me, createCommentVNode as ge, createBlock as Q, watchEffect as Fi, createSlots as kt, normalizeStyle as gt, normalizeClass as et, mergeProps as Ui, normalizeProps as fs, guardReactiveProps as ms, defineAsyncComponent as $i, Fragment as Ht, useCssVars as Ft, useModel as Bi, nextTick as Ut, resolveDynamicComponent as Wi, toHandlers as ps, mergeModels as yt, renderList as Gi, useTemplateRef as Vt } from "vue";
1
+ import { defineComponent as ye, computed as T, openBlock as N, createElementBlock as ne, renderSlot as Xe, createTextVNode as Ke, toDisplayString as le, createVNode as ge, withCtx as j, inject as Pe, provide as as, toRaw as ls, isRef as us, isReactive as cs, toRef as st, hasInjectionContext as Qt, ref as X, onMounted as Rt, watch as Je, onUnmounted as lt, getCurrentInstance as ds, readonly as Lt, resolveComponent as _e, withKeys as hs, unref as O, createElementVNode as he, createCommentVNode as pe, createBlock as K, watchEffect as Fi, createSlots as kt, normalizeStyle as gt, normalizeClass as et, mergeProps as Ui, normalizeProps as fs, guardReactiveProps as ms, defineAsyncComponent as $i, Fragment as Ht, useCssVars as Ft, useModel as Bi, nextTick as Ut, resolveDynamicComponent as Wi, toHandlers as ps, mergeModels as yt, renderList as Gi, useTemplateRef as Vt } from "vue";
2
2
  import { isPlatformDatasource as $t, msToGranularity as It, requestFilterTypeEmptyV2 as gs, restoreAfterCapture as Zt, prepareForCapture as ys, formatTimestamp as Jt, EXPORT_RECORD_LIMIT as Yi, TimePeriods as vs, TIMEFRAME_LOOKUP as _s, formatTime as ei } from "@kong-ui-public/analytics-utilities";
3
- import { InfoIcon as bs, VisibilityOffIcon as ws, WarningOutlineIcon as xs, WarningIcon as Es, ProgressIcon as Cs, RefreshIcon as Rs, EditIcon as ks, MoreIcon as Ts } from "@kong/icons";
3
+ import { InfoIcon as ws, VisibilityOffIcon as bs, WarningOutlineIcon as xs, WarningIcon as Es, ProgressIcon as Cs, RefreshIcon as Rs, EditIcon as ks, MoreIcon as Ts } from "@kong/icons";
4
4
  import { createI18n as Ss, i18nTComponent as Ds } from "@kong-ui-public/i18n";
5
5
  import { useAnalyticsConfigStore as Bt, useDatasourceConfigStore as ut } from "@kong-ui-public/analytics-config-store";
6
6
  import { handleQueryError as Os, SimpleChart as zs, AnalyticsChart as Ns, TopNTable as Ms } from "@kong-ui-public/analytics-chart";
@@ -464,7 +464,7 @@ function ii(n) {
464
464
  );
465
465
  return t.setUTCFullYear(e.getFullYear()), +n - +t;
466
466
  }
467
- function bn(n, ...e) {
467
+ function wn(n, ...e) {
468
468
  const t = Be.bind(
469
469
  null,
470
470
  e.find((i) => typeof i == "object")
@@ -475,8 +475,8 @@ function si(n, e) {
475
475
  const t = Ae(n, e?.in);
476
476
  return t.setHours(0, 0, 0, 0), t;
477
477
  }
478
- function wn(n, e, t) {
479
- const [i, s] = bn(
478
+ function bn(n, e, t) {
479
+ const [i, s] = wn(
480
480
  t?.in,
481
481
  n,
482
482
  e
@@ -489,7 +489,7 @@ function xn(n, e) {
489
489
  }
490
490
  function En(n, e) {
491
491
  const t = Ae(n, e?.in);
492
- return wn(t, xn(t)) + 1;
492
+ return bn(t, xn(t)) + 1;
493
493
  }
494
494
  function nt(n, e) {
495
495
  const t = ct(), i = e?.weekStartsOn ?? e?.locale?.options?.weekStartsOn ?? t.weekStartsOn ?? t.locale?.options?.weekStartsOn ?? 0, s = Ae(n, e?.in), r = s.getDay(), o = (r < i ? 7 : 0) + r - i;
@@ -1668,7 +1668,7 @@ function _i(n, e, t = {}) {
1668
1668
  }
1669
1669
  return Wn(n, e, t);
1670
1670
  }
1671
- const qt = "#6c7489", br = "12px", wr = "16px", bi = "20px", wi = "32px", es = "20px";
1671
+ const qt = "#6c7489", wr = "12px", br = "16px", wi = "20px", bi = "32px", es = "20px";
1672
1672
  var ft = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
1673
1673
  function xr(n) {
1674
1674
  return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
@@ -1726,12 +1726,12 @@ function Cr() {
1726
1726
  }
1727
1727
  } : function(l, u, d, h) {
1728
1728
  if (h = h || open("", "_blank"), h && (h.document.title = h.document.body.innerText = "downloading..."), typeof l == "string") return i(l, u, d);
1729
- var y = l.type === "application/octet-stream", v = /constructor/i.test(o.HTMLElement) || o.safari, x = /CriOS\/[\d]+/.test(navigator.userAgent);
1730
- if ((x || y && v || a) && typeof FileReader < "u") {
1729
+ var y = l.type === "application/octet-stream", v = /constructor/i.test(o.HTMLElement) || o.safari, w = /CriOS\/[\d]+/.test(navigator.userAgent);
1730
+ if ((w || y && v || a) && typeof FileReader < "u") {
1731
1731
  var _ = new FileReader();
1732
1732
  _.onloadend = function() {
1733
1733
  var C = _.result;
1734
- C = x ? C : C.replace(/^data:[^;]*;/, "data:attachment/file;"), h ? h.location.href = C : location = C, h = null;
1734
+ C = w ? C : C.replace(/^data:[^;]*;/, "data:attachment/file;"), h ? h.location.href = C : location = C, h = null;
1735
1735
  }, _.readAsDataURL(l);
1736
1736
  } else {
1737
1737
  var I = o.URL || o.webkitURL, S = I.createObjectURL(l);
@@ -1751,35 +1751,38 @@ function Tr() {
1751
1751
  ((t, i) => {
1752
1752
  n.exports = i();
1753
1753
  })(kr, function t() {
1754
- var i = typeof self < "u" ? self : typeof window < "u" ? window : i !== void 0 ? i : {}, s, r = !i.document && !!i.postMessage, o = i.IS_PAPA_WORKER || !1, a = {}, c = 0, l = {};
1755
- function u(f) {
1756
- this._handle = null, this._finished = !1, this._completed = !1, this._halted = !1, this._input = null, this._baseIndex = 0, this._partialLine = "", this._rowCount = 0, this._start = 0, this._nextChunk = null, this.isFirstChunk = !0, this._completeResults = { data: [], errors: [], meta: {} }, (function(m) {
1757
- var g = A(m);
1758
- g.chunkSize = parseInt(g.chunkSize), m.step || m.chunk || (g.chunkSize = null), this._handle = new x(g), (this._handle.streamer = this)._config = g;
1759
- }).call(this, f), this.parseChunk = function(m, g) {
1754
+ var i = typeof self < "u" ? self : typeof window < "u" ? window : i !== void 0 ? i : {}, s = !i.document && !!i.postMessage, r = i.IS_PAPA_WORKER || !1, o = {}, a = 0, c = {};
1755
+ function l(m) {
1756
+ return m.charCodeAt(0) === 65279 ? m.slice(1) : m;
1757
+ }
1758
+ function u(m) {
1759
+ this._handle = null, this._finished = !1, this._completed = !1, this._halted = !1, this._input = null, this._baseIndex = 0, this._partialLine = "", this._rowCount = 0, this._start = 0, this._nextChunk = null, this.isFirstChunk = !0, this._completeResults = { data: [], errors: [], meta: {} }, (function(f) {
1760
+ var g = M(f);
1761
+ g.chunkSize = parseInt(g.chunkSize), f.step || f.chunk || (g.chunkSize = null), this._handle = new w(g), (this._handle.streamer = this)._config = g;
1762
+ }).call(this, m), this.parseChunk = function(f, g) {
1760
1763
  var b = parseInt(this._config.skipFirstNLines) || 0;
1761
1764
  if (this.isFirstChunk && 0 < b) {
1762
- let N = this._config.newline;
1763
- N || (w = this._config.quoteChar || '"', N = this._handle.guessLineEndings(m, w)), m = [...m.split(N).slice(b)].join(N);
1765
+ let L = this._config.newline;
1766
+ L || (x = this._config.quoteChar || '"', L = this._handle.guessLineEndings(f, x)), f = [...f.split(L).slice(b)].join(L);
1764
1767
  }
1765
- this.isFirstChunk && G(this._config.beforeFirstChunk) && (w = this._config.beforeFirstChunk(m)) !== void 0 && (m = w), this.isFirstChunk = !1, this._halted = !1;
1766
- var b = this._partialLine + m, w = (this._partialLine = "", this._handle.parse(b, this._baseIndex, !this._finished));
1768
+ this.isFirstChunk && Q(this._config.beforeFirstChunk) && (x = this._config.beforeFirstChunk(f)) !== void 0 && (f = x), this.isFirstChunk = !1, this._halted = !1;
1769
+ var b = this._partialLine + f, x = (this._partialLine = "", this._handle.parse(b, this._baseIndex, !this._finished));
1767
1770
  if (!this._handle.paused() && !this._handle.aborted()) {
1768
- if (m = w.meta.cursor, b = (this._finished || (this._partialLine = b.substring(m - this._baseIndex), this._baseIndex = m), w && w.data && (this._rowCount += w.data.length), this._finished || this._config.preview && this._rowCount >= this._config.preview), o) i.postMessage({ results: w, workerId: l.WORKER_ID, finished: b });
1769
- else if (G(this._config.chunk) && !g) {
1770
- if (this._config.chunk(w, this._handle), this._handle.paused() || this._handle.aborted()) return void (this._halted = !0);
1771
- this._completeResults = w = void 0;
1771
+ if (f = x.meta.cursor, b = (this._finished || (this._partialLine = b.substring(f - this._baseIndex), this._baseIndex = f), x && x.data && (this._rowCount += x.data.length), this._finished || this._config.preview && this._rowCount >= this._config.preview), r) i.postMessage({ results: x, workerId: c.WORKER_ID, finished: b });
1772
+ else if (Q(this._config.chunk) && !g) {
1773
+ if (this._config.chunk(x, this._handle), this._handle.paused() || this._handle.aborted()) return void (this._halted = !0);
1774
+ this._completeResults = x = void 0;
1772
1775
  }
1773
- return this._config.step || this._config.chunk || (this._completeResults.data = this._completeResults.data.concat(w.data), this._completeResults.errors = this._completeResults.errors.concat(w.errors), this._completeResults.meta = w.meta), this._completed || !b || !G(this._config.complete) || w && w.meta.aborted || (this._config.complete(this._completeResults, this._input), this._completed = !0), b || w && w.meta.paused || this._nextChunk(), w;
1776
+ return this._config.step || this._config.chunk || (this._completeResults.data = this._completeResults.data.concat(x.data), this._completeResults.errors = this._completeResults.errors.concat(x.errors), this._completeResults.meta = x.meta), this._completed || !b || !Q(this._config.complete) || x && x.meta.aborted || (this._config.complete(this._completeResults, this._input), this._completed = !0), b || x && x.meta.paused || this._nextChunk(), x;
1774
1777
  }
1775
1778
  this._halted = !0;
1776
- }, this._sendError = function(m) {
1777
- G(this._config.error) ? this._config.error(m) : o && this._config.error && i.postMessage({ workerId: l.WORKER_ID, error: m, finished: !1 });
1779
+ }, this._sendError = function(f) {
1780
+ Q(this._config.error) ? this._config.error(f) : r && this._config.error && i.postMessage({ workerId: c.WORKER_ID, error: f, finished: !1 });
1778
1781
  };
1779
1782
  }
1780
- function d(f) {
1781
- var m;
1782
- (f = f || {}).chunkSize || (f.chunkSize = l.RemoteChunkSize), u.call(this, f), this._nextChunk = r ? function() {
1783
+ function d(m) {
1784
+ var f;
1785
+ (m = m || {}).chunkSize || (m.chunkSize = c.RemoteChunkSize), u.call(this, m), this._nextChunk = s ? function() {
1783
1786
  this._readChunk(), this._chunkLoaded();
1784
1787
  } : function() {
1785
1788
  this._readChunk();
@@ -1788,140 +1791,142 @@ function Tr() {
1788
1791
  }, this._readChunk = function() {
1789
1792
  if (this._finished) this._chunkLoaded();
1790
1793
  else {
1791
- if (m = new XMLHttpRequest(), this._config.withCredentials && (m.withCredentials = this._config.withCredentials), r || (m.onload = ie(this._chunkLoaded, this), m.onerror = ie(this._chunkError, this)), m.open(this._config.downloadRequestBody ? "POST" : "GET", this._input, !r), this._config.downloadRequestHeaders) {
1794
+ if (f = new XMLHttpRequest(), this._config.withCredentials && (f.withCredentials = this._config.withCredentials), s || (f.onload = ie(this._chunkLoaded, this), f.onerror = ie(this._chunkError, this)), f.ontimeout = ie(this._chunkTimeout, this), f.open(this._config.downloadRequestBody ? "POST" : "GET", this._input, !s), this._config.downloadTimeout && !s && (f.timeout = this._config.downloadTimeout), this._config.downloadRequestHeaders) {
1792
1795
  var g, b = this._config.downloadRequestHeaders;
1793
- for (g in b) m.setRequestHeader(g, b[g]);
1796
+ for (g in b) f.setRequestHeader(g, b[g]);
1794
1797
  }
1795
- var w;
1796
- this._config.chunkSize && (w = this._start + this._config.chunkSize - 1, m.setRequestHeader("Range", "bytes=" + this._start + "-" + w));
1798
+ var x;
1799
+ this._config.chunkSize && (x = this._start + this._config.chunkSize - 1, f.setRequestHeader("Range", "bytes=" + this._start + "-" + x));
1797
1800
  try {
1798
- m.send(this._config.downloadRequestBody);
1799
- } catch (N) {
1800
- this._chunkError(N.message);
1801
+ f.send(this._config.downloadRequestBody);
1802
+ } catch (L) {
1803
+ this._chunkError(L.message);
1801
1804
  }
1802
- r && m.status === 0 && this._chunkError();
1805
+ s && f.status === 0 && this._chunkError();
1803
1806
  }
1804
1807
  }, this._chunkLoaded = function() {
1805
- m.readyState === 4 && (m.status < 200 || 400 <= m.status ? this._chunkError() : (this._start += this._config.chunkSize || m.responseText.length, this._finished = !this._config.chunkSize || this._start >= ((g) => (g = g.getResponseHeader("Content-Range")) !== null ? parseInt(g.substring(g.lastIndexOf("/") + 1)) : -1)(m), this.parseChunk(m.responseText)));
1808
+ f.readyState === 4 && (f.status < 200 || 400 <= f.status ? this._chunkError() : (this._start += this._config.chunkSize || f.responseText.length, this._finished = !this._config.chunkSize || this._start >= ((g) => (g = g.getResponseHeader("Content-Range")) !== null ? parseInt(g.substring(g.lastIndexOf("/") + 1)) : -1)(f), this.parseChunk(f.responseText)));
1806
1809
  }, this._chunkError = function(g) {
1807
- g = m.statusText || g, this._sendError(new Error(g));
1810
+ g = f.statusText || g, this._sendError(new Error(g));
1811
+ }, this._chunkTimeout = function() {
1812
+ this._chunkError("Request timed out after " + this._config.downloadTimeout + "ms");
1808
1813
  };
1809
1814
  }
1810
- function h(f) {
1811
- (f = f || {}).chunkSize || (f.chunkSize = l.LocalChunkSize), u.call(this, f);
1812
- var m, g, b = typeof FileReader < "u";
1813
- this.stream = function(w) {
1814
- this._input = w, g = w.slice || w.webkitSlice || w.mozSlice, b ? ((m = new FileReader()).onload = ie(this._chunkLoaded, this), m.onerror = ie(this._chunkError, this)) : m = new FileReaderSync(), this._nextChunk();
1815
+ function h(m) {
1816
+ (m = m || {}).chunkSize || (m.chunkSize = c.LocalChunkSize), u.call(this, m);
1817
+ var f, g, b = typeof FileReader < "u";
1818
+ this.stream = function(x) {
1819
+ this._input = x, g = x.slice || x.webkitSlice || x.mozSlice, b ? ((f = new FileReader()).onload = ie(this._chunkLoaded, this), f.onerror = ie(this._chunkError, this)) : f = new FileReaderSync(), this._nextChunk();
1815
1820
  }, this._nextChunk = function() {
1816
1821
  this._finished || this._config.preview && !(this._rowCount < this._config.preview) || this._readChunk();
1817
1822
  }, this._readChunk = function() {
1818
- var w = this._input, N = (this._config.chunkSize && (N = Math.min(this._start + this._config.chunkSize, this._input.size), w = g.call(w, this._start, N)), m.readAsText(w, this._config.encoding));
1819
- b || this._chunkLoaded({ target: { result: N } });
1820
- }, this._chunkLoaded = function(w) {
1821
- this._start += this._config.chunkSize, this._finished = !this._config.chunkSize || this._start >= this._input.size, this.parseChunk(w.target.result);
1823
+ var x = this._input, L = (this._config.chunkSize && (L = Math.min(this._start + this._config.chunkSize, this._input.size), x = g.call(x, this._start, L)), f.readAsText(x, this._config.encoding));
1824
+ b || this._chunkLoaded({ target: { result: L } });
1825
+ }, this._chunkLoaded = function(x) {
1826
+ this._start += this._config.chunkSize, this._finished = !this._config.chunkSize || this._start >= this._input.size, this.parseChunk(x.target.result);
1822
1827
  }, this._chunkError = function() {
1823
- this._sendError(m.error);
1828
+ this._sendError(f.error);
1824
1829
  };
1825
1830
  }
1826
- function y(f) {
1827
- var m;
1828
- u.call(this, f = f || {}), this.stream = function(g) {
1829
- return m = g, this._nextChunk();
1831
+ function y(m) {
1832
+ var f;
1833
+ u.call(this, m = m || {}), this.stream = function(g) {
1834
+ return f = g, this._nextChunk();
1830
1835
  }, this._nextChunk = function() {
1831
1836
  var g, b;
1832
- if (!this._finished) return g = this._config.chunkSize, m = g ? (b = m.substring(0, g), m.substring(g)) : (b = m, ""), this._finished = !m, this.parseChunk(b);
1837
+ if (!this._finished) return g = this._config.chunkSize, f = g ? (b = f.substring(0, g), f.substring(g)) : (b = f, ""), this._finished = !f, this.parseChunk(b);
1833
1838
  };
1834
1839
  }
1835
- function v(f) {
1836
- u.call(this, f = f || {});
1837
- var m = [], g = !0, b = !1;
1840
+ function v(m) {
1841
+ u.call(this, m = m || {});
1842
+ var f = [], g = !0, b = !1;
1838
1843
  this.pause = function() {
1839
1844
  u.prototype.pause.apply(this, arguments), this._input.pause();
1840
1845
  }, this.resume = function() {
1841
1846
  u.prototype.resume.apply(this, arguments), this._input.resume();
1842
- }, this.stream = function(w) {
1843
- this._input = w, this._input.on("data", this._streamData), this._input.on("end", this._streamEnd), this._input.on("error", this._streamError);
1847
+ }, this.stream = function(x) {
1848
+ this._input = x, this._input.on("data", this._streamData), this._input.on("end", this._streamEnd), this._input.on("error", this._streamError);
1844
1849
  }, this._checkIsFinished = function() {
1845
- b && m.length === 1 && (this._finished = !0);
1850
+ b && f.length === 1 && (this._finished = !0);
1846
1851
  }, this._nextChunk = function() {
1847
- this._checkIsFinished(), m.length ? this.parseChunk(m.shift()) : g = !0;
1848
- }, this._streamData = ie(function(w) {
1852
+ this._checkIsFinished(), f.length ? this.parseChunk(f.shift()) : g = !0;
1853
+ }, this._streamData = ie(function(x) {
1849
1854
  try {
1850
- m.push(typeof w == "string" ? w : w.toString(this._config.encoding)), g && (g = !1, this._checkIsFinished(), this.parseChunk(m.shift()));
1851
- } catch (N) {
1852
- this._streamError(N);
1855
+ f.push(typeof x == "string" ? x : x.toString(this._config.encoding)), g && (g = !1, this._checkIsFinished(), this.parseChunk(f.shift()));
1856
+ } catch (L) {
1857
+ this._streamError(L);
1853
1858
  }
1854
- }, this), this._streamError = ie(function(w) {
1855
- this._streamCleanUp(), this._sendError(w);
1859
+ }, this), this._streamError = ie(function(x) {
1860
+ this._streamCleanUp(), this._sendError(x);
1856
1861
  }, this), this._streamEnd = ie(function() {
1857
1862
  this._streamCleanUp(), b = !0, this._streamData("");
1858
1863
  }, this), this._streamCleanUp = ie(function() {
1859
1864
  this._input.removeListener("data", this._streamData), this._input.removeListener("end", this._streamEnd), this._input.removeListener("error", this._streamError);
1860
1865
  }, this);
1861
1866
  }
1862
- function x(f) {
1863
- var m, g, b, w, N = Math.pow(2, 53), Z = -N, pe = /^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/, le = /^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/, $ = this, R = 0, E = 0, q = !1, k = !1, L = [], z = { data: [], errors: [], meta: {} };
1864
- function de(W) {
1865
- return f.skipEmptyLines === "greedy" ? W.join("").trim() === "" : W.length === 1 && W[0].length === 0;
1867
+ function w(m) {
1868
+ var f, g, b, x, L = Math.pow(2, 53), re = -L, ve = /^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/, de = /^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/, V = this, R = 0, E = 0, F = !1, k = !1, A = [], z = { data: [], errors: [], meta: {} };
1869
+ function we(W) {
1870
+ return m.skipEmptyLines === "greedy" ? W.join("").trim() === "" : W.length === 1 && W[0].length === 0;
1866
1871
  }
1867
- function he() {
1868
- if (z && b && (we("Delimiter", "UndetectableDelimiter", "Unable to auto-detect delimiting character; defaulted to '" + l.DefaultDelimiter + "'"), b = !1), f.skipEmptyLines && (z.data = z.data.filter(function(F) {
1869
- return !de(F);
1870
- })), ne()) {
1871
- let F = function(ce, fe) {
1872
- G(f.transformHeader) && (ce = f.transformHeader(ce, fe)), L.push(ce);
1872
+ function se() {
1873
+ if (z && b && (be("Delimiter", "UndetectableDelimiter", "Unable to auto-detect delimiting character; defaulted to '" + c.DefaultDelimiter + "'"), b = !1), m.skipEmptyLines && (z.data = z.data.filter(function(H) {
1874
+ return !we(H);
1875
+ })), Z()) {
1876
+ let H = function(ce) {
1877
+ A.push(ce);
1873
1878
  };
1874
1879
  if (z) if (Array.isArray(z.data[0])) {
1875
- for (var W = 0; ne() && W < z.data.length; W++) z.data[W].forEach(F);
1880
+ for (var W = 0; Z() && W < z.data.length; W++) z.data[W].forEach(H);
1876
1881
  z.data.splice(0, 1);
1877
- } else z.data.forEach(F);
1882
+ } else z.data.forEach(H);
1878
1883
  }
1879
- function K(F, ce) {
1880
- for (var fe = f.header ? {} : [], J = 0; J < F.length; J++) {
1881
- var te = J, Y = F[J], Y = ((Te, B) => ((re) => (f.dynamicTypingFunction && f.dynamicTyping[re] === void 0 && (f.dynamicTyping[re] = f.dynamicTypingFunction(re)), (f.dynamicTyping[re] || f.dynamicTyping) === !0))(Te) ? B === "true" || B === "TRUE" || B !== "false" && B !== "FALSE" && (((re) => {
1882
- if (pe.test(re) && (re = parseFloat(re), Z < re && re < N))
1884
+ function B(H, ce) {
1885
+ for (var fe = m.header ? {} : [], J = 0; J < H.length; J++) {
1886
+ var te = J, G = H[J], G = ((Te, $) => ((oe) => (m.dynamicTypingFunction && m.dynamicTyping[oe] === void 0 && (m.dynamicTyping[oe] = m.dynamicTypingFunction(oe)), (m.dynamicTyping[oe] || m.dynamicTyping) === !0))(Te) ? $ === "true" || $ === "TRUE" || $ !== "false" && $ !== "FALSE" && (((oe) => {
1887
+ if (ve.test(oe) && (oe = parseFloat(oe), re < oe && oe < L))
1883
1888
  return 1;
1884
- })(B) ? parseFloat(B) : le.test(B) ? new Date(B) : B === "" ? null : B) : B)(te = f.header ? J >= L.length ? "__parsed_extra" : L[J] : te, Y = f.transform ? f.transform(Y, te) : Y);
1885
- te === "__parsed_extra" ? (fe[te] = fe[te] || [], fe[te].push(Y)) : fe[te] = Y;
1889
+ })($) ? parseFloat($) : de.test($) ? new Date($) : $ === "" ? null : $) : $)(te = m.header ? J >= A.length ? "__parsed_extra" : A[J] : te, G = m.transform ? m.transform(G, te) : G);
1890
+ te === "__parsed_extra" ? (fe[te] = fe[te] || [], fe[te].push(G)) : fe[te] = G;
1886
1891
  }
1887
- return f.header && (J > L.length ? we("FieldMismatch", "TooManyFields", "Too many fields: expected " + L.length + " fields but parsed " + J, E + ce) : J < L.length && we("FieldMismatch", "TooFewFields", "Too few fields: expected " + L.length + " fields but parsed " + J, E + ce)), fe;
1892
+ return m.header && (J > A.length ? be("FieldMismatch", "TooManyFields", "Too many fields: expected " + A.length + " fields but parsed " + J, E + ce) : J < A.length && be("FieldMismatch", "TooFewFields", "Too few fields: expected " + A.length + " fields but parsed " + J, E + ce)), fe;
1888
1893
  }
1889
1894
  var ue;
1890
- z && (f.header || f.dynamicTyping || f.transform) && (ue = 1, !z.data.length || Array.isArray(z.data[0]) ? (z.data = z.data.map(K), ue = z.data.length) : z.data = K(z.data, 0), f.header && z.meta && (z.meta.fields = L), E += ue);
1895
+ z && (m.header || m.dynamicTyping || m.transform) && (ue = 1, !z.data.length || Array.isArray(z.data[0]) ? (z.data = z.data.map(B), ue = z.data.length) : z.data = B(z.data, 0), m.header && z.meta && (z.meta.fields = A), E += ue);
1891
1896
  }
1892
- function ne() {
1893
- return f.header && L.length === 0;
1897
+ function Z() {
1898
+ return m.header && A.length === 0;
1894
1899
  }
1895
- function we(W, K, ue, F) {
1896
- W = { type: W, code: K, message: ue }, F !== void 0 && (W.row = F), z.errors.push(W);
1900
+ function be(W, B, ue, H) {
1901
+ W = { type: W, code: B, message: ue }, H !== void 0 && (W.row = H), z.errors.push(W);
1897
1902
  }
1898
- G(f.step) && (w = f.step, f.step = function(W) {
1899
- z = W, ne() ? he() : (he(), z.data.length !== 0 && (R += W.data.length, f.preview && R > f.preview ? g.abort() : (z.data = z.data[0], w(z, $))));
1900
- }), this.parse = function(W, K, ue) {
1901
- var F = f.quoteChar || '"', F = (f.newline || (f.newline = this.guessLineEndings(W, F)), b = !1, f.delimiter ? G(f.delimiter) && (f.delimiter = f.delimiter(W), z.meta.delimiter = f.delimiter) : ((F = ((ce, fe, J, te, Y) => {
1902
- var Te, B, re, Le;
1903
- Y = Y || [",", " ", "|", ";", l.RECORD_SEP, l.UNIT_SEP];
1904
- for (var He = 0; He < Y.length; He++) {
1905
- for (var De, Ge = Y[He], ye = 0, Oe = 0, D = 0, U = (re = void 0, new I({ comments: te, delimiter: Ge, newline: fe, preview: 10 }).parse(ce)), oe = 0; oe < U.data.length; oe++) J && de(U.data[oe]) ? D++ : (De = U.data[oe].length, Oe += De, re === void 0 ? re = De : 0 < De && (ye += Math.abs(De - re), re = De));
1906
- 0 < U.data.length && (Oe /= U.data.length - D), (B === void 0 || ye <= B) && (Le === void 0 || Le < Oe) && 1.99 < Oe && (B = ye, Te = Ge, Le = Oe);
1903
+ Q(m.step) && (x = m.step, m.step = function(W) {
1904
+ z = W, Z() ? se() : (se(), z.data.length !== 0 && (R += W.data.length, m.preview && R > m.preview ? g.abort() : (z.data = z.data[0], x(z, V))));
1905
+ }), this.parse = function(W, B, ue) {
1906
+ var H = m.quoteChar || '"', H = (m.newline || (m.newline = this.guessLineEndings(W, H)), b = !1, m.delimiter ? Q(m.delimiter) && (m.delimiter = m.delimiter(W), z.meta.delimiter = m.delimiter) : ((H = ((ce, fe, J, te, G) => {
1907
+ var Te, $, oe, qe;
1908
+ G = G || [",", " ", "|", ";", c.RECORD_SEP, c.UNIT_SEP];
1909
+ for (var He = 0; He < G.length; He++) {
1910
+ for (var De, Ge = G[He], me = 0, Oe = 0, D = 0, U = (oe = void 0, new I({ comments: te, delimiter: Ge, newline: fe, preview: 10 }).parse(ce)), ae = 0; ae < U.data.length; ae++) J && we(U.data[ae]) ? D++ : (De = U.data[ae].length, Oe += De, oe === void 0 ? oe = De : 0 < De && (me += Math.abs(De - oe), oe = De));
1911
+ 0 < U.data.length && (Oe /= U.data.length - D), 1.99 < Oe && ($ === void 0 || me < $ || me === $ && qe < Oe) && ($ = me, Te = Ge, qe = Oe);
1907
1912
  }
1908
- return { successful: !!(f.delimiter = Te), bestDelimiter: Te };
1909
- })(W, f.newline, f.skipEmptyLines, f.comments, f.delimitersToGuess)).successful ? f.delimiter = F.bestDelimiter : (b = !0, f.delimiter = l.DefaultDelimiter), z.meta.delimiter = f.delimiter), A(f));
1910
- return f.preview && f.header && F.preview++, m = W, g = new I(F), z = g.parse(m, K, ue), he(), q ? { meta: { paused: !0 } } : z || { meta: { paused: !1 } };
1913
+ return { successful: !!(m.delimiter = Te), bestDelimiter: Te };
1914
+ })(W, m.newline, m.skipEmptyLines, m.comments, m.delimitersToGuess)).successful ? m.delimiter = H.bestDelimiter : (b = !0, m.delimiter = c.DefaultDelimiter), z.meta.delimiter = m.delimiter), M(m));
1915
+ return H.header = Z(), m.preview && m.header && H.preview++, f = W, g = new I(H), z = g.parse(f, B, ue), se(), F ? { meta: { paused: !0 } } : z || { meta: { paused: !1 } };
1911
1916
  }, this.paused = function() {
1912
- return q;
1917
+ return F;
1913
1918
  }, this.pause = function() {
1914
- q = !0, g.abort(), m = G(f.chunk) ? "" : m.substring(g.getCharIndex());
1919
+ F = !0, g.abort(), f = Q(m.chunk) ? "" : f.substring(g.getCharIndex());
1915
1920
  }, this.resume = function() {
1916
- $.streamer._halted ? (q = !1, $.streamer.parseChunk(m, !0)) : setTimeout($.resume, 3);
1921
+ V.streamer._halted ? (F = !1, V.streamer.parseChunk(f, !0)) : setTimeout(V.resume, 3);
1917
1922
  }, this.aborted = function() {
1918
1923
  return k;
1919
1924
  }, this.abort = function() {
1920
- k = !0, g.abort(), z.meta.aborted = !0, G(f.complete) && f.complete(z), m = "";
1921
- }, this.guessLineEndings = function(ce, F) {
1925
+ k = !0, g.abort(), z.meta.aborted = !0, Q(m.complete) && m.complete(z), f = "";
1926
+ }, this.guessLineEndings = function(ce, H) {
1922
1927
  ce = ce.substring(0, 1048576);
1923
- var F = new RegExp(_(F) + "([^]*?)" + _(F), "gm"), ue = (ce = ce.replace(F, "")).split("\r"), F = ce.split(`
1924
- `), ce = 1 < F.length && F[0].length < ue[0].length;
1928
+ var H = new RegExp(_(H) + "([^]*?)" + _(H), "gm"), ue = (ce = ce.replace(H, "")).split("\r"), H = ce.split(`
1929
+ `), ce = 1 < H.length && H[0].length < ue[0].length;
1925
1930
  if (ue.length === 1 || ce) return `
1926
1931
  `;
1927
1932
  for (var fe = 0, J = 0; J < ue.length; J++) ue[J][0] === `
@@ -1930,234 +1935,212 @@ function Tr() {
1930
1935
  ` : "\r";
1931
1936
  };
1932
1937
  }
1933
- function _(f) {
1934
- return f.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
1938
+ function _(m) {
1939
+ return m.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
1935
1940
  }
1936
- function I(f) {
1937
- var m = (f = f || {}).delimiter, g = f.newline, b = f.comments, w = f.step, N = f.preview, Z = f.fastMode, pe = null, le = !1, $ = f.quoteChar == null ? '"' : f.quoteChar, R = $;
1938
- if (f.escapeChar !== void 0 && (R = f.escapeChar), (typeof m != "string" || -1 < l.BAD_DELIMITERS.indexOf(m)) && (m = ","), b === m) throw new Error("Comment character same as delimiter");
1939
- b === !0 ? b = "#" : (typeof b != "string" || -1 < l.BAD_DELIMITERS.indexOf(b)) && (b = !1), g !== `
1941
+ function I(m) {
1942
+ var f = (m = m || {}).delimiter, g = m.newline, b = m.comments, x = m.step, L = m.preview, re = m.fastMode, ve = null, de = !1, V = m.quoteChar == null ? '"' : m.quoteChar, R = V;
1943
+ if (m.escapeChar !== void 0 && (R = m.escapeChar), (typeof f != "string" || -1 < c.BAD_DELIMITERS.indexOf(f)) && (f = ","), b === f) throw new Error("Comment character same as delimiter");
1944
+ b === !0 ? b = "#" : (typeof b != "string" || -1 < c.BAD_DELIMITERS.indexOf(b)) && (b = !1), g !== `
1940
1945
  ` && g !== "\r" && g !== `\r
1941
1946
  ` && (g = `
1942
1947
  `);
1943
- var E = 0, q = !1;
1944
- this.parse = function(k, L, z) {
1948
+ var E = 0, F = !1;
1949
+ this.parse = function(k, A, z) {
1945
1950
  if (typeof k != "string") throw new Error("Input must be a string");
1946
- var de = k.length, he = m.length, ne = g.length, we = b.length, W = G(w), K = [], ue = [], F = [], ce = E = 0;
1947
- if (!k) return ye();
1948
- if (Z || Z !== !1 && k.indexOf($) === -1) {
1951
+ var we = k.length, se = f.length, Z = g.length, be = b.length, W = Q(x), B = [], ue = [], H = [], ce = E = 0;
1952
+ if (!k) return me();
1953
+ if (re || re !== !1 && k.indexOf(V) === -1) {
1949
1954
  for (var fe = k.split(g), J = 0; J < fe.length; J++) {
1950
- if (F = fe[J], E += F.length, J !== fe.length - 1) E += g.length;
1951
- else if (z) return ye();
1952
- if (!b || F.substring(0, we) !== b) {
1955
+ if (H = fe[J], E += H.length, J !== fe.length - 1) E += g.length;
1956
+ else if (z) return me();
1957
+ if (!b || H.substring(0, be) !== b) {
1953
1958
  if (W) {
1954
- if (K = [], Le(F.split(m)), Oe(), q) return ye();
1955
- } else Le(F.split(m));
1956
- if (N && N <= J) return K = K.slice(0, N), ye(!0);
1959
+ if (B = [], qe(H.split(f)), Oe(), F) return me();
1960
+ } else qe(H.split(f));
1961
+ if (L && L <= J) return B = B.slice(0, L), me(!0);
1957
1962
  }
1958
1963
  }
1959
- return ye();
1964
+ return me();
1960
1965
  }
1961
- for (var te = k.indexOf(m, E), Y = k.indexOf(g, E), Te = new RegExp(_(R) + _($), "g"), B = k.indexOf($, E); ; ) if (k[E] === $) for (B = E, E++; ; ) {
1962
- if ((B = k.indexOf($, B + 1)) === -1) return z || ue.push({ type: "Quotes", code: "MissingQuotes", message: "Quoted field unterminated", row: K.length, index: E }), De();
1963
- if (B === de - 1) return De(k.substring(E, B).replace(Te, $));
1964
- if ($ === R && k[B + 1] === R) B++;
1965
- else if ($ === R || B === 0 || k[B - 1] !== R) {
1966
- te !== -1 && te < B + 1 && (te = k.indexOf(m, B + 1));
1967
- var re = He((Y = Y !== -1 && Y < B + 1 ? k.indexOf(g, B + 1) : Y) === -1 ? te : Math.min(te, Y));
1968
- if (k.substr(B + 1 + re, he) === m) {
1969
- F.push(k.substring(E, B).replace(Te, $)), k[E = B + 1 + re + he] !== $ && (B = k.indexOf($, E)), te = k.indexOf(m, E), Y = k.indexOf(g, E);
1966
+ for (var te = k.indexOf(f, E), G = k.indexOf(g, E), Te = new RegExp(_(R) + _(V), "g"), $ = k.indexOf(V, E); ; ) if (k[E] === V) for ($ = E, E++; ; ) {
1967
+ if (($ = k.indexOf(V, $ + 1)) === -1) return z || ue.push({ type: "Quotes", code: "MissingQuotes", message: "Quoted field unterminated", row: B.length, index: E }), De();
1968
+ if ($ === we - 1) return De(k.substring(E, $).replace(Te, V));
1969
+ if (V === R && k[$ + 1] === R) $++;
1970
+ else if (V === R || $ === 0 || k[$ - 1] !== R) {
1971
+ te !== -1 && te < $ + 1 && (te = k.indexOf(f, $ + 1));
1972
+ var oe = He((G = G !== -1 && G < $ + 1 ? k.indexOf(g, $ + 1) : G) === -1 ? te : Math.min(te, G));
1973
+ if (k.substr($ + 1 + oe, se) === f) {
1974
+ H.push(k.substring(E, $).replace(Te, V)), k[E = $ + 1 + oe + se] !== V && ($ = k.indexOf(V, E)), te = k.indexOf(f, E), G = k.indexOf(g, E);
1970
1975
  break;
1971
1976
  }
1972
- if (re = He(Y), k.substring(B + 1 + re, B + 1 + re + ne) === g) {
1973
- if (F.push(k.substring(E, B).replace(Te, $)), Ge(B + 1 + re + ne), te = k.indexOf(m, E), B = k.indexOf($, E), W && (Oe(), q)) return ye();
1974
- if (N && K.length >= N) return ye(!0);
1977
+ if (oe = He(G), k.substring($ + 1 + oe, $ + 1 + oe + Z) === g) {
1978
+ if (H.push(k.substring(E, $).replace(Te, V)), Ge($ + 1 + oe + Z), te = k.indexOf(f, E), $ = k.indexOf(V, E), W && (Oe(), F)) return me();
1979
+ if (L && B.length >= L) return me(!0);
1975
1980
  break;
1976
1981
  }
1977
- ue.push({ type: "Quotes", code: "InvalidQuotes", message: "Trailing quote on quoted field is malformed", row: K.length, index: E }), B++;
1982
+ ue.push({ type: "Quotes", code: "InvalidQuotes", message: "Trailing quote on quoted field is malformed", row: B.length, index: E }), $++;
1978
1983
  }
1979
1984
  }
1980
- else if (b && F.length === 0 && k.substring(E, E + we) === b) {
1981
- if (Y === -1) return ye();
1982
- E = Y + ne, Y = k.indexOf(g, E), te = k.indexOf(m, E);
1983
- } else if (te !== -1 && (te < Y || Y === -1)) F.push(k.substring(E, te)), E = te + he, te = k.indexOf(m, E);
1985
+ else if (b && H.length === 0 && k.substring(E, E + be) === b) {
1986
+ if (G === -1) return me();
1987
+ E = G + Z, G = k.indexOf(g, E), te = k.indexOf(f, E);
1988
+ } else if (te !== -1 && (te < G || G === -1)) H.push(k.substring(E, te)), E = te + se, te = k.indexOf(f, E);
1984
1989
  else {
1985
- if (Y === -1) break;
1986
- if (F.push(k.substring(E, Y)), Ge(Y + ne), W && (Oe(), q)) return ye();
1987
- if (N && K.length >= N) return ye(!0);
1990
+ if (G === -1) break;
1991
+ if (H.push(k.substring(E, G)), Ge(G + Z), W && (Oe(), F)) return me();
1992
+ if (L && B.length >= L) return me(!0);
1988
1993
  }
1989
1994
  return De();
1990
- function Le(D) {
1991
- K.push(D), ce = E;
1995
+ function qe(D) {
1996
+ B.push(D), ce = E;
1992
1997
  }
1993
1998
  function He(D) {
1994
1999
  var U = 0;
1995
- return U = D !== -1 && (D = k.substring(B + 1, D)) && D.trim() === "" ? D.length : U;
2000
+ return U = D !== -1 && (D = k.substring($ + 1, D)) && D.trim() === "" ? D.length : U;
1996
2001
  }
1997
2002
  function De(D) {
1998
- return z || (D === void 0 && (D = k.substring(E)), F.push(D), E = de, Le(F), W && Oe()), ye();
2003
+ return z || (D === void 0 && (D = k.substring(E)), H.push(D), E = we, qe(H), W && Oe()), me();
1999
2004
  }
2000
2005
  function Ge(D) {
2001
- E = D, Le(F), F = [], Y = k.indexOf(g, E);
2006
+ E = D, qe(H), H = [], G = k.indexOf(g, E);
2002
2007
  }
2003
- function ye(D) {
2004
- if (f.header && !L && K.length && !le) {
2005
- var U = K[0], oe = /* @__PURE__ */ Object.create(null), Ne = new Set(U);
2008
+ function me(D) {
2009
+ if (m.header && !A && B.length && !de) {
2010
+ var U = B[0], ae = /* @__PURE__ */ Object.create(null), Ne = new Set(U);
2006
2011
  let Fe = !1;
2007
2012
  for (let Ce = 0; Ce < U.length; Ce++) {
2008
- let Re = U[Ce];
2009
- if (oe[Re = G(f.transformHeader) ? f.transformHeader(Re, Ce) : Re]) {
2010
- let Ye, ht = oe[Re];
2013
+ let Re = l(U[Ce]);
2014
+ if (ae[Re = Q(m.transformHeader) ? m.transformHeader(Re, Ce) : Re]) {
2015
+ let Ye, ht = ae[Re];
2011
2016
  for (; Ye = Re + "_" + ht, ht++, Ne.has(Ye); ) ;
2012
- Ne.add(Ye), U[Ce] = Ye, oe[Re]++, Fe = !0, (pe = pe === null ? {} : pe)[Ye] = Re;
2013
- } else oe[Re] = 1, U[Ce] = Re;
2017
+ Ne.add(Ye), U[Ce] = Ye, ae[Re]++, Fe = !0, (ve = ve === null ? {} : ve)[Ye] = Re;
2018
+ } else ae[Re] = 1, U[Ce] = Re;
2014
2019
  Ne.add(Re);
2015
2020
  }
2016
- Fe && console.warn("Duplicate headers found and renamed."), le = !0;
2021
+ Fe && console.warn("Duplicate headers found and renamed."), de = !0;
2017
2022
  }
2018
- return { data: K, errors: ue, meta: { delimiter: m, linebreak: g, aborted: q, truncated: !!D, cursor: ce + (L || 0), renamedHeaders: pe } };
2023
+ return { data: B, errors: ue, meta: { delimiter: f, linebreak: g, aborted: F, truncated: !!D, cursor: ce + (A || 0), renamedHeaders: ve } };
2019
2024
  }
2020
2025
  function Oe() {
2021
- w(ye()), K = [], ue = [];
2026
+ x(me()), B = [], ue = [];
2022
2027
  }
2023
2028
  }, this.abort = function() {
2024
- q = !0;
2029
+ F = !0;
2025
2030
  }, this.getCharIndex = function() {
2026
2031
  return E;
2027
2032
  };
2028
2033
  }
2029
- function S(f) {
2030
- var m = f.data, g = a[m.workerId], b = !1;
2031
- if (m.error) g.userError(m.error, m.file);
2032
- else if (m.results && m.results.data) {
2033
- var w = { abort: function() {
2034
- b = !0, C(m.workerId, { data: [], errors: [], meta: { aborted: !0 } });
2035
- }, pause: j, resume: j };
2036
- if (G(g.userStep)) {
2037
- for (var N = 0; N < m.results.data.length && (g.userStep({ data: m.results.data[N], errors: m.results.errors, meta: m.results.meta }, w), !b); N++) ;
2038
- delete m.results;
2039
- } else G(g.userChunk) && (g.userChunk(m.results, w, m.file), delete m.results);
2034
+ function S(m) {
2035
+ var f = m.data, g = o[f.workerId], b = !1;
2036
+ if (f.error) g.userError(f.error, f.file);
2037
+ else if (f.results && f.results.data) {
2038
+ var x = { abort: function() {
2039
+ b = !0, C(f.workerId, { data: [], errors: [], meta: { aborted: !0 } });
2040
+ }, pause: Y, resume: Y };
2041
+ if (Q(g.userStep)) {
2042
+ for (var L = 0; L < f.results.data.length && (g.userStep({ data: f.results.data[L], errors: f.results.errors, meta: f.results.meta }, x), !b); L++) ;
2043
+ delete f.results;
2044
+ } else Q(g.userChunk) && (g.userChunk(f.results, x, f.file), delete f.results);
2040
2045
  }
2041
- m.finished && !b && C(m.workerId, m.results);
2046
+ f.finished && !b && C(f.workerId, f.results);
2042
2047
  }
2043
- function C(f, m) {
2044
- var g = a[f];
2045
- G(g.userComplete) && g.userComplete(m), g.terminate(), delete a[f];
2048
+ function C(m, f) {
2049
+ var g = o[m];
2050
+ Q(g.userComplete) && g.userComplete(f), g.terminate(), delete o[m];
2046
2051
  }
2047
- function j() {
2052
+ function Y() {
2048
2053
  throw new Error("Not implemented.");
2049
2054
  }
2050
- function A(f) {
2051
- if (typeof f != "object" || f === null) return f;
2052
- var m, g = Array.isArray(f) ? [] : {};
2053
- for (m in f) g[m] = A(f[m]);
2055
+ function M(m) {
2056
+ if (typeof m != "object" || m === null) return m;
2057
+ var f, g = Array.isArray(m) ? [] : {};
2058
+ for (f in m) g[f] = M(m[f]);
2054
2059
  return g;
2055
2060
  }
2056
- function ie(f, m) {
2061
+ function ie(m, f) {
2057
2062
  return function() {
2058
- f.apply(m, arguments);
2063
+ m.apply(f, arguments);
2059
2064
  };
2060
2065
  }
2061
- function G(f) {
2062
- return typeof f == "function";
2066
+ function Q(m) {
2067
+ return typeof m == "function";
2063
2068
  }
2064
- return l.parse = function(f, m) {
2065
- var g = (m = m || {}).dynamicTyping || !1;
2066
- if (G(g) && (m.dynamicTypingFunction = g, g = {}), m.dynamicTyping = g, m.transform = !!G(m.transform) && m.transform, !m.worker || !l.WORKERS_SUPPORTED) return g = null, l.NODE_STREAM_INPUT, typeof f == "string" ? (f = ((b) => b.charCodeAt(0) !== 65279 ? b : b.slice(1))(f), g = new (m.download ? d : y)(m)) : f.readable === !0 && G(f.read) && G(f.on) ? g = new v(m) : (i.File && f instanceof File || f instanceof Object) && (g = new h(m)), g.stream(f);
2069
+ return c.parse = function(m, f) {
2070
+ var g = (f = f || {}).dynamicTyping || !1;
2071
+ if (Q(g) && (f.dynamicTypingFunction = g, g = {}), f.dynamicTyping = g, f.transform = !!Q(f.transform) && f.transform, f.downloadTimeout !== void 0) {
2072
+ var g = parseInt(f.downloadTimeout);
2073
+ if (isNaN(g)) throw new Error("Config downloadTimeout value (" + f.downloadTimeout + ") not parsable by parseInt(val).");
2074
+ f.downloadTimeout = g;
2075
+ }
2076
+ if (!f.worker || !c.WORKERS_SUPPORTED) return g = null, c.NODE_STREAM_INPUT, typeof m == "string" ? (m = l(m), g = new (f.download ? d : y)(f)) : m.readable === !0 && Q(m.read) && Q(m.on) ? g = new v(f) : (i.File && m instanceof File || m instanceof Object) && (g = new h(f)), g.stream(m);
2067
2077
  (g = (() => {
2068
2078
  var b;
2069
- return !!l.WORKERS_SUPPORTED && (b = (() => {
2070
- var w = i.URL || i.webkitURL || null, N = t.toString();
2071
- return l.BLOB_URL || (l.BLOB_URL = w.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ", "(", N, ")();"], { type: "text/javascript" })));
2072
- })(), (b = new i.Worker(b)).onmessage = S, b.id = c++, a[b.id] = b);
2073
- })()).userStep = m.step, g.userChunk = m.chunk, g.userComplete = m.complete, g.userError = m.error, m.step = G(m.step), m.chunk = G(m.chunk), m.complete = G(m.complete), m.error = G(m.error), delete m.worker, g.postMessage({ input: f, config: m, workerId: g.id });
2074
- }, l.unparse = function(f, m) {
2075
- var g = !1, b = !0, w = ",", N = `\r
2076
- `, Z = '"', pe = Z + Z, le = !1, $ = null, R = !1, E = ((() => {
2077
- if (typeof m == "object") {
2078
- if (typeof m.delimiter != "string" || l.BAD_DELIMITERS.filter(function(L) {
2079
- return m.delimiter.indexOf(L) !== -1;
2080
- }).length || (w = m.delimiter), typeof m.quotes != "boolean" && typeof m.quotes != "function" && !Array.isArray(m.quotes) || (g = m.quotes), typeof m.skipEmptyLines != "boolean" && typeof m.skipEmptyLines != "string" || (le = m.skipEmptyLines), typeof m.newline == "string" && (N = m.newline), typeof m.quoteChar == "string" && (Z = m.quoteChar), typeof m.header == "boolean" && (b = m.header), Array.isArray(m.columns)) {
2081
- if (m.columns.length === 0) throw new Error("Option columns is empty");
2082
- $ = m.columns;
2079
+ return !!c.WORKERS_SUPPORTED && (b = (() => {
2080
+ var x = i.URL || i.webkitURL || null, L = t.toString();
2081
+ return c.BLOB_URL || (c.BLOB_URL = x.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ", "(", L, ")();"], { type: "text/javascript" })));
2082
+ })(), (b = new i.Worker(b)).onmessage = S, b.id = a++, o[b.id] = b);
2083
+ })()).userStep = f.step, g.userChunk = f.chunk, g.userComplete = f.complete, g.userError = f.error, f.step = Q(f.step), f.chunk = Q(f.chunk), f.complete = Q(f.complete), f.error = Q(f.error), delete f.worker, g.postMessage({ input: m, config: f, workerId: g.id });
2084
+ }, c.unparse = function(m, f) {
2085
+ var g = !1, b = !0, x = ",", L = `\r
2086
+ `, re = '"', ve = re + re, de = !1, V = null, R = !1, E = ((() => {
2087
+ if (typeof f == "object") {
2088
+ if (typeof f.delimiter != "string" || c.BAD_DELIMITERS.filter(function(A) {
2089
+ return f.delimiter.indexOf(A) !== -1;
2090
+ }).length || (x = f.delimiter), typeof f.quotes != "boolean" && typeof f.quotes != "function" && !Array.isArray(f.quotes) || (g = f.quotes), typeof f.skipEmptyLines != "boolean" && typeof f.skipEmptyLines != "string" || (de = f.skipEmptyLines), typeof f.newline == "string" && (L = f.newline), typeof f.quoteChar == "string" && (re = f.quoteChar, ve = re + re), typeof f.header == "boolean" && (b = f.header), Array.isArray(f.columns)) {
2091
+ if (f.columns.length === 0) throw new Error("Option columns is empty");
2092
+ V = f.columns;
2083
2093
  }
2084
- m.escapeChar !== void 0 && (pe = m.escapeChar + Z), m.escapeFormulae instanceof RegExp ? R = m.escapeFormulae : typeof m.escapeFormulae == "boolean" && m.escapeFormulae && (R = /^[=+\-@\t\r].*$/);
2094
+ f.escapeChar !== void 0 && (ve = f.escapeChar + re), f.escapeFormulae instanceof RegExp ? R = f.escapeFormulae : typeof f.escapeFormulae == "boolean" && f.escapeFormulae && (R = /^[=+\-@\t\r].*$/);
2085
2095
  }
2086
- })(), new RegExp(_(Z), "g"));
2087
- if (typeof f == "string" && (f = JSON.parse(f)), Array.isArray(f)) {
2088
- if (!f.length || Array.isArray(f[0])) return q(null, f, le);
2089
- if (typeof f[0] == "object") return q($ || Object.keys(f[0]), f, le);
2090
- } else if (typeof f == "object") return typeof f.data == "string" && (f.data = JSON.parse(f.data)), Array.isArray(f.data) && (f.fields || (f.fields = f.meta && f.meta.fields || $), f.fields || (f.fields = Array.isArray(f.data[0]) ? f.fields : typeof f.data[0] == "object" ? Object.keys(f.data[0]) : []), Array.isArray(f.data[0]) || typeof f.data[0] == "object" || (f.data = [f.data])), q(f.fields || [], f.data || [], le);
2096
+ })(), new RegExp(_(re), "g"));
2097
+ if (typeof m == "string" && (m = JSON.parse(m)), Array.isArray(m)) {
2098
+ if (!m.length || Array.isArray(m[0])) return F(null, m, de);
2099
+ if (typeof m[0] == "object") return F(V || Object.keys(m[0]), m, de);
2100
+ } else if (typeof m == "object") return typeof m.data == "string" && (m.data = JSON.parse(m.data)), Array.isArray(m.data) && (m.fields || (m.fields = m.meta && m.meta.fields || V), m.fields || (m.fields = Array.isArray(m.data[0]) ? m.fields : typeof m.data[0] == "object" ? Object.keys(m.data[0]) : []), Array.isArray(m.data[0]) || typeof m.data[0] == "object" || (m.data = [m.data])), F(m.fields || [], m.data || [], de);
2091
2101
  throw new Error("Unable to serialize unrecognized input");
2092
- function q(L, z, de) {
2093
- var he = "", ne = (typeof L == "string" && (L = JSON.parse(L)), typeof z == "string" && (z = JSON.parse(z)), Array.isArray(L) && 0 < L.length), we = !Array.isArray(z[0]);
2094
- if (ne && b) {
2095
- for (var W = 0; W < L.length; W++) 0 < W && (he += w), he += k(L[W], W);
2096
- 0 < z.length && (he += N);
2102
+ function F(A, z, we) {
2103
+ var se = "", Z = (typeof A == "string" && (A = JSON.parse(A)), typeof z == "string" && (z = JSON.parse(z)), Array.isArray(A) && 0 < A.length), be = !Array.isArray(z[0]);
2104
+ if (Z && b) {
2105
+ for (var W = 0; W < A.length; W++) 0 < W && (se += x), se += k(A[W], W);
2106
+ 0 < z.length && (se += L);
2097
2107
  }
2098
- for (var K = 0; K < z.length; K++) {
2099
- var ue = (ne ? L : z[K]).length, F = !1, ce = ne ? Object.keys(z[K]).length === 0 : z[K].length === 0;
2100
- if (de && !ne && (F = de === "greedy" ? z[K].join("").trim() === "" : z[K].length === 1 && z[K][0].length === 0), de === "greedy" && ne) {
2108
+ for (var B = 0; B < z.length; B++) {
2109
+ var ue = (Z ? A : z[B]).length, H = !1, ce = Z ? Object.keys(z[B]).length === 0 : z[B].length === 0;
2110
+ if (we && !Z && (H = we === "greedy" ? z[B].join("").trim() === "" : z[B].length === 1 && z[B][0].length === 0), we === "greedy" && Z) {
2101
2111
  for (var fe = [], J = 0; J < ue; J++) {
2102
- var te = we ? L[J] : J;
2103
- fe.push(z[K][te]);
2112
+ var te = be ? A[J] : J;
2113
+ fe.push(z[B][te]);
2104
2114
  }
2105
- F = fe.join("").trim() === "";
2115
+ H = fe.join("").trim() === "";
2106
2116
  }
2107
- if (!F) {
2108
- for (var Y = 0; Y < ue; Y++) {
2109
- 0 < Y && !ce && (he += w);
2110
- var Te = ne && we ? L[Y] : Y;
2111
- he += k(z[K][Te], Y);
2117
+ if (!H) {
2118
+ for (var G = 0; G < ue; G++) {
2119
+ 0 < G && !ce && (se += x);
2120
+ var Te = Z && be ? A[G] : G;
2121
+ se += k(z[B][Te], G);
2112
2122
  }
2113
- K < z.length - 1 && (!de || 0 < ue && !ce) && (he += N);
2123
+ B < z.length - 1 && (!we || 0 < ue && !ce) && (se += L);
2114
2124
  }
2115
2125
  }
2116
- return he;
2126
+ return se;
2117
2127
  }
2118
- function k(L, z) {
2119
- var de, he;
2120
- return L == null ? "" : L.constructor === Date ? JSON.stringify(L).slice(1, 25) : (he = !1, R && typeof L == "string" && R.test(L) && (L = "'" + L, he = !0), de = L.toString().replace(E, pe), (he = he || g === !0 || typeof g == "function" && g(L, z) || Array.isArray(g) && g[z] || ((ne, we) => {
2121
- for (var W = 0; W < we.length; W++) if (-1 < ne.indexOf(we[W])) return !0;
2128
+ function k(A, z) {
2129
+ var we, se, Z;
2130
+ return A == null ? "" : A.constructor === Date ? isNaN(A.getTime()) ? "" : A.toISOString() : (Z = !1, R && typeof A == "string" && R.test(A) && (A = "'" + A, Z = !0), se = (we = A.toString()).replace(E, ve), (Z = Z || g === !0 || typeof g == "function" && g(A, z) || Array.isArray(g) && g[z] || ((be, W) => {
2131
+ for (var B = 0; B < W.length; B++) if (-1 < be.indexOf(W[B])) return !0;
2122
2132
  return !1;
2123
- })(de, l.BAD_DELIMITERS) || -1 < de.indexOf(w) || de.charAt(0) === " " || de.charAt(de.length - 1) === " ") ? Z + de + Z : de);
2124
- }
2125
- }, l.RECORD_SEP = "", l.UNIT_SEP = "", l.BYTE_ORDER_MARK = "\uFEFF", l.BAD_DELIMITERS = ["\r", `
2126
- `, '"', l.BYTE_ORDER_MARK], l.WORKERS_SUPPORTED = !r && !!i.Worker, l.NODE_STREAM_INPUT = 1, l.LocalChunkSize = 10485760, l.RemoteChunkSize = 5242880, l.DefaultDelimiter = ",", l.Parser = I, l.ParserHandle = x, l.NetworkStreamer = d, l.FileStreamer = h, l.StringStreamer = y, l.ReadableStreamStreamer = v, i.jQuery && ((s = i.jQuery).fn.parse = function(f) {
2127
- var m = f.config || {}, g = [];
2128
- return this.each(function(N) {
2129
- if (!(s(this).prop("tagName").toUpperCase() === "INPUT" && s(this).attr("type").toLowerCase() === "file" && i.FileReader) || !this.files || this.files.length === 0) return !0;
2130
- for (var Z = 0; Z < this.files.length; Z++) g.push({ file: this.files[Z], inputElem: this, instanceConfig: s.extend({}, m) });
2131
- }), b(), this;
2132
- function b() {
2133
- if (g.length === 0) G(f.complete) && f.complete();
2134
- else {
2135
- var N, Z, pe, le, $ = g[0];
2136
- if (G(f.before)) {
2137
- var R = f.before($.file, $.inputElem);
2138
- if (typeof R == "object") {
2139
- if (R.action === "abort") return N = "AbortError", Z = $.file, pe = $.inputElem, le = R.reason, void (G(f.error) && f.error({ name: N }, Z, pe, le));
2140
- if (R.action === "skip") return void w();
2141
- typeof R.config == "object" && ($.instanceConfig = s.extend($.instanceConfig, R.config));
2142
- } else if (R === "skip") return void w();
2143
- }
2144
- var E = $.instanceConfig.complete;
2145
- $.instanceConfig.complete = function(q) {
2146
- G(E) && E(q, $.file, $.inputElem), w();
2147
- }, l.parse($.file, $.instanceConfig);
2148
- }
2133
+ })(se, c.BAD_DELIMITERS) || -1 < se.indexOf(x) || -1 < we.indexOf(re) || se.charAt(0) === " " || se.charAt(se.length - 1) === " ") ? re + se + re : se);
2149
2134
  }
2150
- function w() {
2151
- g.splice(0, 1), b();
2152
- }
2153
- }), o && (i.onmessage = function(f) {
2154
- f = f.data, l.WORKER_ID === void 0 && f && (l.WORKER_ID = f.workerId), typeof f.input == "string" ? i.postMessage({ workerId: l.WORKER_ID, results: l.parse(f.input, f.config), finished: !0 }) : (i.File && f.input instanceof File || f.input instanceof Object) && (f = l.parse(f.input, f.config)) && i.postMessage({ workerId: l.WORKER_ID, results: f, finished: !0 });
2155
- }), (d.prototype = Object.create(u.prototype)).constructor = d, (h.prototype = Object.create(u.prototype)).constructor = h, (y.prototype = Object.create(y.prototype)).constructor = y, (v.prototype = Object.create(u.prototype)).constructor = v, l;
2135
+ }, c.RECORD_SEP = "", c.UNIT_SEP = "", c.BYTE_ORDER_MARK = "\uFEFF", c.BAD_DELIMITERS = ["\r", `
2136
+ `, '"', c.BYTE_ORDER_MARK], c.WORKERS_SUPPORTED = !s && !!i.Worker, c.NODE_STREAM_INPUT = 1, c.LocalChunkSize = 10485760, c.RemoteChunkSize = 5242880, c.DefaultDelimiter = ",", c.Parser = I, c.ParserHandle = w, c.NetworkStreamer = d, c.FileStreamer = h, c.StringStreamer = y, c.ReadableStreamStreamer = v, r && (i.onmessage = function(m) {
2137
+ m = m.data, c.WORKER_ID === void 0 && m && (c.WORKER_ID = m.workerId), typeof m.input == "string" ? i.postMessage({ workerId: c.WORKER_ID, results: c.parse(m.input, m.config), finished: !0 }) : (i.File && m.input instanceof File || m.input instanceof Object) && (m = c.parse(m.input, m.config)) && i.postMessage({ workerId: c.WORKER_ID, results: m, finished: !0 });
2138
+ }), (d.prototype = Object.create(u.prototype)).constructor = d, (h.prototype = Object.create(u.prototype)).constructor = h, (y.prototype = Object.create(y.prototype)).constructor = y, (v.prototype = Object.create(u.prototype)).constructor = v, c;
2156
2139
  });
2157
2140
  })(pt)), pt.exports;
2158
2141
  }
2159
2142
  var Sr = Tr(), Ze = /* @__PURE__ */ ((n) => (n.String = "string", n.Number = "number", n.Boolean = "boolean", n.Object = "object", n.Undefined = "undefined", n))(Ze || {});
2160
- const Dr = ["id"], Or = /* @__PURE__ */ _e({
2143
+ const Dr = ["id"], Or = /* @__PURE__ */ ye({
2161
2144
  __name: "VueJsonCsv",
2162
2145
  props: {
2163
2146
  data: {
@@ -2239,17 +2222,17 @@ const Dr = ["id"], Or = /* @__PURE__ */ _e({
2239
2222
  Rr.saveAs(d, i.filename);
2240
2223
  }
2241
2224
  };
2242
- return (u, d) => (M(), se("div", {
2225
+ return (u, d) => (N(), ne("div", {
2243
2226
  id: s.value,
2244
2227
  "data-testid": "export-csv",
2245
2228
  onClick: l
2246
2229
  }, [
2247
2230
  Xe(u.$slots, "default", {}, () => [
2248
- Ke("Download " + ae(n.filename), 1)
2231
+ Ke("Download " + le(n.filename), 1)
2249
2232
  ])
2250
2233
  ], 8, Dr));
2251
2234
  }
2252
- }), zr = /* @__PURE__ */ _e({
2235
+ }), zr = /* @__PURE__ */ ye({
2253
2236
  __name: "DownloadCsv",
2254
2237
  props: {
2255
2238
  rows: {},
@@ -2258,14 +2241,14 @@ const Dr = ["id"], Or = /* @__PURE__ */ _e({
2258
2241
  },
2259
2242
  setup(n) {
2260
2243
  const e = n, t = T(() => Object.keys(e.headers));
2261
- return (i, s) => (M(), se("div", null, [
2262
- ve(Or, {
2244
+ return (i, s) => (N(), ne("div", null, [
2245
+ ge(Or, {
2263
2246
  data: n.rows,
2264
2247
  fields: t.value,
2265
2248
  filename: n.filename,
2266
2249
  labels: n.headers
2267
2250
  }, {
2268
- default: X(() => [
2251
+ default: j(() => [
2269
2252
  Xe(i.$slots, "default")
2270
2253
  ]),
2271
2254
  _: 3
@@ -2292,7 +2275,7 @@ function ts() {
2292
2275
  }
2293
2276
  const dt = 170, Wt = 6, Ue = "analytics-query-provider", Ci = "{entity-id}", Ur = "{cp-id}", $r = "{timeframe}", Br = 30 * 1e3, Wr = 3e5, Gr = 36e5;
2294
2277
  function Yr() {
2295
- const n = qe(Ue);
2278
+ const n = Pe(Ue);
2296
2279
  return {
2297
2280
  evaluateFeatureFlag: (t, i) => n ? n.evaluateFeatureFlagFn(t, i) : i
2298
2281
  };
@@ -2336,9 +2319,9 @@ function jr() {
2336
2319
  var u = t ? t + l : l, d = this._events[u];
2337
2320
  return d ? d.fn ? 1 : d.length : 0;
2338
2321
  }, a.prototype.emit = function(l, u, d, h, y, v) {
2339
- var x = t ? t + l : l;
2340
- if (!this._events[x]) return !1;
2341
- var _ = this._events[x], I = arguments.length, S, C;
2322
+ var w = t ? t + l : l;
2323
+ if (!this._events[w]) return !1;
2324
+ var _ = this._events[w], I = arguments.length, S, C;
2342
2325
  if (_.fn) {
2343
2326
  switch (_.once && this.removeListener(l, _.fn, void 0, !0), I) {
2344
2327
  case 1:
@@ -2358,8 +2341,8 @@ function jr() {
2358
2341
  S[C - 1] = arguments[C];
2359
2342
  _.fn.apply(_.context, S);
2360
2343
  } else {
2361
- var j = _.length, A;
2362
- for (C = 0; C < j; C++)
2344
+ var Y = _.length, M;
2345
+ for (C = 0; C < Y; C++)
2363
2346
  switch (_[C].once && this.removeListener(l, _[C].fn, void 0, !0), I) {
2364
2347
  case 1:
2365
2348
  _[C].fn.call(_[C].context);
@@ -2374,8 +2357,8 @@ function jr() {
2374
2357
  _[C].fn.call(_[C].context, u, d, h);
2375
2358
  break;
2376
2359
  default:
2377
- if (!S) for (A = 1, S = new Array(I - 1); A < I; A++)
2378
- S[A - 1] = arguments[A];
2360
+ if (!S) for (M = 1, S = new Array(I - 1); M < I; M++)
2361
+ S[M - 1] = arguments[M];
2379
2362
  _[C].fn.apply(_[C].context, S);
2380
2363
  }
2381
2364
  }
@@ -2393,8 +2376,8 @@ function jr() {
2393
2376
  if (v.fn)
2394
2377
  v.fn === u && (!h || v.once) && (!d || v.context === d) && o(this, y);
2395
2378
  else {
2396
- for (var x = 0, _ = [], I = v.length; x < I; x++)
2397
- (v[x].fn !== u || h && !v[x].once || d && v[x].context !== d) && _.push(v[x]);
2379
+ for (var w = 0, _ = [], I = v.length; w < I; w++)
2380
+ (v[w].fn !== u || h && !v[w].once || d && v[w].context !== d) && _.push(v[w]);
2398
2381
  _.length ? this._events[y] = _.length === 1 ? _[0] : _ : o(this, y);
2399
2382
  }
2400
2383
  return this;
@@ -2523,26 +2506,30 @@ class Jr extends Xr {
2523
2506
  #f;
2524
2507
  #p = !1;
2525
2508
  #_ = !1;
2526
- #l;
2527
- #T = 0;
2528
- #b = 0;
2529
2509
  #u;
2510
+ /*
2511
+ Timestamp when the current interval window ends. Kept accurate at every window transition: `#initializeIntervalIfNeeded` sets it when a window starts and `#onInterval` advances it as the recurring timer rolls into each new window. This is the source of truth for whether a task added after the queue goes idle belongs to a fresh window, so it must not go stale.
2512
+ */
2513
+ #w = 0;
2514
+ // Recurring timer that drives windows while the queue is actively processing. Absent (`undefined`) once the queue goes idle.
2515
+ #l;
2516
+ // One-shot timer used while idle to resume at the next window boundary, since `#intervalId` is cleared when idle.
2530
2517
  #c;
2531
2518
  #a;
2532
2519
  // Circular buffer implementation for better performance
2533
2520
  #o = [];
2534
2521
  #n = 0;
2535
2522
  #i;
2536
- #S;
2523
+ #k;
2537
2524
  #s = 0;
2538
2525
  // The `!` is needed because of https://github.com/microsoft/TypeScript/issues/32194
2539
2526
  #g;
2540
2527
  #d;
2541
2528
  // Use to assign a unique identifier to a promise function, if not explicitly specified
2542
- #M = 1n;
2529
+ #N = 1n;
2543
2530
  // Track currently running tasks for debugging
2544
2531
  #y = /* @__PURE__ */ new Map();
2545
- #w = /* @__PURE__ */ new Set();
2532
+ #b = /* @__PURE__ */ new Set();
2546
2533
  /**
2547
2534
  Get or set the default timeout for all tasks. Can be changed at runtime.
2548
2535
 
@@ -2577,14 +2564,14 @@ class Jr extends Xr {
2577
2564
  throw new TypeError("The `strict` option requires a non-zero `interval`");
2578
2565
  if (e.strict && e.intervalCap === Number.POSITIVE_INFINITY)
2579
2566
  throw new TypeError("The `strict` option requires a finite `intervalCap`");
2580
- if (this.#t = e.carryoverIntervalCount ?? e.carryoverConcurrencyCount ?? !1, this.#e = e.intervalCap === Number.POSITIVE_INFINITY || e.interval === 0, this.#f = e.intervalCap, this.#l = e.interval, this.#a = e.strict, this.#i = new e.queueClass(), this.#S = e.queueClass, this.concurrency = e.concurrency, e.timeout !== void 0 && !(Number.isFinite(e.timeout) && e.timeout > 0))
2567
+ if (this.#t = e.carryoverIntervalCount ?? e.carryoverConcurrencyCount ?? !1, this.#e = e.intervalCap === Number.POSITIVE_INFINITY || e.interval === 0, this.#f = e.intervalCap, this.#u = e.interval, this.#a = e.strict, this.#i = new e.queueClass(), this.#k = e.queueClass, this.concurrency = e.concurrency, e.timeout !== void 0 && !(Number.isFinite(e.timeout) && e.timeout > 0))
2581
2568
  throw new TypeError(`Expected \`timeout\` to be a positive finite number, got \`${e.timeout}\` (${typeof e.timeout})`);
2582
- this.timeout = e.timeout, this.#d = e.autoStart === !1, this.#U();
2569
+ this.timeout = e.timeout, this.#d = e.autoStart === !1, this.#F();
2583
2570
  }
2584
2571
  #x(e) {
2585
2572
  for (; this.#n < this.#o.length; ) {
2586
2573
  const i = this.#o[this.#n];
2587
- if (i !== void 0 && e - i >= this.#l)
2574
+ if (i !== void 0 && e - i >= this.#u)
2588
2575
  this.#n++;
2589
2576
  else
2590
2577
  break;
@@ -2592,64 +2579,59 @@ class Jr extends Xr {
2592
2579
  (this.#n > 100 && this.#n > this.#o.length / 2 || this.#n === this.#o.length) && (this.#o = this.#o.slice(this.#n), this.#n = 0);
2593
2580
  }
2594
2581
  // Helper methods for interval consumption
2595
- #A(e) {
2582
+ #M(e) {
2596
2583
  this.#a ? this.#o.push(e) : this.#r++;
2597
2584
  }
2598
- #L() {
2585
+ #A() {
2599
2586
  this.#a ? this.#o.length > this.#n && this.#o.pop() : this.#r > 0 && this.#r--;
2600
2587
  }
2601
2588
  #E() {
2602
2589
  return this.#o.length - this.#n;
2603
2590
  }
2604
- get #I() {
2591
+ get #L() {
2605
2592
  return this.#e ? !0 : this.#a ? this.#E() < this.#f : this.#r < this.#f;
2606
2593
  }
2607
- get #P() {
2594
+ get #I() {
2608
2595
  return this.#s < this.#g;
2609
2596
  }
2610
- #q() {
2597
+ #P() {
2611
2598
  this.#s--, this.#s === 0 && this.emit("pendingZero"), this.#v(), this.emit("next");
2612
2599
  }
2613
- #H() {
2614
- this.#c = void 0, this.#z(), this.#O();
2600
+ #q() {
2601
+ this.#c = void 0, this.#O(), this.#D();
2615
2602
  }
2616
- #F(e) {
2603
+ #H(e) {
2617
2604
  if (this.#a) {
2618
2605
  if (this.#x(e), this.#E() >= this.#f) {
2619
- const i = this.#o[this.#n], s = this.#l - (e - i);
2620
- return this.#C(s), !0;
2606
+ const i = this.#o[this.#n], s = this.#u - (e - i);
2607
+ return this.#T(s), !0;
2621
2608
  }
2622
2609
  return !1;
2623
2610
  }
2624
- if (this.#u === void 0) {
2625
- const t = this.#T - e;
2626
- if (t < 0) {
2627
- if (this.#b > 0) {
2628
- const i = e - this.#b;
2629
- if (i < this.#l)
2630
- return this.#C(this.#l - i), !0;
2631
- }
2611
+ if (this.#l === void 0) {
2612
+ const t = this.#w - e;
2613
+ if (t < 0)
2632
2614
  this.#r = this.#t ? this.#s : 0;
2633
- } else
2634
- return this.#C(t), !0;
2615
+ else
2616
+ return this.#T(t), !0;
2635
2617
  }
2636
2618
  return !1;
2637
2619
  }
2638
- #C(e) {
2620
+ #T(e) {
2639
2621
  this.#c === void 0 && (this.#c = setTimeout(() => {
2640
- this.#H();
2622
+ this.#q();
2641
2623
  }, e));
2642
2624
  }
2643
- #R() {
2644
- this.#u && (clearInterval(this.#u), this.#u = void 0);
2625
+ #C() {
2626
+ this.#l && (clearInterval(this.#l), this.#l = void 0);
2645
2627
  }
2646
- #D() {
2628
+ #S() {
2647
2629
  this.#c && (clearTimeout(this.#c), this.#c = void 0);
2648
2630
  }
2649
2631
  #v() {
2650
2632
  if (this.#i.size === 0) {
2651
- if (this.#R(), this.emit("empty"), this.#s === 0) {
2652
- if (this.#D(), this.#a && this.#n > 0) {
2633
+ if (this.#C(), this.emit("empty"), this.#s === 0) {
2634
+ if (this.#S(), this.#a && this.#n > 0) {
2653
2635
  const t = Date.now();
2654
2636
  this.#x(t);
2655
2637
  }
@@ -2659,26 +2641,26 @@ class Jr extends Xr {
2659
2641
  }
2660
2642
  let e = !1;
2661
2643
  if (!this.#d) {
2662
- const t = Date.now(), i = !this.#F(t);
2663
- if (this.#I && this.#P) {
2644
+ const t = Date.now(), i = !this.#H(t);
2645
+ if (this.#L && this.#I) {
2664
2646
  const s = this.#i.dequeue();
2665
- this.#e || (this.#A(t), this.#m()), this.emit("active"), s(), i && this.#O(), e = !0;
2647
+ this.#e || (this.#M(t), this.#m()), i && this.#D(), this.emit("active"), s(), e = !0;
2666
2648
  }
2667
2649
  }
2668
2650
  return e;
2669
2651
  }
2670
- #O() {
2671
- this.#e || this.#u !== void 0 || this.#a || (this.#u = setInterval(() => {
2672
- this.#z();
2673
- }, this.#l), this.#T = Date.now() + this.#l);
2652
+ #D() {
2653
+ this.#e || this.#l !== void 0 || this.#a || (this.#l = setInterval(() => {
2654
+ this.#O();
2655
+ }, this.#u), this.#w = Date.now() + this.#u);
2674
2656
  }
2675
- #z() {
2676
- this.#a || (this.#r === 0 && this.#s === 0 && this.#u && this.#R(), this.#r = this.#t ? this.#s : 0), this.#k(), this.#m();
2657
+ #O() {
2658
+ this.#a || (this.#l !== void 0 && (this.#r === 0 && this.#s === 0 ? this.#C() : this.#w = Date.now() + this.#u), this.#r = this.#t ? this.#s : 0), this.#R(), this.#m();
2677
2659
  }
2678
2660
  /**
2679
2661
  Executes all queued functions until it reaches the limit.
2680
2662
  */
2681
- #k() {
2663
+ #R() {
2682
2664
  for (; this.#v(); )
2683
2665
  ;
2684
2666
  }
@@ -2688,7 +2670,7 @@ class Jr extends Xr {
2688
2670
  set concurrency(e) {
2689
2671
  if (!(typeof e == "number" && e >= 1))
2690
2672
  throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${e}\` (${typeof e})`);
2691
- this.#g = e, this.#k();
2673
+ this.#g = e, this.#R();
2692
2674
  }
2693
2675
  /**
2694
2676
  Updates the priority of a promise function by its id, affecting its execution order. Requires a defined concurrency limit to take effect.
@@ -2736,7 +2718,7 @@ class Jr extends Xr {
2736
2718
  timeout: this.timeout,
2737
2719
  ...t,
2738
2720
  // Assign unique ID if not provided
2739
- id: t.id ?? (this.#M++).toString()
2721
+ id: t.id ?? (this.#N++).toString()
2740
2722
  }, t.timeout !== void 0 && !(Number.isFinite(t.timeout) && t.timeout > 0))
2741
2723
  throw new TypeError(`Expected \`timeout\` to be a positive finite number, got \`${t.timeout}\` (${typeof t.timeout})`);
2742
2724
  return new Promise((i, s) => {
@@ -2756,9 +2738,8 @@ class Jr extends Xr {
2756
2738
  try {
2757
2739
  t.signal?.throwIfAborted();
2758
2740
  } catch (h) {
2759
- throw this.#$(), this.#y.delete(r), h;
2741
+ throw this.#U(), this.#y.delete(r), h;
2760
2742
  }
2761
- this.#b = Date.now();
2762
2743
  let u = e({ signal: t.signal });
2763
2744
  if (t.timeout !== void 0 && (u = Qr(Promise.resolve(u), {
2764
2745
  milliseconds: t.timeout,
@@ -2777,7 +2758,7 @@ class Jr extends Xr {
2777
2758
  s(u), this.emit("error", u);
2778
2759
  } finally {
2779
2760
  l && t.signal?.removeEventListener("abort", l), this.#y.delete(r), queueMicrotask(() => {
2780
- this.#q();
2761
+ this.#P();
2781
2762
  });
2782
2763
  }
2783
2764
  };
@@ -2794,12 +2775,12 @@ class Jr extends Xr {
2794
2775
  o(), c(), s(l.reason), this.#v(), this.emit("next");
2795
2776
  };
2796
2777
  if (o = () => {
2797
- l.removeEventListener("abort", u), this.#w.delete(o);
2778
+ l.removeEventListener("abort", u), this.#b.delete(o);
2798
2779
  }, l.aborted) {
2799
2780
  u();
2800
2781
  return;
2801
2782
  }
2802
- l.addEventListener("abort", u, { once: !0 }), this.#w.add(o);
2783
+ l.addEventListener("abort", u, { once: !0 }), this.#b.add(o);
2803
2784
  }
2804
2785
  this.emit("add"), this.#v();
2805
2786
  });
@@ -2811,7 +2792,7 @@ class Jr extends Xr {
2811
2792
  Start (or resume) executing enqueued tasks within concurrency limit. No need to call this if queue is not paused (via `options.autoStart = false` or by `.pause()` method.)
2812
2793
  */
2813
2794
  start() {
2814
- return this.#d ? (this.#d = !1, this.#k(), this) : this;
2795
+ return this.#d ? (this.#d = !1, this.#R(), this) : this;
2815
2796
  }
2816
2797
  /**
2817
2798
  Put queue execution on hold.
@@ -2823,9 +2804,9 @@ class Jr extends Xr {
2823
2804
  Clear the queue.
2824
2805
  */
2825
2806
  clear() {
2826
- for (const e of this.#w)
2807
+ for (const e of this.#b)
2827
2808
  e();
2828
- this.#i = new this.#S(), this.#R(), this.#N(), this.emit("empty"), this.#s === 0 && (this.#D(), this.emit("idle")), this.emit("next");
2809
+ this.#i = new this.#k(), this.#C(), this.#z(), this.emit("empty"), this.#s === 0 && (this.#S(), this.emit("idle")), this.emit("next");
2829
2810
  }
2830
2811
  /**
2831
2812
  Can be called multiple times. Useful if you for example add additional items at a later time.
@@ -2951,7 +2932,7 @@ class Jr extends Xr {
2951
2932
  get isPaused() {
2952
2933
  return this.#d;
2953
2934
  }
2954
- #U() {
2935
+ #F() {
2955
2936
  this.#e || (this.on("add", () => {
2956
2937
  this.#i.size > 0 && this.#m();
2957
2938
  }), this.on("next", () => {
@@ -2960,13 +2941,13 @@ class Jr extends Xr {
2960
2941
  }
2961
2942
  #m() {
2962
2943
  this.#e || this.#_ || (this.#_ = !0, queueMicrotask(() => {
2963
- this.#_ = !1, this.#N();
2944
+ this.#_ = !1, this.#z();
2964
2945
  }));
2965
2946
  }
2966
- #$() {
2967
- this.#e || (this.#L(), this.#m());
2947
+ #U() {
2948
+ this.#e || (this.#A(), this.#m());
2968
2949
  }
2969
- #N() {
2950
+ #z() {
2970
2951
  const e = this.#p;
2971
2952
  if (this.#e || this.#i.size === 0) {
2972
2953
  e && (this.#p = !1, this.emit("rateLimitCleared"));
@@ -3055,7 +3036,7 @@ class Jr extends Xr {
3055
3036
  }
3056
3037
  }
3057
3038
  const eo = () => {
3058
- const n = Bt(), e = qe(Ue);
3039
+ const n = Bt(), e = Pe(Ue);
3059
3040
  if (!e)
3060
3041
  return;
3061
3042
  if (e.queryFnOverride) {
@@ -3121,95 +3102,95 @@ function ro({
3121
3102
  definition: t,
3122
3103
  chartData: i
3123
3104
  }) {
3124
- const s = V(""), r = V(""), o = V(void 0), a = V(void 0), c = Bt(), l = ut(), { stripUnknownFilters: u, loading: d } = rt(l), h = T(() => ze(t.value));
3105
+ const s = X(""), r = X(""), o = X(void 0), a = X(void 0), c = Bt(), l = ut(), { stripUnknownFilters: u, loading: d } = rt(l), h = T(() => ze(t.value));
3125
3106
  Rt(async () => {
3126
3107
  s.value = await n?.exploreBaseUrl?.() ?? "", r.value = await n?.requestsBaseUrl?.() ?? "";
3127
3108
  });
3128
3109
  const y = T(() => c.analytics && c.percentiles), v = T(() => {
3129
3110
  const g = t.value.chart.type;
3130
3111
  return ["golden_signals", "gauge"].includes(g) ? !1 : g === "top_n" ? e.value.editable || e.value.showTileActions : !0;
3131
- }), x = T(() => r.value && t.value.query && !h.value && t.value.query.datasource !== "llm_usage" && t.value.query.datasource !== "managed_cache_usage" && !$t(t.value.query.datasource) && y.value && !d.value), _ = T(() => s.value && t.value.query && no(t.value.query.datasource) && y.value && !d.value), I = T(() => i.value ? It(i.value.meta.granularity_ms) : void 0), S = T(() => {
3132
- const g = t.value, b = [...e.value.filters, ...g.query.filters ?? []], w = "metrics" in g.query ? g.query.metrics : void 0, N = g.query?.datasource ?? "api_usage";
3112
+ }), w = T(() => r.value && t.value.query && !h.value && t.value.query.datasource !== "llm_usage" && t.value.query.datasource !== "managed_cache_usage" && !$t(t.value.query.datasource) && y.value && !d.value), _ = T(() => s.value && t.value.query && no(t.value.query.datasource) && y.value && !d.value), I = T(() => i.value ? It(i.value.meta.granularity_ms) : void 0), S = T(() => {
3113
+ const g = t.value, b = [...e.value.filters, ...g.query.filters ?? []], x = "metrics" in g.query ? g.query.metrics : void 0, L = g.query?.datasource ?? "api_usage";
3133
3114
  return u.value({
3134
- datasource: N,
3115
+ datasource: L,
3135
3116
  filters: b,
3136
- queryFields: w
3117
+ queryFields: x
3137
3118
  });
3138
3119
  }), C = T(() => {
3139
3120
  if (!_.value || !v.value)
3140
3121
  return "";
3141
3122
  const g = t.value;
3142
3123
  if (ze(g))
3143
- return m({
3124
+ return f({
3144
3125
  ...g.query,
3145
3126
  filters: S.value
3146
3127
  });
3147
- const b = g.query.time_range || e.value.timeSpec, w = f(b, S.value);
3148
- return m(w);
3149
- }), j = T(() => {
3150
- if (!x.value || !v.value)
3128
+ const b = g.query.time_range || e.value.timeSpec, x = m(b, S.value);
3129
+ return f(x);
3130
+ }), Y = T(() => {
3131
+ if (!w.value || !v.value)
3151
3132
  return "";
3152
3133
  const g = S.value, b = t.value;
3153
3134
  if (ze(b))
3154
3135
  return "";
3155
- const w = ie(
3136
+ const x = ie(
3156
3137
  b.query.time_range || e.value.timeSpec,
3157
3138
  g
3158
3139
  );
3159
- return A(w);
3160
- }), A = (g) => x.value ? `${r.value}?q=${JSON.stringify(g)}` : "", ie = (g, b) => {
3161
- const w = i.value?.meta?.start ? new Date(i.value.meta.start) : void 0, N = i.value?.meta?.end ? new Date(i.value.meta.end) : void 0;
3140
+ return M(x);
3141
+ }), M = (g) => w.value ? `${r.value}?q=${JSON.stringify(g)}` : "", ie = (g, b) => {
3142
+ const x = i.value?.meta?.start ? new Date(i.value.meta.start) : void 0, L = i.value?.meta?.end ? new Date(i.value.meta.end) : void 0;
3162
3143
  return {
3163
3144
  filter: b,
3164
3145
  timeframe: {
3165
3146
  timePeriodsKey: g.type === "relative" ? g.time_range : "custom",
3166
- start: g.type === "absolute" ? w : void 0,
3167
- end: g.type === "absolute" ? N : void 0
3147
+ start: g.type === "absolute" ? x : void 0,
3148
+ end: g.type === "absolute" ? L : void 0
3168
3149
  }
3169
3150
  };
3170
- }, G = (g, b) => ({
3151
+ }, Q = (g, b) => ({
3171
3152
  filter: b,
3172
3153
  timeframe: {
3173
3154
  timePeriodsKey: g.type === "relative" ? g.time_range : "custom",
3174
3155
  start: g.type === "absolute" ? g.start : void 0,
3175
3156
  end: g.type === "absolute" ? g.end : void 0
3176
3157
  }
3177
- }), f = (g, b) => {
3178
- const w = t.value;
3179
- if (ze(w))
3158
+ }), m = (g, b) => {
3159
+ const x = t.value;
3160
+ if (ze(x))
3180
3161
  throw new Error("Cannot build a chart explore query for table chart definitions");
3181
- const N = [...w.query.dimensions ?? []], Z = [...w.query.metrics ?? []];
3162
+ const L = [...x.query.dimensions ?? []], re = [...x.query.metrics ?? []];
3182
3163
  return {
3183
3164
  filters: b,
3184
- metrics: Z,
3185
- dimensions: N,
3165
+ metrics: re,
3166
+ dimensions: L,
3186
3167
  time_range: g,
3187
- granularity: w.query.granularity || I.value || void 0
3168
+ granularity: x.query.granularity || I.value || void 0
3188
3169
  };
3189
- }, m = (g) => {
3170
+ }, f = (g) => {
3190
3171
  if (!_.value)
3191
3172
  return "";
3192
3173
  const b = t.value.query.datasource && t.value.query.datasource !== "basic" ? t.value.query.datasource : "api_usage";
3193
3174
  return `${s.value}?q=${JSON.stringify(g)}&d=${b}&c=${t.value.chart.type}`;
3194
3175
  };
3195
- return Je([x, _], ([g, b]) => {
3176
+ return Je([w, _], ([g, b]) => {
3196
3177
  g && (o.value = { href: "" }), b && (a.value = { href: "" });
3197
3178
  }), {
3198
3179
  exploreLinkKebabMenu: C,
3199
- requestsLinkKebabMenu: j,
3180
+ requestsLinkKebabMenu: Y,
3200
3181
  canShowKebabMenu: v,
3201
- canGenerateRequestsLink: x,
3182
+ canGenerateRequestsLink: w,
3202
3183
  canGenerateExploreLink: _,
3203
3184
  requestsLinkZoomActions: o,
3204
3185
  exploreLinkZoomActions: a,
3205
- buildExploreQuery: f,
3206
- buildRequestsQueryZoomActions: G,
3207
- buildExploreLink: m,
3208
- buildRequestLink: A
3186
+ buildExploreQuery: m,
3187
+ buildRequestsQueryZoomActions: Q,
3188
+ buildExploreLink: f,
3189
+ buildRequestLink: M
3209
3190
  };
3210
3191
  }
3211
3192
  function oo() {
3212
- const n = qe(Ue), e = ut(), { stripUnknownFilters: t } = rt(e);
3193
+ const n = Pe(Ue), e = ut(), { stripUnknownFilters: t } = rt(e);
3213
3194
  let i = null;
3214
3195
  return lt(() => {
3215
3196
  i?.abort();
@@ -3231,11 +3212,11 @@ function oo() {
3231
3212
  ],
3232
3213
  queryFields: r.metrics
3233
3214
  }).filter(({ operator: I }) => !y || !gs.some((S) => S === I));
3234
- let x = r.time_range;
3235
- x ? x.tz || (x = {
3236
- ...x,
3215
+ let w = r.time_range;
3216
+ w ? w.tz || (w = {
3217
+ ...w,
3237
3218
  tz: o.tz
3238
- }) : x = {
3219
+ }) : w = {
3239
3220
  ...o.timeSpec,
3240
3221
  tz: o.tz
3241
3222
  };
@@ -3243,7 +3224,7 @@ function oo() {
3243
3224
  datasource: h,
3244
3225
  query: {
3245
3226
  ...d,
3246
- time_range: x,
3227
+ time_range: w,
3247
3228
  filters: v,
3248
3229
  limit: a ?? u
3249
3230
  }
@@ -3253,23 +3234,23 @@ function oo() {
3253
3234
  }
3254
3235
  function ao({
3255
3236
  context: n,
3256
- globalFilters: e = V([]),
3257
- isFullscreen: t = V(!1),
3258
- preview: i = V(!1)
3237
+ globalFilters: e = X([]),
3238
+ isFullscreen: t = X(!1),
3239
+ preview: i = X(!1)
3259
3240
  }) {
3260
3241
  const s = Bt(), r = ut(), { loading: o } = rt(s), { loading: a } = rt(r), c = T(() => n.value.timeSpec ? n.value.timeSpec : {
3261
3242
  type: "relative",
3262
3243
  time_range: s.defaultQueryTimeForOrg
3263
3244
  }), l = T(() => {
3264
3245
  let { tz: d, refreshInterval: h, editable: y, showTileActions: v } = n.value;
3265
- const x = [...n.value.filters ?? [], ...e.value];
3246
+ const w = [...n.value.filters ?? [], ...e.value];
3266
3247
  if (d || (d = new Intl.DateTimeFormat().resolvedOptions().timeZone), h === void 0 && (h = Br), t.value) {
3267
3248
  let I = !1;
3268
3249
  if (c.value.type === "relative")
3269
3250
  I = ["15m", "1h", "6h", "12h", "24h"].includes(c.value.time_range);
3270
3251
  else {
3271
- const j = c.value.start.getTime(), A = c.value.end.getTime();
3272
- I = Math.abs(A - j) <= 864e5;
3252
+ const Y = c.value.start.getTime(), M = c.value.end.getTime();
3253
+ I = Math.abs(M - Y) <= 864e5;
3273
3254
  }
3274
3255
  const S = (/* @__PURE__ */ new Date()).getTime();
3275
3256
  c.value.type === "absolute" && c.value.end.getTime() < S || c.value.type === "relative" && ["previous_week", "previous_month"].includes(c.value.time_range) ? h = 0 : I ? h = Wr : h = Gr;
@@ -3277,7 +3258,7 @@ function ao({
3277
3258
  (y === void 0 || i.value) && (y = !1), v === void 0 && (v = !0);
3278
3259
  const _ = !i.value && !!ds()?.vnode?.props?.onTileTimeRangeZoom;
3279
3260
  return {
3280
- filters: x,
3261
+ filters: w,
3281
3262
  tz: d,
3282
3263
  timeSpec: c.value,
3283
3264
  refreshInterval: h,
@@ -3333,7 +3314,7 @@ function ho(n, e, t, i) {
3333
3314
  return r < e && s.push({ startY: r, height: e - r }), s;
3334
3315
  }
3335
3316
  function fo(n) {
3336
- const { i18n: e } = ts(), t = V({ status: "idle" });
3317
+ const { i18n: e } = ts(), t = X({ status: "idle" });
3337
3318
  async function i(s = {}) {
3338
3319
  const {
3339
3320
  filename: r = "dashboard-export",
@@ -3346,7 +3327,7 @@ function fo(n) {
3346
3327
  scale: h = 2,
3347
3328
  exclude: y = [".tile-actions", ".tooltip", ".popover", ".dropdown-popover"],
3348
3329
  output: v = "download",
3349
- onBeforeCapture: x,
3330
+ onBeforeCapture: w,
3350
3331
  onAfterCapture: _
3351
3332
  } = s, I = n.value;
3352
3333
  if (!I) {
@@ -3354,66 +3335,66 @@ function fo(n) {
3354
3335
  return;
3355
3336
  }
3356
3337
  try {
3357
- t.value = { status: "preparing" }, await x?.();
3338
+ t.value = { status: "preparing" }, await w?.();
3358
3339
  const [{ snapdom: S }, { jsPDF: C }] = await Promise.all([
3359
3340
  import("@zumer/snapdom"),
3360
3341
  import("jspdf")
3361
3342
  ]);
3362
3343
  t.value = { status: "capturing" };
3363
- const j = {
3344
+ const Y = {
3364
3345
  name: "kong-webgl-snapshot",
3365
3346
  beforeClone: () => ys(),
3366
3347
  afterClone: () => Zt()
3367
- }, A = await S.toCanvas(I, {
3348
+ }, M = await S.toCanvas(I, {
3368
3349
  scale: h,
3369
3350
  exclude: y,
3370
3351
  excludeMode: "remove",
3371
3352
  embedFonts: !0,
3372
- plugins: [j]
3373
- }), ie = co(I), G = I.getBoundingClientRect().width, f = G ? A.width / G : h;
3353
+ plugins: [Y]
3354
+ }), ie = co(I), Q = I.getBoundingClientRect().width, m = Q ? M.width / Q : h;
3374
3355
  t.value = { status: "generating" };
3375
- const m = /* @__PURE__ */ new Date(), g = new C({ orientation: l, unit: "mm", format: u }), b = g.internal.pageSize.getWidth(), w = g.internal.pageSize.getHeight(), N = lo + (a ? ss : 0), Z = b - d * 2, pe = w - d * 2 - N - is, le = A.width / Z, $ = pe * le, R = ho(ie, A.height, $, f), E = {
3356
+ const f = /* @__PURE__ */ new Date(), g = new C({ orientation: l, unit: "mm", format: u }), b = g.internal.pageSize.getWidth(), x = g.internal.pageSize.getHeight(), L = lo + (a ? ss : 0), re = b - d * 2, ve = x - d * 2 - L - is, de = M.width / re, V = ve * de, R = ho(ie, M.height, V, m), E = {
3376
3357
  title: o,
3377
3358
  subtitle: a,
3378
3359
  dashboardUrl: c,
3379
3360
  generatedAt: e.t("pdfExport.generated", {
3380
- timestamp: m.toLocaleString(void 0, { dateStyle: "medium", timeStyle: "short" })
3361
+ timestamp: f.toLocaleString(void 0, { dateStyle: "medium", timeStyle: "short" })
3381
3362
  }),
3382
3363
  branding: e.t("pdfExport.branding"),
3383
3364
  dashboardNote: e.t("pdfExport.dashboardNote"),
3384
3365
  pageWidth: b,
3385
- pageHeight: w,
3386
- headerHeight: N,
3366
+ pageHeight: x,
3367
+ headerHeight: L,
3387
3368
  margin: d
3388
3369
  };
3389
- for (let q = 0; q < R.length; q++) {
3390
- q > 0 && g.addPage();
3391
- const { startY: k, height: L } = R[q], z = document.createElement("canvas");
3392
- z.width = A.width, z.height = L, z.getContext("2d").drawImage(
3393
- A,
3370
+ for (let F = 0; F < R.length; F++) {
3371
+ F > 0 && g.addPage();
3372
+ const { startY: k, height: A } = R[F], z = document.createElement("canvas");
3373
+ z.width = M.width, z.height = A, z.getContext("2d").drawImage(
3374
+ M,
3394
3375
  0,
3395
3376
  k,
3396
- A.width,
3397
- L,
3377
+ M.width,
3378
+ A,
3398
3379
  0,
3399
3380
  0,
3400
- A.width,
3401
- L
3381
+ M.width,
3382
+ A
3402
3383
  ), g.addImage(
3403
3384
  z.toDataURL("image/png"),
3404
3385
  "PNG",
3405
3386
  d,
3406
- d + N,
3407
- Z,
3408
- L / le
3387
+ d + L,
3388
+ re,
3389
+ A / de
3409
3390
  ), uo(g, {
3410
3391
  ...E,
3411
- pageLabel: e.t("pdfExport.pageOf", { page: String(q + 1), total: String(R.length) })
3392
+ pageLabel: e.t("pdfExport.pageOf", { page: String(F + 1), total: String(R.length) })
3412
3393
  });
3413
3394
  }
3414
3395
  if (v === "blob") {
3415
- const q = g.output("blob");
3416
- return t.value = { status: "complete", pageCount: R.length }, q;
3396
+ const F = g.output("blob");
3397
+ return t.value = { status: "complete", pageCount: R.length }, F;
3417
3398
  }
3418
3399
  g.save(r), t.value = { status: "complete", pageCount: R.length };
3419
3400
  } catch (S) {
@@ -3442,7 +3423,7 @@ const ke = {
3442
3423
  key: 4,
3443
3424
  class: "text-muted",
3444
3425
  tag: "span"
3445
- }, zi = 3, yo = /* @__PURE__ */ _e({
3426
+ }, zi = 3, yo = /* @__PURE__ */ ye({
3446
3427
  __name: "CsvExportModal",
3447
3428
  props: {
3448
3429
  exportState: {},
@@ -3451,11 +3432,11 @@ const ke = {
3451
3432
  },
3452
3433
  emits: ["closeModal"],
3453
3434
  setup(n, { emit: e }) {
3454
- const { i18n: t } = ke.useI18n(), i = n, s = e, r = `${i.filename.replace(/\s+/g, "-").toLowerCase()}-${(/* @__PURE__ */ new Date()).toISOString().slice(0, 10)}.csv`, o = V(1), a = T(() => h.value.rows.length), c = T(() => i.exportState.status === "success" && !!i.exportState.chartData?.data?.length), l = T(() => {
3435
+ const { i18n: t } = ke.useI18n(), i = n, s = e, r = `${i.filename.replace(/\s+/g, "-").toLowerCase()}-${(/* @__PURE__ */ new Date()).toISOString().slice(0, 10)}.csv`, o = X(1), a = T(() => h.value.rows.length), c = T(() => i.exportState.status === "success" && !!i.exportState.chartData?.data?.length), l = T(() => {
3455
3436
  if (i.exportState.status !== "success" || !i.exportState.chartData?.meta)
3456
3437
  return "";
3457
- const { start: v, end: x } = i.exportState.chartData.meta;
3458
- return v && x ? `${Jt(new Date(v))} - ${Jt(new Date(x), { includeTZ: !0 })}` : "";
3438
+ const { start: v, end: w } = i.exportState.chartData.meta;
3439
+ return v && w ? `${Jt(new Date(v))} - ${Jt(new Date(w), { includeTZ: !0 })}` : "";
3459
3440
  }), u = T(() => i.exportState.status !== "success" ? "" : t.t("csvExport.previewRows", {
3460
3441
  rowsMax: Math.min(zi, a.value),
3461
3442
  rowsTotal: a.value,
@@ -3465,42 +3446,42 @@ const ke = {
3465
3446
  }, h = T(() => {
3466
3447
  if (i.exportState.status !== "success" || !c.value || !i.exportState.chartData?.meta.metric_names)
3467
3448
  return { headers: [], rows: [], csvHeaders: {} };
3468
- const v = i.exportState.chartData, x = v.data.some((A) => A.timestamp !== v.data[0].timestamp), _ = v.data.map((A) => {
3469
- const ie = new Date(A.timestamp);
3449
+ const v = i.exportState.chartData, w = v.data.some((M) => M.timestamp !== v.data[0].timestamp), _ = v.data.map((M) => {
3450
+ const ie = new Date(M.timestamp);
3470
3451
  return {
3471
- ...Object.keys(A.event).reduce((f, m) => {
3472
- if (m in v.meta.display) {
3473
- const g = A.event[m], b = v.meta.display[m];
3474
- f[m] = g && b && b[g].name || A.event[m];
3452
+ ...Object.keys(M.event).reduce((m, f) => {
3453
+ if (f in v.meta.display) {
3454
+ const g = M.event[f], b = v.meta.display[f];
3455
+ m[f] = g && b && b[g].name || M.event[f];
3475
3456
  } else
3476
- f[m] = A.event[m];
3477
- return f;
3457
+ m[f] = M.event[f];
3458
+ return m;
3478
3459
  }, {}),
3479
- ...x ? {
3460
+ ...w ? {
3480
3461
  timestamp: _i(ie, "yyyy-MM-dd HH:mm:ss"),
3481
3462
  tzOffset: _i(ie, "XXX")
3482
3463
  } : {}
3483
3464
  };
3484
3465
  });
3485
3466
  let I = [];
3486
- x && (I = [
3467
+ w && (I = [
3487
3468
  { label: t.t("csvExport.Timestamp"), key: "timestamp" },
3488
3469
  { label: t.t("csvExport.UtcOffset"), key: "tzOffset" }
3489
3470
  ]);
3490
3471
  const S = "display" in i.exportState.chartData.meta && i.exportState.chartData.meta.display ? i.exportState.chartData.meta.display : {}, C = [
3491
3472
  ...I,
3492
- ...Object.keys(S).map((A) => ({
3473
+ ...Object.keys(S).map((M) => ({
3493
3474
  // @ts-ignore - dynamic i18n key
3494
- label: t.t(`chartLabels.${A}`),
3495
- key: A
3475
+ label: t.t(`chartLabels.${M}`),
3476
+ key: M
3496
3477
  })),
3497
- ...i.exportState.chartData.meta.metric_names.map((A) => ({
3478
+ ...i.exportState.chartData.meta.metric_names.map((M) => ({
3498
3479
  // @ts-ignore - dynamic i18n key
3499
- label: t.t(`chartLabels.${A}`),
3500
- key: A
3480
+ label: t.t(`chartLabels.${M}`),
3481
+ key: M
3501
3482
  }))
3502
- ], j = C.reduce((A, ie) => (A[ie.key] = ie.label, A), {});
3503
- return { headers: C, csvHeaders: j, rows: _ };
3483
+ ], Y = C.reduce((M, ie) => (M[ie.key] = ie.label, M), {});
3484
+ return { headers: C, csvHeaders: Y, rows: _ };
3504
3485
  }), y = async () => {
3505
3486
  if (i.exportState.status !== "success")
3506
3487
  return { total: 0, data: [] };
@@ -3512,10 +3493,10 @@ const ke = {
3512
3493
  };
3513
3494
  return Je(h, () => {
3514
3495
  o.value++;
3515
- }), (v, x) => {
3516
- const _ = be("KSkeleton"), I = be("KEmptyState"), S = be("KTableData"), C = be("KTooltip"), j = be("KButton"), A = be("KModal");
3517
- return M(), se("div", mo, [
3518
- ve(A, {
3496
+ }), (v, w) => {
3497
+ const _ = _e("KSkeleton"), I = _e("KEmptyState"), S = _e("KTableData"), C = _e("KTooltip"), Y = _e("KButton"), M = _e("KModal");
3498
+ return N(), ne("div", mo, [
3499
+ ge(M, {
3519
3500
  class: "vitals-report",
3520
3501
  "data-testid": "csv-export-modal",
3521
3502
  "show-dismiss-icon": "",
@@ -3524,17 +3505,17 @@ const ke = {
3524
3505
  onCancel: d,
3525
3506
  onKeyup: hs(d, ["esc"])
3526
3507
  }, {
3527
- default: X(() => [
3528
- me("div", null, [
3529
- n.exportState.status === "success" && c.value ? (M(), se("div", po, [
3530
- me("p", null, ae(n.modalDescription ? n.modalDescription : O(t).t("csvExport.exportDescription")), 1),
3531
- me("p", null, ae(O(t).t("csvExport.exportTimeRange")) + ": " + ae(l.value), 1)
3532
- ])) : ge("", !0),
3533
- n.exportState.status === "loading" ? (M(), Q(_, {
3508
+ default: j(() => [
3509
+ he("div", null, [
3510
+ n.exportState.status === "success" && c.value ? (N(), ne("div", po, [
3511
+ he("p", null, le(n.modalDescription ? n.modalDescription : O(t).t("csvExport.exportDescription")), 1),
3512
+ he("p", null, le(O(t).t("csvExport.exportTimeRange")) + ": " + le(l.value), 1)
3513
+ ])) : pe("", !0),
3514
+ n.exportState.status === "loading" ? (N(), K(_, {
3534
3515
  key: 1,
3535
3516
  class: "chart-skeleton",
3536
3517
  type: "table"
3537
- })) : n.exportState.status === "success" ? (M(), Q(S, {
3518
+ })) : n.exportState.status === "success" ? (N(), K(S, {
3538
3519
  key: 2,
3539
3520
  class: "vitals-table",
3540
3521
  fetcher: y,
@@ -3544,70 +3525,70 @@ const ke = {
3544
3525
  "row-hover": !1,
3545
3526
  sortable: !1
3546
3527
  }, {
3547
- "empty-state": X(() => [
3548
- ve(I, { "action-button-visible": !1 }, {
3549
- title: X(() => [
3550
- me("h5", null, ae(O(t).t("csvExport.noDataRange")), 1)
3528
+ "empty-state": j(() => [
3529
+ ge(I, { "action-button-visible": !1 }, {
3530
+ title: j(() => [
3531
+ he("h5", null, le(O(t).t("csvExport.noDataRange")), 1)
3551
3532
  ]),
3552
- default: X(() => [
3553
- me("p", null, ae(O(t).t("csvExport.noDataRetry")), 1)
3533
+ default: j(() => [
3534
+ he("p", null, le(O(t).t("csvExport.noDataRetry")), 1)
3554
3535
  ]),
3555
3536
  _: 1
3556
3537
  })
3557
3538
  ]),
3558
3539
  _: 1
3559
- }, 8, ["fetcher-cache-key", "headers"])) : n.exportState.status === "error" ? (M(), Q(I, {
3540
+ }, 8, ["fetcher-cache-key", "headers"])) : n.exportState.status === "error" ? (N(), K(I, {
3560
3541
  key: 3,
3561
3542
  "action-button-visible": !1
3562
3543
  }, {
3563
- title: X(() => [
3564
- me("h5", null, ae(O(t).t("csvExport.dataError")), 1)
3544
+ title: j(() => [
3545
+ he("h5", null, le(O(t).t("csvExport.dataError")), 1)
3565
3546
  ]),
3566
3547
  _: 1
3567
- })) : ge("", !0),
3568
- n.exportState.status === "success" && c.value ? (M(), se("div", go, [
3569
- Ke(ae(u.value) + " ", 1),
3570
- ve(C, {
3548
+ })) : pe("", !0),
3549
+ n.exportState.status === "success" && c.value ? (N(), ne("div", go, [
3550
+ Ke(le(u.value) + " ", 1),
3551
+ ge(C, {
3571
3552
  class: "preview-tooltip",
3572
3553
  placement: "right",
3573
3554
  text: O(t).t("csvExport.maximumRecordAmount", { value: O(Yi) })
3574
3555
  }, {
3575
- default: X(() => [
3576
- ve(O(bs), {
3556
+ default: j(() => [
3557
+ ge(O(ws), {
3577
3558
  color: `var(--kui-color-text-neutral, ${O(qt)})`,
3578
- size: `var(--kui-icon-size-30, ${O(wr)})`
3559
+ size: `var(--kui-icon-size-30, ${O(br)})`
3579
3560
  }, null, 8, ["color", "size"])
3580
3561
  ]),
3581
3562
  _: 1
3582
3563
  }, 8, ["text"])
3583
- ])) : ge("", !0)
3564
+ ])) : pe("", !0)
3584
3565
  ])
3585
3566
  ]),
3586
- "footer-actions": X(() => [
3587
- ve(j, {
3567
+ "footer-actions": j(() => [
3568
+ ge(Y, {
3588
3569
  appearance: "tertiary",
3589
3570
  class: "cancel-btn",
3590
3571
  onClick: d
3591
3572
  }, {
3592
- default: X(() => [
3593
- Ke(ae(O(t).t("csvExport.cancelButton")), 1)
3573
+ default: j(() => [
3574
+ Ke(le(O(t).t("csvExport.cancelButton")), 1)
3594
3575
  ]),
3595
3576
  _: 1
3596
3577
  }),
3597
- ve(zr, {
3578
+ ge(zr, {
3598
3579
  class: "vitals-report-export-button",
3599
3580
  filename: r,
3600
3581
  headers: h.value.csvHeaders,
3601
3582
  rows: h.value.rows
3602
3583
  }, {
3603
- default: X(() => [
3604
- ve(j, {
3584
+ default: j(() => [
3585
+ ge(Y, {
3605
3586
  appearance: "primary",
3606
3587
  "data-testid": "csv-download-button",
3607
3588
  disabled: n.exportState.status !== "success" || !c.value
3608
3589
  }, {
3609
- default: X(() => [
3610
- Ke(ae(O(t).t("csvExport.downloadButton")), 1)
3590
+ default: j(() => [
3591
+ Ke(le(O(t).t("csvExport.downloadButton")), 1)
3611
3592
  ]),
3612
3593
  _: 1
3613
3594
  }, 8, ["disabled"])
@@ -3624,8 +3605,8 @@ const ke = {
3624
3605
  var ns = /* @__PURE__ */ ((n) => (n.VALIDATING = "VALIDATING", n.VALIDATING_HAS_DATA = "VALIDATING_HAS_DATA", n.PENDING = "PENDING", n.SUCCESS = "SUCCESS", n.SUCCESS_HAS_DATA = "SUCCESS_HAS_DATA", n.ERROR = "ERROR", n.STALE_IF_ERROR = "STALE_IF_ERROR", n))(ns || {});
3625
3606
  const vo = (n) => n ? !!// TODO: revisit: currently only the first check ever matters?
3626
3607
  (Object.keys(n)?.length || n.data?.length || n.data?.data?.length || !n.data?.data && typeof n.data == "object" && Object.keys(n?.data).length) : !1;
3627
- function _o(n = V({}), e, t, i = vo) {
3628
- const s = V(
3608
+ function _o(n = X({}), e, t, i = vo) {
3609
+ const s = X(
3629
3610
  "PENDING"
3630
3611
  /* PENDING */
3631
3612
  );
@@ -3661,7 +3642,7 @@ function _o(n = V({}), e, t, i = vo) {
3661
3642
  swrvState: ns
3662
3643
  };
3663
3644
  }
3664
- const Yt = /* @__PURE__ */ _e({
3645
+ const Yt = /* @__PURE__ */ ye({
3665
3646
  __name: "QueryDataProvider",
3666
3647
  props: {
3667
3648
  context: {},
@@ -3672,7 +3653,7 @@ const Yt = /* @__PURE__ */ _e({
3672
3653
  },
3673
3654
  emits: ["chart-data", "query-complete"],
3674
3655
  setup(n, { emit: e }) {
3675
- const t = n, i = e, { i18n: s } = ke.useI18n(), { issueQuery: r } = ke.useIssueQuery(), o = qe(Ue), a = () => t.queryReady && o ? JSON.stringify([t.query, t.context, t.refreshCounter]) : null, { data: c, error: l, isValidating: u } = As(a, async () => {
3656
+ const t = n, i = e, { i18n: s } = ke.useI18n(), { issueQuery: r } = ke.useIssueQuery(), o = Pe(Ue), a = () => t.queryReady && o ? JSON.stringify([t.query, t.context, t.refreshCounter]) : null, { data: c, error: l, isValidating: u } = As(a, async () => {
3676
3657
  const S = a();
3677
3658
  try {
3678
3659
  const C = await r(t.query, t.context, t.limitOverride);
@@ -3688,42 +3669,39 @@ const Yt = /* @__PURE__ */ _e({
3688
3669
  refreshInterval: t.context.refreshInterval,
3689
3670
  revalidateOnFocus: !1,
3690
3671
  shouldRetryOnError: !1
3691
- }), { state: d, swrvState: h } = _o(c, l, u), y = V(null), v = T(() => d.value === h.ERROR || !!y.value), x = T(() => !t.queryReady || d.value === h.PENDING), _ = V(), I = T(() => c.value ?? (t.queryReady && d.value === h.PENDING ? _.value : void 0));
3672
+ }), { state: d, swrvState: h } = _o(c, l, u), y = X(null), v = T(() => d.value === h.ERROR || !!y.value), w = T(() => !t.queryReady || d.value === h.PENDING), _ = X(), I = T(() => c.value ?? (t.queryReady && d.value === h.PENDING ? _.value : void 0));
3692
3673
  return Je([() => c.value, () => d.value], ([S, C]) => {
3693
3674
  S && (C === "SUCCESS_HAS_DATA" || C === "SUCCESS") && S !== _.value && (_.value = S, i("chart-data", S));
3694
3675
  }), (S, C) => {
3695
- const j = be("KSkeleton"), A = be("KEmptyState");
3696
- return (x.value || !O(c) && !v.value) && !I.value ? (M(), Q(j, {
3676
+ const Y = _e("KSkeleton"), M = _e("KEmptyState");
3677
+ return (w.value || !O(c) && !v.value) && !I.value ? (N(), K(Y, {
3697
3678
  key: 0,
3698
3679
  class: "chart-skeleton",
3699
3680
  type: "table"
3700
- })) : v.value && !x.value ? (M(), Q(A, {
3681
+ })) : v.value && !w.value ? (N(), K(M, {
3701
3682
  key: 1,
3702
3683
  "action-button-visible": !1,
3703
3684
  "data-testid": "chart-empty-state"
3704
3685
  }, kt({
3705
- icon: X(() => [
3706
- y.value?.type === "forbidden" ? (M(), Q(O(ws), { key: 0 })) : (M(), Q(O(xs), { key: 1 }))
3686
+ icon: j(() => [
3687
+ y.value?.type === "forbidden" ? (N(), K(O(bs), { key: 0 })) : (N(), K(O(xs), { key: 1 }))
3707
3688
  ]),
3708
- title: X(() => [
3709
- me("p", null, ae(y.value?.message || O(s).t("renderer.unexpectedError")), 1)
3689
+ title: j(() => [
3690
+ he("p", null, le(y.value?.message || O(s).t("renderer.unexpectedError")), 1)
3710
3691
  ]),
3711
3692
  _: 2
3712
3693
  }, [
3713
3694
  y.value?.details ? {
3714
3695
  name: "default",
3715
- fn: X(() => [
3716
- me("p", null, ae(y.value.details), 1)
3696
+ fn: j(() => [
3697
+ he("p", null, le(y.value.details), 1)
3717
3698
  ]),
3718
3699
  key: "0"
3719
3700
  } : void 0
3720
- ]), 1024)) : I.value ? Xe(S.$slots, "default", {
3721
- key: 2,
3722
- data: I.value
3723
- }) : ge("", !0);
3701
+ ]), 1024)) : I.value ? Xe(S.$slots, "default", { data: I.value }, void 0, void 0, 2) : pe("", !0);
3724
3702
  };
3725
3703
  }
3726
- }), bo = /* @__PURE__ */ _e({
3704
+ }), wo = /* @__PURE__ */ ye({
3727
3705
  __name: "SimpleChartRenderer",
3728
3706
  props: {
3729
3707
  query: {},
@@ -3738,18 +3716,18 @@ const Yt = /* @__PURE__ */ _e({
3738
3716
  },
3739
3717
  setup(n) {
3740
3718
  const e = n, t = T(() => e.chartOptions.type === "single_value");
3741
- return (i, s) => (M(), Q(Yt, {
3719
+ return (i, s) => (N(), K(Yt, {
3742
3720
  context: n.context,
3743
3721
  query: n.query,
3744
3722
  "query-ready": n.queryReady,
3745
3723
  "refresh-counter": n.refreshCounter
3746
3724
  }, {
3747
- default: X(({ data: r }) => [
3748
- me("div", {
3725
+ default: j(({ data: r }) => [
3726
+ he("div", {
3749
3727
  class: et(["analytics-chart", { "single-value": t.value }]),
3750
3728
  style: gt(t.value ? void 0 : { height: `${n.height}px` })
3751
3729
  }, [
3752
- ve(O(zs), {
3730
+ ge(O(zs), {
3753
3731
  "chart-data": r,
3754
3732
  "chart-options": n.chartOptions,
3755
3733
  "synthetics-data-key": t.value ? void 0 : n.chartOptions.synthetics_data_key
@@ -3764,7 +3742,7 @@ const Yt = /* @__PURE__ */ _e({
3764
3742
  for (const [i, s] of e)
3765
3743
  t[i] = s;
3766
3744
  return t;
3767
- }, Ni = /* @__PURE__ */ We(bo, [["__scopeId", "data-v-2cbfac70"]]), wo = { class: "analytics-chart" }, xo = /* @__PURE__ */ _e({
3745
+ }, Ni = /* @__PURE__ */ We(wo, [["__scopeId", "data-v-2cbfac70"]]), bo = { class: "analytics-chart" }, xo = /* @__PURE__ */ ye({
3768
3746
  __name: "BaseAnalyticsChartRenderer",
3769
3747
  props: {
3770
3748
  query: {},
@@ -3792,17 +3770,17 @@ const Yt = /* @__PURE__ */ _e({
3792
3770
  i("chart-data", l);
3793
3771
  };
3794
3772
  return (l, u) => {
3795
- const d = be("KDropdownItem");
3796
- return M(), Q(Yt, {
3773
+ const d = _e("KDropdownItem");
3774
+ return N(), K(Yt, {
3797
3775
  context: n.context,
3798
3776
  query: n.query,
3799
3777
  "query-ready": n.queryReady,
3800
3778
  "refresh-counter": n.refreshCounter,
3801
3779
  onChartData: c
3802
3780
  }, {
3803
- default: X(({ data: h }) => [
3804
- me("div", wo, [
3805
- ve(O(Ns), Ui({
3781
+ default: j(({ data: h }) => [
3782
+ he("div", bo, [
3783
+ ge(O(Ns), Ui({
3806
3784
  "chart-data": h,
3807
3785
  "chart-options": r.value,
3808
3786
  "explore-link": n.exploreLink,
@@ -3817,10 +3795,10 @@ const Yt = /* @__PURE__ */ _e({
3817
3795
  }), kt({ _: 2 }, [
3818
3796
  n.context.editable ? {
3819
3797
  name: "menu-items",
3820
- fn: X(() => [
3821
- ve(d, { onClick: a }, {
3822
- default: X(() => [
3823
- Ke(ae(O(s).t("renderer.edit")), 1)
3798
+ fn: j(() => [
3799
+ ge(d, { onClick: a }, {
3800
+ default: j(() => [
3801
+ Ke(le(O(s).t("renderer.edit")), 1)
3824
3802
  ]),
3825
3803
  _: 1
3826
3804
  })
@@ -3834,7 +3812,7 @@ const Yt = /* @__PURE__ */ _e({
3834
3812
  }, 8, ["context", "query", "query-ready", "refresh-counter"]);
3835
3813
  };
3836
3814
  }
3837
- }), jt = /* @__PURE__ */ We(xo, [["__scopeId", "data-v-e1e7f610"]]), Mi = /* @__PURE__ */ _e({
3815
+ }), jt = /* @__PURE__ */ We(xo, [["__scopeId", "data-v-e1e7f610"]]), Mi = /* @__PURE__ */ ye({
3838
3816
  __name: "BarChartRenderer",
3839
3817
  props: {
3840
3818
  query: {},
@@ -3848,7 +3826,7 @@ const Yt = /* @__PURE__ */ _e({
3848
3826
  exploreLink: {}
3849
3827
  },
3850
3828
  setup(n) {
3851
- return (e, t) => (M(), Q(jt, {
3829
+ return (e, t) => (N(), K(jt, {
3852
3830
  "chart-options": n.chartOptions,
3853
3831
  context: n.context,
3854
3832
  "extra-props": { showAnnotations: !1 },
@@ -3858,7 +3836,7 @@ const Yt = /* @__PURE__ */ _e({
3858
3836
  "refresh-counter": n.refreshCounter
3859
3837
  }, null, 8, ["chart-options", "context", "height", "query", "query-ready", "refresh-counter"]));
3860
3838
  }
3861
- }), Ai = /* @__PURE__ */ _e({
3839
+ }), Ai = /* @__PURE__ */ ye({
3862
3840
  __name: "TimeseriesChartRenderer",
3863
3841
  props: {
3864
3842
  query: {},
@@ -3874,7 +3852,7 @@ const Yt = /* @__PURE__ */ _e({
3874
3852
  emits: ["zoom-time-range", "select-chart-range"],
3875
3853
  setup(n, { emit: e }) {
3876
3854
  const t = e;
3877
- return (i, s) => (M(), Q(jt, {
3855
+ return (i, s) => (N(), K(jt, {
3878
3856
  "chart-options": n.chartOptions,
3879
3857
  context: n.context,
3880
3858
  "explore-link": n.exploreLink,
@@ -3887,7 +3865,7 @@ const Yt = /* @__PURE__ */ _e({
3887
3865
  onZoomTimeRange: s[1] || (s[1] = (r) => t("zoom-time-range", r))
3888
3866
  }, null, 8, ["chart-options", "context", "explore-link", "height", "query", "query-ready", "refresh-counter", "requests-link"]));
3889
3867
  }
3890
- }), Eo = /* @__PURE__ */ _e({
3868
+ }), Eo = /* @__PURE__ */ ye({
3891
3869
  __name: "GoldenSignalsRenderer",
3892
3870
  props: {
3893
3871
  query: {},
@@ -3917,12 +3895,12 @@ const Yt = /* @__PURE__ */ _e({
3917
3895
  refreshCounter: e.refreshCounter
3918
3896
  };
3919
3897
  }), i = T(() => !!(e.chartOptions.chart_title || e.headerDescription));
3920
- return (s, r) => (M(), se("div", {
3898
+ return (s, r) => (N(), ne("div", {
3921
3899
  class: et(["metric-card-tile-wrapper", { titled: i.value }])
3922
3900
  }, [
3923
- ve(O(Ls), fs(ms(t.value)), {
3924
- default: X(() => [
3925
- ve(O(Is))
3901
+ ge(O(Ls), fs(ms(t.value)), {
3902
+ default: j(() => [
3903
+ ge(O(Is))
3926
3904
  ]),
3927
3905
  _: 1
3928
3906
  }, 16)
@@ -3931,15 +3909,15 @@ const Yt = /* @__PURE__ */ _e({
3931
3909
  }), Co = /* @__PURE__ */ We(Eo, [["__scopeId", "data-v-3eda5028"]]), Ro = {
3932
3910
  class: "fallback-entity-link",
3933
3911
  "data-testid": "entity-link-parent"
3934
- }, Li = /* @__PURE__ */ _e({
3912
+ }, Li = /* @__PURE__ */ ye({
3935
3913
  __name: "FallbackEntityLink",
3936
3914
  props: {
3937
3915
  entityLinkData: {}
3938
3916
  },
3939
3917
  setup(n) {
3940
- return (e, t) => (M(), se("div", Ro, ae(n.entityLinkData.label), 1));
3918
+ return (e, t) => (N(), ne("div", Ro, le(n.entityLinkData.label), 1));
3941
3919
  }
3942
- }), ko = { key: 0 }, To = { key: 1 }, So = /* @__PURE__ */ _e({
3920
+ }), ko = { key: 0 }, To = { key: 1 }, So = /* @__PURE__ */ ye({
3943
3921
  __name: "TopNTableRenderer",
3944
3922
  props: {
3945
3923
  query: {},
@@ -3953,7 +3931,7 @@ const Yt = /* @__PURE__ */ _e({
3953
3931
  exploreLink: {}
3954
3932
  },
3955
3933
  setup(n) {
3956
- const e = n, t = qe(Ue), i = $i(async () => {
3934
+ const e = n, t = Pe(Ue), i = $i(async () => {
3957
3935
  if (t?.fetchComponent)
3958
3936
  try {
3959
3937
  return await t.fetchComponent("EntityLink");
@@ -3977,21 +3955,21 @@ const Yt = /* @__PURE__ */ _e({
3977
3955
  return u.replace(Ci, l.id);
3978
3956
  return "";
3979
3957
  };
3980
- return (l, u) => (M(), Q(Yt, {
3958
+ return (l, u) => (N(), K(Yt, {
3981
3959
  context: n.context,
3982
3960
  query: n.query,
3983
3961
  "query-ready": n.queryReady,
3984
3962
  "refresh-counter": n.refreshCounter
3985
3963
  }, {
3986
- default: X(({ data: d }) => [
3987
- ve(O(Ms), {
3964
+ default: j(({ data: d }) => [
3965
+ ge(O(Ms), {
3988
3966
  data: d,
3989
3967
  "synthetics-data-key": n.chartOptions.synthetics_data_key
3990
3968
  }, kt({ _: 2 }, [
3991
3969
  s.value ? {
3992
3970
  name: "name",
3993
- fn: X(({ record: h }) => [
3994
- !h.isEmpty && a(h) ? (M(), Q(O(i), {
3971
+ fn: j(({ record: h }) => [
3972
+ !h.isEmpty && a(h) ? (N(), K(O(i), {
3995
3973
  key: 0,
3996
3974
  "entity-link-data": {
3997
3975
  id: h.id,
@@ -3999,8 +3977,8 @@ const Yt = /* @__PURE__ */ _e({
3999
3977
  deleted: h.deleted
4000
3978
  },
4001
3979
  "external-link": c(h)
4002
- }, null, 8, ["entity-link-data", "external-link"])) : (M(), se(Ht, { key: 1 }, [
4003
- h.name === "empty" ? (M(), se("i", ko, ae(h.name), 1)) : (M(), se("span", To, ae(h.name), 1))
3980
+ }, null, 8, ["entity-link-data", "external-link"])) : (N(), ne(Ht, { key: 1 }, [
3981
+ h.name === "empty" ? (N(), ne("i", ko, le(h.name), 1)) : (N(), ne("span", To, le(h.name), 1))
4004
3982
  ], 64))
4005
3983
  ]),
4006
3984
  key: "0"
@@ -4070,7 +4048,7 @@ const Yt = /* @__PURE__ */ _e({
4070
4048
  /** @deprecated Use `platform_usage`. */
4071
4049
  platform: Pi,
4072
4050
  platform_usage: Pi
4073
- }, No = /* @__PURE__ */ _e({
4051
+ }, No = /* @__PURE__ */ ye({
4074
4052
  __name: "TableDataGridRenderer",
4075
4053
  props: {
4076
4054
  query: {},
@@ -4081,7 +4059,7 @@ const Yt = /* @__PURE__ */ _e({
4081
4059
  },
4082
4060
  emits: ["loading-change"],
4083
4061
  setup(n, { emit: e }) {
4084
- const t = n, i = e, s = qe(Ue), r = ut(), { i18n: o } = ke.useI18n(), a = new AbortController(), c = V([]), l = V(!1), u = T(() => t.height === void 0 ? void 0 : { height: `${t.height}px` }), d = T(() => ({
4062
+ const t = n, i = e, s = Pe(Ue), r = ut(), { i18n: o } = ke.useI18n(), a = new AbortController(), c = X([]), l = X(!1), u = T(() => t.height === void 0 ? void 0 : { height: `${t.height}px` }), d = T(() => ({
4085
4063
  datasource: t.query.datasource,
4086
4064
  query: {
4087
4065
  columns: t.query.columns,
@@ -4126,8 +4104,8 @@ const Yt = /* @__PURE__ */ _e({
4126
4104
  cursor: _,
4127
4105
  pageSize: I,
4128
4106
  query: d.value,
4129
- onResponseColumns: (j) => {
4130
- c.value = j;
4107
+ onResponseColumns: (Y) => {
4108
+ c.value = Y;
4131
4109
  },
4132
4110
  stripUnknownFilters: r.stripUnknownFilters,
4133
4111
  tabularQueryFn: s?.tabularQueryFn
@@ -4136,24 +4114,24 @@ const Yt = /* @__PURE__ */ _e({
4136
4114
  } catch (S) {
4137
4115
  throw l.value = !0, S;
4138
4116
  }
4139
- }), x = (_) => {
4117
+ }), w = (_) => {
4140
4118
  _.state === "error" && (l.value = !0), i("loading-change", _.state === "loading");
4141
4119
  };
4142
4120
  return (_, I) => {
4143
- const S = be("KSkeleton");
4144
- return M(), se("div", {
4121
+ const S = _e("KSkeleton");
4122
+ return N(), ne("div", {
4145
4123
  class: "table-data-grid-renderer",
4146
4124
  style: gt(u.value)
4147
4125
  }, [
4148
- n.queryReady ? (M(), Q(O(Ps), {
4126
+ n.queryReady ? (N(), K(O(Ps), {
4149
4127
  key: 1,
4150
4128
  error: l.value,
4151
4129
  fetcher: v.value,
4152
4130
  headers: y.value,
4153
4131
  "page-size": n.query.page_size,
4154
4132
  "refresh-key": h.value,
4155
- onState: x
4156
- }, null, 8, ["error", "fetcher", "headers", "page-size", "refresh-key"])) : (M(), Q(S, {
4133
+ onState: w
4134
+ }, null, 8, ["error", "fetcher", "headers", "page-size", "refresh-key"])) : (N(), K(S, {
4157
4135
  key: 0,
4158
4136
  "data-testid": "table-skeleton",
4159
4137
  type: "table"
@@ -4161,7 +4139,7 @@ const Yt = /* @__PURE__ */ _e({
4161
4139
  ], 4);
4162
4140
  };
4163
4141
  }
4164
- }), Mo = /* @__PURE__ */ We(No, [["__scopeId", "data-v-c49ff2eb"]]), Ao = /* @__PURE__ */ _e({
4142
+ }), Mo = /* @__PURE__ */ We(No, [["__scopeId", "data-v-c49ff2eb"]]), Ao = /* @__PURE__ */ ye({
4165
4143
  __name: "DonutChartRenderer",
4166
4144
  props: {
4167
4145
  query: {},
@@ -4175,7 +4153,7 @@ const Yt = /* @__PURE__ */ _e({
4175
4153
  exploreLink: {}
4176
4154
  },
4177
4155
  setup(n) {
4178
- return (e, t) => (M(), Q(jt, {
4156
+ return (e, t) => (N(), K(jt, {
4179
4157
  "chart-options": n.chartOptions,
4180
4158
  context: n.context,
4181
4159
  height: n.height,
@@ -4187,7 +4165,7 @@ const Yt = /* @__PURE__ */ _e({
4187
4165
  }), Lo = ["data-testid"], Io = {
4188
4166
  key: 0,
4189
4167
  class: "tile-header"
4190
- }, Po = { class: "badge-container" }, qo = { class: "badge-text" }, Ho = { key: 0 }, Fo = ["data-testid"], Uo = ["data-testid"], $o = ["data-testid"], Bo = { class: "delete-option" }, Wo = ["data-testid"], Go = /* @__PURE__ */ _e({
4168
+ }, Po = { class: "badge-container" }, qo = { class: "badge-text" }, Ho = { key: 0 }, Fo = ["data-testid"], Uo = ["data-testid"], $o = ["data-testid"], Bo = { class: "delete-option" }, Wo = ["data-testid"], Go = /* @__PURE__ */ ye({
4191
4169
  __name: "DashboardTile",
4192
4170
  props: /* @__PURE__ */ yt({
4193
4171
  context: {},
@@ -4211,17 +4189,17 @@ const Yt = /* @__PURE__ */ _e({
4211
4189
  }));
4212
4190
  const i = parseInt(es, 10), s = n, r = Bi(n, "refreshCounter"), o = () => {
4213
4191
  S.value = !0, r.value++;
4214
- }, a = t, c = $i(() => import("./GeoMapRenderer-CJZ-Y-RA.js")), l = qe(Ue), u = ut(), { stripUnknownFilters: d } = rt(u), { i18n: h } = ke.useI18n(), y = V(), v = V({ status: "loading" }), x = V(!1), _ = V(), I = V(!1), S = V(!0), C = T(() => s.definition.chart), j = T(() => "chart_title" in C.value ? C.value.chart_title : void 0), A = T(() => s.definition.header_description), ie = T(() => C.value.type === "slottable"), G = T(() => ze(s.definition) ? !1 : !("allow_csv_export" in C.value) || C.value.allow_csv_export !== !1), {
4215
- exploreLinkKebabMenu: f,
4216
- requestsLinkKebabMenu: m,
4192
+ }, a = t, c = $i(() => import("./GeoMapRenderer-Ee-dYyas.js")), l = Pe(Ue), u = ut(), { stripUnknownFilters: d } = rt(u), { i18n: h } = ke.useI18n(), y = X(), v = X({ status: "loading" }), w = X(!1), _ = X(), I = X(!1), S = X(!0), C = T(() => s.definition.chart), Y = T(() => "chart_title" in C.value ? C.value.chart_title : void 0), M = T(() => s.definition.header_description), ie = T(() => C.value.type === "slottable"), Q = T(() => ze(s.definition) ? !1 : !("allow_csv_export" in C.value) || C.value.allow_csv_export !== !1), {
4193
+ exploreLinkKebabMenu: m,
4194
+ requestsLinkKebabMenu: f,
4217
4195
  canShowKebabMenu: g,
4218
4196
  canGenerateRequestsLink: b,
4219
- canGenerateExploreLink: w,
4220
- requestsLinkZoomActions: N,
4221
- exploreLinkZoomActions: Z,
4222
- buildExploreQuery: pe,
4223
- buildExploreLink: le,
4224
- buildRequestLink: $,
4197
+ canGenerateExploreLink: x,
4198
+ requestsLinkZoomActions: L,
4199
+ exploreLinkZoomActions: re,
4200
+ buildExploreQuery: ve,
4201
+ buildExploreLink: de,
4202
+ buildRequestLink: V,
4225
4203
  buildRequestsQueryZoomActions: R
4226
4204
  } = ke.useContextLinks({
4227
4205
  queryBridge: l,
@@ -4236,7 +4214,7 @@ const Yt = /* @__PURE__ */ _e({
4236
4214
  } catch {
4237
4215
  }
4238
4216
  }, { immediate: !0, deep: !0 });
4239
- const q = T(() => h.t("csvExport.defaultFilename")), k = T(() => !!f.value || G.value || s.context.editable), L = T(() => !s.hideActions && g.value && k.value), z = T(() => L.value && k.value && !s.isFullscreen), de = {
4217
+ const F = T(() => h.t("csvExport.defaultFilename")), k = T(() => !!m.value || Q.value || s.context.editable), A = T(() => !s.hideActions && g.value && k.value), z = T(() => A.value && k.value && !s.isFullscreen), we = {
4240
4218
  timeseries_line: Ai,
4241
4219
  timeseries_bar: Ai,
4242
4220
  horizontal_bar: Mi,
@@ -4249,13 +4227,13 @@ const Yt = /* @__PURE__ */ _e({
4249
4227
  slottable: void 0,
4250
4228
  single_value: Ni,
4251
4229
  choropleth_map: c
4252
- }, he = T(() => ({
4253
- ...ne.value?.rendererEvents.supportsRequests ? { "select-chart-range": Oe } : {},
4254
- ...ne.value?.rendererEvents.supportsZoom ? { "zoom-time-range": Ge } : {},
4255
- ...ne.value?.rendererEvents.supportsBounds ? { "bounds-change": ye } : {},
4256
- ...ne.value?.rendererEvents.supportsLoadingChange ? { "loading-change": re } : {}
4257
- })), ne = T(() => {
4258
- const D = s.definition, U = de[D.chart.type], oe = ze(D), Ne = !!U?.emits?.includes("select-chart-range"), Fe = !!U?.emits?.includes("zoom-time-range"), Ce = D.chart.type === "choropleth_map", Re = !!U?.emits?.includes("loading-change"), Ye = {
4230
+ }, se = T(() => ({
4231
+ ...Z.value?.rendererEvents.supportsRequests ? { "select-chart-range": Oe } : {},
4232
+ ...Z.value?.rendererEvents.supportsZoom ? { "zoom-time-range": Ge } : {},
4233
+ ...Z.value?.rendererEvents.supportsBounds ? { "bounds-change": me } : {},
4234
+ ...Z.value?.rendererEvents.supportsLoadingChange ? { "loading-change": oe } : {}
4235
+ })), Z = T(() => {
4236
+ const D = s.definition, U = we[D.chart.type], ae = ze(D), Ne = !!U?.emits?.includes("select-chart-range"), Fe = !!U?.emits?.includes("zoom-time-range"), Ce = D.chart.type === "choropleth_map", Re = !!U?.emits?.includes("loading-change"), Ye = {
4259
4237
  query: D.query,
4260
4238
  context: s.context,
4261
4239
  queryReady: s.queryReady,
@@ -4263,15 +4241,15 @@ const Yt = /* @__PURE__ */ _e({
4263
4241
  refreshCounter: r.value
4264
4242
  }, ht = {
4265
4243
  chartOptions: D.chart,
4266
- headerDescription: A.value,
4267
- requestsLink: s.hideZoomActions ? void 0 : N.value,
4268
- exploreLink: s.hideZoomActions ? void 0 : Z.value
4244
+ headerDescription: M.value,
4245
+ requestsLink: s.hideZoomActions ? void 0 : L.value,
4246
+ exploreLink: s.hideZoomActions ? void 0 : re.value
4269
4247
  };
4270
4248
  return U && {
4271
4249
  component: U,
4272
4250
  rendererProps: {
4273
4251
  ...Ye,
4274
- ...oe ? {} : ht
4252
+ ...ae ? {} : ht
4275
4253
  },
4276
4254
  rendererEvents: {
4277
4255
  supportsRequests: Ne,
@@ -4280,31 +4258,31 @@ const Yt = /* @__PURE__ */ _e({
4280
4258
  supportsLoadingChange: Re
4281
4259
  }
4282
4260
  };
4283
- }), we = T(() => {
4261
+ }), be = T(() => {
4284
4262
  if (ze(s.definition))
4285
4263
  return null;
4286
4264
  const D = s.definition.query, U = D?.time_range;
4287
4265
  if ($t(D?.datasource) && !D.dimensions?.includes("time"))
4288
4266
  return h.t("renderer.as_of_today");
4289
4267
  if (U?.type === "relative") {
4290
- const oe = vs.get(_s[U.time_range]);
4291
- return oe ? oe.display : (console.warn("Did not recognize the given relative time range:", U.time_range), U.time_range);
4268
+ const ae = vs.get(_s[U.time_range]);
4269
+ return ae ? ae.display : (console.warn("Did not recognize the given relative time range:", U.time_range), U.time_range);
4292
4270
  } else if (U?.type === "absolute") {
4293
- const oe = U.tz || "Etc/UTC";
4294
- return `${ei(U.start, { short: !0, tz: oe })} - ${ei(U.end, { short: !0, tz: oe })}`;
4271
+ const ae = U.tz || "Etc/UTC";
4272
+ return `${ei(U.start, { short: !0, tz: ae })} - ${ei(U.end, { short: !0, tz: ae })}`;
4295
4273
  }
4296
4274
  return null;
4297
4275
  }), W = T(() => ie.value ? !1 : [
4298
- !!j.value,
4276
+ !!Y.value,
4299
4277
  z.value,
4300
- !!we.value,
4301
- !!A.value,
4278
+ !!be.value,
4279
+ !!M.value,
4302
4280
  s.showRefresh
4303
- ].some(Boolean)), K = T(() => y.value ? It(y.value.meta.granularity_ms) : void 0), ue = T(() => ["timeseries_line", "timeseries_bar"].includes(C.value.type)), F = T(() => {
4281
+ ].some(Boolean)), B = T(() => y.value ? It(y.value.meta.granularity_ms) : void 0), ue = T(() => ["timeseries_line", "timeseries_bar"].includes(C.value.type)), H = T(() => {
4304
4282
  if (ze(s.definition) || !ue.value || !s.queryReady || S.value)
4305
4283
  return !1;
4306
4284
  const D = s.definition.query.granularity;
4307
- return !D || !K.value ? !1 : D !== K.value;
4285
+ return !D || !B.value ? !1 : D !== B.value;
4308
4286
  }), ce = T(() => {
4309
4287
  const D = It(y.value?.meta.granularity_ms ?? 0) ?? "unknown", U = ze(s.definition) ? "unknown" : s.definition.query.granularity ?? "unknown";
4310
4288
  return h.t("query_aged_out_warning", {
@@ -4312,35 +4290,35 @@ const Yt = /* @__PURE__ */ _e({
4312
4290
  savedGranularity: h.t(`granularities.${U}`)
4313
4291
  });
4314
4292
  }), fe = T(() => {
4315
- const D = s.definition, U = [...s.context.filters, ...D.query.filters ?? []], oe = "metrics" in D.query ? D.query.metrics : void 0, Ne = D.query.datasource ?? "api_usage";
4293
+ const D = s.definition, U = [...s.context.filters, ...D.query.filters ?? []], ae = "metrics" in D.query ? D.query.metrics : void 0, Ne = D.query.datasource ?? "api_usage";
4316
4294
  return d.value({
4317
4295
  datasource: Ne,
4318
4296
  filters: U,
4319
- queryFields: oe
4297
+ queryFields: ae
4320
4298
  });
4321
4299
  }), J = () => {
4322
4300
  a("edit-tile", s.definition);
4323
4301
  }, te = () => {
4324
4302
  a("duplicate-tile", s.definition);
4325
- }, Y = () => {
4303
+ }, G = () => {
4326
4304
  a("remove-tile", s.definition);
4327
4305
  }, Te = (D) => {
4328
4306
  y.value = D, S.value = !1, a("chart-data", D), a("tile-loaded");
4329
- }, B = () => {
4307
+ }, $ = () => {
4330
4308
  S.value = !1, a("tile-loaded");
4331
- }, re = (D) => {
4309
+ }, oe = (D) => {
4332
4310
  S.value = D, D || a("tile-loaded");
4333
- }, Le = () => {
4334
- x.value = !1;
4311
+ }, qe = () => {
4312
+ w.value = !1;
4335
4313
  }, He = () => {
4336
4314
  const D = s.definition.query.datasource?.startsWith("goap");
4337
- return l?.staticConfig?.increaseCsvExportLimit !== !1 && !D ? E(s.definition.query, s.context, Yi) : y.value ? Promise.resolve(y.value) : new Promise((oe) => {
4315
+ return l?.staticConfig?.increaseCsvExportLimit !== !1 && !D ? E(s.definition.query, s.context, Yi) : y.value ? Promise.resolve(y.value) : new Promise((ae) => {
4338
4316
  const Ne = Je(y, (Fe) => {
4339
- Fe && (oe(Fe), Ne());
4317
+ Fe && (ae(Fe), Ne());
4340
4318
  });
4341
4319
  });
4342
4320
  }, De = async () => {
4343
- x.value = !0, v.value = { status: "loading" };
4321
+ w.value = !0, v.value = { status: "loading" };
4344
4322
  try {
4345
4323
  const D = await He();
4346
4324
  v.value = { status: "success", chartData: D };
@@ -4353,66 +4331,66 @@ const Yt = /* @__PURE__ */ _e({
4353
4331
  timeRange: D
4354
4332
  };
4355
4333
  a("tile-time-range-zoom", U);
4356
- }, ye = (D) => {
4334
+ }, me = (D) => {
4357
4335
  const U = {
4358
4336
  tileId: s.tileId.toString(),
4359
4337
  bounds: D
4360
4338
  };
4361
4339
  a("tile-bounds-change", U);
4362
4340
  }, Oe = (D) => {
4363
- const U = fe.value, oe = pe(D, U);
4364
- Z.value = w.value ? { href: le(oe) } : void 0, N.value = b.value ? { href: $(R(D, U)) } : void 0;
4341
+ const U = fe.value, ae = ve(D, U);
4342
+ re.value = x.value ? { href: de(ae) } : void 0, L.value = b.value ? { href: V(R(D, U)) } : void 0;
4365
4343
  };
4366
4344
  return e({ getExportData: He }), (D, U) => {
4367
- const oe = be("KTooltip"), Ne = be("KBadge"), Fe = be("KButton"), Ce = be("KDropdownItem"), Re = be("KDropdown");
4368
- return M(), se("div", {
4345
+ const ae = _e("KTooltip"), Ne = _e("KBadge"), Fe = _e("KButton"), Ce = _e("KDropdownItem"), Re = _e("KDropdown");
4346
+ return N(), ne("div", {
4369
4347
  class: et(["tile-boundary", {
4370
4348
  editable: n.context.editable,
4371
4349
  headless: !W.value
4372
4350
  }]),
4373
4351
  "data-testid": `tile-${n.tileId}`
4374
4352
  }, [
4375
- W.value && !ie.value ? (M(), se("div", Io, [
4376
- ve(oe, {
4353
+ W.value && !ie.value ? (N(), ne("div", Io, [
4354
+ ge(ae, {
4377
4355
  class: "title-tooltip",
4378
4356
  disabled: !I.value,
4379
4357
  "max-width": "500",
4380
- text: j.value
4358
+ text: Y.value
4381
4359
  }, {
4382
- default: X(() => [
4383
- me("div", {
4360
+ default: j(() => [
4361
+ he("div", {
4384
4362
  ref_key: "titleRef",
4385
4363
  ref: _,
4386
4364
  class: "title"
4387
- }, ae(j.value), 513)
4365
+ }, le(Y.value), 513)
4388
4366
  ]),
4389
4367
  _: 1
4390
4368
  }, 8, ["disabled", "text"]),
4391
- me("div", Po, [
4392
- we.value ? (M(), Q(Ne, {
4369
+ he("div", Po, [
4370
+ be.value ? (N(), K(Ne, {
4393
4371
  key: 0,
4394
4372
  "data-testid": "time-range-badge",
4395
- tooltip: F.value ? ce.value : void 0,
4373
+ tooltip: H.value ? ce.value : void 0,
4396
4374
  "tooltip-attributes": { maxWidth: "320px" }
4397
4375
  }, kt({
4398
- default: X(() => [
4399
- me("span", qo, ae(we.value), 1)
4376
+ default: j(() => [
4377
+ he("span", qo, le(be.value), 1)
4400
4378
  ]),
4401
4379
  _: 2
4402
4380
  }, [
4403
- F.value ? {
4381
+ H.value ? {
4404
4382
  name: "icon",
4405
- fn: X(() => [
4406
- ve(O(Es), {
4407
- size: `var(--kui-icon-size-20, ${O(br)})`
4383
+ fn: j(() => [
4384
+ ge(O(Es), {
4385
+ size: `var(--kui-icon-size-20, ${O(wr)})`
4408
4386
  }, null, 8, ["size"])
4409
4387
  ]),
4410
4388
  key: "0"
4411
4389
  } : void 0
4412
- ]), 1032, ["tooltip"])) : ge("", !0)
4390
+ ]), 1032, ["tooltip"])) : pe("", !0)
4413
4391
  ]),
4414
- n.showRefresh ? (M(), se("div", Ho, [
4415
- ve(Fe, {
4392
+ n.showRefresh ? (N(), ne("div", Ho, [
4393
+ ge(Fe, {
4416
4394
  appearance: "secondary",
4417
4395
  class: "refresh-button",
4418
4396
  "data-testid": `tile-refresh-button-${n.tileId}`,
@@ -4421,119 +4399,119 @@ const Yt = /* @__PURE__ */ _e({
4421
4399
  size: "small",
4422
4400
  onClick: o
4423
4401
  }, {
4424
- default: X(() => [
4425
- S.value ? (M(), Q(O(Cs), {
4402
+ default: j(() => [
4403
+ S.value ? (N(), K(O(Cs), {
4426
4404
  key: 0,
4427
4405
  role: "button",
4428
- size: `var(--kui-icon-size-60, ${O(wi)})`,
4406
+ size: `var(--kui-icon-size-60, ${O(bi)})`,
4429
4407
  tabindex: "0"
4430
- }, null, 8, ["size"])) : (M(), Q(O(Rs), {
4408
+ }, null, 8, ["size"])) : (N(), K(O(Rs), {
4431
4409
  key: 1,
4432
4410
  role: "button",
4433
- size: `var(--kui-icon-size-60, ${O(wi)})`,
4411
+ size: `var(--kui-icon-size-60, ${O(bi)})`,
4434
4412
  tabindex: "0"
4435
4413
  }, null, 8, ["size"]))
4436
4414
  ]),
4437
4415
  _: 1
4438
4416
  }, 8, ["data-testid", "disabled"])
4439
- ])) : ge("", !0),
4440
- A.value ? (M(), se("div", {
4417
+ ])) : pe("", !0),
4418
+ M.value ? (N(), ne("div", {
4441
4419
  key: 1,
4442
4420
  class: "header-description",
4443
4421
  "data-testid": `tile-description-${n.tileId}`
4444
- }, ae(A.value), 9, Fo)) : ge("", !0),
4445
- L.value ? (M(), se("div", {
4422
+ }, le(M.value), 9, Fo)) : pe("", !0),
4423
+ A.value ? (N(), ne("div", {
4446
4424
  key: 2,
4447
4425
  class: "tile-actions",
4448
4426
  "data-testid": `tile-actions-${n.tileId}`
4449
4427
  }, [
4450
- L.value && n.context.editable && !n.isFullscreen ? (M(), Q(O(ks), {
4428
+ A.value && n.context.editable && !n.isFullscreen ? (N(), K(O(ks), {
4451
4429
  key: 0,
4452
4430
  class: "edit-icon",
4453
4431
  color: `var(--kui-color-text-neutral, ${O(qt)})`,
4454
4432
  "data-testid": `edit-tile-${n.tileId}`,
4455
- size: `var(--kui-icon-size-40, ${O(bi)})`,
4433
+ size: `var(--kui-icon-size-40, ${O(wi)})`,
4456
4434
  onClick: J
4457
- }, null, 8, ["color", "data-testid", "size"])) : ge("", !0),
4458
- L.value && k.value && !n.isFullscreen ? (M(), Q(Re, {
4435
+ }, null, 8, ["color", "data-testid", "size"])) : pe("", !0),
4436
+ A.value && k.value && !n.isFullscreen ? (N(), K(Re, {
4459
4437
  key: 1,
4460
4438
  class: "dropdown",
4461
4439
  "data-testid": `chart-action-menu-${n.tileId}`,
4462
4440
  "kpop-attributes": { placement: "bottom-end" }
4463
4441
  }, {
4464
- items: X(() => [
4465
- O(f) ? (M(), Q(Ce, {
4442
+ items: j(() => [
4443
+ O(m) ? (N(), K(Ce, {
4466
4444
  key: 0,
4467
4445
  "data-testid": `chart-jump-to-explore-${n.tileId}`,
4468
- item: { label: O(h).t("jumpToExplore"), to: O(f) }
4469
- }, null, 8, ["data-testid", "item"])) : ge("", !0),
4470
- !O(ze)(n.definition) && O(m) ? (M(), Q(Ce, {
4446
+ item: { label: O(h).t("jumpToExplore"), to: O(m) }
4447
+ }, null, 8, ["data-testid", "item"])) : pe("", !0),
4448
+ !O(ze)(n.definition) && O(f) ? (N(), K(Ce, {
4471
4449
  key: 1,
4472
4450
  "data-testid": `chart-jump-to-requests-${n.tileId}`,
4473
- item: { label: O(h).t("jumpToRequests"), to: O(m) }
4474
- }, null, 8, ["data-testid", "item"])) : ge("", !0),
4475
- G.value ? (M(), Q(Ce, {
4451
+ item: { label: O(h).t("jumpToRequests"), to: O(f) }
4452
+ }, null, 8, ["data-testid", "item"])) : pe("", !0),
4453
+ Q.value ? (N(), K(Ce, {
4476
4454
  key: 2,
4477
4455
  class: "chart-export-button",
4478
4456
  "data-testid": `chart-csv-export-${n.tileId}`,
4479
4457
  onClick: De
4480
4458
  }, {
4481
- default: X(() => [
4482
- me("span", {
4459
+ default: j(() => [
4460
+ he("span", {
4483
4461
  class: "chart-export-trigger",
4484
4462
  "data-testid": `csv-export-button-${n.tileId}`
4485
- }, ae(O(h).t("csvExport.exportAsCsv")), 9, $o)
4463
+ }, le(O(h).t("csvExport.exportAsCsv")), 9, $o)
4486
4464
  ]),
4487
4465
  _: 1
4488
- }, 8, ["data-testid"])) : ge("", !0),
4489
- n.context.editable ? (M(), Q(Ce, {
4466
+ }, 8, ["data-testid"])) : pe("", !0),
4467
+ n.context.editable ? (N(), K(Ce, {
4490
4468
  key: 3,
4491
4469
  "data-testid": `duplicate-tile-${n.tileId}`,
4492
4470
  onClick: te
4493
4471
  }, {
4494
- default: X(() => [
4495
- Ke(ae(O(h).t("renderer.duplicateTile")), 1)
4472
+ default: j(() => [
4473
+ Ke(le(O(h).t("renderer.duplicateTile")), 1)
4496
4474
  ]),
4497
4475
  _: 1
4498
- }, 8, ["data-testid"])) : ge("", !0),
4499
- n.context.editable ? (M(), Q(Ce, {
4476
+ }, 8, ["data-testid"])) : pe("", !0),
4477
+ n.context.editable ? (N(), K(Ce, {
4500
4478
  key: 4,
4501
4479
  "data-testid": `remove-tile-${n.tileId}`,
4502
- onClick: Y
4480
+ onClick: G
4503
4481
  }, {
4504
- default: X(() => [
4505
- me("span", Bo, ae(O(h).t("renderer.delete")), 1)
4482
+ default: j(() => [
4483
+ he("span", Bo, le(O(h).t("renderer.delete")), 1)
4506
4484
  ]),
4507
4485
  _: 1
4508
- }, 8, ["data-testid"])) : ge("", !0)
4486
+ }, 8, ["data-testid"])) : pe("", !0)
4509
4487
  ]),
4510
- default: X(() => [
4511
- ve(O(Ts), {
4488
+ default: j(() => [
4489
+ ge(O(Ts), {
4512
4490
  class: "kebab-action-menu",
4513
4491
  color: `var(--kui-color-text-neutral, ${O(qt)})`,
4514
4492
  "data-testid": `kebab-action-menu-${n.tileId}`,
4515
- size: `var(--kui-icon-size-40, ${O(bi)})`
4493
+ size: `var(--kui-icon-size-40, ${O(wi)})`
4516
4494
  }, null, 8, ["color", "data-testid", "size"])
4517
4495
  ]),
4518
4496
  _: 1
4519
- }, 8, ["data-testid"])) : ge("", !0)
4520
- ], 8, Uo)) : ge("", !0),
4521
- x.value ? (M(), Q(yo, {
4497
+ }, 8, ["data-testid"])) : pe("", !0)
4498
+ ], 8, Uo)) : pe("", !0),
4499
+ w.value ? (N(), K(yo, {
4522
4500
  key: 3,
4523
4501
  "data-testid": `csv-export-modal-${n.tileId}`,
4524
4502
  "export-state": v.value,
4525
- filename: q.value,
4526
- onCloseModal: Le
4527
- }, null, 8, ["data-testid", "export-state", "filename"])) : ge("", !0)
4528
- ])) : ge("", !0),
4529
- me("div", {
4503
+ filename: F.value,
4504
+ onCloseModal: qe
4505
+ }, null, 8, ["data-testid", "export-state", "filename"])) : pe("", !0)
4506
+ ])) : pe("", !0),
4507
+ he("div", {
4530
4508
  class: et(["tile-content", `type-${n.tileType}-${C.value.type}`]),
4531
4509
  "data-testid": `tile-content-${n.tileId}`
4532
4510
  }, [
4533
- ne.value ? (M(), Q(Wi(ne.value.component), Ui({ key: 0 }, ne.value.rendererProps, ps(he.value), {
4511
+ Z.value ? (N(), K(Wi(Z.value.component), Ui({ key: 0 }, Z.value.rendererProps, ps(se.value), {
4534
4512
  onChartData: Te,
4535
- onQueryComplete: B
4536
- }), null, 16)) : ge("", !0)
4513
+ onQueryComplete: $
4514
+ }), null, 16)) : pe("", !0)
4537
4515
  ], 10, Wo)
4538
4516
  ], 10, Lo);
4539
4517
  };
@@ -4549,7 +4527,7 @@ const Yt = /* @__PURE__ */ _e({
4549
4527
  for (let r = 0; r < t; r++)
4550
4528
  i.get(r) ? s.push("auto") : s.push(`${n}px`);
4551
4529
  return s;
4552
- }, jo = /* @__PURE__ */ _e({
4530
+ }, jo = /* @__PURE__ */ ye({
4553
4531
  __name: "GridLayout",
4554
4532
  props: {
4555
4533
  tileHeight: {
@@ -4572,7 +4550,7 @@ const Yt = /* @__PURE__ */ _e({
4572
4550
  v821fda82: e.columns,
4573
4551
  v0870d42d: r.value
4574
4552
  }));
4575
- const e = n, t = V(null), i = V(0), s = new ResizeObserver((a) => {
4553
+ const e = n, t = X(null), i = X(0), s = new ResizeObserver((a) => {
4576
4554
  window.requestAnimationFrame(() => {
4577
4555
  !Array.isArray(a) || !a.length || (i.value = a[0].contentRect.width);
4578
4556
  });
@@ -4592,12 +4570,12 @@ const Yt = /* @__PURE__ */ _e({
4592
4570
  "grid-row-end": a.layout.position.row + 1 + a.layout.size.rows
4593
4571
  }
4594
4572
  })));
4595
- return (a, c) => (M(), se("div", {
4573
+ return (a, c) => (N(), ne("div", {
4596
4574
  ref_key: "gridContainer",
4597
4575
  ref: t,
4598
4576
  class: "kong-ui-public-grid-layout"
4599
4577
  }, [
4600
- (M(!0), se(Ht, null, Gi(o.value, (l) => (M(), se("div", {
4578
+ (N(!0), ne(Ht, null, Gi(o.value, (l) => (N(), ne("div", {
4601
4579
  key: l.key,
4602
4580
  class: et(["grid-cell", {
4603
4581
  "empty-cell": !l.tile
@@ -4950,7 +4928,7 @@ class p {
4950
4928
  return !(!e || e.w === e.h || e.locked || e.noResize || e.grid?.opts.disableResize || e.minW && e.minW === e.maxW || e.minH && e.minH === e.maxH);
4951
4929
  }
4952
4930
  }
4953
- class Ie {
4931
+ class Le {
4954
4932
  constructor(e = {}) {
4955
4933
  this.addedNodes = [], this.removedNodes = [], this.defaultColumn = 12, this.column = e.column || this.defaultColumn, this.column > this.defaultColumn && (this.defaultColumn = this.column), this.maxRow = e.maxRow, this._float = e.float, this.nodes = e.nodes || [], this.onChange = e.onChange;
4956
4934
  }
@@ -5128,7 +5106,7 @@ class Ie {
5128
5106
  * @param resizing if out of bound, resize down or move into the grid to fit ?
5129
5107
  */
5130
5108
  prepareNode(e, t) {
5131
- e._id = e._id ?? Ie._idSeq++;
5109
+ e._id = e._id ?? Le._idSeq++;
5132
5110
  const i = e.id;
5133
5111
  if (i) {
5134
5112
  let r = 1;
@@ -5223,7 +5201,7 @@ class Ie {
5223
5201
  if (t.pack = !0, !this.maxRow)
5224
5202
  return this.moveNode(e, t);
5225
5203
  let i;
5226
- const s = new Ie({
5204
+ const s = new Le({
5227
5205
  column: this.column,
5228
5206
  float: this.float,
5229
5207
  nodes: this.nodes.map((o) => o._id === e._id ? (i = { ...o }, i) : { ...o })
@@ -5245,7 +5223,7 @@ class Ie {
5245
5223
  willItFit(e) {
5246
5224
  if (delete e._willFitPos, !this.maxRow)
5247
5225
  return !0;
5248
- const t = new Ie({
5226
+ const t = new Le({
5249
5227
  column: this.column,
5250
5228
  float: this.float,
5251
5229
  nodes: this.nodes.map((s) => ({ ...s }))
@@ -5378,7 +5356,7 @@ class Ie {
5378
5356
  return e.forEach((r, o) => {
5379
5357
  if (r._id === void 0) {
5380
5358
  const a = r.id ? this.nodes.find((c) => c.id === r.id) : void 0;
5381
- r._id = a?._id ?? Ie._idSeq++;
5359
+ r._id = a?._id ?? Le._idSeq++;
5382
5360
  }
5383
5361
  s[o] = { x: r.x, y: r.y, w: r.w, _id: r._id };
5384
5362
  }), this._layouts = i ? [] : this._layouts || [], this._layouts[t] = s, this;
@@ -5389,7 +5367,7 @@ class Ie {
5389
5367
  * @param column corresponding column index to save it under
5390
5368
  */
5391
5369
  cacheOneLayout(e, t) {
5392
- e._id = e._id ?? Ie._idSeq++;
5370
+ e._id = e._id ?? Le._idSeq++;
5393
5371
  const i = { x: e.x, y: e.y, w: e.w, _id: e._id };
5394
5372
  (e.autoPosition || e.x === void 0) && (delete i.x, delete i.y, e.autoPosition && (i.autoPosition = !0)), this._layouts = this._layouts || [], this._layouts[t] = this._layouts[t] || [];
5395
5373
  const s = this.findCacheLayout(e, t);
@@ -5412,7 +5390,7 @@ class Ie {
5412
5390
  return this;
5413
5391
  }
5414
5392
  }
5415
- Ie._idSeq = 0;
5393
+ Le._idSeq = 0;
5416
5394
  const Se = {
5417
5395
  alwaysShowResizeHandle: "mobile",
5418
5396
  animate: !0,
@@ -5443,39 +5421,39 @@ const Se = {
5443
5421
  // styleInHead: false,
5444
5422
  //removable
5445
5423
  };
5446
- class H {
5424
+ class q {
5447
5425
  }
5448
5426
  const Me = typeof window < "u" && typeof document < "u" && ("ontouchstart" in document || "ontouchstart" in window || window.DocumentTouch && document instanceof window.DocumentTouch || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0);
5449
- class Pe {
5427
+ class Ie {
5450
5428
  }
5451
- function bt(n, e) {
5429
+ function wt(n, e) {
5452
5430
  n.touches.length > 1 || (n.cancelable && n.preventDefault(), p.simulateMouseEvent(n.changedTouches[0], e));
5453
5431
  }
5454
5432
  function os(n, e) {
5455
5433
  n.cancelable && n.preventDefault(), p.simulateMouseEvent(n, e);
5456
5434
  }
5457
- function wt(n) {
5458
- Pe.touchHandled || (Pe.touchHandled = !0, bt(n, "mousedown"));
5435
+ function bt(n) {
5436
+ Ie.touchHandled || (Ie.touchHandled = !0, wt(n, "mousedown"));
5459
5437
  }
5460
5438
  function xt(n) {
5461
- Pe.touchHandled && bt(n, "mousemove");
5439
+ Ie.touchHandled && wt(n, "mousemove");
5462
5440
  }
5463
5441
  function Et(n) {
5464
- if (!Pe.touchHandled)
5442
+ if (!Ie.touchHandled)
5465
5443
  return;
5466
- Pe.pointerLeaveTimeout && (window.clearTimeout(Pe.pointerLeaveTimeout), delete Pe.pointerLeaveTimeout);
5467
- const e = !!H.dragElement;
5468
- bt(n, "mouseup"), e || bt(n, "click"), Pe.touchHandled = !1;
5444
+ Ie.pointerLeaveTimeout && (window.clearTimeout(Ie.pointerLeaveTimeout), delete Ie.pointerLeaveTimeout);
5445
+ const e = !!q.dragElement;
5446
+ wt(n, "mouseup"), e || wt(n, "click"), Ie.touchHandled = !1;
5469
5447
  }
5470
5448
  function Ct(n) {
5471
5449
  n.pointerType !== "mouse" && n.target.releasePointerCapture(n.pointerId);
5472
5450
  }
5473
5451
  function qi(n) {
5474
- H.dragElement && n.pointerType !== "mouse" && os(n, "mouseenter");
5452
+ q.dragElement && n.pointerType !== "mouse" && os(n, "mouseenter");
5475
5453
  }
5476
5454
  function Hi(n) {
5477
- H.dragElement && n.pointerType !== "mouse" && (Pe.pointerLeaveTimeout = window.setTimeout(() => {
5478
- delete Pe.pointerLeaveTimeout, os(n, "mouseleave");
5455
+ q.dragElement && n.pointerType !== "mouse" && (Ie.pointerLeaveTimeout = window.setTimeout(() => {
5456
+ delete Ie.pointerLeaveTimeout, os(n, "mouseleave");
5479
5457
  }, 10));
5480
5458
  }
5481
5459
  class Tt {
@@ -5485,11 +5463,11 @@ class Tt {
5485
5463
  /** @internal */
5486
5464
  _init() {
5487
5465
  const e = this.el = document.createElement("div");
5488
- return e.classList.add("ui-resizable-handle"), e.classList.add(`${Tt.prefix}${this.dir}`), e.style.zIndex = "100", e.style.userSelect = "none", this.host.appendChild(this.el), this.el.addEventListener("mousedown", this._mouseDown), Me && (this.el.addEventListener("touchstart", wt), this.el.addEventListener("pointerdown", Ct)), this;
5466
+ return e.classList.add("ui-resizable-handle"), e.classList.add(`${Tt.prefix}${this.dir}`), e.style.zIndex = "100", e.style.userSelect = "none", this.host.appendChild(this.el), this.el.addEventListener("mousedown", this._mouseDown), Me && (this.el.addEventListener("touchstart", bt), this.el.addEventListener("pointerdown", Ct)), this;
5489
5467
  }
5490
5468
  /** call this when resize handle needs to be removed and cleaned up */
5491
5469
  destroy() {
5492
- return this.moving && this._mouseUp(this.mouseDownEvent), this.el.removeEventListener("mousedown", this._mouseDown), Me && (this.el.removeEventListener("touchstart", wt), this.el.removeEventListener("pointerdown", Ct)), this.host.removeChild(this.el), delete this.el, delete this.host, this;
5470
+ return this.moving && this._mouseUp(this.mouseDownEvent), this.el.removeEventListener("mousedown", this._mouseDown), Me && (this.el.removeEventListener("touchstart", bt), this.el.removeEventListener("pointerdown", Ct)), this.host.removeChild(this.el), delete this.el, delete this.host, this;
5493
5471
  }
5494
5472
  /** @internal called on mouse down on us: capture move on the entire document (mouse might not stay on us) until we release the mouse */
5495
5473
  _mouseDown(e) {
@@ -5598,17 +5576,17 @@ class ot extends Kt {
5598
5576
  }
5599
5577
  /** @internal turns auto hide on/off */
5600
5578
  _setupAutoHide(e) {
5601
- return e ? (this.el.classList.add("ui-resizable-autohide"), this.el.addEventListener("mouseover", this._mouseOver), this.el.addEventListener("mouseout", this._mouseOut)) : (this.el.classList.remove("ui-resizable-autohide"), this.el.removeEventListener("mouseover", this._mouseOver), this.el.removeEventListener("mouseout", this._mouseOut), H.overResizeElement === this && delete H.overResizeElement), this;
5579
+ return e ? (this.el.classList.add("ui-resizable-autohide"), this.el.addEventListener("mouseover", this._mouseOver), this.el.addEventListener("mouseout", this._mouseOut)) : (this.el.classList.remove("ui-resizable-autohide"), this.el.removeEventListener("mouseover", this._mouseOver), this.el.removeEventListener("mouseout", this._mouseOut), q.overResizeElement === this && delete q.overResizeElement), this;
5602
5580
  }
5603
5581
  /** @internal */
5604
5582
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
5605
5583
  _mouseOver(e) {
5606
- H.overResizeElement || H.dragElement || (H.overResizeElement = this, this.el.classList.remove("ui-resizable-autohide"));
5584
+ q.overResizeElement || q.dragElement || (q.overResizeElement = this, this.el.classList.remove("ui-resizable-autohide"));
5607
5585
  }
5608
5586
  /** @internal */
5609
5587
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
5610
5588
  _mouseOut(e) {
5611
- H.overResizeElement === this && (delete H.overResizeElement, this.el.classList.add("ui-resizable-autohide"));
5589
+ q.overResizeElement === this && (delete q.overResizeElement, this.el.classList.add("ui-resizable-autohide"));
5612
5590
  }
5613
5591
  /** @internal */
5614
5592
  _setupHandlers() {
@@ -5712,12 +5690,12 @@ class at extends Kt {
5712
5690
  }
5713
5691
  enable() {
5714
5692
  this.disabled !== !1 && (super.enable(), this.dragEls.forEach((e) => {
5715
- e.addEventListener("mousedown", this._mouseDown), Me && (e.addEventListener("touchstart", wt), e.addEventListener("pointerdown", Ct));
5693
+ e.addEventListener("mousedown", this._mouseDown), Me && (e.addEventListener("touchstart", bt), e.addEventListener("pointerdown", Ct));
5716
5694
  }), this.el.classList.remove("ui-draggable-disabled"));
5717
5695
  }
5718
5696
  disable(e = !1) {
5719
5697
  this.disabled !== !0 && (super.disable(), this.dragEls.forEach((t) => {
5720
- t.removeEventListener("mousedown", this._mouseDown), Me && (t.removeEventListener("touchstart", wt), t.removeEventListener("pointerdown", Ct));
5698
+ t.removeEventListener("mousedown", this._mouseDown), Me && (t.removeEventListener("touchstart", bt), t.removeEventListener("pointerdown", Ct));
5721
5699
  }), e || this.el.classList.add("ui-draggable-disabled"));
5722
5700
  }
5723
5701
  destroy() {
@@ -5728,8 +5706,8 @@ class at extends Kt {
5728
5706
  }
5729
5707
  /** @internal call when mouse goes down before a dragstart happens */
5730
5708
  _mouseDown(e) {
5731
- if (!H.mouseHandled)
5732
- return e.button !== 0 || !this.dragEls.find((t) => t === e.target) && e.target.closest(Qo) || this.option.cancel && e.target.closest(this.option.cancel) || (this.mouseDownEvent = e, delete this.dragging, delete H.dragElement, delete H.dropElement, document.addEventListener("mousemove", this._mouseMove, { capture: !0, passive: !0 }), document.addEventListener("mouseup", this._mouseUp, !0), Me && (e.currentTarget.addEventListener("touchmove", xt), e.currentTarget.addEventListener("touchend", Et)), e.preventDefault(), document.activeElement && document.activeElement.blur(), H.mouseHandled = !0), !0;
5709
+ if (!q.mouseHandled)
5710
+ return e.button !== 0 || !this.dragEls.find((t) => t === e.target) && e.target.closest(Qo) || this.option.cancel && e.target.closest(this.option.cancel) || (this.mouseDownEvent = e, delete this.dragging, delete q.dragElement, delete q.dropElement, document.addEventListener("mousemove", this._mouseMove, { capture: !0, passive: !0 }), document.addEventListener("mouseup", this._mouseUp, !0), Me && (e.currentTarget.addEventListener("touchmove", xt), e.currentTarget.addEventListener("touchend", Et)), e.preventDefault(), document.activeElement && document.activeElement.blur(), q.mouseHandled = !0), !0;
5733
5711
  }
5734
5712
  /** @internal method to call actual drag event */
5735
5713
  _callDrag(e) {
@@ -5742,15 +5720,15 @@ class at extends Kt {
5742
5720
  _mouseMove(e) {
5743
5721
  const t = this.mouseDownEvent;
5744
5722
  if (this.lastDrag = e, this.dragging)
5745
- if (this._dragFollow(e), H.pauseDrag) {
5746
- const i = Number.isInteger(H.pauseDrag) ? H.pauseDrag : 100;
5723
+ if (this._dragFollow(e), q.pauseDrag) {
5724
+ const i = Number.isInteger(q.pauseDrag) ? q.pauseDrag : 100;
5747
5725
  this.dragTimeout && window.clearTimeout(this.dragTimeout), this.dragTimeout = window.setTimeout(() => this._callDrag(e), i);
5748
5726
  } else
5749
5727
  this._callDrag(e);
5750
5728
  else if (Math.abs(e.x - t.x) + Math.abs(e.y - t.y) > 3) {
5751
- this.dragging = !0, H.dragElement = this;
5729
+ this.dragging = !0, q.dragElement = this;
5752
5730
  const i = this.el.gridstackNode?.grid;
5753
- i ? H.dropElement = i.el.ddElement.ddDroppable : delete H.dropElement, this.helper = this._createHelper(), this._setupHelperContainmentStyle(), this.dragTransform = p.getValuesFromTransformedElement(this.helperContainment), this.dragOffset = this._getDragOffset(e, this.el, this.helperContainment), this._setupHelperStyle(e);
5731
+ i ? q.dropElement = i.el.ddElement.ddDroppable : delete q.dropElement, this.helper = this._createHelper(), this._setupHelperContainmentStyle(), this.dragTransform = p.getValuesFromTransformedElement(this.helperContainment), this.dragOffset = this._getDragOffset(e, this.el, this.helperContainment), this._setupHelperStyle(e);
5754
5732
  const s = p.initEvent(e, { target: this.el, type: "dragstart" });
5755
5733
  this.option.start && this.option.start(s, this.ui()), this.triggerEvent("dragstart", s), document.addEventListener("keydown", this._keyEvent);
5756
5734
  }
@@ -5759,15 +5737,15 @@ class at extends Kt {
5759
5737
  /** @internal call when the mouse gets released to drop the item at current location */
5760
5738
  _mouseUp(e) {
5761
5739
  if (document.removeEventListener("mousemove", this._mouseMove, !0), document.removeEventListener("mouseup", this._mouseUp, !0), Me && e.currentTarget && (e.currentTarget.removeEventListener("touchmove", xt, !0), e.currentTarget.removeEventListener("touchend", Et, !0)), this.dragging) {
5762
- delete this.dragging, delete this.el.gridstackNode?._origRotate, document.removeEventListener("keydown", this._keyEvent), H.dropElement?.el === this.el.parentElement && delete H.dropElement, this.helperContainment.style.position = this.parentOriginStylePosition || null, this.helper !== this.el && this.helper.remove(), this._removeHelperStyle();
5740
+ delete this.dragging, delete this.el.gridstackNode?._origRotate, document.removeEventListener("keydown", this._keyEvent), q.dropElement?.el === this.el.parentElement && delete q.dropElement, this.helperContainment.style.position = this.parentOriginStylePosition || null, this.helper !== this.el && this.helper.remove(), this._removeHelperStyle();
5763
5741
  const t = p.initEvent(e, { target: this.el, type: "dragstop" });
5764
- this.option.stop && this.option.stop(t), this.triggerEvent("dragstop", t), H.dropElement && H.dropElement.drop(e);
5742
+ this.option.stop && this.option.stop(t), this.triggerEvent("dragstop", t), q.dropElement && q.dropElement.drop(e);
5765
5743
  }
5766
- delete this.helper, delete this.mouseDownEvent, delete H.dragElement, delete H.dropElement, delete H.mouseHandled, e.preventDefault();
5744
+ delete this.helper, delete this.mouseDownEvent, delete q.dragElement, delete q.dropElement, delete q.mouseHandled, e.preventDefault();
5767
5745
  }
5768
5746
  /** @internal call when keys are being pressed - use Esc to cancel, R to rotate */
5769
5747
  _keyEvent(e) {
5770
- const t = this.el.gridstackNode, i = t?.grid || H.dropElement?.el?.gridstack;
5748
+ const t = this.el.gridstackNode, i = t?.grid || q.dropElement?.el?.gridstack;
5771
5749
  if (e.key === "Escape")
5772
5750
  t && t._origRotate && (t._orig = t._origRotate, delete t._origRotate), i?.cancelDrag(), this._mouseUp(this.mouseDownEvent);
5773
5751
  else if (t && i && (e.key === "r" || e.key === "R")) {
@@ -5860,19 +5838,19 @@ class Vo extends Kt {
5860
5838
  }
5861
5839
  /** @internal called when the cursor enters our area - prepare for a possible drop and track leaving */
5862
5840
  _mouseEnter(e) {
5863
- if (!H.dragElement || !this._canDrop(H.dragElement.el))
5841
+ if (!q.dragElement || !this._canDrop(q.dragElement.el))
5864
5842
  return;
5865
- e.preventDefault(), e.stopPropagation(), H.dropElement && H.dropElement !== this && H.dropElement._mouseLeave(e, !0), H.dropElement = this;
5843
+ e.preventDefault(), e.stopPropagation(), q.dropElement && q.dropElement !== this && q.dropElement._mouseLeave(e, !0), q.dropElement = this;
5866
5844
  const t = p.initEvent(e, { target: this.el, type: "dropover" });
5867
- this.option.over && this.option.over(t, this._ui(H.dragElement)), this.triggerEvent("dropover", t), this.el.classList.add("ui-droppable-over");
5845
+ this.option.over && this.option.over(t, this._ui(q.dragElement)), this.triggerEvent("dropover", t), this.el.classList.add("ui-droppable-over");
5868
5846
  }
5869
5847
  /** @internal called when the item is leaving our area, stop tracking if we had moving item */
5870
5848
  _mouseLeave(e, t = !1) {
5871
- if (!H.dragElement || H.dropElement !== this)
5849
+ if (!q.dragElement || q.dropElement !== this)
5872
5850
  return;
5873
5851
  e.preventDefault(), e.stopPropagation();
5874
5852
  const i = p.initEvent(e, { target: this.el, type: "dropout" });
5875
- if (this.option.out && this.option.out(i, this._ui(H.dragElement)), this.triggerEvent("dropout", i), H.dropElement === this && (delete H.dropElement, !t)) {
5853
+ if (this.option.out && this.option.out(i, this._ui(q.dragElement)), this.triggerEvent("dropout", i), q.dropElement === this && (delete q.dropElement, !t)) {
5876
5854
  let s, r = this.el.parentElement;
5877
5855
  for (; !s && r; )
5878
5856
  s = r.ddElement?.ddDroppable, r = r.parentElement;
@@ -5883,7 +5861,7 @@ class Vo extends Kt {
5883
5861
  drop(e) {
5884
5862
  e.preventDefault();
5885
5863
  const t = p.initEvent(e, { target: this.el, type: "drop" });
5886
- this.option.drop && this.option.drop(t, this._ui(H.dragElement)), this.triggerEvent("drop", t);
5864
+ this.option.drop && this.option.drop(t, this._ui(q.dragElement)), this.triggerEvent("drop", t);
5887
5865
  }
5888
5866
  /** @internal true if element matches the string/method accept option */
5889
5867
  _canDrop(e) {
@@ -6000,7 +5978,7 @@ class Zo {
6000
5978
  }
6001
5979
  on(e, t, i) {
6002
5980
  return this._getDDElements(e).forEach((s) => s.on(t, (r) => {
6003
- i(r, H.dragElement ? H.dragElement.el : r.target, H.dragElement ? H.dragElement.helper : null);
5981
+ i(r, q.dragElement ? q.dragElement.el : r.target, q.dragElement ? q.dragElement.helper : null);
6004
5982
  })), this;
6005
5983
  }
6006
5984
  off(e, t) {
@@ -6119,8 +6097,8 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
6119
6097
  };
6120
6098
  e.getAttribute("gs-animate") && (a.animate = p.toBool(e.getAttribute("gs-animate"))), t = p.defaults(t, a), this._initMargin(), this.checkDynamicColumn(), this.el.classList.add("gs-" + t.column), t.rtl === "auto" && (t.rtl = e.style.direction === "rtl"), t.rtl && this.el.classList.add("grid-stack-rtl");
6121
6099
  const l = this.el.closest("." + Se.itemClass)?.gridstackNode;
6122
- l && (l.subGrid = this, this.parentGridNode = l, this.el.classList.add("grid-stack-nested"), l.el.classList.add("grid-stack-sub-grid")), this._isAutoCellHeight = t.cellHeight === "auto", this._isAutoCellHeight || t.cellHeight === "initial" ? this.cellHeight(void 0, !1) : (typeof t.cellHeight == "number" && t.cellHeightUnit && t.cellHeightUnit !== Se.cellHeightUnit && (t.cellHeight = t.cellHeight + t.cellHeightUnit, delete t.cellHeightUnit), this.cellHeight(t.cellHeight, !1)), t.alwaysShowResizeHandle === "mobile" && (t.alwaysShowResizeHandle = Me), this._styleSheetClass = "gs-id-" + Ie._idSeq++, this.el.classList.add(this._styleSheetClass), this._setStaticClass();
6123
- const u = t.engineClass || P.engineClass || Ie;
6100
+ l && (l.subGrid = this, this.parentGridNode = l, this.el.classList.add("grid-stack-nested"), l.el.classList.add("grid-stack-sub-grid")), this._isAutoCellHeight = t.cellHeight === "auto", this._isAutoCellHeight || t.cellHeight === "initial" ? this.cellHeight(void 0, !1) : (typeof t.cellHeight == "number" && t.cellHeightUnit && t.cellHeightUnit !== Se.cellHeightUnit && (t.cellHeight = t.cellHeight + t.cellHeightUnit, delete t.cellHeightUnit), this.cellHeight(t.cellHeight, !1)), t.alwaysShowResizeHandle === "mobile" && (t.alwaysShowResizeHandle = Me), this._styleSheetClass = "gs-id-" + Le._idSeq++, this.el.classList.add(this._styleSheetClass), this._setStaticClass();
6101
+ const u = t.engineClass || P.engineClass || Le;
6124
6102
  if (this.engine = new u({
6125
6103
  column: this.getColumn(),
6126
6104
  float: t.float,
@@ -6138,7 +6116,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
6138
6116
  const d = t.children;
6139
6117
  delete t.children, d.length && this.load(d);
6140
6118
  }
6141
- this.setAnimation(), t.subGridDynamic && !H.pauseDrag && (H.pauseDrag = !0), t.draggable?.pause !== void 0 && (H.pauseDrag = t.draggable.pause), this._setupRemoveDrop(), this._setupAcceptWidget(), this._updateResizeEvent();
6119
+ this.setAnimation(), t.subGridDynamic && !q.pauseDrag && (q.pauseDrag = !0), t.draggable?.pause !== void 0 && (q.pauseDrag = t.draggable.pause), this._setupRemoveDrop(), this._setupAcceptWidget(), this._updateResizeEvent();
6142
6120
  }
6143
6121
  /**
6144
6122
  * add a new widget and returns it.
@@ -6207,8 +6185,8 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
6207
6185
  t.column === "auto" && (c = !0, t.column = Math.max(r.w || 1, i?.w || 1), delete t.columnOpts);
6208
6186
  let l = r.el.querySelector(".grid-stack-item-content"), u, d;
6209
6187
  if (s && (this._removeDD(r.el), d = { ...r, x: 0, y: 0 }, p.removeInternalForSave(d), delete d.subGridOpts, r.content && (d.content = r.content, delete r.content), P.addRemoveCB ? u = P.addRemoveCB(this.el, d, !0, !1) : (u = p.createDiv(["grid-stack-item"]), u.appendChild(l), l = p.createDiv(["grid-stack-item-content"], r.el)), this.prepareDragDrop(r.el)), i) {
6210
- const y = c ? t.column : r.w, v = r.h + i.h, x = r.el.style;
6211
- x.transition = "none", this.update(r.el, { w: y, h: v }), setTimeout(() => x.transition = null);
6188
+ const y = c ? t.column : r.w, v = r.h + i.h, w = r.el.style;
6189
+ w.transition = "none", this.update(r.el, { w: y, h: v }), setTimeout(() => w.transition = null);
6212
6190
  }
6213
6191
  const h = r.subGrid = P.addGrid(l, t);
6214
6192
  return i?._moving && (h._isTemp = !0), c && (h._autoColumn = !0), s && h.makeWidget(u, d), i && (i._moving ? window.setTimeout(() => p.simulateMouseEvent(i._event, "mouseenter", h.el), 0) : h.makeWidget(r.el, r)), this.resizeToContentCheck(!1, r), h;
@@ -6906,7 +6884,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
6906
6884
  * @param root optional root which defaults to document (for shadow dom pass the parent HTMLDocument)
6907
6885
  */
6908
6886
  static setupDragIn(e, t, i, s = document) {
6909
- t?.pause !== void 0 && (H.pauseDrag = t.pause), t = { appendTo: "body", helper: "clone", ...t || {} }, (typeof e == "string" ? p.getElements(e, s) : e).forEach((o, a) => {
6887
+ t?.pause !== void 0 && (q.pauseDrag = t.pause), t = { appendTo: "body", helper: "clone", ...t || {} }, (typeof e == "string" ? p.getElements(e, s) : e).forEach((o, a) => {
6910
6888
  xe.isDraggable(o) || xe.dragIn(o, t), i?.[a] && (o.gridstackNode = i[a]);
6911
6889
  });
6912
6890
  }
@@ -7122,8 +7100,8 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
7122
7100
  const y = i.w !== i._orig.w, v = h.target;
7123
7101
  if (!(!v.gridstackNode || v.gridstackNode.grid !== this)) {
7124
7102
  if (i.el = v, i._isAboutToRemove) {
7125
- const x = e.gridstackNode.grid;
7126
- x._gsEventHandler[h.type] && x._gsEventHandler[h.type](h, v), x.engine.nodes.push(i), x.removeWidget(e, !0, !0);
7103
+ const w = e.gridstackNode.grid;
7104
+ w._gsEventHandler[h.type] && w._gsEventHandler[h.type](h, v), w.engine.nodes.push(i), w.removeWidget(e, !0, !0);
7127
7105
  } else
7128
7106
  p.removePositioningStyles(v), i._temporaryRemoved ? (p.copyPos(i, i._orig), this._writePosAttr(v, i), this.engine.addNode(i)) : this._writePosAttr(v, i), this._gsEventHandler[h.type] && this._gsEventHandler[h.type](h, v);
7129
7107
  this._extraDragRow = 0, this._updateContainerHeight(), this._triggerChangeEvent(), this.engine.endUpdate(), h.type === "resizestop" && (Number.isInteger(i.sizeToContent) && (i.sizeToContent = i.h), this.resizeToContentCheck(y, i));
@@ -7174,9 +7152,9 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
7174
7152
  a.x = Math.round(I / r), a.y = Math.round(S / o);
7175
7153
  const C = this._extraDragRow;
7176
7154
  if (this.engine.collide(s, a)) {
7177
- const j = this.getRow();
7178
- let A = Math.max(0, a.y + s.h - j);
7179
- this.opts.maxRow && j + A > this.opts.maxRow && (A = Math.max(0, this.opts.maxRow - j)), this._extraDragRow = A;
7155
+ const Y = this.getRow();
7156
+ let M = Math.max(0, a.y + s.h - Y);
7157
+ this.opts.maxRow && Y + M > this.opts.maxRow && (M = Math.max(0, this.opts.maxRow - Y)), this._extraDragRow = M;
7180
7158
  } else
7181
7159
  this._extraDragRow = 0;
7182
7160
  if (this._extraDragRow !== C && this._updateContainerHeight(), s.x === a.x && s.y === a.y)
@@ -7188,13 +7166,13 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
7188
7166
  a.x = Math.round(_ / r), a.y = Math.round(I / o), c = !0;
7189
7167
  }
7190
7168
  s._event = t, s._lastTried = a;
7191
- const x = {
7169
+ const w = {
7192
7170
  x: i.position.left + l,
7193
7171
  y: i.position.top + d,
7194
7172
  w: (i.size ? i.size.width : s.w * r) - l - u,
7195
7173
  h: (i.size ? i.size.height : s.h * o) - d - h
7196
7174
  };
7197
- if (this.engine.moveNodeCheck(s, { ...a, cellWidth: r, cellHeight: o, rect: x, resizing: c })) {
7175
+ if (this.engine.moveNodeCheck(s, { ...a, cellWidth: r, cellHeight: o, rect: w, resizing: c })) {
7198
7176
  s._lastUiPosition = i.position, this.engine.cacheRects(r, o, d, u, h, l), delete s._skipDown, c && s.subGrid && s.subGrid.onResize(), this._extraDragRow = 0, this._updateContainerHeight();
7199
7177
  const _ = t.target;
7200
7178
  s._sidebarOrig || this._writePosAttr(_, s), this._gsEventHandler[t.type] && this._gsEventHandler[t.type](t, _);
@@ -7223,9 +7201,9 @@ P.renderCB = (n, e) => {
7223
7201
  };
7224
7202
  P.resizeToContentParent = ".grid-stack-item-content";
7225
7203
  P.Utils = p;
7226
- P.Engine = Ie;
7204
+ P.Engine = Le;
7227
7205
  P.GDRev = "11.5.1";
7228
- const Jo = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], ea = { class: "grid-stack-item-content" }, ta = /* @__PURE__ */ _e({
7206
+ const Jo = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], ea = { class: "grid-stack-item-content" }, ta = /* @__PURE__ */ ye({
7229
7207
  __name: "DraggableGridLayout",
7230
7208
  props: {
7231
7209
  tiles: {},
@@ -7234,13 +7212,13 @@ const Jo = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], ea = { cl
7234
7212
  },
7235
7213
  emits: ["update-tiles"],
7236
7214
  setup(n, { expose: e, emit: t }) {
7237
- const i = n, s = t, r = V(null), o = V(new Map(i.tiles.map((y) => [`${y.id}`, y])));
7215
+ const i = n, s = t, r = X(null), o = X(new Map(i.tiles.map((y) => [`${y.id}`, y])));
7238
7216
  let a = null;
7239
7217
  const c = (y) => `[data-id="${y}"]`, l = (y) => y.map((v) => {
7240
- const x = o.value.get(`${v.el?.getAttribute("data-id")}`);
7241
- if (x)
7218
+ const w = o.value.get(`${v.el?.getAttribute("data-id")}`);
7219
+ if (w)
7242
7220
  return {
7243
- ...x,
7221
+ ...w,
7244
7222
  layout: {
7245
7223
  position: { col: Number(v.x), row: Number(v.y) },
7246
7224
  size: { cols: Number(v.w), rows: Number(v.h) }
@@ -7251,8 +7229,8 @@ const Jo = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], ea = { cl
7251
7229
  o.value.set(`${_.id}`, _);
7252
7230
  }), s("update-tiles", Array.from(o.value.values())));
7253
7231
  }, d = (y, v) => {
7254
- v.forEach((x) => {
7255
- o.value.delete(`${x.el?.getAttribute("data-id")}`);
7232
+ v.forEach((w) => {
7233
+ o.value.delete(`${w.el?.getAttribute("data-id")}`);
7256
7234
  }), s("update-tiles", Array.from(o.value.values()));
7257
7235
  };
7258
7236
  Rt(() => {
@@ -7274,8 +7252,8 @@ const Jo = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], ea = { cl
7274
7252
  };
7275
7253
  return Je(() => i.tiles.length, async (y, v) => {
7276
7254
  if (y > v && a) {
7277
- const x = i.tiles.slice(v);
7278
- for (const _ of x)
7255
+ const w = i.tiles.slice(v);
7256
+ for (const _ of w)
7279
7257
  o.value.set(`${_.id}`, _), await Ut(), a.makeWidget(c(_.id), {
7280
7258
  autoPosition: !0,
7281
7259
  w: _.layout.size.cols,
@@ -7286,24 +7264,24 @@ const Jo = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], ea = { cl
7286
7264
  i.tiles.forEach((y) => {
7287
7265
  o.value.set(`${y.id}`, y);
7288
7266
  });
7289
- }), e({ removeWidget: h }), (y, v) => (M(), se("div", {
7267
+ }), e({ removeWidget: h }), (y, v) => (N(), ne("div", {
7290
7268
  ref_key: "gridContainer",
7291
7269
  ref: r,
7292
7270
  class: "grid-stack"
7293
7271
  }, [
7294
- (M(!0), se(Ht, null, Gi(i.tiles, (x) => (M(), se("div", {
7295
- key: x.id,
7272
+ (N(!0), ne(Ht, null, Gi(i.tiles, (w) => (N(), ne("div", {
7273
+ key: w.id,
7296
7274
  class: "grid-stack-item",
7297
- "data-id": `${x.id}`,
7298
- "data-testid": `grid-stack-item-${x.id}`,
7299
- "gs-h": x.layout.size.rows,
7275
+ "data-id": `${w.id}`,
7276
+ "data-testid": `grid-stack-item-${w.id}`,
7277
+ "gs-h": w.layout.size.rows,
7300
7278
  "gs-lazy-load": !0,
7301
- "gs-w": x.layout.size.cols,
7302
- "gs-x": x.layout.position.col,
7303
- "gs-y": x.layout.position.row
7279
+ "gs-w": w.layout.size.cols,
7280
+ "gs-x": w.layout.position.col,
7281
+ "gs-y": w.layout.position.row
7304
7282
  }, [
7305
- me("div", ea, [
7306
- Xe(y.$slots, "tile", { tile: x }, void 0, !0)
7283
+ he("div", ea, [
7284
+ Xe(y.$slots, "tile", { tile: w }, void 0, !0)
7307
7285
  ])
7308
7286
  ], 8, Jo))), 128))
7309
7287
  ], 512));
@@ -7338,7 +7316,7 @@ const Jo = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], ea = { cl
7338
7316
  }, ra = {
7339
7317
  key: 0,
7340
7318
  class: "tile-container slottable-tile"
7341
- }, oa = /* @__PURE__ */ _e({
7319
+ }, oa = /* @__PURE__ */ ye({
7342
7320
  __name: "DashboardRenderer",
7343
7321
  props: /* @__PURE__ */ yt({
7344
7322
  context: {},
@@ -7352,20 +7330,20 @@ const Jo = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], ea = { cl
7352
7330
  Ft((R) => ({
7353
7331
  v130e88d4: u.value
7354
7332
  }));
7355
- const i = t, s = Bi(n, "modelValue"), { i18n: r } = ke.useI18n(), o = V(0), a = V(null), c = V(), l = V(), u = V("scale(1)"), d = /* @__PURE__ */ new Set(), h = qe(Ue);
7333
+ const i = t, s = Bi(n, "modelValue"), { i18n: r } = ke.useI18n(), o = X(0), a = X(null), c = X(), l = X(), u = X("scale(1)"), d = /* @__PURE__ */ new Set(), h = Pe(Ue);
7356
7334
  h || (console.warn("Analytics dashboards require a query bridge supplied via provide / inject."), console.warn("Please ensure your application has a query bridge provided under the key 'analytics-query-provider', as described in"), console.warn("https://github.com/Kong/public-ui-components/blob/main/packages/analytics/dashboard-renderer/README.md#requirements")), ke.useRequestQueue();
7357
- const { exportPdf: y, exportState: v } = ke.useExportPdf(l), x = (R) => {
7335
+ const { exportPdf: y, exportState: v } = ke.useExportPdf(l), w = (R) => {
7358
7336
  d.add(R.id);
7359
- const E = S.value.filter((q) => !j(q)).length;
7337
+ const E = S.value.filter((F) => !Y(F)).length;
7360
7338
  d.size >= E && i("tiles-loaded", !0);
7361
7339
  }, _ = T(() => {
7362
- const { timeSpec: R } = le.value, q = `renderer.trendRange.${R.type === "absolute" ? "custom" : R.time_range}`;
7363
- return r.te(q) ? r.t(q) : "";
7340
+ const { timeSpec: R } = de.value, F = `renderer.trendRange.${R.type === "absolute" ? "custom" : R.time_range}`;
7341
+ return r.te(F) ? r.t(F) : "";
7364
7342
  }), I = (R, E) => {
7365
- const q = R.layout.position.row - E.layout.position.row;
7366
- return q !== 0 ? q : R.layout.position.col - E.layout.position.col;
7343
+ const F = R.layout.position.row - E.layout.position.row;
7344
+ return F !== 0 ? F : R.layout.position.col - E.layout.position.col;
7367
7345
  }, S = T(() => s.value.tiles.map((R) => {
7368
- if (le.value.editable && !R.id && console.warn(
7346
+ if (de.value.editable && !R.id && console.warn(
7369
7347
  "No id provided for tile. One will be generated automatically,",
7370
7348
  "however tracking changes to this tile may not work as expected.",
7371
7349
  R
@@ -7376,84 +7354,84 @@ const Jo = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], ea = { cl
7376
7354
  id: R.id ?? crypto.randomUUID()
7377
7355
  };
7378
7356
  let E = R.definition;
7379
- const q = R.type ?? "chart", k = io(E, _.value);
7357
+ const F = R.type ?? "chart", k = io(E, _.value);
7380
7358
  return k !== E.header_description && (E = {
7381
7359
  ...E,
7382
7360
  header_description: k
7383
7361
  }), {
7384
7362
  layout: R.layout,
7385
7363
  meta: E,
7386
- type: q,
7364
+ type: F,
7387
7365
  // Add a unique key to each tile internally.
7388
7366
  id: R.id ?? crypto.randomUUID()
7389
7367
  };
7390
7368
  })), C = (R) => {
7391
7369
  i("edit-tile", R);
7392
- }, j = (R) => R.type === "slottable" ? !0 : R.meta?.chart.type === "slottable", A = (R) => R.type === "slottable", ie = (R) => {
7370
+ }, Y = (R) => R.type === "slottable" ? !0 : R.meta?.chart.type === "slottable", M = (R) => R.type === "slottable", ie = (R) => {
7393
7371
  if (R.type === "slottable")
7394
7372
  return R.id;
7395
7373
  const E = R.meta?.chart;
7396
- return E && A(E) ? E.id : void 0;
7397
- }, G = (R) => {
7374
+ return E && M(E) ? E.id : void 0;
7375
+ }, Q = (R) => {
7398
7376
  try {
7399
7377
  const E = sa(R);
7400
7378
  s.value.tiles.push(JSON.parse(JSON.stringify(E)));
7401
7379
  } catch (E) {
7402
7380
  console.warn(E);
7403
7381
  }
7404
- }, f = (R) => {
7382
+ }, m = (R) => {
7405
7383
  a.value && a.value.removeWidget(R.id), d.delete(R.id);
7406
- }, m = () => {
7384
+ }, f = () => {
7407
7385
  d.clear(), o.value++;
7408
7386
  }, g = (R) => {
7409
- const E = R.map((q) => q.type === "slottable" ? {
7410
- id: q.id,
7411
- type: q.type,
7412
- layout: q.layout
7387
+ const E = R.map((F) => F.type === "slottable" ? {
7388
+ id: F.id,
7389
+ type: F.type,
7390
+ layout: F.layout
7413
7391
  } : {
7414
- id: q.id,
7415
- type: q.type,
7416
- layout: q.layout,
7417
- definition: q.meta
7392
+ id: F.id,
7393
+ type: F.type,
7394
+ layout: F.layout,
7395
+ definition: F.meta
7418
7396
  });
7419
7397
  s.value.tiles = E.sort(I);
7420
7398
  }, b = async () => {
7421
7399
  if (u.value = "scale(1)", await Ut(), l.value) {
7422
- const { availWidth: R, availHeight: E } = window.screen, { width: q, height: k } = l.value.getBoundingClientRect(), L = Math.min(E / k, R / q);
7423
- u.value = `scale(${L})`;
7400
+ const { availWidth: R, availHeight: E } = window.screen, { width: F, height: k } = l.value.getBoundingClientRect(), A = Math.min(E / k, R / F);
7401
+ u.value = `scale(${A})`;
7424
7402
  }
7425
- }, w = () => {
7403
+ }, x = () => {
7426
7404
  c.value && (document.fullscreenElement ? document.exitFullscreen() : c.value.requestFullscreen());
7427
- }, N = V(!1), Z = () => {
7428
- N.value = document.fullscreenElement !== null, N.value && b();
7429
- }, pe = T(() => s.value.preset_filters ?? []), { internalContext: le, queryReady: $ } = ke.useDashboardInternalContext({
7430
- globalFilters: pe,
7405
+ }, L = X(!1), re = () => {
7406
+ L.value = document.fullscreenElement !== null, L.value && b();
7407
+ }, ve = T(() => s.value.preset_filters ?? []), { internalContext: de, queryReady: V } = ke.useDashboardInternalContext({
7408
+ globalFilters: ve,
7431
7409
  context: T(() => n.context),
7432
- isFullscreen: N,
7410
+ isFullscreen: L,
7433
7411
  preview: T(() => n.preview)
7434
7412
  });
7435
7413
  return e({
7436
- refresh: m,
7437
- toggleFullscreen: w,
7414
+ refresh: f,
7415
+ toggleFullscreen: x,
7438
7416
  exportPdf: y,
7439
7417
  pdfExportState: v
7440
7418
  }), (R, E) => {
7441
- const q = be("KAlert");
7442
- return M(), se("div", {
7419
+ const F = _e("KAlert");
7420
+ return N(), ne("div", {
7443
7421
  ref_key: "dashboardContainer",
7444
7422
  ref: c,
7445
- class: et(["kong-ui-public-dashboard-renderer", { "is-fullscreen": N.value }]),
7446
- onFullscreenchange: Z
7423
+ class: et(["kong-ui-public-dashboard-renderer", { "is-fullscreen": L.value }]),
7424
+ onFullscreenchange: re
7447
7425
  }, [
7448
- me("div", {
7426
+ he("div", {
7449
7427
  ref_key: "layoutContainer",
7450
7428
  ref: l,
7451
7429
  class: "layout"
7452
7430
  }, [
7453
- O(h) && N.value ? (M(), se("div", na, [
7431
+ O(h) && L.value ? (N(), ne("div", na, [
7454
7432
  Xe(R.$slots, "fullscreenHeader", {}, void 0, !0)
7455
- ])) : ge("", !0),
7456
- O(h) ? (M(), Q(Wi(O(le).editable && !N.value ? ia : Ko), {
7433
+ ])) : pe("", !0),
7434
+ O(h) ? (N(), K(Wi(O(de).editable && !L.value ? ia : Ko), {
7457
7435
  key: 2,
7458
7436
  ref_key: "gridLayoutRef",
7459
7437
  ref: a,
@@ -7462,37 +7440,37 @@ const Jo = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], ea = { cl
7462
7440
  tiles: S.value,
7463
7441
  onUpdateTiles: g
7464
7442
  }, {
7465
- tile: X(({ tile: k }) => [
7466
- j(k) ? (M(), se("div", ra, [
7443
+ tile: j(({ tile: k }) => [
7444
+ Y(k) ? (N(), ne("div", ra, [
7467
7445
  Xe(R.$slots, ie(k), {}, void 0, !0)
7468
- ])) : (M(), Q(rs, {
7469
- key: N.value ? `${k.id}-tile` : `${k.id}-tile-fullscreen`,
7446
+ ])) : (N(), K(rs, {
7447
+ key: L.value ? `${k.id}-tile` : `${k.id}-tile-fullscreen`,
7470
7448
  "refresh-counter": o.value,
7471
- "onUpdate:refreshCounter": E[0] || (E[0] = (L) => o.value = L),
7449
+ "onUpdate:refreshCounter": E[0] || (E[0] = (A) => o.value = A),
7472
7450
  class: "tile-container",
7473
- context: O(le),
7451
+ context: O(de),
7474
7452
  definition: k.meta,
7475
7453
  height: k.layout.size.rows * (s.value.tile_height || O(dt)) + parseInt(O(es), 10),
7476
- "hide-actions": !O(le).showTileActions,
7477
- "hide-zoom-actions": !O(le).showTileZoomActions,
7478
- "is-fullscreen": N.value,
7479
- "query-ready": O($),
7454
+ "hide-actions": !O(de).showTileActions,
7455
+ "hide-zoom-actions": !O(de).showTileZoomActions,
7456
+ "is-fullscreen": L.value,
7457
+ "query-ready": O(V),
7480
7458
  "tile-id": k.id,
7481
7459
  "tile-type": k.type,
7482
- onDuplicateTile: (L) => G(k),
7483
- onEditTile: (L) => C(k),
7484
- onRemoveTile: (L) => f(k),
7485
- onTileLoaded: (L) => x(k),
7486
- onTileTimeRangeZoom: E[1] || (E[1] = (L) => i("tile-time-range-zoom", L))
7460
+ onDuplicateTile: (A) => Q(k),
7461
+ onEditTile: (A) => C(k),
7462
+ onRemoveTile: (A) => m(k),
7463
+ onTileLoaded: (A) => w(k),
7464
+ onTileTimeRangeZoom: E[1] || (E[1] = (A) => i("tile-time-range-zoom", A))
7487
7465
  }, null, 8, ["refresh-counter", "context", "definition", "height", "hide-actions", "hide-zoom-actions", "is-fullscreen", "query-ready", "tile-id", "tile-type", "onDuplicateTile", "onEditTile", "onRemoveTile", "onTileLoaded"]))
7488
7466
  ]),
7489
7467
  _: 3
7490
- }, 40, ["columns", "tile-height", "tiles"])) : (M(), Q(q, {
7468
+ }, 40, ["columns", "tile-height", "tiles"])) : (N(), K(F, {
7491
7469
  key: 1,
7492
7470
  appearance: "danger"
7493
7471
  }, {
7494
- default: X(() => [
7495
- Ke(ae(O(r).t("renderer.noQueryBridge")), 1)
7472
+ default: j(() => [
7473
+ Ke(le(O(r).t("renderer.noQueryBridge")), 1)
7496
7474
  ]),
7497
7475
  _: 1
7498
7476
  }))
@@ -7500,7 +7478,7 @@ const Jo = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], ea = { cl
7500
7478
  ], 34);
7501
7479
  };
7502
7480
  }
7503
- }), ba = /* @__PURE__ */ We(oa, [["__scopeId", "data-v-4633b828"]]), wa = /* @__PURE__ */ _e({
7481
+ }), wa = /* @__PURE__ */ We(oa, [["__scopeId", "data-v-4633b828"]]), ba = /* @__PURE__ */ ye({
7504
7482
  __name: "DashboardTilePreview",
7505
7483
  props: {
7506
7484
  context: {},
@@ -7520,51 +7498,51 @@ const Jo = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], ea = { cl
7520
7498
  globalFilters: st(() => n.globalFilters),
7521
7499
  context: st(() => n.context),
7522
7500
  preview: T(() => n.preview)
7523
- }), y = T(() => ze(n.definition)), v = T(() => y.value ? "columns" in n.definition.query && !n.definition.query.columns?.length : !("metrics" in n.definition.query) || !n.definition.query.metrics || n.definition.query.metrics.length === 0), x = V(dt);
7501
+ }), y = T(() => ze(n.definition)), v = T(() => y.value ? "columns" in n.definition.query && !n.definition.query.columns?.length : !("metrics" in n.definition.query) || !n.definition.query.metrics || n.definition.query.metrics.length === 0), w = X(dt);
7524
7502
  let _;
7525
7503
  Rt(() => {
7526
7504
  const C = i.value?.parentElement;
7527
- C && (x.value = C.getBoundingClientRect().height, _ = new ResizeObserver(([j]) => {
7528
- const { height: A } = j.contentRect;
7529
- x.value = A;
7505
+ C && (w.value = C.getBoundingClientRect().height, _ = new ResizeObserver(([Y]) => {
7506
+ const { height: M } = Y.contentRect;
7507
+ w.value = M;
7530
7508
  }), _.observe(C));
7531
7509
  }), lt(() => _?.disconnect());
7532
- const I = V(0);
7510
+ const I = X(0);
7533
7511
  return e({
7534
7512
  refresh: () => {
7535
7513
  I.value++;
7536
7514
  },
7537
7515
  getExportData: () => s.value?.getExportData()
7538
- }), (C, j) => {
7539
- const A = be("KEmptyState");
7540
- return M(), se("div", {
7516
+ }), (C, Y) => {
7517
+ const M = _e("KEmptyState");
7518
+ return N(), ne("div", {
7541
7519
  ref_key: "root",
7542
7520
  ref: i,
7543
7521
  "data-testid": "dashboard-tile-preview-root"
7544
7522
  }, [
7545
- v.value ? (M(), Q(A, {
7523
+ v.value ? (N(), K(M, {
7546
7524
  key: 0,
7547
7525
  "action-button-visible": !1,
7548
7526
  "data-testid": "chart-not-configured-empty-state"
7549
7527
  }, {
7550
- title: X(() => [
7551
- me("p", null, ae(O(u).t("renderer.not_configured.title")), 1)
7528
+ title: j(() => [
7529
+ he("p", null, le(O(u).t("renderer.not_configured.title")), 1)
7552
7530
  ]),
7553
- default: X(() => [
7554
- me("p", null, ae(O(u).t("renderer.not_configured.description")), 1)
7531
+ default: j(() => [
7532
+ he("p", null, le(O(u).t("renderer.not_configured.description")), 1)
7555
7533
  ]),
7556
7534
  _: 1
7557
- })) : (M(), Q(rs, {
7535
+ })) : (N(), K(rs, {
7558
7536
  key: 1,
7559
7537
  ref: "dashboard-tile",
7560
7538
  "refresh-counter": I.value,
7561
- "onUpdate:refreshCounter": j[0] || (j[0] = (ie) => I.value = ie),
7539
+ "onUpdate:refreshCounter": Y[0] || (Y[0] = (ie) => I.value = ie),
7562
7540
  context: {
7563
7541
  ...O(d),
7564
7542
  editable: !1
7565
7543
  },
7566
7544
  definition: n.definition,
7567
- height: x.value,
7545
+ height: w.value,
7568
7546
  "hide-actions": "",
7569
7547
  "query-ready": O(h),
7570
7548
  "show-refresh": "",
@@ -7652,8 +7630,8 @@ export {
7652
7630
  yo as a,
7653
7631
  dt as b,
7654
7632
  Br as c,
7655
- ba as d,
7656
- wa as e,
7633
+ wa as d,
7634
+ ba as e,
7657
7635
  Wr as f,
7658
7636
  xa as g
7659
7637
  };