@kong-ui-public/analytics-geo-map 1.3.7 → 1.3.8-pr.2515.a64e9a3bc.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,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Map as
|
|
3
|
-
import { createI18n as
|
|
4
|
-
|
|
1
|
+
import { defineComponent as S0, useId as V0, ref as h0, computed as S, onMounted as z0, watch as i0, createElementBlock as I, openBlock as U, createCommentVNode as n0, createElementVNode as R, renderSlot as r0, createVNode as T0, unref as E, createTextVNode as C0, toDisplayString as Z, Fragment as D0, renderList as N0, normalizeStyle as O0 } from "vue";
|
|
2
|
+
import { Map as I0, Popup as U0 } from "maplibre-gl";
|
|
3
|
+
import { createI18n as R0, i18nTComponent as E0 } from "@kong-ui-public/i18n";
|
|
4
|
+
import { AnalyticsIcon as A0 } from "@kong/icons";
|
|
5
|
+
const H0 = {
|
|
5
6
|
ms: "ms",
|
|
6
7
|
bytes: "Byte{plural}",
|
|
7
8
|
count: "request{plural}",
|
|
8
9
|
"count/minute": "rpm",
|
|
9
10
|
requests: "request{plural}"
|
|
10
|
-
},
|
|
11
|
+
}, $0 = {
|
|
11
12
|
request_count: "Request count",
|
|
12
13
|
request_per_minute: "Requests per minute",
|
|
13
14
|
response_latency_average: "Response latency (avg)",
|
|
@@ -32,58 +33,60 @@ const U0 = {
|
|
|
32
33
|
request_size_p95: "Request size (p95)",
|
|
33
34
|
request_size_p50: "Request size (p50)",
|
|
34
35
|
request_size_sum: "Request size (sum)"
|
|
35
|
-
},
|
|
36
|
+
}, G0 = {
|
|
36
37
|
windows_zoom_help_text: "Use Ctrl + Scroll to zoom the map",
|
|
37
38
|
mac_zoom_help_text: "Use ⌘ + Scroll to zoom the map",
|
|
38
39
|
mobile_zoom_help_text: "Use two fingers to zoom the map"
|
|
39
|
-
},
|
|
40
|
-
metricUnits:
|
|
41
|
-
metrics:
|
|
42
|
-
cooperative_gestures:
|
|
40
|
+
}, q0 = "No location", K0 = "No location data found.", j0 = {
|
|
41
|
+
metricUnits: H0,
|
|
42
|
+
metrics: $0,
|
|
43
|
+
cooperative_gestures: G0,
|
|
44
|
+
no_location_data: q0,
|
|
45
|
+
no_location_data_description: K0
|
|
43
46
|
};
|
|
44
|
-
function
|
|
45
|
-
const e =
|
|
47
|
+
function W0() {
|
|
48
|
+
const e = R0("en-us", j0);
|
|
46
49
|
return {
|
|
47
50
|
i18n: e,
|
|
48
|
-
i18nT:
|
|
51
|
+
i18nT: E0(e)
|
|
49
52
|
// Translation component <i18n-t>
|
|
50
53
|
};
|
|
51
54
|
}
|
|
52
|
-
const
|
|
53
|
-
useI18n:
|
|
55
|
+
const Z0 = {
|
|
56
|
+
useI18n: W0
|
|
54
57
|
};
|
|
55
|
-
function
|
|
58
|
+
function v0(e) {
|
|
56
59
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
57
60
|
}
|
|
58
|
-
var
|
|
61
|
+
var F0 = { exports: {} };
|
|
59
62
|
(function(e) {
|
|
60
63
|
(function() {
|
|
61
|
-
function t(
|
|
62
|
-
if (
|
|
63
|
-
return
|
|
64
|
-
var u = typeof
|
|
65
|
-
return g.reverse().forEach(function(
|
|
66
|
-
|
|
67
|
-
}),
|
|
64
|
+
function t(s, l) {
|
|
65
|
+
if (l.separator === !1 || s < 1e3)
|
|
66
|
+
return s.toString();
|
|
67
|
+
var u = typeof l.separator == "string" ? l.separator : ",", y = [], g = Math.round(s).toString().split("");
|
|
68
|
+
return g.reverse().forEach(function(V, D) {
|
|
69
|
+
D && D % 3 === 0 && y.push(u), y.push(V);
|
|
70
|
+
}), y.reverse().join("");
|
|
68
71
|
}
|
|
69
|
-
function i(
|
|
70
|
-
var
|
|
71
|
-
return u.decimal === !1 ? (
|
|
72
|
+
function i(s, l, u) {
|
|
73
|
+
var y = s / l, g = u.round ? "round" : "floor";
|
|
74
|
+
return u.decimal === !1 ? (s = Math[g](y), s.toString()) : (u.precision ? s = y : s = y < 10 ? Math[g](y * 10) / 10 : Math[g](y), s = s.toString(), typeof u.decimal == "string" && (s = s.replace(".", u.decimal)), s);
|
|
72
75
|
}
|
|
73
|
-
var a = 1e3,
|
|
74
|
-
function p(
|
|
76
|
+
var a = 1e3, n = 1e4, o = 1e6, r = 1e9, d = 1e12;
|
|
77
|
+
function p(s, l) {
|
|
75
78
|
var u;
|
|
76
|
-
|
|
77
|
-
var
|
|
78
|
-
|
|
79
|
-
var g =
|
|
80
|
-
return
|
|
79
|
+
l = l || {};
|
|
80
|
+
var y = s < 0;
|
|
81
|
+
y && (s = Math.abs(s)), l.precision && (s = parseFloat(s.toPrecision(l.precision)));
|
|
82
|
+
var g = l.min10k ? n : a;
|
|
83
|
+
return s < g || l.precision && l.precision > Math.log10(s) ? u = t(i(s, 1, l), l) : s < o ? u = i(s, a, l) + "k" : s < r ? u = i(s, o, l) + "m" : s < d ? u = t(i(s, r, l), l) + "b" : u = t(i(s, d, l), l) + "t", y && (u = "-" + u), l.capital && (u = u.toUpperCase()), l.prefix && (u = l.prefix + u), l.suffix && (u = u + l.suffix), u;
|
|
81
84
|
}
|
|
82
85
|
p.addCommas = t, e.exports = p;
|
|
83
86
|
})();
|
|
84
|
-
})(
|
|
85
|
-
var
|
|
86
|
-
const
|
|
87
|
+
})(F0);
|
|
88
|
+
var J0 = F0.exports;
|
|
89
|
+
const q = /* @__PURE__ */ v0(J0), X0 = "FeatureCollection", Q0 = [
|
|
87
90
|
{
|
|
88
91
|
type: "Feature",
|
|
89
92
|
properties: {
|
|
@@ -2515,11 +2518,11 @@ const G = /* @__PURE__ */ y0(G0), q0 = "FeatureCollection", $0 = [
|
|
|
2515
2518
|
]
|
|
2516
2519
|
}
|
|
2517
2520
|
}
|
|
2518
|
-
],
|
|
2519
|
-
type:
|
|
2520
|
-
features:
|
|
2521
|
+
], Y0 = {
|
|
2522
|
+
type: X0,
|
|
2523
|
+
features: Q0
|
|
2521
2524
|
};
|
|
2522
|
-
var
|
|
2525
|
+
var b0 = te, Q, $, F, Y, e0, ee = [
|
|
2523
2526
|
"Point",
|
|
2524
2527
|
"MultiPoint",
|
|
2525
2528
|
"LineString",
|
|
@@ -2528,106 +2531,106 @@ var K0 = J0, J, I, F, Z, Q, W0 = [
|
|
|
2528
2531
|
"MultiPolygon",
|
|
2529
2532
|
"GeometryCollection"
|
|
2530
2533
|
];
|
|
2531
|
-
function
|
|
2532
|
-
|
|
2533
|
-
var t = e.readFields(
|
|
2534
|
-
return
|
|
2534
|
+
function te(e) {
|
|
2535
|
+
Y = 2, e0 = Math.pow(10, 6), F = null, Q = [], $ = [];
|
|
2536
|
+
var t = e.readFields(ie, {});
|
|
2537
|
+
return Q = null, t;
|
|
2535
2538
|
}
|
|
2536
|
-
function
|
|
2537
|
-
e === 1 ?
|
|
2539
|
+
function ie(e, t, i) {
|
|
2540
|
+
e === 1 ? Q.push(i.readString()) : e === 2 ? Y = i.readVarint() : e === 3 ? e0 = Math.pow(10, i.readVarint()) : e === 4 ? ne(i, t) : e === 5 ? _0(i, t) : e === 6 && o0(i, t);
|
|
2538
2541
|
}
|
|
2539
|
-
function
|
|
2540
|
-
return t.type = "FeatureCollection", t.features = [], e.readMessage(
|
|
2542
|
+
function ne(e, t) {
|
|
2543
|
+
return t.type = "FeatureCollection", t.features = [], e.readMessage(re, t);
|
|
2541
2544
|
}
|
|
2542
|
-
function
|
|
2545
|
+
function _0(e, t) {
|
|
2543
2546
|
t.type = "Feature";
|
|
2544
|
-
var i = e.readMessage(
|
|
2547
|
+
var i = e.readMessage(ae, t);
|
|
2545
2548
|
return "geometry" in i || (i.geometry = null), i;
|
|
2546
2549
|
}
|
|
2547
|
-
function
|
|
2548
|
-
return t.type = "Point", e.readMessage(
|
|
2550
|
+
function o0(e, t) {
|
|
2551
|
+
return t.type = "Point", e.readMessage(oe, t);
|
|
2549
2552
|
}
|
|
2550
|
-
function
|
|
2551
|
-
e === 1 ? t.features.push(
|
|
2553
|
+
function re(e, t, i) {
|
|
2554
|
+
e === 1 ? t.features.push(_0(i, {})) : e === 13 ? $.push(s0(i)) : e === 15 && b(i, t);
|
|
2552
2555
|
}
|
|
2553
|
-
function
|
|
2554
|
-
e === 1 ? t.geometry =
|
|
2556
|
+
function ae(e, t, i) {
|
|
2557
|
+
e === 1 ? t.geometry = o0(i, {}) : e === 11 ? t.id = i.readString() : e === 12 ? t.id = i.readSVarint() : e === 13 ? $.push(s0(i)) : e === 14 ? t.properties = b(i, {}) : e === 15 && b(i, t);
|
|
2555
2558
|
}
|
|
2556
|
-
function
|
|
2557
|
-
e === 1 ? t.type =
|
|
2559
|
+
function oe(e, t, i) {
|
|
2560
|
+
e === 1 ? t.type = ee[i.readVarint()] : e === 2 ? F = i.readPackedVarint() : e === 3 ? se(t, i, t.type) : e === 4 ? (t.geometries = t.geometries || [], t.geometries.push(o0(i, {}))) : e === 13 ? $.push(s0(i)) : e === 15 && b(i, t);
|
|
2558
2561
|
}
|
|
2559
|
-
function
|
|
2560
|
-
i === "Point" ? e.coordinates =
|
|
2562
|
+
function se(e, t, i) {
|
|
2563
|
+
i === "Point" ? e.coordinates = le(t) : i === "MultiPoint" || i === "LineString" ? e.coordinates = p0(t) : i === "MultiLineString" ? e.coordinates = m0(t) : i === "Polygon" ? e.coordinates = m0(t, !0) : i === "MultiPolygon" && (e.coordinates = ue(t));
|
|
2561
2564
|
}
|
|
2562
|
-
function
|
|
2565
|
+
function s0(e) {
|
|
2563
2566
|
for (var t = e.readVarint() + e.pos, i = null; e.pos < t; ) {
|
|
2564
|
-
var a = e.readVarint(),
|
|
2565
|
-
|
|
2567
|
+
var a = e.readVarint(), n = a >> 3;
|
|
2568
|
+
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()));
|
|
2566
2569
|
}
|
|
2567
2570
|
return i;
|
|
2568
2571
|
}
|
|
2569
|
-
function
|
|
2570
|
-
for (var i = e.readVarint() + e.pos; e.pos < i; ) t[
|
|
2571
|
-
return
|
|
2572
|
+
function b(e, t) {
|
|
2573
|
+
for (var i = e.readVarint() + e.pos; e.pos < i; ) t[Q[e.readVarint()]] = $[e.readVarint()];
|
|
2574
|
+
return $ = [], t;
|
|
2572
2575
|
}
|
|
2573
|
-
function
|
|
2574
|
-
for (var t = e.readVarint() + e.pos, i = []; e.pos < t; ) i.push(e.readSVarint() /
|
|
2576
|
+
function le(e) {
|
|
2577
|
+
for (var t = e.readVarint() + e.pos, i = []; e.pos < t; ) i.push(e.readSVarint() / e0);
|
|
2575
2578
|
return i;
|
|
2576
2579
|
}
|
|
2577
|
-
function
|
|
2578
|
-
var
|
|
2579
|
-
for (d = 0; d <
|
|
2580
|
-
for (; i ?
|
|
2581
|
-
for (
|
|
2582
|
-
p[d] += e.readSVarint(),
|
|
2583
|
-
o.push(
|
|
2580
|
+
function K(e, t, i, a) {
|
|
2581
|
+
var n = 0, o = [], r, d, p = [];
|
|
2582
|
+
for (d = 0; d < Y; d++) p[d] = 0;
|
|
2583
|
+
for (; i ? n < i : e.pos < t; ) {
|
|
2584
|
+
for (r = [], d = 0; d < Y; d++)
|
|
2585
|
+
p[d] += e.readSVarint(), r[d] = p[d] / e0;
|
|
2586
|
+
o.push(r), n++;
|
|
2584
2587
|
}
|
|
2585
2588
|
return a && o.push(o[0]), o;
|
|
2586
2589
|
}
|
|
2587
|
-
function
|
|
2588
|
-
return
|
|
2590
|
+
function p0(e) {
|
|
2591
|
+
return K(e, e.readVarint() + e.pos);
|
|
2589
2592
|
}
|
|
2590
|
-
function
|
|
2593
|
+
function m0(e, t) {
|
|
2591
2594
|
var i = e.readVarint() + e.pos;
|
|
2592
|
-
if (!F) return [
|
|
2593
|
-
for (var a = [],
|
|
2595
|
+
if (!F) return [K(e, i, null, t)];
|
|
2596
|
+
for (var a = [], n = 0; n < F.length; n++) a.push(K(e, i, F[n], t));
|
|
2594
2597
|
return F = null, a;
|
|
2595
2598
|
}
|
|
2596
|
-
function
|
|
2599
|
+
function ue(e) {
|
|
2597
2600
|
var t = e.readVarint() + e.pos;
|
|
2598
|
-
if (!F) return [[
|
|
2599
|
-
for (var i = [], a = 1,
|
|
2600
|
-
for (var o = [],
|
|
2601
|
+
if (!F) return [[K(e, t, null, !0)]];
|
|
2602
|
+
for (var i = [], a = 1, n = 0; n < F[0]; n++) {
|
|
2603
|
+
for (var o = [], r = 0; r < F[a]; r++) o.push(K(e, t, F[a + 1 + r], !0));
|
|
2601
2604
|
a += F[a] + 1, i.push(o);
|
|
2602
2605
|
}
|
|
2603
2606
|
return F = null, i;
|
|
2604
2607
|
}
|
|
2605
|
-
var
|
|
2608
|
+
var ce = b0, l0 = {};
|
|
2606
2609
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
2607
|
-
|
|
2608
|
-
var o,
|
|
2609
|
-
for (u +=
|
|
2610
|
+
l0.read = function(e, t, i, a, n) {
|
|
2611
|
+
var o, r, d = n * 8 - a - 1, p = (1 << d) - 1, s = p >> 1, l = -7, u = i ? n - 1 : 0, y = i ? -1 : 1, g = e[t + u];
|
|
2612
|
+
for (u += y, o = g & (1 << -l) - 1, g >>= -l, l += d; l > 0; o = o * 256 + e[t + u], u += y, l -= 8)
|
|
2610
2613
|
;
|
|
2611
|
-
for (
|
|
2614
|
+
for (r = o & (1 << -l) - 1, o >>= -l, l += a; l > 0; r = r * 256 + e[t + u], u += y, l -= 8)
|
|
2612
2615
|
;
|
|
2613
2616
|
if (o === 0)
|
|
2614
|
-
o = 1 -
|
|
2617
|
+
o = 1 - s;
|
|
2615
2618
|
else {
|
|
2616
2619
|
if (o === p)
|
|
2617
|
-
return
|
|
2618
|
-
|
|
2620
|
+
return r ? NaN : (g ? -1 : 1) * (1 / 0);
|
|
2621
|
+
r = r + Math.pow(2, a), o = o - s;
|
|
2619
2622
|
}
|
|
2620
|
-
return (g ? -1 : 1) *
|
|
2623
|
+
return (g ? -1 : 1) * r * Math.pow(2, o - a);
|
|
2621
2624
|
};
|
|
2622
|
-
|
|
2623
|
-
var
|
|
2624
|
-
for (t = Math.abs(t), isNaN(t) || t === 1 / 0 ? (d = isNaN(t) ? 1 : 0,
|
|
2625
|
+
l0.write = function(e, t, i, a, n, o) {
|
|
2626
|
+
var r, d, p, s = o * 8 - n - 1, l = (1 << s) - 1, u = l >> 1, y = n === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, g = a ? 0 : o - 1, V = a ? 1 : -1, D = t < 0 || t === 0 && 1 / t < 0 ? 1 : 0;
|
|
2627
|
+
for (t = Math.abs(t), isNaN(t) || t === 1 / 0 ? (d = isNaN(t) ? 1 : 0, r = l) : (r = Math.floor(Math.log(t) / Math.LN2), t * (p = Math.pow(2, -r)) < 1 && (r--, p *= 2), r + u >= 1 ? t += y / p : t += y * Math.pow(2, 1 - u), t * p >= 2 && (r++, p /= 2), r + u >= l ? (d = 0, r = l) : r + u >= 1 ? (d = (t * p - 1) * Math.pow(2, n), r = r + u) : (d = t * Math.pow(2, u - 1) * Math.pow(2, n), r = 0)); n >= 8; e[i + g] = d & 255, g += V, d /= 256, n -= 8)
|
|
2625
2628
|
;
|
|
2626
|
-
for (
|
|
2629
|
+
for (r = r << n | d, s += n; s > 0; e[i + g] = r & 255, g += V, r /= 256, s -= 8)
|
|
2627
2630
|
;
|
|
2628
|
-
e[i + g -
|
|
2631
|
+
e[i + g - V] |= D * 128;
|
|
2629
2632
|
};
|
|
2630
|
-
var
|
|
2633
|
+
var de = h, J = l0;
|
|
2631
2634
|
function h(e) {
|
|
2632
2635
|
this.buf = ArrayBuffer.isView && ArrayBuffer.isView(e) ? e : new Uint8Array(e || 0), this.pos = 0, this.type = 0, this.length = this.buf.length;
|
|
2633
2636
|
}
|
|
@@ -2635,7 +2638,7 @@ h.Varint = 0;
|
|
|
2635
2638
|
h.Fixed64 = 1;
|
|
2636
2639
|
h.Bytes = 2;
|
|
2637
2640
|
h.Fixed32 = 5;
|
|
2638
|
-
var
|
|
2641
|
+
var a0 = 65536 * 65536, y0 = 1 / a0, fe = 12, w0 = typeof TextDecoder > "u" ? null : new TextDecoder("utf-8");
|
|
2639
2642
|
h.prototype = {
|
|
2640
2643
|
destroy: function() {
|
|
2641
2644
|
this.buf = null;
|
|
@@ -2643,8 +2646,8 @@ h.prototype = {
|
|
|
2643
2646
|
// === READING =================================================================
|
|
2644
2647
|
readFields: function(e, t, i) {
|
|
2645
2648
|
for (i = i || this.length; this.pos < i; ) {
|
|
2646
|
-
var a = this.readVarint(),
|
|
2647
|
-
this.type = a & 7, e(
|
|
2649
|
+
var a = this.readVarint(), n = a >> 3, o = this.pos;
|
|
2650
|
+
this.type = a & 7, e(n, t, this), this.pos === o && this.skip(a);
|
|
2648
2651
|
}
|
|
2649
2652
|
return t;
|
|
2650
2653
|
},
|
|
@@ -2652,33 +2655,33 @@ h.prototype = {
|
|
|
2652
2655
|
return this.readFields(e, t, this.readVarint() + this.pos);
|
|
2653
2656
|
},
|
|
2654
2657
|
readFixed32: function() {
|
|
2655
|
-
var e =
|
|
2658
|
+
var e = X(this.buf, this.pos);
|
|
2656
2659
|
return this.pos += 4, e;
|
|
2657
2660
|
},
|
|
2658
2661
|
readSFixed32: function() {
|
|
2659
|
-
var e =
|
|
2662
|
+
var e = g0(this.buf, this.pos);
|
|
2660
2663
|
return this.pos += 4, e;
|
|
2661
2664
|
},
|
|
2662
2665
|
// 64-bit int handling is based on github.com/dpw/node-buffer-more-ints (MIT-licensed)
|
|
2663
2666
|
readFixed64: function() {
|
|
2664
|
-
var e =
|
|
2667
|
+
var e = X(this.buf, this.pos) + X(this.buf, this.pos + 4) * a0;
|
|
2665
2668
|
return this.pos += 8, e;
|
|
2666
2669
|
},
|
|
2667
2670
|
readSFixed64: function() {
|
|
2668
|
-
var e =
|
|
2671
|
+
var e = X(this.buf, this.pos) + g0(this.buf, this.pos + 4) * a0;
|
|
2669
2672
|
return this.pos += 8, e;
|
|
2670
2673
|
},
|
|
2671
2674
|
readFloat: function() {
|
|
2672
|
-
var e =
|
|
2675
|
+
var e = J.read(this.buf, this.pos, !0, 23, 4);
|
|
2673
2676
|
return this.pos += 4, e;
|
|
2674
2677
|
},
|
|
2675
2678
|
readDouble: function() {
|
|
2676
|
-
var e =
|
|
2679
|
+
var e = J.read(this.buf, this.pos, !0, 52, 8);
|
|
2677
2680
|
return this.pos += 8, e;
|
|
2678
2681
|
},
|
|
2679
2682
|
readVarint: function(e) {
|
|
2680
2683
|
var t = this.buf, i, a;
|
|
2681
|
-
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,
|
|
2684
|
+
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, he(i, e, this));
|
|
2682
2685
|
},
|
|
2683
2686
|
readVarint64: function() {
|
|
2684
2687
|
return this.readVarint(!0);
|
|
@@ -2692,7 +2695,7 @@ h.prototype = {
|
|
|
2692
2695
|
},
|
|
2693
2696
|
readString: function() {
|
|
2694
2697
|
var e = this.readVarint() + this.pos, t = this.pos;
|
|
2695
|
-
return this.pos = e, e - t >=
|
|
2698
|
+
return this.pos = e, e - t >= fe && w0 ? Pe(this.buf, t, e) : Be(this.buf, t, e);
|
|
2696
2699
|
},
|
|
2697
2700
|
readBytes: function() {
|
|
2698
2701
|
var e = this.readVarint() + this.pos, t = this.buf.subarray(this.pos, e);
|
|
@@ -2777,20 +2780,20 @@ h.prototype = {
|
|
|
2777
2780
|
return this.length = this.pos, this.pos = 0, this.buf.subarray(0, this.length);
|
|
2778
2781
|
},
|
|
2779
2782
|
writeFixed32: function(e) {
|
|
2780
|
-
this.realloc(4),
|
|
2783
|
+
this.realloc(4), H(this.buf, e, this.pos), this.pos += 4;
|
|
2781
2784
|
},
|
|
2782
2785
|
writeSFixed32: function(e) {
|
|
2783
|
-
this.realloc(4),
|
|
2786
|
+
this.realloc(4), H(this.buf, e, this.pos), this.pos += 4;
|
|
2784
2787
|
},
|
|
2785
2788
|
writeFixed64: function(e) {
|
|
2786
|
-
this.realloc(8),
|
|
2789
|
+
this.realloc(8), H(this.buf, e & -1, this.pos), H(this.buf, Math.floor(e * y0), this.pos + 4), this.pos += 8;
|
|
2787
2790
|
},
|
|
2788
2791
|
writeSFixed64: function(e) {
|
|
2789
|
-
this.realloc(8),
|
|
2792
|
+
this.realloc(8), H(this.buf, e & -1, this.pos), H(this.buf, Math.floor(e * y0), this.pos + 4), this.pos += 8;
|
|
2790
2793
|
},
|
|
2791
2794
|
writeVarint: function(e) {
|
|
2792
2795
|
if (e = +e || 0, e > 268435455 || e < 0) {
|
|
2793
|
-
|
|
2796
|
+
pe(e, this);
|
|
2794
2797
|
return;
|
|
2795
2798
|
}
|
|
2796
2799
|
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)));
|
|
@@ -2804,15 +2807,15 @@ h.prototype = {
|
|
|
2804
2807
|
writeString: function(e) {
|
|
2805
2808
|
e = String(e), this.realloc(e.length * 4), this.pos++;
|
|
2806
2809
|
var t = this.pos;
|
|
2807
|
-
this.pos =
|
|
2810
|
+
this.pos = Se(this.buf, e, this.pos);
|
|
2808
2811
|
var i = this.pos - t;
|
|
2809
|
-
i >= 128 &&
|
|
2812
|
+
i >= 128 && x0(t, i, this), this.pos = t - 1, this.writeVarint(i), this.pos += i;
|
|
2810
2813
|
},
|
|
2811
2814
|
writeFloat: function(e) {
|
|
2812
|
-
this.realloc(4),
|
|
2815
|
+
this.realloc(4), J.write(this.buf, e, this.pos, !0, 23, 4), this.pos += 4;
|
|
2813
2816
|
},
|
|
2814
2817
|
writeDouble: function(e) {
|
|
2815
|
-
this.realloc(8),
|
|
2818
|
+
this.realloc(8), J.write(this.buf, e, this.pos, !0, 52, 8), this.pos += 8;
|
|
2816
2819
|
},
|
|
2817
2820
|
writeBytes: function(e) {
|
|
2818
2821
|
var t = e.length;
|
|
@@ -2824,37 +2827,37 @@ h.prototype = {
|
|
|
2824
2827
|
var i = this.pos;
|
|
2825
2828
|
e(t, this);
|
|
2826
2829
|
var a = this.pos - i;
|
|
2827
|
-
a >= 128 &&
|
|
2830
|
+
a >= 128 && x0(i, a, this), this.pos = i - 1, this.writeVarint(a), this.pos += a;
|
|
2828
2831
|
},
|
|
2829
2832
|
writeMessage: function(e, t, i) {
|
|
2830
2833
|
this.writeTag(e, h.Bytes), this.writeRawMessage(t, i);
|
|
2831
2834
|
},
|
|
2832
2835
|
writePackedVarint: function(e, t) {
|
|
2833
|
-
t.length && this.writeMessage(e,
|
|
2836
|
+
t.length && this.writeMessage(e, xe, t);
|
|
2834
2837
|
},
|
|
2835
2838
|
writePackedSVarint: function(e, t) {
|
|
2836
|
-
t.length && this.writeMessage(e,
|
|
2839
|
+
t.length && this.writeMessage(e, ge, t);
|
|
2837
2840
|
},
|
|
2838
2841
|
writePackedBoolean: function(e, t) {
|
|
2839
|
-
t.length && this.writeMessage(e,
|
|
2842
|
+
t.length && this.writeMessage(e, _e, t);
|
|
2840
2843
|
},
|
|
2841
2844
|
writePackedFloat: function(e, t) {
|
|
2842
|
-
t.length && this.writeMessage(e,
|
|
2845
|
+
t.length && this.writeMessage(e, ve, t);
|
|
2843
2846
|
},
|
|
2844
2847
|
writePackedDouble: function(e, t) {
|
|
2845
|
-
t.length && this.writeMessage(e,
|
|
2848
|
+
t.length && this.writeMessage(e, Fe, t);
|
|
2846
2849
|
},
|
|
2847
2850
|
writePackedFixed32: function(e, t) {
|
|
2848
|
-
t.length && this.writeMessage(e,
|
|
2851
|
+
t.length && this.writeMessage(e, we, t);
|
|
2849
2852
|
},
|
|
2850
2853
|
writePackedSFixed32: function(e, t) {
|
|
2851
|
-
t.length && this.writeMessage(e,
|
|
2854
|
+
t.length && this.writeMessage(e, ke, t);
|
|
2852
2855
|
},
|
|
2853
2856
|
writePackedFixed64: function(e, t) {
|
|
2854
|
-
t.length && this.writeMessage(e,
|
|
2857
|
+
t.length && this.writeMessage(e, Me, t);
|
|
2855
2858
|
},
|
|
2856
2859
|
writePackedSFixed64: function(e, t) {
|
|
2857
|
-
t.length && this.writeMessage(e,
|
|
2860
|
+
t.length && this.writeMessage(e, Le, t);
|
|
2858
2861
|
},
|
|
2859
2862
|
writeBytesField: function(e, t) {
|
|
2860
2863
|
this.writeTag(e, h.Bytes), this.writeBytes(t);
|
|
@@ -2890,126 +2893,129 @@ h.prototype = {
|
|
|
2890
2893
|
this.writeVarintField(e, !!t);
|
|
2891
2894
|
}
|
|
2892
2895
|
};
|
|
2893
|
-
function
|
|
2894
|
-
var a = i.buf,
|
|
2895
|
-
if (o = a[i.pos++],
|
|
2896
|
+
function he(e, t, i) {
|
|
2897
|
+
var a = i.buf, n, o;
|
|
2898
|
+
if (o = a[i.pos++], n = (o & 112) >> 4, o < 128 || (o = a[i.pos++], n |= (o & 127) << 3, o < 128) || (o = a[i.pos++], n |= (o & 127) << 10, o < 128) || (o = a[i.pos++], n |= (o & 127) << 17, o < 128) || (o = a[i.pos++], n |= (o & 127) << 24, o < 128) || (o = a[i.pos++], n |= (o & 1) << 31, o < 128)) return A(e, n, t);
|
|
2896
2899
|
throw new Error("Expected varint not more than 10 bytes");
|
|
2897
2900
|
}
|
|
2898
2901
|
function M(e) {
|
|
2899
2902
|
return e.type === h.Bytes ? e.readVarint() + e.pos : e.pos + 1;
|
|
2900
2903
|
}
|
|
2901
|
-
function
|
|
2904
|
+
function A(e, t, i) {
|
|
2902
2905
|
return i ? t * 4294967296 + (e >>> 0) : (t >>> 0) * 4294967296 + (e >>> 0);
|
|
2903
2906
|
}
|
|
2904
|
-
function
|
|
2907
|
+
function pe(e, t) {
|
|
2905
2908
|
var i, a;
|
|
2906
2909
|
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)
|
|
2907
2910
|
throw new Error("Given varint doesn't fit into 10 bytes");
|
|
2908
|
-
t.realloc(10),
|
|
2911
|
+
t.realloc(10), me(i, a, t), ye(a, t);
|
|
2909
2912
|
}
|
|
2910
|
-
function
|
|
2913
|
+
function me(e, t, i) {
|
|
2911
2914
|
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;
|
|
2912
2915
|
}
|
|
2913
|
-
function
|
|
2916
|
+
function ye(e, t) {
|
|
2914
2917
|
var i = (e & 7) << 4;
|
|
2915
2918
|
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)))));
|
|
2916
2919
|
}
|
|
2917
|
-
function
|
|
2920
|
+
function x0(e, t, i) {
|
|
2918
2921
|
var a = t <= 16383 ? 1 : t <= 2097151 ? 2 : t <= 268435455 ? 3 : Math.floor(Math.log(t) / (Math.LN2 * 7));
|
|
2919
2922
|
i.realloc(a);
|
|
2920
|
-
for (var
|
|
2923
|
+
for (var n = i.pos - 1; n >= e; n--) i.buf[n + a] = i.buf[n];
|
|
2921
2924
|
}
|
|
2922
|
-
function
|
|
2925
|
+
function xe(e, t) {
|
|
2923
2926
|
for (var i = 0; i < e.length; i++) t.writeVarint(e[i]);
|
|
2924
2927
|
}
|
|
2925
|
-
function
|
|
2928
|
+
function ge(e, t) {
|
|
2926
2929
|
for (var i = 0; i < e.length; i++) t.writeSVarint(e[i]);
|
|
2927
2930
|
}
|
|
2928
|
-
function
|
|
2931
|
+
function ve(e, t) {
|
|
2929
2932
|
for (var i = 0; i < e.length; i++) t.writeFloat(e[i]);
|
|
2930
2933
|
}
|
|
2931
|
-
function
|
|
2934
|
+
function Fe(e, t) {
|
|
2932
2935
|
for (var i = 0; i < e.length; i++) t.writeDouble(e[i]);
|
|
2933
2936
|
}
|
|
2934
|
-
function
|
|
2937
|
+
function _e(e, t) {
|
|
2935
2938
|
for (var i = 0; i < e.length; i++) t.writeBoolean(e[i]);
|
|
2936
2939
|
}
|
|
2937
|
-
function
|
|
2940
|
+
function we(e, t) {
|
|
2938
2941
|
for (var i = 0; i < e.length; i++) t.writeFixed32(e[i]);
|
|
2939
2942
|
}
|
|
2940
|
-
function
|
|
2943
|
+
function ke(e, t) {
|
|
2941
2944
|
for (var i = 0; i < e.length; i++) t.writeSFixed32(e[i]);
|
|
2942
2945
|
}
|
|
2943
|
-
function
|
|
2946
|
+
function Me(e, t) {
|
|
2944
2947
|
for (var i = 0; i < e.length; i++) t.writeFixed64(e[i]);
|
|
2945
2948
|
}
|
|
2946
|
-
function
|
|
2949
|
+
function Le(e, t) {
|
|
2947
2950
|
for (var i = 0; i < e.length; i++) t.writeSFixed64(e[i]);
|
|
2948
2951
|
}
|
|
2949
|
-
function
|
|
2952
|
+
function X(e, t) {
|
|
2950
2953
|
return (e[t] | e[t + 1] << 8 | e[t + 2] << 16) + e[t + 3] * 16777216;
|
|
2951
2954
|
}
|
|
2952
|
-
function
|
|
2955
|
+
function H(e, t, i) {
|
|
2953
2956
|
e[i] = t, e[i + 1] = t >>> 8, e[i + 2] = t >>> 16, e[i + 3] = t >>> 24;
|
|
2954
2957
|
}
|
|
2955
|
-
function
|
|
2958
|
+
function g0(e, t) {
|
|
2956
2959
|
return (e[t] | e[t + 1] << 8 | e[t + 2] << 16) + (e[t + 3] << 24);
|
|
2957
2960
|
}
|
|
2958
|
-
function
|
|
2959
|
-
for (var a = "",
|
|
2960
|
-
var o = e[
|
|
2961
|
-
if (
|
|
2962
|
-
var p,
|
|
2963
|
-
d === 1 ? o < 128 && (
|
|
2961
|
+
function Be(e, t, i) {
|
|
2962
|
+
for (var a = "", n = t; n < i; ) {
|
|
2963
|
+
var o = e[n], r = null, d = o > 239 ? 4 : o > 223 ? 3 : o > 191 ? 2 : 1;
|
|
2964
|
+
if (n + d > i) break;
|
|
2965
|
+
var p, s, l;
|
|
2966
|
+
d === 1 ? o < 128 && (r = o) : d === 2 ? (p = e[n + 1], (p & 192) === 128 && (r = (o & 31) << 6 | p & 63, r <= 127 && (r = null))) : d === 3 ? (p = e[n + 1], s = e[n + 2], (p & 192) === 128 && (s & 192) === 128 && (r = (o & 15) << 12 | (p & 63) << 6 | s & 63, (r <= 2047 || r >= 55296 && r <= 57343) && (r = null))) : d === 4 && (p = e[n + 1], s = e[n + 2], l = e[n + 3], (p & 192) === 128 && (s & 192) === 128 && (l & 192) === 128 && (r = (o & 15) << 18 | (p & 63) << 12 | (s & 63) << 6 | l & 63, (r <= 65535 || r >= 1114112) && (r = null))), r === null ? (r = 65533, d = 1) : r > 65535 && (r -= 65536, a += String.fromCharCode(r >>> 10 & 1023 | 55296), r = 56320 | r & 1023), a += String.fromCharCode(r), n += d;
|
|
2964
2967
|
}
|
|
2965
2968
|
return a;
|
|
2966
2969
|
}
|
|
2967
|
-
function
|
|
2968
|
-
return
|
|
2970
|
+
function Pe(e, t, i) {
|
|
2971
|
+
return w0.decode(e.subarray(t, i));
|
|
2969
2972
|
}
|
|
2970
|
-
function
|
|
2971
|
-
for (var a = 0,
|
|
2972
|
-
if (
|
|
2973
|
+
function Se(e, t, i) {
|
|
2974
|
+
for (var a = 0, n, o; a < t.length; a++) {
|
|
2975
|
+
if (n = t.charCodeAt(a), n > 55295 && n < 57344)
|
|
2973
2976
|
if (o)
|
|
2974
|
-
if (
|
|
2975
|
-
e[i++] = 239, e[i++] = 191, e[i++] = 189, o =
|
|
2977
|
+
if (n < 56320) {
|
|
2978
|
+
e[i++] = 239, e[i++] = 191, e[i++] = 189, o = n;
|
|
2976
2979
|
continue;
|
|
2977
2980
|
} else
|
|
2978
|
-
|
|
2981
|
+
n = o - 55296 << 10 | n - 56320 | 65536, o = null;
|
|
2979
2982
|
else {
|
|
2980
|
-
|
|
2983
|
+
n > 56319 || a + 1 === t.length ? (e[i++] = 239, e[i++] = 191, e[i++] = 189) : o = n;
|
|
2981
2984
|
continue;
|
|
2982
2985
|
}
|
|
2983
2986
|
else o && (e[i++] = 239, e[i++] = 191, e[i++] = 189, o = null);
|
|
2984
|
-
|
|
2987
|
+
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);
|
|
2985
2988
|
}
|
|
2986
2989
|
return i;
|
|
2987
2990
|
}
|
|
2988
|
-
const
|
|
2989
|
-
var a,
|
|
2991
|
+
const Ve = /* @__PURE__ */ v0(de), Ze = (e) => {
|
|
2992
|
+
var a, n;
|
|
2990
2993
|
if (!e || !e.data)
|
|
2991
2994
|
return {};
|
|
2992
2995
|
const t = {}, i = e.data;
|
|
2993
2996
|
if (i)
|
|
2994
2997
|
for (const o of i) {
|
|
2995
|
-
const
|
|
2996
|
-
|
|
2998
|
+
const r = (a = o == null ? void 0 : o.event) == null ? void 0 : a.country_code, d = (n = e.meta.metric_names) == null ? void 0 : n[0];
|
|
2999
|
+
r && (t[r] = d ? o.event[d] : 0);
|
|
2997
3000
|
}
|
|
2998
3001
|
return t;
|
|
2999
3002
|
};
|
|
3000
|
-
function
|
|
3003
|
+
function ze(e, t = 0) {
|
|
3001
3004
|
let i = null;
|
|
3002
3005
|
return (...a) => {
|
|
3003
3006
|
i && clearTimeout(i), i = setTimeout(() => e(...a), t);
|
|
3004
3007
|
};
|
|
3005
3008
|
}
|
|
3006
|
-
const
|
|
3009
|
+
const Te = "#828a9e", Ce = "32px", De = { class: "kong-ui-public-analytics-geo-map" }, Ne = {
|
|
3007
3010
|
key: 0,
|
|
3011
|
+
class: "no-location-overlay"
|
|
3012
|
+
}, Oe = { class: "no-location-overlay-title" }, Ie = { class: "no-location-overlay-description" }, Ue = ["id"], Re = {
|
|
3013
|
+
key: 1,
|
|
3008
3014
|
class: "legend"
|
|
3009
|
-
},
|
|
3015
|
+
}, Ee = {
|
|
3010
3016
|
key: 0,
|
|
3011
3017
|
class: "legend-title"
|
|
3012
|
-
},
|
|
3018
|
+
}, Ae = { class: "legend-text" }, He = /* @__PURE__ */ S0({
|
|
3013
3019
|
__name: "AnalyticsGeoMap",
|
|
3014
3020
|
props: {
|
|
3015
3021
|
countryMetrics: {},
|
|
@@ -3024,7 +3030,7 @@ const M1 = { class: "kong-ui-public-analytics-geo-map" }, L1 = ["id"], B1 = {
|
|
|
3024
3030
|
},
|
|
3025
3031
|
emits: ["boundsChange"],
|
|
3026
3032
|
setup(e, { emit: t }) {
|
|
3027
|
-
const i = import("./countries-simple-geo-BFUDnSiE.js").then((c) => c.default), a = t, { i18n:
|
|
3033
|
+
const i = import("./countries-simple-geo-BFUDnSiE.js").then((c) => c.default), a = t, { i18n: n } = Z0.useI18n(), o = V0(), r = h0(), d = h0(null), p = S(() => Object.keys(e.countryMetrics).length === 0 && !e.fitToCountry), s = S(() => ({
|
|
3028
3034
|
"fill-color": [
|
|
3029
3035
|
"match",
|
|
3030
3036
|
[
|
|
@@ -3039,56 +3045,56 @@ const M1 = { class: "kong-ui-public-analytics-geo-map" }, L1 = ["id"], B1 = {
|
|
|
3039
3045
|
],
|
|
3040
3046
|
...Object.keys(e.countryMetrics).length ? Object.entries(e.countryMetrics).flatMap(([c, f]) => [
|
|
3041
3047
|
c,
|
|
3042
|
-
|
|
3048
|
+
g(f)
|
|
3043
3049
|
]) : ["#ccc", "#ccc"],
|
|
3044
3050
|
"#ccc"
|
|
3045
3051
|
// default color if no match
|
|
3046
3052
|
],
|
|
3047
3053
|
"fill-opacity": 0.7
|
|
3048
|
-
})), l =
|
|
3049
|
-
const f = Math.log(c), m = (
|
|
3050
|
-
return f >=
|
|
3051
|
-
},
|
|
3052
|
-
const f = (
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
|
|
3054
|
+
})), l = S(() => e.withLegend && Object.keys(e.countryMetrics).length > 0), u = S(() => Math.log(Math.min(...Object.values(e.countryMetrics)))), y = S(() => Math.log(Math.max(...Object.values(e.countryMetrics)))), g = (c) => {
|
|
3055
|
+
const f = Math.log(c), m = (y.value - u.value) / 5;
|
|
3056
|
+
return f >= u.value + 4 * m ? "#296378" : f >= u.value + 3 * m ? "#0D8093" : f >= u.value + 2 * m ? "#009FA9" : f >= u.value + 1 * m ? "#00BDB7" : "#0CDCBD";
|
|
3057
|
+
}, V = S(() => e.metric && n.t(`metrics.${e.metric}`) || ""), D = S(() => {
|
|
3058
|
+
const f = (y.value - u.value) / 5, x = [
|
|
3059
|
+
u.value + 4 * f,
|
|
3060
|
+
u.value + 3 * f,
|
|
3061
|
+
u.value + 2 * f,
|
|
3062
|
+
u.value + 1 * f,
|
|
3063
|
+
u.value
|
|
3058
3064
|
];
|
|
3059
|
-
return
|
|
3060
|
-
const k = w === 0 ?
|
|
3065
|
+
return x.map((m, w) => {
|
|
3066
|
+
const k = w === 0 ? y.value : x[w - 1];
|
|
3061
3067
|
let v = "";
|
|
3062
|
-
return w === 0 ? v = `> ${
|
|
3063
|
-
color:
|
|
3068
|
+
return w === 0 ? v = `> ${q(Math.trunc(Math.exp(m)), { capital: !0 })}` : w === x.length - 1 ? v = `< ${q(Math.trunc(Math.exp(k)), { capital: !0 })}` : v = `${q(Math.trunc(Math.exp(m)), { capital: !0 })} - ${q(Math.trunc(Math.exp(k)), { capital: !0 })}`, {
|
|
3069
|
+
color: g(Math.exp(m)),
|
|
3064
3070
|
range: v
|
|
3065
3071
|
};
|
|
3066
3072
|
});
|
|
3067
|
-
}),
|
|
3073
|
+
}), u0 = (c) => {
|
|
3068
3074
|
const f = c.flat(1);
|
|
3069
|
-
return Array.isArray(f[0]) && Array.isArray(f[0][0]) ?
|
|
3070
|
-
},
|
|
3071
|
-
var
|
|
3075
|
+
return Array.isArray(f[0]) && Array.isArray(f[0][0]) ? u0(f) : f;
|
|
3076
|
+
}, c0 = (c) => {
|
|
3077
|
+
var x, m, w, k, v, N, G;
|
|
3072
3078
|
if (c === "RU") {
|
|
3073
|
-
(
|
|
3079
|
+
(x = r.value) == null || x.fitBounds([
|
|
3074
3080
|
[20, 40],
|
|
3075
3081
|
[180, 80]
|
|
3076
3082
|
]);
|
|
3077
3083
|
return;
|
|
3078
3084
|
} else if (c === "US") {
|
|
3079
|
-
(m =
|
|
3085
|
+
(m = r.value) == null || m.fitBounds([
|
|
3080
3086
|
[-130, 20],
|
|
3081
3087
|
[-60, 50]
|
|
3082
3088
|
]);
|
|
3083
3089
|
return;
|
|
3084
3090
|
} else if (c === "FR") {
|
|
3085
|
-
(w =
|
|
3091
|
+
(w = r.value) == null || w.fitBounds([
|
|
3086
3092
|
[-5, 42],
|
|
3087
3093
|
[9, 51]
|
|
3088
3094
|
]);
|
|
3089
3095
|
return;
|
|
3090
3096
|
} else if (c === "NO") {
|
|
3091
|
-
(k =
|
|
3097
|
+
(k = r.value) == null || k.fitBounds([
|
|
3092
3098
|
[4, 57],
|
|
3093
3099
|
[32, 71]
|
|
3094
3100
|
]);
|
|
@@ -3101,13 +3107,13 @@ const M1 = { class: "kong-ui-public-analytics-geo-map" }, L1 = ["id"], B1 = {
|
|
|
3101
3107
|
if (f) {
|
|
3102
3108
|
const _ = (N = f.geometry) == null ? void 0 : N.coordinates;
|
|
3103
3109
|
if (!_) return;
|
|
3104
|
-
const L =
|
|
3105
|
-
(
|
|
3106
|
-
[
|
|
3107
|
-
[
|
|
3110
|
+
const L = u0(_), B = L.map((O) => O[1]), P = L.map((O) => O[0]), T = Math.min(...B), C = Math.max(...B), j = Math.min(...P), W = Math.max(...P);
|
|
3111
|
+
(G = r.value) == null || G.fitBounds([
|
|
3112
|
+
[j, T],
|
|
3113
|
+
[W, C]
|
|
3108
3114
|
]);
|
|
3109
3115
|
}
|
|
3110
|
-
}, z =
|
|
3116
|
+
}, z = S(() => {
|
|
3111
3117
|
const c = {
|
|
3112
3118
|
container: o,
|
|
3113
3119
|
style: { version: 8, sources: {}, layers: [] },
|
|
@@ -3120,38 +3126,38 @@ const M1 = { class: "kong-ui-public-analytics-geo-map" }, L1 = ["id"], B1 = {
|
|
|
3120
3126
|
],
|
|
3121
3127
|
cooperativeGestures: !0,
|
|
3122
3128
|
locale: {
|
|
3123
|
-
"CooperativeGesturesHandler.WindowsHelpText":
|
|
3124
|
-
"CooperativeGesturesHandler.MacHelpText":
|
|
3125
|
-
"CooperativeGesturesHandler.MobileHelpText":
|
|
3129
|
+
"CooperativeGesturesHandler.WindowsHelpText": n.t("cooperative_gestures.windows_zoom_help_text"),
|
|
3130
|
+
"CooperativeGesturesHandler.MacHelpText": n.t("cooperative_gestures.mac_zoom_help_text"),
|
|
3131
|
+
"CooperativeGesturesHandler.MobileHelpText": n.t("cooperative_gestures.mobile_zoom_help_text")
|
|
3126
3132
|
}
|
|
3127
3133
|
};
|
|
3128
3134
|
return e.bounds && (c.bounds = e.bounds), c;
|
|
3129
|
-
}),
|
|
3130
|
-
if (!
|
|
3131
|
-
const c =
|
|
3135
|
+
}), k0 = ze(() => {
|
|
3136
|
+
if (!r.value) return;
|
|
3137
|
+
const c = r.value.getBounds(), f = c.getSouthWest(), x = c.getNorthEast();
|
|
3132
3138
|
a("boundsChange", [
|
|
3133
3139
|
[f.lng, f.lat],
|
|
3134
|
-
[
|
|
3140
|
+
[x.lng, x.lat]
|
|
3135
3141
|
]);
|
|
3136
3142
|
}, 300);
|
|
3137
|
-
return
|
|
3138
|
-
var c, f,
|
|
3143
|
+
return z0(async () => {
|
|
3144
|
+
var c, f, x;
|
|
3139
3145
|
try {
|
|
3140
|
-
const m = await i, w = await fetch(m), k = new Uint8Array(await w.arrayBuffer()), v =
|
|
3141
|
-
d.value = v,
|
|
3142
|
-
var
|
|
3143
|
-
(
|
|
3146
|
+
const m = await i, w = await fetch(m), k = new Uint8Array(await w.arrayBuffer()), v = ce(new Ve(k));
|
|
3147
|
+
d.value = v, r.value = new I0(z.value), r.value.on("load", () => {
|
|
3148
|
+
var G, _, L, B, P, T, C;
|
|
3149
|
+
(G = r.value) == null || G.addSource("countries", {
|
|
3144
3150
|
type: "geojson",
|
|
3145
3151
|
data: v
|
|
3146
|
-
}), (_ =
|
|
3152
|
+
}), (_ = r.value) == null || _.addLayer({
|
|
3147
3153
|
id: "countries-layer",
|
|
3148
3154
|
type: "fill",
|
|
3149
3155
|
source: "countries",
|
|
3150
|
-
paint:
|
|
3151
|
-
}), (L =
|
|
3156
|
+
paint: s.value
|
|
3157
|
+
}), (L = r.value) == null || L.addSource("lakes", {
|
|
3152
3158
|
type: "geojson",
|
|
3153
|
-
data:
|
|
3154
|
-
}), (B =
|
|
3159
|
+
data: Y0
|
|
3160
|
+
}), (B = r.value) == null || B.addLayer({
|
|
3155
3161
|
id: "lakes-layer",
|
|
3156
3162
|
type: "fill",
|
|
3157
3163
|
source: "lakes",
|
|
@@ -3159,36 +3165,36 @@ const M1 = { class: "kong-ui-public-analytics-geo-map" }, L1 = ["id"], B1 = {
|
|
|
3159
3165
|
"fill-color": "#FFFFFF"
|
|
3160
3166
|
}
|
|
3161
3167
|
});
|
|
3162
|
-
const N = new
|
|
3168
|
+
const N = new U0({
|
|
3163
3169
|
closeButton: !1,
|
|
3164
3170
|
closeOnClick: !1
|
|
3165
3171
|
});
|
|
3166
|
-
(P =
|
|
3167
|
-
var
|
|
3168
|
-
const
|
|
3169
|
-
if (
|
|
3170
|
-
const { iso_a2:
|
|
3171
|
-
if (
|
|
3172
|
-
const
|
|
3173
|
-
N.setLngLat(
|
|
3172
|
+
(P = r.value) == null || P.on("mousemove", "countries-layer", (j) => {
|
|
3173
|
+
var O;
|
|
3174
|
+
const W = (O = j.features) == null ? void 0 : O[0];
|
|
3175
|
+
if (W) {
|
|
3176
|
+
const { iso_a2: d0, iso_a2_eh: M0, ISO_A2: L0, admin: f0 } = W.properties, B0 = L0 ?? d0 === "-99" ? M0 : d0, t0 = e.countryMetrics[B0];
|
|
3177
|
+
if (t0 !== void 0) {
|
|
3178
|
+
const P0 = e.showTooltipValue ? `<strong>${f0}</strong>: ${q(t0, { capital: !0 })} ${n.t(`metricUnits.${e.metricUnit}`, { plural: t0 > 1 ? "s" : "" })}` : `<strong>${f0}</strong>`;
|
|
3179
|
+
N.setLngLat(j.lngLat).setHTML(P0).addTo(r.value);
|
|
3174
3180
|
} else
|
|
3175
3181
|
N.remove();
|
|
3176
3182
|
}
|
|
3177
|
-
}), (T =
|
|
3183
|
+
}), (T = r.value) == null || T.on("mouseleave", "countries-layer", () => {
|
|
3178
3184
|
N.remove();
|
|
3179
|
-
}), (C =
|
|
3180
|
-
}), (c =
|
|
3185
|
+
}), (C = r.value) == null || C.on("move", k0), e.fitToCountry && c0(e.fitToCountry);
|
|
3186
|
+
}), (c = r.value) == null || c.dragRotate.disable(), (f = r.value) == null || f.keyboard.disable(), (x = r.value) == null || x.touchZoomRotate.disableRotation();
|
|
3181
3187
|
} catch (m) {
|
|
3182
3188
|
console.error(m);
|
|
3183
3189
|
}
|
|
3184
|
-
}),
|
|
3190
|
+
}), i0(() => e.countryMetrics, () => {
|
|
3185
3191
|
var c;
|
|
3186
|
-
|
|
3192
|
+
r.value && r.value.isStyleLoaded() && (r.value.getLayer("countries-layer") && r.value.removeLayer("countries-layer"), r.value.addLayer({
|
|
3187
3193
|
id: "countries-layer",
|
|
3188
3194
|
type: "fill",
|
|
3189
3195
|
source: "countries",
|
|
3190
|
-
paint:
|
|
3191
|
-
}),
|
|
3196
|
+
paint: s.value
|
|
3197
|
+
}), r.value.removeLayer("lakes-layer"), (c = r.value) == null || c.addLayer({
|
|
3192
3198
|
id: "lakes-layer",
|
|
3193
3199
|
type: "fill",
|
|
3194
3200
|
source: "lakes",
|
|
@@ -3196,44 +3202,62 @@ const M1 = { class: "kong-ui-public-analytics-geo-map" }, L1 = ["id"], B1 = {
|
|
|
3196
3202
|
"fill-color": "#FFFFFF"
|
|
3197
3203
|
}
|
|
3198
3204
|
}));
|
|
3199
|
-
}),
|
|
3200
|
-
var f,
|
|
3201
|
-
|
|
3205
|
+
}), i0(() => e.fitToCountry, (c) => {
|
|
3206
|
+
var f, x, m;
|
|
3207
|
+
r.value && c ? c0(c) : !z.value.center && !z.value.zoom ? (f = r.value) == null || f.fitBounds([
|
|
3202
3208
|
[-180, -90],
|
|
3203
3209
|
[180, 90]
|
|
3204
|
-
]) : (z.value.zoom && ((
|
|
3205
|
-
}),
|
|
3210
|
+
]) : (z.value.zoom && ((x = r.value) == null || x.setZoom(z.value.zoom)), z.value.center && ((m = r.value) == null || m.flyTo({ center: z.value.center })));
|
|
3211
|
+
}), i0(() => e.bounds, (c, f) => {
|
|
3206
3212
|
if (!c) return;
|
|
3207
|
-
const
|
|
3208
|
-
!(
|
|
3209
|
-
}), (c, f) => (
|
|
3210
|
-
|
|
3211
|
-
|
|
3213
|
+
const x = c == null ? void 0 : c.flat(), m = f == null ? void 0 : f.flat();
|
|
3214
|
+
!(x && m && x.length === m.length && x.every((k, v) => Math.round(k * 100) / 100 === Math.round(m[v] * 100) / 100)) && r.value && r.value.fitBounds(c);
|
|
3215
|
+
}), (c, f) => (U(), I("div", De, [
|
|
3216
|
+
p.value ? (U(), I("div", Ne, [
|
|
3217
|
+
r0(c.$slots, "no-location-icon", {}, () => [
|
|
3218
|
+
T0(E(A0), {
|
|
3219
|
+
color: E(Te),
|
|
3220
|
+
size: E(Ce)
|
|
3221
|
+
}, null, 8, ["color", "size"])
|
|
3222
|
+
], !0),
|
|
3223
|
+
R("div", Oe, [
|
|
3224
|
+
r0(c.$slots, "no-location-title", {}, () => [
|
|
3225
|
+
C0(Z(E(n).t("no_location_data")), 1)
|
|
3226
|
+
], !0)
|
|
3227
|
+
]),
|
|
3228
|
+
R("div", Ie, [
|
|
3229
|
+
r0(c.$slots, "no-location-description", {}, () => [
|
|
3230
|
+
R("p", null, Z(E(n).t("no_location_data_description")), 1)
|
|
3231
|
+
], !0)
|
|
3232
|
+
])
|
|
3233
|
+
])) : n0("", !0),
|
|
3234
|
+
R("div", {
|
|
3235
|
+
id: E(o),
|
|
3212
3236
|
class: "analytics-geo-map-container"
|
|
3213
|
-
}, null, 8,
|
|
3214
|
-
l.value ? (
|
|
3215
|
-
c.metric ? (
|
|
3216
|
-
(
|
|
3237
|
+
}, null, 8, Ue),
|
|
3238
|
+
l.value ? (U(), I("div", Re, [
|
|
3239
|
+
c.metric ? (U(), I("div", Ee, Z(V.value), 1)) : n0("", !0),
|
|
3240
|
+
(U(!0), I(D0, null, N0(D.value, (x, m) => (U(), I("div", {
|
|
3217
3241
|
key: m,
|
|
3218
3242
|
class: "legend-item"
|
|
3219
3243
|
}, [
|
|
3220
|
-
|
|
3244
|
+
R("span", {
|
|
3221
3245
|
class: "legend-color",
|
|
3222
|
-
style:
|
|
3246
|
+
style: O0({ backgroundColor: x.color })
|
|
3223
3247
|
}, null, 4),
|
|
3224
|
-
|
|
3248
|
+
R("span", Ae, Z(x.range), 1)
|
|
3225
3249
|
]))), 128))
|
|
3226
|
-
])) :
|
|
3250
|
+
])) : n0("", !0)
|
|
3227
3251
|
]));
|
|
3228
3252
|
}
|
|
3229
|
-
}),
|
|
3253
|
+
}), $e = (e, t) => {
|
|
3230
3254
|
const i = e.__vccOpts || e;
|
|
3231
|
-
for (const [a,
|
|
3232
|
-
i[a] =
|
|
3255
|
+
for (const [a, n] of t)
|
|
3256
|
+
i[a] = n;
|
|
3233
3257
|
return i;
|
|
3234
|
-
},
|
|
3258
|
+
}, Je = /* @__PURE__ */ $e(He, [["__scopeId", "data-v-21d6813d"]]);
|
|
3235
3259
|
export {
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3260
|
+
Je as AnalyticsGeoMap,
|
|
3261
|
+
ze as debounce,
|
|
3262
|
+
Ze as exploreResultToCountryMetrics
|
|
3239
3263
|
};
|