@kong-ui-public/analytics-metric-provider 2.0.32 → 2.0.34

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.
@@ -38,17 +38,17 @@ function Qt(e, t) {
38
38
  return r;
39
39
  var a = r.getDate(), i = new Date(r.getTime());
40
40
  i.setMonth(r.getMonth() + n + 1, 0);
41
- var s = i.getDate();
42
- return a >= s ? i : (r.setFullYear(i.getFullYear(), i.getMonth(), a), r);
41
+ var o = i.getDate();
42
+ return a >= o ? i : (r.setFullYear(i.getFullYear(), i.getMonth(), a), r);
43
43
  }
44
44
  var Jt = {};
45
45
  function Xt() {
46
46
  return Jt;
47
47
  }
48
48
  function pe(e, t) {
49
- var r, n, a, i, s, d, c, o;
49
+ var r, n, a, i, o, d, c, s;
50
50
  M(1, arguments);
51
- var u = Xt(), l = z((r = (n = (a = (i = t == null ? void 0 : t.weekStartsOn) !== null && i !== void 0 ? i : t == null || (s = t.locale) === null || s === void 0 || (d = s.options) === null || d === void 0 ? void 0 : d.weekStartsOn) !== null && a !== void 0 ? a : u.weekStartsOn) !== null && n !== void 0 ? n : (c = u.locale) === null || c === void 0 || (o = c.options) === null || o === void 0 ? void 0 : o.weekStartsOn) !== null && r !== void 0 ? r : 0);
51
+ var u = Xt(), l = z((r = (n = (a = (i = t == null ? void 0 : t.weekStartsOn) !== null && i !== void 0 ? i : t == null || (o = t.locale) === null || o === void 0 || (d = o.options) === null || d === void 0 ? void 0 : d.weekStartsOn) !== null && a !== void 0 ? a : u.weekStartsOn) !== null && n !== void 0 ? n : (c = u.locale) === null || c === void 0 || (s = c.options) === null || s === void 0 ? void 0 : s.weekStartsOn) !== null && r !== void 0 ? r : 0);
52
52
  if (!(l >= 0 && l <= 6))
53
53
  throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
54
54
  var f = J(e), p = f.getDay(), y = (p < l ? 7 : 0) + p - l;
@@ -96,10 +96,10 @@ function qe(e, t) {
96
96
  var r = z(t);
97
97
  return Qt(e, -r);
98
98
  }
99
- function or(e, t) {
99
+ function sr(e, t) {
100
100
  if (M(2, arguments), !t || fe(t) !== "object")
101
101
  return /* @__PURE__ */ new Date(NaN);
102
- var r = t.years ? z(t.years) : 0, n = t.months ? z(t.months) : 0, a = t.weeks ? z(t.weeks) : 0, i = t.days ? z(t.days) : 0, s = t.hours ? z(t.hours) : 0, d = t.minutes ? z(t.minutes) : 0, c = t.seconds ? z(t.seconds) : 0, o = qe(e, n + r * 12), u = nr(o, i + a * 7), l = d + s * 60, f = c + l * 60, p = f * 1e3, y = new Date(u.getTime() - p);
102
+ var r = t.years ? z(t.years) : 0, n = t.months ? z(t.months) : 0, a = t.weeks ? z(t.weeks) : 0, i = t.days ? z(t.days) : 0, o = t.hours ? z(t.hours) : 0, d = t.minutes ? z(t.minutes) : 0, c = t.seconds ? z(t.seconds) : 0, s = qe(e, n + r * 12), u = nr(s, i + a * 7), l = d + o * 60, f = c + l * 60, p = f * 1e3, y = new Date(u.getTime() - p);
103
103
  return y;
104
104
  }
105
105
  function $e(e) {
@@ -114,7 +114,7 @@ var yt = { exports: {} };
114
114
  }
115
115
  e.exports = t, e.exports.__esModule = !0, e.exports.default = e.exports;
116
116
  })(yt);
117
- var sr = yt.exports, Le = { exports: {} };
117
+ var or = yt.exports, Le = { exports: {} };
118
118
  (function(e, t) {
119
119
  Object.defineProperty(t, "__esModule", {
120
120
  value: !0
@@ -161,10 +161,10 @@ function pr(e, t) {
161
161
  i >= 0 && (n[i] = parseInt(r[a].value, 10));
162
162
  }
163
163
  return n;
164
- } catch (s) {
165
- if (s instanceof RangeError)
164
+ } catch (o) {
165
+ if (o instanceof RangeError)
166
166
  return [NaN];
167
- throw s;
167
+ throw o;
168
168
  }
169
169
  }
170
170
  function vr(e, t) {
@@ -206,9 +206,9 @@ function mr(e) {
206
206
  }
207
207
  return Te[e];
208
208
  }
209
- function Fe(e, t, r, n, a, i, s) {
209
+ function Fe(e, t, r, n, a, i, o) {
210
210
  var d = /* @__PURE__ */ new Date(0);
211
- return d.setUTCFullYear(e, t, r), d.setUTCHours(n, a, i, s), d;
211
+ return d.setUTCFullYear(e, t, r), d.setUTCHours(n, a, i, o), d;
212
212
  }
213
213
  var tt = 36e5, gr = 6e4, we = {
214
214
  timezone: /([Z+-].*)$/,
@@ -225,13 +225,13 @@ function me(e, t, r) {
225
225
  return i = parseInt(n[1], 10), rt(i) ? -(i * tt) : NaN;
226
226
  if (n = we.timezoneHHMM.exec(e), n) {
227
227
  i = parseInt(n[1], 10);
228
- var s = parseInt(n[2], 10);
229
- return rt(i, s) ? (a = Math.abs(i) * tt + s * gr, i > 0 ? -a : a) : NaN;
228
+ var o = parseInt(n[2], 10);
229
+ return rt(i, o) ? (a = Math.abs(i) * tt + o * gr, i > 0 ? -a : a) : NaN;
230
230
  }
231
231
  if (Cr(e)) {
232
232
  t = new Date(t || Date.now());
233
- var d = r ? t : hr(t), c = Oe(d, e), o = r ? c : yr(t, c, e);
234
- return -o;
233
+ var d = r ? t : hr(t), c = Oe(d, e), s = r ? c : yr(t, c, e);
234
+ return -s;
235
235
  }
236
236
  return NaN;
237
237
  }
@@ -263,8 +263,8 @@ function yr(e, t, r) {
263
263
  if (t === i)
264
264
  return t;
265
265
  a -= i - t;
266
- var s = Oe(new Date(a), r);
267
- return i === s ? i : Math.max(i, s);
266
+ var o = Oe(new Date(a), r);
267
+ return i === o ? i : Math.max(i, o);
268
268
  }
269
269
  function rt(e, t) {
270
270
  return -23 <= e && e <= 23 && (t == null || 0 <= t && t <= 59);
@@ -330,19 +330,19 @@ function ze(e, t) {
330
330
  return new Date(e);
331
331
  if (!(typeof e == "string" || Object.prototype.toString.call(e) === "[object String]"))
332
332
  return /* @__PURE__ */ new Date(NaN);
333
- var a = Sr(e), i = Nr(a.date, n), s = i.year, d = i.restDateString, c = br(d, s);
333
+ var a = Sr(e), i = Nr(a.date, n), o = i.year, d = i.restDateString, c = br(d, o);
334
334
  if (isNaN(c))
335
335
  return /* @__PURE__ */ new Date(NaN);
336
336
  if (c) {
337
- var o = c.getTime(), u = 0, l;
337
+ var s = c.getTime(), u = 0, l;
338
338
  if (a.time && (u = Er(a.time), isNaN(u)))
339
339
  return /* @__PURE__ */ new Date(NaN);
340
340
  if (a.timeZone || r.timeZone) {
341
- if (l = me(a.timeZone || r.timeZone, new Date(o + u)), isNaN(l))
341
+ if (l = me(a.timeZone || r.timeZone, new Date(s + u)), isNaN(l))
342
342
  return /* @__PURE__ */ new Date(NaN);
343
343
  } else
344
- l = et(new Date(o + u)), l = et(new Date(o + u + l));
345
- return new Date(o + u + l);
344
+ l = et(new Date(s + u)), l = et(new Date(s + u + l));
345
+ return new Date(s + u + l);
346
346
  } else
347
347
  return /* @__PURE__ */ new Date(NaN);
348
348
  }
@@ -364,10 +364,10 @@ function Nr(e, t) {
364
364
  };
365
365
  }
366
366
  if (a = x.YY.exec(e) || r.exec(e), a) {
367
- var s = a[1];
367
+ var o = a[1];
368
368
  return {
369
- year: parseInt(s, 10) * 100,
370
- restDateString: e.slice(s.length)
369
+ year: parseInt(o, 10) * 100,
370
+ restDateString: e.slice(o.length)
371
371
  };
372
372
  }
373
373
  return {
@@ -381,23 +381,23 @@ function br(e, t) {
381
381
  if (e.length === 0)
382
382
  return n = /* @__PURE__ */ new Date(0), n.setUTCFullYear(t), n;
383
383
  if (r = x.MM.exec(e), r)
384
- return n = /* @__PURE__ */ new Date(0), a = parseInt(r[1], 10) - 1, ot(t, a) ? (n.setUTCFullYear(t, a), n) : /* @__PURE__ */ new Date(NaN);
384
+ return n = /* @__PURE__ */ new Date(0), a = parseInt(r[1], 10) - 1, st(t, a) ? (n.setUTCFullYear(t, a), n) : /* @__PURE__ */ new Date(NaN);
385
385
  if (r = x.DDD.exec(e), r) {
386
386
  n = /* @__PURE__ */ new Date(0);
387
- var s = parseInt(r[1], 10);
388
- return _r(t, s) ? (n.setUTCFullYear(t, 0, s), n) : /* @__PURE__ */ new Date(NaN);
387
+ var o = parseInt(r[1], 10);
388
+ return _r(t, o) ? (n.setUTCFullYear(t, 0, o), n) : /* @__PURE__ */ new Date(NaN);
389
389
  }
390
390
  if (r = x.MMDD.exec(e), r) {
391
391
  n = /* @__PURE__ */ new Date(0), a = parseInt(r[1], 10) - 1;
392
392
  var d = parseInt(r[2], 10);
393
- return ot(t, a, d) ? (n.setUTCFullYear(t, a, d), n) : /* @__PURE__ */ new Date(NaN);
393
+ return st(t, a, d) ? (n.setUTCFullYear(t, a, d), n) : /* @__PURE__ */ new Date(NaN);
394
394
  }
395
395
  if (r = x.Www.exec(e), r)
396
- return i = parseInt(r[1], 10) - 1, st(t, i) ? at(t, i) : /* @__PURE__ */ new Date(NaN);
396
+ return i = parseInt(r[1], 10) - 1, ot(t, i) ? at(t, i) : /* @__PURE__ */ new Date(NaN);
397
397
  if (r = x.WwwD.exec(e), r) {
398
398
  i = parseInt(r[1], 10) - 1;
399
399
  var c = parseInt(r[2], 10) - 1;
400
- return st(t, i, c) ? at(t, i, c) : /* @__PURE__ */ new Date(NaN);
400
+ return ot(t, i, c) ? at(t, i, c) : /* @__PURE__ */ new Date(NaN);
401
401
  }
402
402
  return null;
403
403
  }
@@ -425,7 +425,7 @@ var Dr = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Rr = [31, 29, 31, 30,
425
425
  function Tt(e) {
426
426
  return e % 400 === 0 || e % 4 === 0 && e % 100 !== 0;
427
427
  }
428
- function ot(e, t, r) {
428
+ function st(e, t, r) {
429
429
  if (t < 0 || t > 11)
430
430
  return !1;
431
431
  if (r != null) {
@@ -443,7 +443,7 @@ function _r(e, t) {
443
443
  var r = Tt(e);
444
444
  return !(r && t > 366 || !r && t > 365);
445
445
  }
446
- function st(e, t, r) {
446
+ function ot(e, t, r) {
447
447
  return !(t < 0 || t > 52 || r != null && (r < 0 || r > 6));
448
448
  }
449
449
  function Ne(e, t, r) {
@@ -465,7 +465,7 @@ var Ue = { exports: {} }, Ye = { exports: {} };
465
465
  })(Ye, Ye.exports);
466
466
  var Ir = Ye.exports;
467
467
  (function(e, t) {
468
- var r = sr.default;
468
+ var r = or.default;
469
469
  Object.defineProperty(t, "__esModule", {
470
470
  value: !0
471
471
  }), t.default = a;
@@ -478,8 +478,8 @@ var Ir = Ye.exports;
478
478
  var xr = Ue.exports;
479
479
  const Ar = /* @__PURE__ */ $e(xr);
480
480
  function Mr(e, t, r) {
481
- var n = ze(e, r), a = me(t, n, !0), i = new Date(n.getTime() - a), s = /* @__PURE__ */ new Date(0);
482
- return s.setFullYear(i.getUTCFullYear(), i.getUTCMonth(), i.getUTCDate()), s.setHours(i.getUTCHours(), i.getUTCMinutes(), i.getUTCSeconds(), i.getUTCMilliseconds()), s;
481
+ var n = ze(e, r), a = me(t, n, !0), i = new Date(n.getTime() - a), o = /* @__PURE__ */ new Date(0);
482
+ return o.setFullYear(i.getUTCFullYear(), i.getUTCMonth(), i.getUTCDate()), o.setHours(i.getUTCHours(), i.getUTCMinutes(), i.getUTCSeconds(), i.getUTCMilliseconds()), o;
483
483
  }
484
484
  function wt(e, t) {
485
485
  return -me(e, t);
@@ -497,8 +497,8 @@ function Lr(e, t, r) {
497
497
  a.getMinutes(),
498
498
  a.getSeconds(),
499
499
  a.getMilliseconds()
500
- ).getTime(), s = me(t, new Date(i));
501
- return new Date(i + s);
500
+ ).getTime(), o = me(t, new Date(i));
501
+ return new Date(i + o);
502
502
  }
503
503
  const ut = {
504
504
  [g.MINUTELY]: 60 * 1e3,
@@ -534,7 +534,7 @@ let zr = class Nt {
534
534
  if (t)
535
535
  return new Date(this.endDate().getTime() - this.timeframe.timeframeLengthMs() * n);
536
536
  {
537
- const a = this.endDate(), i = this.timeframe.rawStart(this.tz), s = lt(i, r, this.tz), d = (a.getTime() - s.getTime()) * (n - 1);
537
+ const a = this.endDate(), i = this.timeframe.rawStart(this.tz), o = lt(i, r, this.tz), d = (a.getTime() - o.getTime()) * (n - 1);
538
538
  return lt(
539
539
  new Date(i.getTime() - d),
540
540
  r,
@@ -566,7 +566,7 @@ let zr = class Nt {
566
566
  }
567
567
  // Return whether the timeframe's bounds are within the allotment for a free tier user.
568
568
  withinFreeTier() {
569
- return this.startDate() >= or(/* @__PURE__ */ new Date(), { days: 1 });
569
+ return this.startDate() >= sr(/* @__PURE__ */ new Date(), { days: 1 });
570
570
  }
571
571
  };
572
572
  class bt extends zr {
@@ -912,13 +912,13 @@ const B = Symbol("default"), Ee = Q.STATUS_CODE_GROUPED, ct = (e, t, r, n, a) =>
912
912
  };
913
913
  function Qr(e, t, r) {
914
914
  var d;
915
- const n = ((d = e.meta.metricNames) == null ? void 0 : d[0]) || "", a = Object.keys(e.meta.dimensions || {}), i = !!a.find((c) => c === Ee), s = a.find((c) => c !== Ee);
915
+ const n = ((d = e.meta.metricNames) == null ? void 0 : d[0]) || "", a = Object.keys(e.meta.dimensions || {}), i = !!a.find((c) => c === Ee), o = a.find((c) => c !== Ee);
916
916
  return a.length > 2 || a.length > 1 && !i ? (console.error("Don't know how to work with provided dimensions:", a), {
917
917
  previous: { [B]: { [B]: 0 } },
918
918
  current: { [B]: { [B]: 0 } }
919
- }) : e.records.reduce((c, o) => {
920
- const u = o.event[n], l = s ? o.event[s] : B, f = i ? o.event[Ee] : B;
921
- return new Date(o.timestamp).getTime() === t.startDate().getTime() && r ? ct(c, "previous", l, f, u) : ct(c, "current", l, f, u), c;
919
+ }) : e.records.reduce((c, s) => {
920
+ const u = s.event[n], l = o ? s.event[o] : B, f = i ? s.event[Ee] : B;
921
+ return new Date(s.timestamp).getTime() === t.startDate().getTime() && r ? ct(c, "previous", l, f, u) : ct(c, "current", l, f, u), c;
922
922
  }, {
923
923
  previous: {},
924
924
  current: {}
@@ -943,7 +943,7 @@ function Jr(e) {
943
943
  return null;
944
944
  const l = (p = e.filter) != null && p.value ? JSON.stringify(e.filter.value) : "";
945
945
  return `metric-fetcher-${n.value}-${(y = e.dimensions) == null ? void 0 : y.join("-")}-${(C = e.metrics) == null ? void 0 : C.join("-")}-${l}`;
946
- }), { response: i, error: s, isValidating: d } = K.useRequest(
946
+ }), { response: i, error: o, isValidating: d } = K.useRequest(
947
947
  () => a.value,
948
948
  () => e.dataFetcher(t.value, r.value),
949
949
  {
@@ -951,20 +951,20 @@ function Jr(e) {
951
951
  revalidateOnFocus: !1,
952
952
  errorRetryCount: Gr
953
953
  }
954
- ), { state: c, swrvState: o } = Kr(i, s, d), u = m(() => {
954
+ ), { state: c, swrvState: s } = Kr(i, o, d), u = m(() => {
955
955
  var l, f, p, y, C, N, $, S, T, G;
956
956
  return !((p = (f = (l = i.value) == null ? void 0 : l.data) == null ? void 0 : f.records) != null && p.length) || !((N = (C = (y = i.value) == null ? void 0 : y.data) == null ? void 0 : C.meta) != null && N.dimensions) || !((G = (T = (S = ($ = i.value) == null ? void 0 : $.data) == null ? void 0 : S.meta) == null ? void 0 : T.metricNames) != null && G.length) ? { current: {}, previous: {} } : Qr(i.value.data, t.value, !!e.withTrend);
957
957
  });
958
958
  return {
959
- isLoading: m(() => o.PENDING === c.value),
960
- hasError: m(() => o.ERROR === c.value),
959
+ isLoading: m(() => s.PENDING === c.value),
960
+ hasError: m(() => s.ERROR === c.value),
961
961
  raw: i,
962
962
  mapped: u
963
963
  };
964
964
  }
965
- const re = (e, t, r = B, n) => (n ?? [B]).reduce((i, s) => {
965
+ const re = (e, t, r = B, n) => (n ?? [B]).reduce((i, o) => {
966
966
  const d = e[t][r];
967
- return d ? i + (d[s] || 0) : i;
967
+ return d ? i + (d[o] || 0) : i;
968
968
  }, 0);
969
969
  function Xr(e) {
970
970
  const {
@@ -973,15 +973,15 @@ function Xr(e) {
973
973
  description: n,
974
974
  record: a,
975
975
  hasError: i,
976
- increaseIsBad: s,
976
+ increaseIsBad: o,
977
977
  formatValueFn: d,
978
978
  trendRange: c
979
979
  } = e;
980
980
  return m(() => {
981
- let o = 0, u = 0;
981
+ let s = 0, u = 0;
982
982
  if (a != null && a.value)
983
983
  try {
984
- o = re(a.value, "current", e.lookupKey, e.sumGroupedValues), u = re(a.value, "previous", e.lookupKey, e.sumGroupedValues);
984
+ s = re(a.value, "current", e.lookupKey, e.sumGroupedValues), u = re(a.value, "previous", e.lookupKey, e.sumGroupedValues);
985
985
  } catch (l) {
986
986
  console.error(
987
987
  "Metric card data doesn't have the expected structure:",
@@ -991,11 +991,11 @@ function Xr(e) {
991
991
  return {
992
992
  cardType: t,
993
993
  hasError: i.value,
994
- currentValue: o,
994
+ currentValue: s,
995
995
  previousValue: u,
996
996
  title: r.value,
997
997
  description: n,
998
- increaseIsBad: !!s,
998
+ increaseIsBad: !!o,
999
999
  // Coerce undefined to false
1000
1000
  formatValueFn: d,
1001
1001
  trendRange: c == null ? void 0 : c.value
@@ -1033,17 +1033,17 @@ var Pe = (
1033
1033
  var r = this.serializeKey(t);
1034
1034
  return this.items.get(r);
1035
1035
  }, e.prototype.set = function(t, r, n) {
1036
- var a = this.serializeKey(t), i = n || this.ttl, s = Date.now(), d = {
1036
+ var a = this.serializeKey(t), i = n || this.ttl, o = Date.now(), d = {
1037
1037
  data: r,
1038
- createdAt: s,
1039
- expiresAt: i ? s + i : 1 / 0
1038
+ createdAt: o,
1039
+ expiresAt: i ? o + i : 1 / 0
1040
1040
  };
1041
1041
  this.dispatchExpire(i, d, a), this.items.set(a, d);
1042
1042
  }, e.prototype.dispatchExpire = function(t, r, n) {
1043
1043
  var a = this;
1044
1044
  t && setTimeout(function() {
1045
- var i = Date.now(), s = i >= r.expiresAt;
1046
- s && a.delete(n);
1045
+ var i = Date.now(), o = i >= r.expiresAt;
1046
+ o && a.delete(n);
1047
1047
  }, t);
1048
1048
  }, e.prototype.delete = function(t) {
1049
1049
  this.items.delete(t);
@@ -1077,114 +1077,114 @@ var Z = function() {
1077
1077
  }, Z.apply(this, arguments);
1078
1078
  }, X = function(e, t, r, n) {
1079
1079
  function a(i) {
1080
- return i instanceof r ? i : new r(function(s) {
1081
- s(i);
1080
+ return i instanceof r ? i : new r(function(o) {
1081
+ o(i);
1082
1082
  });
1083
1083
  }
1084
- return new (r || (r = Promise))(function(i, s) {
1084
+ return new (r || (r = Promise))(function(i, o) {
1085
1085
  function d(u) {
1086
1086
  try {
1087
- o(n.next(u));
1087
+ s(n.next(u));
1088
1088
  } catch (l) {
1089
- s(l);
1089
+ o(l);
1090
1090
  }
1091
1091
  }
1092
1092
  function c(u) {
1093
1093
  try {
1094
- o(n.throw(u));
1094
+ s(n.throw(u));
1095
1095
  } catch (l) {
1096
- s(l);
1096
+ o(l);
1097
1097
  }
1098
1098
  }
1099
- function o(u) {
1099
+ function s(u) {
1100
1100
  u.done ? i(u.value) : a(u.value).then(d, c);
1101
1101
  }
1102
- o((n = n.apply(e, t || [])).next());
1102
+ s((n = n.apply(e, t || [])).next());
1103
1103
  });
1104
1104
  }, ee = function(e, t) {
1105
1105
  var r = { label: 0, sent: function() {
1106
1106
  if (i[0] & 1)
1107
1107
  throw i[1];
1108
1108
  return i[1];
1109
- }, trys: [], ops: [] }, n, a, i, s;
1110
- return s = { next: d(0), throw: d(1), return: d(2) }, typeof Symbol == "function" && (s[Symbol.iterator] = function() {
1109
+ }, trys: [], ops: [] }, n, a, i, o;
1110
+ return o = { next: d(0), throw: d(1), return: d(2) }, typeof Symbol == "function" && (o[Symbol.iterator] = function() {
1111
1111
  return this;
1112
- }), s;
1113
- function d(o) {
1112
+ }), o;
1113
+ function d(s) {
1114
1114
  return function(u) {
1115
- return c([o, u]);
1115
+ return c([s, u]);
1116
1116
  };
1117
1117
  }
1118
- function c(o) {
1118
+ function c(s) {
1119
1119
  if (n)
1120
1120
  throw new TypeError("Generator is already executing.");
1121
1121
  for (; r; )
1122
1122
  try {
1123
- if (n = 1, a && (i = o[0] & 2 ? a.return : o[0] ? a.throw || ((i = a.return) && i.call(a), 0) : a.next) && !(i = i.call(a, o[1])).done)
1123
+ if (n = 1, a && (i = s[0] & 2 ? a.return : s[0] ? a.throw || ((i = a.return) && i.call(a), 0) : a.next) && !(i = i.call(a, s[1])).done)
1124
1124
  return i;
1125
- switch (a = 0, i && (o = [o[0] & 2, i.value]), o[0]) {
1125
+ switch (a = 0, i && (s = [s[0] & 2, i.value]), s[0]) {
1126
1126
  case 0:
1127
1127
  case 1:
1128
- i = o;
1128
+ i = s;
1129
1129
  break;
1130
1130
  case 4:
1131
- return r.label++, { value: o[1], done: !1 };
1131
+ return r.label++, { value: s[1], done: !1 };
1132
1132
  case 5:
1133
- r.label++, a = o[1], o = [0];
1133
+ r.label++, a = s[1], s = [0];
1134
1134
  continue;
1135
1135
  case 7:
1136
- o = r.ops.pop(), r.trys.pop();
1136
+ s = r.ops.pop(), r.trys.pop();
1137
1137
  continue;
1138
1138
  default:
1139
- if (i = r.trys, !(i = i.length > 0 && i[i.length - 1]) && (o[0] === 6 || o[0] === 2)) {
1139
+ if (i = r.trys, !(i = i.length > 0 && i[i.length - 1]) && (s[0] === 6 || s[0] === 2)) {
1140
1140
  r = 0;
1141
1141
  continue;
1142
1142
  }
1143
- if (o[0] === 3 && (!i || o[1] > i[0] && o[1] < i[3])) {
1144
- r.label = o[1];
1143
+ if (s[0] === 3 && (!i || s[1] > i[0] && s[1] < i[3])) {
1144
+ r.label = s[1];
1145
1145
  break;
1146
1146
  }
1147
- if (o[0] === 6 && r.label < i[1]) {
1148
- r.label = i[1], i = o;
1147
+ if (s[0] === 6 && r.label < i[1]) {
1148
+ r.label = i[1], i = s;
1149
1149
  break;
1150
1150
  }
1151
1151
  if (i && r.label < i[2]) {
1152
- r.label = i[2], r.ops.push(o);
1152
+ r.label = i[2], r.ops.push(s);
1153
1153
  break;
1154
1154
  }
1155
1155
  i[2] && r.ops.pop(), r.trys.pop();
1156
1156
  continue;
1157
1157
  }
1158
- o = t.call(e, r);
1158
+ s = t.call(e, r);
1159
1159
  } catch (u) {
1160
- o = [6, u], a = 0;
1160
+ s = [6, u], a = 0;
1161
1161
  } finally {
1162
1162
  n = i = 0;
1163
1163
  }
1164
- if (o[0] & 5)
1165
- throw o[1];
1166
- return { value: o[0] ? o[1] : void 0, done: !0 };
1164
+ if (s[0] & 5)
1165
+ throw s[1];
1166
+ return { value: s[0] ? s[1] : void 0, done: !0 };
1167
1167
  }
1168
1168
  }, ai = function(e, t) {
1169
1169
  var r = typeof Symbol == "function" && e[Symbol.iterator];
1170
1170
  if (!r)
1171
1171
  return e;
1172
- var n = r.call(e), a, i = [], s;
1172
+ var n = r.call(e), a, i = [], o;
1173
1173
  try {
1174
1174
  for (; (t === void 0 || t-- > 0) && !(a = n.next()).done; )
1175
1175
  i.push(a.value);
1176
1176
  } catch (d) {
1177
- s = { error: d };
1177
+ o = { error: d };
1178
1178
  } finally {
1179
1179
  try {
1180
1180
  a && !a.done && (r = n.return) && r.call(n);
1181
1181
  } finally {
1182
- if (s)
1183
- throw s.error;
1182
+ if (o)
1183
+ throw o.error;
1184
1184
  }
1185
1185
  }
1186
1186
  return i;
1187
- }, oi = function(e, t, r) {
1187
+ }, si = function(e, t, r) {
1188
1188
  if (r || arguments.length === 2)
1189
1189
  for (var n = 0, a = t.length, i; n < a; n++)
1190
1190
  (i || !(n in t)) && (i || (i = Array.prototype.slice.call(t, 0, n)), i[n] = t[n]);
@@ -1204,7 +1204,7 @@ var Z = function() {
1204
1204
  isOnline: Re.isOnline,
1205
1205
  isDocumentVisible: Re.isDocumentVisible
1206
1206
  };
1207
- function si(e, t, r) {
1207
+ function oi(e, t, r) {
1208
1208
  var n = ve.get(e);
1209
1209
  if (n)
1210
1210
  n.data.push(t);
@@ -1223,7 +1223,7 @@ function ui(e, t, r) {
1223
1223
  }
1224
1224
  var pt = function(e, t, r, n) {
1225
1225
  return r === void 0 && (r = Rt), n === void 0 && (n = _t.ttl), X(void 0, void 0, void 0, function() {
1226
- var a, i, s, d, c, o, u;
1226
+ var a, i, o, d, c, s, u;
1227
1227
  return ee(this, function(l) {
1228
1228
  switch (l.label) {
1229
1229
  case 0:
@@ -1241,13 +1241,13 @@ var pt = function(e, t, r, n) {
1241
1241
  case 5:
1242
1242
  a = t, l.label = 6;
1243
1243
  case 6:
1244
- if (s = !1, c = { data: a, error: i, isValidating: s }, typeof a < "u")
1244
+ if (o = !1, c = { data: a, error: i, isValidating: o }, typeof a < "u")
1245
1245
  try {
1246
1246
  r.set(e, c, n);
1247
1247
  } catch (f) {
1248
1248
  console.error("swrv(mutate): failed to set cache", f);
1249
1249
  }
1250
- return o = ve.get(e), o && o.data.length && (u = o.data.filter(function(f) {
1250
+ return s = ve.get(e), s && s.data.length && (u = s.data.filter(function(f) {
1251
1251
  return f.key === e;
1252
1252
  }), u.forEach(function(f, p) {
1253
1253
  typeof c.data < "u" && (f.data = c.data), f.error = c.error, f.isValidating = c.isValidating;
@@ -1261,10 +1261,10 @@ var pt = function(e, t, r, n) {
1261
1261
  function li() {
1262
1262
  for (var e = this, t = [], r = 0; r < arguments.length; r++)
1263
1263
  t[r] = arguments[r];
1264
- var n, a, i = Z({}, _t), s = !1, d = !1, c = kt(), o = (c == null ? void 0 : c.proxy) || c;
1265
- if (!o)
1264
+ var n, a, i = Z({}, _t), o = !1, d = !1, c = kt(), s = (c == null ? void 0 : c.proxy) || c;
1265
+ if (!s)
1266
1266
  return console.error("Could not get current instance, check to make sure that `useSwrv` is declared in the top level of the setup function."), null;
1267
- var u = (o == null ? void 0 : o.$isServer) || !1;
1267
+ var u = (s == null ? void 0 : s.$isServer) || !1;
1268
1268
  t.length >= 1 && (n = t[0]), t.length >= 2 && (a = t[1]), t.length > 2 && (i = Z(Z({}, i), t[2]));
1269
1269
  var l = u ? i.serverTTL : i.ttl, f = typeof n == "function" ? n : xe(n);
1270
1270
  typeof a > "u" && (a = i.fetcher);
@@ -1277,14 +1277,14 @@ function li() {
1277
1277
  }));
1278
1278
  var y = function(S, T) {
1279
1279
  return X(e, void 0, void 0, function() {
1280
- var G, L, oe, se, ge, je, he, Be = this;
1280
+ var G, L, se, oe, ge, je, he, Be = this;
1281
1281
  return ee(this, function(ye) {
1282
1282
  switch (ye.label) {
1283
1283
  case 0:
1284
- return G = p.data === void 0, L = f.value, L ? (oe = i.cache.get(L), se = oe && oe.data, p.isValidating = !0, se && (p.data = se.data, p.error = se.error), ge = S || a, !ge || !i.isDocumentVisible() && !G || (T == null ? void 0 : T.forceRevalidate) !== void 0 && !(T != null && T.forceRevalidate) ? (p.isValidating = !1, [
1284
+ return G = p.data === void 0, L = f.value, L ? (se = i.cache.get(L), oe = se && se.data, p.isValidating = !0, oe && (p.data = oe.data, p.error = oe.error), ge = S || a, !ge || !i.isDocumentVisible() && !G || (T == null ? void 0 : T.forceRevalidate) !== void 0 && !(T != null && T.forceRevalidate) ? (p.isValidating = !1, [
1285
1285
  2
1286
1286
  /*return*/
1287
- ]) : oe && (je = !!(Date.now() - oe.createdAt >= i.dedupingInterval || T != null && T.forceRevalidate), !je) ? (p.isValidating = !1, [
1287
+ ]) : se && (je = !!(Date.now() - se.createdAt >= i.dedupingInterval || T != null && T.forceRevalidate), !je) ? (p.isValidating = !1, [
1288
1288
  2
1289
1289
  /*return*/
1290
1290
  ]) : (he = function() {
@@ -1293,7 +1293,7 @@ function li() {
1293
1293
  return ee(this, function(le) {
1294
1294
  switch (le.label) {
1295
1295
  case 0:
1296
- return W = _e.get(L), W ? [3, 2] : (Ge = Array.isArray(L) ? L : [L], Ce = ge.apply(void 0, oi([], ai(Ge), !1)), _e.set(L, Ce, i.dedupingInterval), [4, pt(L, Ce, i.cache, l)]);
1296
+ return W = _e.get(L), W ? [3, 2] : (Ge = Array.isArray(L) ? L : [L], Ce = ge.apply(void 0, si([], ai(Ge), !1)), _e.set(L, Ce, i.dedupingInterval), [4, pt(L, Ce, i.cache, l)]);
1297
1297
  case 1:
1298
1298
  return le.sent(), [3, 4];
1299
1299
  case 2:
@@ -1301,19 +1301,19 @@ function li() {
1301
1301
  case 3:
1302
1302
  le.sent(), le.label = 4;
1303
1303
  case 4:
1304
- return p.isValidating = !1, _e.delete(L), p.error !== void 0 && (We = !s && i.shouldRetryOnError && (T ? T.shouldRetryOnError : !0), We && ui(y, T ? T.errorRetryCount : 1, i)), [
1304
+ return p.isValidating = !1, _e.delete(L), p.error !== void 0 && (We = !o && i.shouldRetryOnError && (T ? T.shouldRetryOnError : !0), We && ui(y, T ? T.errorRetryCount : 1, i)), [
1305
1305
  2
1306
1306
  /*return*/
1307
1307
  ];
1308
1308
  }
1309
1309
  });
1310
1310
  });
1311
- }, se && i.revalidateDebounce ? (setTimeout(function() {
1311
+ }, oe && i.revalidateDebounce ? (setTimeout(function() {
1312
1312
  return X(Be, void 0, void 0, function() {
1313
1313
  return ee(this, function(W) {
1314
1314
  switch (W.label) {
1315
1315
  case 0:
1316
- return s ? [3, 2] : [4, he()];
1316
+ return o ? [3, 2] : [4, he()];
1317
1317
  case 1:
1318
1318
  W.sent(), W.label = 2;
1319
1319
  case 2:
@@ -1359,7 +1359,7 @@ function li() {
1359
1359
  case 2:
1360
1360
  N && clearTimeout(N), T.label = 3;
1361
1361
  case 3:
1362
- return i.refreshInterval && !s && (N = setTimeout(S, i.refreshInterval)), [
1362
+ return i.refreshInterval && !o && (N = setTimeout(S, i.refreshInterval)), [
1363
1363
  2
1364
1364
  /*return*/
1365
1365
  ];
@@ -1369,7 +1369,7 @@ function li() {
1369
1369
  };
1370
1370
  i.refreshInterval && (N = setTimeout(S, i.refreshInterval)), i.revalidateOnFocus && (document.addEventListener("visibilitychange", C, !1), window.addEventListener("focus", C, !1));
1371
1371
  }), Ut(function() {
1372
- s = !0, N && clearTimeout(N), i.revalidateOnFocus && (document.removeEventListener("visibilitychange", C, !1), window.removeEventListener("focus", C, !1));
1372
+ o = !0, N && clearTimeout(N), i.revalidateOnFocus && (document.removeEventListener("visibilitychange", C, !1), window.removeEventListener("focus", C, !1));
1373
1373
  var S = ve.get(f.value);
1374
1374
  S && (S.data = S.data.filter(function(T) {
1375
1375
  return T !== p;
@@ -1377,7 +1377,7 @@ function li() {
1377
1377
  });
1378
1378
  try {
1379
1379
  Ht(f, function(S) {
1380
- Yt(f) || (f.value = S), p.key = S, p.isValidating = !!S, si(f.value, p, l), !u && !d && f.value && y(), d = !1;
1380
+ Yt(f) || (f.value = S), p.key = S, p.isValidating = !!S, oi(f.value, p, l), !u && !d && f.value && y(), d = !1;
1381
1381
  }, {
1382
1382
  immediate: !0
1383
1383
  });
@@ -1396,7 +1396,7 @@ function ci(e, t, r) {
1396
1396
  data: n,
1397
1397
  error: a,
1398
1398
  isValidating: i,
1399
- mutate: s
1399
+ mutate: o
1400
1400
  } = li(e, t, {
1401
1401
  revalidateDebounce: 500,
1402
1402
  revalidateOnFocus: !1,
@@ -1411,7 +1411,7 @@ function ci(e, t, r) {
1411
1411
  response: n,
1412
1412
  error: a,
1413
1413
  isValidating: i,
1414
- revalidate: s
1414
+ revalidate: o
1415
1415
  };
1416
1416
  }
1417
1417
  const K = {
@@ -1426,15 +1426,15 @@ const K = {
1426
1426
  additionalFilter: n,
1427
1427
  queryReady: a,
1428
1428
  timeframe: i,
1429
- hasTrendAccess: s,
1429
+ hasTrendAccess: o,
1430
1430
  refreshInterval: d,
1431
1431
  dataFetcher: c
1432
1432
  } = e;
1433
1433
  if (r && !t)
1434
1434
  throw new Error("Must provide a dimension if filtering by a value");
1435
- const o = !!(t && r), u = !!(t && !r), l = m(() => {
1435
+ const s = !!(t && r), u = !!(t && !r), l = m(() => {
1436
1436
  const N = [];
1437
- return o && N.push({
1437
+ return s && N.push({
1438
1438
  dimension: t,
1439
1439
  type: Et.IN,
1440
1440
  values: [r]
@@ -1446,14 +1446,14 @@ const K = {
1446
1446
  // Traffic and error rate cards should only try to query for the dimension if it's going to be used.
1447
1447
  // It isn't used for single entity queries.
1448
1448
  dimensions: [
1449
- ...t && !o ? [t] : [],
1449
+ ...t && !s ? [t] : [],
1450
1450
  Q.STATUS_CODE_GROUPED
1451
1451
  ],
1452
1452
  filter: l,
1453
1453
  queryReady: a,
1454
1454
  timeframe: i,
1455
1455
  // Traffic and error rate cards can't query trend if multiple entities are expected.
1456
- withTrend: s && !u,
1456
+ withTrend: o && !u,
1457
1457
  refreshInterval: d,
1458
1458
  dataFetcher: c
1459
1459
  }, p = {
@@ -1462,12 +1462,12 @@ const K = {
1462
1462
  ],
1463
1463
  // To keep single-entity queries consistent, don't bother querying the dimension for latency
1464
1464
  // in the single-entity case, even though it's possible.
1465
- ...t && !o ? { dimensions: [t] } : {},
1465
+ ...t && !s ? { dimensions: [t] } : {},
1466
1466
  filter: l,
1467
1467
  queryReady: a,
1468
1468
  timeframe: i,
1469
1469
  // Don't query latency trends in the multi-entity case: it's possible, but wasteful.
1470
- withTrend: s && !u,
1470
+ withTrend: o && !u,
1471
1471
  refreshInterval: d,
1472
1472
  dataFetcher: c
1473
1473
  }, y = K.useMetricFetcher(f), C = K.useMetricFetcher(p);
@@ -1506,7 +1506,7 @@ const K = {
1506
1506
  return n.value.key === "custom" ? t.t("trendRange.custom", { numDays: Math.ceil(n.value.timeframeLength() / (1e3 * 60 * 24)) }) : r.hasTrendAccess ? t.t(`trendRange.${n.value.key}`) : t.t(`trendRange.${(d = be.get(w.ONE_DAY)) == null ? void 0 : d.key}`);
1507
1507
  }), {
1508
1508
  trafficData: i,
1509
- latencyData: s
1509
+ latencyData: o
1510
1510
  } = fi({
1511
1511
  dimension: r.dimension,
1512
1512
  dimensionFilterValue: r.filterValue,
@@ -1520,7 +1520,7 @@ const K = {
1520
1520
  return $t(It, {
1521
1521
  data: {
1522
1522
  traffic: i,
1523
- latency: s
1523
+ latency: o
1524
1524
  },
1525
1525
  description: r.description,
1526
1526
  hasTrendAccess: r.hasTrendAccess,
@@ -1538,26 +1538,26 @@ function pi(e) {
1538
1538
  var xt = { exports: {} };
1539
1539
  (function(e) {
1540
1540
  (function() {
1541
- function t(o, u) {
1542
- if (u.separator === !1 || o < 1e3)
1543
- return o.toString();
1544
- var l = typeof u.separator == "string" ? u.separator : ",", f = [], p = Math.round(o).toString().split("");
1541
+ function t(s, u) {
1542
+ if (u.separator === !1 || s < 1e3)
1543
+ return s.toString();
1544
+ var l = typeof u.separator == "string" ? u.separator : ",", f = [], p = Math.round(s).toString().split("");
1545
1545
  return p.reverse().forEach(function(y, C) {
1546
1546
  C && C % 3 === 0 && f.push(l), f.push(y);
1547
1547
  }), f.reverse().join("");
1548
1548
  }
1549
- function r(o, u, l) {
1550
- var f = o / u, p = l.round ? "round" : "floor";
1551
- return l.decimal === !1 ? (o = Math[p](f), o.toString()) : (l.precision ? o = f : o = f < 10 ? Math[p](f * 10) / 10 : Math[p](f), o = o.toString(), typeof l.decimal == "string" && (o = o.replace(".", l.decimal)), o);
1549
+ function r(s, u, l) {
1550
+ var f = s / u, p = l.round ? "round" : "floor";
1551
+ return l.decimal === !1 ? (s = Math[p](f), s.toString()) : (l.precision ? s = f : s = f < 10 ? Math[p](f * 10) / 10 : Math[p](f), s = s.toString(), typeof l.decimal == "string" && (s = s.replace(".", l.decimal)), s);
1552
1552
  }
1553
- var n = 1e3, a = 1e4, i = 1e6, s = 1e9, d = 1e12;
1554
- function c(o, u) {
1553
+ var n = 1e3, a = 1e4, i = 1e6, o = 1e9, d = 1e12;
1554
+ function c(s, u) {
1555
1555
  var l;
1556
1556
  u = u || {};
1557
- var f = o < 0;
1558
- f && (o = Math.abs(o)), u.precision && (o = parseFloat(o.toPrecision(u.precision)));
1557
+ var f = s < 0;
1558
+ f && (s = Math.abs(s)), u.precision && (s = parseFloat(s.toPrecision(u.precision)));
1559
1559
  var p = u.min10k ? a : n;
1560
- return o < p || u.precision && u.precision > Math.log10(o) ? l = t(r(o, 1, u), u) : o < i ? l = r(o, n, u) + "k" : o < s ? l = r(o, i, u) + "m" : o < d ? l = t(r(o, s, u), u) + "b" : l = t(r(o, d, u), u) + "t", f && (l = "-" + l), u.capital && (l = l.toUpperCase()), u.prefix && (l = u.prefix + l), u.suffix && (l = l + u.suffix), l;
1560
+ return s < p || u.precision && u.precision > Math.log10(s) ? l = t(r(s, 1, u), u) : s < i ? l = r(s, n, u) + "k" : s < o ? l = r(s, i, u) + "m" : s < d ? l = t(r(s, o, u), u) + "b" : l = t(r(s, d, u), u) + "t", f && (l = "-" + l), u.capital && (l = l.toUpperCase()), u.prefix && (l = u.prefix + l), u.suffix && (l = l + u.suffix), l;
1561
1561
  }
1562
1562
  c.addCommas = t, e.exports = c;
1563
1563
  })();
@@ -1570,7 +1570,7 @@ const E = "24px", V = (e, t) => {
1570
1570
  for (const [n, a] of t)
1571
1571
  r[n] = a;
1572
1572
  return r;
1573
- }, gi = (e) => (F("data-v-0bbe8ddf"), e = e(), P(), e), hi = ["aria-hidden"], yi = {
1573
+ }, gi = (e) => (F("data-v-115ec679"), e = e(), P(), e), hi = ["aria-hidden"], yi = {
1574
1574
  key: 0,
1575
1575
  "data-testid": "kui-icon-svg-title"
1576
1576
  }, Ci = /* @__PURE__ */ gi(() => /* @__PURE__ */ D("path", {
@@ -1669,7 +1669,7 @@ const E = "24px", V = (e, t) => {
1669
1669
  _: 1
1670
1670
  }, 8, ["aria-hidden", "style"]));
1671
1671
  }
1672
- }), wi = /* @__PURE__ */ V(Ti, [["__scopeId", "data-v-0bbe8ddf"]]), Si = (e) => (F("data-v-7467b31c"), e = e(), P(), e), Ni = ["aria-hidden"], bi = {
1672
+ }), wi = /* @__PURE__ */ V(Ti, [["__scopeId", "data-v-115ec679"]]), Si = (e) => (F("data-v-6e3bced6"), e = e(), P(), e), Ni = ["aria-hidden"], bi = {
1673
1673
  key: 0,
1674
1674
  "data-testid": "kui-icon-svg-title"
1675
1675
  }, Ei = /* @__PURE__ */ Si(() => /* @__PURE__ */ D("path", {
@@ -1768,7 +1768,7 @@ const E = "24px", V = (e, t) => {
1768
1768
  _: 1
1769
1769
  }, 8, ["aria-hidden", "style"]));
1770
1770
  }
1771
- }), Ri = /* @__PURE__ */ V(Di, [["__scopeId", "data-v-7467b31c"]]), _i = (e) => (F("data-v-335390bf"), e = e(), P(), e), Ii = ["aria-hidden"], xi = {
1771
+ }), Ri = /* @__PURE__ */ V(Di, [["__scopeId", "data-v-6e3bced6"]]), _i = (e) => (F("data-v-1ae1a325"), e = e(), P(), e), Ii = ["aria-hidden"], xi = {
1772
1772
  key: 0,
1773
1773
  "data-testid": "kui-icon-svg-title"
1774
1774
  }, Ai = /* @__PURE__ */ _i(() => /* @__PURE__ */ D("path", {
@@ -1867,7 +1867,7 @@ const E = "24px", V = (e, t) => {
1867
1867
  _: 1
1868
1868
  }, 8, ["aria-hidden", "style"]));
1869
1869
  }
1870
- }), At = /* @__PURE__ */ V(Mi, [["__scopeId", "data-v-335390bf"]]), Li = (e) => (F("data-v-47aab2c7"), e = e(), P(), e), ki = ["aria-hidden"], Oi = {
1870
+ }), At = /* @__PURE__ */ V(Mi, [["__scopeId", "data-v-1ae1a325"]]), Li = (e) => (F("data-v-60c6b8be"), e = e(), P(), e), ki = ["aria-hidden"], Oi = {
1871
1871
  key: 0,
1872
1872
  "data-testid": "kui-icon-svg-title"
1873
1873
  }, zi = /* @__PURE__ */ Li(() => /* @__PURE__ */ D("path", {
@@ -1966,7 +1966,7 @@ const E = "24px", V = (e, t) => {
1966
1966
  _: 1
1967
1967
  }, 8, ["aria-hidden", "style"]));
1968
1968
  }
1969
- }), Yi = /* @__PURE__ */ V(Ui, [["__scopeId", "data-v-47aab2c7"]]), Hi = (e) => (F("data-v-a4faa8c2"), e = e(), P(), e), qi = ["aria-hidden"], $i = {
1969
+ }), Yi = /* @__PURE__ */ V(Ui, [["__scopeId", "data-v-60c6b8be"]]), Hi = (e) => (F("data-v-9ad4bd00"), e = e(), P(), e), qi = ["aria-hidden"], $i = {
1970
1970
  key: 0,
1971
1971
  "data-testid": "kui-icon-svg-title"
1972
1972
  }, Fi = /* @__PURE__ */ Hi(() => /* @__PURE__ */ D("path", {
@@ -2065,7 +2065,7 @@ const E = "24px", V = (e, t) => {
2065
2065
  _: 1
2066
2066
  }, 8, ["aria-hidden", "style"]));
2067
2067
  }
2068
- }), Vi = /* @__PURE__ */ V(Pi, [["__scopeId", "data-v-a4faa8c2"]]), Zi = (e) => (F("data-v-4bb36c1a"), e = e(), P(), e), ji = ["aria-hidden"], Bi = {
2068
+ }), Vi = /* @__PURE__ */ V(Pi, [["__scopeId", "data-v-9ad4bd00"]]), Zi = (e) => (F("data-v-aa775b0e"), e = e(), P(), e), ji = ["aria-hidden"], Bi = {
2069
2069
  key: 0,
2070
2070
  "data-testid": "kui-icon-svg-title"
2071
2071
  }, Gi = /* @__PURE__ */ Zi(() => /* @__PURE__ */ D("path", {
@@ -2164,7 +2164,7 @@ const E = "24px", V = (e, t) => {
2164
2164
  _: 1
2165
2165
  }, 8, ["aria-hidden", "style"]));
2166
2166
  }
2167
- }), Ki = /* @__PURE__ */ V(Wi, [["__scopeId", "data-v-4bb36c1a"]]), Qi = (e) => (F("data-v-efa77d39"), e = e(), P(), e), Ji = ["aria-hidden"], Xi = {
2167
+ }), Ki = /* @__PURE__ */ V(Wi, [["__scopeId", "data-v-aa775b0e"]]), Qi = (e) => (F("data-v-cb010004"), e = e(), P(), e), Ji = ["aria-hidden"], Xi = {
2168
2168
  key: 0,
2169
2169
  "data-testid": "kui-icon-svg-title"
2170
2170
  }, en = /* @__PURE__ */ Qi(() => /* @__PURE__ */ D("path", {
@@ -2263,10 +2263,10 @@ const E = "24px", V = (e, t) => {
2263
2263
  _: 1
2264
2264
  }, 8, ["aria-hidden", "style"]));
2265
2265
  }
2266
- }), rn = /* @__PURE__ */ V(tn, [["__scopeId", "data-v-efa77d39"]]), nn = (e) => (F("data-v-0c67131d"), e = e(), P(), e), an = ["aria-hidden"], on = {
2266
+ }), rn = /* @__PURE__ */ V(tn, [["__scopeId", "data-v-cb010004"]]), nn = (e) => (F("data-v-6d3b4073"), e = e(), P(), e), an = ["aria-hidden"], sn = {
2267
2267
  key: 0,
2268
2268
  "data-testid": "kui-icon-svg-title"
2269
- }, sn = /* @__PURE__ */ nn(() => /* @__PURE__ */ D("path", {
2269
+ }, on = /* @__PURE__ */ nn(() => /* @__PURE__ */ D("path", {
2270
2270
  d: "M9 20C8.68333 20 8.4 19.9083 8.15 19.725C7.9 19.5417 7.71667 19.3083 7.6 19.025L5.3 13H1V11H6.7L9 17.1L13.6 4.975C13.7167 4.69167 13.9 4.45833 14.15 4.275C14.4 4.09167 14.6833 4 15 4C15.3167 4 15.6 4.09167 15.85 4.275C16.1 4.45833 16.2833 4.69167 16.4 4.975L18.7 11H23V13H17.3L15 6.9L10.4 19.025C10.2833 19.3083 10.1 19.5417 9.85 19.725C9.6 19.9083 9.31667 20 9 20Z",
2271
2271
  fill: "currentColor"
2272
2272
  }, null, -1)), un = /* @__PURE__ */ A({
@@ -2355,14 +2355,14 @@ const E = "24px", V = (e, t) => {
2355
2355
  width: "100%",
2356
2356
  xmlns: "http://www.w3.org/2000/svg"
2357
2357
  }, [
2358
- e.title ? (v(), h("title", on, R(e.title), 1)) : _("", !0),
2359
- sn
2358
+ e.title ? (v(), h("title", sn, R(e.title), 1)) : _("", !0),
2359
+ on
2360
2360
  ], 8, an))
2361
2361
  ]),
2362
2362
  _: 1
2363
2363
  }, 8, ["aria-hidden", "style"]));
2364
2364
  }
2365
- }), ln = /* @__PURE__ */ V(un, [["__scopeId", "data-v-0c67131d"]]), dn = (e) => (F("data-v-3c032f04"), e = e(), P(), e), cn = ["aria-hidden"], fn = {
2365
+ }), ln = /* @__PURE__ */ V(un, [["__scopeId", "data-v-6d3b4073"]]), dn = (e) => (F("data-v-0e9cc640"), e = e(), P(), e), cn = ["aria-hidden"], fn = {
2366
2366
  key: 0,
2367
2367
  "data-testid": "kui-icon-svg-title"
2368
2368
  }, pn = /* @__PURE__ */ dn(() => /* @__PURE__ */ D("path", {
@@ -2461,7 +2461,7 @@ const E = "24px", V = (e, t) => {
2461
2461
  _: 1
2462
2462
  }, 8, ["aria-hidden", "style"]));
2463
2463
  }
2464
- }), mn = /* @__PURE__ */ V(vn, [["__scopeId", "data-v-3c032f04"]]), gn = (e) => (F("data-v-fb1f3252"), e = e(), P(), e), hn = ["aria-hidden"], yn = {
2464
+ }), mn = /* @__PURE__ */ V(vn, [["__scopeId", "data-v-0e9cc640"]]), gn = (e) => (F("data-v-d7b122fd"), e = e(), P(), e), hn = ["aria-hidden"], yn = {
2465
2465
  key: 0,
2466
2466
  "data-testid": "kui-icon-svg-title"
2467
2467
  }, Cn = /* @__PURE__ */ gn(() => /* @__PURE__ */ D("path", {
@@ -2560,7 +2560,7 @@ const E = "24px", V = (e, t) => {
2560
2560
  _: 1
2561
2561
  }, 8, ["aria-hidden", "style"]));
2562
2562
  }
2563
- }), Mt = /* @__PURE__ */ V(Tn, [["__scopeId", "data-v-fb1f3252"]]), Ve = 2, vt = Ve + 2, wn = (e, t, r = !1) => {
2563
+ }), Mt = /* @__PURE__ */ V(Tn, [["__scopeId", "data-v-d7b122fd"]]), Ve = 2, vt = Ve + 2, wn = (e, t, r = !1) => {
2564
2564
  let n = !t || Number(e.toFixed(vt)) === 0 ? 0 : Number(e.toFixed(vt)) > 0 ? 1 : -1;
2565
2565
  return r && (n *= -1), n;
2566
2566
  }, Sn = (e, t, r) => t ? `${Math.abs(e * 100).toFixed(Ve)}%` : r, Nn = (e, t) => t === 0 ? 0 : e / t - 1, bn = (e, t = !1) => (t && (e *= -1), e > 0 ? rn : e < 0 ? Ki : At), En = "#ad000e", Ie = "#6c7489", mt = "#52596e", Dn = "#007d60", de = "16px", Rn = "20px", _n = "14px", In = "48px";
@@ -2645,15 +2645,15 @@ const xn = { class: "metricscard" }, An = {
2645
2645
  [j.TRAFFIC, wi],
2646
2646
  [j.ERROR_RATE, mn],
2647
2647
  [j.LATENCY, Vi]
2648
- ]), r = e, n = (o) => {
2648
+ ]), r = e, n = (s) => {
2649
2649
  const u = {
2650
2650
  red: `var(--kong-ui-metric-card-trend-negative, ${En})`,
2651
2651
  green: `var(--kong-ui-metric-card-trend-positive, ${Dn})`,
2652
2652
  grey: `var(--kong-ui-metric-card-trend-neutral, ${mt})`
2653
2653
  };
2654
- return o > 0 ? u.green : o < 0 ? u.red : u.grey;
2655
- }, a = (o) => o > 0 ? "positive" : o < 0 ? "negative" : "neutral", i = [O.Medium, O.Large, O.LargeCompact].includes(r.cardSize), s = r.cardSize === O.ExtraLarge ? In : i ? "22px" : _n, d = m(() => r.cardSize === O.LargeCompact), c = [O.Small, O.LargeCompact].includes(r.cardSize);
2656
- return (o, u) => {
2654
+ return s > 0 ? u.green : s < 0 ? u.red : u.grey;
2655
+ }, a = (s) => s > 0 ? "positive" : s < 0 ? "negative" : "neutral", i = [O.Medium, O.Large, O.LargeCompact].includes(r.cardSize), o = r.cardSize === O.ExtraLarge ? In : i ? "22px" : _n, d = m(() => r.cardSize === O.LargeCompact), c = [O.Small, O.LargeCompact].includes(r.cardSize);
2656
+ return (s, u) => {
2657
2657
  const l = ht("KTooltip");
2658
2658
  return v(), h("div", xn, [
2659
2659
  D("div", {
@@ -2697,7 +2697,7 @@ const xn = { class: "metricscard" }, An = {
2697
2697
  key: 1,
2698
2698
  class: te(["metricscard-value", e.cardSize]),
2699
2699
  "data-testid": "metric-value",
2700
- style: q(`font-size:${b(s)}`)
2700
+ style: q(`font-size:${b(o)}`)
2701
2701
  }, R(e.metricValue), 7)),
2702
2702
  b(i) ? (v(), h("div", Ln, [
2703
2703
  D("div", {
@@ -2774,12 +2774,12 @@ const $n = /* @__PURE__ */ Ze(Yn, [["render", qn], ["__scopeId", "data-v-f7eb9c4
2774
2774
  },
2775
2775
  setup(e) {
2776
2776
  const t = e, r = m(() => t.cards.every((a) => (a == null ? void 0 : a.hasError) === !0)), n = (a) => {
2777
- const i = Nn(a.currentValue, a.previousValue) || 0, s = wn(i, t.hasTrendAccess, a.increaseIsBad);
2777
+ const i = Nn(a.currentValue, a.previousValue) || 0, o = wn(i, t.hasTrendAccess, a.increaseIsBad);
2778
2778
  return {
2779
2779
  metricValue: a.formatValueFn ? a.formatValueFn(a.currentValue) : mi(a.currentValue, { capital: !0, round: !0 }) || "0",
2780
2780
  metricChange: a.formatChangeFn ? a.formatChangeFn(i) : Sn(i, t.hasTrendAccess, t.fallbackDisplayText),
2781
- changePolarity: s,
2782
- trendIcon: bn(s, a.increaseIsBad),
2781
+ changePolarity: o,
2782
+ trendIcon: bn(o, a.increaseIsBad),
2783
2783
  cardSize: t.cardSize
2784
2784
  };
2785
2785
  };
@@ -2789,19 +2789,19 @@ const $n = /* @__PURE__ */ Ze(Yn, [["render", qn], ["__scopeId", "data-v-f7eb9c4
2789
2789
  r.value ? (v(), h("div", Fn, [
2790
2790
  ne(b(Mt), { class: "error-display-icon" }),
2791
2791
  e.errorMessage ? (v(), h("div", Pn, R(e.errorMessage), 1)) : _("", !0)
2792
- ])) : (v(!0), h(Qe, { key: 1 }, Ft(e.cards, (s, d) => (v(), h(Qe, null, [
2792
+ ])) : (v(!0), h(Qe, { key: 1 }, Ft(e.cards, (o, d) => (v(), h(Qe, null, [
2793
2793
  e.loading ? (v(), I($n, {
2794
2794
  key: `skeleton-${d}`,
2795
2795
  class: te(e.cardSize === b(O).Small ? "loading-tabs-small" : "loading-tabs-large")
2796
- }, null, 8, ["class"])) : (v(), I(Un, Pt({ key: d }, n(s), {
2796
+ }, null, 8, ["class"])) : (v(), I(Un, Pt({ key: d }, n(o), {
2797
2797
  "card-size": e.cardSize,
2798
- "card-type": s.cardType,
2799
- description: s.description,
2798
+ "card-type": o.cardType,
2799
+ description: o.description,
2800
2800
  "error-message": e.errorMessage,
2801
- "has-error": s.hasError,
2802
- title: s.title,
2803
- tooltip: s.tooltip,
2804
- "trend-range": s.trendRange
2801
+ "has-error": o.hasError,
2802
+ title: o.title,
2803
+ tooltip: o.tooltip,
2804
+ "trend-range": o.trendRange
2805
2805
  }), null, 16, ["card-size", "card-type", "description", "error-message", "has-error", "title", "tooltip", "trend-range"]))
2806
2806
  ], 64))), 256))
2807
2807
  ], 2));
@@ -2817,7 +2817,7 @@ const $n = /* @__PURE__ */ Ze(Yn, [["render", qn], ["__scopeId", "data-v-f7eb9c4
2817
2817
  const t = e, r = Vt(It);
2818
2818
  if (!r)
2819
2819
  throw new Error("MetricsConsumer must be nested inside a MetricsProvider instance.");
2820
- const { traffic: n, latency: a } = r.data, { i18n: i } = K.useI18n(), s = K.useMetricCardBuilder({
2820
+ const { traffic: n, latency: a } = r.data, { i18n: i } = K.useI18n(), o = K.useMetricCardBuilder({
2821
2821
  cardType: j.TRAFFIC,
2822
2822
  title: m(() => r.longCardTitles ? i.t("metricCard.long.traffic") : i.t("metricCard.short.traffic")),
2823
2823
  description: r.description,
@@ -2839,7 +2839,7 @@ const $n = /* @__PURE__ */ Ze(Yn, [["render", qn], ["__scopeId", "data-v-f7eb9c4
2839
2839
  increaseIsBad: !0,
2840
2840
  trendRange: r.trendRange.value
2841
2841
  };
2842
- }), o = (C) => `${C}ms`, u = K.useMetricCardBuilder({
2842
+ }), s = (C) => `${C}ms`, u = K.useMetricCardBuilder({
2843
2843
  cardType: j.LATENCY,
2844
2844
  title: m(() => r.longCardTitles ? i.t("metricCard.long.latency") : i.t("metricCard.short.latency")),
2845
2845
  description: r.description,
@@ -2847,9 +2847,9 @@ const $n = /* @__PURE__ */ Ze(Yn, [["render", qn], ["__scopeId", "data-v-f7eb9c4
2847
2847
  record: a.mapped,
2848
2848
  lookupKey: t.lookupKey,
2849
2849
  increaseIsBad: !0,
2850
- formatValueFn: o,
2850
+ formatValueFn: s,
2851
2851
  trendRange: r.trendRange
2852
- }), l = m(() => t.cardToDisplay === "TRAFFIC" ? [s.value] : t.cardToDisplay === "ERROR_RATE" ? [c.value] : t.cardToDisplay === "LATENCY" ? [u.value] : [s.value, c.value, u.value]), f = m(() => t.cardToDisplay === "TRAFFIC" || t.cardToDisplay === "ERROR_RATE" ? n.isLoading.value : t.cardToDisplay === "LATENCY" ? a.isLoading.value : n.isLoading.value || a.isLoading.value), p = m(() => ({
2852
+ }), l = m(() => t.cardToDisplay === "TRAFFIC" ? [o.value] : t.cardToDisplay === "ERROR_RATE" ? [c.value] : t.cardToDisplay === "LATENCY" ? [u.value] : [o.value, c.value, u.value]), f = m(() => t.cardToDisplay === "TRAFFIC" || t.cardToDisplay === "ERROR_RATE" ? n.isLoading.value : t.cardToDisplay === "LATENCY" ? a.isLoading.value : n.isLoading.value || a.isLoading.value), p = m(() => ({
2853
2853
  cards: l.value,
2854
2854
  loading: f.value,
2855
2855
  hasTrendAccess: r.hasTrendAccess,
@@ -2859,21 +2859,21 @@ const $n = /* @__PURE__ */ Ze(Yn, [["render", qn], ["__scopeId", "data-v-f7eb9c4
2859
2859
  trendRange: r.trendRange.value
2860
2860
  })), y = m(() => ({
2861
2861
  loading: p.value.loading,
2862
- trafficCard: s.value,
2862
+ trafficCard: o.value,
2863
2863
  errorRateCard: c.value,
2864
2864
  latencyCard: u.value,
2865
2865
  errorRateFormatted: d(c.value.currentValue),
2866
- latencyFormatted: o(u.value.currentValue)
2866
+ latencyFormatted: s(u.value.currentValue)
2867
2867
  }));
2868
2868
  return (C, N) => gt(C.$slots, "default", { cardValues: y.value }, () => [
2869
2869
  ne(b(Zn), Zt(jt(p.value)), null, 16)
2870
2870
  ]);
2871
2871
  }
2872
2872
  }), ce = (e) => new Date(e), Qn = (e, t) => {
2873
- const r = e.body, { startMs: n, endMs: a } = e.query, i = typeof n != "number" ? parseInt(n, 10) : n, s = typeof a != "number" ? parseInt(a, 10) : a;
2873
+ const r = e.body, { startMs: n, endMs: a } = e.query, i = typeof n != "number" ? parseInt(n, 10) : n, o = typeof a != "number" ? parseInt(a, 10) : a;
2874
2874
  e.reply({
2875
2875
  statusCode: 200,
2876
- body: jn(r, i, s, t)
2876
+ body: jn(r, i, o, t)
2877
2877
  });
2878
2878
  }, jn = (e, t, r, n) => {
2879
2879
  var l, f;
@@ -2884,18 +2884,18 @@ const $n = /* @__PURE__ */ Ze(Yn, [["render", qn], ["__scopeId", "data-v-f7eb9c4
2884
2884
  );
2885
2885
  if ((e.dimensions ?? []).length > 2)
2886
2886
  throw new Error(`Explore only supports 0-2 dimensions; got: ${JSON.stringify(e.dimensions)}`);
2887
- const s = (e.dimensions ?? []).find((p) => p !== "TIME"), d = (n == null ? void 0 : n.dimensionNames) ?? [], c = Math.max(d.length, 1), o = [];
2887
+ const o = (e.dimensions ?? []).find((p) => p !== "TIME"), d = (n == null ? void 0 : n.dimensionNames) ?? [], c = Math.max(d.length, 1), s = [];
2888
2888
  for (let p = 0; p < i; p++)
2889
2889
  for (let y = 0; y < c; y++) {
2890
- const C = s ? { [s]: d[y] } : {};
2890
+ const C = o ? { [o]: d[y] } : {};
2891
2891
  (l = e.dimensions) != null && l.includes(Q.STATUS_CODE_GROUPED) ? ue.forEach((N) => {
2892
2892
  const $ = e.metrics.reduce((S, T) => (S[T] = (i - p) * 1e3 + 100 * y + 1, S), { ...C, STATUS_CODE_GROUPED: N });
2893
- o.push({
2893
+ s.push({
2894
2894
  version: "v1",
2895
2895
  timestamp: p === 0 ? ce(t).toISOString() : ce(t + a).toISOString(),
2896
2896
  event: $
2897
2897
  });
2898
- }) : o.push({
2898
+ }) : s.push({
2899
2899
  version: "v1",
2900
2900
  timestamp: p === 0 ? ce(t).toISOString() : ce(t + a).toISOString(),
2901
2901
  event: e.metrics.reduce((N, $) => (N[$] = (i - p) * 1e3 + 100 * y + 1, N), { ...C })
@@ -2905,14 +2905,14 @@ const $n = /* @__PURE__ */ Ze(Yn, [["render", qn], ["__scopeId", "data-v-f7eb9c4
2905
2905
  start: t,
2906
2906
  end: r,
2907
2907
  granularity: a,
2908
- dimensions: s ? {
2909
- [s]: d,
2908
+ dimensions: o ? {
2909
+ [o]: d,
2910
2910
  ...(f = e.dimensions) != null && f.includes(Q.STATUS_CODE_GROUPED) ? { STATUS_CODE_GROUPED: ue } : {}
2911
2911
  } : {},
2912
2912
  metricNames: e.metrics
2913
2913
  };
2914
2914
  return {
2915
- records: o,
2915
+ records: s,
2916
2916
  meta: u
2917
2917
  };
2918
2918
  };