@kong-ui-public/analytics-metric-provider 4.0.7 → 4.0.8

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,5 +1,5 @@
1
- import { ref as pe, watchEffect as He, computed as g, getCurrentInstance as Be, reactive as $e, onMounted as Pe, onUnmounted as Ke, isReadonly as Ze, watch as Ue, toRefs as Ge, defineComponent as x, inject as ke, toRef as Se, provide as je, renderSlot as ze, resolveComponent as qe, openBlock as f, createElementBlock as y, createElementVNode as R, normalizeClass as G, unref as S, createCommentVNode as E, createBlock as T, resolveDynamicComponent as z, toDisplayString as N, withCtx as A, createVNode as X, normalizeStyle as V, Fragment as we, renderList as Xe, mergeProps as Ye, pushScopeId as L, popScopeId as D, normalizeProps as Qe, guardReactiveProps as We } from "vue";
2
- import { TimeframeKeys as re, queryableExploreDimensions as Je, TimePeriods as te, DeltaQueryTime as er, UnaryQueryTime as rr } from "@kong-ui-public/analytics-utilities";
1
+ import { ref as pe, watchEffect as He, computed as g, getCurrentInstance as Be, reactive as $e, onMounted as Pe, onUnmounted as Ke, isReadonly as Ze, watch as Ue, toRefs as Ge, defineComponent as k, inject as ke, toRef as Se, provide as je, renderSlot as ze, resolveComponent as qe, openBlock as p, createElementBlock as m, createElementVNode as R, normalizeClass as G, unref as w, createCommentVNode as E, createBlock as T, resolveDynamicComponent as q, toDisplayString as N, withCtx as A, createVNode as X, normalizeStyle as V, Fragment as we, renderList as Xe, mergeProps as Ye, pushScopeId as L, popScopeId as D, normalizeProps as Qe, guardReactiveProps as We } from "vue";
2
+ import { TimePeriods as re, TimeframeKeys as te, queryableExploreDimensions as Je, DeltaQueryTime as er, UnaryQueryTime as rr } from "@kong-ui-public/analytics-utilities";
3
3
  import { createI18n as tr, i18nTComponent as ir } from "@kong-ui-public/i18n";
4
4
  const nr = {
5
5
  notAvailable: "N/A"
@@ -15,7 +15,7 @@ const nr = {
15
15
  latency: "P99 Latency"
16
16
  }
17
17
  }, or = {
18
- custom: "vs previous {numDays} days",
18
+ custom: "vs previous {numDays, plural, =1 {day} other {# days}}",
19
19
  "15m": "vs previous 15 minutes",
20
20
  "1h": "vs previous hour",
21
21
  "6h": "vs previous 6 hours",
@@ -45,59 +45,59 @@ function ur() {
45
45
  const lr = 2, Q = ["1XX", "2XX", "3XX", "4XX", "5XX"], _e = ["4XX", "5XX"], dr = "analytics-query-provider";
46
46
  var Ae = /* @__PURE__ */ ((e) => (e.VALIDATING = "VALIDATING", e.VALIDATING_HAS_DATA = "VALIDATING_HAS_DATA", e.PENDING = "PENDING", e.SUCCESS = "SUCCESS", e.SUCCESS_HAS_DATA = "SUCCESS_HAS_DATA", e.ERROR = "ERROR", e.STALE_IF_ERROR = "STALE_IF_ERROR", e))(Ae || {});
47
47
  const cr = (e) => {
48
- var t, r, a, n, i;
48
+ var r, t, a, n, i;
49
49
  return e ? !!// TODO: revisit: currently only the first check ever matters?
50
- ((t = Object.keys(e)) != null && t.length || (r = e.data) != null && r.length || (n = (a = e.data) == null ? void 0 : a.data) != null && n.length || !((i = e.data) != null && i.data) && typeof e.data == "object" && Object.keys(e == null ? void 0 : e.data).length) : !1;
50
+ ((r = Object.keys(e)) != null && r.length || (t = e.data) != null && t.length || (n = (a = e.data) == null ? void 0 : a.data) != null && n.length || !((i = e.data) != null && i.data) && typeof e.data == "object" && Object.keys(e == null ? void 0 : e.data).length) : !1;
51
51
  };
52
- function fr(e = pe({}), t, r, a = cr) {
52
+ function fr(e = pe({}), r, t, a = cr) {
53
53
  const n = pe(
54
54
  "PENDING"
55
55
  /* PENDING */
56
56
  );
57
57
  return He(() => {
58
58
  const i = a(e.value);
59
- if (e.value && i && r.value) {
59
+ if (e.value && i && t.value) {
60
60
  n.value = "VALIDATING_HAS_DATA";
61
61
  return;
62
62
  }
63
- if (e.value && r.value) {
63
+ if (e.value && t.value) {
64
64
  n.value = "VALIDATING";
65
65
  return;
66
66
  }
67
- if (e.value && t.value) {
67
+ if (e.value && r.value) {
68
68
  n.value = "STALE_IF_ERROR";
69
69
  return;
70
70
  }
71
- if (e.value === void 0 && !t.value) {
71
+ if (e.value === void 0 && !r.value) {
72
72
  n.value = "PENDING";
73
73
  return;
74
74
  }
75
- if (e.value && !t.value && i) {
75
+ if (e.value && !r.value && i) {
76
76
  n.value = "SUCCESS_HAS_DATA";
77
77
  return;
78
78
  }
79
- if (e.value && !t.value) {
79
+ if (e.value && !r.value) {
80
80
  n.value = "SUCCESS";
81
81
  return;
82
82
  }
83
- e.value === void 0 && t && (n.value = "ERROR");
83
+ e.value === void 0 && r && (n.value = "ERROR");
84
84
  }), {
85
85
  state: n,
86
86
  swrvState: Ae
87
87
  };
88
88
  }
89
- const B = Symbol("default"), ue = "status_code_grouped", Re = (e, t, r, a, n) => {
90
- e[t][r] || (e[t][r] = {}), e[t][r][a] = n;
89
+ const B = Symbol("default"), ue = "status_code_grouped", Re = (e, r, t, a, n) => {
90
+ e[r][t] || (e[r][t] = {}), e[r][t][a] = n;
91
91
  };
92
- function pr(e, t) {
93
- var c;
94
- const r = ((c = e.meta.metric_names) == null ? void 0 : c[0]) || "", a = e.meta.start_ms, n = Object.keys(e.meta.display || {}), i = !!n.find((d) => d === ue), u = n.find((d) => d !== ue);
92
+ function pr(e, r) {
93
+ var f;
94
+ const t = ((f = e.meta.metric_names) == null ? void 0 : f[0]) || "", a = e.meta.start_ms, n = Object.keys(e.meta.display || {}), i = !!n.find((d) => d === ue), u = n.find((d) => d !== ue);
95
95
  return n.length > 2 || n.length > 1 && !i ? (console.error("Don't know how to work with provided dimensions:", n), {
96
96
  previous: { [B]: { [B]: 0 } },
97
97
  current: { [B]: { [B]: 0 } }
98
98
  }) : e.data.reduce((d, o) => {
99
- const s = o.event[r], l = u ? o.event[u] : B, p = i ? o.event[ue] : B;
100
- return new Date(o.timestamp).getTime() === a && t ? Re(d, "previous", l, p, s) : Re(d, "current", l, p, s), d;
99
+ const s = o.event[t], l = u ? o.event[u] : B, c = i ? o.event[ue] : B;
100
+ return new Date(o.timestamp).getTime() === a && r ? Re(d, "previous", l, c, s) : Re(d, "current", l, c, s), d;
101
101
  }, {
102
102
  previous: {},
103
103
  current: {}
@@ -105,56 +105,67 @@ function pr(e, t) {
105
105
  }
106
106
  function vr(e) {
107
107
  e.queryReady === void 0 && (e.queryReady = g(() => !0));
108
- const t = g(() => {
109
- var o, s;
108
+ const { i18n: r } = K.useI18n(), t = g(() => {
109
+ var l, c;
110
110
  return {
111
111
  metrics: e.metrics,
112
112
  dimensions: [
113
- ...(o = e.dimensions) != null && o.length ? [...e.dimensions] : [],
113
+ ...(l = e.dimensions) != null && l.length ? [...e.dimensions] : [],
114
114
  ...e.withTrend ? ["time"] : []
115
115
  ],
116
116
  granularity: e.withTrend ? "trend" : void 0,
117
- ...(s = e.filter.value) != null && s.length ? { filters: e.filter.value } : {},
117
+ ...(c = e.filter.value) != null && c.length ? { filters: e.filter.value } : {},
118
118
  time_range: e.timeframe.value.v4Query(e.tz.value)
119
119
  };
120
- }), r = g(() => {
121
- var s, l, p, v;
122
- if (!((s = e.queryReady) != null && s.value) || e.featureFlags && !e.featureFlags.every((b) => b))
120
+ }), a = g(() => {
121
+ var c, v, S, y;
122
+ if (!((c = e.queryReady) != null && c.value) || e.featureFlags && !e.featureFlags.every((h) => h))
123
123
  return null;
124
- const o = (l = e.filter) != null && l.value ? JSON.stringify(e.filter.value) : "";
125
- return `metric-fetcher-${e.timeframe.value.cacheKey()}-${(p = e.dimensions) == null ? void 0 : p.join("-")}-${(v = e.metrics) == null ? void 0 : v.join("-")}-${o}`;
126
- }), { response: a, error: n, isValidating: i } = K.useRequest(
127
- () => r.value,
124
+ const l = (v = e.filter) != null && v.value ? JSON.stringify(e.filter.value) : "";
125
+ return `metric-fetcher-${e.timeframe.value.cacheKey()}-${(S = e.dimensions) == null ? void 0 : S.join("-")}-${(y = e.metrics) == null ? void 0 : y.join("-")}-${l}`;
126
+ }), { response: n, error: i, isValidating: u } = K.useRequest(
127
+ () => a.value,
128
128
  () => e.queryFn(t.value, e.abortController ?? new AbortController()),
129
129
  {
130
130
  refreshInterval: e.refreshInterval,
131
131
  revalidateOnFocus: !1,
132
132
  errorRetryCount: lr
133
133
  }
134
- ), { state: u, swrvState: c } = fr(a, n, i), d = g(() => {
135
- var o, s, l, p, v, b, h;
136
- return !((s = (o = a.value) == null ? void 0 : o.data) != null && s.length) || !((p = (l = a.value) == null ? void 0 : l.meta) != null && p.display) || !((h = (b = (v = a.value) == null ? void 0 : v.meta) == null ? void 0 : b.metric_names) != null && h.length) ? { current: {}, previous: {} } : pr(a.value, !!e.withTrend);
134
+ ), { state: f, swrvState: d } = fr(n, i, u), o = g(() => {
135
+ var l, c, v, S, y, h, x;
136
+ return !((c = (l = n.value) == null ? void 0 : l.data) != null && c.length) || !((S = (v = n.value) == null ? void 0 : v.meta) != null && S.display) || !((x = (h = (y = n.value) == null ? void 0 : y.meta) == null ? void 0 : h.metric_names) != null && x.length) ? { current: {}, previous: {} } : pr(n.value, !!e.withTrend);
137
+ }), s = g(() => {
138
+ var l, c, v;
139
+ if (e.timeframe.value.key === "custom") {
140
+ if (!((c = (l = n.value) == null ? void 0 : l.meta) != null && c.start_ms))
141
+ return "";
142
+ const { start_ms: S, end_ms: y } = n.value.meta;
143
+ let h = (y - S) / (1e3 * 60 * 60 * 24);
144
+ return e.withTrend && (h /= 2), r.t("trendRange.custom", { numDays: Math.round(h) });
145
+ } else
146
+ return e.withTrend ? r.t(`trendRange.${e.timeframe.value.key}`) : r.t(`trendRange.${(v = re.get(te.ONE_DAY)) == null ? void 0 : v.key}`);
137
147
  });
138
148
  return {
139
- isLoading: g(() => c.PENDING === u.value),
140
- hasError: g(() => c.ERROR === u.value),
141
- raw: a,
142
- mapped: d
149
+ isLoading: g(() => d.PENDING === f.value),
150
+ hasError: g(() => d.ERROR === f.value),
151
+ raw: n,
152
+ mapped: o,
153
+ trendRange: s
143
154
  };
144
155
  }
145
- const j = (e, t, r = B, a) => (a ?? [B]).reduce((i, u) => {
146
- const c = e[t][r];
147
- return c ? i + (c[u] || 0) : i;
156
+ const j = (e, r, t = B, a) => (a ?? [B]).reduce((i, u) => {
157
+ const f = e[r][t];
158
+ return f ? i + (f[u] || 0) : i;
148
159
  }, 0);
149
160
  function gr(e) {
150
161
  const {
151
- cardType: t,
152
- title: r,
162
+ cardType: r,
163
+ title: t,
153
164
  description: a,
154
165
  record: n,
155
166
  hasError: i,
156
167
  increaseIsBad: u,
157
- formatValueFn: c,
168
+ formatValueFn: f,
158
169
  trendRange: d
159
170
  } = e;
160
171
  return g(() => {
@@ -169,64 +180,64 @@ function gr(e) {
169
180
  );
170
181
  }
171
182
  return {
172
- cardType: t,
183
+ cardType: r,
173
184
  hasError: i.value,
174
185
  currentValue: o,
175
186
  previousValue: s,
176
- title: r.value,
187
+ title: t.value,
177
188
  description: a,
178
189
  increaseIsBad: !!u,
179
190
  // Coerce undefined to false
180
- formatValueFn: c,
191
+ formatValueFn: f,
181
192
  trendRange: d == null ? void 0 : d.value
182
193
  };
183
194
  });
184
195
  }
185
196
  var le = /* @__PURE__ */ new WeakMap(), Ne = 0;
186
- function yr(e) {
197
+ function mr(e) {
187
198
  if (!e.length)
188
199
  return "";
189
- for (var t = "arg", r = 0; r < e.length; ++r) {
200
+ for (var r = "arg", t = 0; t < e.length; ++t) {
190
201
  var a = void 0;
191
- e[r] === null || typeof e[r] != "object" && typeof e[r] != "function" ? typeof e[r] == "string" ? a = '"' + e[r] + '"' : a = String(e[r]) : le.has(e[r]) ? a = le.get(e[r]) : (a = Ne, le.set(e[r], Ne++)), t += "@" + a;
202
+ e[t] === null || typeof e[t] != "object" && typeof e[t] != "function" ? typeof e[t] == "string" ? a = '"' + e[t] + '"' : a = String(e[t]) : le.has(e[t]) ? a = le.get(e[t]) : (a = Ne, le.set(e[t], Ne++)), r += "@" + a;
192
203
  }
193
- return t;
204
+ return r;
194
205
  }
195
- function mr(e) {
206
+ function yr(e) {
196
207
  if (typeof e == "function")
197
208
  try {
198
209
  e = e();
199
210
  } catch {
200
211
  e = "";
201
212
  }
202
- return Array.isArray(e) ? e = yr(e) : e = String(e || ""), e;
213
+ return Array.isArray(e) ? e = mr(e) : e = String(e || ""), e;
203
214
  }
204
215
  var ve = (
205
216
  /** @class */
206
217
  function() {
207
- function e(t) {
208
- t === void 0 && (t = 0), this.items = /* @__PURE__ */ new Map(), this.ttl = t;
218
+ function e(r) {
219
+ r === void 0 && (r = 0), this.items = /* @__PURE__ */ new Map(), this.ttl = r;
209
220
  }
210
- return e.prototype.serializeKey = function(t) {
211
- return mr(t);
212
- }, e.prototype.get = function(t) {
213
- var r = this.serializeKey(t);
214
- return this.items.get(r);
215
- }, e.prototype.set = function(t, r, a) {
216
- var n = this.serializeKey(t), i = a || this.ttl, u = Date.now(), c = {
217
- data: r,
221
+ return e.prototype.serializeKey = function(r) {
222
+ return yr(r);
223
+ }, e.prototype.get = function(r) {
224
+ var t = this.serializeKey(r);
225
+ return this.items.get(t);
226
+ }, e.prototype.set = function(r, t, a) {
227
+ var n = this.serializeKey(r), i = a || this.ttl, u = Date.now(), f = {
228
+ data: t,
218
229
  createdAt: u,
219
230
  expiresAt: i ? u + i : 1 / 0
220
231
  };
221
- this.dispatchExpire(i, c, n), this.items.set(n, c);
222
- }, e.prototype.dispatchExpire = function(t, r, a) {
232
+ this.dispatchExpire(i, f, n), this.items.set(n, f);
233
+ }, e.prototype.dispatchExpire = function(r, t, a) {
223
234
  var n = this;
224
- t && setTimeout(function() {
225
- var i = Date.now(), u = i >= r.expiresAt;
235
+ r && setTimeout(function() {
236
+ var i = Date.now(), u = i >= t.expiresAt;
226
237
  u && n.delete(a);
227
- }, t);
228
- }, e.prototype.delete = function(t) {
229
- this.items.delete(t);
238
+ }, r);
239
+ }, e.prototype.delete = function(r) {
240
+ this.items.delete(r);
230
241
  }, e;
231
242
  }()
232
243
  );
@@ -237,8 +248,8 @@ function Cr() {
237
248
  return typeof document < "u" && typeof document.visibilityState < "u" ? document.visibilityState !== "hidden" : !0;
238
249
  }
239
250
  var br = function(e) {
240
- return fetch(e).then(function(t) {
241
- return t.json();
251
+ return fetch(e).then(function(r) {
252
+ return r.json();
242
253
  });
243
254
  };
244
255
  const de = {
@@ -248,21 +259,21 @@ const de = {
248
259
  };
249
260
  var O = function() {
250
261
  return O = Object.assign || function(e) {
251
- for (var t, r = 1, a = arguments.length; r < a; r++) {
252
- t = arguments[r];
253
- for (var n in t)
254
- Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
262
+ for (var r, t = 1, a = arguments.length; t < a; t++) {
263
+ r = arguments[t];
264
+ for (var n in r)
265
+ Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
255
266
  }
256
267
  return e;
257
268
  }, O.apply(this, arguments);
258
- }, Z = function(e, t, r, a) {
269
+ }, Z = function(e, r, t, a) {
259
270
  function n(i) {
260
- return i instanceof r ? i : new r(function(u) {
271
+ return i instanceof t ? i : new t(function(u) {
261
272
  u(i);
262
273
  });
263
274
  }
264
- return new (r || (r = Promise))(function(i, u) {
265
- function c(s) {
275
+ return new (t || (t = Promise))(function(i, u) {
276
+ function f(s) {
266
277
  try {
267
278
  o(a.next(s));
268
279
  } catch (l) {
@@ -277,20 +288,20 @@ var O = function() {
277
288
  }
278
289
  }
279
290
  function o(s) {
280
- s.done ? i(s.value) : n(s.value).then(c, d);
291
+ s.done ? i(s.value) : n(s.value).then(f, d);
281
292
  }
282
- o((a = a.apply(e, t || [])).next());
293
+ o((a = a.apply(e, r || [])).next());
283
294
  });
284
- }, U = function(e, t) {
285
- var r = { label: 0, sent: function() {
295
+ }, U = function(e, r) {
296
+ var t = { label: 0, sent: function() {
286
297
  if (i[0] & 1)
287
298
  throw i[1];
288
299
  return i[1];
289
300
  }, trys: [], ops: [] }, a, n, i, u;
290
- return u = { next: c(0), throw: c(1), return: c(2) }, typeof Symbol == "function" && (u[Symbol.iterator] = function() {
301
+ return u = { next: f(0), throw: f(1), return: f(2) }, typeof Symbol == "function" && (u[Symbol.iterator] = function() {
291
302
  return this;
292
303
  }), u;
293
- function c(o) {
304
+ function f(o) {
294
305
  return function(s) {
295
306
  return d([o, s]);
296
307
  };
@@ -298,7 +309,7 @@ var O = function() {
298
309
  function d(o) {
299
310
  if (a)
300
311
  throw new TypeError("Generator is already executing.");
301
- for (; r; )
312
+ for (; t; )
302
313
  try {
303
314
  if (a = 1, n && (i = o[0] & 2 ? n.return : o[0] ? n.throw || ((i = n.return) && i.call(n), 0) : n.next) && !(i = i.call(n, o[1])).done)
304
315
  return i;
@@ -308,34 +319,34 @@ var O = function() {
308
319
  i = o;
309
320
  break;
310
321
  case 4:
311
- return r.label++, { value: o[1], done: !1 };
322
+ return t.label++, { value: o[1], done: !1 };
312
323
  case 5:
313
- r.label++, n = o[1], o = [0];
324
+ t.label++, n = o[1], o = [0];
314
325
  continue;
315
326
  case 7:
316
- o = r.ops.pop(), r.trys.pop();
327
+ o = t.ops.pop(), t.trys.pop();
317
328
  continue;
318
329
  default:
319
- if (i = r.trys, !(i = i.length > 0 && i[i.length - 1]) && (o[0] === 6 || o[0] === 2)) {
320
- r = 0;
330
+ if (i = t.trys, !(i = i.length > 0 && i[i.length - 1]) && (o[0] === 6 || o[0] === 2)) {
331
+ t = 0;
321
332
  continue;
322
333
  }
323
334
  if (o[0] === 3 && (!i || o[1] > i[0] && o[1] < i[3])) {
324
- r.label = o[1];
335
+ t.label = o[1];
325
336
  break;
326
337
  }
327
- if (o[0] === 6 && r.label < i[1]) {
328
- r.label = i[1], i = o;
338
+ if (o[0] === 6 && t.label < i[1]) {
339
+ t.label = i[1], i = o;
329
340
  break;
330
341
  }
331
- if (i && r.label < i[2]) {
332
- r.label = i[2], r.ops.push(o);
342
+ if (i && t.label < i[2]) {
343
+ t.label = i[2], t.ops.push(o);
333
344
  break;
334
345
  }
335
- i[2] && r.ops.pop(), r.trys.pop();
346
+ i[2] && t.ops.pop(), t.trys.pop();
336
347
  continue;
337
348
  }
338
- o = t.call(e, r);
349
+ o = r.call(e, t);
339
350
  } catch (s) {
340
351
  o = [6, s], n = 0;
341
352
  } finally {
@@ -345,30 +356,30 @@ var O = function() {
345
356
  throw o[1];
346
357
  return { value: o[0] ? o[1] : void 0, done: !0 };
347
358
  }
348
- }, Sr = function(e, t) {
349
- var r = typeof Symbol == "function" && e[Symbol.iterator];
350
- if (!r)
359
+ }, Sr = function(e, r) {
360
+ var t = typeof Symbol == "function" && e[Symbol.iterator];
361
+ if (!t)
351
362
  return e;
352
- var a = r.call(e), n, i = [], u;
363
+ var a = t.call(e), n, i = [], u;
353
364
  try {
354
- for (; (t === void 0 || t-- > 0) && !(n = a.next()).done; )
365
+ for (; (r === void 0 || r-- > 0) && !(n = a.next()).done; )
355
366
  i.push(n.value);
356
- } catch (c) {
357
- u = { error: c };
367
+ } catch (f) {
368
+ u = { error: f };
358
369
  } finally {
359
370
  try {
360
- n && !n.done && (r = a.return) && r.call(a);
371
+ n && !n.done && (t = a.return) && t.call(a);
361
372
  } finally {
362
373
  if (u)
363
374
  throw u.error;
364
375
  }
365
376
  }
366
377
  return i;
367
- }, wr = function(e, t, r) {
368
- if (r || arguments.length === 2)
369
- for (var a = 0, n = t.length, i; a < n; a++)
370
- (i || !(a in t)) && (i || (i = Array.prototype.slice.call(t, 0, a)), i[a] = t[a]);
371
- return e.concat(i || Array.prototype.slice.call(t));
378
+ }, wr = function(e, r, t) {
379
+ if (t || arguments.length === 2)
380
+ for (var a = 0, n = r.length, i; a < n; a++)
381
+ (i || !(a in r)) && (i || (i = Array.prototype.slice.call(r, 0, a)), i[a] = r[a]);
382
+ return e.concat(i || Array.prototype.slice.call(r));
372
383
  }, Ve = new ve(), ie = new ve(), ce = new ve(), Le = {
373
384
  cache: Ve,
374
385
  refreshInterval: 0,
@@ -384,69 +395,69 @@ var O = function() {
384
395
  isOnline: de.isOnline,
385
396
  isDocumentVisible: de.isDocumentVisible
386
397
  };
387
- function _r(e, t, r) {
398
+ function _r(e, r, t) {
388
399
  var a = ie.get(e);
389
400
  if (a)
390
- a.data.push(t);
401
+ a.data.push(r);
391
402
  else {
392
403
  var n = 5e3;
393
- ie.set(e, [t], r > 0 ? r + n : r);
404
+ ie.set(e, [r], t > 0 ? t + n : t);
394
405
  }
395
406
  }
396
- function Rr(e, t, r) {
397
- if (r.isDocumentVisible() && !(r.errorRetryCount !== void 0 && t > r.errorRetryCount)) {
398
- var a = Math.min(t || 0, r.errorRetryCount), n = a * r.errorRetryInterval;
407
+ function Rr(e, r, t) {
408
+ if (t.isDocumentVisible() && !(t.errorRetryCount !== void 0 && r > t.errorRetryCount)) {
409
+ var a = Math.min(r || 0, t.errorRetryCount), n = a * t.errorRetryInterval;
399
410
  setTimeout(function() {
400
411
  e(null, { errorRetryCount: a + 1, shouldRetryOnError: !0 });
401
412
  }, n);
402
413
  }
403
414
  }
404
- var Ie = function(e, t, r, a) {
405
- return r === void 0 && (r = Ve), a === void 0 && (a = Le.ttl), Z(void 0, void 0, void 0, function() {
406
- var n, i, u, c, d, o, s;
415
+ var Ie = function(e, r, t, a) {
416
+ return t === void 0 && (t = Ve), a === void 0 && (a = Le.ttl), Z(void 0, void 0, void 0, function() {
417
+ var n, i, u, f, d, o, s;
407
418
  return U(this, function(l) {
408
419
  switch (l.label) {
409
420
  case 0:
410
- if (!Ir(t))
421
+ if (!Ir(r))
411
422
  return [3, 5];
412
423
  l.label = 1;
413
424
  case 1:
414
- return l.trys.push([1, 3, , 4]), [4, t];
425
+ return l.trys.push([1, 3, , 4]), [4, r];
415
426
  case 2:
416
427
  return n = l.sent(), [3, 4];
417
428
  case 3:
418
- return c = l.sent(), i = c, [3, 4];
429
+ return f = l.sent(), i = f, [3, 4];
419
430
  case 4:
420
431
  return [3, 6];
421
432
  case 5:
422
- n = t, l.label = 6;
433
+ n = r, l.label = 6;
423
434
  case 6:
424
435
  if (u = !1, d = { data: n, error: i, isValidating: u }, typeof n < "u")
425
436
  try {
426
- r.set(e, d, a);
427
- } catch (p) {
428
- console.error("swrv(mutate): failed to set cache", p);
437
+ t.set(e, d, a);
438
+ } catch (c) {
439
+ console.error("swrv(mutate): failed to set cache", c);
429
440
  }
430
- return o = ie.get(e), o && o.data.length && (s = o.data.filter(function(p) {
431
- return p.key === e;
432
- }), s.forEach(function(p, v) {
433
- typeof d.data < "u" && (p.data = d.data), p.error = d.error, p.isValidating = d.isValidating;
434
- var b = v === s.length - 1;
435
- b || delete s[v];
441
+ return o = ie.get(e), o && o.data.length && (s = o.data.filter(function(c) {
442
+ return c.key === e;
443
+ }), s.forEach(function(c, v) {
444
+ typeof d.data < "u" && (c.data = d.data), c.error = d.error, c.isValidating = d.isValidating;
445
+ var S = v === s.length - 1;
446
+ S || delete s[v];
436
447
  }), s = s.filter(Boolean)), [2, d];
437
448
  }
438
449
  });
439
450
  });
440
451
  };
441
452
  function Nr() {
442
- for (var e = this, t = [], r = 0; r < arguments.length; r++)
443
- t[r] = arguments[r];
444
- var a, n, i = O({}, Le), u = !1, c = !1, d = Be(), o = (d == null ? void 0 : d.proxy) || d;
453
+ for (var e = this, r = [], t = 0; t < arguments.length; t++)
454
+ r[t] = arguments[t];
455
+ var a, n, i = O({}, Le), u = !1, f = !1, d = Be(), o = (d == null ? void 0 : d.proxy) || d;
445
456
  if (!o)
446
457
  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;
447
458
  var s = (o == null ? void 0 : o.$isServer) || !1;
448
- t.length >= 1 && (a = t[0]), t.length >= 2 && (n = t[1]), t.length > 2 && (i = O(O({}, i), t[2]));
449
- var l = s ? i.serverTTL : i.ttl, p = typeof a == "function" ? a : pe(a);
459
+ r.length >= 1 && (a = r[0]), r.length >= 2 && (n = r[1]), r.length > 2 && (i = O(O({}, i), r[2]));
460
+ var l = s ? i.serverTTL : i.ttl, c = typeof a == "function" ? a : pe(a);
450
461
  typeof n > "u" && (n = i.fetcher);
451
462
  var v = null;
452
463
  v || (v = $e({
@@ -455,16 +466,16 @@ function Nr() {
455
466
  isValidating: !0,
456
467
  key: null
457
468
  }));
458
- var b = function(C, m) {
469
+ var S = function(b, C) {
459
470
  return Z(e, void 0, void 0, function() {
460
- var H, I, $, Y, ne, me, ae, he = this;
471
+ var H, I, $, Y, ne, ye, ae, he = this;
461
472
  return U(this, function(oe) {
462
473
  switch (oe.label) {
463
474
  case 0:
464
- return H = v.data === void 0, I = p.value, I ? ($ = i.cache.get(I), Y = $ && $.data, v.isValidating = !0, Y && (v.data = Y.data, v.error = Y.error), ne = C || n, !ne || !i.isDocumentVisible() && !H || (m == null ? void 0 : m.forceRevalidate) !== void 0 && !(m != null && m.forceRevalidate) ? (v.isValidating = !1, [
475
+ return H = v.data === void 0, I = c.value, I ? ($ = i.cache.get(I), Y = $ && $.data, v.isValidating = !0, Y && (v.data = Y.data, v.error = Y.error), ne = b || n, !ne || !i.isDocumentVisible() && !H || (C == null ? void 0 : C.forceRevalidate) !== void 0 && !(C != null && C.forceRevalidate) ? (v.isValidating = !1, [
465
476
  2
466
477
  /*return*/
467
- ]) : $ && (me = !!(Date.now() - $.createdAt >= i.dedupingInterval || m != null && m.forceRevalidate), !me) ? (v.isValidating = !1, [
478
+ ]) : $ && (ye = !!(Date.now() - $.createdAt >= i.dedupingInterval || C != null && C.forceRevalidate), !ye) ? (v.isValidating = !1, [
468
479
  2
469
480
  /*return*/
470
481
  ]) : (ae = function() {
@@ -481,7 +492,7 @@ function Nr() {
481
492
  case 3:
482
493
  W.sent(), W.label = 4;
483
494
  case 4:
484
- return v.isValidating = !1, ce.delete(I), v.error !== void 0 && (be = !u && i.shouldRetryOnError && (m ? m.shouldRetryOnError : !0), be && Rr(b, m ? m.errorRetryCount : 1, i)), [
495
+ return v.isValidating = !1, ce.delete(I), v.error !== void 0 && (be = !u && i.shouldRetryOnError && (C ? C.shouldRetryOnError : !0), be && Rr(S, C ? C.errorRetryCount : 1, i)), [
485
496
  2
486
497
  /*return*/
487
498
  ];
@@ -520,26 +531,26 @@ function Nr() {
520
531
  }
521
532
  });
522
533
  });
523
- }, h = function() {
534
+ }, y = function() {
524
535
  return Z(e, void 0, void 0, function() {
525
- return U(this, function(C) {
526
- return [2, b(null, { shouldRetryOnError: !1 })];
536
+ return U(this, function(b) {
537
+ return [2, S(null, { shouldRetryOnError: !1 })];
527
538
  });
528
539
  });
529
- }, w = null;
540
+ }, h = null;
530
541
  Pe(function() {
531
- var C = function() {
542
+ var b = function() {
532
543
  return Z(e, void 0, void 0, function() {
533
- return U(this, function(m) {
534
- switch (m.label) {
544
+ return U(this, function(C) {
545
+ switch (C.label) {
535
546
  case 0:
536
- return !v.error && i.isOnline() ? [4, b()] : [3, 2];
547
+ return !v.error && i.isOnline() ? [4, S()] : [3, 2];
537
548
  case 1:
538
- return m.sent(), [3, 3];
549
+ return C.sent(), [3, 3];
539
550
  case 2:
540
- w && clearTimeout(w), m.label = 3;
551
+ h && clearTimeout(h), C.label = 3;
541
552
  case 3:
542
- return i.refreshInterval && !u && (w = setTimeout(C, i.refreshInterval)), [
553
+ return i.refreshInterval && !u && (h = setTimeout(b, i.refreshInterval)), [
543
554
  2
544
555
  /*return*/
545
556
  ];
@@ -547,41 +558,41 @@ function Nr() {
547
558
  });
548
559
  });
549
560
  };
550
- i.refreshInterval && (w = setTimeout(C, i.refreshInterval)), i.revalidateOnFocus && (document.addEventListener("visibilitychange", h, !1), window.addEventListener("focus", h, !1));
561
+ i.refreshInterval && (h = setTimeout(b, i.refreshInterval)), i.revalidateOnFocus && (document.addEventListener("visibilitychange", y, !1), window.addEventListener("focus", y, !1));
551
562
  }), Ke(function() {
552
- u = !0, w && clearTimeout(w), i.revalidateOnFocus && (document.removeEventListener("visibilitychange", h, !1), window.removeEventListener("focus", h, !1));
553
- var C = ie.get(p.value);
554
- C && (C.data = C.data.filter(function(m) {
555
- return m !== v;
563
+ u = !0, h && clearTimeout(h), i.revalidateOnFocus && (document.removeEventListener("visibilitychange", y, !1), window.removeEventListener("focus", y, !1));
564
+ var b = ie.get(c.value);
565
+ b && (b.data = b.data.filter(function(C) {
566
+ return C !== v;
556
567
  }));
557
568
  });
558
569
  try {
559
- Ue(p, function(C) {
560
- Ze(p) || (p.value = C), v.key = C, v.isValidating = !!C, _r(p.value, v, l), !s && !c && p.value && b(), c = !1;
570
+ Ue(c, function(b) {
571
+ Ze(c) || (c.value = b), v.key = b, v.isValidating = !!b, _r(c.value, v, l), !s && !f && c.value && S(), f = !1;
561
572
  }, {
562
573
  immediate: !0
563
574
  });
564
575
  } catch {
565
576
  }
566
- var q = O(O({}, Ge(v)), { mutate: function(C, m) {
567
- return b(C, O(O({}, m), { forceRevalidate: !0 }));
577
+ var x = O(O({}, Ge(v)), { mutate: function(b, C) {
578
+ return S(b, O(O({}, C), { forceRevalidate: !0 }));
568
579
  } });
569
- return q;
580
+ return x;
570
581
  }
571
582
  function Ir(e) {
572
583
  return e !== null && typeof e == "object" && typeof e.then == "function";
573
584
  }
574
- function Er(e, t, r) {
585
+ function Er(e, r, t) {
575
586
  const {
576
587
  data: a,
577
588
  error: n,
578
589
  isValidating: i,
579
590
  mutate: u
580
- } = Nr(e, t, {
591
+ } = Nr(e, r, {
581
592
  revalidateDebounce: 500,
582
593
  revalidateOnFocus: !1,
583
594
  dedupingInterval: 100,
584
- ...r
595
+ ...t
585
596
  });
586
597
  return {
587
598
  data: g(() => a.value),
@@ -598,34 +609,34 @@ const K = {
598
609
  useRequest: Er
599
610
  }, De = Symbol("METRICS_PROVIDER_KEY"), Tr = (e) => {
600
611
  const {
601
- dimension: t,
602
- dimensionFilterValue: r,
612
+ dimension: r,
613
+ dimensionFilterValue: t,
603
614
  additionalFilter: a,
604
615
  queryReady: n,
605
616
  timeframe: i,
606
617
  tz: u,
607
- hasTrendAccess: c,
618
+ hasTrendAccess: f,
608
619
  refreshInterval: d,
609
620
  abortController: o,
610
621
  queryFn: s
611
622
  } = e;
612
- if (r && !t)
623
+ if (t && !r)
613
624
  throw new Error("Must provide a dimension if filtering by a value");
614
- const l = !!(t && r), p = !!(t && !r), v = g(() => {
615
- const C = [];
616
- return l && C.push({
617
- dimension: t,
625
+ const l = !!(r && t), c = !!(r && !t), v = g(() => {
626
+ const b = [];
627
+ return l && b.push({
628
+ dimension: r,
618
629
  type: "in",
619
- values: [r]
620
- }), a.value && C.push(...a.value), C;
621
- }), b = {
630
+ values: [t]
631
+ }), a.value && b.push(...a.value), b;
632
+ }), S = {
622
633
  metrics: [
623
634
  "request_count"
624
635
  ],
625
636
  // Traffic and error rate cards should only try to query for the dimension if it's going to be used.
626
637
  // It isn't used for single entity queries.
627
638
  dimensions: [
628
- ...t && !l ? [t] : [],
639
+ ...r && !l ? [r] : [],
629
640
  "status_code_grouped"
630
641
  ],
631
642
  filter: v,
@@ -633,35 +644,35 @@ const K = {
633
644
  timeframe: i,
634
645
  tz: u,
635
646
  // Traffic and error rate cards can't query trend if multiple entities are expected.
636
- withTrend: c && !p,
647
+ withTrend: f && !c,
637
648
  refreshInterval: d,
638
649
  queryFn: s,
639
650
  abortController: o
640
- }, h = {
651
+ }, y = {
641
652
  metrics: [
642
653
  "response_latency_p99"
643
654
  ],
644
655
  // To keep single-entity queries consistent, don't bother querying the dimension for latency
645
656
  // in the single-entity case, even though it's possible.
646
- ...t && !l ? { dimensions: [t] } : {},
657
+ ...r && !l ? { dimensions: [r] } : {},
647
658
  filter: v,
648
659
  queryReady: n,
649
660
  timeframe: i,
650
661
  tz: u,
651
662
  // Don't query latency trends in the multi-entity case: it's possible, but wasteful.
652
- withTrend: c && !p,
663
+ withTrend: f && !c,
653
664
  refreshInterval: d,
654
665
  queryFn: s,
655
666
  abortController: o
656
- }, w = K.useMetricFetcher(b), q = K.useMetricFetcher(h);
667
+ }, h = K.useMetricFetcher(S), x = K.useMetricFetcher(y);
657
668
  return {
658
- trafficData: w,
659
- latencyData: q
669
+ trafficData: h,
670
+ latencyData: x
660
671
  };
661
- }, ci = /* @__PURE__ */ x({
672
+ }, ci = /* @__PURE__ */ k({
662
673
  __name: "MetricsProviderInternal",
663
674
  props: {
664
- maxTimeframe: { default: re.THIRTY_DAY },
675
+ maxTimeframe: { default: te.THIRTY_DAY },
665
676
  overrideTimeframe: { default: void 0 },
666
677
  tz: { default: void 0 },
667
678
  dimension: { default: void 0 },
@@ -675,49 +686,45 @@ const K = {
675
686
  abortController: { default: void 0 }
676
687
  },
677
688
  setup(e) {
678
- const { i18n: t } = K.useI18n(), r = e;
679
- if (r.dimension && Je.findIndex((s) => s === r.dimension) === -1)
689
+ const r = e;
690
+ if (r.dimension && Je.findIndex((d) => d === r.dimension) === -1)
680
691
  throw new Error(`Attempted to use MetricsProvider with an invalid dimension: ${r.dimension}`);
681
- const a = ke(dr);
682
- let n;
683
- a ? n = a.queryFn : (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/analytics-metric-provider/README.md#requirements"), n = () => Promise.reject(new Error("Query bridge required")));
684
- const i = g(() => r.tz ? r.tz : new Intl.DateTimeFormat().resolvedOptions().timeZone), u = g(() => {
692
+ const t = ke(dr);
693
+ let a;
694
+ t ? a = t.queryFn : (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/analytics-metric-provider/README.md#requirements"), a = () => Promise.reject(new Error("Query bridge required")));
695
+ const n = g(() => r.tz ? r.tz : new Intl.DateTimeFormat().resolvedOptions().timeZone), i = g(() => {
685
696
  if (r.overrideTimeframe)
686
697
  return r.overrideTimeframe;
687
- const s = r.hasTrendAccess ? te.get(r.maxTimeframe) : te.get(re.ONE_DAY);
688
- if (!s)
698
+ const d = r.hasTrendAccess ? re.get(r.maxTimeframe) : re.get(te.ONE_DAY);
699
+ if (!d)
689
700
  throw new Error("Metrics provider failed to resolve fallback timeframe.");
690
- return s;
691
- }), c = g(() => {
692
- var s;
693
- return u.value.key === "custom" ? t.t("trendRange.custom", { numDays: Math.ceil(u.value.timeframeLength() / (1e3 * 60 * 24)) }) : r.hasTrendAccess ? t.t(`trendRange.${u.value.key}`) : t.t(`trendRange.${(s = te.get(re.ONE_DAY)) == null ? void 0 : s.key}`);
701
+ return d;
694
702
  }), {
695
- trafficData: d,
696
- latencyData: o
703
+ trafficData: u,
704
+ latencyData: f
697
705
  } = Tr({
698
706
  dimension: r.dimension,
699
707
  dimensionFilterValue: r.filterValue,
700
708
  additionalFilter: Se(r, "additionalFilter"),
701
709
  queryReady: Se(r, "queryReady"),
702
- timeframe: u,
703
- tz: i,
710
+ timeframe: i,
711
+ tz: n,
704
712
  hasTrendAccess: r.hasTrendAccess,
705
713
  refreshInterval: r.refreshInterval,
706
- queryFn: n,
714
+ queryFn: a,
707
715
  abortController: r.abortController
708
716
  });
709
717
  return je(De, {
710
718
  data: {
711
- traffic: d,
712
- latency: o
719
+ traffic: u,
720
+ latency: f
713
721
  },
714
722
  description: r.description,
715
723
  hasTrendAccess: r.hasTrendAccess,
716
- longCardTitles: r.longCardTitles,
717
- trendRange: c
718
- }), (s, l) => ze(s.$slots, "default", {
724
+ longCardTitles: r.longCardTitles
725
+ }), (d, o) => ze(d.$slots, "default", {
719
726
  hasTrendAccess: r.hasTrendAccess,
720
- timeframe: u.value
727
+ timeframe: i.value
721
728
  });
722
729
  }
723
730
  });
@@ -727,45 +734,45 @@ function xr(e) {
727
734
  var Me = { exports: {} };
728
735
  (function(e) {
729
736
  (function() {
730
- function t(o, s) {
737
+ function r(o, s) {
731
738
  if (s.separator === !1 || o < 1e3)
732
739
  return o.toString();
733
- var l = typeof s.separator == "string" ? s.separator : ",", p = [], v = Math.round(o).toString().split("");
734
- return v.reverse().forEach(function(b, h) {
735
- h && h % 3 === 0 && p.push(l), p.push(b);
736
- }), p.reverse().join("");
740
+ var l = typeof s.separator == "string" ? s.separator : ",", c = [], v = Math.round(o).toString().split("");
741
+ return v.reverse().forEach(function(S, y) {
742
+ y && y % 3 === 0 && c.push(l), c.push(S);
743
+ }), c.reverse().join("");
737
744
  }
738
- function r(o, s, l) {
739
- var p = o / s, v = l.round ? "round" : "floor";
740
- return l.decimal === !1 ? (o = Math[v](p), o.toString()) : (l.precision ? o = p : o = p < 10 ? Math[v](p * 10) / 10 : Math[v](p), o = o.toString(), typeof l.decimal == "string" && (o = o.replace(".", l.decimal)), o);
745
+ function t(o, s, l) {
746
+ var c = o / s, v = l.round ? "round" : "floor";
747
+ return l.decimal === !1 ? (o = Math[v](c), o.toString()) : (l.precision ? o = c : o = c < 10 ? Math[v](c * 10) / 10 : Math[v](c), o = o.toString(), typeof l.decimal == "string" && (o = o.replace(".", l.decimal)), o);
741
748
  }
742
- var a = 1e3, n = 1e4, i = 1e6, u = 1e9, c = 1e12;
749
+ var a = 1e3, n = 1e4, i = 1e6, u = 1e9, f = 1e12;
743
750
  function d(o, s) {
744
751
  var l;
745
752
  s = s || {};
746
- var p = o < 0;
747
- p && (o = Math.abs(o)), s.precision && (o = parseFloat(o.toPrecision(s.precision)));
753
+ var c = o < 0;
754
+ c && (o = Math.abs(o)), s.precision && (o = parseFloat(o.toPrecision(s.precision)));
748
755
  var v = s.min10k ? n : a;
749
- return o < v || s.precision && s.precision > Math.log10(o) ? l = t(r(o, 1, s), s) : o < i ? l = r(o, a, s) + "k" : o < u ? l = r(o, i, s) + "m" : o < c ? l = t(r(o, u, s), s) + "b" : l = t(r(o, c, s), s) + "t", p && (l = "-" + l), s.capital && (l = l.toUpperCase()), s.prefix && (l = s.prefix + l), s.suffix && (l = l + s.suffix), l;
756
+ return o < v || s.precision && s.precision > Math.log10(o) ? l = r(t(o, 1, s), s) : o < i ? l = t(o, a, s) + "k" : o < u ? l = t(o, i, s) + "m" : o < f ? l = r(t(o, u, s), s) + "b" : l = r(t(o, f, s), s) + "t", c && (l = "-" + l), s.capital && (l = l.toUpperCase()), s.prefix && (l = s.prefix + l), s.suffix && (l = l + s.suffix), l;
750
757
  }
751
- d.addCommas = t, e.exports = d;
758
+ d.addCommas = r, e.exports = d;
752
759
  })();
753
760
  })(Me);
754
761
  var kr = Me.exports;
755
762
  const zr = /* @__PURE__ */ xr(kr);
756
- var k = /* @__PURE__ */ ((e) => (e.Small = "sm", e.Medium = "md", e.Large = "lg", e.LargeCompact = "lgc", e.ExtraLarge = "xl", e))(k || {});
757
- const _ = "24px", M = (e, t) => {
758
- const r = e.__vccOpts || e;
759
- for (const [a, n] of t)
760
- r[a] = n;
761
- return r;
763
+ var z = /* @__PURE__ */ ((e) => (e.Small = "sm", e.Medium = "md", e.Large = "lg", e.LargeCompact = "lgc", e.ExtraLarge = "xl", e))(z || {});
764
+ const _ = "24px", M = (e, r) => {
765
+ const t = e.__vccOpts || e;
766
+ for (const [a, n] of r)
767
+ t[a] = n;
768
+ return t;
762
769
  }, qr = (e) => (L("data-v-115ec679"), e = e(), D(), e), Ar = ["aria-hidden"], Vr = {
763
770
  key: 0,
764
771
  "data-testid": "kui-icon-svg-title"
765
772
  }, Lr = /* @__PURE__ */ qr(() => /* @__PURE__ */ R("path", {
766
773
  d: "M6.5 20C4.98333 20 3.6875 19.475 2.6125 18.425C1.5375 17.375 1 16.0917 1 14.575C1 13.275 1.39167 12.1167 2.175 11.1C2.95833 10.0833 3.98333 9.43333 5.25 9.15C5.66667 7.61667 6.5 6.375 7.75 5.425C9 4.475 10.4167 4 12 4C13.95 4 15.6042 4.67917 16.9625 6.0375C18.3208 7.39583 19 9.05 19 11C20.15 11.1333 21.1042 11.6292 21.8625 12.4875C22.6208 13.3458 23 14.35 23 15.5C23 16.75 22.5625 17.8125 21.6875 18.6875C20.8125 19.5625 19.75 20 18.5 20H13C12.45 20 11.9792 19.8042 11.5875 19.4125C11.1958 19.0208 11 18.55 11 18V12.85L9.4 14.4L8 13L12 9L16 13L14.6 14.4L13 12.85V18H18.5C19.2 18 19.7917 17.7583 20.275 17.275C20.7583 16.7917 21 16.2 21 15.5C21 14.8 20.7583 14.2083 20.275 13.725C19.7917 13.2417 19.2 13 18.5 13H17V11C17 9.61667 16.5125 8.4375 15.5375 7.4625C14.5625 6.4875 13.3833 6 12 6C10.6167 6 9.4375 6.4875 8.4625 7.4625C7.4875 8.4375 7 9.61667 7 11H6.5C5.53333 11 4.70833 11.3417 4.025 12.025C3.34167 12.7083 3 13.5333 3 14.5C3 15.4667 3.34167 16.2917 4.025 16.975C4.70833 17.6583 5.53333 18 6.5 18H9V20H6.5Z",
767
774
  fill: "currentColor"
768
- }, null, -1)), Dr = /* @__PURE__ */ x({
775
+ }, null, -1)), Dr = /* @__PURE__ */ k({
769
776
  __name: "CloudUploadIcon",
770
777
  props: {
771
778
  /** The accessibility text provided to screen readers */
@@ -802,8 +809,8 @@ const _ = "24px", M = (e, t) => {
802
809
  if (typeof e == "number" && e > 0)
803
810
  return !0;
804
811
  if (typeof e == "string") {
805
- const t = String(e).replace(/px/gi, ""), r = Number(t);
806
- if (r && !isNaN(r) && Number.isInteger(r) && r > 0)
812
+ const r = String(e).replace(/px/gi, ""), t = Number(r);
813
+ if (t && !isNaN(t) && Number.isInteger(t) && t > 0)
807
814
  return !0;
808
815
  }
809
816
  return !1;
@@ -817,31 +824,31 @@ const _ = "24px", M = (e, t) => {
817
824
  }
818
825
  },
819
826
  setup(e) {
820
- const t = e, r = g(() => {
821
- if (typeof t.size == "number" && t.size > 0)
822
- return `${t.size}px`;
823
- if (typeof t.size == "string") {
824
- const n = String(t.size).replace(/px/gi, ""), i = Number(n);
827
+ const r = e, t = g(() => {
828
+ if (typeof r.size == "number" && r.size > 0)
829
+ return `${r.size}px`;
830
+ if (typeof r.size == "string") {
831
+ const n = String(r.size).replace(/px/gi, ""), i = Number(n);
825
832
  if (i && !isNaN(i) && Number.isInteger(i) && i > 0)
826
833
  return `${i}px`;
827
834
  }
828
835
  return _;
829
836
  }), a = g(() => ({
830
837
  boxSizing: "border-box",
831
- color: t.color,
832
- display: t.display,
833
- height: r.value,
838
+ color: r.color,
839
+ display: r.display,
840
+ height: t.value,
834
841
  lineHeight: "0",
835
- width: r.value
842
+ width: t.value
836
843
  }));
837
- return (n, i) => (f(), T(z(e.as), {
844
+ return (n, i) => (p(), T(q(e.as), {
838
845
  "aria-hidden": e.decorative ? "true" : void 0,
839
846
  class: "kui-icon cloud-upload-icon",
840
847
  "data-testid": "kui-icon-wrapper-cloud-upload-icon",
841
848
  style: V(a.value)
842
849
  }, {
843
850
  default: A(() => [
844
- (f(), y("svg", {
851
+ (p(), m("svg", {
845
852
  "aria-hidden": e.decorative ? "true" : void 0,
846
853
  "data-testid": "kui-icon-svg-cloud-upload-icon",
847
854
  fill: "none",
@@ -851,7 +858,7 @@ const _ = "24px", M = (e, t) => {
851
858
  width: "100%",
852
859
  xmlns: "http://www.w3.org/2000/svg"
853
860
  }, [
854
- e.title ? (f(), y("title", Vr, N(e.title), 1)) : E("", !0),
861
+ e.title ? (p(), m("title", Vr, N(e.title), 1)) : E("", !0),
855
862
  Lr
856
863
  ], 8, Ar))
857
864
  ]),
@@ -864,7 +871,7 @@ const _ = "24px", M = (e, t) => {
864
871
  }, Br = /* @__PURE__ */ Or(() => /* @__PURE__ */ R("path", {
865
872
  d: "M4 17V14H20V17H4ZM4 10V7H20V10H4Z",
866
873
  fill: "currentColor"
867
- }, null, -1)), $r = /* @__PURE__ */ x({
874
+ }, null, -1)), $r = /* @__PURE__ */ k({
868
875
  __name: "EqualIcon",
869
876
  props: {
870
877
  /** The accessibility text provided to screen readers */
@@ -901,8 +908,8 @@ const _ = "24px", M = (e, t) => {
901
908
  if (typeof e == "number" && e > 0)
902
909
  return !0;
903
910
  if (typeof e == "string") {
904
- const t = String(e).replace(/px/gi, ""), r = Number(t);
905
- if (r && !isNaN(r) && Number.isInteger(r) && r > 0)
911
+ const r = String(e).replace(/px/gi, ""), t = Number(r);
912
+ if (t && !isNaN(t) && Number.isInteger(t) && t > 0)
906
913
  return !0;
907
914
  }
908
915
  return !1;
@@ -916,31 +923,31 @@ const _ = "24px", M = (e, t) => {
916
923
  }
917
924
  },
918
925
  setup(e) {
919
- const t = e, r = g(() => {
920
- if (typeof t.size == "number" && t.size > 0)
921
- return `${t.size}px`;
922
- if (typeof t.size == "string") {
923
- const n = String(t.size).replace(/px/gi, ""), i = Number(n);
926
+ const r = e, t = g(() => {
927
+ if (typeof r.size == "number" && r.size > 0)
928
+ return `${r.size}px`;
929
+ if (typeof r.size == "string") {
930
+ const n = String(r.size).replace(/px/gi, ""), i = Number(n);
924
931
  if (i && !isNaN(i) && Number.isInteger(i) && i > 0)
925
932
  return `${i}px`;
926
933
  }
927
934
  return _;
928
935
  }), a = g(() => ({
929
936
  boxSizing: "border-box",
930
- color: t.color,
931
- display: t.display,
932
- height: r.value,
937
+ color: r.color,
938
+ display: r.display,
939
+ height: t.value,
933
940
  lineHeight: "0",
934
- width: r.value
941
+ width: t.value
935
942
  }));
936
- return (n, i) => (f(), T(z(e.as), {
943
+ return (n, i) => (p(), T(q(e.as), {
937
944
  "aria-hidden": e.decorative ? "true" : void 0,
938
945
  class: "kui-icon equal-icon",
939
946
  "data-testid": "kui-icon-wrapper-equal-icon",
940
947
  style: V(a.value)
941
948
  }, {
942
949
  default: A(() => [
943
- (f(), y("svg", {
950
+ (p(), m("svg", {
944
951
  "aria-hidden": e.decorative ? "true" : void 0,
945
952
  "data-testid": "kui-icon-svg-equal-icon",
946
953
  fill: "none",
@@ -950,7 +957,7 @@ const _ = "24px", M = (e, t) => {
950
957
  width: "100%",
951
958
  xmlns: "http://www.w3.org/2000/svg"
952
959
  }, [
953
- e.title ? (f(), y("title", Hr, N(e.title), 1)) : E("", !0),
960
+ e.title ? (p(), m("title", Hr, N(e.title), 1)) : E("", !0),
954
961
  Br
955
962
  ], 8, Fr))
956
963
  ]),
@@ -963,7 +970,7 @@ const _ = "24px", M = (e, t) => {
963
970
  }, Gr = /* @__PURE__ */ Kr(() => /* @__PURE__ */ R("path", {
964
971
  d: "M5 11V9H15V11H5Z",
965
972
  fill: "currentColor"
966
- }, null, -1)), jr = /* @__PURE__ */ x({
973
+ }, null, -1)), jr = /* @__PURE__ */ k({
967
974
  __name: "IndeterminateSmallIcon",
968
975
  props: {
969
976
  /** The accessibility text provided to screen readers */
@@ -1000,8 +1007,8 @@ const _ = "24px", M = (e, t) => {
1000
1007
  if (typeof e == "number" && e > 0)
1001
1008
  return !0;
1002
1009
  if (typeof e == "string") {
1003
- const t = String(e).replace(/px/gi, ""), r = Number(t);
1004
- if (r && !isNaN(r) && Number.isInteger(r) && r > 0)
1010
+ const r = String(e).replace(/px/gi, ""), t = Number(r);
1011
+ if (t && !isNaN(t) && Number.isInteger(t) && t > 0)
1005
1012
  return !0;
1006
1013
  }
1007
1014
  return !1;
@@ -1015,31 +1022,31 @@ const _ = "24px", M = (e, t) => {
1015
1022
  }
1016
1023
  },
1017
1024
  setup(e) {
1018
- const t = e, r = g(() => {
1019
- if (typeof t.size == "number" && t.size > 0)
1020
- return `${t.size}px`;
1021
- if (typeof t.size == "string") {
1022
- const n = String(t.size).replace(/px/gi, ""), i = Number(n);
1025
+ const r = e, t = g(() => {
1026
+ if (typeof r.size == "number" && r.size > 0)
1027
+ return `${r.size}px`;
1028
+ if (typeof r.size == "string") {
1029
+ const n = String(r.size).replace(/px/gi, ""), i = Number(n);
1023
1030
  if (i && !isNaN(i) && Number.isInteger(i) && i > 0)
1024
1031
  return `${i}px`;
1025
1032
  }
1026
1033
  return _;
1027
1034
  }), a = g(() => ({
1028
1035
  boxSizing: "border-box",
1029
- color: t.color,
1030
- display: t.display,
1031
- height: r.value,
1036
+ color: r.color,
1037
+ display: r.display,
1038
+ height: t.value,
1032
1039
  lineHeight: "0",
1033
- width: r.value
1040
+ width: t.value
1034
1041
  }));
1035
- return (n, i) => (f(), T(z(e.as), {
1042
+ return (n, i) => (p(), T(q(e.as), {
1036
1043
  "aria-hidden": e.decorative ? "true" : void 0,
1037
1044
  class: "kui-icon indeterminate-small-icon",
1038
1045
  "data-testid": "kui-icon-wrapper-indeterminate-small-icon",
1039
1046
  style: V(a.value)
1040
1047
  }, {
1041
1048
  default: A(() => [
1042
- (f(), y("svg", {
1049
+ (p(), m("svg", {
1043
1050
  "aria-hidden": e.decorative ? "true" : void 0,
1044
1051
  "data-testid": "kui-icon-svg-indeterminate-small-icon",
1045
1052
  fill: "none",
@@ -1049,7 +1056,7 @@ const _ = "24px", M = (e, t) => {
1049
1056
  width: "100%",
1050
1057
  xmlns: "http://www.w3.org/2000/svg"
1051
1058
  }, [
1052
- e.title ? (f(), y("title", Ur, N(e.title), 1)) : E("", !0),
1059
+ e.title ? (p(), m("title", Ur, N(e.title), 1)) : E("", !0),
1053
1060
  Gr
1054
1061
  ], 8, Zr))
1055
1062
  ]),
@@ -1062,7 +1069,7 @@ const _ = "24px", M = (e, t) => {
1062
1069
  }, Wr = /* @__PURE__ */ Xr(() => /* @__PURE__ */ R("path", {
1063
1070
  d: "M11 17H13V11H11V17ZM12 9C12.2833 9 12.5208 8.90417 12.7125 8.7125C12.9042 8.52083 13 8.28333 13 8C13 7.71667 12.9042 7.47917 12.7125 7.2875C12.5208 7.09583 12.2833 7 12 7C11.7167 7 11.4792 7.09583 11.2875 7.2875C11.0958 7.47917 11 7.71667 11 8C11 8.28333 11.0958 8.52083 11.2875 8.7125C11.4792 8.90417 11.7167 9 12 9ZM12 22C10.6167 22 9.31667 21.7375 8.1 21.2125C6.88333 20.6875 5.825 19.975 4.925 19.075C4.025 18.175 3.3125 17.1167 2.7875 15.9C2.2625 14.6833 2 13.3833 2 12C2 10.6167 2.2625 9.31667 2.7875 8.1C3.3125 6.88333 4.025 5.825 4.925 4.925C5.825 4.025 6.88333 3.3125 8.1 2.7875C9.31667 2.2625 10.6167 2 12 2C13.3833 2 14.6833 2.2625 15.9 2.7875C17.1167 3.3125 18.175 4.025 19.075 4.925C19.975 5.825 20.6875 6.88333 21.2125 8.1C21.7375 9.31667 22 10.6167 22 12C22 13.3833 21.7375 14.6833 21.2125 15.9C20.6875 17.1167 19.975 18.175 19.075 19.075C18.175 19.975 17.1167 20.6875 15.9 21.2125C14.6833 21.7375 13.3833 22 12 22Z",
1064
1071
  fill: "currentColor"
1065
- }, null, -1)), Jr = /* @__PURE__ */ x({
1072
+ }, null, -1)), Jr = /* @__PURE__ */ k({
1066
1073
  __name: "InfoIcon",
1067
1074
  props: {
1068
1075
  /** The accessibility text provided to screen readers */
@@ -1099,8 +1106,8 @@ const _ = "24px", M = (e, t) => {
1099
1106
  if (typeof e == "number" && e > 0)
1100
1107
  return !0;
1101
1108
  if (typeof e == "string") {
1102
- const t = String(e).replace(/px/gi, ""), r = Number(t);
1103
- if (r && !isNaN(r) && Number.isInteger(r) && r > 0)
1109
+ const r = String(e).replace(/px/gi, ""), t = Number(r);
1110
+ if (t && !isNaN(t) && Number.isInteger(t) && t > 0)
1104
1111
  return !0;
1105
1112
  }
1106
1113
  return !1;
@@ -1114,31 +1121,31 @@ const _ = "24px", M = (e, t) => {
1114
1121
  }
1115
1122
  },
1116
1123
  setup(e) {
1117
- const t = e, r = g(() => {
1118
- if (typeof t.size == "number" && t.size > 0)
1119
- return `${t.size}px`;
1120
- if (typeof t.size == "string") {
1121
- const n = String(t.size).replace(/px/gi, ""), i = Number(n);
1124
+ const r = e, t = g(() => {
1125
+ if (typeof r.size == "number" && r.size > 0)
1126
+ return `${r.size}px`;
1127
+ if (typeof r.size == "string") {
1128
+ const n = String(r.size).replace(/px/gi, ""), i = Number(n);
1122
1129
  if (i && !isNaN(i) && Number.isInteger(i) && i > 0)
1123
1130
  return `${i}px`;
1124
1131
  }
1125
1132
  return _;
1126
1133
  }), a = g(() => ({
1127
1134
  boxSizing: "border-box",
1128
- color: t.color,
1129
- display: t.display,
1130
- height: r.value,
1135
+ color: r.color,
1136
+ display: r.display,
1137
+ height: t.value,
1131
1138
  lineHeight: "0",
1132
- width: r.value
1139
+ width: t.value
1133
1140
  }));
1134
- return (n, i) => (f(), T(z(e.as), {
1141
+ return (n, i) => (p(), T(q(e.as), {
1135
1142
  "aria-hidden": e.decorative ? "true" : void 0,
1136
1143
  class: "kui-icon info-icon",
1137
1144
  "data-testid": "kui-icon-wrapper-info-icon",
1138
1145
  style: V(a.value)
1139
1146
  }, {
1140
1147
  default: A(() => [
1141
- (f(), y("svg", {
1148
+ (p(), m("svg", {
1142
1149
  "aria-hidden": e.decorative ? "true" : void 0,
1143
1150
  "data-testid": "kui-icon-svg-info-icon",
1144
1151
  fill: "none",
@@ -1148,7 +1155,7 @@ const _ = "24px", M = (e, t) => {
1148
1155
  width: "100%",
1149
1156
  xmlns: "http://www.w3.org/2000/svg"
1150
1157
  }, [
1151
- e.title ? (f(), y("title", Qr, N(e.title), 1)) : E("", !0),
1158
+ e.title ? (p(), m("title", Qr, N(e.title), 1)) : E("", !0),
1152
1159
  Wr
1153
1160
  ], 8, Yr))
1154
1161
  ]),
@@ -1161,7 +1168,7 @@ const _ = "24px", M = (e, t) => {
1161
1168
  }, nt = /* @__PURE__ */ rt(() => /* @__PURE__ */ R("path", {
1162
1169
  d: "M15.25 5C14.9 5 14.6042 4.87917 14.3625 4.6375C14.1208 4.39583 14 4.1 14 3.75C14 3.4 14.1208 3.10417 14.3625 2.8625C14.6042 2.62083 14.9 2.5 15.25 2.5C15.6 2.5 15.8958 2.62083 16.1375 2.8625C16.3792 3.10417 16.5 3.4 16.5 3.75C16.5 4.1 16.3792 4.39583 16.1375 4.6375C15.8958 4.87917 15.6 5 15.25 5ZM15.25 21.5C14.9 21.5 14.6042 21.3792 14.3625 21.1375C14.1208 20.8958 14 20.6 14 20.25C14 19.9 14.1208 19.6042 14.3625 19.3625C14.6042 19.1208 14.9 19 15.25 19C15.6 19 15.8958 19.1208 16.1375 19.3625C16.3792 19.6042 16.5 19.9 16.5 20.25C16.5 20.6 16.3792 20.8958 16.1375 21.1375C15.8958 21.3792 15.6 21.5 15.25 21.5ZM19.25 8.5C18.9 8.5 18.6042 8.37917 18.3625 8.1375C18.1208 7.89583 18 7.6 18 7.25C18 6.9 18.1208 6.60417 18.3625 6.3625C18.6042 6.12083 18.9 6 19.25 6C19.6 6 19.8958 6.12083 20.1375 6.3625C20.3792 6.60417 20.5 6.9 20.5 7.25C20.5 7.6 20.3792 7.89583 20.1375 8.1375C19.8958 8.37917 19.6 8.5 19.25 8.5ZM19.25 18C18.9 18 18.6042 17.8792 18.3625 17.6375C18.1208 17.3958 18 17.1 18 16.75C18 16.4 18.1208 16.1042 18.3625 15.8625C18.6042 15.6208 18.9 15.5 19.25 15.5C19.6 15.5 19.8958 15.6208 20.1375 15.8625C20.3792 16.1042 20.5 16.4 20.5 16.75C20.5 17.1 20.3792 17.3958 20.1375 17.6375C19.8958 17.8792 19.6 18 19.25 18ZM20.75 13.25C20.4 13.25 20.1042 13.1292 19.8625 12.8875C19.6208 12.6458 19.5 12.35 19.5 12C19.5 11.65 19.6208 11.3542 19.8625 11.1125C20.1042 10.8708 20.4 10.75 20.75 10.75C21.1 10.75 21.3958 10.8708 21.6375 11.1125C21.8792 11.3542 22 11.65 22 12C22 12.35 21.8792 12.6458 21.6375 12.8875C21.3958 13.1292 21.1 13.25 20.75 13.25ZM12 22C10.6167 22 9.31667 21.7375 8.1 21.2125C6.88333 20.6875 5.825 19.975 4.925 19.075C4.025 18.175 3.3125 17.1167 2.7875 15.9C2.2625 14.6833 2 13.3833 2 12C2 10.6167 2.2625 9.31667 2.7875 8.1C3.3125 6.88333 4.025 5.825 4.925 4.925C5.825 4.025 6.88333 3.3125 8.1 2.7875C9.31667 2.2625 10.6167 2 12 2V4C9.76667 4 7.875 4.775 6.325 6.325C4.775 7.875 4 9.76667 4 12C4 14.2333 4.775 16.125 6.325 17.675C7.875 19.225 9.76667 20 12 20V22ZM12 14C11.45 14 10.9792 13.8042 10.5875 13.4125C10.1958 13.0208 10 12.55 10 12C10 11.9167 10.0042 11.8292 10.0125 11.7375C10.0208 11.6458 10.0417 11.5583 10.075 11.475L8 9.4L9.4 8L11.475 10.075C11.5417 10.0583 11.7167 10.0333 12 10C12.55 10 13.0208 10.1958 13.4125 10.5875C13.8042 10.9792 14 11.45 14 12C14 12.55 13.8042 13.0208 13.4125 13.4125C13.0208 13.8042 12.55 14 12 14Z",
1163
1170
  fill: "currentColor"
1164
- }, null, -1)), at = /* @__PURE__ */ x({
1171
+ }, null, -1)), at = /* @__PURE__ */ k({
1165
1172
  __name: "ResponseIcon",
1166
1173
  props: {
1167
1174
  /** The accessibility text provided to screen readers */
@@ -1198,8 +1205,8 @@ const _ = "24px", M = (e, t) => {
1198
1205
  if (typeof e == "number" && e > 0)
1199
1206
  return !0;
1200
1207
  if (typeof e == "string") {
1201
- const t = String(e).replace(/px/gi, ""), r = Number(t);
1202
- if (r && !isNaN(r) && Number.isInteger(r) && r > 0)
1208
+ const r = String(e).replace(/px/gi, ""), t = Number(r);
1209
+ if (t && !isNaN(t) && Number.isInteger(t) && t > 0)
1203
1210
  return !0;
1204
1211
  }
1205
1212
  return !1;
@@ -1213,31 +1220,31 @@ const _ = "24px", M = (e, t) => {
1213
1220
  }
1214
1221
  },
1215
1222
  setup(e) {
1216
- const t = e, r = g(() => {
1217
- if (typeof t.size == "number" && t.size > 0)
1218
- return `${t.size}px`;
1219
- if (typeof t.size == "string") {
1220
- const n = String(t.size).replace(/px/gi, ""), i = Number(n);
1223
+ const r = e, t = g(() => {
1224
+ if (typeof r.size == "number" && r.size > 0)
1225
+ return `${r.size}px`;
1226
+ if (typeof r.size == "string") {
1227
+ const n = String(r.size).replace(/px/gi, ""), i = Number(n);
1221
1228
  if (i && !isNaN(i) && Number.isInteger(i) && i > 0)
1222
1229
  return `${i}px`;
1223
1230
  }
1224
1231
  return _;
1225
1232
  }), a = g(() => ({
1226
1233
  boxSizing: "border-box",
1227
- color: t.color,
1228
- display: t.display,
1229
- height: r.value,
1234
+ color: r.color,
1235
+ display: r.display,
1236
+ height: t.value,
1230
1237
  lineHeight: "0",
1231
- width: r.value
1238
+ width: t.value
1232
1239
  }));
1233
- return (n, i) => (f(), T(z(e.as), {
1240
+ return (n, i) => (p(), T(q(e.as), {
1234
1241
  "aria-hidden": e.decorative ? "true" : void 0,
1235
1242
  class: "kui-icon response-icon",
1236
1243
  "data-testid": "kui-icon-wrapper-response-icon",
1237
1244
  style: V(a.value)
1238
1245
  }, {
1239
1246
  default: A(() => [
1240
- (f(), y("svg", {
1247
+ (p(), m("svg", {
1241
1248
  "aria-hidden": e.decorative ? "true" : void 0,
1242
1249
  "data-testid": "kui-icon-svg-response-icon",
1243
1250
  fill: "none",
@@ -1247,7 +1254,7 @@ const _ = "24px", M = (e, t) => {
1247
1254
  width: "100%",
1248
1255
  xmlns: "http://www.w3.org/2000/svg"
1249
1256
  }, [
1250
- e.title ? (f(), y("title", it, N(e.title), 1)) : E("", !0),
1257
+ e.title ? (p(), m("title", it, N(e.title), 1)) : E("", !0),
1251
1258
  nt
1252
1259
  ], 8, tt))
1253
1260
  ]),
@@ -1260,7 +1267,7 @@ const _ = "24px", M = (e, t) => {
1260
1267
  }, dt = /* @__PURE__ */ st(() => /* @__PURE__ */ R("path", {
1261
1268
  d: "M16 18V16H18.6L13.4 10.85L9.4 14.85L2 7.4L3.4 6L9.4 12L13.4 8L20 14.6V12H22V18H16Z",
1262
1269
  fill: "currentColor"
1263
- }, null, -1)), ct = /* @__PURE__ */ x({
1270
+ }, null, -1)), ct = /* @__PURE__ */ k({
1264
1271
  __name: "TrendDownIcon",
1265
1272
  props: {
1266
1273
  /** The accessibility text provided to screen readers */
@@ -1297,8 +1304,8 @@ const _ = "24px", M = (e, t) => {
1297
1304
  if (typeof e == "number" && e > 0)
1298
1305
  return !0;
1299
1306
  if (typeof e == "string") {
1300
- const t = String(e).replace(/px/gi, ""), r = Number(t);
1301
- if (r && !isNaN(r) && Number.isInteger(r) && r > 0)
1307
+ const r = String(e).replace(/px/gi, ""), t = Number(r);
1308
+ if (t && !isNaN(t) && Number.isInteger(t) && t > 0)
1302
1309
  return !0;
1303
1310
  }
1304
1311
  return !1;
@@ -1312,31 +1319,31 @@ const _ = "24px", M = (e, t) => {
1312
1319
  }
1313
1320
  },
1314
1321
  setup(e) {
1315
- const t = e, r = g(() => {
1316
- if (typeof t.size == "number" && t.size > 0)
1317
- return `${t.size}px`;
1318
- if (typeof t.size == "string") {
1319
- const n = String(t.size).replace(/px/gi, ""), i = Number(n);
1322
+ const r = e, t = g(() => {
1323
+ if (typeof r.size == "number" && r.size > 0)
1324
+ return `${r.size}px`;
1325
+ if (typeof r.size == "string") {
1326
+ const n = String(r.size).replace(/px/gi, ""), i = Number(n);
1320
1327
  if (i && !isNaN(i) && Number.isInteger(i) && i > 0)
1321
1328
  return `${i}px`;
1322
1329
  }
1323
1330
  return _;
1324
1331
  }), a = g(() => ({
1325
1332
  boxSizing: "border-box",
1326
- color: t.color,
1327
- display: t.display,
1328
- height: r.value,
1333
+ color: r.color,
1334
+ display: r.display,
1335
+ height: t.value,
1329
1336
  lineHeight: "0",
1330
- width: r.value
1337
+ width: t.value
1331
1338
  }));
1332
- return (n, i) => (f(), T(z(e.as), {
1339
+ return (n, i) => (p(), T(q(e.as), {
1333
1340
  "aria-hidden": e.decorative ? "true" : void 0,
1334
1341
  class: "kui-icon trend-down-icon",
1335
1342
  "data-testid": "kui-icon-wrapper-trend-down-icon",
1336
1343
  style: V(a.value)
1337
1344
  }, {
1338
1345
  default: A(() => [
1339
- (f(), y("svg", {
1346
+ (p(), m("svg", {
1340
1347
  "aria-hidden": e.decorative ? "true" : void 0,
1341
1348
  "data-testid": "kui-icon-svg-trend-down-icon",
1342
1349
  fill: "none",
@@ -1346,7 +1353,7 @@ const _ = "24px", M = (e, t) => {
1346
1353
  width: "100%",
1347
1354
  xmlns: "http://www.w3.org/2000/svg"
1348
1355
  }, [
1349
- e.title ? (f(), y("title", lt, N(e.title), 1)) : E("", !0),
1356
+ e.title ? (p(), m("title", lt, N(e.title), 1)) : E("", !0),
1350
1357
  dt
1351
1358
  ], 8, ut))
1352
1359
  ]),
@@ -1356,10 +1363,10 @@ const _ = "24px", M = (e, t) => {
1356
1363
  }), ft = /* @__PURE__ */ M(ct, [["__scopeId", "data-v-aa775b0e"]]), pt = (e) => (L("data-v-cb010004"), e = e(), D(), e), vt = ["aria-hidden"], gt = {
1357
1364
  key: 0,
1358
1365
  "data-testid": "kui-icon-svg-title"
1359
- }, yt = /* @__PURE__ */ pt(() => /* @__PURE__ */ R("path", {
1366
+ }, mt = /* @__PURE__ */ pt(() => /* @__PURE__ */ R("path", {
1360
1367
  d: "M3.4 18L2 16.6L9.4 9.15L13.4 13.15L18.6 8H16V6H22V12H20V9.4L13.4 16L9.4 12L3.4 18Z",
1361
1368
  fill: "currentColor"
1362
- }, null, -1)), mt = /* @__PURE__ */ x({
1369
+ }, null, -1)), yt = /* @__PURE__ */ k({
1363
1370
  __name: "TrendUpIcon",
1364
1371
  props: {
1365
1372
  /** The accessibility text provided to screen readers */
@@ -1396,8 +1403,8 @@ const _ = "24px", M = (e, t) => {
1396
1403
  if (typeof e == "number" && e > 0)
1397
1404
  return !0;
1398
1405
  if (typeof e == "string") {
1399
- const t = String(e).replace(/px/gi, ""), r = Number(t);
1400
- if (r && !isNaN(r) && Number.isInteger(r) && r > 0)
1406
+ const r = String(e).replace(/px/gi, ""), t = Number(r);
1407
+ if (t && !isNaN(t) && Number.isInteger(t) && t > 0)
1401
1408
  return !0;
1402
1409
  }
1403
1410
  return !1;
@@ -1411,31 +1418,31 @@ const _ = "24px", M = (e, t) => {
1411
1418
  }
1412
1419
  },
1413
1420
  setup(e) {
1414
- const t = e, r = g(() => {
1415
- if (typeof t.size == "number" && t.size > 0)
1416
- return `${t.size}px`;
1417
- if (typeof t.size == "string") {
1418
- const n = String(t.size).replace(/px/gi, ""), i = Number(n);
1421
+ const r = e, t = g(() => {
1422
+ if (typeof r.size == "number" && r.size > 0)
1423
+ return `${r.size}px`;
1424
+ if (typeof r.size == "string") {
1425
+ const n = String(r.size).replace(/px/gi, ""), i = Number(n);
1419
1426
  if (i && !isNaN(i) && Number.isInteger(i) && i > 0)
1420
1427
  return `${i}px`;
1421
1428
  }
1422
1429
  return _;
1423
1430
  }), a = g(() => ({
1424
1431
  boxSizing: "border-box",
1425
- color: t.color,
1426
- display: t.display,
1427
- height: r.value,
1432
+ color: r.color,
1433
+ display: r.display,
1434
+ height: t.value,
1428
1435
  lineHeight: "0",
1429
- width: r.value
1436
+ width: t.value
1430
1437
  }));
1431
- return (n, i) => (f(), T(z(e.as), {
1438
+ return (n, i) => (p(), T(q(e.as), {
1432
1439
  "aria-hidden": e.decorative ? "true" : void 0,
1433
1440
  class: "kui-icon trend-up-icon",
1434
1441
  "data-testid": "kui-icon-wrapper-trend-up-icon",
1435
1442
  style: V(a.value)
1436
1443
  }, {
1437
1444
  default: A(() => [
1438
- (f(), y("svg", {
1445
+ (p(), m("svg", {
1439
1446
  "aria-hidden": e.decorative ? "true" : void 0,
1440
1447
  "data-testid": "kui-icon-svg-trend-up-icon",
1441
1448
  fill: "none",
@@ -1445,20 +1452,20 @@ const _ = "24px", M = (e, t) => {
1445
1452
  width: "100%",
1446
1453
  xmlns: "http://www.w3.org/2000/svg"
1447
1454
  }, [
1448
- e.title ? (f(), y("title", gt, N(e.title), 1)) : E("", !0),
1449
- yt
1455
+ e.title ? (p(), m("title", gt, N(e.title), 1)) : E("", !0),
1456
+ mt
1450
1457
  ], 8, vt))
1451
1458
  ]),
1452
1459
  _: 1
1453
1460
  }, 8, ["aria-hidden", "style"]));
1454
1461
  }
1455
- }), ht = /* @__PURE__ */ M(mt, [["__scopeId", "data-v-cb010004"]]), Ct = (e) => (L("data-v-6d3b4073"), e = e(), D(), e), bt = ["aria-hidden"], St = {
1462
+ }), ht = /* @__PURE__ */ M(yt, [["__scopeId", "data-v-cb010004"]]), Ct = (e) => (L("data-v-6d3b4073"), e = e(), D(), e), bt = ["aria-hidden"], St = {
1456
1463
  key: 0,
1457
1464
  "data-testid": "kui-icon-svg-title"
1458
1465
  }, wt = /* @__PURE__ */ Ct(() => /* @__PURE__ */ R("path", {
1459
1466
  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",
1460
1467
  fill: "currentColor"
1461
- }, null, -1)), _t = /* @__PURE__ */ x({
1468
+ }, null, -1)), _t = /* @__PURE__ */ k({
1462
1469
  __name: "VitalsIcon",
1463
1470
  props: {
1464
1471
  /** The accessibility text provided to screen readers */
@@ -1495,8 +1502,8 @@ const _ = "24px", M = (e, t) => {
1495
1502
  if (typeof e == "number" && e > 0)
1496
1503
  return !0;
1497
1504
  if (typeof e == "string") {
1498
- const t = String(e).replace(/px/gi, ""), r = Number(t);
1499
- if (r && !isNaN(r) && Number.isInteger(r) && r > 0)
1505
+ const r = String(e).replace(/px/gi, ""), t = Number(r);
1506
+ if (t && !isNaN(t) && Number.isInteger(t) && t > 0)
1500
1507
  return !0;
1501
1508
  }
1502
1509
  return !1;
@@ -1510,31 +1517,31 @@ const _ = "24px", M = (e, t) => {
1510
1517
  }
1511
1518
  },
1512
1519
  setup(e) {
1513
- const t = e, r = g(() => {
1514
- if (typeof t.size == "number" && t.size > 0)
1515
- return `${t.size}px`;
1516
- if (typeof t.size == "string") {
1517
- const n = String(t.size).replace(/px/gi, ""), i = Number(n);
1520
+ const r = e, t = g(() => {
1521
+ if (typeof r.size == "number" && r.size > 0)
1522
+ return `${r.size}px`;
1523
+ if (typeof r.size == "string") {
1524
+ const n = String(r.size).replace(/px/gi, ""), i = Number(n);
1518
1525
  if (i && !isNaN(i) && Number.isInteger(i) && i > 0)
1519
1526
  return `${i}px`;
1520
1527
  }
1521
1528
  return _;
1522
1529
  }), a = g(() => ({
1523
1530
  boxSizing: "border-box",
1524
- color: t.color,
1525
- display: t.display,
1526
- height: r.value,
1531
+ color: r.color,
1532
+ display: r.display,
1533
+ height: t.value,
1527
1534
  lineHeight: "0",
1528
- width: r.value
1535
+ width: t.value
1529
1536
  }));
1530
- return (n, i) => (f(), T(z(e.as), {
1537
+ return (n, i) => (p(), T(q(e.as), {
1531
1538
  "aria-hidden": e.decorative ? "true" : void 0,
1532
1539
  class: "kui-icon vitals-icon",
1533
1540
  "data-testid": "kui-icon-wrapper-vitals-icon",
1534
1541
  style: V(a.value)
1535
1542
  }, {
1536
1543
  default: A(() => [
1537
- (f(), y("svg", {
1544
+ (p(), m("svg", {
1538
1545
  "aria-hidden": e.decorative ? "true" : void 0,
1539
1546
  "data-testid": "kui-icon-svg-vitals-icon",
1540
1547
  fill: "none",
@@ -1544,7 +1551,7 @@ const _ = "24px", M = (e, t) => {
1544
1551
  width: "100%",
1545
1552
  xmlns: "http://www.w3.org/2000/svg"
1546
1553
  }, [
1547
- e.title ? (f(), y("title", St, N(e.title), 1)) : E("", !0),
1554
+ e.title ? (p(), m("title", St, N(e.title), 1)) : E("", !0),
1548
1555
  wt
1549
1556
  ], 8, bt))
1550
1557
  ]),
@@ -1557,7 +1564,7 @@ const _ = "24px", M = (e, t) => {
1557
1564
  }, Tt = /* @__PURE__ */ Nt(() => /* @__PURE__ */ R("path", {
1558
1565
  d: "M12.0001 22.025C11.7334 22.025 11.4793 21.975 11.2376 21.875C10.9959 21.775 10.7751 21.6333 10.5751 21.45L2.5501 13.425C2.36676 13.225 2.2251 13.0041 2.1251 12.7625C2.0251 12.5208 1.9751 12.2666 1.9751 12C1.9751 11.7333 2.0251 11.475 2.1251 11.225C2.2251 10.975 2.36676 10.7583 2.5501 10.575L10.5751 2.54998C10.7751 2.34998 10.9959 2.20414 11.2376 2.11248C11.4793 2.02081 11.7334 1.97498 12.0001 1.97498C12.2668 1.97498 12.5251 2.02081 12.7751 2.11248C13.0251 2.20414 13.2418 2.34998 13.4251 2.54998L21.4501 10.575C21.6501 10.7583 21.7959 10.975 21.8876 11.225C21.9793 11.475 22.0251 11.7333 22.0251 12C22.0251 12.2666 21.9793 12.5208 21.8876 12.7625C21.7959 13.0041 21.6501 13.225 21.4501 13.425L13.4251 21.45C13.2418 21.6333 13.0251 21.775 12.7751 21.875C12.5251 21.975 12.2668 22.025 12.0001 22.025ZM12.0001 20.025L20.0251 12L12.0001 3.97498L3.9751 12L12.0001 20.025ZM11.0001 13H13.0001V6.99998H11.0001V13ZM12.0001 16C12.2834 16 12.5209 15.9041 12.7126 15.7125C12.9043 15.5208 13.0001 15.2833 13.0001 15C13.0001 14.7166 12.9043 14.4791 12.7126 14.2875C12.5209 14.0958 12.2834 14 12.0001 14C11.7168 14 11.4793 14.0958 11.2876 14.2875C11.0959 14.4791 11.0001 14.7166 11.0001 15C11.0001 15.2833 11.0959 15.5208 11.2876 15.7125C11.4793 15.9041 11.7168 16 12.0001 16Z",
1559
1566
  fill: "currentColor"
1560
- }, null, -1)), xt = /* @__PURE__ */ x({
1567
+ }, null, -1)), xt = /* @__PURE__ */ k({
1561
1568
  __name: "WarningOutlineIcon",
1562
1569
  props: {
1563
1570
  /** The accessibility text provided to screen readers */
@@ -1594,8 +1601,8 @@ const _ = "24px", M = (e, t) => {
1594
1601
  if (typeof e == "number" && e > 0)
1595
1602
  return !0;
1596
1603
  if (typeof e == "string") {
1597
- const t = String(e).replace(/px/gi, ""), r = Number(t);
1598
- if (r && !isNaN(r) && Number.isInteger(r) && r > 0)
1604
+ const r = String(e).replace(/px/gi, ""), t = Number(r);
1605
+ if (t && !isNaN(t) && Number.isInteger(t) && t > 0)
1599
1606
  return !0;
1600
1607
  }
1601
1608
  return !1;
@@ -1609,31 +1616,31 @@ const _ = "24px", M = (e, t) => {
1609
1616
  }
1610
1617
  },
1611
1618
  setup(e) {
1612
- const t = e, r = g(() => {
1613
- if (typeof t.size == "number" && t.size > 0)
1614
- return `${t.size}px`;
1615
- if (typeof t.size == "string") {
1616
- const n = String(t.size).replace(/px/gi, ""), i = Number(n);
1619
+ const r = e, t = g(() => {
1620
+ if (typeof r.size == "number" && r.size > 0)
1621
+ return `${r.size}px`;
1622
+ if (typeof r.size == "string") {
1623
+ const n = String(r.size).replace(/px/gi, ""), i = Number(n);
1617
1624
  if (i && !isNaN(i) && Number.isInteger(i) && i > 0)
1618
1625
  return `${i}px`;
1619
1626
  }
1620
1627
  return _;
1621
1628
  }), a = g(() => ({
1622
1629
  boxSizing: "border-box",
1623
- color: t.color,
1624
- display: t.display,
1625
- height: r.value,
1630
+ color: r.color,
1631
+ display: r.display,
1632
+ height: t.value,
1626
1633
  lineHeight: "0",
1627
- width: r.value
1634
+ width: t.value
1628
1635
  }));
1629
- return (n, i) => (f(), T(z(e.as), {
1636
+ return (n, i) => (p(), T(q(e.as), {
1630
1637
  "aria-hidden": e.decorative ? "true" : void 0,
1631
1638
  class: "kui-icon warning-outline-icon",
1632
1639
  "data-testid": "kui-icon-wrapper-warning-outline-icon",
1633
1640
  style: V(a.value)
1634
1641
  }, {
1635
1642
  default: A(() => [
1636
- (f(), y("svg", {
1643
+ (p(), m("svg", {
1637
1644
  "aria-hidden": e.decorative ? "true" : void 0,
1638
1645
  "data-testid": "kui-icon-svg-warning-outline-icon",
1639
1646
  fill: "none",
@@ -1643,7 +1650,7 @@ const _ = "24px", M = (e, t) => {
1643
1650
  width: "100%",
1644
1651
  xmlns: "http://www.w3.org/2000/svg"
1645
1652
  }, [
1646
- e.title ? (f(), y("title", Et, N(e.title), 1)) : E("", !0),
1653
+ e.title ? (p(), m("title", Et, N(e.title), 1)) : E("", !0),
1647
1654
  Tt
1648
1655
  ], 8, It))
1649
1656
  ]),
@@ -1656,7 +1663,7 @@ const _ = "24px", M = (e, t) => {
1656
1663
  }, Vt = /* @__PURE__ */ zt(() => /* @__PURE__ */ R("path", {
1657
1664
  d: "M12.025 22.05C11.7583 22.05 11.5042 22 11.2625 21.9C11.0208 21.8 10.8 21.6583 10.6 21.475L2.575 13.45C2.39167 13.25 2.25 13.0292 2.15 12.7875C2.05 12.5458 2 12.2917 2 12.025C2 11.7583 2.05 11.5 2.15 11.25C2.25 11 2.39167 10.7833 2.575 10.6L10.6 2.575C10.8 2.375 11.0208 2.22917 11.2625 2.1375C11.5042 2.04583 11.7583 2 12.025 2C12.2917 2 12.55 2.04583 12.8 2.1375C13.05 2.22917 13.2667 2.375 13.45 2.575L21.475 10.6C21.675 10.7833 21.8208 11 21.9125 11.25C22.0042 11.5 22.05 11.7583 22.05 12.025C22.05 12.2917 22.0042 12.5458 21.9125 12.7875C21.8208 13.0292 21.675 13.25 21.475 13.45L13.45 21.475C13.2667 21.6583 13.05 21.8 12.8 21.9C12.55 22 12.2917 22.05 12.025 22.05ZM11.025 13.025H13.025V7.025H11.025V13.025ZM12.025 16.025C12.3083 16.025 12.5458 15.9292 12.7375 15.7375C12.9292 15.5458 13.025 15.3083 13.025 15.025C13.025 14.7417 12.9292 14.5042 12.7375 14.3125C12.5458 14.1208 12.3083 14.025 12.025 14.025C11.7417 14.025 11.5042 14.1208 11.3125 14.3125C11.1208 14.5042 11.025 14.7417 11.025 15.025C11.025 15.3083 11.1208 15.5458 11.3125 15.7375C11.5042 15.9292 11.7417 16.025 12.025 16.025Z",
1658
1665
  fill: "currentColor"
1659
- }, null, -1)), Lt = /* @__PURE__ */ x({
1666
+ }, null, -1)), Lt = /* @__PURE__ */ k({
1660
1667
  __name: "WarningIcon",
1661
1668
  props: {
1662
1669
  /** The accessibility text provided to screen readers */
@@ -1693,8 +1700,8 @@ const _ = "24px", M = (e, t) => {
1693
1700
  if (typeof e == "number" && e > 0)
1694
1701
  return !0;
1695
1702
  if (typeof e == "string") {
1696
- const t = String(e).replace(/px/gi, ""), r = Number(t);
1697
- if (r && !isNaN(r) && Number.isInteger(r) && r > 0)
1703
+ const r = String(e).replace(/px/gi, ""), t = Number(r);
1704
+ if (t && !isNaN(t) && Number.isInteger(t) && t > 0)
1698
1705
  return !0;
1699
1706
  }
1700
1707
  return !1;
@@ -1708,31 +1715,31 @@ const _ = "24px", M = (e, t) => {
1708
1715
  }
1709
1716
  },
1710
1717
  setup(e) {
1711
- const t = e, r = g(() => {
1712
- if (typeof t.size == "number" && t.size > 0)
1713
- return `${t.size}px`;
1714
- if (typeof t.size == "string") {
1715
- const n = String(t.size).replace(/px/gi, ""), i = Number(n);
1718
+ const r = e, t = g(() => {
1719
+ if (typeof r.size == "number" && r.size > 0)
1720
+ return `${r.size}px`;
1721
+ if (typeof r.size == "string") {
1722
+ const n = String(r.size).replace(/px/gi, ""), i = Number(n);
1716
1723
  if (i && !isNaN(i) && Number.isInteger(i) && i > 0)
1717
1724
  return `${i}px`;
1718
1725
  }
1719
1726
  return _;
1720
1727
  }), a = g(() => ({
1721
1728
  boxSizing: "border-box",
1722
- color: t.color,
1723
- display: t.display,
1724
- height: r.value,
1729
+ color: r.color,
1730
+ display: r.display,
1731
+ height: t.value,
1725
1732
  lineHeight: "0",
1726
- width: r.value
1733
+ width: t.value
1727
1734
  }));
1728
- return (n, i) => (f(), T(z(e.as), {
1735
+ return (n, i) => (p(), T(q(e.as), {
1729
1736
  "aria-hidden": e.decorative ? "true" : void 0,
1730
1737
  class: "kui-icon warning-icon",
1731
1738
  "data-testid": "kui-icon-wrapper-warning-icon",
1732
1739
  style: V(a.value)
1733
1740
  }, {
1734
1741
  default: A(() => [
1735
- (f(), y("svg", {
1742
+ (p(), m("svg", {
1736
1743
  "aria-hidden": e.decorative ? "true" : void 0,
1737
1744
  "data-testid": "kui-icon-svg-warning-icon",
1738
1745
  fill: "none",
@@ -1742,17 +1749,17 @@ const _ = "24px", M = (e, t) => {
1742
1749
  width: "100%",
1743
1750
  xmlns: "http://www.w3.org/2000/svg"
1744
1751
  }, [
1745
- e.title ? (f(), y("title", At, N(e.title), 1)) : E("", !0),
1752
+ e.title ? (p(), m("title", At, N(e.title), 1)) : E("", !0),
1746
1753
  Vt
1747
1754
  ], 8, qt))
1748
1755
  ]),
1749
1756
  _: 1
1750
1757
  }, 8, ["aria-hidden", "style"]));
1751
1758
  }
1752
- }), Fe = /* @__PURE__ */ M(Lt, [["__scopeId", "data-v-d7b122fd"]]), ge = 2, Ee = ge + 2, Dt = (e, t, r = !1) => {
1753
- let a = !t || Number(e.toFixed(Ee)) === 0 ? 0 : Number(e.toFixed(Ee)) > 0 ? 1 : -1;
1754
- return r && (a *= -1), a;
1755
- }, Mt = (e, t, r) => t ? `${Math.abs(e * 100).toFixed(ge)}%` : r, Ot = (e, t) => t === 0 ? 0 : e / t - 1, Ft = (e, t = !1) => (t && (e *= -1), e > 0 ? ht : e < 0 ? ft : Oe), Ht = "#ad000e", fe = "#6c7489", Te = "#52596e", Bt = "#007d60", J = "16px", $t = "20px", Pt = "14px", Kt = "48px";
1759
+ }), Fe = /* @__PURE__ */ M(Lt, [["__scopeId", "data-v-d7b122fd"]]), ge = 2, Ee = ge + 2, Dt = (e, r, t = !1) => {
1760
+ let a = !r || Number(e.toFixed(Ee)) === 0 ? 0 : Number(e.toFixed(Ee)) > 0 ? 1 : -1;
1761
+ return t && (a *= -1), a;
1762
+ }, Mt = (e, r, t) => r ? `${Math.abs(e * 100).toFixed(ge)}%` : t, Ot = (e, r) => r === 0 ? 0 : e / r - 1, Ft = (e, r = !1) => (r && (e *= -1), e > 0 ? ht : e < 0 ? ft : Oe), Ht = "#ad000e", fe = "#6c7489", Te = "#52596e", Bt = "#007d60", J = "16px", $t = "20px", Pt = "14px", Kt = "48px";
1756
1763
  var F = /* @__PURE__ */ ((e) => (e.GENERIC_COUNT = "GenericCount", e.TRAFFIC = "Traffic", e.ERROR_RATE = "ErrorRate", e.LATENCY = "Latency", e))(F || {});
1757
1764
  const Zt = { class: "metricscard" }, Ut = {
1758
1765
  key: 0,
@@ -1766,7 +1773,7 @@ const Zt = { class: "metricscard" }, Ut = {
1766
1773
  }, Xt = { "data-testid": "metric-trend-change" }, Yt = {
1767
1774
  key: 0,
1768
1775
  class: "metricscard-trend-range"
1769
- }, Qt = /* @__PURE__ */ x({
1776
+ }, Qt = /* @__PURE__ */ k({
1770
1777
  __name: "MetricsCard",
1771
1778
  props: {
1772
1779
  cardType: {
@@ -1829,107 +1836,107 @@ const Zt = { class: "metricscard" }, Ut = {
1829
1836
  }
1830
1837
  },
1831
1838
  setup(e) {
1832
- const t = /* @__PURE__ */ new Map([
1839
+ const r = /* @__PURE__ */ new Map([
1833
1840
  [F.GENERIC_COUNT, Rt],
1834
1841
  [F.TRAFFIC, Mr],
1835
1842
  [F.ERROR_RATE, kt],
1836
1843
  [F.LATENCY, ot]
1837
- ]), r = e, a = (o) => {
1844
+ ]), t = e, a = (o) => {
1838
1845
  const s = {
1839
1846
  red: `var(--kong-ui-metric-card-trend-negative, ${Ht})`,
1840
1847
  green: `var(--kong-ui-metric-card-trend-positive, ${Bt})`,
1841
1848
  grey: `var(--kong-ui-metric-card-trend-neutral, ${Te})`
1842
1849
  };
1843
1850
  return o > 0 ? s.green : o < 0 ? s.red : s.grey;
1844
- }, n = (o) => o > 0 ? "positive" : o < 0 ? "negative" : "neutral", i = [k.Medium, k.Large, k.LargeCompact].includes(r.cardSize), u = r.cardSize === k.ExtraLarge ? Kt : i ? "22px" : Pt, c = g(() => r.cardSize === k.LargeCompact), d = [k.Small, k.LargeCompact].includes(r.cardSize);
1851
+ }, n = (o) => o > 0 ? "positive" : o < 0 ? "negative" : "neutral", i = [z.Medium, z.Large, z.LargeCompact].includes(t.cardSize), u = t.cardSize === z.ExtraLarge ? Kt : i ? "22px" : Pt, f = g(() => t.cardSize === z.LargeCompact), d = [z.Small, z.LargeCompact].includes(t.cardSize);
1845
1852
  return (o, s) => {
1846
1853
  const l = qe("KTooltip");
1847
- return f(), y("div", Zt, [
1854
+ return p(), m("div", Zt, [
1848
1855
  R("div", {
1849
1856
  class: G(["metricscard-title", e.cardSize])
1850
1857
  }, [
1851
- S(d) ? E("", !0) : (f(), T(z(S(t).get(e.cardType)), {
1858
+ w(d) ? E("", !0) : (p(), T(q(w(r).get(e.cardType)), {
1852
1859
  key: 0,
1853
1860
  class: "metricscard-icon",
1854
- color: S(fe),
1855
- size: S(J)
1861
+ color: w(fe),
1862
+ size: w(J)
1856
1863
  }, null, 8, ["color", "size"])),
1857
1864
  R("span", null, N(e.title), 1),
1858
- e.tooltip ? (f(), T(l, {
1865
+ e.tooltip ? (p(), T(l, {
1859
1866
  key: 1,
1860
1867
  class: "metricscard-tooltip",
1861
1868
  placement: "right",
1862
1869
  text: e.tooltip
1863
1870
  }, {
1864
1871
  default: A(() => [
1865
- X(S(et), {
1866
- color: S(fe),
1867
- size: S(J)
1872
+ X(w(et), {
1873
+ color: w(fe),
1874
+ size: w(J)
1868
1875
  }, null, 8, ["color", "size"])
1869
1876
  ]),
1870
1877
  _: 1
1871
1878
  }, 8, ["text"])) : E("", !0)
1872
1879
  ], 2),
1873
- e.description && S(i) && !c.value ? (f(), y("div", Ut, [
1880
+ e.description && w(i) && !f.value ? (p(), m("div", Ut, [
1874
1881
  R("span", null, N(e.description), 1)
1875
1882
  ])) : E("", !0),
1876
1883
  R("div", {
1877
- class: G(["metricscard-valuetrend", { "is-compact": c.value }])
1884
+ class: G(["metricscard-valuetrend", { "is-compact": f.value }])
1878
1885
  }, [
1879
- e.hasError ? (f(), y("div", Gt, [
1880
- X(S(Fe), {
1881
- color: S(fe),
1882
- size: S($t)
1886
+ e.hasError ? (p(), m("div", Gt, [
1887
+ X(w(Fe), {
1888
+ color: w(fe),
1889
+ size: w($t)
1883
1890
  }, null, 8, ["color", "size"]),
1884
1891
  R("div", null, " " + N(e.errorMessage), 1)
1885
- ])) : (f(), y("div", {
1892
+ ])) : (p(), m("div", {
1886
1893
  key: 1,
1887
1894
  class: G(["metricscard-value", e.cardSize]),
1888
1895
  "data-testid": "metric-value",
1889
- style: V(`font-size:${S(u)}`)
1896
+ style: V(`font-size:${w(u)}`)
1890
1897
  }, N(e.metricValue), 7)),
1891
- S(i) ? (f(), y("div", jt, [
1898
+ w(i) ? (p(), m("div", jt, [
1892
1899
  R("div", {
1893
1900
  class: G(["metricscard-trend-change", n(e.changePolarity)]),
1894
1901
  "data-testid": "metric-trend-parent"
1895
1902
  }, [
1896
- e.changePolarity !== 0 ? (f(), T(z(e.trendIcon), {
1903
+ e.changePolarity !== 0 ? (p(), T(q(e.trendIcon), {
1897
1904
  key: 0,
1898
1905
  color: a(e.changePolarity),
1899
- size: S(J)
1900
- }, null, 8, ["color", "size"])) : (f(), T(S(Pr), {
1906
+ size: w(J)
1907
+ }, null, 8, ["color", "size"])) : (p(), T(w(Pr), {
1901
1908
  key: 1,
1902
- color: S(Te),
1903
- size: S(J)
1909
+ color: w(Te),
1910
+ size: w(J)
1904
1911
  }, null, 8, ["color", "size"])),
1905
1912
  R("div", Xt, N(e.metricChange), 1)
1906
1913
  ], 2),
1907
- e.trendRange && e.cardSize !== S(k).LargeCompact ? (f(), y("div", Yt, N(e.trendRange), 1)) : E("", !0)
1914
+ e.trendRange && e.cardSize !== w(z).LargeCompact ? (p(), m("div", Yt, N(e.trendRange), 1)) : E("", !0)
1908
1915
  ])) : E("", !0)
1909
1916
  ], 2)
1910
1917
  ]);
1911
1918
  };
1912
1919
  }
1913
- }), ye = (e, t) => {
1914
- const r = e.__vccOpts || e;
1915
- for (const [a, n] of t)
1916
- r[a] = n;
1917
- return r;
1918
- }, Wt = /* @__PURE__ */ ye(Qt, [["__scopeId", "data-v-975ba293"]]), Jt = {}, ei = { class: "loading-tabs" };
1919
- function ri(e, t) {
1920
- const r = qe("KSkeletonBox");
1921
- return f(), y("div", ei, [
1922
- X(r, { width: "100" }),
1923
- X(r, { width: "75" })
1920
+ }), me = (e, r) => {
1921
+ const t = e.__vccOpts || e;
1922
+ for (const [a, n] of r)
1923
+ t[a] = n;
1924
+ return t;
1925
+ }, Wt = /* @__PURE__ */ me(Qt, [["__scopeId", "data-v-975ba293"]]), Jt = {}, ei = { class: "loading-tabs" };
1926
+ function ri(e, r) {
1927
+ const t = qe("KSkeletonBox");
1928
+ return p(), m("div", ei, [
1929
+ X(t, { width: "100" }),
1930
+ X(t, { width: "75" })
1924
1931
  ]);
1925
1932
  }
1926
- const ti = /* @__PURE__ */ ye(Jt, [["render", ri], ["__scopeId", "data-v-f7eb9c40"]]), ii = {
1933
+ const ti = /* @__PURE__ */ me(Jt, [["render", ri], ["__scopeId", "data-v-f7eb9c40"]]), ii = {
1927
1934
  key: 0,
1928
1935
  class: "error-display"
1929
1936
  }, ni = {
1930
1937
  key: 0,
1931
1938
  class: "error-display-message"
1932
- }, ai = /* @__PURE__ */ x({
1939
+ }, ai = /* @__PURE__ */ k({
1933
1940
  __name: "MetricCardContainer",
1934
1941
  props: {
1935
1942
  fallbackDisplayText: {
@@ -1958,31 +1965,31 @@ const ti = /* @__PURE__ */ ye(Jt, [["render", ri], ["__scopeId", "data-v-f7eb9c4
1958
1965
  cardSize: {
1959
1966
  type: String,
1960
1967
  required: !1,
1961
- default: () => k.Large
1968
+ default: () => z.Large
1962
1969
  }
1963
1970
  },
1964
1971
  setup(e) {
1965
- const t = e, r = g(() => t.cards.every((n) => (n == null ? void 0 : n.hasError) === !0)), a = (n) => {
1966
- const i = Ot(n.currentValue, n.previousValue) || 0, u = Dt(i, t.hasTrendAccess, n.increaseIsBad);
1972
+ const r = e, t = g(() => r.cards.every((n) => (n == null ? void 0 : n.hasError) === !0)), a = (n) => {
1973
+ const i = Ot(n.currentValue, n.previousValue) || 0, u = Dt(i, r.hasTrendAccess, n.increaseIsBad);
1967
1974
  return {
1968
1975
  metricValue: n.formatValueFn ? n.formatValueFn(n.currentValue) : zr(n.currentValue, { capital: !0, round: !0 }) || "0",
1969
- metricChange: n.formatChangeFn ? n.formatChangeFn(i) : Mt(i, t.hasTrendAccess, t.fallbackDisplayText),
1976
+ metricChange: n.formatChangeFn ? n.formatChangeFn(i) : Mt(i, r.hasTrendAccess, r.fallbackDisplayText),
1970
1977
  changePolarity: u,
1971
1978
  trendIcon: Ft(u, n.increaseIsBad),
1972
- cardSize: t.cardSize
1979
+ cardSize: r.cardSize
1973
1980
  };
1974
1981
  };
1975
- return (n, i) => (f(), y("div", {
1982
+ return (n, i) => (p(), m("div", {
1976
1983
  class: G(["kong-ui-public-metric-card-container", e.cardSize])
1977
1984
  }, [
1978
- r.value ? (f(), y("div", ii, [
1979
- X(S(Fe), { class: "error-display-icon" }),
1980
- e.errorMessage ? (f(), y("div", ni, N(e.errorMessage), 1)) : E("", !0)
1981
- ])) : (f(!0), y(we, { key: 1 }, Xe(e.cards, (u, c) => (f(), y(we, null, [
1982
- e.loading ? (f(), T(ti, {
1983
- key: `skeleton-${c}`,
1984
- class: G(e.cardSize === S(k).Small ? "loading-tabs-small" : "loading-tabs-large")
1985
- }, null, 8, ["class"])) : (f(), T(Wt, Ye({ key: c }, a(u), {
1985
+ t.value ? (p(), m("div", ii, [
1986
+ X(w(Fe), { class: "error-display-icon" }),
1987
+ e.errorMessage ? (p(), m("div", ni, N(e.errorMessage), 1)) : E("", !0)
1988
+ ])) : (p(!0), m(we, { key: 1 }, Xe(e.cards, (u, f) => (p(), m(we, null, [
1989
+ e.loading ? (p(), T(ti, {
1990
+ key: `skeleton-${f}`,
1991
+ class: G(e.cardSize === w(z).Small ? "loading-tabs-small" : "loading-tabs-large")
1992
+ }, null, 8, ["class"])) : (p(), T(Wt, Ye({ key: f }, a(u), {
1986
1993
  "card-size": e.cardSize,
1987
1994
  "card-type": u.cardType,
1988
1995
  description: u.description,
@@ -1995,95 +2002,94 @@ const ti = /* @__PURE__ */ ye(Jt, [["render", ri], ["__scopeId", "data-v-f7eb9c4
1995
2002
  ], 64))), 256))
1996
2003
  ], 2));
1997
2004
  }
1998
- }), oi = /* @__PURE__ */ ye(ai, [["__scopeId", "data-v-80b51a84"]]), fi = /* @__PURE__ */ x({
2005
+ }), oi = /* @__PURE__ */ me(ai, [["__scopeId", "data-v-80b51a84"]]), fi = /* @__PURE__ */ k({
1999
2006
  __name: "MetricsConsumer",
2000
2007
  props: {
2001
2008
  lookupKey: { default: void 0 },
2002
- cardSize: { default: k.Large },
2009
+ cardSize: { default: z.Large },
2003
2010
  cardToDisplay: { default: void 0 }
2004
2011
  },
2005
2012
  setup(e) {
2006
- const t = e, r = ke(De);
2007
- if (!r)
2013
+ const r = e, t = ke(De);
2014
+ if (!t)
2008
2015
  throw new Error("MetricsConsumer must be nested inside a MetricsProvider instance.");
2009
- const { traffic: a, latency: n } = r.data, { i18n: i } = K.useI18n(), u = K.useMetricCardBuilder({
2016
+ const { traffic: a, latency: n } = t.data, { i18n: i } = K.useI18n(), u = K.useMetricCardBuilder({
2010
2017
  cardType: F.TRAFFIC,
2011
- title: g(() => r.longCardTitles ? i.t("metricCard.long.traffic") : i.t("metricCard.short.traffic")),
2012
- description: r.description,
2018
+ title: g(() => t.longCardTitles ? i.t("metricCard.long.traffic") : i.t("metricCard.short.traffic")),
2019
+ description: t.description,
2013
2020
  record: a.mapped,
2014
2021
  hasError: a.hasError,
2015
- lookupKey: t.lookupKey,
2022
+ lookupKey: r.lookupKey,
2016
2023
  sumGroupedValues: Q,
2017
- trendRange: r.trendRange
2018
- }), c = (h) => `${h.toFixed(ge)}%`, d = g(() => {
2019
- const h = a.mapped.value, w = j(h, "current", t.lookupKey, _e), q = j(h, "current", t.lookupKey, Q), C = w / q * 100 || 0, m = j(h, "previous", t.lookupKey, _e), H = j(h, "previous", t.lookupKey, Q), I = m / H * 100 || 0;
2024
+ trendRange: a.trendRange
2025
+ }), f = (y) => `${y.toFixed(ge)}%`, d = g(() => {
2026
+ const y = a.mapped.value, h = j(y, "current", r.lookupKey, _e), x = j(y, "current", r.lookupKey, Q), b = h / x * 100 || 0, C = j(y, "previous", r.lookupKey, _e), H = j(y, "previous", r.lookupKey, Q), I = C / H * 100 || 0;
2020
2027
  return {
2021
2028
  cardType: F.ERROR_RATE,
2022
2029
  hasError: a.hasError.value,
2023
- currentValue: C,
2030
+ currentValue: b,
2024
2031
  previousValue: I,
2025
- formatValueFn: c,
2026
- title: r.longCardTitles ? i.t("metricCard.long.errorRate") : i.t("metricCard.short.errorRate"),
2027
- description: r.description,
2032
+ formatValueFn: f,
2033
+ title: t.longCardTitles ? i.t("metricCard.long.errorRate") : i.t("metricCard.short.errorRate"),
2034
+ description: t.description,
2028
2035
  increaseIsBad: !0,
2029
- trendRange: r.trendRange.value
2036
+ trendRange: a.trendRange.value
2030
2037
  };
2031
- }), o = (h) => `${h}ms`, s = K.useMetricCardBuilder({
2038
+ }), o = (y) => `${y}ms`, s = K.useMetricCardBuilder({
2032
2039
  cardType: F.LATENCY,
2033
- title: g(() => r.longCardTitles ? i.t("metricCard.long.latency") : i.t("metricCard.short.latency")),
2034
- description: r.description,
2040
+ title: g(() => t.longCardTitles ? i.t("metricCard.long.latency") : i.t("metricCard.short.latency")),
2041
+ description: t.description,
2035
2042
  hasError: n.hasError,
2036
2043
  record: n.mapped,
2037
- lookupKey: t.lookupKey,
2044
+ lookupKey: r.lookupKey,
2038
2045
  increaseIsBad: !0,
2039
2046
  formatValueFn: o,
2040
- trendRange: r.trendRange
2041
- }), l = g(() => t.cardToDisplay === "TRAFFIC" ? [u.value] : t.cardToDisplay === "ERROR_RATE" ? [d.value] : t.cardToDisplay === "LATENCY" ? [s.value] : [u.value, d.value, s.value]), p = g(() => t.cardToDisplay === "TRAFFIC" || t.cardToDisplay === "ERROR_RATE" ? a.isLoading.value : t.cardToDisplay === "LATENCY" ? n.isLoading.value : a.isLoading.value || n.isLoading.value), v = g(() => ({
2047
+ trendRange: n.trendRange
2048
+ }), l = g(() => r.cardToDisplay === "TRAFFIC" ? [u.value] : r.cardToDisplay === "ERROR_RATE" ? [d.value] : r.cardToDisplay === "LATENCY" ? [s.value] : [u.value, d.value, s.value]), c = g(() => r.cardToDisplay === "TRAFFIC" || r.cardToDisplay === "ERROR_RATE" ? a.isLoading.value : r.cardToDisplay === "LATENCY" ? n.isLoading.value : a.isLoading.value || n.isLoading.value), v = g(() => ({
2042
2049
  cards: l.value,
2043
- loading: p.value,
2044
- hasTrendAccess: r.hasTrendAccess,
2050
+ loading: c.value,
2051
+ hasTrendAccess: t.hasTrendAccess,
2045
2052
  fallbackDisplayText: i.t("general.notAvailable"),
2046
- cardSize: t.cardSize,
2047
- hideTitle: !0,
2048
- trendRange: r.trendRange.value
2049
- })), b = g(() => ({
2053
+ cardSize: r.cardSize,
2054
+ hideTitle: !0
2055
+ })), S = g(() => ({
2050
2056
  loading: v.value.loading,
2051
2057
  trafficCard: u.value,
2052
2058
  errorRateCard: d.value,
2053
2059
  latencyCard: s.value,
2054
- errorRateFormatted: c(d.value.currentValue),
2060
+ errorRateFormatted: f(d.value.currentValue),
2055
2061
  latencyFormatted: o(s.value.currentValue)
2056
2062
  }));
2057
- return (h, w) => ze(h.$slots, "default", { cardValues: b.value }, () => [
2058
- X(S(oi), Qe(We(v.value)), null, 16)
2063
+ return (y, h) => ze(y.$slots, "default", { cardValues: S.value }, () => [
2064
+ X(w(oi), Qe(We(v.value)), null, 16)
2059
2065
  ]);
2060
2066
  }
2061
- }), ee = (e) => new Date(e), pi = (e, t) => {
2062
- const r = e.body;
2067
+ }), ee = (e) => new Date(e), pi = (e, r) => {
2068
+ const t = e.body;
2063
2069
  e.reply({
2064
2070
  statusCode: 200,
2065
- body: si(r, t)
2071
+ body: si(t, r)
2066
2072
  });
2067
- }, xe = (e) => e.reduce((t, r) => (t[r] = { name: r }, t), {}), si = (e, t) => {
2068
- var b, h;
2069
- const r = te.get(re.ONE_DAY), a = e.granularity === "trend" ? new er(r) : new rr(r), n = a.endMs(), i = a.startMs(), u = a.granularityMs(), c = e.granularity === "trend" ? 2 : 1;
2073
+ }, xe = (e) => e.reduce((r, t) => (r[t] = { name: t }, r), {}), si = (e, r) => {
2074
+ var S, y;
2075
+ const t = re.get(te.ONE_DAY), a = e.granularity === "trend" ? new er(t) : new rr(t), n = a.endMs(), i = a.startMs(), u = a.granularityMs(), f = e.granularity === "trend" ? 2 : 1;
2070
2076
  if ((e.dimensions ?? []).length > 2)
2071
2077
  throw new Error(`Explore only supports 0-2 dimensions; got: ${JSON.stringify(e.dimensions)}`);
2072
- const d = (e.dimensions ?? []).find((w) => w !== "time"), o = (t == null ? void 0 : t.dimensionNames) ?? [], s = Math.max(o.length, 1), l = e.metrics || [], p = [];
2073
- for (let w = 0; w < c; w++)
2074
- for (let q = 0; q < s; q++) {
2075
- const C = d ? { [d]: o[q] } : {};
2076
- (b = e.dimensions) != null && b.includes("status_code_grouped") ? Q.forEach((m) => {
2077
- const H = l.reduce((I, $) => (I[$] = (c - w) * 1e3 + 100 * q + 1, I), { ...C, status_code_grouped: m });
2078
- p.push({
2078
+ const d = (e.dimensions ?? []).find((h) => h !== "time"), o = (r == null ? void 0 : r.dimensionNames) ?? [], s = Math.max(o.length, 1), l = e.metrics || [], c = [];
2079
+ for (let h = 0; h < f; h++)
2080
+ for (let x = 0; x < s; x++) {
2081
+ const b = d ? { [d]: o[x] } : {};
2082
+ (S = e.dimensions) != null && S.includes("status_code_grouped") ? Q.forEach((C) => {
2083
+ const H = l.reduce((I, $) => (I[$] = (f - h) * 1e3 + 100 * x + 1, I), { ...b, status_code_grouped: C });
2084
+ c.push({
2079
2085
  version: "v1",
2080
- timestamp: w === 0 ? ee(i).toISOString() : ee(i + u).toISOString(),
2086
+ timestamp: h === 0 ? ee(i).toISOString() : ee(i + u).toISOString(),
2081
2087
  event: H
2082
2088
  });
2083
- }) : p.push({
2089
+ }) : c.push({
2084
2090
  version: "v1",
2085
- timestamp: w === 0 ? ee(i).toISOString() : ee(i + u).toISOString(),
2086
- event: l.reduce((m, H) => (m[H] = (c - w) * 1e3 + 100 * q + 1, m), { ...C })
2091
+ timestamp: h === 0 ? ee(i).toISOString() : ee(i + u).toISOString(),
2092
+ event: l.reduce((C, H) => (C[H] = (f - h) * 1e3 + 100 * x + 1, C), { ...b })
2087
2093
  });
2088
2094
  }
2089
2095
  const v = {
@@ -2092,13 +2098,13 @@ const ti = /* @__PURE__ */ ye(Jt, [["render", ri], ["__scopeId", "data-v-f7eb9c4
2092
2098
  granularity_ms: u,
2093
2099
  display: d ? {
2094
2100
  [d]: xe(o),
2095
- ...(h = e.dimensions) != null && h.includes("status_code_grouped") ? { status_code_grouped: xe(Q) } : {}
2101
+ ...(y = e.dimensions) != null && y.includes("status_code_grouped") ? { status_code_grouped: xe(Q) } : {}
2096
2102
  } : {},
2097
2103
  metric_names: e.metrics,
2098
2104
  query_id: "test"
2099
2105
  };
2100
2106
  return {
2101
- data: p,
2107
+ data: c,
2102
2108
  meta: v
2103
2109
  };
2104
2110
  };