@kong-ui-public/analytics-geo-map 1.1.2-pr.2427.fe069a6cf.0 → 1.2.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,4 +1,4 @@
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";
1
+ import { defineComponent as L0, useId as B0, ref as l0, computed as C, onMounted as P0, watch as b, createElementBlock as A, openBlock as q, createElementVNode as e0, createCommentVNode as u0, unref as S0, toDisplayString as c0, Fragment as V0, renderList as z0, normalizeStyle as T0 } from "vue";
2
2
  import { Map as D0, Popup as C0 } from "maplibre-gl";
3
3
  import { createI18n as N0, i18nTComponent as R0 } from "@kong-ui-public/i18n";
4
4
  const O0 = {
@@ -56,29 +56,29 @@ var x0 = { exports: {} };
56
56
  function t(l, s) {
57
57
  if (s.separator === !1 || l < 1e3)
58
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
- }), m.reverse().join("");
59
+ var u = typeof s.separator == "string" ? s.separator : ",", x = [], g = Math.round(l).toString().split("");
60
+ return g.reverse().forEach(function(S, V) {
61
+ V && V % 3 === 0 && x.push(u), x.push(S);
62
+ }), x.reverse().join("");
63
63
  }
64
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);
65
+ var x = l / s, g = u.round ? "round" : "floor";
66
+ return u.decimal === !1 ? (l = Math[g](x), l.toString()) : (u.precision ? l = x : l = x < 10 ? Math[g](x * 10) / 10 : Math[g](x), l = l.toString(), typeof u.decimal == "string" && (l = l.replace(".", u.decimal)), l);
67
67
  }
68
- var a = 1e3, r = 1e4, o = 1e6, n = 1e9, c = 1e12;
69
- function h(l, s) {
68
+ var a = 1e3, r = 1e4, o = 1e6, n = 1e9, d = 1e12;
69
+ function p(l, s) {
70
70
  var u;
71
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;
72
+ var x = l < 0;
73
+ x && (l = Math.abs(l)), s.precision && (l = parseFloat(l.toPrecision(s.precision)));
74
+ var g = s.min10k ? r : a;
75
+ return l < g || 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 < d ? u = t(i(l, n, s), s) + "b" : u = t(i(l, d, s), s) + "t", x && (u = "-" + u), s.capital && (u = u.toUpperCase()), s.prefix && (u = s.prefix + u), s.suffix && (u = u + s.suffix), u;
76
76
  }
77
- h.addCommas = t, e.exports = h;
77
+ p.addCommas = t, e.exports = p;
78
78
  })();
79
79
  })(x0);
80
- var $0 = x0.exports;
81
- const q = /* @__PURE__ */ y0($0), q0 = "FeatureCollection", G0 = [
80
+ var q0 = x0.exports;
81
+ const $ = /* @__PURE__ */ y0(q0), $0 = "FeatureCollection", G0 = [
82
82
  {
83
83
  type: "Feature",
84
84
  properties: {
@@ -2511,10 +2511,10 @@ const q = /* @__PURE__ */ y0($0), q0 = "FeatureCollection", G0 = [
2511
2511
  }
2512
2512
  }
2513
2513
  ], H0 = {
2514
- type: q0,
2514
+ type: $0,
2515
2515
  features: G0
2516
2516
  };
2517
- var j0 = W0, J, U, F, Z, Q, K0 = [
2517
+ var j0 = W0, J, U, v, Z, Q, K0 = [
2518
2518
  "Point",
2519
2519
  "MultiPoint",
2520
2520
  "LineString",
@@ -2524,12 +2524,12 @@ var j0 = W0, J, U, F, Z, Q, K0 = [
2524
2524
  "GeometryCollection"
2525
2525
  ];
2526
2526
  function W0(e) {
2527
- Z = 2, Q = Math.pow(10, 6), F = null, J = [], U = [];
2527
+ Z = 2, Q = Math.pow(10, 6), v = null, J = [], U = [];
2528
2528
  var t = e.readFields(J0, {});
2529
2529
  return J = null, t;
2530
2530
  }
2531
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);
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 && i0(i, t);
2533
2533
  }
2534
2534
  function Z0(e, t) {
2535
2535
  return t.type = "FeatureCollection", t.features = [], e.readMessage(X0, t);
@@ -2539,22 +2539,22 @@ function g0(e, t) {
2539
2539
  var i = e.readMessage(Q0, t);
2540
2540
  return "geometry" in i || (i.geometry = null), i;
2541
2541
  }
2542
- function t0(e, t) {
2542
+ function i0(e, t) {
2543
2543
  return t.type = "Point", e.readMessage(Y0, t);
2544
2544
  }
2545
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);
2546
+ e === 1 ? t.features.push(g0(i, {})) : e === 13 ? U.push(n0(i)) : e === 15 && X(i, t);
2547
2547
  }
2548
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);
2549
+ e === 1 ? t.geometry = i0(i, {}) : e === 11 ? t.id = i.readString() : e === 12 ? t.id = i.readSVarint() : e === 13 ? U.push(n0(i)) : e === 14 ? t.properties = X(i, {}) : e === 15 && X(i, t);
2550
2550
  }
2551
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);
2552
+ e === 1 ? t.type = K0[i.readVarint()] : e === 2 ? v = i.readPackedVarint() : e === 3 ? b0(t, i, t.type) : e === 4 ? (t.geometries = t.geometries || [], t.geometries.push(i0(i, {}))) : e === 13 ? U.push(n0(i)) : e === 15 && X(i, t);
2553
2553
  }
2554
2554
  function b0(e, t, i) {
2555
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 i0(e) {
2557
+ function n0(e) {
2558
2558
  for (var t = e.readVarint() + e.pos, i = null; e.pos < t; ) {
2559
2559
  var a = e.readVarint(), r = a >> 3;
2560
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()));
@@ -2570,11 +2570,11 @@ function e1(e) {
2570
2570
  return i;
2571
2571
  }
2572
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;
2573
+ var r = 0, o = [], n, d, p = [];
2574
+ for (d = 0; d < Z; d++) p[d] = 0;
2575
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;
2576
+ for (n = [], d = 0; d < Z; d++)
2577
+ p[d] += e.readSVarint(), n[d] = p[d] / Q;
2578
2578
  o.push(n), r++;
2579
2579
  }
2580
2580
  return a && o.push(o[0]), o;
@@ -2584,54 +2584,54 @@ function d0(e) {
2584
2584
  }
2585
2585
  function f0(e, t) {
2586
2586
  var i = e.readVarint() + e.pos;
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;
2587
+ if (!v) return [G(e, i, null, t)];
2588
+ for (var a = [], r = 0; r < v.length; r++) a.push(G(e, i, v[r], t));
2589
+ return v = null, a;
2590
2590
  }
2591
2591
  function t1(e) {
2592
2592
  var t = e.readVarint() + e.pos;
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);
2593
+ if (!v) return [[G(e, t, null, !0)]];
2594
+ for (var i = [], a = 1, r = 0; r < v[0]; r++) {
2595
+ for (var o = [], n = 0; n < v[a]; n++) o.push(G(e, t, v[a + 1 + n], !0));
2596
+ a += v[a] + 1, i.push(o);
2597
2597
  }
2598
- return F = null, i;
2598
+ return v = null, i;
2599
2599
  }
2600
- var i1 = j0, n0 = {};
2600
+ var i1 = j0, r0 = {};
2601
2601
  /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
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)
2602
+ r0.read = function(e, t, i, a, r) {
2603
+ var o, n, d = r * 8 - a - 1, p = (1 << d) - 1, l = p >> 1, s = -7, u = i ? r - 1 : 0, x = i ? -1 : 1, g = e[t + u];
2604
+ for (u += x, o = g & (1 << -s) - 1, g >>= -s, s += d; s > 0; o = o * 256 + e[t + u], u += x, s -= 8)
2605
2605
  ;
2606
- for (n = o & (1 << -s) - 1, o >>= -s, s += a; s > 0; n = n * 256 + e[t + u], u += m, s -= 8)
2606
+ for (n = o & (1 << -s) - 1, o >>= -s, s += a; s > 0; n = n * 256 + e[t + u], u += x, s -= 8)
2607
2607
  ;
2608
2608
  if (o === 0)
2609
2609
  o = 1 - l;
2610
2610
  else {
2611
- if (o === h)
2612
- return n ? NaN : (y ? -1 : 1) * (1 / 0);
2611
+ if (o === p)
2612
+ return n ? NaN : (g ? -1 : 1) * (1 / 0);
2613
2613
  n = n + Math.pow(2, a), o = o - l;
2614
2614
  }
2615
- return (y ? -1 : 1) * n * Math.pow(2, o - a);
2615
+ return (g ? -1 : 1) * n * Math.pow(2, o - a);
2616
2616
  };
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)
2617
+ r0.write = function(e, t, i, a, r, o) {
2618
+ var n, d, p, l = o * 8 - r - 1, s = (1 << l) - 1, u = s >> 1, x = r === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, g = a ? 0 : o - 1, S = a ? 1 : -1, V = 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, n = s) : (n = Math.floor(Math.log(t) / Math.LN2), t * (p = Math.pow(2, -n)) < 1 && (n--, p *= 2), n + u >= 1 ? t += x / p : t += x * Math.pow(2, 1 - u), t * p >= 2 && (n++, p /= 2), n + u >= s ? (d = 0, n = s) : n + u >= 1 ? (d = (t * p - 1) * Math.pow(2, r), n = n + u) : (d = t * Math.pow(2, u - 1) * Math.pow(2, r), n = 0)); r >= 8; e[i + g] = d & 255, g += S, d /= 256, r -= 8)
2620
2620
  ;
2621
- for (n = n << r | c, l += r; l > 0; e[i + y] = n & 255, y += B, n /= 256, l -= 8)
2621
+ for (n = n << r | d, l += r; l > 0; e[i + g] = n & 255, g += S, n /= 256, l -= 8)
2622
2622
  ;
2623
- e[i + y - B] |= V * 128;
2623
+ e[i + g - S] |= V * 128;
2624
2624
  };
2625
- var n1 = f, K = n0;
2626
- function f(e) {
2625
+ var n1 = h, K = r0;
2626
+ function h(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
  }
2629
- f.Varint = 0;
2630
- f.Fixed64 = 1;
2631
- f.Bytes = 2;
2632
- f.Fixed32 = 5;
2633
- var e0 = 65536 * 65536, h0 = 1 / e0, r1 = 12, F0 = typeof TextDecoder > "u" ? null : new TextDecoder("utf-8");
2634
- f.prototype = {
2629
+ h.Varint = 0;
2630
+ h.Fixed64 = 1;
2631
+ h.Bytes = 2;
2632
+ h.Fixed32 = 5;
2633
+ var t0 = 65536 * 65536, h0 = 1 / t0, r1 = 12, F0 = typeof TextDecoder > "u" ? null : new TextDecoder("utf-8");
2634
+ h.prototype = {
2635
2635
  destroy: function() {
2636
2636
  this.buf = null;
2637
2637
  },
@@ -2656,11 +2656,11 @@ f.prototype = {
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 = W(this.buf, this.pos) + W(this.buf, this.pos + 4) * e0;
2659
+ var e = W(this.buf, this.pos) + W(this.buf, this.pos + 4) * t0;
2660
2660
  return this.pos += 8, e;
2661
2661
  },
2662
2662
  readSFixed64: function() {
2663
- var e = W(this.buf, this.pos) + m0(this.buf, this.pos + 4) * e0;
2663
+ var e = W(this.buf, this.pos) + m0(this.buf, this.pos + 4) * t0;
2664
2664
  return this.pos += 8, e;
2665
2665
  },
2666
2666
  readFloat: function() {
@@ -2695,66 +2695,66 @@ f.prototype = {
2695
2695
  },
2696
2696
  // verbose for performance reasons; doesn't affect gzipped size
2697
2697
  readPackedVarint: function(e, t) {
2698
- if (this.type !== f.Bytes) return e.push(this.readVarint(t));
2699
- var i = k(this);
2698
+ if (this.type !== h.Bytes) return e.push(this.readVarint(t));
2699
+ var i = M(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
- if (this.type !== f.Bytes) return e.push(this.readSVarint());
2705
- var t = k(this);
2704
+ if (this.type !== h.Bytes) return e.push(this.readSVarint());
2705
+ var t = M(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
- if (this.type !== f.Bytes) return e.push(this.readBoolean());
2711
- var t = k(this);
2710
+ if (this.type !== h.Bytes) return e.push(this.readBoolean());
2711
+ var t = M(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
- if (this.type !== f.Bytes) return e.push(this.readFloat());
2717
- var t = k(this);
2716
+ if (this.type !== h.Bytes) return e.push(this.readFloat());
2717
+ var t = M(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
- if (this.type !== f.Bytes) return e.push(this.readDouble());
2723
- var t = k(this);
2722
+ if (this.type !== h.Bytes) return e.push(this.readDouble());
2723
+ var t = M(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
- if (this.type !== f.Bytes) return e.push(this.readFixed32());
2729
- var t = k(this);
2728
+ if (this.type !== h.Bytes) return e.push(this.readFixed32());
2729
+ var t = M(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
- if (this.type !== f.Bytes) return e.push(this.readSFixed32());
2735
- var t = k(this);
2734
+ if (this.type !== h.Bytes) return e.push(this.readSFixed32());
2735
+ var t = M(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
- if (this.type !== f.Bytes) return e.push(this.readFixed64());
2741
- var t = k(this);
2740
+ if (this.type !== h.Bytes) return e.push(this.readFixed64());
2741
+ var t = M(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
- if (this.type !== f.Bytes) return e.push(this.readSFixed64());
2747
- var t = k(this);
2746
+ if (this.type !== h.Bytes) return e.push(this.readSFixed64());
2747
+ var t = M(this);
2748
2748
  for (e = e || []; this.pos < t; ) e.push(this.readSFixed64());
2749
2749
  return e;
2750
2750
  },
2751
2751
  skip: function(e) {
2752
2752
  var t = e & 7;
2753
- if (t === f.Varint) for (; this.buf[this.pos++] > 127; )
2753
+ if (t === h.Varint) for (; this.buf[this.pos++] > 127; )
2754
2754
  ;
2755
- else if (t === f.Bytes) this.pos = this.readVarint() + this.pos;
2756
- else if (t === f.Fixed32) this.pos += 4;
2757
- else if (t === f.Fixed64) this.pos += 8;
2755
+ else if (t === h.Bytes) this.pos = this.readVarint() + this.pos;
2756
+ else if (t === h.Fixed32) this.pos += 4;
2757
+ else if (t === h.Fixed64) this.pos += 8;
2758
2758
  else throw new Error("Unimplemented type: " + t);
2759
2759
  },
2760
2760
  // === WRITING =================================================================
@@ -2822,7 +2822,7 @@ f.prototype = {
2822
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
- this.writeTag(e, f.Bytes), this.writeRawMessage(t, i);
2825
+ this.writeTag(e, h.Bytes), this.writeRawMessage(t, i);
2826
2826
  },
2827
2827
  writePackedVarint: function(e, t) {
2828
2828
  t.length && this.writeMessage(e, u1, t);
@@ -2852,34 +2852,34 @@ f.prototype = {
2852
2852
  t.length && this.writeMessage(e, x1, t);
2853
2853
  },
2854
2854
  writeBytesField: function(e, t) {
2855
- this.writeTag(e, f.Bytes), this.writeBytes(t);
2855
+ this.writeTag(e, h.Bytes), this.writeBytes(t);
2856
2856
  },
2857
2857
  writeFixed32Field: function(e, t) {
2858
- this.writeTag(e, f.Fixed32), this.writeFixed32(t);
2858
+ this.writeTag(e, h.Fixed32), this.writeFixed32(t);
2859
2859
  },
2860
2860
  writeSFixed32Field: function(e, t) {
2861
- this.writeTag(e, f.Fixed32), this.writeSFixed32(t);
2861
+ this.writeTag(e, h.Fixed32), this.writeSFixed32(t);
2862
2862
  },
2863
2863
  writeFixed64Field: function(e, t) {
2864
- this.writeTag(e, f.Fixed64), this.writeFixed64(t);
2864
+ this.writeTag(e, h.Fixed64), this.writeFixed64(t);
2865
2865
  },
2866
2866
  writeSFixed64Field: function(e, t) {
2867
- this.writeTag(e, f.Fixed64), this.writeSFixed64(t);
2867
+ this.writeTag(e, h.Fixed64), this.writeSFixed64(t);
2868
2868
  },
2869
2869
  writeVarintField: function(e, t) {
2870
- this.writeTag(e, f.Varint), this.writeVarint(t);
2870
+ this.writeTag(e, h.Varint), this.writeVarint(t);
2871
2871
  },
2872
2872
  writeSVarintField: function(e, t) {
2873
- this.writeTag(e, f.Varint), this.writeSVarint(t);
2873
+ this.writeTag(e, h.Varint), this.writeSVarint(t);
2874
2874
  },
2875
2875
  writeStringField: function(e, t) {
2876
- this.writeTag(e, f.Bytes), this.writeString(t);
2876
+ this.writeTag(e, h.Bytes), this.writeString(t);
2877
2877
  },
2878
2878
  writeFloatField: function(e, t) {
2879
- this.writeTag(e, f.Fixed32), this.writeFloat(t);
2879
+ this.writeTag(e, h.Fixed32), this.writeFloat(t);
2880
2880
  },
2881
2881
  writeDoubleField: function(e, t) {
2882
- this.writeTag(e, f.Fixed64), this.writeDouble(t);
2882
+ this.writeTag(e, h.Fixed64), this.writeDouble(t);
2883
2883
  },
2884
2884
  writeBooleanField: function(e, t) {
2885
2885
  this.writeVarintField(e, !!t);
@@ -2890,8 +2890,8 @@ function a1(e, t, i) {
2890
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 k(e) {
2894
- return e.type === f.Bytes ? e.readVarint() + e.pos : e.pos + 1;
2893
+ function M(e) {
2894
+ return e.type === h.Bytes ? e.readVarint() + e.pos : e.pos + 1;
2895
2895
  }
2896
2896
  function O(e, t, i) {
2897
2897
  return i ? t * 4294967296 + (e >>> 0) : (t >>> 0) * 4294967296 + (e >>> 0);
@@ -2952,10 +2952,10 @@ function m0(e, t) {
2952
2952
  }
2953
2953
  function g1(e, t, i) {
2954
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;
2955
+ var o = e[r], n = null, d = o > 239 ? 4 : o > 223 ? 3 : o > 191 ? 2 : 1;
2956
+ if (r + d > i) break;
2957
+ var p, l, s;
2958
+ d === 1 ? o < 128 && (n = o) : d === 2 ? (p = e[r + 1], (p & 192) === 128 && (n = (o & 31) << 6 | p & 63, n <= 127 && (n = null))) : d === 3 ? (p = e[r + 1], l = e[r + 2], (p & 192) === 128 && (l & 192) === 128 && (n = (o & 15) << 12 | (p & 63) << 6 | l & 63, (n <= 2047 || n >= 55296 && n <= 57343) && (n = null))) : d === 4 && (p = e[r + 1], l = e[r + 2], s = e[r + 3], (p & 192) === 128 && (l & 192) === 128 && (s & 192) === 128 && (n = (o & 15) << 18 | (p & 63) << 12 | (l & 63) << 6 | s & 63, (n <= 65535 || n >= 1114112) && (n = null))), n === null ? (n = 65533, d = 1) : n > 65535 && (n -= 65536, a += String.fromCharCode(n >>> 10 & 1023 | 55296), n = 56320 | n & 1023), a += String.fromCharCode(n), r += d;
2959
2959
  }
2960
2960
  return a;
2961
2961
  }
@@ -2987,8 +2987,8 @@ const w1 = /* @__PURE__ */ y0(n1), N1 = (e) => {
2987
2987
  const t = {}, i = e.data;
2988
2988
  if (i)
2989
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);
2990
+ const n = (a = o == null ? void 0 : o.event) == null ? void 0 : a.iso_code, d = (r = e.meta.metric_names) == null ? void 0 : r[0];
2991
+ n && (t[n] = d ? o.event[d] : 0);
2992
2992
  }
2993
2993
  return t;
2994
2994
  };
@@ -3001,10 +3001,10 @@ function _1(e, t = 0) {
3001
3001
  const k1 = { class: "kong-ui-public-analytics-geo-map" }, M1 = ["id"], L1 = {
3002
3002
  key: 0,
3003
3003
  class: "legend"
3004
- }, P1 = {
3004
+ }, B1 = {
3005
3005
  key: 0,
3006
3006
  class: "legend-title"
3007
- }, B1 = { class: "legend-text" }, V1 = /* @__PURE__ */ L0({
3007
+ }, P1 = { class: "legend-text" }, S1 = /* @__PURE__ */ L0({
3008
3008
  __name: "AnalyticsGeoMap",
3009
3009
  props: {
3010
3010
  countryMetrics: {},
@@ -3019,7 +3019,7 @@ const k1 = { class: "kong-ui-public-analytics-geo-map" }, M1 = ["id"], L1 = {
3019
3019
  },
3020
3020
  emits: ["boundsChange"],
3021
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(() => ({
3022
+ const i = import("./countries-simple-geo-BFUDnSiE.js").then((c) => c.default), a = t, { i18n: r } = A0.useI18n(), o = B0(), n = l0(), d = l0(null), p = C(() => ({
3023
3023
  "fill-color": [
3024
3024
  "match",
3025
3025
  [
@@ -3032,78 +3032,78 @@ const k1 = { class: "kong-ui-public-analytics-geo-map" }, M1 = ["id"], L1 = {
3032
3032
  ],
3033
3033
  ["get", "ISO_A2"]
3034
3034
  ],
3035
- ...Object.keys(e.countryMetrics).length ? Object.entries(e.countryMetrics).flatMap(([d, p]) => [
3036
- d,
3037
- m(p)
3035
+ ...Object.keys(e.countryMetrics).length ? Object.entries(e.countryMetrics).flatMap(([c, f]) => [
3036
+ c,
3037
+ x(f)
3038
3038
  ]) : ["#ccc", "#ccc"],
3039
3039
  "#ccc"
3040
3040
  // default color if no match
3041
3041
  ],
3042
3042
  "fill-opacity": 0.7
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,
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)))), x = (c) => {
3044
+ const f = Math.log(c), m = (u.value - s.value) / 5;
3045
+ return f >= s.value + 4 * m ? "#296378" : f >= s.value + 3 * m ? "#0D8093" : f >= s.value + 2 * m ? "#009FA9" : f >= s.value + 1 * m ? "#00BDB7" : "#0CDCBD";
3046
+ }, g = C(() => e.metric && r.t(`metrics.${e.metric}`) || ""), S = C(() => {
3047
+ const f = (u.value - s.value) / 5, y = [
3048
+ s.value + 4 * f,
3049
+ s.value + 3 * f,
3050
+ s.value + 2 * f,
3051
+ s.value + 1 * f,
3052
3052
  s.value
3053
3053
  ];
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
3054
+ return y.map((m, _) => {
3055
+ const k = _ === 0 ? u.value : y[_ - 1];
3056
+ let F = "";
3057
+ return _ === 0 ? F = `> ${$(Math.trunc(Math.exp(m)), { capital: !0 })}` : _ === y.length - 1 ? F = `< ${$(Math.trunc(Math.exp(k)), { capital: !0 })}` : F = `${$(Math.trunc(Math.exp(m)), { capital: !0 })} - ${$(Math.trunc(Math.exp(k)), { capital: !0 })}`, {
3058
+ color: x(Math.exp(m)),
3059
+ range: F
3060
3060
  };
3061
3061
  });
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") {
3068
- (g = n.value) == null || g.fitBounds([
3062
+ }), V = (c) => {
3063
+ const f = c.flat(1);
3064
+ return Array.isArray(f[0]) && Array.isArray(f[0][0]) ? V(f) : f;
3065
+ }, a0 = (c) => {
3066
+ var y, m, _, k, F, N, E;
3067
+ if (c === "RU") {
3068
+ (y = n.value) == null || y.fitBounds([
3069
3069
  [20, 40],
3070
3070
  [180, 80]
3071
3071
  ]);
3072
3072
  return;
3073
- } else if (d === "US") {
3074
- (x = n.value) == null || x.fitBounds([
3073
+ } else if (c === "US") {
3074
+ (m = n.value) == null || m.fitBounds([
3075
3075
  [-130, 20],
3076
3076
  [-60, 50]
3077
3077
  ]);
3078
3078
  return;
3079
- } else if (d === "FR") {
3079
+ } else if (c === "FR") {
3080
3080
  (_ = n.value) == null || _.fitBounds([
3081
3081
  [-5, 42],
3082
3082
  [9, 51]
3083
3083
  ]);
3084
3084
  return;
3085
- } else if (d === "NO") {
3086
- (z = n.value) == null || z.fitBounds([
3085
+ } else if (c === "NO") {
3086
+ (k = n.value) == null || k.fitBounds([
3087
3087
  [4, 57],
3088
3088
  [32, 71]
3089
3089
  ]);
3090
3090
  return;
3091
3091
  }
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;
3092
+ const f = (F = d.value) == null ? void 0 : F.features.find((w) => {
3093
+ var L, B, P, T, D;
3094
+ return (L = w.properties) != null && L.ISO_A2 ? ((B = w.properties) == null ? void 0 : B.ISO_A2) === c : ((P = w.properties) == null ? void 0 : P.iso_a2) === "-99" ? ((T = w.properties) == null ? void 0 : T.iso_a2_eh) === c : ((D = w.properties) == null ? void 0 : D.iso_a2) === c;
3095
3095
  });
3096
- if (p) {
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);
3096
+ if (f) {
3097
+ const w = (N = f.geometry) == null ? void 0 : N.coordinates;
3098
+ if (!w) return;
3099
+ const L = V(w), B = L.map((R) => R[1]), P = L.map((R) => R[0]), T = Math.min(...B), D = Math.max(...B), H = Math.min(...P), j = Math.max(...P);
3100
3100
  (E = n.value) == null || E.fitBounds([
3101
3101
  [H, T],
3102
3102
  [j, D]
3103
3103
  ]);
3104
3104
  }
3105
- }, S = C(() => {
3106
- const d = {
3105
+ }, z = C(() => {
3106
+ const c = {
3107
3107
  container: o,
3108
3108
  style: { version: 8, sources: {}, layers: [] },
3109
3109
  attributionControl: !1,
@@ -3114,33 +3114,33 @@ const k1 = { class: "kong-ui-public-analytics-geo-map" }, M1 = ["id"], L1 = {
3114
3114
  [179, 90]
3115
3115
  ]
3116
3116
  };
3117
- return e.bounds && (d.bounds = e.bounds), d;
3117
+ return e.bounds && (c.bounds = e.bounds), c;
3118
3118
  }), v0 = _1(() => {
3119
3119
  if (!n.value) return;
3120
- const d = n.value.getBounds(), p = d.getSouthWest(), g = d.getNorthEast();
3120
+ const c = n.value.getBounds(), f = c.getSouthWest(), y = c.getNorthEast();
3121
3121
  a("boundsChange", [
3122
- [Math.round(p.lng), Math.round(p.lat)],
3123
- [Math.round(g.lng), Math.round(g.lat)]
3122
+ [f.lng, f.lat],
3123
+ [y.lng, y.lat]
3124
3124
  ]);
3125
3125
  }, 300);
3126
- return B0(async () => {
3127
- var d, p, g;
3126
+ return P0(async () => {
3127
+ var c, f, y;
3128
3128
  try {
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;
3129
+ const m = await i, _ = await fetch(m), k = new Uint8Array(await _.arrayBuffer()), F = i1(new w1(k));
3130
+ d.value = F, n.value = new D0(z.value), n.value.on("load", () => {
3131
+ var E, w, L, B, P, T, D;
3132
3132
  (E = n.value) == null || E.addSource("countries", {
3133
3133
  type: "geojson",
3134
- data: w
3135
- }), (v = n.value) == null || v.addLayer({
3134
+ data: F
3135
+ }), (w = n.value) == null || w.addLayer({
3136
3136
  id: "countries-layer",
3137
3137
  type: "fill",
3138
3138
  source: "countries",
3139
- paint: h.value
3140
- }), (M = n.value) == null || M.addSource("lakes", {
3139
+ paint: p.value
3140
+ }), (L = n.value) == null || L.addSource("lakes", {
3141
3141
  type: "geojson",
3142
3142
  data: H0
3143
- }), (L = n.value) == null || L.addLayer({
3143
+ }), (B = n.value) == null || B.addLayer({
3144
3144
  id: "lakes-layer",
3145
3145
  type: "fill",
3146
3146
  source: "lakes",
@@ -3156,28 +3156,28 @@ const k1 = { class: "kong-ui-public-analytics-geo-map" }, M1 = ["id"], L1 = {
3156
3156
  var R;
3157
3157
  const j = (R = H.features) == null ? void 0 : R[0];
3158
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];
3159
+ const { iso_a2: o0, iso_a2_eh: w0, ISO_A2: _0, admin: s0 } = j.properties, k0 = _0 ?? o0 === "-99" ? w0 : o0, Y = e.countryMetrics[k0];
3160
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>`;
3161
+ const M0 = e.showTooltipValue ? `<strong>${s0}</strong>: ${$(Y, { capital: !0 })} ${r.t(`metricUnits.${e.metricUnit}`, { plural: Y > 1 ? "s" : "" })}` : `<strong>${s0}</strong>`;
3162
3162
  N.setLngLat(H.lngLat).setHTML(M0).addTo(n.value);
3163
3163
  } else
3164
3164
  N.remove();
3165
3165
  }
3166
3166
  }), (T = n.value) == null || T.on("mouseleave", "countries-layer", () => {
3167
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();
3170
- } catch (x) {
3171
- console.error(x);
3168
+ }), (D = n.value) == null || D.on("move", v0), e.fitToCountry && a0(e.fitToCountry);
3169
+ }), (c = n.value) == null || c.dragRotate.disable(), (f = n.value) == null || f.keyboard.disable(), (y = n.value) == null || y.touchZoomRotate.disableRotation();
3170
+ } catch (m) {
3171
+ console.error(m);
3172
3172
  }
3173
- }), l0(() => e.countryMetrics, () => {
3174
- var d;
3173
+ }), b(() => e.countryMetrics, () => {
3174
+ var c;
3175
3175
  n.value && n.value.isStyleLoaded() && (n.value.getLayer("countries-layer") && n.value.removeLayer("countries-layer"), n.value.addLayer({
3176
3176
  id: "countries-layer",
3177
3177
  type: "fill",
3178
3178
  source: "countries",
3179
- paint: h.value
3180
- }), n.value.removeLayer("lakes-layer"), (d = n.value) == null || d.addLayer({
3179
+ paint: p.value
3180
+ }), n.value.removeLayer("lakes-layer"), (c = n.value) == null || c.addLayer({
3181
3181
  id: "lakes-layer",
3182
3182
  type: "fill",
3183
3183
  source: "lakes",
@@ -3185,38 +3185,42 @@ const k1 = { class: "kong-ui-public-analytics-geo-map" }, M1 = ["id"], L1 = {
3185
3185
  "fill-color": "#FFFFFF"
3186
3186
  }
3187
3187
  }));
3188
- }), l0(() => e.fitToCountry, (d) => {
3189
- var p, g, x;
3190
- n.value && d ? r0(d) : !S.value.center && !S.value.zoom ? (p = n.value) == null || p.fitBounds([
3188
+ }), b(() => e.fitToCountry, (c) => {
3189
+ var f, y, m;
3190
+ n.value && c ? a0(c) : !z.value.center && !z.value.zoom ? (f = n.value) == null || f.fitBounds([
3191
3191
  [-180, -90],
3192
3192
  [180, 90]
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),
3193
+ ]) : (z.value.zoom && ((y = n.value) == null || y.setZoom(z.value.zoom)), z.value.center && ((m = n.value) == null || m.flyTo({ center: z.value.center })));
3194
+ }), b(() => e.bounds, (c, f) => {
3195
+ if (!c) return;
3196
+ const y = c == null ? void 0 : c.flat(), m = f == null ? void 0 : f.flat();
3197
+ !(y && m && y.length === m.length && y.every((k, F) => Math.round(k * 100) / 100 === Math.round(m[F] * 100) / 100)) && n.value && n.value.fitBounds(c);
3198
+ }), (c, f) => (q(), A("div", k1, [
3199
+ e0("div", {
3200
+ id: S0(o),
3197
3201
  class: "analytics-geo-map-container"
3198
3202
  }, 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", {
3202
- key: x,
3203
+ l.value ? (q(), A("div", L1, [
3204
+ c.metric ? (q(), A("div", B1, c0(g.value), 1)) : u0("", !0),
3205
+ (q(!0), A(V0, null, z0(S.value, (y, m) => (q(), A("div", {
3206
+ key: m,
3203
3207
  class: "legend-item"
3204
3208
  }, [
3205
- b("span", {
3209
+ e0("span", {
3206
3210
  class: "legend-color",
3207
- style: T0({ backgroundColor: g.color })
3211
+ style: T0({ backgroundColor: y.color })
3208
3212
  }, null, 4),
3209
- b("span", B1, c0(g.range), 1)
3213
+ e0("span", P1, c0(y.range), 1)
3210
3214
  ]))), 128))
3211
3215
  ])) : u0("", !0)
3212
3216
  ]));
3213
3217
  }
3214
- }), S1 = (e, t) => {
3218
+ }), V1 = (e, t) => {
3215
3219
  const i = e.__vccOpts || e;
3216
3220
  for (const [a, r] of t)
3217
3221
  i[a] = r;
3218
3222
  return i;
3219
- }, R1 = /* @__PURE__ */ S1(V1, [["__scopeId", "data-v-8d87bca2"]]);
3223
+ }, R1 = /* @__PURE__ */ V1(S1, [["__scopeId", "data-v-b4a93a2e"]]);
3220
3224
  export {
3221
3225
  R1 as AnalyticsGeoMap,
3222
3226
  _1 as debounce,