gralobe 1.0.44 → 1.0.45
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 +205 -203
- package/dist/gralobe.js.map +1 -1
- package/dist/gralobe.umd.cjs +4 -4
- package/dist/gralobe.umd.cjs.map +1 -1
- package/package.json +1 -1
package/dist/gralobe.js
CHANGED
|
@@ -268,19 +268,19 @@ var ue = {
|
|
|
268
268
|
center: 0.5,
|
|
269
269
|
edges: 0.5,
|
|
270
270
|
end: 1
|
|
271
|
-
}[n] || 0 : !o && l && (c = n[0], u = n[1]), function(f,
|
|
272
|
-
var d = (p || t).length,
|
|
273
|
-
if (!
|
|
271
|
+
}[n] || 0 : !o && l && (c = n[0], u = n[1]), function(f, m, p) {
|
|
272
|
+
var d = (p || t).length, g = s[d], _, y, b, x, v, P, E, C, w;
|
|
273
|
+
if (!g) {
|
|
274
274
|
if (w = t.grid === "auto" ? 0 : (t.grid || [1, ge])[1], !w) {
|
|
275
275
|
for (E = -ge; E < (E = p[w++].getBoundingClientRect().left) && w < d; )
|
|
276
276
|
;
|
|
277
277
|
w < d && w--;
|
|
278
278
|
}
|
|
279
|
-
for (
|
|
280
|
-
b = P % w - _, x = y - (P / w | 0),
|
|
281
|
-
n === "random" && Xn(
|
|
279
|
+
for (g = s[d] = [], _ = l ? Math.min(w, d) * c - 0.5 : n % w, y = w === ge ? 0 : l ? d * u / w - 0.5 : n / w | 0, E = 0, C = ge, P = 0; P < d; P++)
|
|
280
|
+
b = P % w - _, x = y - (P / w | 0), g[P] = v = h ? Math.abs(h === "y" ? x : b) : Ln(b * b + x * x), v > E && (E = v), v < C && (C = v);
|
|
281
|
+
n === "random" && Xn(g), g.max = E - C, g.min = C, g.v = d = (parseFloat(t.amount) || parseFloat(t.each) * (w > d ? d - 1 : h ? h === "y" ? d / w : w : Math.max(w, d / w)) || 0) * (n === "edges" ? -1 : 1), g.b = d < 0 ? r - d : r, g.u = X(t.amount || t.each) || 0, i = i && d < 0 ? or(i) : i;
|
|
282
282
|
}
|
|
283
|
-
return d = (
|
|
283
|
+
return d = (g[f] - g.min) / g.max || 0, H(g.b + (i ? i(d) : d) * g.v) + g.u;
|
|
284
284
|
};
|
|
285
285
|
}, gi = function(e) {
|
|
286
286
|
var t = Math.pow(10, ((e + "").split(".")[1] || "").length);
|
|
@@ -293,8 +293,8 @@ var ue = {
|
|
|
293
293
|
return !i && we(e) && (n = i = e.radius || ge, e.values ? (e = _e(e.values), (r = !Te(e[0])) && (n *= n)) : e = gi(e.increment)), Ue(t, i ? G(e) ? function(s) {
|
|
294
294
|
return r = e(s), Math.abs(r - s) <= n ? r : s;
|
|
295
295
|
} : function(s) {
|
|
296
|
-
for (var o = parseFloat(r ? s.x : s), l = parseFloat(r ? s.y : 0), h = ge, c = 0, u = e.length, f,
|
|
297
|
-
r ? (f = e[u].x - o,
|
|
296
|
+
for (var o = parseFloat(r ? s.x : s), l = parseFloat(r ? s.y : 0), h = ge, c = 0, u = e.length, f, m; u--; )
|
|
297
|
+
r ? (f = e[u].x - o, m = e[u].y - l, f = f * f + m * m) : f = Math.abs(e[u] - o), f < h && (h = f, c = u);
|
|
298
298
|
return c = !n || h <= n ? e[c] : s, r || c === s || Te(s) ? c : c + X(s);
|
|
299
299
|
} : gi(e));
|
|
300
300
|
}, Jn = function(e, t, i, n) {
|
|
@@ -339,8 +339,8 @@ var ue = {
|
|
|
339
339
|
return i + ((l - e) / s * o || 0);
|
|
340
340
|
});
|
|
341
341
|
}, ds = function a(e, t, i, n) {
|
|
342
|
-
var r = isNaN(e + t) ? 0 : function(
|
|
343
|
-
return (1 -
|
|
342
|
+
var r = isNaN(e + t) ? 0 : function(m) {
|
|
343
|
+
return (1 - m) * e + m * t;
|
|
344
344
|
};
|
|
345
345
|
if (!r) {
|
|
346
346
|
var s = K(e), o = {}, l, h, c, u, f;
|
|
@@ -429,7 +429,7 @@ var ue = {
|
|
|
429
429
|
}, Qt = function(e, t, i) {
|
|
430
430
|
return e += e < 0 ? 1 : e > 1 ? -1 : 0, (e * 6 < 1 ? t + (i - t) * e * 6 : e < 0.5 ? i : e * 3 < 2 ? t + (i - t) * (2 / 3 - e) * 6 : t) * O + 0.5 | 0;
|
|
431
431
|
}, rr = function(e, t, i) {
|
|
432
|
-
var n = e ? Te(e) ? [e >> 16, e >> 8 & O, e & O] : 0 : yt.black, r, s, o, l, h, c, u, f,
|
|
432
|
+
var n = e ? Te(e) ? [e >> 16, e >> 8 & O, e & O] : 0 : yt.black, r, s, o, l, h, c, u, f, m, p;
|
|
433
433
|
if (!n) {
|
|
434
434
|
if (e.substr(-1) === "," && (e = e.substr(0, e.length - 1)), yt[e])
|
|
435
435
|
n = yt[e];
|
|
@@ -446,7 +446,7 @@ var ue = {
|
|
|
446
446
|
n = e.match(hi) || yt.transparent;
|
|
447
447
|
n = n.map(Number);
|
|
448
448
|
}
|
|
449
|
-
return t && !p && (r = n[0] / O, s = n[1] / O, o = n[2] / O, u = Math.max(r, s, o), f = Math.min(r, s, o), c = (u + f) / 2, u === f ? l = h = 0 : (
|
|
449
|
+
return t && !p && (r = n[0] / O, s = n[1] / O, o = n[2] / O, u = Math.max(r, s, o), f = Math.min(r, s, o), c = (u + f) / 2, u === f ? l = h = 0 : (m = u - f, h = c > 0.5 ? m / (2 - u - f) : m / (u + f), l = u === r ? (s - o) / m + (s < o ? 6 : 0) : u === s ? (o - r) / m + 2 : (r - s) / m + 4, l *= 60), n[0] = ~~(l + 0.5), n[1] = ~~(h * 100 + 0.5), n[2] = ~~(c * 100 + 0.5)), i && n.length < 4 && (n[3] = 1), n;
|
|
450
450
|
}, sr = function(e) {
|
|
451
451
|
var t = [], i = [], n = -1;
|
|
452
452
|
return e.split(Oe).forEach(function(r) {
|
|
@@ -476,11 +476,11 @@ var ue = {
|
|
|
476
476
|
if (Oe.lastIndex = 0, Oe.test(t))
|
|
477
477
|
return i = ps.test(t), e[1] = en(e[1], i), e[0] = en(e[0], i, sr(e[1])), !0;
|
|
478
478
|
}, Ct, he = (function() {
|
|
479
|
-
var a = Date.now, e = 500, t = 33, i = a(), n = i, r = 1e3 / 240, s = r, o = [], l, h, c, u, f,
|
|
480
|
-
var _ = a() - n, y =
|
|
479
|
+
var a = Date.now, e = 500, t = 33, i = a(), n = i, r = 1e3 / 240, s = r, o = [], l, h, c, u, f, m, p = function d(g) {
|
|
480
|
+
var _ = a() - n, y = g === !0, b, x, v, P;
|
|
481
481
|
if ((_ > e || _ < 0) && (i += _ - t), n += _, v = n - i, b = v - s, (b > 0 || y) && (P = ++u.frame, f = v - u.time * 1e3, u.time = v = v / 1e3, s += b + (b >= r ? 4 : r - b), x = 1), y || (l = h(d)), x)
|
|
482
|
-
for (
|
|
483
|
-
o[
|
|
482
|
+
for (m = 0; m < o.length; m++)
|
|
483
|
+
o[m](v, f, P, g);
|
|
484
484
|
};
|
|
485
485
|
return u = {
|
|
486
486
|
time: 0,
|
|
@@ -488,31 +488,31 @@ var ue = {
|
|
|
488
488
|
tick: function() {
|
|
489
489
|
p(!0);
|
|
490
490
|
},
|
|
491
|
-
deltaRatio: function(
|
|
492
|
-
return f / (1e3 / (
|
|
491
|
+
deltaRatio: function(g) {
|
|
492
|
+
return f / (1e3 / (g || 60));
|
|
493
493
|
},
|
|
494
494
|
wake: function() {
|
|
495
|
-
Un && (!ci && Ti() && (be = ci = window, Si = be.document || {}, de.gsap = ae, (be.gsapVersions || (be.gsapVersions = [])).push(ae.version), zn(Bt || be.GreenSockGlobals || !be.gsap && be || {}), ir.forEach(nr)), c = typeof requestAnimationFrame < "u" && requestAnimationFrame, l && u.sleep(), h = c || function(
|
|
496
|
-
return setTimeout(
|
|
495
|
+
Un && (!ci && Ti() && (be = ci = window, Si = be.document || {}, de.gsap = ae, (be.gsapVersions || (be.gsapVersions = [])).push(ae.version), zn(Bt || be.GreenSockGlobals || !be.gsap && be || {}), ir.forEach(nr)), c = typeof requestAnimationFrame < "u" && requestAnimationFrame, l && u.sleep(), h = c || function(g) {
|
|
496
|
+
return setTimeout(g, s - u.time * 1e3 + 1 | 0);
|
|
497
497
|
}, Ct = 1, p(2));
|
|
498
498
|
},
|
|
499
499
|
sleep: function() {
|
|
500
500
|
(c ? cancelAnimationFrame : clearTimeout)(l), Ct = 0, h = wt;
|
|
501
501
|
},
|
|
502
|
-
lagSmoothing: function(
|
|
503
|
-
e =
|
|
502
|
+
lagSmoothing: function(g, _) {
|
|
503
|
+
e = g || 1 / 0, t = Math.min(_ || 33, e);
|
|
504
504
|
},
|
|
505
|
-
fps: function(
|
|
506
|
-
r = 1e3 / (
|
|
505
|
+
fps: function(g) {
|
|
506
|
+
r = 1e3 / (g || 240), s = u.time * 1e3 + r;
|
|
507
507
|
},
|
|
508
|
-
add: function(
|
|
508
|
+
add: function(g, _, y) {
|
|
509
509
|
var b = _ ? function(x, v, P, E) {
|
|
510
|
-
|
|
511
|
-
} :
|
|
512
|
-
return u.remove(
|
|
510
|
+
g(x, v, P, E), u.remove(b);
|
|
511
|
+
} : g;
|
|
512
|
+
return u.remove(g), o[y ? "unshift" : "push"](b), ut(), b;
|
|
513
513
|
},
|
|
514
|
-
remove: function(
|
|
515
|
-
~(_ = o.indexOf(
|
|
514
|
+
remove: function(g, _) {
|
|
515
|
+
~(_ = o.indexOf(g)) && o.splice(_, 1) && m >= _ && m--;
|
|
516
516
|
},
|
|
517
517
|
_listeners: o
|
|
518
518
|
}, u;
|
|
@@ -772,14 +772,14 @@ var J = /* @__PURE__ */ (function(a) {
|
|
|
772
772
|
}, t.staggerFromTo = function(n, r, s, o, l, h, c, u) {
|
|
773
773
|
return o.startAt = s, bt(o).immediateRender = ie(o.immediateRender), this.staggerTo(n, r, o, l, h, c, u);
|
|
774
774
|
}, t.render = function(n, r, s) {
|
|
775
|
-
var o = this._time, l = this._dirty ? this.totalDuration() : this._tDur, h = this._dur, c = n <= 0 ? 0 : H(n), u = this._zTime < 0 != n < 0 && (this._initted || !h), f,
|
|
775
|
+
var o = this._time, l = this._dirty ? this.totalDuration() : this._tDur, h = this._dur, c = n <= 0 ? 0 : H(n), u = this._zTime < 0 != n < 0 && (this._initted || !h), f, m, p, d, g, _, y, b, x, v, P, E;
|
|
776
776
|
if (this !== N && c > l && n >= 0 && (c = l), c !== this._tTime || s || u) {
|
|
777
777
|
if (o !== this._time && h && (c += this._time - o, n += this._time - o), f = c, x = this._start, b = this._ts, _ = !b, u && (h || (o = this._zTime), (n || !r) && (this._zTime = n)), this._repeat) {
|
|
778
|
-
if (P = this._yoyo,
|
|
779
|
-
return this.totalTime(
|
|
780
|
-
if (f = H(c %
|
|
778
|
+
if (P = this._yoyo, g = h + this._rDelay, this._repeat < -1 && n < 0)
|
|
779
|
+
return this.totalTime(g * 100 + n, r, s);
|
|
780
|
+
if (f = H(c % g), c === l ? (d = this._repeat, f = h) : (v = H(c / g), d = ~~v, d && d === v && (f = h, d--), f > h && (f = h)), v = ht(this._tTime, g), !o && this._tTime && v !== d && this._tTime - v * g - this._dur <= 0 && (v = d), P && d & 1 && (f = h - f, E = 1), d !== v && !this._lock) {
|
|
781
781
|
var C = P && v & 1, w = C === (P && d & 1);
|
|
782
|
-
if (d < v && (C = !C), o = C ? 0 : c % h ? h : c, this._lock = 1, this.render(o || (E ? 0 : H(d *
|
|
782
|
+
if (d < v && (C = !C), o = C ? 0 : c % h ? h : c, this._lock = 1, this.render(o || (E ? 0 : H(d * g)), r, !h)._lock = 0, this._tTime = c, !r && this.parent && ce(this, "onRepeat"), this.vars.repeatRefresh && !E && (this.invalidate()._lock = 1), o && o !== this._time || _ !== !this._ts || this.vars.onRepeat && !this.parent && !this._act)
|
|
783
783
|
return this;
|
|
784
784
|
if (h = this._dur, l = this._tDur, w && (this._lock = 2, o = C ? h : -1e-4, this.render(o, !0), this.vars.repeatRefresh && !E && this.invalidate()), this._lock = 0, !this._ts && !_)
|
|
785
785
|
return this;
|
|
@@ -789,29 +789,29 @@ var J = /* @__PURE__ */ (function(a) {
|
|
|
789
789
|
if (this._hasPause && !this._forcing && this._lock < 2 && (y = ns(this, H(o), H(f)), y && (c -= f - (f = y._start))), this._tTime = c, this._time = f, this._act = !b, this._initted || (this._onUpdate = this.vars.onUpdate, this._initted = 1, this._zTime = n, o = 0), !o && c && !r && !v && (ce(this, "onStart"), this._tTime !== c))
|
|
790
790
|
return this;
|
|
791
791
|
if (f >= o && n >= 0)
|
|
792
|
-
for (
|
|
793
|
-
if (p =
|
|
794
|
-
if (
|
|
792
|
+
for (m = this._first; m; ) {
|
|
793
|
+
if (p = m._next, (m._act || f >= m._start) && m._ts && y !== m) {
|
|
794
|
+
if (m.parent !== this)
|
|
795
795
|
return this.render(n, r, s);
|
|
796
|
-
if (
|
|
796
|
+
if (m.render(m._ts > 0 ? (f - m._start) * m._ts : (m._dirty ? m.totalDuration() : m._tDur) + (f - m._start) * m._ts, r, s), f !== this._time || !this._ts && !_) {
|
|
797
797
|
y = 0, p && (c += this._zTime = -k);
|
|
798
798
|
break;
|
|
799
799
|
}
|
|
800
800
|
}
|
|
801
|
-
|
|
801
|
+
m = p;
|
|
802
802
|
}
|
|
803
803
|
else {
|
|
804
|
-
|
|
805
|
-
for (var S = n < 0 ? n : f;
|
|
806
|
-
if (p =
|
|
807
|
-
if (
|
|
804
|
+
m = this._last;
|
|
805
|
+
for (var S = n < 0 ? n : f; m; ) {
|
|
806
|
+
if (p = m._prev, (m._act || S <= m._end) && m._ts && y !== m) {
|
|
807
|
+
if (m.parent !== this)
|
|
808
808
|
return this.render(n, r, s);
|
|
809
|
-
if (
|
|
809
|
+
if (m.render(m._ts > 0 ? (S - m._start) * m._ts : (m._dirty ? m.totalDuration() : m._tDur) + (S - m._start) * m._ts, r, s || W && Ii(m)), f !== this._time || !this._ts && !_) {
|
|
810
810
|
y = 0, p && (c += this._zTime = S ? -k : k);
|
|
811
811
|
break;
|
|
812
812
|
}
|
|
813
813
|
}
|
|
814
|
-
|
|
814
|
+
m = p;
|
|
815
815
|
}
|
|
816
816
|
}
|
|
817
817
|
if (y && !r && (this.pause(), y.render(f >= o ? 0 : -k)._zTime = f >= o ? 1 : -1, this._ts))
|
|
@@ -868,7 +868,7 @@ var J = /* @__PURE__ */ (function(a) {
|
|
|
868
868
|
return s;
|
|
869
869
|
}, t.tweenTo = function(n, r) {
|
|
870
870
|
r = r || {};
|
|
871
|
-
var s = this, o = me(s, n), l = r, h = l.startAt, c = l.onStart, u = l.onStartParams, f = l.immediateRender,
|
|
871
|
+
var s = this, o = me(s, n), l = r, h = l.startAt, c = l.onStart, u = l.onStartParams, f = l.immediateRender, m, p = j.to(s, pe({
|
|
872
872
|
ease: r.ease || "none",
|
|
873
873
|
lazy: !1,
|
|
874
874
|
immediateRender: !1,
|
|
@@ -876,9 +876,9 @@ var J = /* @__PURE__ */ (function(a) {
|
|
|
876
876
|
overwrite: "auto",
|
|
877
877
|
duration: r.duration || Math.abs((o - (h && "time" in h ? h.time : s._time)) / s.timeScale()) || k,
|
|
878
878
|
onStart: function() {
|
|
879
|
-
if (s.pause(), !
|
|
880
|
-
var
|
|
881
|
-
p._dur !==
|
|
879
|
+
if (s.pause(), !m) {
|
|
880
|
+
var g = r.duration || Math.abs((o - (h && "time" in h ? h.time : s._time)) / s.timeScale());
|
|
881
|
+
p._dur !== g && ct(p, g, 0, 1).render(p._time, !0, !0), m = 1;
|
|
882
882
|
}
|
|
883
883
|
c && c.apply(p, u || []);
|
|
884
884
|
}
|
|
@@ -944,22 +944,22 @@ pe(J.prototype, {
|
|
|
944
944
|
_forcing: 0
|
|
945
945
|
});
|
|
946
946
|
var bs = function(e, t, i, n, r, s, o) {
|
|
947
|
-
var l = new re(this._pt, e, t, 0, 1, gr, null, r), h = 0, c = 0, u, f,
|
|
947
|
+
var l = new re(this._pt, e, t, 0, 1, gr, null, r), h = 0, c = 0, u, f, m, p, d, g, _, y;
|
|
948
948
|
for (l.b = i, l.e = n, i += "", n += "", (_ = ~n.indexOf("random(")) && (n = Pt(n)), s && (y = [i, n], s(y, e, t), i = y[0], n = y[1]), f = i.match(Xt) || []; u = Xt.exec(n); )
|
|
949
|
-
p = u[0], d = n.substring(h, u.index),
|
|
949
|
+
p = u[0], d = n.substring(h, u.index), m ? m = (m + 1) % 5 : d.substr(-5) === "rgba(" && (m = 1), p !== f[c++] && (g = parseFloat(f[c - 1]) || 0, l._pt = {
|
|
950
950
|
_next: l._pt,
|
|
951
951
|
p: d || c === 1 ? d : ",",
|
|
952
952
|
//note: SVG spec allows omission of comma/space when a negative sign is wedged between two numbers, like 2.5-5.3 instead of 2.5,-5.3 but when tweening, the negative value may switch to positive, so we insert the comma just in case.
|
|
953
|
-
s:
|
|
954
|
-
c: p.charAt(1) === "=" ? rt(
|
|
955
|
-
m:
|
|
953
|
+
s: g,
|
|
954
|
+
c: p.charAt(1) === "=" ? rt(g, p) - g : parseFloat(p) - g,
|
|
955
|
+
m: m && m < 4 ? Math.round : 0
|
|
956
956
|
}, h = Xt.lastIndex);
|
|
957
957
|
return l.c = h < n.length ? n.substring(h, n.length) : "", l.fp = o, (kn.test(n) || _) && (l.e = 0), this._pt = l, l;
|
|
958
958
|
}, Oi = function(e, t, i, n, r, s, o, l, h, c) {
|
|
959
959
|
G(n) && (n = n(r || 0, e, s));
|
|
960
|
-
var u = e[t], f = i !== "get" ? i : G(u) ? h ? e[t.indexOf("set") || !G(e["get" + t.substr(3)]) ? t : "get" + t.substr(3)](h) : e[t]() : u,
|
|
960
|
+
var u = e[t], f = i !== "get" ? i : G(u) ? h ? e[t.indexOf("set") || !G(e["get" + t.substr(3)]) ? t : "get" + t.substr(3)](h) : e[t]() : u, m = G(u) ? h ? Ps : fr : Fi, p;
|
|
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
|
-
return !isNaN(f * n) && n !== "" ? (p = new re(this._pt, e, t, +f || 0, n - (f || 0), typeof u == "boolean" ? As : mr, 0,
|
|
962
|
+
return !isNaN(f * n) && n !== "" ? (p = new re(this._pt, e, t, +f || 0, n - (f || 0), typeof u == "boolean" ? As : mr, 0, m), h && (p.fp = h), o && p.modifier(o, this, e), this._pt = p) : (!u && !(t in e) && Mi(t, n), bs.call(this, e, t, f, n, m, l || ue.stringFilter, h));
|
|
963
963
|
}, xs = function(e, t, i, n, r) {
|
|
964
964
|
if (G(e) && (e = vt(e, r, t, i, n)), !we(e) || e.style && e.nodeType || q(e) || In(e))
|
|
965
965
|
return K(e) ? vt(e, r, t, i, n) : e;
|
|
@@ -974,10 +974,10 @@ var bs = 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,
|
|
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, m = n.autoRevert, p = e._dur, d = e._startAt, g = e._targets, _ = e.parent, y = _ && _.data === "nested" ? _.vars.targets : g, b = e._overwrite === "auto" && !Ci, x = e.timeline, v, P, E, C, w, S, D, T, R, L, $, U, F;
|
|
978
978
|
if (x && (!f || !r) && (r = "none"), e._ease = Ze(r, ot.ease), e._yEase = u ? or(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 = !x && !!n.runBackwards, !x || f && !n.stagger) {
|
|
979
|
-
if (T =
|
|
980
|
-
if (ke(e._startAt = j.set(
|
|
979
|
+
if (T = g[0] ? He(g[0]).harness : 0, U = T && n[T.prop], v = Gt(n, Di), d && (d._zTime < 0 && d.progress(1), t < 0 && c && o && !m ? d.render(-1, !0) : d.revert(c && p ? Ft : Kr), d._lazy = 0), s) {
|
|
980
|
+
if (ke(e._startAt = j.set(g, pe({
|
|
981
981
|
data: "isStart",
|
|
982
982
|
overwrite: !1,
|
|
983
983
|
parent: _,
|
|
@@ -989,7 +989,7 @@ var bs = function(e, t, i, n, r, s, o) {
|
|
|
989
989
|
return ce(e, "onUpdate");
|
|
990
990
|
},
|
|
991
991
|
stagger: 0
|
|
992
|
-
}, s))), e._startAt._dp = 0, e._startAt._sat = e, t < 0 && (W || !o && !
|
|
992
|
+
}, s))), e._startAt._dp = 0, e._startAt._sat = e, t < 0 && (W || !o && !m) && e._startAt.revert(Ft), o && p && t <= 0 && i <= 0) {
|
|
993
993
|
t && (e._zTime = t);
|
|
994
994
|
return;
|
|
995
995
|
}
|
|
@@ -1004,13 +1004,13 @@ var bs = function(e, t, i, n, r, s, o) {
|
|
|
1004
1004
|
stagger: 0,
|
|
1005
1005
|
parent: _
|
|
1006
1006
|
//ensures that nested tweens that had a stagger are handled properly, like gsap.from(".class", {y: gsap.utils.wrap([-100,100]), stagger: 0.5})
|
|
1007
|
-
}, v), U && (E[T.prop] = U), ke(e._startAt = j.set(
|
|
1007
|
+
}, v), U && (E[T.prop] = U), ke(e._startAt = j.set(g, E)), e._startAt._dp = 0, e._startAt._sat = e, t < 0 && (W ? e._startAt.revert(Ft) : e._startAt.render(-1, !0)), e._zTime = t, !o)
|
|
1008
1008
|
a(e._startAt, k, k);
|
|
1009
1009
|
else if (!t)
|
|
1010
1010
|
return;
|
|
1011
1011
|
}
|
|
1012
|
-
for (e._pt = e._ptCache = 0, l = p && ie(l) || l && !p, P = 0; P <
|
|
1013
|
-
if (w =
|
|
1012
|
+
for (e._pt = e._ptCache = 0, l = p && ie(l) || l && !p, P = 0; P < g.length; P++) {
|
|
1013
|
+
if (w = g[P], D = w._gsap || Li(g)[P]._gsap, e._ptLookup[P] = L = {}, ui[D.id] && Ie.length && $t(), $ = y === g ? 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
1014
|
L[ee] = C;
|
|
1015
1015
|
}), R.priority && (S = 1)), !T || U)
|
|
1016
1016
|
for (E in v)
|
|
@@ -1021,18 +1021,18 @@ var bs = function(e, t, i, n, r, s, o) {
|
|
|
1021
1021
|
}
|
|
1022
1022
|
e._onUpdate = h, e._initted = (!e._op || e._pt) && !F, f && t <= 0 && x.render(ge, !0, !0);
|
|
1023
1023
|
}, vs = function(e, t, i, n, r, s, o, l) {
|
|
1024
|
-
var h = (e._pt && e._ptCache || (e._ptCache = {}))[t], c, u, f,
|
|
1024
|
+
var h = (e._pt && e._ptCache || (e._ptCache = {}))[t], c, u, f, m;
|
|
1025
1025
|
if (!h)
|
|
1026
|
-
for (h = e._ptCache[t] = [], f = e._ptLookup,
|
|
1027
|
-
if (c = f[
|
|
1026
|
+
for (h = e._ptCache[t] = [], f = e._ptLookup, m = e._targets.length; m--; ) {
|
|
1027
|
+
if (c = f[m][t], c && c.d && c.d._pt)
|
|
1028
1028
|
for (c = c.d._pt; c && c.p !== t && c.fp !== t; )
|
|
1029
1029
|
c = c._next;
|
|
1030
1030
|
if (!c)
|
|
1031
1031
|
return _i = 1, e.vars[t] = "+=0", ki(e, o), _i = 0, l ? Et(t + " not eligible for reset") : 1;
|
|
1032
1032
|
h.push(c);
|
|
1033
1033
|
}
|
|
1034
|
-
for (
|
|
1035
|
-
u = h[
|
|
1034
|
+
for (m = h.length; m--; )
|
|
1035
|
+
u = h[m], c = u._pt || u, c.s = (n || n === 0) && !r ? n : c.s + (n || 0) + s * c.c, c.c = i - c.s, u.e && (u.e = V(i) + X(u.e)), u.b && (u.b = c.s + X(u.b));
|
|
1036
1036
|
}, Es = function(e, t) {
|
|
1037
1037
|
var i = e[0] ? He(e[0]).harness : 0, n = i && i.aliases, r, s, o, l;
|
|
1038
1038
|
if (!n)
|
|
@@ -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 : bt(n)) || this;
|
|
1074
|
-
var l = o.vars, h = l.duration, c = l.delay, u = l.immediateRender, f = l.stagger,
|
|
1075
|
-
if (o._targets = b.length ? Li(b) : Et("GSAP target " + i + " not found. https://gsap.com", !ue.nullTargetWarn) || [], o._ptLookup = [], o._overwrite =
|
|
1074
|
+
var l = o.vars, h = l.duration, c = l.delay, u = l.immediateRender, f = l.stagger, m = l.overwrite, p = l.keyframes, d = l.defaults, g = l.scrollTrigger, _ = l.yoyoEase, y = n.parent || N, b = (q(i) || In(i) ? Te(i[0]) : "length" in n) ? [i] : _e(i), x, v, P, E, C, w, S, D;
|
|
1075
|
+
if (o._targets = b.length ? Li(b) : Et("GSAP target " + i + " not found. https://gsap.com", !ue.nullTargetWarn) || [], o._ptLookup = [], o._overwrite = m, p || f || Rt(h) || Rt(c)) {
|
|
1076
1076
|
if (n = o.vars, x = o.timeline = new J({
|
|
1077
1077
|
data: "nested",
|
|
1078
1078
|
defaults: d || {},
|
|
@@ -1113,34 +1113,34 @@ var j = /* @__PURE__ */ (function(a) {
|
|
|
1113
1113
|
h || o.duration(h = x.duration());
|
|
1114
1114
|
} else
|
|
1115
1115
|
o.timeline = 0;
|
|
1116
|
-
return
|
|
1116
|
+
return m === !0 && !Ci && (Me = Ce(o), N.killTweensOf(b), Me = 0), xe(y, Ce(o), r), n.reversed && o.reverse(), n.paused && o.paused(!0), (u || !h && !p && o._start === H(y._time) && ie(u) && es(Ce(o)) && y.data !== "nested") && (o._tTime = -k, o.render(Math.max(0, -c) || 0)), g && Zn(Ce(o), g), o;
|
|
1117
1117
|
}
|
|
1118
1118
|
var t = e.prototype;
|
|
1119
1119
|
return t.render = function(n, r, s) {
|
|
1120
|
-
var o = this._time, l = this._tDur, h = this._dur, c = n < 0, u = n > l - k && !c ? l : n < k ? 0 : n, f,
|
|
1120
|
+
var o = this._time, l = this._tDur, h = this._dur, c = n < 0, u = n > l - k && !c ? l : n < k ? 0 : n, f, m, p, d, g, _, y, b, x;
|
|
1121
1121
|
if (!h)
|
|
1122
1122
|
is(this, n, r, s);
|
|
1123
1123
|
else if (u !== this._tTime || !n || s || !this._initted && this._tTime || this._startAt && this._zTime < 0 !== c || this._lazy) {
|
|
1124
1124
|
if (f = u, b = this.timeline, this._repeat) {
|
|
1125
1125
|
if (d = h + this._rDelay, this._repeat < -1 && c)
|
|
1126
1126
|
return this.totalTime(d * 100 + n, r, s);
|
|
1127
|
-
if (f = H(u % d), u === l ? (p = this._repeat, f = h) : (
|
|
1127
|
+
if (f = H(u % d), u === l ? (p = this._repeat, f = h) : (g = H(u / d), p = ~~g, p && p === g ? (f = h, p--) : f > h && (f = h)), _ = this._yoyo && p & 1, _ && (x = this._yEase, f = h - f), g = ht(this._tTime, d), f === o && !s && this._initted && p === g)
|
|
1128
1128
|
return this._tTime = u, this;
|
|
1129
|
-
p !==
|
|
1129
|
+
p !== g && (b && this._yEase && lr(b, _), this.vars.repeatRefresh && !_ && !this._lock && f !== d && this._initted && (this._lock = s = 1, this.render(H(d * p), !0).invalidate()._lock = 0));
|
|
1130
1130
|
}
|
|
1131
1131
|
if (!this._initted) {
|
|
1132
1132
|
if (Kn(this, c ? n : f, s, r, u))
|
|
1133
1133
|
return this._tTime = 0, this;
|
|
1134
|
-
if (o !== this._time && !(s && this.vars.repeatRefresh && p !==
|
|
1134
|
+
if (o !== this._time && !(s && this.vars.repeatRefresh && p !== g))
|
|
1135
1135
|
return this;
|
|
1136
1136
|
if (h !== this._dur)
|
|
1137
1137
|
return this.render(n, r, s);
|
|
1138
1138
|
}
|
|
1139
|
-
if (this._tTime = u, this._time = f, !this._act && this._ts && (this._act = 1, this._lazy = 0), this.ratio = y = (x || this._ease)(f / h), this._from && (this.ratio = y = 1 - y), !o && u && !r && !
|
|
1139
|
+
if (this._tTime = u, this._time = f, !this._act && this._ts && (this._act = 1, this._lazy = 0), this.ratio = y = (x || this._ease)(f / h), this._from && (this.ratio = y = 1 - y), !o && u && !r && !g && (ce(this, "onStart"), this._tTime !== u))
|
|
1140
1140
|
return this;
|
|
1141
|
-
for (
|
|
1142
|
-
|
|
1143
|
-
b && b.render(n < 0 ? n : b._dur * b._ease(f / this._dur), r, s) || this._startAt && (this._zTime = n), this._onUpdate && !r && (c && di(this, n, r, s), ce(this, "onUpdate")), this._repeat && p !==
|
|
1141
|
+
for (m = this._pt; m; )
|
|
1142
|
+
m.r(y, m.d), m = m._next;
|
|
1143
|
+
b && b.render(n < 0 ? n : b._dur * b._ease(f / this._dur), r, s) || this._startAt && (this._zTime = n), this._onUpdate && !r && (c && di(this, n, r, s), ce(this, "onUpdate")), this._repeat && p !== g && this.vars.onRepeat && !r && this.parent && ce(this, "onRepeat"), (u === this._tDur || !u) && this._tTime === u && (c && !this._onUpdate && di(this, n, !0, !0), (n || !h) && (u === this._tDur && this._ts > 0 || !u && this._ts < 0) && ke(this, 1), !r && !(c && !o) && (u || o || _) && (ce(this, u === l ? "onComplete" : "onReverseComplete", !0), this._prom && !(u < l && this.timeScale() > 0) && this._prom()));
|
|
1144
1144
|
}
|
|
1145
1145
|
return this;
|
|
1146
1146
|
}, t.targets = function() {
|
|
@@ -1158,16 +1158,16 @@ var j = /* @__PURE__ */ (function(a) {
|
|
|
1158
1158
|
var s = this.timeline.totalDuration();
|
|
1159
1159
|
return this.timeline.killTweensOf(n, r, Me && Me.vars.overwrite !== !0)._first || _t(this), this.parent && s !== this.timeline.totalDuration() && ct(this, this._dur * this.timeline._tDur / s, 0, 1), this;
|
|
1160
1160
|
}
|
|
1161
|
-
var o = this._targets, l = n ? _e(n) : o, h = this._ptLookup, c = this._pt, u, f,
|
|
1161
|
+
var o = this._targets, l = n ? _e(n) : o, h = this._ptLookup, c = this._pt, u, f, m, p, d, g, _;
|
|
1162
1162
|
if ((!r || r === "all") && Qr(o, l))
|
|
1163
1163
|
return r === "all" && (this._pt = 0), _t(this);
|
|
1164
1164
|
for (u = this._op = this._op || [], r !== "all" && (K(r) && (d = {}, ne(r, function(y) {
|
|
1165
1165
|
return d[y] = 1;
|
|
1166
1166
|
}), r = d), r = Es(o, r)), _ = o.length; _--; )
|
|
1167
1167
|
if (~l.indexOf(o[_])) {
|
|
1168
|
-
f = h[_], r === "all" ? (u[_] = r, p = f,
|
|
1168
|
+
f = h[_], r === "all" ? (u[_] = r, p = f, m = {}) : (m = u[_] = u[_] || {}, p = r);
|
|
1169
1169
|
for (d in p)
|
|
1170
|
-
|
|
1170
|
+
g = f && f[d], g && ((!("kill" in g.d) || g.d.kill(d) === !0) && Zt(this, g, "_pt"), delete f[d]), m !== "all" && (m[d] = 1);
|
|
1171
1171
|
}
|
|
1172
1172
|
return this._initted && !this._pt && c && _t(this), this;
|
|
1173
1173
|
}, e.to = function(n, r) {
|
|
@@ -1720,19 +1720,19 @@ var nn, De, st, Ni, Ve, rn, Bi, ks = function() {
|
|
|
1720
1720
|
grid: 1,
|
|
1721
1721
|
flex: 1
|
|
1722
1722
|
}, Fe = function a(e, t, i, n) {
|
|
1723
|
-
var r = parseFloat(i) || 0, s = (i + "").trim().substr((r + "").length) || "px", o = Ve.style, l = Fs.test(t), h = e.tagName.toLowerCase() === "svg", c = (h ? "client" : "offset") + (l ? "Width" : "Height"), u = 100, f = n === "px",
|
|
1723
|
+
var r = parseFloat(i) || 0, s = (i + "").trim().substr((r + "").length) || "px", o = Ve.style, l = Fs.test(t), h = e.tagName.toLowerCase() === "svg", c = (h ? "client" : "offset") + (l ? "Width" : "Height"), u = 100, f = n === "px", m = n === "%", p, d, g, _;
|
|
1724
1724
|
if (n === s || !r || hn[n] || hn[s])
|
|
1725
1725
|
return r;
|
|
1726
|
-
if (s !== "px" && !f && (r = a(e, t, i, "px")), _ = e.getCTM && Cr(e), (
|
|
1727
|
-
return p = _ ? e.getBBox()[l ? "width" : "height"] : e[c], V(
|
|
1728
|
-
if (o[l ? "width" : "height"] = u + (f ? s : n), d = n !== "rem" && ~t.indexOf("adius") || n === "em" && e.appendChild && !h ? e : e.parentNode, _ && (d = (e.ownerSVGElement || {}).parentNode), (!d || d === De || !d.appendChild) && (d = De.body),
|
|
1729
|
-
return V(r /
|
|
1730
|
-
if (
|
|
1726
|
+
if (s !== "px" && !f && (r = a(e, t, i, "px")), _ = e.getCTM && Cr(e), (m || s === "%") && (Se[t] || ~t.indexOf("adius")))
|
|
1727
|
+
return p = _ ? e.getBBox()[l ? "width" : "height"] : e[c], V(m ? r / p * u : r / 100 * p);
|
|
1728
|
+
if (o[l ? "width" : "height"] = u + (f ? s : n), d = n !== "rem" && ~t.indexOf("adius") || n === "em" && e.appendChild && !h ? e : e.parentNode, _ && (d = (e.ownerSVGElement || {}).parentNode), (!d || d === De || !d.appendChild) && (d = De.body), g = d._gsap, g && m && g.width && l && g.time === he.time && !g.uncache)
|
|
1729
|
+
return V(r / g.width * u);
|
|
1730
|
+
if (m && (t === "height" || t === "width")) {
|
|
1731
1731
|
var y = e.style[t];
|
|
1732
1732
|
e.style[t] = u + n, p = e[c], y ? e.style[t] = y : We(e, t);
|
|
1733
1733
|
} else
|
|
1734
|
-
(
|
|
1735
|
-
return l &&
|
|
1734
|
+
(m || s === "%") && !Ws[ye(d, "display")] && (o.position = ye(e, "position")), d === e && (o.position = "static"), d.appendChild(Ve), p = Ve[c], d.removeChild(Ve), o.position = "absolute";
|
|
1735
|
+
return l && m && (g = He(d), g.time = he.time, g.width = d[c]), V(f ? p * r / u : p && r ? u / p * r : 0);
|
|
1736
1736
|
}, Ae = function(e, t, i, n) {
|
|
1737
1737
|
var r;
|
|
1738
1738
|
return Ni || vi(), t in ve && t !== "transform" && (t = ve[t], ~t.indexOf(",") && (t = t.split(",")[0])), Se[t] && t !== "transform" ? (r = St(e, n), r = t !== "transformOrigin" ? r[t] : r.svg ? r.origin : Yt(ye(e, se)) + " " + r.zOrigin + "px") : (r = e.style[t], (!r || r === "auto" || n || ~(r + "").indexOf("calc(")) && (r = Ht[t] && Ht[t](e, t, i) || ye(e, t) || $n(e, t) || (t === "opacity" ? 1 : 0))), i && !~(r + "").trim().indexOf(" ") ? Fe(e, t, r, i) + i : r;
|
|
@@ -1741,15 +1741,15 @@ var nn, De, st, Ni, Ve, rn, Bi, ks = function() {
|
|
|
1741
1741
|
var r = dt(t, e, 1), s = r && ye(e, r, 1);
|
|
1742
1742
|
s && s !== i ? (t = r, i = s) : t === "borderColor" && (i = ye(e, "borderTopColor"));
|
|
1743
1743
|
}
|
|
1744
|
-
var o = new re(this._pt, e.style, t, 0, 1, gr), l = 0, h = 0, c, u, f,
|
|
1744
|
+
var o = new re(this._pt, e.style, t, 0, 1, gr), l = 0, h = 0, c, u, f, m, p, d, g, _, y, b, x, v;
|
|
1745
1745
|
if (o.b = i, o.e = n, i += "", n += "", n.substring(0, 6) === "var(--" && (n = ye(e, n.substring(4, n.indexOf(")")))), n === "auto" && (d = e.style[t], e.style[t] = n, n = ye(e, t) || n, d ? e.style[t] = d : We(e, t)), c = [i, n], ar(c), i = c[0], n = c[1], f = i.match(et) || [], v = n.match(et) || [], v.length) {
|
|
1746
1746
|
for (; u = et.exec(n); )
|
|
1747
|
-
|
|
1747
|
+
g = u[0], y = n.substring(l, u.index), p ? p = (p + 1) % 5 : (y.substr(-5) === "rgba(" || y.substr(-5) === "hsla(") && (p = 1), g !== (d = f[h++] || "") && (m = parseFloat(d) || 0, x = d.substr((m + "").length), g.charAt(1) === "=" && (g = rt(m, g) + x), _ = parseFloat(g), b = g.substr((_ + "").length), l = et.lastIndex - b.length, b || (b = b || ue.units[t] || x, l === n.length && (n += b, o.e += b)), x !== b && (m = Fe(e, t, d, b) || 0), o._pt = {
|
|
1748
1748
|
_next: o._pt,
|
|
1749
1749
|
p: y || h === 1 ? y : ",",
|
|
1750
1750
|
//note: SVG spec allows omission of comma/space when a negative sign is wedged between two numbers, like 2.5-5.3 instead of 2.5,-5.3 but when tweening, the negative value may switch to positive, so we insert the comma just in case.
|
|
1751
|
-
s:
|
|
1752
|
-
c: _ -
|
|
1751
|
+
s: m,
|
|
1752
|
+
c: _ - m,
|
|
1753
1753
|
m: p && p < 4 || t === "zIndex" ? Math.round : 0
|
|
1754
1754
|
});
|
|
1755
1755
|
o.c = l < n.length ? n.substring(l, n.length) : "";
|
|
@@ -1854,14 +1854,14 @@ var nn, De, st, Ni, Ve, rn, Bi, ks = function() {
|
|
|
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);
|
|
1856
1856
|
}, Ei = function(e, t, i, n, r, s) {
|
|
1857
|
-
var o = e._gsap, l = r || Gi(e, !0), h = o.xOrigin || 0, c = o.yOrigin || 0, u = o.xOffset || 0, f = o.yOffset || 0,
|
|
1858
|
-
i ? l !== Tt && (E =
|
|
1857
|
+
var o = e._gsap, l = r || Gi(e, !0), h = o.xOrigin || 0, c = o.yOrigin || 0, u = o.xOffset || 0, f = o.yOffset || 0, m = l[0], p = l[1], d = l[2], g = l[3], _ = l[4], y = l[5], b = t.split(" "), x = parseFloat(b[0]) || 0, v = parseFloat(b[1]) || 0, P, E, C, w;
|
|
1858
|
+
i ? l !== Tt && (E = m * g - p * d) && (C = x * (g / E) + v * (-d / E) + (d * y - g * _) / E, w = x * (-p / E) + v * (m / E) - (m * y - p * _) / E, x = C, v = w) : (P = Pr(e), x = P.x + (~b[0].indexOf("%") ? x / 100 * P.width : x), v = P.y + (~(b[1] || b[0]).indexOf("%") ? v / 100 * P.height : v)), n || n !== !1 && o.smooth ? (_ = x - h, y = v - c, o.xOffset = u + (_ * m + y * d) - _, o.yOffset = f + (_ * p + y * g) - y) : o.xOffset = o.yOffset = 0, o.xOrigin = x, o.yOrigin = v, o.smooth = !!n, o.origin = t, o.originIsAbsolute = !!i, e.style[se] = "0px 0px", s && (Re(s, o, "xOrigin", h, x), Re(s, o, "yOrigin", c, v), Re(s, o, "xOffset", u, o.xOffset), Re(s, o, "yOffset", f, o.yOffset)), e.setAttribute("data-svg-origin", x + " " + v);
|
|
1859
1859
|
}, St = function(e, t) {
|
|
1860
1860
|
var i = e._gsap || new cr(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,
|
|
1864
|
-
return c = u = f = d =
|
|
1863
|
+
var n = e.style, r = i.scaleX < 0, s = "px", o = "deg", l = getComputedStyle(e), h = ye(e, se) || "0", c, u, f, m, p, d, g, _, y, b, x, 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 = g = _ = y = b = x = 0, m = p = 1, i.svg = !!(e.getCTM && Cr(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 ? (m = 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), g = 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), g && Math.abs(g) + Math.abs(d) > 359.9 && (g = d = 0, _ = 180 - _), m = 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, x = Pe ? 1 / (Pe < 0 ? -Pe : Pe) : 0), i.svg && (F = e.getAttribute("transform"), i.forceCSS = e.setAttribute("transform", "") || !Tr(ye(e, B)), F && e.setAttribute("transform", F))), Math.abs(y) > 90 && Math.abs(y) < 270 && (r ? (m *= -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(m), i.scaleY = V(p), i.rotation = V(d) + o, i.rotationX = V(g) + o, i.rotationY = V(_) + o, i.skewX = y + o, i.skewY = b + o, i.transformPerspective = x + 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 ? ea : wr ? Sr : Js, 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) {
|
|
@@ -1870,15 +1870,15 @@ var nn, De, st, Ni, Ve, rn, Bi, ks = function() {
|
|
|
1870
1870
|
}, Js = function(e, t) {
|
|
1871
1871
|
t.z = "0px", t.rotationY = t.rotationX = "0deg", t.force3D = 0, Sr(e, t);
|
|
1872
1872
|
}, Be = "0deg", gt = "0px", $e = ") ", Sr = function(e, t) {
|
|
1873
|
-
var i = t || this, n = i.xPercent, r = i.yPercent, s = i.x, o = i.y, l = i.z, h = i.rotation, c = i.rotationY, u = i.rotationX, f = i.skewX,
|
|
1873
|
+
var i = t || this, n = i.xPercent, r = i.yPercent, s = i.x, o = i.y, l = i.z, h = i.rotation, c = i.rotationY, u = i.rotationX, f = i.skewX, m = i.skewY, p = i.scaleX, d = i.scaleY, g = i.transformPerspective, _ = i.force3D, y = i.target, b = i.zOrigin, x = "", v = _ === "auto" && e && e !== 1 || _ === !0;
|
|
1874
1874
|
if (b && (u !== Be || c !== Be)) {
|
|
1875
1875
|
var P = parseFloat(c) * at, E = Math.sin(P), C = Math.cos(P), w;
|
|
1876
1876
|
P = parseFloat(u) * at, w = Math.cos(P), s = ni(y, s, E * w * -b), o = ni(y, o, -Math.sin(P) * -b), l = ni(y, l, C * w * -b + b);
|
|
1877
1877
|
}
|
|
1878
|
-
|
|
1878
|
+
g !== gt && (x += "perspective(" + g + $e), (n || r) && (x += "translate(" + n + "%, " + r + "%) "), (v || s !== gt || o !== gt || l !== gt) && (x += l !== gt || v ? "translate3d(" + s + ", " + o + ", " + l + ") " : "translate(" + s + ", " + o + $e), h !== Be && (x += "rotate(" + h + $e), c !== Be && (x += "rotateY(" + c + $e), u !== Be && (x += "rotateX(" + u + $e), (f !== Be || m !== Be) && (x += "skew(" + f + ", " + m + $e), (p !== 1 || d !== 1) && (x += "scale(" + p + ", " + d + $e), y.style[B] = x || "translate(0, 0)";
|
|
1879
1879
|
}, ea = function(e, t) {
|
|
1880
|
-
var i = t || this, n = i.xPercent, r = i.yPercent, s = i.x, o = i.y, l = i.rotation, h = i.skewX, c = i.skewY, u = i.scaleX, f = i.scaleY,
|
|
1881
|
-
l = parseFloat(l), h = parseFloat(h), c = parseFloat(c), c && (c = parseFloat(c), h += c, l += c), l || h ? (l *= at, h *= at, v = Math.cos(l) * u, P = Math.sin(l) * u, E = Math.sin(l - h) * -f, C = Math.cos(l - h) * f, h && (c *= at, w = Math.tan(h - c), w = Math.sqrt(1 + w * w), E *= w, C *= w, c && (w = Math.tan(c), w = Math.sqrt(1 + w * w), v *= w, P *= w)), v = V(v), P = V(P), E = V(E), C = V(C)) : (v = u, C = f, P = E = 0), (b && !~(s + "").indexOf("px") || x && !~(o + "").indexOf("px")) && (b = Fe(
|
|
1880
|
+
var i = t || this, n = i.xPercent, r = i.yPercent, s = i.x, o = i.y, l = i.rotation, h = i.skewX, c = i.skewY, u = i.scaleX, f = i.scaleY, m = i.target, p = i.xOrigin, d = i.yOrigin, g = i.xOffset, _ = i.yOffset, y = i.forceCSS, b = parseFloat(s), x = parseFloat(o), v, P, E, C, w;
|
|
1881
|
+
l = parseFloat(l), h = parseFloat(h), c = parseFloat(c), c && (c = parseFloat(c), h += c, l += c), l || h ? (l *= at, h *= at, v = Math.cos(l) * u, P = Math.sin(l) * u, E = Math.sin(l - h) * -f, C = Math.cos(l - h) * f, h && (c *= at, w = Math.tan(h - c), w = Math.sqrt(1 + w * w), E *= w, C *= w, c && (w = Math.tan(c), w = Math.sqrt(1 + w * w), v *= w, P *= w)), v = V(v), P = V(P), E = V(E), C = V(C)) : (v = u, C = f, P = E = 0), (b && !~(s + "").indexOf("px") || x && !~(o + "").indexOf("px")) && (b = Fe(m, "x", s, "px"), x = Fe(m, "y", o, "px")), (p || d || g || _) && (b = V(b + p - (p * v + d * E) + g), x = V(x + d - (p * P + d * C) + _)), (n || r) && (w = m.getBBox(), b = V(b + n / 100 * w.width), x = V(x + r / 100 * w.height)), w = "matrix(" + v + "," + P + "," + E + "," + C + "," + b + "," + x + ")", m.setAttribute("transform", w), y && (m.style[B] = w);
|
|
1882
1882
|
}, ta = function(e, t, i, n, r) {
|
|
1883
1883
|
var s = 360, o = K(r), l = parseFloat(r) * (o && ~r.indexOf("rad") ? Ge : 1), h = l - n, c = n + h + "deg", u, f;
|
|
1884
1884
|
return o && (u = r.split("_")[1], u === "short" && (h %= s, h !== h % (s / 2) && (h += h < 0 ? s : -s)), u === "cw" && h < 0 ? h = (h + s * sn) % s - ~~(h / s) * s : u === "ccw" && h > 0 && (h = (h - s * sn) % s - ~~(h / s) * s)), e._pt = f = new re(e._pt, t, i, n, h, zs), f.e = c, f.u = "deg", e._props.push(i), f;
|
|
@@ -1887,10 +1887,10 @@ var nn, De, st, Ni, Ve, rn, Bi, ks = function() {
|
|
|
1887
1887
|
e[i] = t[i];
|
|
1888
1888
|
return e;
|
|
1889
1889
|
}, ia = function(e, t, i) {
|
|
1890
|
-
var n = dn({}, i._gsap), r = "perspective,force3D,transformOrigin,svgOrigin", s = i.style, o, l, h, c, u, f,
|
|
1890
|
+
var n = dn({}, i._gsap), r = "perspective,force3D,transformOrigin,svgOrigin", s = i.style, o, l, h, c, u, f, m, p;
|
|
1891
1891
|
n.svg ? (h = i.getAttribute("transform"), i.setAttribute("transform", ""), s[B] = t, o = St(i, 1), We(i, B), i.setAttribute("transform", h)) : (h = getComputedStyle(i)[B], s[B] = t, o = St(i, 1), s[B] = h);
|
|
1892
1892
|
for (l in Se)
|
|
1893
|
-
h = n[l], c = o[l], h !== c && r.indexOf(l) < 0 && (
|
|
1893
|
+
h = n[l], c = o[l], h !== c && r.indexOf(l) < 0 && (m = X(h), p = X(c), u = m !== p ? Fe(i, l, h, p) : parseFloat(h), f = parseFloat(c), e._pt = new re(e._pt, o, l, u, f - u, bi), e._pt.u = p || 0, e._props.push(l));
|
|
1894
1894
|
dn(o, n);
|
|
1895
1895
|
};
|
|
1896
1896
|
ne("padding,margin,Width,Radius", function(a, e) {
|
|
@@ -1898,14 +1898,14 @@ ne("padding,margin,Width,Radius", function(a, e) {
|
|
|
1898
1898
|
return e < 2 ? a + o : "border" + o + a;
|
|
1899
1899
|
});
|
|
1900
1900
|
Ht[e > 1 ? "border" + a : a] = function(o, l, h, c, u) {
|
|
1901
|
-
var f,
|
|
1901
|
+
var f, m;
|
|
1902
1902
|
if (arguments.length < 4)
|
|
1903
1903
|
return f = s.map(function(p) {
|
|
1904
1904
|
return Ae(o, p, h);
|
|
1905
|
-
}),
|
|
1906
|
-
f = (c + "").split(" "),
|
|
1907
|
-
return
|
|
1908
|
-
}), o.init(l,
|
|
1905
|
+
}), m = f.join(" "), m.split(f[0]).length === 5 ? f[0] : m;
|
|
1906
|
+
f = (c + "").split(" "), m = {}, s.forEach(function(p, d) {
|
|
1907
|
+
return m[p] = f[d] = f[d] || f[(d - 1) / 2 | 0];
|
|
1908
|
+
}), o.init(l, m, u);
|
|
1909
1909
|
};
|
|
1910
1910
|
});
|
|
1911
1911
|
var Mr = {
|
|
@@ -1915,17 +1915,17 @@ var Mr = {
|
|
|
1915
1915
|
return e.style && e.nodeType;
|
|
1916
1916
|
},
|
|
1917
1917
|
init: function(e, t, i, n, r) {
|
|
1918
|
-
var s = this._props, o = e.style, l = i.vars.startAt, h, c, u, f,
|
|
1918
|
+
var s = this._props, o = e.style, l = i.vars.startAt, h, c, u, f, m, p, d, g, _, y, b, x, v, P, E, C;
|
|
1919
1919
|
Ni || vi(), this.styles = this.styles || Er(e), C = this.styles.props, this.tween = i;
|
|
1920
1920
|
for (d in t)
|
|
1921
1921
|
if (d !== "autoRound" && (c = t[d], !(le[d] && ur(d, t, i, n, e, r)))) {
|
|
1922
|
-
if (
|
|
1922
|
+
if (m = typeof c, p = Ht[d], m === "function" && (c = c.call(i, n, e, r), m = typeof c), m === "string" && ~c.indexOf("random(") && (c = Pt(c)), p)
|
|
1923
1923
|
p(this, e, d, c, i) && (E = 1);
|
|
1924
1924
|
else if (d.substr(0, 2) === "--")
|
|
1925
|
-
h = (getComputedStyle(e).getPropertyValue(d) + "").trim(), c += "", Oe.lastIndex = 0, Oe.test(h) || (
|
|
1926
|
-
else if (
|
|
1927
|
-
if (l && d in l ? (h = typeof l[d] == "function" ? l[d].call(i, n, e, r) : l[d], K(h) && ~h.indexOf("random(") && (h = Pt(h)), X(h + "") || h === "auto" || (h += ue.units[d] || X(Ae(e, d)) || ""), (h + "").charAt(1) === "=" && (h = Ae(e, d))) : h = Ae(e, d), f = parseFloat(h), y =
|
|
1928
|
-
if (this.styles.save(d),
|
|
1925
|
+
h = (getComputedStyle(e).getPropertyValue(d) + "").trim(), c += "", Oe.lastIndex = 0, Oe.test(h) || (g = X(h), _ = X(c)), _ ? g !== _ && (h = Fe(e, d, h, _) + _) : g && (c += g), this.add(o, "setProperty", h, c, n, r, 0, 0, d), s.push(d), C.push(d, 0, o[d]);
|
|
1926
|
+
else if (m !== "undefined") {
|
|
1927
|
+
if (l && d in l ? (h = typeof l[d] == "function" ? l[d].call(i, n, e, r) : l[d], K(h) && ~h.indexOf("random(") && (h = Pt(h)), X(h + "") || h === "auto" || (h += ue.units[d] || X(Ae(e, d)) || ""), (h + "").charAt(1) === "=" && (h = Ae(e, d))) : h = Ae(e, d), f = parseFloat(h), y = m === "string" && c.charAt(1) === "=" && c.substr(0, 2), y && (c = c.substr(2)), u = parseFloat(c), d in ve && (d === "autoAlpha" && (f === 1 && Ae(e, "visibility") === "hidden" && u && (f = 0), C.push("visibility", 0, o.visibility), Re(this, o, "visibility", f ? "inherit" : "hidden", u ? "inherit" : "hidden", !u)), d !== "scale" && d !== "transform" && (d = ve[d], ~d.indexOf(",") && (d = d.split(",")[0]))), b = d in Se, b) {
|
|
1928
|
+
if (this.styles.save(d), m === "string" && c.substring(0, 6) === "var(--" && (c = ye(e, c.substring(4, c.indexOf(")"))), u = parseFloat(c)), x || (v = e._gsap, v.renderTransform && !t.parseTransform || St(e, t.parseTransform), P = t.smoothOrigin !== !1 && v.smooth, x = this._pt = new re(this._pt, o, B, 0, 1, v.renderTransform, v, 0, -1), x.dep = 1), d === "scale")
|
|
1929
1929
|
this._pt = new re(this._pt, v, "scaleY", v.scaleY, (y ? rt(v.scaleY, y + u) : u) - v.scaleY || 0, bi), this._pt.u = 0, s.push("scaleY", d), d += "X";
|
|
1930
1930
|
else if (d === "transformOrigin") {
|
|
1931
1931
|
C.push(se, 0, o[se]), c = qs(c), v.svg ? Ei(e, c, 0, P, 0, this) : (_ = parseFloat(c.split(" ")[2]) || 0, _ !== v.zOrigin && Re(this, v, "zOrigin", v.zOrigin, _), Re(this, o, d, Yt(h), Yt(c)));
|
|
@@ -1948,7 +1948,7 @@ var Mr = {
|
|
|
1948
1948
|
}
|
|
1949
1949
|
} else d in o || (d = dt(d) || d);
|
|
1950
1950
|
if (b || (u || u === 0) && (f || f === 0) && !Us.test(c) && d in o)
|
|
1951
|
-
|
|
1951
|
+
g = (h + "").substr((f + "").length), u || (u = 0), _ = X(c) || (d in ue.units ? ue.units[d] : g), g !== _ && (f = Fe(e, d, h, _)), this._pt = new re(this._pt, b ? v : o, d, f, (y ? rt(f, y + u) : u) - f, !b && (_ === "px" || d === "zIndex") && t.autoRound !== !1 ? Bs : bi), this._pt.u = _ || 0, g !== _ && _ !== "%" && (this._pt.b = h, this._pt.r = Ns);
|
|
1952
1952
|
else if (d in o)
|
|
1953
1953
|
Xs.call(this, e, d, h, y ? y + c : c);
|
|
1954
1954
|
else if (d in e)
|
|
@@ -2360,7 +2360,7 @@ class ca extends Ee {
|
|
|
2360
2360
|
this._inputFocused && (y.preventDefault(), i(this._step * this._normalizeMouseWheel(y)));
|
|
2361
2361
|
};
|
|
2362
2362
|
let s = !1, o, l, h, c, u;
|
|
2363
|
-
const f = 5,
|
|
2363
|
+
const f = 5, m = (y) => {
|
|
2364
2364
|
o = y.clientX, l = h = y.clientY, s = !0, c = this.getValue(), u = 0, window.addEventListener("mousemove", p), window.addEventListener("mouseup", d);
|
|
2365
2365
|
}, p = (y) => {
|
|
2366
2366
|
if (s) {
|
|
@@ -2374,12 +2374,12 @@ class ca extends Ee {
|
|
|
2374
2374
|
h = y.clientY;
|
|
2375
2375
|
}, d = () => {
|
|
2376
2376
|
this._setDraggingStyle(!1, "vertical"), this._callOnFinishChange(), window.removeEventListener("mousemove", p), window.removeEventListener("mouseup", d);
|
|
2377
|
-
},
|
|
2377
|
+
}, g = () => {
|
|
2378
2378
|
this._inputFocused = !0;
|
|
2379
2379
|
}, _ = () => {
|
|
2380
2380
|
this._inputFocused = !1, this.updateDisplay(), this._callOnFinishChange();
|
|
2381
2381
|
};
|
|
2382
|
-
this.$input.addEventListener("input", t), this.$input.addEventListener("keydown", n), this.$input.addEventListener("wheel", r, { passive: !1 }), this.$input.addEventListener("mousedown",
|
|
2382
|
+
this.$input.addEventListener("input", t), this.$input.addEventListener("keydown", n), this.$input.addEventListener("wheel", r, { passive: !1 }), this.$input.addEventListener("mousedown", m), this.$input.addEventListener("focus", g), this.$input.addEventListener("blur", _);
|
|
2383
2383
|
}
|
|
2384
2384
|
_initSlider() {
|
|
2385
2385
|
this._hasSlider = !0, this.$slider = document.createElement("div"), this.$slider.classList.add("lil-slider"), this.$fill = document.createElement("div"), this.$fill.classList.add("lil-fill"), this.$slider.appendChild(this.$fill), this.$widget.insertBefore(this.$slider, this.$input), this.domElement.classList.add("lil-has-slider");
|
|
@@ -2407,15 +2407,15 @@ class ca extends Ee {
|
|
|
2407
2407
|
_.preventDefault(), t(_.touches[0].clientX);
|
|
2408
2408
|
}, f = () => {
|
|
2409
2409
|
this._callOnFinishChange(), this._setDraggingStyle(!1), window.removeEventListener("touchmove", u), window.removeEventListener("touchend", f);
|
|
2410
|
-
},
|
|
2410
|
+
}, m = this._callOnFinishChange.bind(this), p = 400;
|
|
2411
2411
|
let d;
|
|
2412
|
-
const
|
|
2412
|
+
const g = (_) => {
|
|
2413
2413
|
if (Math.abs(_.deltaX) < Math.abs(_.deltaY) && this._hasScrollBar) return;
|
|
2414
2414
|
_.preventDefault();
|
|
2415
2415
|
const b = this._normalizeMouseWheel(_) * this._step;
|
|
2416
|
-
this._snapClampSetValue(this.getValue() + b), this.$input.value = this.getValue(), clearTimeout(d), d = setTimeout(
|
|
2416
|
+
this._snapClampSetValue(this.getValue() + b), this.$input.value = this.getValue(), clearTimeout(d), d = setTimeout(m, p);
|
|
2417
2417
|
};
|
|
2418
|
-
this.$slider.addEventListener("mousedown", i), this.$slider.addEventListener("touchstart", c, { passive: !1 }), this.$slider.addEventListener("wheel",
|
|
2418
|
+
this.$slider.addEventListener("mousedown", i), this.$slider.addEventListener("touchstart", c, { passive: !1 }), this.$slider.addEventListener("wheel", g, { passive: !1 });
|
|
2419
2419
|
}
|
|
2420
2420
|
_setDraggingStyle(e, t = "horizontal") {
|
|
2421
2421
|
this.$slider && this.$slider.classList.toggle("lil-active", e), document.body.classList.toggle("lil-dragging", e), document.body.classList.toggle(`lil-${t}`, e);
|
|
@@ -4344,7 +4344,7 @@ class it {
|
|
|
4344
4344
|
const c = this.countries[h], u = this.statsMap.get(c.id);
|
|
4345
4345
|
let f = "#2a2a2a";
|
|
4346
4346
|
if (u) {
|
|
4347
|
-
const
|
|
4347
|
+
const m = e.accessor(u), p = Da(e, m);
|
|
4348
4348
|
f = this.interpolateColor(e.colorScale, p);
|
|
4349
4349
|
}
|
|
4350
4350
|
this.drawFeature(c, f, i);
|
|
@@ -4418,16 +4418,16 @@ class it {
|
|
|
4418
4418
|
if (this.currentRenderId !== n) return;
|
|
4419
4419
|
const u = Math.min(h + o, l);
|
|
4420
4420
|
for (let f = h; f < u; f++) {
|
|
4421
|
-
const
|
|
4421
|
+
const m = this.countries[f], p = r[m.id];
|
|
4422
4422
|
let d = "#2a2a2a";
|
|
4423
4423
|
if (p !== void 0) {
|
|
4424
|
-
const
|
|
4424
|
+
const g = Math.max(
|
|
4425
4425
|
0,
|
|
4426
4426
|
Math.min(1, (p - i[0]) / (i[1] - i[0]))
|
|
4427
4427
|
);
|
|
4428
|
-
d = this.interpolateColor(t,
|
|
4428
|
+
d = this.interpolateColor(t, g);
|
|
4429
4429
|
}
|
|
4430
|
-
this.drawFeature(
|
|
4430
|
+
this.drawFeature(m, d, s);
|
|
4431
4431
|
}
|
|
4432
4432
|
h = u, this.onTextureUpdate?.(), h < l && requestAnimationFrame(c);
|
|
4433
4433
|
};
|
|
@@ -4460,15 +4460,15 @@ class it {
|
|
|
4460
4460
|
}), r === 0 && c === 0) return null;
|
|
4461
4461
|
if (r === 0) return [s, l, o, h];
|
|
4462
4462
|
if (c === 0) return [e, i, t, n];
|
|
4463
|
-
const f = Math.min(e, s),
|
|
4464
|
-
if (
|
|
4463
|
+
const f = Math.min(e, s), m = Math.max(t, o);
|
|
4464
|
+
if (m - f > 180) {
|
|
4465
4465
|
if (r > c * 2)
|
|
4466
4466
|
return [e, i, t, n];
|
|
4467
4467
|
if (c > r * 2)
|
|
4468
4468
|
return [s, l, o, h];
|
|
4469
4469
|
}
|
|
4470
|
-
const d = Math.min(i, l),
|
|
4471
|
-
return [f, d,
|
|
4470
|
+
const d = Math.min(i, l), g = Math.max(n, h);
|
|
4471
|
+
return [f, d, m, g];
|
|
4472
4472
|
}
|
|
4473
4473
|
}
|
|
4474
4474
|
class _n extends Gr {
|
|
@@ -4507,50 +4507,50 @@ class Oa {
|
|
|
4507
4507
|
height: n
|
|
4508
4508
|
};
|
|
4509
4509
|
}, this.render = function(p, d) {
|
|
4510
|
-
p.matrixWorldAutoUpdate === !0 && p.updateMatrixWorld(), d.parent === null && d.matrixWorldAutoUpdate === !0 && d.updateMatrixWorld(), yn.copy(d.matrixWorldInverse), bn.multiplyMatrices(d.projectionMatrix, yn), c(p, p, d), this.sortObjects &&
|
|
4510
|
+
p.matrixWorldAutoUpdate === !0 && p.updateMatrixWorld(), d.parent === null && d.matrixWorldAutoUpdate === !0 && d.updateMatrixWorld(), yn.copy(d.matrixWorldInverse), bn.multiplyMatrices(d.projectionMatrix, yn), c(p, p, d), this.sortObjects && m(p);
|
|
4511
4511
|
}, this.setSize = function(p, d) {
|
|
4512
4512
|
i = p, n = d, r = i / 2, s = n / 2, l.style.width = p + "px", l.style.height = d + "px";
|
|
4513
4513
|
};
|
|
4514
4514
|
function h(p) {
|
|
4515
4515
|
p.isCSS2DObject && (p.element.style.display = "none");
|
|
4516
|
-
for (let d = 0,
|
|
4516
|
+
for (let d = 0, g = p.children.length; d < g; d++)
|
|
4517
4517
|
h(p.children[d]);
|
|
4518
4518
|
}
|
|
4519
|
-
function c(p, d,
|
|
4519
|
+
function c(p, d, g) {
|
|
4520
4520
|
if (p.visible === !1) {
|
|
4521
4521
|
h(p);
|
|
4522
4522
|
return;
|
|
4523
4523
|
}
|
|
4524
4524
|
if (p.isCSS2DObject) {
|
|
4525
4525
|
Qe.setFromMatrixPosition(p.matrixWorld), Qe.applyMatrix4(bn);
|
|
4526
|
-
const _ = Qe.z >= -1 && Qe.z <= 1 && p.layers.test(
|
|
4527
|
-
y.style.display = _ === !0 ? "" : "none", _ === !0 && (p.onBeforeRender(t, d,
|
|
4526
|
+
const _ = Qe.z >= -1 && Qe.z <= 1 && p.layers.test(g.layers) === !0, y = p.element;
|
|
4527
|
+
y.style.display = _ === !0 ? "" : "none", _ === !0 && (p.onBeforeRender(t, d, g), y.style.transform = "translate(" + -100 * p.center.x + "%," + -100 * p.center.y + "%)translate(" + (Qe.x * r + r) + "px," + (-Qe.y * s + s) + "px)", y.parentNode !== l && l.appendChild(y), p.onAfterRender(t, d, g));
|
|
4528
4528
|
const b = {
|
|
4529
|
-
distanceToCameraSquared: u(
|
|
4529
|
+
distanceToCameraSquared: u(g, p)
|
|
4530
4530
|
};
|
|
4531
4531
|
o.objects.set(p, b);
|
|
4532
4532
|
}
|
|
4533
4533
|
for (let _ = 0, y = p.children.length; _ < y; _++)
|
|
4534
|
-
c(p.children[_], d,
|
|
4534
|
+
c(p.children[_], d, g);
|
|
4535
4535
|
}
|
|
4536
4536
|
function u(p, d) {
|
|
4537
4537
|
return xn.setFromMatrixPosition(p.matrixWorld), vn.setFromMatrixPosition(d.matrixWorld), xn.distanceToSquared(vn);
|
|
4538
4538
|
}
|
|
4539
4539
|
function f(p) {
|
|
4540
4540
|
const d = [];
|
|
4541
|
-
return p.traverseVisible(function(
|
|
4542
|
-
|
|
4541
|
+
return p.traverseVisible(function(g) {
|
|
4542
|
+
g.isCSS2DObject && d.push(g);
|
|
4543
4543
|
}), d;
|
|
4544
4544
|
}
|
|
4545
|
-
function
|
|
4545
|
+
function m(p) {
|
|
4546
4546
|
const d = f(p).sort(function(_, y) {
|
|
4547
4547
|
if (_.renderOrder !== y.renderOrder)
|
|
4548
4548
|
return y.renderOrder - _.renderOrder;
|
|
4549
4549
|
const b = o.objects.get(_).distanceToCameraSquared, x = o.objects.get(y).distanceToCameraSquared;
|
|
4550
4550
|
return b - x;
|
|
4551
|
-
}),
|
|
4551
|
+
}), g = d.length;
|
|
4552
4552
|
for (let _ = 0, y = d.length; _ < y; _++)
|
|
4553
|
-
d[_].element.style.zIndex =
|
|
4553
|
+
d[_].element.style.zIndex = g - _;
|
|
4554
4554
|
}
|
|
4555
4555
|
}
|
|
4556
4556
|
}
|
|
@@ -4887,24 +4887,26 @@ class $a {
|
|
|
4887
4887
|
*/
|
|
4888
4888
|
addCustomLabels(e) {
|
|
4889
4889
|
e.forEach((t) => {
|
|
4890
|
-
|
|
4891
|
-
|
|
4892
|
-
|
|
4893
|
-
|
|
4894
|
-
|
|
4895
|
-
const
|
|
4890
|
+
const i = (m) => String(parseInt(m) || m).toLowerCase(), n = (m) => m.toLowerCase().replace(/^the\s+/, "").trim(), r = i(t.id), s = n(t.name);
|
|
4891
|
+
if (this.labels.some((m) => {
|
|
4892
|
+
const p = i(m.country.id), d = n(m.country.name);
|
|
4893
|
+
return p === r || d === s;
|
|
4894
|
+
})) return;
|
|
4895
|
+
const l = t.size || "small", h = document.createElement("div");
|
|
4896
|
+
h.className = `country-label hidden size-${l} custom-label`, h.textContent = t.name;
|
|
4897
|
+
const c = new _n(h), u = {
|
|
4896
4898
|
id: t.id,
|
|
4897
4899
|
code: t.id,
|
|
4898
4900
|
name: t.name
|
|
4899
|
-
},
|
|
4900
|
-
element:
|
|
4901
|
-
object:
|
|
4902
|
-
country:
|
|
4901
|
+
}, f = {
|
|
4902
|
+
element: h,
|
|
4903
|
+
object: c,
|
|
4904
|
+
country: u,
|
|
4903
4905
|
lat: t.lat,
|
|
4904
4906
|
lon: t.lon,
|
|
4905
|
-
sizeCategory:
|
|
4907
|
+
sizeCategory: l
|
|
4906
4908
|
};
|
|
4907
|
-
this.labelGroup.add(
|
|
4909
|
+
this.labelGroup.add(c), this.labels.push(f), this.dataIds.add(t.id), this.updateLabelPosition(c, f, this.currentMorph);
|
|
4908
4910
|
}), this.setStyle(this.currentStyle);
|
|
4909
4911
|
}
|
|
4910
4912
|
/**
|
|
@@ -4924,14 +4926,14 @@ class $a {
|
|
|
4924
4926
|
cameraDirection = new A.Vector3();
|
|
4925
4927
|
labelNormal = new A.Vector3();
|
|
4926
4928
|
updateLabelPosition(e, t, i) {
|
|
4927
|
-
const { lat: n, lon: r, element: s } = t, o = (r + 180) / 360, l = (n + 90) / 180, h = (o - 0.5) * 2 * Math.PI, c = (l - 0.5) * Math.PI, u = this.sphereRadius + 0.3, f = u * Math.cos(c) * Math.sin(h),
|
|
4929
|
+
const { lat: n, lon: r, element: s } = t, o = (r + 180) / 360, l = (n + 90) / 180, h = (o - 0.5) * 2 * Math.PI, c = (l - 0.5) * Math.PI, u = this.sphereRadius + 0.3, f = u * Math.cos(c) * Math.sin(h), m = u * Math.sin(c), p = u * Math.cos(c) * Math.cos(h), d = 2 * Math.PI * this.sphereRadius, g = Math.PI * this.sphereRadius, _ = (o - 0.5) * d, y = (l - 0.5) * g, b = 0.3, x = i * i * (3 - 2 * i);
|
|
4928
4930
|
if (this.localPos.set(
|
|
4929
4931
|
_ + x * (f - _),
|
|
4930
|
-
y + x * (
|
|
4932
|
+
y + x * (m - y),
|
|
4931
4933
|
b + x * (p - b)
|
|
4932
4934
|
), this.globe)
|
|
4933
4935
|
if (this.worldPos.copy(this.localPos), this.worldPos.applyMatrix4(this.globe.matrixWorld), e.position.copy(this.worldPos), this.camera && x > 0.5) {
|
|
4934
|
-
this.cameraDirection.copy(this.camera.position).normalize(), this.labelNormal.set(f,
|
|
4936
|
+
this.cameraDirection.copy(this.camera.position).normalize(), this.labelNormal.set(f, m, p).normalize(), this.labelNormal.applyMatrix4(this.globe.matrixWorld).normalize();
|
|
4935
4937
|
const v = this.labelNormal.dot(this.cameraDirection);
|
|
4936
4938
|
s.style.opacity = v > 0.15 ? "" : "0";
|
|
4937
4939
|
} else
|
|
@@ -5086,7 +5088,7 @@ var ai = 12, En = 5003, Va = [0, 1, 3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047,
|
|
|
5086
5088
|
function ja(a, e, t, i, n = Lr(512), r = new Uint8Array(256), s = new Int32Array(En), o = new Int32Array(En)) {
|
|
5087
5089
|
let l = s.length, h = Math.max(2, i);
|
|
5088
5090
|
r.fill(0), o.fill(0), s.fill(-1);
|
|
5089
|
-
let c = 0, u = 0, f = h + 1,
|
|
5091
|
+
let c = 0, u = 0, f = h + 1, m = f, p = !1, d = m, g = (1 << d) - 1, _ = 1 << f - 1, y = _ + 1, b = _ + 2, x = 0, v = t[0], P = 0;
|
|
5090
5092
|
for (let w = l; w < 65536; w *= 2) ++P;
|
|
5091
5093
|
P = 8 - P, n.writeByte(h), C(_);
|
|
5092
5094
|
let E = t.length;
|
|
@@ -5107,7 +5109,7 @@ function ja(a, e, t, i, n = Lr(512), r = new Uint8Array(256), s = new Int32Array
|
|
|
5107
5109
|
return C(v), C(y), n.writeByte(0), n.bytesView();
|
|
5108
5110
|
function C(w) {
|
|
5109
5111
|
for (c &= Va[u], u > 0 ? c |= w << u : c = w, u += d; u >= 8; ) r[x++] = c & 255, x >= 254 && (n.writeByte(x), n.writeBytesView(r, 0, x), x = 0), c >>= 8, u -= 8;
|
|
5110
|
-
if ((b >
|
|
5112
|
+
if ((b > g || p) && (p ? (d = m, g = (1 << d) - 1, p = !1) : (++d, g = d === ai ? 1 << d : (1 << d) - 1)), w == y) {
|
|
5111
5113
|
for (; u > 0; ) r[x++] = c & 255, x >= 254 && (n.writeByte(x), n.writeBytesView(r, 0, x), x = 0), c >>= 8, u -= 8;
|
|
5112
5114
|
x > 0 && (n.writeByte(x), n.writeBytesView(r, 0, x), x = 0);
|
|
5113
5115
|
}
|
|
@@ -5135,7 +5137,7 @@ function wn(a, e, t) {
|
|
|
5135
5137
|
r.ac;
|
|
5136
5138
|
let o = r.rc, l = r.gc, h = r.bc;
|
|
5137
5139
|
for (var c = r.fw; c != 0; c = a[c].fw) {
|
|
5138
|
-
let f = a[c],
|
|
5140
|
+
let f = a[c], m = f.cnt, p = s * m / (s + m);
|
|
5139
5141
|
if (!(p >= n)) {
|
|
5140
5142
|
var u = 0;
|
|
5141
5143
|
u += p * Nt(f.rc - o), !(u >= n) && (u += p * Nt(f.gc - l), !(u >= n) && (u += p * Nt(f.bc - h), !(u >= n) && (n = u, i = c)));
|
|
@@ -5166,44 +5168,44 @@ function Za(a, e, t = {}) {
|
|
|
5166
5168
|
let { format: i = "rgb565", clearAlpha: n = !0, clearAlphaColor: r = 0, clearAlphaThreshold: s = 0, oneBitAlpha: o = !1 } = t;
|
|
5167
5169
|
if (!a || !a.buffer) throw new Error("quantize() expected RGBA Uint8Array data");
|
|
5168
5170
|
if (!(a instanceof Uint8Array) && !(a instanceof Uint8ClampedArray)) throw new Error("quantize() expected RGBA Uint8Array data");
|
|
5169
|
-
let l = new Uint32Array(a.buffer), h = t.useSqrt !== !1, c = i === "rgba4444", u = Ya(l, i), f = u.length,
|
|
5170
|
-
for (var d = 0,
|
|
5171
|
-
let L = u[
|
|
5171
|
+
let l = new Uint32Array(a.buffer), h = t.useSqrt !== !1, c = i === "rgba4444", u = Ya(l, i), f = u.length, m = f - 1, p = new Uint32Array(f + 1);
|
|
5172
|
+
for (var d = 0, g = 0; g < f; ++g) {
|
|
5173
|
+
let L = u[g];
|
|
5172
5174
|
if (L != null) {
|
|
5173
5175
|
var _ = 1 / L.cnt;
|
|
5174
5176
|
c && (L.ac *= _), L.rc *= _, L.gc *= _, L.bc *= _, u[d++] = L;
|
|
5175
5177
|
}
|
|
5176
5178
|
}
|
|
5177
5179
|
Nt(e) / d < 0.022 && (h = !1);
|
|
5178
|
-
for (var
|
|
5179
|
-
h && (u[
|
|
5180
|
+
for (var g = 0; g < d - 1; ++g) u[g].fw = g + 1, u[g + 1].bk = g, h && (u[g].cnt = Math.sqrt(u[g].cnt));
|
|
5181
|
+
h && (u[g].cnt = Math.sqrt(u[g].cnt));
|
|
5180
5182
|
var y, b, x;
|
|
5181
|
-
for (
|
|
5182
|
-
wn(u,
|
|
5183
|
-
var v = u[
|
|
5183
|
+
for (g = 0; g < d; ++g) {
|
|
5184
|
+
wn(u, g);
|
|
5185
|
+
var v = u[g].err;
|
|
5184
5186
|
for (b = ++p[0]; b > 1 && (x = b >> 1, !(u[y = p[x]].err <= v)); b = x) p[b] = y;
|
|
5185
|
-
p[b] =
|
|
5187
|
+
p[b] = g;
|
|
5186
5188
|
}
|
|
5187
5189
|
var P = d - e;
|
|
5188
|
-
for (
|
|
5190
|
+
for (g = 0; g < P; ) {
|
|
5189
5191
|
for (var E; ; ) {
|
|
5190
5192
|
var C = p[1];
|
|
5191
5193
|
if (E = u[C], E.tm >= E.mtm && u[E.nn].mtm <= E.tm) break;
|
|
5192
|
-
E.mtm ==
|
|
5194
|
+
E.mtm == m ? C = p[1] = p[p[0]--] : (wn(u, C), E.tm = g);
|
|
5193
5195
|
var v = u[C].err;
|
|
5194
5196
|
for (b = 1; (x = b + b) <= p[0] && (x < p[0] && u[p[x]].err > u[p[x + 1]].err && x++, !(v <= u[y = p[x]].err)); b = x) p[b] = y;
|
|
5195
5197
|
p[b] = C;
|
|
5196
5198
|
}
|
|
5197
5199
|
var w = u[E.nn], S = E.cnt, D = w.cnt, _ = 1 / (S + D);
|
|
5198
|
-
c && (E.ac = _ * (S * E.ac + D * w.ac)), E.rc = _ * (S * E.rc + D * w.rc), E.gc = _ * (S * E.gc + D * w.gc), E.bc = _ * (S * E.bc + D * w.bc), E.cnt += w.cnt, E.mtm = ++
|
|
5200
|
+
c && (E.ac = _ * (S * E.ac + D * w.ac)), E.rc = _ * (S * E.rc + D * w.rc), E.gc = _ * (S * E.gc + D * w.gc), E.bc = _ * (S * E.bc + D * w.bc), E.cnt += w.cnt, E.mtm = ++g, u[w.bk].fw = w.fw, u[w.fw].bk = w.bk, w.mtm = m;
|
|
5199
5201
|
}
|
|
5200
5202
|
let T = [];
|
|
5201
5203
|
var R = 0;
|
|
5202
|
-
for (
|
|
5203
|
-
let L = kt(Math.round(u[
|
|
5204
|
-
c && (F = kt(Math.round(u[
|
|
5204
|
+
for (g = 0; ; ++R) {
|
|
5205
|
+
let L = kt(Math.round(u[g].rc), 0, 255), $ = kt(Math.round(u[g].gc), 0, 255), U = kt(Math.round(u[g].bc), 0, 255), F = 255;
|
|
5206
|
+
c && (F = kt(Math.round(u[g].ac), 0, 255), o && (F = F <= (typeof o == "number" ? o : 127) ? 0 : 255), n && F <= s && (L = $ = U = r, F = 0));
|
|
5205
5207
|
let ee = c ? [L, $, U, F] : [L, $, U];
|
|
5206
|
-
if (Ka(T, ee) || T.push(ee), (
|
|
5208
|
+
if (Ka(T, ee) || T.push(ee), (g = u[g].fw) == 0) break;
|
|
5207
5209
|
}
|
|
5208
5210
|
return T;
|
|
5209
5211
|
}
|
|
@@ -5220,13 +5222,13 @@ function Wa(a, e, t = "rgb565") {
|
|
|
5220
5222
|
if (e.length > 256) throw new Error("applyPalette() only works with 256 colors or less");
|
|
5221
5223
|
let i = new Uint32Array(a.buffer), n = i.length, r = t === "rgb444" ? 4096 : 65536, s = new Uint8Array(n), o = new Array(r);
|
|
5222
5224
|
if (t === "rgba4444") for (let l = 0; l < n; l++) {
|
|
5223
|
-
let h = i[l], c = h >> 24 & 255, u = h >> 16 & 255, f = h >> 8 & 255,
|
|
5225
|
+
let h = i[l], c = h >> 24 & 255, u = h >> 16 & 255, f = h >> 8 & 255, m = h & 255, p = Or(m, f, u, c), d = p in o ? o[p] : o[p] = Xa(m, f, u, c, e);
|
|
5224
5226
|
s[l] = d;
|
|
5225
5227
|
}
|
|
5226
5228
|
else {
|
|
5227
5229
|
let l = t === "rgb444" ? kr : Ir;
|
|
5228
5230
|
for (let h = 0; h < n; h++) {
|
|
5229
|
-
let c = i[h], u = c >> 16 & 255, f = c >> 8 & 255,
|
|
5231
|
+
let c = i[h], u = c >> 16 & 255, f = c >> 8 & 255, m = c & 255, p = l(m, f, u), d = p in o ? o[p] : o[p] = qa(m, f, u, e);
|
|
5230
5232
|
s[h] = d;
|
|
5231
5233
|
}
|
|
5232
5234
|
}
|
|
@@ -5241,8 +5243,8 @@ function Xa(a, e, t, i, n) {
|
|
|
5241
5243
|
if (c += je(u - a), c > s) continue;
|
|
5242
5244
|
let f = l[1];
|
|
5243
5245
|
if (c += je(f - e), c > s) continue;
|
|
5244
|
-
let
|
|
5245
|
-
c += je(
|
|
5246
|
+
let m = l[2];
|
|
5247
|
+
c += je(m - t), !(c > s) && (s = c, r = o);
|
|
5246
5248
|
}
|
|
5247
5249
|
return r;
|
|
5248
5250
|
}
|
|
@@ -5275,13 +5277,13 @@ function Qa(a = {}) {
|
|
|
5275
5277
|
return i.buffer;
|
|
5276
5278
|
}, get stream() {
|
|
5277
5279
|
return i;
|
|
5278
|
-
}, writeHeader: h, writeFrame(c, u, f,
|
|
5279
|
-
let { transparent: p = !1, transparentIndex: d = 0, delay:
|
|
5280
|
-
if (t ? l || (v = !0, h(), l = !0) : v = !!
|
|
5280
|
+
}, writeHeader: h, writeFrame(c, u, f, m = {}) {
|
|
5281
|
+
let { transparent: p = !1, transparentIndex: d = 0, delay: g = 0, palette: _ = null, repeat: y = 0, colorDepth: b = 8, dispose: x = -1 } = m, v = !1;
|
|
5282
|
+
if (t ? l || (v = !0, h(), l = !0) : v = !!m.first, u = Math.max(0, Math.floor(u)), f = Math.max(0, Math.floor(f)), v) {
|
|
5281
5283
|
if (!_) throw new Error("First frame must include a { palette } option");
|
|
5282
5284
|
eo(i, u, f, _, b), Pn(i, _), y >= 0 && to(i, y);
|
|
5283
5285
|
}
|
|
5284
|
-
let P = Math.round(
|
|
5286
|
+
let P = Math.round(g / 10);
|
|
5285
5287
|
Ja(i, x, P, p, d);
|
|
5286
5288
|
let E = !!_ && !v;
|
|
5287
5289
|
io(i, u, f, E ? _ : null), E && Pn(i, _), no(i, c, u, f, b, r, s, o);
|
|
@@ -5387,9 +5389,9 @@ class ro {
|
|
|
5387
5389
|
if (!this.legendElement || !this.legendElement.classList.contains("visible")) return;
|
|
5388
5390
|
const n = this.legendElement, r = n.querySelector(".gralobe-legend-title") || n.querySelector(".legend-title"), s = n.querySelector(".gralobe-legend-gradient") || n.querySelector(".legend-gradient"), o = n.querySelector(".gralobe-legend-min") || n.querySelector(".legend-min"), l = n.querySelector(".gralobe-legend-max") || n.querySelector(".legend-max"), h = n.querySelector(".gralobe-legend-description") || n.querySelector(".legend-description");
|
|
5389
5391
|
if (!r || !s) return;
|
|
5390
|
-
const c = 280, u = 100, f = 20,
|
|
5391
|
-
e.fillStyle = "rgba(0, 10, 20, 0.9)", e.strokeStyle = "rgba(100, 170, 255, 0.5)", e.lineWidth = 2, e.beginPath(), e.roundRect ? e.roundRect(
|
|
5392
|
-
const
|
|
5392
|
+
const c = 280, u = 100, f = 20, m = t - c - f, p = i - u - f, d = 12;
|
|
5393
|
+
e.fillStyle = "rgba(0, 10, 20, 0.9)", e.strokeStyle = "rgba(100, 170, 255, 0.5)", e.lineWidth = 2, e.beginPath(), e.roundRect ? e.roundRect(m, p, c, u, d) : e.rect(m, p, c, u), e.fill(), e.stroke(), e.fillStyle = "#44aaff", e.font = "bold 18px Arial, sans-serif", e.fillText(r.textContent || "", m + 16, p + 28);
|
|
5394
|
+
const g = m + 16, _ = p + 40, y = c - 32, b = 20, x = s.style.background || "";
|
|
5393
5395
|
let v = [];
|
|
5394
5396
|
const P = x.match(/rgba?\([^)]+\)/g);
|
|
5395
5397
|
if (P && P.length >= 2)
|
|
@@ -5399,17 +5401,17 @@ class ro {
|
|
|
5399
5401
|
E && E.length >= 2 && (v = E);
|
|
5400
5402
|
}
|
|
5401
5403
|
if (v.length >= 2) {
|
|
5402
|
-
const E = e.createLinearGradient(
|
|
5403
|
-
E.addColorStop(0, v[0]), v.length >= 3 ? (E.addColorStop(0.5, v[1]), E.addColorStop(1, v[2])) : E.addColorStop(1, v[1]), e.fillStyle = E, e.beginPath(), e.roundRect ? e.roundRect(
|
|
5404
|
+
const E = e.createLinearGradient(g, 0, g + y, 0);
|
|
5405
|
+
E.addColorStop(0, v[0]), v.length >= 3 ? (E.addColorStop(0.5, v[1]), E.addColorStop(1, v[2])) : E.addColorStop(1, v[1]), e.fillStyle = E, e.beginPath(), e.roundRect ? e.roundRect(g, _, y, b, 4) : e.rect(g, _, y, b), e.fill();
|
|
5404
5406
|
} else {
|
|
5405
|
-
const E = e.createLinearGradient(
|
|
5406
|
-
E.addColorStop(0, "#cc6600"), E.addColorStop(0.5, "#ffaa44"), E.addColorStop(1, "#ffeecc"), e.fillStyle = E, e.beginPath(), e.roundRect ? e.roundRect(
|
|
5407
|
+
const E = e.createLinearGradient(g, 0, g + y, 0);
|
|
5408
|
+
E.addColorStop(0, "#cc6600"), E.addColorStop(0.5, "#ffaa44"), E.addColorStop(1, "#ffeecc"), e.fillStyle = E, e.beginPath(), e.roundRect ? e.roundRect(g, _, y, b, 4) : e.rect(g, _, y, b), e.fill(), console.log("Legend gradient style:", x);
|
|
5407
5409
|
}
|
|
5408
|
-
if (e.fillStyle = "#cccccc", e.font = "14px Arial, sans-serif", o && e.fillText(o.textContent || "",
|
|
5410
|
+
if (e.fillStyle = "#cccccc", e.font = "14px Arial, sans-serif", o && e.fillText(o.textContent || "", g, p + 78), l) {
|
|
5409
5411
|
const E = l.textContent || "", C = e.measureText(E).width;
|
|
5410
|
-
e.fillText(E,
|
|
5412
|
+
e.fillText(E, g + y - C, p + 78);
|
|
5411
5413
|
}
|
|
5412
|
-
h && h.textContent && (e.fillStyle = "#888888", e.font = "italic 12px Arial, sans-serif", e.fillText(h.textContent,
|
|
5414
|
+
h && h.textContent && (e.fillStyle = "#888888", e.font = "italic 12px Arial, sans-serif", e.fillText(h.textContent, g, p + 95));
|
|
5413
5415
|
} catch (n) {
|
|
5414
5416
|
console.warn("Failed to draw legend on canvas:", n);
|
|
5415
5417
|
}
|
|
@@ -5528,8 +5530,8 @@ class ro {
|
|
|
5528
5530
|
try {
|
|
5529
5531
|
const r = this.frames[0], s = r.width, o = r.height, l = Za(r.data, 256), h = Qa();
|
|
5530
5532
|
for (let p = 0; p < this.frames.length; p++) {
|
|
5531
|
-
const d = this.frames[p],
|
|
5532
|
-
h.writeFrame(
|
|
5533
|
+
const d = this.frames[p], g = Wa(d.data, l);
|
|
5534
|
+
h.writeFrame(g, s, o, {
|
|
5533
5535
|
palette: p === 0 ? l : void 0,
|
|
5534
5536
|
// Only first frame needs palette
|
|
5535
5537
|
delay: n,
|
|
@@ -5538,8 +5540,8 @@ class ro {
|
|
|
5538
5540
|
}), p % 10 === 0 && await new Promise((_) => setTimeout(_, 0));
|
|
5539
5541
|
}
|
|
5540
5542
|
h.finish();
|
|
5541
|
-
const c = h.bytes(), u = new Blob([c], { type: "image/gif" }), f = URL.createObjectURL(u),
|
|
5542
|
-
this.downloadFile(f,
|
|
5543
|
+
const c = h.bytes(), u = new Blob([c], { type: "image/gif" }), f = URL.createObjectURL(u), m = i || `globe-${Date.now()}.gif`;
|
|
5544
|
+
this.downloadFile(f, m), setTimeout(() => URL.revokeObjectURL(f), 1e3), console.log(`GIF saved: ${m} (${this.frames.length} frames, ${(u.size / 1024).toFixed(1)}KB)`);
|
|
5543
5545
|
} catch (r) {
|
|
5544
5546
|
console.error("Failed to generate GIF:", r);
|
|
5545
5547
|
}
|
|
@@ -7006,7 +7008,7 @@ class wo {
|
|
|
7006
7008
|
const e = this.choropleth?.getBounds(), t = Math.PI * 2 * Q, i = Math.PI * Q;
|
|
7007
7009
|
let n = 0, r = 0, s = t, o = i;
|
|
7008
7010
|
if (e) {
|
|
7009
|
-
const [
|
|
7011
|
+
const [m, p, d, g] = e, _ = m / 180 * (t / 2), y = d / 180 * (t / 2), b = p / 90 * (i / 2), x = g / 90 * (i / 2);
|
|
7010
7012
|
n = (_ + y) / 2, r = (b + x) / 2, s = (y - _) * 1.2, o = (x - b) * 1.2;
|
|
7011
7013
|
}
|
|
7012
7014
|
const l = this.camera.fov * Math.PI / 180, h = this.camera.aspect, c = o / 2 / Math.tan(l / 2), u = s / (2 * Math.tan(l / 2) * h), f = Math.max(c, u);
|