gralobe 1.0.34 → 1.0.35
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.
- package/dist/gralobe.js +91 -91
- package/dist/gralobe.js.map +1 -1
- package/dist/gralobe.umd.cjs +1 -1
- package/dist/gralobe.umd.cjs.map +1 -1
- package/package.json +1 -1
package/dist/gralobe.js
CHANGED
|
@@ -35,8 +35,8 @@ var ue = {
|
|
|
35
35
|
return typeof window < "u";
|
|
36
36
|
}, Rt = function(e) {
|
|
37
37
|
return G(e) || K(e);
|
|
38
|
-
},
|
|
39
|
-
}, q = Array.isArray, hi = /(?:-?\.?\d|\.)+/gi,
|
|
38
|
+
}, Ln = typeof ArrayBuffer == "function" && ArrayBuffer.isView || function() {
|
|
39
|
+
}, q = Array.isArray, hi = /(?:-?\.?\d|\.)+/gi, In = /[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g, et = /[-+=.]*\d+[.e-]*\d*[a-z%]*/g, Xt = /[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi, On = /[+-]=-?[.\d]+/, kn = /[^,'"\[\]\s]+/gi, Yr = /^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i, N, xe, ci, Si, de = {}, Bt = {}, Fn, Un = function(e) {
|
|
40
40
|
return (Bt = lt(e, de)) && ae;
|
|
41
41
|
}, Mi = function(e, t) {
|
|
42
42
|
return console.warn("Invalid property", e, "set to", t, "Missing plugin? gsap.registerPlugin()");
|
|
@@ -55,7 +55,7 @@ var ue = {
|
|
|
55
55
|
kill: !1
|
|
56
56
|
}, Kr = {
|
|
57
57
|
suppressEvents: !0
|
|
58
|
-
}, Di = {},
|
|
58
|
+
}, Di = {}, Ie = [], ui = {}, Nn, le = {}, qt = {}, Wi = 30, Ut = [], Ri = "", Li = function(e) {
|
|
59
59
|
var t = e[0], i, n;
|
|
60
60
|
if (we(t) || G(t) || (e = [e]), !(i = (t._gsap || {}).harness)) {
|
|
61
61
|
for (n = Ut.length; n-- && !Ut[n].targetTest(t); )
|
|
@@ -66,7 +66,7 @@ var ue = {
|
|
|
66
66
|
e[n] && (e[n]._gsap || (e[n]._gsap = new hr(e[n], i))) || e.splice(n, 1);
|
|
67
67
|
return e;
|
|
68
68
|
}, He = function(e) {
|
|
69
|
-
return e._gsap ||
|
|
69
|
+
return e._gsap || Li(_e(e))[0]._gsap;
|
|
70
70
|
}, Bn = function(e, t, i) {
|
|
71
71
|
return (i = e[t]) && G(i) ? e[t]() : Ai(i) && e.getAttribute && e.getAttribute(t) || i;
|
|
72
72
|
}, ne = function(e, t) {
|
|
@@ -83,13 +83,13 @@ var ue = {
|
|
|
83
83
|
;
|
|
84
84
|
return n < i;
|
|
85
85
|
}, $t = function() {
|
|
86
|
-
var e =
|
|
87
|
-
for (ui = {},
|
|
86
|
+
var e = Ie.length, t = Ie.slice(0), i, n;
|
|
87
|
+
for (ui = {}, Ie.length = 0, i = 0; i < e; i++)
|
|
88
88
|
n = t[i], n && n._lazy && (n.render(n._lazy[0], n._lazy[1], !0)._lazy = 0);
|
|
89
|
-
},
|
|
89
|
+
}, Ii = function(e) {
|
|
90
90
|
return !!(e._initted || e._startAt || e.add);
|
|
91
91
|
}, $n = function(e, t, i, n) {
|
|
92
|
-
|
|
92
|
+
Ie.length && !W && $t(), e.render(t, i, !!(W && t < 0 && Ii(e))), Ie.length && !W && $t();
|
|
93
93
|
}, Gn = function(e) {
|
|
94
94
|
var t = parseFloat(e);
|
|
95
95
|
return (t || t === 0) && (e + "").match(kn).length < 2 ? t : K(e) ? e.trim() : e;
|
|
@@ -180,7 +180,7 @@ var ue = {
|
|
|
180
180
|
if (ki(e, t, r), !e._initted)
|
|
181
181
|
return 1;
|
|
182
182
|
if (!i && e._pt && !W && (e._dur && e.vars.lazy !== !1 || !e._dur && e.vars.lazy) && Nn !== he.frame)
|
|
183
|
-
return
|
|
183
|
+
return Ie.push(e), e._lazy = [r, n], 1;
|
|
184
184
|
}, es = function a(e) {
|
|
185
185
|
var t = e.parent;
|
|
186
186
|
return t && t._ts && t._initted && !t._lock && (t.rawTime() < 0 || a(t));
|
|
@@ -376,7 +376,7 @@ var ue = {
|
|
|
376
376
|
}, ce = function(e, t, i) {
|
|
377
377
|
var n = e.vars, r = n[t], s = z, o = e._ctx, l, h, c;
|
|
378
378
|
if (r)
|
|
379
|
-
return l = n[t + "Params"], h = n.callbackScope || e, i &&
|
|
379
|
+
return l = n[t + "Params"], h = n.callbackScope || e, i && Ie.length && $t(), o && (z = o), c = l ? r.apply(h, l) : r.call(h), z = s, c;
|
|
380
380
|
}, _t = function(e) {
|
|
381
381
|
return ke(e), e.scrollTrigger && e.scrollTrigger.kill(!!W), e.progress() < 1 && ce(e, "onInterrupt"), e;
|
|
382
382
|
}, tt, tr = [], ir = function(e) {
|
|
@@ -441,7 +441,7 @@ var ue = {
|
|
|
441
441
|
if (n = p = e.match(hi), !t)
|
|
442
442
|
l = +n[0] % 360 / 360, h = +n[1] / 100, c = +n[2] / 100, s = c <= 0.5 ? c * (h + 1) : c + h - c * h, r = c * 2 - s, n.length > 3 && (n[3] *= 1), n[0] = Qt(l + 1 / 3, r, s), n[1] = Qt(l, r, s), n[2] = Qt(l - 1 / 3, r, s);
|
|
443
443
|
else if (~e.indexOf("="))
|
|
444
|
-
return n = e.match(
|
|
444
|
+
return n = e.match(In), i && n.length < 4 && (n[3] = 1), n;
|
|
445
445
|
} else
|
|
446
446
|
n = e.match(hi) || yt.transparent;
|
|
447
447
|
n = n.map(Number);
|
|
@@ -678,7 +678,7 @@ var hr = function(e, t) {
|
|
|
678
678
|
}, e.revert = function(i) {
|
|
679
679
|
i === void 0 && (i = Kr);
|
|
680
680
|
var n = W;
|
|
681
|
-
return W = i,
|
|
681
|
+
return W = i, Ii(this) && (this.timeline && this.timeline.revert(i), this.totalTime(-0.01, i.suppressEvents)), this.data !== "nested" && i.kill !== !1 && this.kill(), W = n, this;
|
|
682
682
|
}, e.globalTime = function(i) {
|
|
683
683
|
for (var n = this, r = arguments.length ? i : n.rawTime(); n; )
|
|
684
684
|
r = n._start + r / (Math.abs(n._ts) || 1), n = n._dp;
|
|
@@ -806,7 +806,7 @@ var J = /* @__PURE__ */ (function(a) {
|
|
|
806
806
|
if (p = g._prev, (g._act || S <= g._end) && g._ts && y !== g) {
|
|
807
807
|
if (g.parent !== this)
|
|
808
808
|
return this.render(n, r, s);
|
|
809
|
-
if (g.render(g._ts > 0 ? (S - g._start) * g._ts : (g._dirty ? g.totalDuration() : g._tDur) + (S - g._start) * g._ts, r, s || W &&
|
|
809
|
+
if (g.render(g._ts > 0 ? (S - g._start) * g._ts : (g._dirty ? g.totalDuration() : g._tDur) + (S - g._start) * g._ts, r, s || W && Ii(g)), f !== this._time || !this._ts && !_) {
|
|
810
810
|
y = 0, p && (c += this._zTime = S ? -k : k);
|
|
811
811
|
break;
|
|
812
812
|
}
|
|
@@ -961,7 +961,7 @@ var ys = function(e, t, i, n, r, s, o) {
|
|
|
961
961
|
if (K(n) && (~n.indexOf("random(") && (n = Pt(n)), n.charAt(1) === "=" && (p = rt(f, n) + (X(f) || 0), (p || p === 0) && (n = p))), !c || f !== n || _i)
|
|
962
962
|
return !isNaN(f * n) && n !== "" ? (p = new re(this._pt, e, t, +f || 0, n - (f || 0), typeof u == "boolean" ? Cs : fr, 0, g), h && (p.fp = h), o && p.modifier(o, this, e), this._pt = p) : (!u && !(t in e) && Mi(t, n), ys.call(this, e, t, f, n, g, l || ue.stringFilter, h));
|
|
963
963
|
}, xs = function(e, t, i, n, r) {
|
|
964
|
-
if (G(e) && (e = vt(e, r, t, i, n)), !we(e) || e.style && e.nodeType || q(e) ||
|
|
964
|
+
if (G(e) && (e = vt(e, r, t, i, n)), !we(e) || e.style && e.nodeType || q(e) || Ln(e))
|
|
965
965
|
return K(e) ? vt(e, r, t, i, n) : e;
|
|
966
966
|
var s = {}, o;
|
|
967
967
|
for (o in e)
|
|
@@ -974,7 +974,7 @@ var ys = function(e, t, i, n, r, s, o) {
|
|
|
974
974
|
h[o._props[c]] = l;
|
|
975
975
|
return o;
|
|
976
976
|
}, Me, _i, ki = function a(e, t, i) {
|
|
977
|
-
var n = e.vars, r = n.ease, s = n.startAt, o = n.immediateRender, l = n.lazy, h = n.onUpdate, c = n.runBackwards, u = n.yoyoEase, f = n.keyframes, g = n.autoRevert, p = e._dur, d = e._startAt, m = e._targets, _ = e.parent, y = _ && _.data === "nested" ? _.vars.targets : m, x = e._overwrite === "auto" && !Ci, b = e.timeline, v, P, E, C, w, S, D, T, R,
|
|
977
|
+
var n = e.vars, r = n.ease, s = n.startAt, o = n.immediateRender, l = n.lazy, h = n.onUpdate, c = n.runBackwards, u = n.yoyoEase, f = n.keyframes, g = n.autoRevert, p = e._dur, d = e._startAt, m = e._targets, _ = e.parent, y = _ && _.data === "nested" ? _.vars.targets : m, x = e._overwrite === "auto" && !Ci, b = e.timeline, v, P, E, C, w, S, D, T, R, L, $, U, F;
|
|
978
978
|
if (b && (!f || !r) && (r = "none"), e._ease = Ze(r, ot.ease), e._yEase = u ? ar(Ze(u === !0 ? r : u, ot.ease)) : 0, u && e._yoyo && !e._repeat && (u = e._yEase, e._yEase = e._ease, e._ease = u), e._from = !b && !!n.runBackwards, !b || f && !n.stagger) {
|
|
979
979
|
if (T = m[0] ? He(m[0]).harness : 0, U = T && n[T.prop], v = Gt(n, Di), d && (d._zTime < 0 && d.progress(1), t < 0 && c && o && !g ? d.render(-1, !0) : d.revert(c && p ? Ft : Zr), d._lazy = 0), s) {
|
|
980
980
|
if (ke(e._startAt = j.set(m, pe({
|
|
@@ -1010,12 +1010,12 @@ var ys = function(e, t, i, n, r, s, o) {
|
|
|
1010
1010
|
return;
|
|
1011
1011
|
}
|
|
1012
1012
|
for (e._pt = e._ptCache = 0, l = p && ie(l) || l && !p, P = 0; P < m.length; P++) {
|
|
1013
|
-
if (w = m[P], D = w._gsap ||
|
|
1014
|
-
|
|
1013
|
+
if (w = m[P], D = w._gsap || Li(m)[P]._gsap, e._ptLookup[P] = L = {}, ui[D.id] && Ie.length && $t(), $ = y === m ? P : y.indexOf(w), T && (R = new T()).init(w, U || v, e, $, y) !== !1 && (e._pt = C = new re(e._pt, w, R.name, 0, 1, R.render, R, 0, R.priority), R._props.forEach(function(ee) {
|
|
1014
|
+
L[ee] = C;
|
|
1015
1015
|
}), R.priority && (S = 1)), !T || U)
|
|
1016
1016
|
for (E in v)
|
|
1017
|
-
le[E] && (R = cr(E, v, e, $, w, y)) ? R.priority && (S = 1) :
|
|
1018
|
-
e._op && e._op[P] && e.kill(w, e._op[P]), x && e._pt && (Me = e, N.killTweensOf(w,
|
|
1017
|
+
le[E] && (R = cr(E, v, e, $, w, y)) ? R.priority && (S = 1) : L[E] = C = Oi.call(e, w, E, "get", v[E], $, y, 0, n.stringFilter);
|
|
1018
|
+
e._op && e._op[P] && e.kill(w, e._op[P]), x && e._pt && (Me = e, N.killTweensOf(w, L, e.globalTime(t)), F = !e.parent, Me = 0), e._pt && l && (ui[D.id] = 1);
|
|
1019
1019
|
}
|
|
1020
1020
|
S && gr(e), e._onInit && e._onInit(e);
|
|
1021
1021
|
}
|
|
@@ -1071,8 +1071,8 @@ var j = /* @__PURE__ */ (function(a) {
|
|
|
1071
1071
|
function e(i, n, r, s) {
|
|
1072
1072
|
var o;
|
|
1073
1073
|
typeof n == "number" && (r.duration = n, n = r, r = null), o = a.call(this, s ? n : xt(n)) || this;
|
|
1074
|
-
var l = o.vars, h = l.duration, c = l.delay, u = l.immediateRender, f = l.stagger, g = l.overwrite, p = l.keyframes, d = l.defaults, m = l.scrollTrigger, _ = l.yoyoEase, y = n.parent || N, x = (q(i) ||
|
|
1075
|
-
if (o._targets = x.length ?
|
|
1074
|
+
var l = o.vars, h = l.duration, c = l.delay, u = l.immediateRender, f = l.stagger, g = l.overwrite, p = l.keyframes, d = l.defaults, m = l.scrollTrigger, _ = l.yoyoEase, y = n.parent || N, x = (q(i) || Ln(i) ? Te(i[0]) : "length" in n) ? [i] : _e(i), b, v, P, E, C, w, S, D;
|
|
1075
|
+
if (o._targets = x.length ? Li(x) : Et("GSAP target " + i + " not found. https://gsap.com", !ue.nullTargetWarn) || [], o._ptLookup = [], o._overwrite = g, p || f || Rt(h) || Rt(c)) {
|
|
1076
1076
|
if (n = o.vars, b = o.timeline = new J({
|
|
1077
1077
|
data: "nested",
|
|
1078
1078
|
defaults: d || {},
|
|
@@ -1088,7 +1088,7 @@ var j = /* @__PURE__ */ (function(a) {
|
|
|
1088
1088
|
xt(pe(b.vars.defaults, {
|
|
1089
1089
|
ease: "none"
|
|
1090
1090
|
})), b._ease = Ze(p.ease || n.ease || "none");
|
|
1091
|
-
var T = 0, R,
|
|
1091
|
+
var T = 0, R, L, $;
|
|
1092
1092
|
if (q(p))
|
|
1093
1093
|
p.forEach(function(U) {
|
|
1094
1094
|
return b.to(x, U, ">");
|
|
@@ -1101,10 +1101,10 @@ var j = /* @__PURE__ */ (function(a) {
|
|
|
1101
1101
|
for (R = P[C].sort(function(U, F) {
|
|
1102
1102
|
return U.t - F.t;
|
|
1103
1103
|
}), T = 0, v = 0; v < R.length; v++)
|
|
1104
|
-
|
|
1105
|
-
ease:
|
|
1106
|
-
duration: (
|
|
1107
|
-
}, $[C] =
|
|
1104
|
+
L = R[v], $ = {
|
|
1105
|
+
ease: L.e,
|
|
1106
|
+
duration: (L.t - (v ? R[v - 1].t : 0)) / 100 * h
|
|
1107
|
+
}, $[C] = L.v, b.to(x, $, T), T += $.duration;
|
|
1108
1108
|
b.duration() < h && b.to({}, {
|
|
1109
1109
|
duration: h - b.duration()
|
|
1110
1110
|
});
|
|
@@ -1519,15 +1519,15 @@ he.add(J.updateRoot);
|
|
|
1519
1519
|
tt = jt.to({}, {
|
|
1520
1520
|
duration: 0
|
|
1521
1521
|
});
|
|
1522
|
-
var
|
|
1522
|
+
var Ls = function(e, t) {
|
|
1523
1523
|
for (var i = e._pt; i && i.p !== t && i.op !== t && i.fp !== t; )
|
|
1524
1524
|
i = i._next;
|
|
1525
1525
|
return i;
|
|
1526
|
-
},
|
|
1526
|
+
}, Is = function(e, t) {
|
|
1527
1527
|
var i = e._targets, n, r, s;
|
|
1528
1528
|
for (n in t)
|
|
1529
1529
|
for (r = i.length; r--; )
|
|
1530
|
-
s = e._ptLookup[r][n], s && (s = s.d) && (s._pt && (s =
|
|
1530
|
+
s = e._ptLookup[r][n], s && (s = s.d) && (s._pt && (s = Ls(s, n)), s && s.modifier && s.modifier(t[n], e, i[r], n));
|
|
1531
1531
|
}, ii = function(e, t) {
|
|
1532
1532
|
return {
|
|
1533
1533
|
name: e,
|
|
@@ -1545,7 +1545,7 @@ var Is = function(e, t) {
|
|
|
1545
1545
|
l[h] = t(r[h]);
|
|
1546
1546
|
r = l;
|
|
1547
1547
|
}
|
|
1548
|
-
|
|
1548
|
+
Is(o, r);
|
|
1549
1549
|
};
|
|
1550
1550
|
}
|
|
1551
1551
|
};
|
|
@@ -1849,7 +1849,7 @@ var nn, De, st, Ni, Ve, rn, Bi, Os = function() {
|
|
|
1849
1849
|
return e === "matrix(1, 0, 0, 1, 0, 0)" || e === "none" || !e;
|
|
1850
1850
|
}, un = function(e) {
|
|
1851
1851
|
var t = ye(e, B);
|
|
1852
|
-
return Ar(t) ? Tt : t.substr(7).match(
|
|
1852
|
+
return Ar(t) ? Tt : t.substr(7).match(In).map(V);
|
|
1853
1853
|
}, Gi = function(e, t) {
|
|
1854
1854
|
var i = e._gsap || He(e), n = e.style, r = un(e), s, o, l, h;
|
|
1855
1855
|
return i.svg && e.getAttribute("transform") ? (l = e.transform.baseVal.consolidate().matrix, r = [l.a, l.b, l.c, l.d, l.e, l.f], r.join(",") === "1,0,0,1,0,0" ? Tt : r) : (r === Tt && !e.offsetParent && e !== st && !i.svg && (l = n.display, n.display = "block", s = e.parentNode, (!s || !e.offsetParent && !e.getBoundingClientRect().width) && (h = 1, o = e.nextElementSibling, st.appendChild(e)), r = un(e), l ? n.display = l : We(e, "display"), h && (o ? s.insertBefore(e, o) : s ? s.appendChild(e) : st.removeChild(e))), t && r.length > 6 ? [r[0], r[1], r[4], r[5], r[12], r[13]] : r);
|
|
@@ -1860,8 +1860,8 @@ var nn, De, st, Ni, Ve, rn, Bi, Os = function() {
|
|
|
1860
1860
|
var i = e._gsap || new hr(e);
|
|
1861
1861
|
if ("x" in i && !t && !i.uncache)
|
|
1862
1862
|
return i;
|
|
1863
|
-
var n = e.style, r = i.scaleX < 0, s = "px", o = "deg", l = getComputedStyle(e), h = ye(e, se) || "0", c, u, f, g, p, d, m, _, y, x, b, v, P, E, C, w, S, D, T, R,
|
|
1864
|
-
return c = u = f = d = m = _ = y = x = b = 0, g = p = 1, i.svg = !!(e.getCTM && Pr(e)), l.translate && ((l.translate !== "none" || l.scale !== "none" || l.rotate !== "none") && (n[B] = (l.translate !== "none" ? "translate3d(" + (l.translate + " 0 0").split(" ").slice(0, 3).join(", ") + ") " : "") + (l.rotate !== "none" ? "rotate(" + l.rotate + ") " : "") + (l.scale !== "none" ? "scale(" + l.scale.split(" ").join(",") + ") " : "") + (l[B] !== "none" ? l[B] : "")), n.scale = n.rotate = n.translate = "none"), E = Gi(e, i.svg), i.svg && (i.uncache ? (ee = e.getBBox(), h = i.xOrigin - ee.x + "px " + (i.yOrigin - ee.y) + "px", F = "") : F = !t && e.getAttribute("data-svg-origin"), Ei(e, F || h, !!F || i.originIsAbsolute, i.smooth !== !1, E)), v = i.xOrigin || 0, P = i.yOrigin || 0, E !== Tt && (D = E[0], T = E[1], R = E[2],
|
|
1863
|
+
var n = e.style, r = i.scaleX < 0, s = "px", o = "deg", l = getComputedStyle(e), h = ye(e, se) || "0", c, u, f, g, p, d, m, _, y, x, b, v, P, E, C, w, S, D, T, R, L, $, U, F, ee, pt, ft, mt, ze, Yi, Pe, Ne;
|
|
1864
|
+
return c = u = f = d = m = _ = y = x = b = 0, g = p = 1, i.svg = !!(e.getCTM && Pr(e)), l.translate && ((l.translate !== "none" || l.scale !== "none" || l.rotate !== "none") && (n[B] = (l.translate !== "none" ? "translate3d(" + (l.translate + " 0 0").split(" ").slice(0, 3).join(", ") + ") " : "") + (l.rotate !== "none" ? "rotate(" + l.rotate + ") " : "") + (l.scale !== "none" ? "scale(" + l.scale.split(" ").join(",") + ") " : "") + (l[B] !== "none" ? l[B] : "")), n.scale = n.rotate = n.translate = "none"), E = Gi(e, i.svg), i.svg && (i.uncache ? (ee = e.getBBox(), h = i.xOrigin - ee.x + "px " + (i.yOrigin - ee.y) + "px", F = "") : F = !t && e.getAttribute("data-svg-origin"), Ei(e, F || h, !!F || i.originIsAbsolute, i.smooth !== !1, E)), v = i.xOrigin || 0, P = i.yOrigin || 0, E !== Tt && (D = E[0], T = E[1], R = E[2], L = E[3], c = $ = E[4], u = U = E[5], E.length === 6 ? (g = Math.sqrt(D * D + T * T), p = Math.sqrt(L * L + R * R), d = D || T ? qe(T, D) * Ge : 0, y = R || L ? qe(R, L) * Ge + d : 0, y && (p *= Math.abs(Math.cos(y * at))), i.svg && (c -= v - (v * D + P * R), u -= P - (v * T + P * L))) : (Ne = E[6], Yi = E[7], ft = E[8], mt = E[9], ze = E[10], Pe = E[11], c = E[12], u = E[13], f = E[14], C = qe(Ne, ze), m = C * Ge, C && (w = Math.cos(-C), S = Math.sin(-C), F = $ * w + ft * S, ee = U * w + mt * S, pt = Ne * w + ze * S, ft = $ * -S + ft * w, mt = U * -S + mt * w, ze = Ne * -S + ze * w, Pe = Yi * -S + Pe * w, $ = F, U = ee, Ne = pt), C = qe(-R, ze), _ = C * Ge, C && (w = Math.cos(-C), S = Math.sin(-C), F = D * w - ft * S, ee = T * w - mt * S, pt = R * w - ze * S, Pe = L * S + Pe * w, D = F, T = ee, R = pt), C = qe(T, D), d = C * Ge, C && (w = Math.cos(C), S = Math.sin(C), F = D * w + T * S, ee = $ * w + U * S, T = T * w - D * S, U = U * w - $ * S, D = F, $ = ee), m && Math.abs(m) + Math.abs(d) > 359.9 && (m = d = 0, _ = 180 - _), g = V(Math.sqrt(D * D + T * T + R * R)), p = V(Math.sqrt(U * U + Ne * Ne)), C = qe($, U), y = Math.abs(C) > 2e-4 ? C * Ge : 0, b = Pe ? 1 / (Pe < 0 ? -Pe : Pe) : 0), i.svg && (F = e.getAttribute("transform"), i.forceCSS = e.setAttribute("transform", "") || !Ar(ye(e, B)), F && e.setAttribute("transform", F))), Math.abs(y) > 90 && Math.abs(y) < 270 && (r ? (g *= -1, y += d <= 0 ? 180 : -180, d += d <= 0 ? 180 : -180) : (p *= -1, y += y <= 0 ? 180 : -180)), t = t || i.uncache, i.x = c - ((i.xPercent = c && (!t && i.xPercent || (Math.round(e.offsetWidth / 2) === Math.round(-c) ? -50 : 0))) ? e.offsetWidth * i.xPercent / 100 : 0) + s, i.y = u - ((i.yPercent = u && (!t && i.yPercent || (Math.round(e.offsetHeight / 2) === Math.round(-u) ? -50 : 0))) ? e.offsetHeight * i.yPercent / 100 : 0) + s, i.z = f + s, i.scaleX = V(g), i.scaleY = V(p), i.rotation = V(d) + o, i.rotationX = V(m) + o, i.rotationY = V(_) + o, i.skewX = y + o, i.skewY = x + o, i.transformPerspective = b + s, (i.zOrigin = parseFloat(h.split(" ")[2]) || !t && i.zOrigin || 0) && (n[se] = Yt(h)), i.xOffset = i.yOffset = 0, i.force3D = ue.force3D, i.renderTransform = i.svg ? Js : Er ? Tr : Qs, i.uncache = 0, i;
|
|
1865
1865
|
}, Yt = function(e) {
|
|
1866
1866
|
return (e = e.split(" "))[0] + " " + e[1];
|
|
1867
1867
|
}, ni = function(e, t, i) {
|
|
@@ -3251,7 +3251,7 @@ class Vi {
|
|
|
3251
3251
|
}), e;
|
|
3252
3252
|
}
|
|
3253
3253
|
}
|
|
3254
|
-
const fn = { type: "change" }, ji = { type: "start" }, Mr = { type: "end" },
|
|
3254
|
+
const fn = { type: "change" }, ji = { type: "start" }, Mr = { type: "end" }, Lt = new zr(), mn = new Nr(), fa = Math.cos(70 * Br.DEG2RAD), Y = new oe(), te = 2 * Math.PI, I = {
|
|
3255
3255
|
NONE: -1,
|
|
3256
3256
|
ROTATE: 0,
|
|
3257
3257
|
DOLLY: 1,
|
|
@@ -3269,7 +3269,7 @@ class ma extends Ur {
|
|
|
3269
3269
|
* @param {?HTMLElement} domElement - The HTML element used for event listeners.
|
|
3270
3270
|
*/
|
|
3271
3271
|
constructor(e, t = null) {
|
|
3272
|
-
super(e, t), this.state =
|
|
3272
|
+
super(e, t), this.state = I.NONE, this.target = new oe(), this.cursor = new oe(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minTargetRadius = 0, this.maxTargetRadius = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.keyRotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }, this.mouseButtons = { LEFT: nt.ROTATE, MIDDLE: nt.DOLLY, RIGHT: nt.PAN }, this.touches = { ONE: Je.ROTATE, TWO: Je.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this._lastPosition = new oe(), this._lastQuaternion = new Zi(), this._lastTargetPosition = new oe(), this._quat = new Zi().setFromUnitVectors(e.up, new oe(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new Ki(), this._sphericalDelta = new Ki(), this._scale = 1, this._panOffset = new oe(), this._rotateStart = new fe(), this._rotateEnd = new fe(), this._rotateDelta = new fe(), this._panStart = new fe(), this._panEnd = new fe(), this._panDelta = new fe(), this._dollyStart = new fe(), this._dollyEnd = new fe(), this._dollyDelta = new fe(), this._dollyDirection = new oe(), this._mouse = new fe(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = _a.bind(this), this._onPointerDown = ga.bind(this), this._onPointerUp = ya.bind(this), this._onContextMenu = Ca.bind(this), this._onMouseWheel = va.bind(this), this._onKeyDown = Ea.bind(this), this._onTouchStart = wa.bind(this), this._onTouchMove = Pa.bind(this), this._onMouseDown = xa.bind(this), this._onMouseMove = ba.bind(this), this._interceptControlDown = Aa.bind(this), this._interceptControlUp = Ta.bind(this), this.domElement !== null && this.connect(this.domElement), this.update();
|
|
3273
3273
|
}
|
|
3274
3274
|
connect(e) {
|
|
3275
3275
|
super.connect(e), this.domElement.addEventListener("pointerdown", this._onPointerDown), this.domElement.addEventListener("pointercancel", this._onPointerUp), this.domElement.addEventListener("contextmenu", this._onContextMenu), this.domElement.addEventListener("wheel", this._onMouseWheel, { passive: !1 }), this.domElement.getRootNode().addEventListener("keydown", this._interceptControlDown, { passive: !0, capture: !0 }), this.domElement.style.touchAction = "none";
|
|
@@ -3330,11 +3330,11 @@ class ma extends Ur {
|
|
|
3330
3330
|
* was called, or the initial state.
|
|
3331
3331
|
*/
|
|
3332
3332
|
reset() {
|
|
3333
|
-
this.target.copy(this.target0), this.object.position.copy(this.position0), this.object.zoom = this.zoom0, this.object.updateProjectionMatrix(), this.dispatchEvent(fn), this.update(), this.state =
|
|
3333
|
+
this.target.copy(this.target0), this.object.position.copy(this.position0), this.object.zoom = this.zoom0, this.object.updateProjectionMatrix(), this.dispatchEvent(fn), this.update(), this.state = I.NONE;
|
|
3334
3334
|
}
|
|
3335
3335
|
update(e = null) {
|
|
3336
3336
|
const t = this.object.position;
|
|
3337
|
-
Y.copy(t).sub(this.target), Y.applyQuaternion(this._quat), this._spherical.setFromVector3(Y), this.autoRotate && this.state ===
|
|
3337
|
+
Y.copy(t).sub(this.target), Y.applyQuaternion(this._quat), this._spherical.setFromVector3(Y), this.autoRotate && this.state === I.NONE && this._rotateLeft(this._getAutoRotationAngle(e)), this.enableDamping ? (this._spherical.theta += this._sphericalDelta.theta * this.dampingFactor, this._spherical.phi += this._sphericalDelta.phi * this.dampingFactor) : (this._spherical.theta += this._sphericalDelta.theta, this._spherical.phi += this._sphericalDelta.phi);
|
|
3338
3338
|
let i = this.minAzimuthAngle, n = this.maxAzimuthAngle;
|
|
3339
3339
|
isFinite(i) && isFinite(n) && (i < -Math.PI ? i += te : i > Math.PI && (i -= te), n < -Math.PI ? n += te : n > Math.PI && (n -= te), i <= n ? this._spherical.theta = Math.max(i, Math.min(n, this._spherical.theta)) : this._spherical.theta = this._spherical.theta > (i + n) / 2 ? Math.max(i, this._spherical.theta) : Math.min(n, this._spherical.theta)), this._spherical.phi = Math.max(this.minPolarAngle, Math.min(this.maxPolarAngle, this._spherical.phi)), this._spherical.makeSafe(), this.enableDamping === !0 ? this.target.addScaledVector(this._panOffset, this.dampingFactor) : this.target.add(this._panOffset), this.target.sub(this.cursor), this.target.clampLength(this.minTargetRadius, this.maxTargetRadius), this.target.add(this.cursor);
|
|
3340
3340
|
let r = !1;
|
|
@@ -3360,7 +3360,7 @@ class ma extends Ur {
|
|
|
3360
3360
|
h.unproject(this.object), this.object.position.sub(h).add(o), this.object.updateMatrixWorld(), s = Y.length();
|
|
3361
3361
|
} else
|
|
3362
3362
|
console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), this.zoomToCursor = !1;
|
|
3363
|
-
s !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(s).add(this.object.position) : (
|
|
3363
|
+
s !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(s).add(this.object.position) : (Lt.origin.copy(this.object.position), Lt.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot(Lt.direction)) < fa ? this.object.lookAt(this.target) : (mn.setFromNormalAndCoplanarPoint(this.object.up, this.target), Lt.intersectPlane(mn, this.target))));
|
|
3364
3364
|
} else if (this.object.isOrthographicCamera) {
|
|
3365
3365
|
const s = this.object.zoom;
|
|
3366
3366
|
this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)), s !== this.object.zoom && (this.object.updateProjectionMatrix(), r = !0);
|
|
@@ -3566,7 +3566,7 @@ function _a(a) {
|
|
|
3566
3566
|
function ya(a) {
|
|
3567
3567
|
switch (this._removePointer(a), this._pointers.length) {
|
|
3568
3568
|
case 0:
|
|
3569
|
-
this.domElement.releasePointerCapture(a.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.domElement.removeEventListener("pointerup", this._onPointerUp), this.dispatchEvent(Mr), this.state =
|
|
3569
|
+
this.domElement.releasePointerCapture(a.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.domElement.removeEventListener("pointerup", this._onPointerUp), this.dispatchEvent(Mr), this.state = I.NONE;
|
|
3570
3570
|
break;
|
|
3571
3571
|
case 1:
|
|
3572
3572
|
const e = this._pointers[0], t = this._pointerPositions[e];
|
|
@@ -3592,49 +3592,49 @@ function xa(a) {
|
|
|
3592
3592
|
switch (e) {
|
|
3593
3593
|
case nt.DOLLY:
|
|
3594
3594
|
if (this.enableZoom === !1) return;
|
|
3595
|
-
this._handleMouseDownDolly(a), this.state =
|
|
3595
|
+
this._handleMouseDownDolly(a), this.state = I.DOLLY;
|
|
3596
3596
|
break;
|
|
3597
3597
|
case nt.ROTATE:
|
|
3598
3598
|
if (a.ctrlKey || a.metaKey || a.shiftKey) {
|
|
3599
3599
|
if (this.enablePan === !1) return;
|
|
3600
|
-
this._handleMouseDownPan(a), this.state =
|
|
3600
|
+
this._handleMouseDownPan(a), this.state = I.PAN;
|
|
3601
3601
|
} else {
|
|
3602
3602
|
if (this.enableRotate === !1) return;
|
|
3603
|
-
this._handleMouseDownRotate(a), this.state =
|
|
3603
|
+
this._handleMouseDownRotate(a), this.state = I.ROTATE;
|
|
3604
3604
|
}
|
|
3605
3605
|
break;
|
|
3606
3606
|
case nt.PAN:
|
|
3607
3607
|
if (a.ctrlKey || a.metaKey || a.shiftKey) {
|
|
3608
3608
|
if (this.enableRotate === !1) return;
|
|
3609
|
-
this._handleMouseDownRotate(a), this.state =
|
|
3609
|
+
this._handleMouseDownRotate(a), this.state = I.ROTATE;
|
|
3610
3610
|
} else {
|
|
3611
3611
|
if (this.enablePan === !1) return;
|
|
3612
|
-
this._handleMouseDownPan(a), this.state =
|
|
3612
|
+
this._handleMouseDownPan(a), this.state = I.PAN;
|
|
3613
3613
|
}
|
|
3614
3614
|
break;
|
|
3615
3615
|
default:
|
|
3616
|
-
this.state =
|
|
3616
|
+
this.state = I.NONE;
|
|
3617
3617
|
}
|
|
3618
|
-
this.state !==
|
|
3618
|
+
this.state !== I.NONE && this.dispatchEvent(ji);
|
|
3619
3619
|
}
|
|
3620
3620
|
function ba(a) {
|
|
3621
3621
|
switch (this.state) {
|
|
3622
|
-
case
|
|
3622
|
+
case I.ROTATE:
|
|
3623
3623
|
if (this.enableRotate === !1) return;
|
|
3624
3624
|
this._handleMouseMoveRotate(a);
|
|
3625
3625
|
break;
|
|
3626
|
-
case
|
|
3626
|
+
case I.DOLLY:
|
|
3627
3627
|
if (this.enableZoom === !1) return;
|
|
3628
3628
|
this._handleMouseMoveDolly(a);
|
|
3629
3629
|
break;
|
|
3630
|
-
case
|
|
3630
|
+
case I.PAN:
|
|
3631
3631
|
if (this.enablePan === !1) return;
|
|
3632
3632
|
this._handleMouseMovePan(a);
|
|
3633
3633
|
break;
|
|
3634
3634
|
}
|
|
3635
3635
|
}
|
|
3636
3636
|
function va(a) {
|
|
3637
|
-
this.enabled === !1 || this.enableZoom === !1 || this.state !==
|
|
3637
|
+
this.enabled === !1 || this.enableZoom === !1 || this.state !== I.NONE || (a.preventDefault(), this.dispatchEvent(ji), this._handleMouseWheel(this._customWheelEvent(a)), this.dispatchEvent(Mr));
|
|
3638
3638
|
}
|
|
3639
3639
|
function Ea(a) {
|
|
3640
3640
|
this.enabled !== !1 && this._handleKeyDown(a);
|
|
@@ -3645,55 +3645,55 @@ function wa(a) {
|
|
|
3645
3645
|
switch (this.touches.ONE) {
|
|
3646
3646
|
case Je.ROTATE:
|
|
3647
3647
|
if (this.enableRotate === !1) return;
|
|
3648
|
-
this._handleTouchStartRotate(a), this.state =
|
|
3648
|
+
this._handleTouchStartRotate(a), this.state = I.TOUCH_ROTATE;
|
|
3649
3649
|
break;
|
|
3650
3650
|
case Je.PAN:
|
|
3651
3651
|
if (this.enablePan === !1) return;
|
|
3652
|
-
this._handleTouchStartPan(a), this.state =
|
|
3652
|
+
this._handleTouchStartPan(a), this.state = I.TOUCH_PAN;
|
|
3653
3653
|
break;
|
|
3654
3654
|
default:
|
|
3655
|
-
this.state =
|
|
3655
|
+
this.state = I.NONE;
|
|
3656
3656
|
}
|
|
3657
3657
|
break;
|
|
3658
3658
|
case 2:
|
|
3659
3659
|
switch (this.touches.TWO) {
|
|
3660
3660
|
case Je.DOLLY_PAN:
|
|
3661
3661
|
if (this.enableZoom === !1 && this.enablePan === !1) return;
|
|
3662
|
-
this._handleTouchStartDollyPan(a), this.state =
|
|
3662
|
+
this._handleTouchStartDollyPan(a), this.state = I.TOUCH_DOLLY_PAN;
|
|
3663
3663
|
break;
|
|
3664
3664
|
case Je.DOLLY_ROTATE:
|
|
3665
3665
|
if (this.enableZoom === !1 && this.enableRotate === !1) return;
|
|
3666
|
-
this._handleTouchStartDollyRotate(a), this.state =
|
|
3666
|
+
this._handleTouchStartDollyRotate(a), this.state = I.TOUCH_DOLLY_ROTATE;
|
|
3667
3667
|
break;
|
|
3668
3668
|
default:
|
|
3669
|
-
this.state =
|
|
3669
|
+
this.state = I.NONE;
|
|
3670
3670
|
}
|
|
3671
3671
|
break;
|
|
3672
3672
|
default:
|
|
3673
|
-
this.state =
|
|
3673
|
+
this.state = I.NONE;
|
|
3674
3674
|
}
|
|
3675
|
-
this.state !==
|
|
3675
|
+
this.state !== I.NONE && this.dispatchEvent(ji);
|
|
3676
3676
|
}
|
|
3677
3677
|
function Pa(a) {
|
|
3678
3678
|
switch (this._trackPointer(a), this.state) {
|
|
3679
|
-
case
|
|
3679
|
+
case I.TOUCH_ROTATE:
|
|
3680
3680
|
if (this.enableRotate === !1) return;
|
|
3681
3681
|
this._handleTouchMoveRotate(a), this.update();
|
|
3682
3682
|
break;
|
|
3683
|
-
case
|
|
3683
|
+
case I.TOUCH_PAN:
|
|
3684
3684
|
if (this.enablePan === !1) return;
|
|
3685
3685
|
this._handleTouchMovePan(a), this.update();
|
|
3686
3686
|
break;
|
|
3687
|
-
case
|
|
3687
|
+
case I.TOUCH_DOLLY_PAN:
|
|
3688
3688
|
if (this.enableZoom === !1 && this.enablePan === !1) return;
|
|
3689
3689
|
this._handleTouchMoveDollyPan(a), this.update();
|
|
3690
3690
|
break;
|
|
3691
|
-
case
|
|
3691
|
+
case I.TOUCH_DOLLY_ROTATE:
|
|
3692
3692
|
if (this.enableZoom === !1 && this.enableRotate === !1) return;
|
|
3693
3693
|
this._handleTouchMoveDollyRotate(a), this.update();
|
|
3694
3694
|
break;
|
|
3695
3695
|
default:
|
|
3696
|
-
this.state =
|
|
3696
|
+
this.state = I.NONE;
|
|
3697
3697
|
}
|
|
3698
3698
|
}
|
|
3699
3699
|
function Ca(a) {
|
|
@@ -4121,7 +4121,7 @@ function Ra(a) {
|
|
|
4121
4121
|
e[gn(t)] = i;
|
|
4122
4122
|
}), e;
|
|
4123
4123
|
}
|
|
4124
|
-
const
|
|
4124
|
+
const It = 4096, Ot = 2048, La = `
|
|
4125
4125
|
importScripts('https://unpkg.com/topojson-client@3.1.0/dist/topojson-client.min.js');
|
|
4126
4126
|
|
|
4127
4127
|
self.onmessage = async (e) => {
|
|
@@ -4196,7 +4196,7 @@ class it {
|
|
|
4196
4196
|
// Static cache to share loaded topology data across instances
|
|
4197
4197
|
static cache = /* @__PURE__ */ new Map();
|
|
4198
4198
|
constructor(e, t, i) {
|
|
4199
|
-
this.canvas = document.createElement("canvas"), this.canvas.width =
|
|
4199
|
+
this.canvas = document.createElement("canvas"), this.canvas.width = It, this.canvas.height = Ot, this.ctx = this.canvas.getContext("2d", { willReadFrequently: !0 }), this.onProgress = t, this.onTextureUpdate = i, this.topologyConfig = {
|
|
4200
4200
|
url: e?.url || "https://cdn.jsdelivr.net/npm/world-atlas@2/countries-110m.json",
|
|
4201
4201
|
objectName: e?.objectName || "countries",
|
|
4202
4202
|
disableNormalization: e?.disableNormalization || !1,
|
|
@@ -4244,7 +4244,7 @@ class it {
|
|
|
4244
4244
|
*/
|
|
4245
4245
|
loadInWorker(e, t, i) {
|
|
4246
4246
|
return new Promise((n, r) => {
|
|
4247
|
-
const s = new Blob([
|
|
4247
|
+
const s = new Blob([La], { type: "application/javascript" }), o = URL.createObjectURL(s), l = new Worker(o);
|
|
4248
4248
|
l.onmessage = (h) => {
|
|
4249
4249
|
URL.revokeObjectURL(o), l.terminate(), h.data.success ? n(h.data.features) : r(new Error(h.data.error));
|
|
4250
4250
|
}, l.onerror = (h) => {
|
|
@@ -4274,7 +4274,7 @@ class it {
|
|
|
4274
4274
|
renderTexture(e) {
|
|
4275
4275
|
this.currentRenderId++;
|
|
4276
4276
|
const t = this.currentRenderId;
|
|
4277
|
-
if (this.ctx.fillStyle = "rgba(10, 20, 30, 0.9)", this.ctx.fillRect(0, 0,
|
|
4277
|
+
if (this.ctx.fillStyle = "rgba(10, 20, 30, 0.9)", this.ctx.fillRect(0, 0, It, Ot), this.onTextureUpdate?.(), !this.loaded)
|
|
4278
4278
|
return this.canvas;
|
|
4279
4279
|
const i = this.countries.length < 1500;
|
|
4280
4280
|
this.ctx.lineWidth = 0.5, this.ctx.strokeStyle = "rgba(0, 0, 0, 0.3)";
|
|
@@ -4326,7 +4326,7 @@ class it {
|
|
|
4326
4326
|
});
|
|
4327
4327
|
}
|
|
4328
4328
|
projectPoint(e, t) {
|
|
4329
|
-
const i = (e + 180) / 360 *
|
|
4329
|
+
const i = (e + 180) / 360 * It, n = (90 - t) / 180 * Ot;
|
|
4330
4330
|
return [i, n];
|
|
4331
4331
|
}
|
|
4332
4332
|
interpolateColor(e, t) {
|
|
@@ -4351,7 +4351,7 @@ class it {
|
|
|
4351
4351
|
renderCustomTexture(e, t, i) {
|
|
4352
4352
|
this.currentRenderId++;
|
|
4353
4353
|
const n = this.currentRenderId;
|
|
4354
|
-
if (this.ctx.fillStyle = "rgba(10, 20, 30, 0.9)", this.ctx.fillRect(0, 0,
|
|
4354
|
+
if (this.ctx.fillStyle = "rgba(10, 20, 30, 0.9)", this.ctx.fillRect(0, 0, It, Ot), this.onTextureUpdate?.(), !this.loaded)
|
|
4355
4355
|
return this.canvas;
|
|
4356
4356
|
const r = this.topologyConfig?.disableNormalization ? e instanceof Map ? Object.fromEntries(e) : e : Ra(e), s = this.countries.length < 1500;
|
|
4357
4357
|
this.ctx.lineWidth = 0.5, this.ctx.strokeStyle = "rgba(0, 0, 0, 0.3)";
|
|
@@ -4408,7 +4408,7 @@ class it {
|
|
|
4408
4408
|
return [f, d, g, m];
|
|
4409
4409
|
}
|
|
4410
4410
|
}
|
|
4411
|
-
class
|
|
4411
|
+
class Ia extends $r {
|
|
4412
4412
|
/**
|
|
4413
4413
|
* Constructs a new CSS2D object.
|
|
4414
4414
|
*
|
|
@@ -4806,7 +4806,7 @@ class $a {
|
|
|
4806
4806
|
if (!t) return;
|
|
4807
4807
|
const [i, n] = t, r = this.getSizeCategory(e.code), s = document.createElement("div");
|
|
4808
4808
|
s.className = `country-label hidden size-${r}`, s.textContent = e.name;
|
|
4809
|
-
const o = new
|
|
4809
|
+
const o = new Ia(s), l = {
|
|
4810
4810
|
element: s,
|
|
4811
4811
|
object: o,
|
|
4812
4812
|
country: e,
|
|
@@ -5000,10 +5000,10 @@ function ja(a, e, t, i, n = Rr(512), r = new Uint8Array(256), s = new Int32Array
|
|
|
5000
5000
|
}
|
|
5001
5001
|
}
|
|
5002
5002
|
var Ha = ja;
|
|
5003
|
-
function
|
|
5003
|
+
function Lr(a, e, t) {
|
|
5004
5004
|
return a << 8 & 63488 | e << 2 & 992 | t >> 3;
|
|
5005
5005
|
}
|
|
5006
|
-
function
|
|
5006
|
+
function Ir(a, e, t, i) {
|
|
5007
5007
|
return a >> 4 | e & 240 | (t & 240) << 4 | (i & 240) << 8;
|
|
5008
5008
|
}
|
|
5009
5009
|
function Or(a, e, t) {
|
|
@@ -5035,7 +5035,7 @@ function oi() {
|
|
|
5035
5035
|
function Ya(a, e) {
|
|
5036
5036
|
let t = e === "rgb444" ? 4096 : 65536, i = new Array(t), n = a.length;
|
|
5037
5037
|
if (e === "rgba4444") for (let r = 0; r < n; ++r) {
|
|
5038
|
-
let s = a[r], o = s >> 24 & 255, l = s >> 16 & 255, h = s >> 8 & 255, c = s & 255, u =
|
|
5038
|
+
let s = a[r], o = s >> 24 & 255, l = s >> 16 & 255, h = s >> 8 & 255, c = s & 255, u = Ir(c, h, l, o), f = u in i ? i[u] : i[u] = oi();
|
|
5039
5039
|
f.rc += c, f.gc += h, f.bc += l, f.ac += o, f.cnt++;
|
|
5040
5040
|
}
|
|
5041
5041
|
else if (e === "rgb444") for (let r = 0; r < n; ++r) {
|
|
@@ -5043,7 +5043,7 @@ function Ya(a, e) {
|
|
|
5043
5043
|
u.rc += h, u.gc += l, u.bc += o, u.cnt++;
|
|
5044
5044
|
}
|
|
5045
5045
|
else for (let r = 0; r < n; ++r) {
|
|
5046
|
-
let s = a[r], o = s >> 16 & 255, l = s >> 8 & 255, h = s & 255, c =
|
|
5046
|
+
let s = a[r], o = s >> 16 & 255, l = s >> 8 & 255, h = s & 255, c = Lr(h, l, o), u = c in i ? i[c] : i[c] = oi();
|
|
5047
5047
|
u.rc += h, u.gc += l, u.bc += o, u.cnt++;
|
|
5048
5048
|
}
|
|
5049
5049
|
return i;
|
|
@@ -5054,10 +5054,10 @@ function Za(a, e, t = {}) {
|
|
|
5054
5054
|
if (!(a instanceof Uint8Array) && !(a instanceof Uint8ClampedArray)) throw new Error("quantize() expected RGBA Uint8Array data");
|
|
5055
5055
|
let l = new Uint32Array(a.buffer), h = t.useSqrt !== !1, c = i === "rgba4444", u = Ya(l, i), f = u.length, g = f - 1, p = new Uint32Array(f + 1);
|
|
5056
5056
|
for (var d = 0, m = 0; m < f; ++m) {
|
|
5057
|
-
let
|
|
5058
|
-
if (
|
|
5059
|
-
var _ = 1 /
|
|
5060
|
-
c && (
|
|
5057
|
+
let L = u[m];
|
|
5058
|
+
if (L != null) {
|
|
5059
|
+
var _ = 1 / L.cnt;
|
|
5060
|
+
c && (L.ac *= _), L.rc *= _, L.gc *= _, L.bc *= _, u[d++] = L;
|
|
5061
5061
|
}
|
|
5062
5062
|
}
|
|
5063
5063
|
Nt(e) / d < 0.022 && (h = !1);
|
|
@@ -5086,9 +5086,9 @@ function Za(a, e, t = {}) {
|
|
|
5086
5086
|
let T = [];
|
|
5087
5087
|
var R = 0;
|
|
5088
5088
|
for (m = 0; ; ++R) {
|
|
5089
|
-
let
|
|
5090
|
-
c && (F = kt(Math.round(u[m].ac), 0, 255), o && (F = F <= (typeof o == "number" ? o : 127) ? 0 : 255), n && F <= s && (
|
|
5091
|
-
let ee = c ? [
|
|
5089
|
+
let L = kt(Math.round(u[m].rc), 0, 255), $ = kt(Math.round(u[m].gc), 0, 255), U = kt(Math.round(u[m].bc), 0, 255), F = 255;
|
|
5090
|
+
c && (F = kt(Math.round(u[m].ac), 0, 255), o && (F = F <= (typeof o == "number" ? o : 127) ? 0 : 255), n && F <= s && (L = $ = U = r, F = 0));
|
|
5091
|
+
let ee = c ? [L, $, U, F] : [L, $, U];
|
|
5092
5092
|
if (Ka(T, ee) || T.push(ee), (m = u[m].fw) == 0) break;
|
|
5093
5093
|
}
|
|
5094
5094
|
return T;
|
|
@@ -5106,11 +5106,11 @@ function Wa(a, e, t = "rgb565") {
|
|
|
5106
5106
|
if (e.length > 256) throw new Error("applyPalette() only works with 256 colors or less");
|
|
5107
5107
|
let i = new Uint32Array(a.buffer), n = i.length, r = t === "rgb444" ? 4096 : 65536, s = new Uint8Array(n), o = new Array(r);
|
|
5108
5108
|
if (t === "rgba4444") for (let l = 0; l < n; l++) {
|
|
5109
|
-
let h = i[l], c = h >> 24 & 255, u = h >> 16 & 255, f = h >> 8 & 255, g = h & 255, p =
|
|
5109
|
+
let h = i[l], c = h >> 24 & 255, u = h >> 16 & 255, f = h >> 8 & 255, g = h & 255, p = Ir(g, f, u, c), d = p in o ? o[p] : o[p] = Xa(g, f, u, c, e);
|
|
5110
5110
|
s[l] = d;
|
|
5111
5111
|
}
|
|
5112
5112
|
else {
|
|
5113
|
-
let l = t === "rgb444" ? Or :
|
|
5113
|
+
let l = t === "rgb444" ? Or : Lr;
|
|
5114
5114
|
for (let h = 0; h < n; h++) {
|
|
5115
5115
|
let c = i[h], u = c >> 16 & 255, f = c >> 8 & 255, g = c & 255, p = l(g, f, u), d = p in o ? o[p] : o[p] = qa(g, f, u, e);
|
|
5116
5116
|
s[h] = d;
|
|
@@ -5179,14 +5179,14 @@ function Qa(a = {}) {
|
|
|
5179
5179
|
function Ja(a, e, t, i, n) {
|
|
5180
5180
|
a.writeByte(33), a.writeByte(249), a.writeByte(4), n < 0 && (n = 0, i = !1);
|
|
5181
5181
|
var r, s;
|
|
5182
|
-
i ? (r = 1, s = 2) : (r = 0, s = 0), e >= 0 && (s = e & 7), s <<= 2, a.writeByte(0 | s | 0 | r),
|
|
5182
|
+
i ? (r = 1, s = 2) : (r = 0, s = 0), e >= 0 && (s = e & 7), s <<= 2, a.writeByte(0 | s | 0 | r), Le(a, t), a.writeByte(n || 0), a.writeByte(0);
|
|
5183
5183
|
}
|
|
5184
5184
|
function eo(a, e, t, i, n = 8) {
|
|
5185
5185
|
let r = 1, s = 0, o = Hi(i.length) - 1, l = r << 7 | n - 1 << 4 | s << 3 | o;
|
|
5186
|
-
|
|
5186
|
+
Le(a, e), Le(a, t), a.writeBytes([l, 0, 0]);
|
|
5187
5187
|
}
|
|
5188
5188
|
function to(a, e) {
|
|
5189
|
-
a.writeByte(33), a.writeByte(255), a.writeByte(11), kr(a, "NETSCAPE2.0"), a.writeByte(3), a.writeByte(1),
|
|
5189
|
+
a.writeByte(33), a.writeByte(255), a.writeByte(11), kr(a, "NETSCAPE2.0"), a.writeByte(3), a.writeByte(1), Le(a, e), a.writeByte(0);
|
|
5190
5190
|
}
|
|
5191
5191
|
function wn(a, e) {
|
|
5192
5192
|
let t = 1 << Hi(e.length);
|
|
@@ -5196,7 +5196,7 @@ function wn(a, e) {
|
|
|
5196
5196
|
}
|
|
5197
5197
|
}
|
|
5198
5198
|
function io(a, e, t, i) {
|
|
5199
|
-
if (a.writeByte(44),
|
|
5199
|
+
if (a.writeByte(44), Le(a, 0), Le(a, 0), Le(a, e), Le(a, t), i) {
|
|
5200
5200
|
let n = 0, r = 0, s = Hi(i.length) - 1;
|
|
5201
5201
|
a.writeByte(128 | n | r | 0 | s);
|
|
5202
5202
|
} else a.writeByte(0);
|
|
@@ -5204,7 +5204,7 @@ function io(a, e, t, i) {
|
|
|
5204
5204
|
function no(a, e, t, i, n = 8, r, s, o) {
|
|
5205
5205
|
Ha(t, i, e, n, a, r, s, o);
|
|
5206
5206
|
}
|
|
5207
|
-
function
|
|
5207
|
+
function Le(a, e) {
|
|
5208
5208
|
a.writeByte(e & 255), a.writeByte(e >> 8 & 255);
|
|
5209
5209
|
}
|
|
5210
5210
|
function kr(a, e) {
|
|
@@ -6523,7 +6523,7 @@ class bo {
|
|
|
6523
6523
|
* @param lon Longitude
|
|
6524
6524
|
* @param radiusKm Radius in km (default 5km)
|
|
6525
6525
|
*/
|
|
6526
|
-
static generateSyntheticBoundary(e, t, i =
|
|
6526
|
+
static generateSyntheticBoundary(e, t, i = 20) {
|
|
6527
6527
|
const r = [], o = i / 6371 * (180 / Math.PI), l = o / Math.cos(e * Math.PI / 180);
|
|
6528
6528
|
for (let h = 0; h <= 16; h++) {
|
|
6529
6529
|
const c = h / 16 * 2 * Math.PI, u = e + o * Math.sin(c), f = t + l * Math.cos(c);
|
|
@@ -7062,7 +7062,7 @@ class wo {
|
|
|
7062
7062
|
this.choropleth.renderCustomTexture(t.statistics, i, [
|
|
7063
7063
|
0,
|
|
7064
7064
|
r
|
|
7065
|
-
]), this.material && (this.material.uniforms.uCityLights.value = 1, this.config.effects.cityLights = !0);
|
|
7065
|
+
]), this.material && (this.material.uniforms.uCityLights.value = 1, this.config.effects.cityLights = !0), this.countryLabels && (this.countryLabels.getGroup().visible = !1);
|
|
7066
7066
|
}
|
|
7067
7067
|
resize(e, t) {
|
|
7068
7068
|
this.config.width = e, this.config.height = t, this.handleResize();
|