@kong-ui-public/analytics-geo-map 1.1.1 → 1.1.2-pr.2427.fe069a6cf.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,13 +1,13 @@
1
- import { defineComponent as w0, useId as _0, ref as r0, computed as D, onMounted as k0, watch as a0, createElementBlock as E, openBlock as A, createElementVNode as Y, createCommentVNode as o0, unref as M0, toDisplayString as s0, Fragment as L0, renderList as P0, normalizeStyle as V0 } from "vue";
2
- import { Map as B0, Popup as S0 } from "maplibre-gl";
3
- import { createI18n as z0, i18nTComponent as T0 } from "@kong-ui-public/i18n";
4
- const D0 = {
1
+ import { defineComponent as L0, useId as P0, ref as s0, computed as C, onMounted as B0, watch as l0, createElementBlock as A, openBlock as $, createElementVNode as b, createCommentVNode as u0, unref as V0, toDisplayString as c0, Fragment as S0, renderList as z0, normalizeStyle as T0 } from "vue";
2
+ import { Map as D0, Popup as C0 } from "maplibre-gl";
3
+ import { createI18n as N0, i18nTComponent as R0 } from "@kong-ui-public/i18n";
4
+ const O0 = {
5
5
  ms: "ms",
6
6
  bytes: "Byte{plural}",
7
7
  count: "request{plural}",
8
8
  "count/minute": "rpm",
9
9
  requests: "request{plural}"
10
- }, C0 = {
10
+ }, I0 = {
11
11
  request_count: "Request count",
12
12
  request_per_minute: "Requests per minute",
13
13
  response_latency_average: "Response latency (avg)",
@@ -32,53 +32,53 @@ const D0 = {
32
32
  request_size_p95: "Request size (p95)",
33
33
  request_size_p50: "Request size (p50)",
34
34
  request_size_sum: "Request size (sum)"
35
- }, N0 = {
36
- metricUnits: D0,
37
- metrics: C0
35
+ }, U0 = {
36
+ metricUnits: O0,
37
+ metrics: I0
38
38
  };
39
- function R0() {
40
- const e = z0("en-us", N0);
39
+ function E0() {
40
+ const e = N0("en-us", U0);
41
41
  return {
42
42
  i18n: e,
43
- i18nT: T0(e)
43
+ i18nT: R0(e)
44
44
  // Translation component <i18n-t>
45
45
  };
46
46
  }
47
- const O0 = {
48
- useI18n: R0
47
+ const A0 = {
48
+ useI18n: E0
49
49
  };
50
- function h0(e) {
50
+ function y0(e) {
51
51
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
52
52
  }
53
- var p0 = { exports: {} };
53
+ var x0 = { exports: {} };
54
54
  (function(e) {
55
55
  (function() {
56
- function t(s, l) {
57
- if (l.separator === !1 || s < 1e3)
58
- return s.toString();
59
- var u = typeof l.separator == "string" ? l.separator : ",", m = [], y = Math.round(s).toString().split("");
60
- return y.reverse().forEach(function(L, F) {
61
- F && F % 3 === 0 && m.push(u), m.push(L);
56
+ function t(l, s) {
57
+ if (s.separator === !1 || l < 1e3)
58
+ return l.toString();
59
+ var u = typeof s.separator == "string" ? s.separator : ",", m = [], y = Math.round(l).toString().split("");
60
+ return y.reverse().forEach(function(B, V) {
61
+ V && V % 3 === 0 && m.push(u), m.push(B);
62
62
  }), m.reverse().join("");
63
63
  }
64
- function i(s, l, u) {
65
- var m = s / l, y = u.round ? "round" : "floor";
66
- return u.decimal === !1 ? (s = Math[y](m), s.toString()) : (u.precision ? s = m : s = m < 10 ? Math[y](m * 10) / 10 : Math[y](m), s = s.toString(), typeof u.decimal == "string" && (s = s.replace(".", u.decimal)), s);
64
+ function i(l, s, u) {
65
+ var m = l / s, y = u.round ? "round" : "floor";
66
+ return u.decimal === !1 ? (l = Math[y](m), l.toString()) : (u.precision ? l = m : l = m < 10 ? Math[y](m * 10) / 10 : Math[y](m), l = l.toString(), typeof u.decimal == "string" && (l = l.replace(".", u.decimal)), l);
67
67
  }
68
- var r = 1e3, n = 1e4, a = 1e6, o = 1e9, d = 1e12;
69
- function c(s, l) {
68
+ var a = 1e3, r = 1e4, o = 1e6, n = 1e9, c = 1e12;
69
+ function h(l, s) {
70
70
  var u;
71
- l = l || {};
72
- var m = s < 0;
73
- m && (s = Math.abs(s)), l.precision && (s = parseFloat(s.toPrecision(l.precision)));
74
- var y = l.min10k ? n : r;
75
- return s < y || l.precision && l.precision > Math.log10(s) ? u = t(i(s, 1, l), l) : s < a ? u = i(s, r, l) + "k" : s < o ? u = i(s, a, l) + "m" : s < d ? u = t(i(s, o, l), l) + "b" : u = t(i(s, d, l), l) + "t", m && (u = "-" + u), l.capital && (u = u.toUpperCase()), l.prefix && (u = l.prefix + u), l.suffix && (u = u + l.suffix), u;
71
+ s = s || {};
72
+ var m = l < 0;
73
+ m && (l = Math.abs(l)), s.precision && (l = parseFloat(l.toPrecision(s.precision)));
74
+ var y = s.min10k ? r : a;
75
+ return l < y || s.precision && s.precision > Math.log10(l) ? u = t(i(l, 1, s), s) : l < o ? u = i(l, a, s) + "k" : l < n ? u = i(l, o, s) + "m" : l < c ? u = t(i(l, n, s), s) + "b" : u = t(i(l, c, s), s) + "t", m && (u = "-" + u), s.capital && (u = u.toUpperCase()), s.prefix && (u = s.prefix + u), s.suffix && (u = u + s.suffix), u;
76
76
  }
77
- c.addCommas = t, e.exports = c;
77
+ h.addCommas = t, e.exports = h;
78
78
  })();
79
- })(p0);
80
- var I0 = p0.exports;
81
- const $ = /* @__PURE__ */ h0(I0), U0 = "FeatureCollection", E0 = [
79
+ })(x0);
80
+ var $0 = x0.exports;
81
+ const q = /* @__PURE__ */ y0($0), q0 = "FeatureCollection", G0 = [
82
82
  {
83
83
  type: "Feature",
84
84
  properties: {
@@ -2510,11 +2510,11 @@ const $ = /* @__PURE__ */ h0(I0), U0 = "FeatureCollection", E0 = [
2510
2510
  ]
2511
2511
  }
2512
2512
  }
2513
- ], A0 = {
2514
- type: U0,
2515
- features: E0
2513
+ ], H0 = {
2514
+ type: q0,
2515
+ features: G0
2516
2516
  };
2517
- var $0 = G0, J, I, v, W, X, q0 = [
2517
+ var j0 = W0, J, U, F, Z, Q, K0 = [
2518
2518
  "Point",
2519
2519
  "MultiPoint",
2520
2520
  "LineString",
@@ -2523,106 +2523,106 @@ var $0 = G0, J, I, v, W, X, q0 = [
2523
2523
  "MultiPolygon",
2524
2524
  "GeometryCollection"
2525
2525
  ];
2526
- function G0(e) {
2527
- W = 2, X = Math.pow(10, 6), v = null, J = [], I = [];
2528
- var t = e.readFields(H0, {});
2526
+ function W0(e) {
2527
+ Z = 2, Q = Math.pow(10, 6), F = null, J = [], U = [];
2528
+ var t = e.readFields(J0, {});
2529
2529
  return J = null, t;
2530
2530
  }
2531
- function H0(e, t, i) {
2532
- e === 1 ? J.push(i.readString()) : e === 2 ? W = i.readVarint() : e === 3 ? X = Math.pow(10, i.readVarint()) : e === 4 ? j0(i, t) : e === 5 ? m0(i, t) : e === 6 && e0(i, t);
2531
+ function J0(e, t, i) {
2532
+ e === 1 ? J.push(i.readString()) : e === 2 ? Z = i.readVarint() : e === 3 ? Q = Math.pow(10, i.readVarint()) : e === 4 ? Z0(i, t) : e === 5 ? g0(i, t) : e === 6 && t0(i, t);
2533
2533
  }
2534
- function j0(e, t) {
2535
- return t.type = "FeatureCollection", t.features = [], e.readMessage(K0, t);
2534
+ function Z0(e, t) {
2535
+ return t.type = "FeatureCollection", t.features = [], e.readMessage(X0, t);
2536
2536
  }
2537
- function m0(e, t) {
2537
+ function g0(e, t) {
2538
2538
  t.type = "Feature";
2539
- var i = e.readMessage(J0, t);
2539
+ var i = e.readMessage(Q0, t);
2540
2540
  return "geometry" in i || (i.geometry = null), i;
2541
2541
  }
2542
- function e0(e, t) {
2543
- return t.type = "Point", e.readMessage(W0, t);
2542
+ function t0(e, t) {
2543
+ return t.type = "Point", e.readMessage(Y0, t);
2544
2544
  }
2545
- function K0(e, t, i) {
2546
- e === 1 ? t.features.push(m0(i, {})) : e === 13 ? I.push(t0(i)) : e === 15 && Z(i, t);
2545
+ function X0(e, t, i) {
2546
+ e === 1 ? t.features.push(g0(i, {})) : e === 13 ? U.push(i0(i)) : e === 15 && X(i, t);
2547
2547
  }
2548
- function J0(e, t, i) {
2549
- e === 1 ? t.geometry = e0(i, {}) : e === 11 ? t.id = i.readString() : e === 12 ? t.id = i.readSVarint() : e === 13 ? I.push(t0(i)) : e === 14 ? t.properties = Z(i, {}) : e === 15 && Z(i, t);
2548
+ function Q0(e, t, i) {
2549
+ e === 1 ? t.geometry = t0(i, {}) : e === 11 ? t.id = i.readString() : e === 12 ? t.id = i.readSVarint() : e === 13 ? U.push(i0(i)) : e === 14 ? t.properties = X(i, {}) : e === 15 && X(i, t);
2550
2550
  }
2551
- function W0(e, t, i) {
2552
- e === 1 ? t.type = q0[i.readVarint()] : e === 2 ? v = i.readPackedVarint() : e === 3 ? Z0(t, i, t.type) : e === 4 ? (t.geometries = t.geometries || [], t.geometries.push(e0(i, {}))) : e === 13 ? I.push(t0(i)) : e === 15 && Z(i, t);
2551
+ function Y0(e, t, i) {
2552
+ e === 1 ? t.type = K0[i.readVarint()] : e === 2 ? F = i.readPackedVarint() : e === 3 ? b0(t, i, t.type) : e === 4 ? (t.geometries = t.geometries || [], t.geometries.push(t0(i, {}))) : e === 13 ? U.push(i0(i)) : e === 15 && X(i, t);
2553
2553
  }
2554
- function Z0(e, t, i) {
2555
- i === "Point" ? e.coordinates = X0(t) : i === "MultiPoint" || i === "LineString" ? e.coordinates = l0(t) : i === "MultiLineString" ? e.coordinates = u0(t) : i === "Polygon" ? e.coordinates = u0(t, !0) : i === "MultiPolygon" && (e.coordinates = Q0(t));
2554
+ function b0(e, t, i) {
2555
+ i === "Point" ? e.coordinates = e1(t) : i === "MultiPoint" || i === "LineString" ? e.coordinates = d0(t) : i === "MultiLineString" ? e.coordinates = f0(t) : i === "Polygon" ? e.coordinates = f0(t, !0) : i === "MultiPolygon" && (e.coordinates = t1(t));
2556
2556
  }
2557
- function t0(e) {
2557
+ function i0(e) {
2558
2558
  for (var t = e.readVarint() + e.pos, i = null; e.pos < t; ) {
2559
- var r = e.readVarint(), n = r >> 3;
2560
- n === 1 ? i = e.readString() : n === 2 ? i = e.readDouble() : n === 3 ? i = e.readVarint() : n === 4 ? i = -e.readVarint() : n === 5 ? i = e.readBoolean() : n === 6 && (i = JSON.parse(e.readString()));
2559
+ var a = e.readVarint(), r = a >> 3;
2560
+ r === 1 ? i = e.readString() : r === 2 ? i = e.readDouble() : r === 3 ? i = e.readVarint() : r === 4 ? i = -e.readVarint() : r === 5 ? i = e.readBoolean() : r === 6 && (i = JSON.parse(e.readString()));
2561
2561
  }
2562
2562
  return i;
2563
2563
  }
2564
- function Z(e, t) {
2565
- for (var i = e.readVarint() + e.pos; e.pos < i; ) t[J[e.readVarint()]] = I[e.readVarint()];
2566
- return I = [], t;
2564
+ function X(e, t) {
2565
+ for (var i = e.readVarint() + e.pos; e.pos < i; ) t[J[e.readVarint()]] = U[e.readVarint()];
2566
+ return U = [], t;
2567
2567
  }
2568
- function X0(e) {
2569
- for (var t = e.readVarint() + e.pos, i = []; e.pos < t; ) i.push(e.readSVarint() / X);
2568
+ function e1(e) {
2569
+ for (var t = e.readVarint() + e.pos, i = []; e.pos < t; ) i.push(e.readSVarint() / Q);
2570
2570
  return i;
2571
2571
  }
2572
- function q(e, t, i, r) {
2573
- var n = 0, a = [], o, d, c = [];
2574
- for (d = 0; d < W; d++) c[d] = 0;
2575
- for (; i ? n < i : e.pos < t; ) {
2576
- for (o = [], d = 0; d < W; d++)
2577
- c[d] += e.readSVarint(), o[d] = c[d] / X;
2578
- a.push(o), n++;
2572
+ function G(e, t, i, a) {
2573
+ var r = 0, o = [], n, c, h = [];
2574
+ for (c = 0; c < Z; c++) h[c] = 0;
2575
+ for (; i ? r < i : e.pos < t; ) {
2576
+ for (n = [], c = 0; c < Z; c++)
2577
+ h[c] += e.readSVarint(), n[c] = h[c] / Q;
2578
+ o.push(n), r++;
2579
2579
  }
2580
- return r && a.push(a[0]), a;
2580
+ return a && o.push(o[0]), o;
2581
2581
  }
2582
- function l0(e) {
2583
- return q(e, e.readVarint() + e.pos);
2582
+ function d0(e) {
2583
+ return G(e, e.readVarint() + e.pos);
2584
2584
  }
2585
- function u0(e, t) {
2585
+ function f0(e, t) {
2586
2586
  var i = e.readVarint() + e.pos;
2587
- if (!v) return [q(e, i, null, t)];
2588
- for (var r = [], n = 0; n < v.length; n++) r.push(q(e, i, v[n], t));
2589
- return v = null, r;
2587
+ if (!F) return [G(e, i, null, t)];
2588
+ for (var a = [], r = 0; r < F.length; r++) a.push(G(e, i, F[r], t));
2589
+ return F = null, a;
2590
2590
  }
2591
- function Q0(e) {
2591
+ function t1(e) {
2592
2592
  var t = e.readVarint() + e.pos;
2593
- if (!v) return [[q(e, t, null, !0)]];
2594
- for (var i = [], r = 1, n = 0; n < v[0]; n++) {
2595
- for (var a = [], o = 0; o < v[r]; o++) a.push(q(e, t, v[r + 1 + o], !0));
2596
- r += v[r] + 1, i.push(a);
2593
+ if (!F) return [[G(e, t, null, !0)]];
2594
+ for (var i = [], a = 1, r = 0; r < F[0]; r++) {
2595
+ for (var o = [], n = 0; n < F[a]; n++) o.push(G(e, t, F[a + 1 + n], !0));
2596
+ a += F[a] + 1, i.push(o);
2597
2597
  }
2598
- return v = null, i;
2598
+ return F = null, i;
2599
2599
  }
2600
- var Y0 = $0, i0 = {};
2600
+ var i1 = j0, n0 = {};
2601
2601
  /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
2602
- i0.read = function(e, t, i, r, n) {
2603
- var a, o, d = n * 8 - r - 1, c = (1 << d) - 1, s = c >> 1, l = -7, u = i ? n - 1 : 0, m = i ? -1 : 1, y = e[t + u];
2604
- for (u += m, a = y & (1 << -l) - 1, y >>= -l, l += d; l > 0; a = a * 256 + e[t + u], u += m, l -= 8)
2602
+ n0.read = function(e, t, i, a, r) {
2603
+ var o, n, c = r * 8 - a - 1, h = (1 << c) - 1, l = h >> 1, s = -7, u = i ? r - 1 : 0, m = i ? -1 : 1, y = e[t + u];
2604
+ for (u += m, o = y & (1 << -s) - 1, y >>= -s, s += c; s > 0; o = o * 256 + e[t + u], u += m, s -= 8)
2605
2605
  ;
2606
- for (o = a & (1 << -l) - 1, a >>= -l, l += r; l > 0; o = o * 256 + e[t + u], u += m, l -= 8)
2606
+ for (n = o & (1 << -s) - 1, o >>= -s, s += a; s > 0; n = n * 256 + e[t + u], u += m, s -= 8)
2607
2607
  ;
2608
- if (a === 0)
2609
- a = 1 - s;
2608
+ if (o === 0)
2609
+ o = 1 - l;
2610
2610
  else {
2611
- if (a === c)
2612
- return o ? NaN : (y ? -1 : 1) * (1 / 0);
2613
- o = o + Math.pow(2, r), a = a - s;
2611
+ if (o === h)
2612
+ return n ? NaN : (y ? -1 : 1) * (1 / 0);
2613
+ n = n + Math.pow(2, a), o = o - l;
2614
2614
  }
2615
- return (y ? -1 : 1) * o * Math.pow(2, a - r);
2615
+ return (y ? -1 : 1) * n * Math.pow(2, o - a);
2616
2616
  };
2617
- i0.write = function(e, t, i, r, n, a) {
2618
- var o, d, c, s = a * 8 - n - 1, l = (1 << s) - 1, u = l >> 1, m = n === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, y = r ? 0 : a - 1, L = r ? 1 : -1, F = t < 0 || t === 0 && 1 / t < 0 ? 1 : 0;
2619
- for (t = Math.abs(t), isNaN(t) || t === 1 / 0 ? (d = isNaN(t) ? 1 : 0, o = l) : (o = Math.floor(Math.log(t) / Math.LN2), t * (c = Math.pow(2, -o)) < 1 && (o--, c *= 2), o + u >= 1 ? t += m / c : t += m * Math.pow(2, 1 - u), t * c >= 2 && (o++, c /= 2), o + u >= l ? (d = 0, o = l) : o + u >= 1 ? (d = (t * c - 1) * Math.pow(2, n), o = o + u) : (d = t * Math.pow(2, u - 1) * Math.pow(2, n), o = 0)); n >= 8; e[i + y] = d & 255, y += L, d /= 256, n -= 8)
2617
+ n0.write = function(e, t, i, a, r, o) {
2618
+ var n, c, h, l = o * 8 - r - 1, s = (1 << l) - 1, u = s >> 1, m = r === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, y = a ? 0 : o - 1, B = a ? 1 : -1, V = t < 0 || t === 0 && 1 / t < 0 ? 1 : 0;
2619
+ for (t = Math.abs(t), isNaN(t) || t === 1 / 0 ? (c = isNaN(t) ? 1 : 0, n = s) : (n = Math.floor(Math.log(t) / Math.LN2), t * (h = Math.pow(2, -n)) < 1 && (n--, h *= 2), n + u >= 1 ? t += m / h : t += m * Math.pow(2, 1 - u), t * h >= 2 && (n++, h /= 2), n + u >= s ? (c = 0, n = s) : n + u >= 1 ? (c = (t * h - 1) * Math.pow(2, r), n = n + u) : (c = t * Math.pow(2, u - 1) * Math.pow(2, r), n = 0)); r >= 8; e[i + y] = c & 255, y += B, c /= 256, r -= 8)
2620
2620
  ;
2621
- for (o = o << n | d, s += n; s > 0; e[i + y] = o & 255, y += L, o /= 256, s -= 8)
2621
+ for (n = n << r | c, l += r; l > 0; e[i + y] = n & 255, y += B, n /= 256, l -= 8)
2622
2622
  ;
2623
- e[i + y - L] |= F * 128;
2623
+ e[i + y - B] |= V * 128;
2624
2624
  };
2625
- var b0 = f, j = i0;
2625
+ var n1 = f, K = n0;
2626
2626
  function f(e) {
2627
2627
  this.buf = ArrayBuffer.isView && ArrayBuffer.isView(e) ? e : new Uint8Array(e || 0), this.pos = 0, this.type = 0, this.length = this.buf.length;
2628
2628
  }
@@ -2630,7 +2630,7 @@ f.Varint = 0;
2630
2630
  f.Fixed64 = 1;
2631
2631
  f.Bytes = 2;
2632
2632
  f.Fixed32 = 5;
2633
- var b = 65536 * 65536, c0 = 1 / b, e1 = 12, y0 = typeof TextDecoder > "u" ? null : new TextDecoder("utf-8");
2633
+ var e0 = 65536 * 65536, h0 = 1 / e0, r1 = 12, F0 = typeof TextDecoder > "u" ? null : new TextDecoder("utf-8");
2634
2634
  f.prototype = {
2635
2635
  destroy: function() {
2636
2636
  this.buf = null;
@@ -2638,8 +2638,8 @@ f.prototype = {
2638
2638
  // === READING =================================================================
2639
2639
  readFields: function(e, t, i) {
2640
2640
  for (i = i || this.length; this.pos < i; ) {
2641
- var r = this.readVarint(), n = r >> 3, a = this.pos;
2642
- this.type = r & 7, e(n, t, this), this.pos === a && this.skip(r);
2641
+ var a = this.readVarint(), r = a >> 3, o = this.pos;
2642
+ this.type = a & 7, e(r, t, this), this.pos === o && this.skip(a);
2643
2643
  }
2644
2644
  return t;
2645
2645
  },
@@ -2647,33 +2647,33 @@ f.prototype = {
2647
2647
  return this.readFields(e, t, this.readVarint() + this.pos);
2648
2648
  },
2649
2649
  readFixed32: function() {
2650
- var e = K(this.buf, this.pos);
2650
+ var e = W(this.buf, this.pos);
2651
2651
  return this.pos += 4, e;
2652
2652
  },
2653
2653
  readSFixed32: function() {
2654
- var e = f0(this.buf, this.pos);
2654
+ var e = m0(this.buf, this.pos);
2655
2655
  return this.pos += 4, e;
2656
2656
  },
2657
2657
  // 64-bit int handling is based on github.com/dpw/node-buffer-more-ints (MIT-licensed)
2658
2658
  readFixed64: function() {
2659
- var e = K(this.buf, this.pos) + K(this.buf, this.pos + 4) * b;
2659
+ var e = W(this.buf, this.pos) + W(this.buf, this.pos + 4) * e0;
2660
2660
  return this.pos += 8, e;
2661
2661
  },
2662
2662
  readSFixed64: function() {
2663
- var e = K(this.buf, this.pos) + f0(this.buf, this.pos + 4) * b;
2663
+ var e = W(this.buf, this.pos) + m0(this.buf, this.pos + 4) * e0;
2664
2664
  return this.pos += 8, e;
2665
2665
  },
2666
2666
  readFloat: function() {
2667
- var e = j.read(this.buf, this.pos, !0, 23, 4);
2667
+ var e = K.read(this.buf, this.pos, !0, 23, 4);
2668
2668
  return this.pos += 4, e;
2669
2669
  },
2670
2670
  readDouble: function() {
2671
- var e = j.read(this.buf, this.pos, !0, 52, 8);
2671
+ var e = K.read(this.buf, this.pos, !0, 52, 8);
2672
2672
  return this.pos += 8, e;
2673
2673
  },
2674
2674
  readVarint: function(e) {
2675
- var t = this.buf, i, r;
2676
- return r = t[this.pos++], i = r & 127, r < 128 || (r = t[this.pos++], i |= (r & 127) << 7, r < 128) || (r = t[this.pos++], i |= (r & 127) << 14, r < 128) || (r = t[this.pos++], i |= (r & 127) << 21, r < 128) ? i : (r = t[this.pos], i |= (r & 15) << 28, t1(i, e, this));
2675
+ var t = this.buf, i, a;
2676
+ return a = t[this.pos++], i = a & 127, a < 128 || (a = t[this.pos++], i |= (a & 127) << 7, a < 128) || (a = t[this.pos++], i |= (a & 127) << 14, a < 128) || (a = t[this.pos++], i |= (a & 127) << 21, a < 128) ? i : (a = t[this.pos], i |= (a & 15) << 28, a1(i, e, this));
2677
2677
  },
2678
2678
  readVarint64: function() {
2679
2679
  return this.readVarint(!0);
@@ -2687,7 +2687,7 @@ f.prototype = {
2687
2687
  },
2688
2688
  readString: function() {
2689
2689
  var e = this.readVarint() + this.pos, t = this.pos;
2690
- return this.pos = e, e - t >= e1 && y0 ? m1(this.buf, t, e) : p1(this.buf, t, e);
2690
+ return this.pos = e, e - t >= r1 && F0 ? F1(this.buf, t, e) : g1(this.buf, t, e);
2691
2691
  },
2692
2692
  readBytes: function() {
2693
2693
  var e = this.readVarint() + this.pos, t = this.buf.subarray(this.pos, e);
@@ -2696,55 +2696,55 @@ f.prototype = {
2696
2696
  // verbose for performance reasons; doesn't affect gzipped size
2697
2697
  readPackedVarint: function(e, t) {
2698
2698
  if (this.type !== f.Bytes) return e.push(this.readVarint(t));
2699
- var i = M(this);
2699
+ var i = k(this);
2700
2700
  for (e = e || []; this.pos < i; ) e.push(this.readVarint(t));
2701
2701
  return e;
2702
2702
  },
2703
2703
  readPackedSVarint: function(e) {
2704
2704
  if (this.type !== f.Bytes) return e.push(this.readSVarint());
2705
- var t = M(this);
2705
+ var t = k(this);
2706
2706
  for (e = e || []; this.pos < t; ) e.push(this.readSVarint());
2707
2707
  return e;
2708
2708
  },
2709
2709
  readPackedBoolean: function(e) {
2710
2710
  if (this.type !== f.Bytes) return e.push(this.readBoolean());
2711
- var t = M(this);
2711
+ var t = k(this);
2712
2712
  for (e = e || []; this.pos < t; ) e.push(this.readBoolean());
2713
2713
  return e;
2714
2714
  },
2715
2715
  readPackedFloat: function(e) {
2716
2716
  if (this.type !== f.Bytes) return e.push(this.readFloat());
2717
- var t = M(this);
2717
+ var t = k(this);
2718
2718
  for (e = e || []; this.pos < t; ) e.push(this.readFloat());
2719
2719
  return e;
2720
2720
  },
2721
2721
  readPackedDouble: function(e) {
2722
2722
  if (this.type !== f.Bytes) return e.push(this.readDouble());
2723
- var t = M(this);
2723
+ var t = k(this);
2724
2724
  for (e = e || []; this.pos < t; ) e.push(this.readDouble());
2725
2725
  return e;
2726
2726
  },
2727
2727
  readPackedFixed32: function(e) {
2728
2728
  if (this.type !== f.Bytes) return e.push(this.readFixed32());
2729
- var t = M(this);
2729
+ var t = k(this);
2730
2730
  for (e = e || []; this.pos < t; ) e.push(this.readFixed32());
2731
2731
  return e;
2732
2732
  },
2733
2733
  readPackedSFixed32: function(e) {
2734
2734
  if (this.type !== f.Bytes) return e.push(this.readSFixed32());
2735
- var t = M(this);
2735
+ var t = k(this);
2736
2736
  for (e = e || []; this.pos < t; ) e.push(this.readSFixed32());
2737
2737
  return e;
2738
2738
  },
2739
2739
  readPackedFixed64: function(e) {
2740
2740
  if (this.type !== f.Bytes) return e.push(this.readFixed64());
2741
- var t = M(this);
2741
+ var t = k(this);
2742
2742
  for (e = e || []; this.pos < t; ) e.push(this.readFixed64());
2743
2743
  return e;
2744
2744
  },
2745
2745
  readPackedSFixed64: function(e) {
2746
2746
  if (this.type !== f.Bytes) return e.push(this.readSFixed64());
2747
- var t = M(this);
2747
+ var t = k(this);
2748
2748
  for (e = e || []; this.pos < t; ) e.push(this.readSFixed64());
2749
2749
  return e;
2750
2750
  },
@@ -2772,20 +2772,20 @@ f.prototype = {
2772
2772
  return this.length = this.pos, this.pos = 0, this.buf.subarray(0, this.length);
2773
2773
  },
2774
2774
  writeFixed32: function(e) {
2775
- this.realloc(4), O(this.buf, e, this.pos), this.pos += 4;
2775
+ this.realloc(4), I(this.buf, e, this.pos), this.pos += 4;
2776
2776
  },
2777
2777
  writeSFixed32: function(e) {
2778
- this.realloc(4), O(this.buf, e, this.pos), this.pos += 4;
2778
+ this.realloc(4), I(this.buf, e, this.pos), this.pos += 4;
2779
2779
  },
2780
2780
  writeFixed64: function(e) {
2781
- this.realloc(8), O(this.buf, e & -1, this.pos), O(this.buf, Math.floor(e * c0), this.pos + 4), this.pos += 8;
2781
+ this.realloc(8), I(this.buf, e & -1, this.pos), I(this.buf, Math.floor(e * h0), this.pos + 4), this.pos += 8;
2782
2782
  },
2783
2783
  writeSFixed64: function(e) {
2784
- this.realloc(8), O(this.buf, e & -1, this.pos), O(this.buf, Math.floor(e * c0), this.pos + 4), this.pos += 8;
2784
+ this.realloc(8), I(this.buf, e & -1, this.pos), I(this.buf, Math.floor(e * h0), this.pos + 4), this.pos += 8;
2785
2785
  },
2786
2786
  writeVarint: function(e) {
2787
2787
  if (e = +e || 0, e > 268435455 || e < 0) {
2788
- i1(e, this);
2788
+ o1(e, this);
2789
2789
  return;
2790
2790
  }
2791
2791
  this.realloc(4), this.buf[this.pos++] = e & 127 | (e > 127 ? 128 : 0), !(e <= 127) && (this.buf[this.pos++] = (e >>>= 7) & 127 | (e > 127 ? 128 : 0), !(e <= 127) && (this.buf[this.pos++] = (e >>>= 7) & 127 | (e > 127 ? 128 : 0), !(e <= 127) && (this.buf[this.pos++] = e >>> 7 & 127)));
@@ -2799,15 +2799,15 @@ f.prototype = {
2799
2799
  writeString: function(e) {
2800
2800
  e = String(e), this.realloc(e.length * 4), this.pos++;
2801
2801
  var t = this.pos;
2802
- this.pos = y1(this.buf, e, this.pos);
2802
+ this.pos = v1(this.buf, e, this.pos);
2803
2803
  var i = this.pos - t;
2804
- i >= 128 && d0(t, i, this), this.pos = t - 1, this.writeVarint(i), this.pos += i;
2804
+ i >= 128 && p0(t, i, this), this.pos = t - 1, this.writeVarint(i), this.pos += i;
2805
2805
  },
2806
2806
  writeFloat: function(e) {
2807
- this.realloc(4), j.write(this.buf, e, this.pos, !0, 23, 4), this.pos += 4;
2807
+ this.realloc(4), K.write(this.buf, e, this.pos, !0, 23, 4), this.pos += 4;
2808
2808
  },
2809
2809
  writeDouble: function(e) {
2810
- this.realloc(8), j.write(this.buf, e, this.pos, !0, 52, 8), this.pos += 8;
2810
+ this.realloc(8), K.write(this.buf, e, this.pos, !0, 52, 8), this.pos += 8;
2811
2811
  },
2812
2812
  writeBytes: function(e) {
2813
2813
  var t = e.length;
@@ -2818,38 +2818,38 @@ f.prototype = {
2818
2818
  this.pos++;
2819
2819
  var i = this.pos;
2820
2820
  e(t, this);
2821
- var r = this.pos - i;
2822
- r >= 128 && d0(i, r, this), this.pos = i - 1, this.writeVarint(r), this.pos += r;
2821
+ var a = this.pos - i;
2822
+ a >= 128 && p0(i, a, this), this.pos = i - 1, this.writeVarint(a), this.pos += a;
2823
2823
  },
2824
2824
  writeMessage: function(e, t, i) {
2825
2825
  this.writeTag(e, f.Bytes), this.writeRawMessage(t, i);
2826
2826
  },
2827
2827
  writePackedVarint: function(e, t) {
2828
- t.length && this.writeMessage(e, a1, t);
2828
+ t.length && this.writeMessage(e, u1, t);
2829
2829
  },
2830
2830
  writePackedSVarint: function(e, t) {
2831
- t.length && this.writeMessage(e, o1, t);
2831
+ t.length && this.writeMessage(e, c1, t);
2832
2832
  },
2833
2833
  writePackedBoolean: function(e, t) {
2834
- t.length && this.writeMessage(e, u1, t);
2834
+ t.length && this.writeMessage(e, h1, t);
2835
2835
  },
2836
2836
  writePackedFloat: function(e, t) {
2837
- t.length && this.writeMessage(e, s1, t);
2837
+ t.length && this.writeMessage(e, d1, t);
2838
2838
  },
2839
2839
  writePackedDouble: function(e, t) {
2840
- t.length && this.writeMessage(e, l1, t);
2840
+ t.length && this.writeMessage(e, f1, t);
2841
2841
  },
2842
2842
  writePackedFixed32: function(e, t) {
2843
- t.length && this.writeMessage(e, c1, t);
2843
+ t.length && this.writeMessage(e, p1, t);
2844
2844
  },
2845
2845
  writePackedSFixed32: function(e, t) {
2846
- t.length && this.writeMessage(e, d1, t);
2846
+ t.length && this.writeMessage(e, m1, t);
2847
2847
  },
2848
2848
  writePackedFixed64: function(e, t) {
2849
- t.length && this.writeMessage(e, f1, t);
2849
+ t.length && this.writeMessage(e, y1, t);
2850
2850
  },
2851
2851
  writePackedSFixed64: function(e, t) {
2852
- t.length && this.writeMessage(e, h1, t);
2852
+ t.length && this.writeMessage(e, x1, t);
2853
2853
  },
2854
2854
  writeBytesField: function(e, t) {
2855
2855
  this.writeTag(e, f.Bytes), this.writeBytes(t);
@@ -2885,108 +2885,126 @@ f.prototype = {
2885
2885
  this.writeVarintField(e, !!t);
2886
2886
  }
2887
2887
  };
2888
- function t1(e, t, i) {
2889
- var r = i.buf, n, a;
2890
- if (a = r[i.pos++], n = (a & 112) >> 4, a < 128 || (a = r[i.pos++], n |= (a & 127) << 3, a < 128) || (a = r[i.pos++], n |= (a & 127) << 10, a < 128) || (a = r[i.pos++], n |= (a & 127) << 17, a < 128) || (a = r[i.pos++], n |= (a & 127) << 24, a < 128) || (a = r[i.pos++], n |= (a & 1) << 31, a < 128)) return R(e, n, t);
2888
+ function a1(e, t, i) {
2889
+ var a = i.buf, r, o;
2890
+ if (o = a[i.pos++], r = (o & 112) >> 4, o < 128 || (o = a[i.pos++], r |= (o & 127) << 3, o < 128) || (o = a[i.pos++], r |= (o & 127) << 10, o < 128) || (o = a[i.pos++], r |= (o & 127) << 17, o < 128) || (o = a[i.pos++], r |= (o & 127) << 24, o < 128) || (o = a[i.pos++], r |= (o & 1) << 31, o < 128)) return O(e, r, t);
2891
2891
  throw new Error("Expected varint not more than 10 bytes");
2892
2892
  }
2893
- function M(e) {
2893
+ function k(e) {
2894
2894
  return e.type === f.Bytes ? e.readVarint() + e.pos : e.pos + 1;
2895
2895
  }
2896
- function R(e, t, i) {
2896
+ function O(e, t, i) {
2897
2897
  return i ? t * 4294967296 + (e >>> 0) : (t >>> 0) * 4294967296 + (e >>> 0);
2898
2898
  }
2899
- function i1(e, t) {
2900
- var i, r;
2901
- if (e >= 0 ? (i = e % 4294967296 | 0, r = e / 4294967296 | 0) : (i = ~(-e % 4294967296), r = ~(-e / 4294967296), i ^ 4294967295 ? i = i + 1 | 0 : (i = 0, r = r + 1 | 0)), e >= 18446744073709552e3 || e < -18446744073709552e3)
2899
+ function o1(e, t) {
2900
+ var i, a;
2901
+ if (e >= 0 ? (i = e % 4294967296 | 0, a = e / 4294967296 | 0) : (i = ~(-e % 4294967296), a = ~(-e / 4294967296), i ^ 4294967295 ? i = i + 1 | 0 : (i = 0, a = a + 1 | 0)), e >= 18446744073709552e3 || e < -18446744073709552e3)
2902
2902
  throw new Error("Given varint doesn't fit into 10 bytes");
2903
- t.realloc(10), n1(i, r, t), r1(r, t);
2903
+ t.realloc(10), s1(i, a, t), l1(a, t);
2904
2904
  }
2905
- function n1(e, t, i) {
2905
+ function s1(e, t, i) {
2906
2906
  i.buf[i.pos++] = e & 127 | 128, e >>>= 7, i.buf[i.pos++] = e & 127 | 128, e >>>= 7, i.buf[i.pos++] = e & 127 | 128, e >>>= 7, i.buf[i.pos++] = e & 127 | 128, e >>>= 7, i.buf[i.pos] = e & 127;
2907
2907
  }
2908
- function r1(e, t) {
2908
+ function l1(e, t) {
2909
2909
  var i = (e & 7) << 4;
2910
2910
  t.buf[t.pos++] |= i | ((e >>>= 3) ? 128 : 0), e && (t.buf[t.pos++] = e & 127 | ((e >>>= 7) ? 128 : 0), e && (t.buf[t.pos++] = e & 127 | ((e >>>= 7) ? 128 : 0), e && (t.buf[t.pos++] = e & 127 | ((e >>>= 7) ? 128 : 0), e && (t.buf[t.pos++] = e & 127 | ((e >>>= 7) ? 128 : 0), e && (t.buf[t.pos++] = e & 127)))));
2911
2911
  }
2912
- function d0(e, t, i) {
2913
- var r = t <= 16383 ? 1 : t <= 2097151 ? 2 : t <= 268435455 ? 3 : Math.floor(Math.log(t) / (Math.LN2 * 7));
2914
- i.realloc(r);
2915
- for (var n = i.pos - 1; n >= e; n--) i.buf[n + r] = i.buf[n];
2912
+ function p0(e, t, i) {
2913
+ var a = t <= 16383 ? 1 : t <= 2097151 ? 2 : t <= 268435455 ? 3 : Math.floor(Math.log(t) / (Math.LN2 * 7));
2914
+ i.realloc(a);
2915
+ for (var r = i.pos - 1; r >= e; r--) i.buf[r + a] = i.buf[r];
2916
2916
  }
2917
- function a1(e, t) {
2917
+ function u1(e, t) {
2918
2918
  for (var i = 0; i < e.length; i++) t.writeVarint(e[i]);
2919
2919
  }
2920
- function o1(e, t) {
2920
+ function c1(e, t) {
2921
2921
  for (var i = 0; i < e.length; i++) t.writeSVarint(e[i]);
2922
2922
  }
2923
- function s1(e, t) {
2923
+ function d1(e, t) {
2924
2924
  for (var i = 0; i < e.length; i++) t.writeFloat(e[i]);
2925
2925
  }
2926
- function l1(e, t) {
2926
+ function f1(e, t) {
2927
2927
  for (var i = 0; i < e.length; i++) t.writeDouble(e[i]);
2928
2928
  }
2929
- function u1(e, t) {
2929
+ function h1(e, t) {
2930
2930
  for (var i = 0; i < e.length; i++) t.writeBoolean(e[i]);
2931
2931
  }
2932
- function c1(e, t) {
2932
+ function p1(e, t) {
2933
2933
  for (var i = 0; i < e.length; i++) t.writeFixed32(e[i]);
2934
2934
  }
2935
- function d1(e, t) {
2935
+ function m1(e, t) {
2936
2936
  for (var i = 0; i < e.length; i++) t.writeSFixed32(e[i]);
2937
2937
  }
2938
- function f1(e, t) {
2938
+ function y1(e, t) {
2939
2939
  for (var i = 0; i < e.length; i++) t.writeFixed64(e[i]);
2940
2940
  }
2941
- function h1(e, t) {
2941
+ function x1(e, t) {
2942
2942
  for (var i = 0; i < e.length; i++) t.writeSFixed64(e[i]);
2943
2943
  }
2944
- function K(e, t) {
2944
+ function W(e, t) {
2945
2945
  return (e[t] | e[t + 1] << 8 | e[t + 2] << 16) + e[t + 3] * 16777216;
2946
2946
  }
2947
- function O(e, t, i) {
2947
+ function I(e, t, i) {
2948
2948
  e[i] = t, e[i + 1] = t >>> 8, e[i + 2] = t >>> 16, e[i + 3] = t >>> 24;
2949
2949
  }
2950
- function f0(e, t) {
2950
+ function m0(e, t) {
2951
2951
  return (e[t] | e[t + 1] << 8 | e[t + 2] << 16) + (e[t + 3] << 24);
2952
2952
  }
2953
- function p1(e, t, i) {
2954
- for (var r = "", n = t; n < i; ) {
2955
- var a = e[n], o = null, d = a > 239 ? 4 : a > 223 ? 3 : a > 191 ? 2 : 1;
2956
- if (n + d > i) break;
2957
- var c, s, l;
2958
- d === 1 ? a < 128 && (o = a) : d === 2 ? (c = e[n + 1], (c & 192) === 128 && (o = (a & 31) << 6 | c & 63, o <= 127 && (o = null))) : d === 3 ? (c = e[n + 1], s = e[n + 2], (c & 192) === 128 && (s & 192) === 128 && (o = (a & 15) << 12 | (c & 63) << 6 | s & 63, (o <= 2047 || o >= 55296 && o <= 57343) && (o = null))) : d === 4 && (c = e[n + 1], s = e[n + 2], l = e[n + 3], (c & 192) === 128 && (s & 192) === 128 && (l & 192) === 128 && (o = (a & 15) << 18 | (c & 63) << 12 | (s & 63) << 6 | l & 63, (o <= 65535 || o >= 1114112) && (o = null))), o === null ? (o = 65533, d = 1) : o > 65535 && (o -= 65536, r += String.fromCharCode(o >>> 10 & 1023 | 55296), o = 56320 | o & 1023), r += String.fromCharCode(o), n += d;
2953
+ function g1(e, t, i) {
2954
+ for (var a = "", r = t; r < i; ) {
2955
+ var o = e[r], n = null, c = o > 239 ? 4 : o > 223 ? 3 : o > 191 ? 2 : 1;
2956
+ if (r + c > i) break;
2957
+ var h, l, s;
2958
+ c === 1 ? o < 128 && (n = o) : c === 2 ? (h = e[r + 1], (h & 192) === 128 && (n = (o & 31) << 6 | h & 63, n <= 127 && (n = null))) : c === 3 ? (h = e[r + 1], l = e[r + 2], (h & 192) === 128 && (l & 192) === 128 && (n = (o & 15) << 12 | (h & 63) << 6 | l & 63, (n <= 2047 || n >= 55296 && n <= 57343) && (n = null))) : c === 4 && (h = e[r + 1], l = e[r + 2], s = e[r + 3], (h & 192) === 128 && (l & 192) === 128 && (s & 192) === 128 && (n = (o & 15) << 18 | (h & 63) << 12 | (l & 63) << 6 | s & 63, (n <= 65535 || n >= 1114112) && (n = null))), n === null ? (n = 65533, c = 1) : n > 65535 && (n -= 65536, a += String.fromCharCode(n >>> 10 & 1023 | 55296), n = 56320 | n & 1023), a += String.fromCharCode(n), r += c;
2959
2959
  }
2960
- return r;
2960
+ return a;
2961
2961
  }
2962
- function m1(e, t, i) {
2963
- return y0.decode(e.subarray(t, i));
2962
+ function F1(e, t, i) {
2963
+ return F0.decode(e.subarray(t, i));
2964
2964
  }
2965
- function y1(e, t, i) {
2966
- for (var r = 0, n, a; r < t.length; r++) {
2967
- if (n = t.charCodeAt(r), n > 55295 && n < 57344)
2968
- if (a)
2969
- if (n < 56320) {
2970
- e[i++] = 239, e[i++] = 191, e[i++] = 189, a = n;
2965
+ function v1(e, t, i) {
2966
+ for (var a = 0, r, o; a < t.length; a++) {
2967
+ if (r = t.charCodeAt(a), r > 55295 && r < 57344)
2968
+ if (o)
2969
+ if (r < 56320) {
2970
+ e[i++] = 239, e[i++] = 191, e[i++] = 189, o = r;
2971
2971
  continue;
2972
2972
  } else
2973
- n = a - 55296 << 10 | n - 56320 | 65536, a = null;
2973
+ r = o - 55296 << 10 | r - 56320 | 65536, o = null;
2974
2974
  else {
2975
- n > 56319 || r + 1 === t.length ? (e[i++] = 239, e[i++] = 191, e[i++] = 189) : a = n;
2975
+ r > 56319 || a + 1 === t.length ? (e[i++] = 239, e[i++] = 191, e[i++] = 189) : o = r;
2976
2976
  continue;
2977
2977
  }
2978
- else a && (e[i++] = 239, e[i++] = 191, e[i++] = 189, a = null);
2979
- n < 128 ? e[i++] = n : (n < 2048 ? e[i++] = n >> 6 | 192 : (n < 65536 ? e[i++] = n >> 12 | 224 : (e[i++] = n >> 18 | 240, e[i++] = n >> 12 & 63 | 128), e[i++] = n >> 6 & 63 | 128), e[i++] = n & 63 | 128);
2978
+ else o && (e[i++] = 239, e[i++] = 191, e[i++] = 189, o = null);
2979
+ r < 128 ? e[i++] = r : (r < 2048 ? e[i++] = r >> 6 | 192 : (r < 65536 ? e[i++] = r >> 12 | 224 : (e[i++] = r >> 18 | 240, e[i++] = r >> 12 & 63 | 128), e[i++] = r >> 6 & 63 | 128), e[i++] = r & 63 | 128);
2980
2980
  }
2981
2981
  return i;
2982
2982
  }
2983
- const x1 = /* @__PURE__ */ h0(b0), g1 = { class: "kong-ui-public-analytics-geo-map" }, F1 = ["id"], v1 = {
2983
+ const w1 = /* @__PURE__ */ y0(n1), N1 = (e) => {
2984
+ var a, r;
2985
+ if (!e || !e.data)
2986
+ return {};
2987
+ const t = {}, i = e.data;
2988
+ if (i)
2989
+ for (const o of i) {
2990
+ const n = (a = o == null ? void 0 : o.event) == null ? void 0 : a.iso_code, c = (r = e.meta.metric_names) == null ? void 0 : r[0];
2991
+ n && (t[n] = c ? o.event[c] : 0);
2992
+ }
2993
+ return t;
2994
+ };
2995
+ function _1(e, t = 0) {
2996
+ let i = null;
2997
+ return (...a) => {
2998
+ i && clearTimeout(i), i = setTimeout(() => e(...a), t);
2999
+ };
3000
+ }
3001
+ const k1 = { class: "kong-ui-public-analytics-geo-map" }, M1 = ["id"], L1 = {
2984
3002
  key: 0,
2985
3003
  class: "legend"
2986
- }, w1 = {
3004
+ }, P1 = {
2987
3005
  key: 0,
2988
3006
  class: "legend-title"
2989
- }, _1 = { class: "legend-text" }, k1 = /* @__PURE__ */ w0({
3007
+ }, B1 = { class: "legend-text" }, V1 = /* @__PURE__ */ L0({
2990
3008
  __name: "AnalyticsGeoMap",
2991
3009
  props: {
2992
3010
  countryMetrics: {},
@@ -2999,8 +3017,9 @@ const x1 = /* @__PURE__ */ h0(b0), g1 = { class: "kong-ui-public-analytics-geo-m
2999
3017
  bounds: { default: () => {
3000
3018
  } }
3001
3019
  },
3002
- setup(e) {
3003
- const t = import("./countries-simple-geo-BFUDnSiE.js").then((h) => h.default), { i18n: i } = O0.useI18n(), r = _0(), n = r0(), a = r0(null), o = D(() => ({
3020
+ emits: ["boundsChange"],
3021
+ setup(e, { emit: t }) {
3022
+ const i = import("./countries-simple-geo-BFUDnSiE.js").then((d) => d.default), a = t, { i18n: r } = A0.useI18n(), o = P0(), n = s0(), c = s0(null), h = C(() => ({
3004
3023
  "fill-color": [
3005
3024
  "match",
3006
3025
  [
@@ -3013,79 +3032,79 @@ const x1 = /* @__PURE__ */ h0(b0), g1 = { class: "kong-ui-public-analytics-geo-m
3013
3032
  ],
3014
3033
  ["get", "ISO_A2"]
3015
3034
  ],
3016
- ...Object.keys(e.countryMetrics).length ? Object.entries(e.countryMetrics).flatMap(([h, p]) => [
3017
- h,
3018
- l(p)
3035
+ ...Object.keys(e.countryMetrics).length ? Object.entries(e.countryMetrics).flatMap(([d, p]) => [
3036
+ d,
3037
+ m(p)
3019
3038
  ]) : ["#ccc", "#ccc"],
3020
3039
  "#ccc"
3021
3040
  // default color if no match
3022
3041
  ],
3023
3042
  "fill-opacity": 0.7
3024
- })), d = D(() => e.withLegend && Object.keys(e.countryMetrics).length > 0), c = D(() => Math.log(Math.min(...Object.values(e.countryMetrics)))), s = D(() => Math.log(Math.max(...Object.values(e.countryMetrics)))), l = (h) => {
3025
- const p = Math.log(h), x = (s.value - c.value) / 5;
3026
- return p >= c.value + 4 * x ? "#296378" : p >= c.value + 3 * x ? "#0D8093" : p >= c.value + 2 * x ? "#009FA9" : p >= c.value + 1 * x ? "#00BDB7" : "#0CDCBD";
3027
- }, u = D(() => e.metric && i.t(`metrics.${e.metric}`) || ""), m = D(() => {
3028
- const p = (s.value - c.value) / 5, g = [
3029
- c.value + 4 * p,
3030
- c.value + 3 * p,
3031
- c.value + 2 * p,
3032
- c.value + 1 * p,
3033
- c.value
3043
+ })), l = C(() => e.withLegend && Object.keys(e.countryMetrics).length > 0), s = C(() => Math.log(Math.min(...Object.values(e.countryMetrics)))), u = C(() => Math.log(Math.max(...Object.values(e.countryMetrics)))), m = (d) => {
3044
+ const p = Math.log(d), x = (u.value - s.value) / 5;
3045
+ return p >= s.value + 4 * x ? "#296378" : p >= s.value + 3 * x ? "#0D8093" : p >= s.value + 2 * x ? "#009FA9" : p >= s.value + 1 * x ? "#00BDB7" : "#0CDCBD";
3046
+ }, y = C(() => e.metric && r.t(`metrics.${e.metric}`) || ""), B = C(() => {
3047
+ const p = (u.value - s.value) / 5, g = [
3048
+ s.value + 4 * p,
3049
+ s.value + 3 * p,
3050
+ s.value + 2 * p,
3051
+ s.value + 1 * p,
3052
+ s.value
3034
3053
  ];
3035
- return g.map((x, k) => {
3036
- const S = k === 0 ? s.value : g[k - 1];
3037
- let _ = "";
3038
- return k === 0 ? _ = `> ${$(Math.trunc(Math.exp(x)), { capital: !0 })}` : k === g.length - 1 ? _ = `< ${$(Math.trunc(Math.exp(S)), { capital: !0 })}` : _ = `${$(Math.trunc(Math.exp(x)), { capital: !0 })} - ${$(Math.trunc(Math.exp(S)), { capital: !0 })}`, {
3039
- color: l(Math.exp(x)),
3040
- range: _
3054
+ return g.map((x, _) => {
3055
+ const z = _ === 0 ? u.value : g[_ - 1];
3056
+ let w = "";
3057
+ return _ === 0 ? w = `> ${q(Math.trunc(Math.exp(x)), { capital: !0 })}` : _ === g.length - 1 ? w = `< ${q(Math.trunc(Math.exp(z)), { capital: !0 })}` : w = `${q(Math.trunc(Math.exp(x)), { capital: !0 })} - ${q(Math.trunc(Math.exp(z)), { capital: !0 })}`, {
3058
+ color: m(Math.exp(x)),
3059
+ range: w
3041
3060
  };
3042
3061
  });
3043
- }), y = (h) => {
3044
- const p = h.flat(1);
3045
- return Array.isArray(p[0]) && Array.isArray(p[0][0]) ? y(p) : p;
3046
- }, L = (h) => {
3047
- var g, x, k, S, _, C, U;
3048
- if (h === "RU") {
3062
+ }), V = (d) => {
3063
+ const p = d.flat(1);
3064
+ return Array.isArray(p[0]) && Array.isArray(p[0][0]) ? V(p) : p;
3065
+ }, r0 = (d) => {
3066
+ var g, x, _, z, w, N, E;
3067
+ if (d === "RU") {
3049
3068
  (g = n.value) == null || g.fitBounds([
3050
3069
  [20, 40],
3051
3070
  [180, 80]
3052
3071
  ]);
3053
3072
  return;
3054
- } else if (h === "US") {
3073
+ } else if (d === "US") {
3055
3074
  (x = n.value) == null || x.fitBounds([
3056
3075
  [-130, 20],
3057
3076
  [-60, 50]
3058
3077
  ]);
3059
3078
  return;
3060
- } else if (h === "FR") {
3061
- (k = n.value) == null || k.fitBounds([
3079
+ } else if (d === "FR") {
3080
+ (_ = n.value) == null || _.fitBounds([
3062
3081
  [-5, 42],
3063
3082
  [9, 51]
3064
3083
  ]);
3065
3084
  return;
3066
- } else if (h === "NO") {
3067
- (S = n.value) == null || S.fitBounds([
3085
+ } else if (d === "NO") {
3086
+ (z = n.value) == null || z.fitBounds([
3068
3087
  [4, 57],
3069
3088
  [32, 71]
3070
3089
  ]);
3071
3090
  return;
3072
3091
  }
3073
- const p = (_ = a.value) == null ? void 0 : _.features.find((w) => {
3074
- var P, V, B, z, T;
3075
- return (P = w.properties) != null && P.ISO_A2 ? ((V = w.properties) == null ? void 0 : V.ISO_A2) === h : ((B = w.properties) == null ? void 0 : B.iso_a2) === "-99" ? ((z = w.properties) == null ? void 0 : z.iso_a2_eh) === h : ((T = w.properties) == null ? void 0 : T.iso_a2) === h;
3092
+ const p = (w = c.value) == null ? void 0 : w.features.find((v) => {
3093
+ var M, L, P, T, D;
3094
+ return (M = v.properties) != null && M.ISO_A2 ? ((L = v.properties) == null ? void 0 : L.ISO_A2) === d : ((P = v.properties) == null ? void 0 : P.iso_a2) === "-99" ? ((T = v.properties) == null ? void 0 : T.iso_a2_eh) === d : ((D = v.properties) == null ? void 0 : D.iso_a2) === d;
3076
3095
  });
3077
3096
  if (p) {
3078
- const w = (C = p.geometry) == null ? void 0 : C.coordinates;
3079
- if (!w) return;
3080
- const P = y(w), V = P.map((N) => N[1]), B = P.map((N) => N[0]), z = Math.min(...V), T = Math.max(...V), G = Math.min(...B), H = Math.max(...B);
3081
- (U = n.value) == null || U.fitBounds([
3082
- [G, z],
3083
- [H, T]
3097
+ const v = (N = p.geometry) == null ? void 0 : N.coordinates;
3098
+ if (!v) return;
3099
+ const M = V(v), L = M.map((R) => R[1]), P = M.map((R) => R[0]), T = Math.min(...L), D = Math.max(...L), H = Math.min(...P), j = Math.max(...P);
3100
+ (E = n.value) == null || E.fitBounds([
3101
+ [H, T],
3102
+ [j, D]
3084
3103
  ]);
3085
3104
  }
3086
- }, F = D(() => {
3087
- const h = {
3088
- container: r,
3105
+ }, S = C(() => {
3106
+ const d = {
3107
+ container: o,
3089
3108
  style: { version: 8, sources: {}, layers: [] },
3090
3109
  attributionControl: !1,
3091
3110
  // fit bounds for whole world minus antarctica
@@ -3095,26 +3114,33 @@ const x1 = /* @__PURE__ */ h0(b0), g1 = { class: "kong-ui-public-analytics-geo-m
3095
3114
  [179, 90]
3096
3115
  ]
3097
3116
  };
3098
- return e.bounds && (h.bounds = e.bounds), h;
3099
- });
3100
- return k0(async () => {
3101
- var h, p, g;
3117
+ return e.bounds && (d.bounds = e.bounds), d;
3118
+ }), v0 = _1(() => {
3119
+ if (!n.value) return;
3120
+ const d = n.value.getBounds(), p = d.getSouthWest(), g = d.getNorthEast();
3121
+ a("boundsChange", [
3122
+ [Math.round(p.lng), Math.round(p.lat)],
3123
+ [Math.round(g.lng), Math.round(g.lat)]
3124
+ ]);
3125
+ }, 300);
3126
+ return B0(async () => {
3127
+ var d, p, g;
3102
3128
  try {
3103
- const x = await t, k = await fetch(x), S = new Uint8Array(await k.arrayBuffer()), _ = Y0(new x1(S));
3104
- a.value = _, n.value = new B0(F.value), n.value.on("load", () => {
3105
- var U, w, P, V, B, z;
3106
- (U = n.value) == null || U.addSource("countries", {
3129
+ const x = await i, _ = await fetch(x), z = new Uint8Array(await _.arrayBuffer()), w = i1(new w1(z));
3130
+ c.value = w, n.value = new D0(S.value), n.value.on("load", () => {
3131
+ var E, v, M, L, P, T, D;
3132
+ (E = n.value) == null || E.addSource("countries", {
3107
3133
  type: "geojson",
3108
- data: _
3109
- }), (w = n.value) == null || w.addLayer({
3134
+ data: w
3135
+ }), (v = n.value) == null || v.addLayer({
3110
3136
  id: "countries-layer",
3111
3137
  type: "fill",
3112
3138
  source: "countries",
3113
- paint: o.value
3114
- }), (P = n.value) == null || P.addSource("lakes", {
3139
+ paint: h.value
3140
+ }), (M = n.value) == null || M.addSource("lakes", {
3115
3141
  type: "geojson",
3116
- data: A0
3117
- }), (V = n.value) == null || V.addLayer({
3142
+ data: H0
3143
+ }), (L = n.value) == null || L.addLayer({
3118
3144
  id: "lakes-layer",
3119
3145
  type: "fill",
3120
3146
  source: "lakes",
@@ -3122,36 +3148,36 @@ const x1 = /* @__PURE__ */ h0(b0), g1 = { class: "kong-ui-public-analytics-geo-m
3122
3148
  "fill-color": "#FFFFFF"
3123
3149
  }
3124
3150
  });
3125
- const C = new S0({
3151
+ const N = new C0({
3126
3152
  closeButton: !1,
3127
3153
  closeOnClick: !1
3128
3154
  });
3129
- (B = n.value) == null || B.on("mousemove", "countries-layer", (T) => {
3130
- var H;
3131
- const G = (H = T.features) == null ? void 0 : H[0];
3132
- if (G) {
3133
- const { iso_a2: N, iso_a2_eh: x0, ISO_A2: g0, admin: n0 } = G.properties, F0 = g0 ?? N === "-99" ? x0 : N, Q = e.countryMetrics[F0];
3134
- if (Q !== void 0) {
3135
- const v0 = e.showTooltipValue ? `<strong>${n0}</strong>: ${$(Q, { capital: !0 })} ${i.t(`metricUnits.${e.metricUnit}`, { plural: Q > 1 ? "s" : "" })}` : `<strong>${n0}</strong>`;
3136
- C.setLngLat(T.lngLat).setHTML(v0).addTo(n.value);
3155
+ (P = n.value) == null || P.on("mousemove", "countries-layer", (H) => {
3156
+ var R;
3157
+ const j = (R = H.features) == null ? void 0 : R[0];
3158
+ if (j) {
3159
+ const { iso_a2: a0, iso_a2_eh: w0, ISO_A2: _0, admin: o0 } = j.properties, k0 = _0 ?? a0 === "-99" ? w0 : a0, Y = e.countryMetrics[k0];
3160
+ if (Y !== void 0) {
3161
+ const M0 = e.showTooltipValue ? `<strong>${o0}</strong>: ${q(Y, { capital: !0 })} ${r.t(`metricUnits.${e.metricUnit}`, { plural: Y > 1 ? "s" : "" })}` : `<strong>${o0}</strong>`;
3162
+ N.setLngLat(H.lngLat).setHTML(M0).addTo(n.value);
3137
3163
  } else
3138
- C.remove();
3164
+ N.remove();
3139
3165
  }
3140
- }), (z = n.value) == null || z.on("mouseleave", "countries-layer", () => {
3141
- C.remove();
3142
- }), e.fitToCountry && L(e.fitToCountry);
3143
- }), (h = n.value) == null || h.dragRotate.disable(), (p = n.value) == null || p.keyboard.disable(), (g = n.value) == null || g.touchZoomRotate.disableRotation();
3166
+ }), (T = n.value) == null || T.on("mouseleave", "countries-layer", () => {
3167
+ N.remove();
3168
+ }), (D = n.value) == null || D.on("move", v0), e.fitToCountry && r0(e.fitToCountry);
3169
+ }), (d = n.value) == null || d.dragRotate.disable(), (p = n.value) == null || p.keyboard.disable(), (g = n.value) == null || g.touchZoomRotate.disableRotation();
3144
3170
  } catch (x) {
3145
3171
  console.error(x);
3146
3172
  }
3147
- }), a0(() => e.countryMetrics, () => {
3148
- var h;
3173
+ }), l0(() => e.countryMetrics, () => {
3174
+ var d;
3149
3175
  n.value && n.value.isStyleLoaded() && (n.value.getLayer("countries-layer") && n.value.removeLayer("countries-layer"), n.value.addLayer({
3150
3176
  id: "countries-layer",
3151
3177
  type: "fill",
3152
3178
  source: "countries",
3153
- paint: o.value
3154
- }), n.value.removeLayer("lakes-layer"), (h = n.value) == null || h.addLayer({
3179
+ paint: h.value
3180
+ }), n.value.removeLayer("lakes-layer"), (d = n.value) == null || d.addLayer({
3155
3181
  id: "lakes-layer",
3156
3182
  type: "fill",
3157
3183
  source: "lakes",
@@ -3159,50 +3185,40 @@ const x1 = /* @__PURE__ */ h0(b0), g1 = { class: "kong-ui-public-analytics-geo-m
3159
3185
  "fill-color": "#FFFFFF"
3160
3186
  }
3161
3187
  }));
3162
- }), a0(() => e.fitToCountry, (h) => {
3188
+ }), l0(() => e.fitToCountry, (d) => {
3163
3189
  var p, g, x;
3164
- n.value && h ? L(h) : !F.value.center && !F.value.zoom ? (p = n.value) == null || p.fitBounds([
3190
+ n.value && d ? r0(d) : !S.value.center && !S.value.zoom ? (p = n.value) == null || p.fitBounds([
3165
3191
  [-180, -90],
3166
3192
  [180, 90]
3167
- ]) : (F.value.zoom && ((g = n.value) == null || g.setZoom(F.value.zoom)), F.value.center && ((x = n.value) == null || x.flyTo({ center: F.value.center })));
3168
- }), (h, p) => (A(), E("div", g1, [
3169
- Y("div", {
3170
- id: M0(r),
3193
+ ]) : (S.value.zoom && ((g = n.value) == null || g.setZoom(S.value.zoom)), S.value.center && ((x = n.value) == null || x.flyTo({ center: S.value.center })));
3194
+ }), (d, p) => ($(), A("div", k1, [
3195
+ b("div", {
3196
+ id: V0(o),
3171
3197
  class: "analytics-geo-map-container"
3172
- }, null, 8, F1),
3173
- d.value ? (A(), E("div", v1, [
3174
- h.metric ? (A(), E("div", w1, s0(u.value), 1)) : o0("", !0),
3175
- (A(!0), E(L0, null, P0(m.value, (g, x) => (A(), E("div", {
3198
+ }, null, 8, M1),
3199
+ l.value ? ($(), A("div", L1, [
3200
+ d.metric ? ($(), A("div", P1, c0(y.value), 1)) : u0("", !0),
3201
+ ($(!0), A(S0, null, z0(B.value, (g, x) => ($(), A("div", {
3176
3202
  key: x,
3177
3203
  class: "legend-item"
3178
3204
  }, [
3179
- Y("span", {
3205
+ b("span", {
3180
3206
  class: "legend-color",
3181
- style: V0({ backgroundColor: g.color })
3207
+ style: T0({ backgroundColor: g.color })
3182
3208
  }, null, 4),
3183
- Y("span", _1, s0(g.range), 1)
3209
+ b("span", B1, c0(g.range), 1)
3184
3210
  ]))), 128))
3185
- ])) : o0("", !0)
3211
+ ])) : u0("", !0)
3186
3212
  ]));
3187
3213
  }
3188
- }), M1 = (e, t) => {
3214
+ }), S1 = (e, t) => {
3189
3215
  const i = e.__vccOpts || e;
3190
- for (const [r, n] of t)
3191
- i[r] = n;
3216
+ for (const [a, r] of t)
3217
+ i[a] = r;
3192
3218
  return i;
3193
- }, B1 = /* @__PURE__ */ M1(k1, [["__scopeId", "data-v-ddf87e81"]]), S1 = (e) => {
3194
- var r, n;
3195
- if (!e || !e.data)
3196
- return {};
3197
- const t = {}, i = e.data;
3198
- if (i)
3199
- for (const a of i) {
3200
- const o = (r = a == null ? void 0 : a.event) == null ? void 0 : r.iso_code, d = (n = e.meta.metric_names) == null ? void 0 : n[0];
3201
- o && (t[o] = d ? a.event[d] : 0);
3202
- }
3203
- return t;
3204
- };
3219
+ }, R1 = /* @__PURE__ */ S1(V1, [["__scopeId", "data-v-8d87bca2"]]);
3205
3220
  export {
3206
- B1 as AnalyticsGeoMap,
3207
- S1 as exploreResultToCountryMetrics
3221
+ R1 as AnalyticsGeoMap,
3222
+ _1 as debounce,
3223
+ N1 as exploreResultToCountryMetrics
3208
3224
  };