gralobe 1.0.3 → 1.0.4
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 +102 -90
- package/dist/gralobe.js.map +1 -1
- package/dist/gralobe.umd.cjs +10 -1
- package/dist/gralobe.umd.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/package.json +1 -1
package/dist/gralobe.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as M from "three";
|
|
2
|
-
import { Controls as Or, Vector3 as se, MOUSE as tt, TOUCH as Qe, Quaternion as Yi, Spherical as Zi, Vector2 as de, Ray as kr, Plane as
|
|
3
|
-
const Xi = { type: "change" }, Pi = { type: "start" }, Tn = { type: "end" }, Mt = new kr(), Wi = new
|
|
2
|
+
import { Controls as Or, Vector3 as se, MOUSE as tt, TOUCH as Qe, Quaternion as Yi, Spherical as Zi, Vector2 as de, Ray as kr, Plane as Lr, MathUtils as Ir, Matrix4 as Cn, Object3D as Ur } from "three";
|
|
3
|
+
const Xi = { type: "change" }, Pi = { type: "start" }, Tn = { type: "end" }, Mt = new kr(), Wi = new Lr(), Fr = Math.cos(70 * Ir.DEG2RAD), Y = new se(), J = 2 * Math.PI, k = {
|
|
4
4
|
NONE: -1,
|
|
5
5
|
ROTATE: 0,
|
|
6
6
|
DOLLY: 1,
|
|
@@ -473,7 +473,7 @@ var he = {
|
|
|
473
473
|
duration: 0.5,
|
|
474
474
|
overwrite: !1,
|
|
475
475
|
delay: 0
|
|
476
|
-
}, Ci, X, z, fe = 1e8,
|
|
476
|
+
}, Ci, X, z, fe = 1e8, I = 1 / fe, oi = Math.PI * 2, qr = oi / 4, Qr = 0, Sn = Math.sqrt, Jr = Math.cos, es = Math.sin, Z = function(e) {
|
|
477
477
|
return typeof e == "string";
|
|
478
478
|
}, V = function(e) {
|
|
479
479
|
return typeof e == "function";
|
|
@@ -490,13 +490,13 @@ var he = {
|
|
|
490
490
|
}, Rt = function(e) {
|
|
491
491
|
return V(e) || Z(e);
|
|
492
492
|
}, Dn = typeof ArrayBuffer == "function" && ArrayBuffer.isView || function() {
|
|
493
|
-
}, K = Array.isArray, li = /(?:-?\.?\d|\.)+/gi, Mn = /[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g, Je = /[-+=.]*\d+[.e-]*\d*[a-z%]*/g, Xt = /[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi, Rn = /[+-]=-?[.\d]+/, On = /[^,'"\[\]\s]+/gi, ts = /^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i, N, _e, hi, Si, ce = {}, Ft = {}, kn,
|
|
493
|
+
}, K = Array.isArray, li = /(?:-?\.?\d|\.)+/gi, Mn = /[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g, Je = /[-+=.]*\d+[.e-]*\d*[a-z%]*/g, Xt = /[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi, Rn = /[+-]=-?[.\d]+/, On = /[^,'"\[\]\s]+/gi, ts = /^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i, N, _e, hi, Si, ce = {}, Ft = {}, kn, Ln = function(e) {
|
|
494
494
|
return (Ft = at(e, ce)) && re;
|
|
495
495
|
}, Di = function(e, t) {
|
|
496
496
|
return console.warn("Invalid property", e, "set to", t, "Missing plugin? gsap.registerPlugin()");
|
|
497
497
|
}, vt = function(e, t) {
|
|
498
498
|
return !t && console.warn(e);
|
|
499
|
-
},
|
|
499
|
+
}, In = function(e, t) {
|
|
500
500
|
return e && (ce[e] = t) && Ft && (Ft[e] = t) || ce;
|
|
501
501
|
}, Et = function() {
|
|
502
502
|
return 0;
|
|
@@ -509,12 +509,12 @@ var he = {
|
|
|
509
509
|
kill: !1
|
|
510
510
|
}, ns = {
|
|
511
511
|
suppressEvents: !0
|
|
512
|
-
}, Mi = {}, Re = [], ci = {}, Un, ae = {}, Wt = {}, Ki = 30,
|
|
512
|
+
}, Mi = {}, Re = [], ci = {}, Un, ae = {}, Wt = {}, Ki = 30, Lt = [], Ri = "", Oi = function(e) {
|
|
513
513
|
var t = e[0], i, n;
|
|
514
514
|
if (ve(t) || V(t) || (e = [e]), !(i = (t._gsap || {}).harness)) {
|
|
515
|
-
for (n =
|
|
515
|
+
for (n = Lt.length; n-- && !Lt[n].targetTest(t); )
|
|
516
516
|
;
|
|
517
|
-
i =
|
|
517
|
+
i = Lt[n];
|
|
518
518
|
}
|
|
519
519
|
for (n = e.length; n--; )
|
|
520
520
|
e[n] && (e[n]._gsap || (e[n]._gsap = new ar(e[n], i))) || e.splice(n, 1);
|
|
@@ -614,24 +614,24 @@ var he = {
|
|
|
614
614
|
}, $t = function(e, t) {
|
|
615
615
|
return (e - t._start) * t._ts + (t._ts >= 0 ? 0 : t._dirty ? t.totalDuration() : t._tDur);
|
|
616
616
|
}, Ht = function(e) {
|
|
617
|
-
return e._end = H(e._start + (e._tDur / Math.abs(e._ts || e._rts ||
|
|
617
|
+
return e._end = H(e._start + (e._tDur / Math.abs(e._ts || e._rts || I) || 0));
|
|
618
618
|
}, Yt = function(e, t) {
|
|
619
619
|
var i = e._dp;
|
|
620
620
|
return i && i.smoothChildTiming && e._ts && (e._start = H(i._time - (e._ts > 0 ? t / e._ts : ((e._dirty ? e.totalDuration() : e._tDur) - t) / -e._ts)), Ht(e), i._dirty || He(i, e)), e;
|
|
621
621
|
}, Vn = function(e, t) {
|
|
622
622
|
var i;
|
|
623
|
-
if ((t._time || !t._dur && t._initted || t._start < e._time && (t._dur || !t.add)) && (i = $t(e.rawTime(), t), (!t._dur || Dt(0, t.totalDuration(), i) - t._tTime >
|
|
623
|
+
if ((t._time || !t._dur && t._initted || t._start < e._time && (t._dur || !t.add)) && (i = $t(e.rawTime(), t), (!t._dur || Dt(0, t.totalDuration(), i) - t._tTime > I) && t.render(i, !0)), He(e, t)._dp && e._initted && e._time >= e._dur && e._ts) {
|
|
624
624
|
if (e._dur < e.duration())
|
|
625
625
|
for (i = e; i._dp; )
|
|
626
626
|
i.rawTime() >= 0 && i.totalTime(i._tTime), i = i._dp;
|
|
627
|
-
e._zTime = -
|
|
627
|
+
e._zTime = -I;
|
|
628
628
|
}
|
|
629
629
|
}, ye = function(e, t, i, n) {
|
|
630
630
|
return t.parent && ke(t), t._start = H((Ce(i) ? i : i || e !== N ? pe(e, i, t) : e._time) + t._delay), t._end = H(t._start + (t.totalDuration() / Math.abs(t.timeScale()) || 0)), Bn(e, t, "_first", "_last", e._sort ? "_start" : 0), di(t) || (e._recent = t), n || Vn(e, t), e._ts < 0 && Yt(e, e._tTime), e;
|
|
631
631
|
}, Gn = function(e, t) {
|
|
632
632
|
return (ce.ScrollTrigger || Di("scrollTrigger", t)) && ce.ScrollTrigger.create(t, e);
|
|
633
633
|
}, jn = function(e, t, i, n, r) {
|
|
634
|
-
if (
|
|
634
|
+
if (Ii(e, t, r), !e._initted)
|
|
635
635
|
return 1;
|
|
636
636
|
if (!i && e._pt && !X && (e._dur && e.vars.lazy !== !1 || !e._dur && e.vars.lazy) && Un !== oe.frame)
|
|
637
637
|
return Re.push(e), e._lazy = [r, n], 1;
|
|
@@ -643,10 +643,10 @@ var he = {
|
|
|
643
643
|
return t === "isFromStart" || t === "isStart";
|
|
644
644
|
}, cs = function(e, t, i, n) {
|
|
645
645
|
var r = e.ratio, s = t < 0 || !t && (!e._start && hs(e) && !(!e._initted && di(e)) || (e._ts < 0 || e._dp._ts < 0) && !di(e)) ? 0 : 1, o = e._rDelay, l = 0, c, h, u;
|
|
646
|
-
if (o && e._repeat && (l = Dt(0, e._tDur, t), h = ot(l, o), e._yoyo && h & 1 && (s = 1 - s), h !== ot(e._tTime, o) && (r = 1 - s, e.vars.repeatRefresh && e._initted && e.invalidate())), s !== r || X || n || e._zTime ===
|
|
646
|
+
if (o && e._repeat && (l = Dt(0, e._tDur, t), h = ot(l, o), e._yoyo && h & 1 && (s = 1 - s), h !== ot(e._tTime, o) && (r = 1 - s, e.vars.repeatRefresh && e._initted && e.invalidate())), s !== r || X || n || e._zTime === I || !t && e._zTime) {
|
|
647
647
|
if (!e._initted && jn(e, t, n, i, l))
|
|
648
648
|
return;
|
|
649
|
-
for (u = e._zTime, e._zTime = t || (i ?
|
|
649
|
+
for (u = e._zTime, e._zTime = t || (i ? I : 0), i || (i = t && !u), e.ratio = s, e._from && (s = 1 - s), e._time = 0, e._tTime = l, c = e._pt; c; )
|
|
650
650
|
c.r(s, c.d), c = c._next;
|
|
651
651
|
t < 0 && ui(e, t, i, !0), e._onUpdate && !i && le(e, "onUpdate"), l && e._repeat && !i && e.parent && le(e, "onRepeat"), (t >= e._tDur || t < 0) && e.ratio === s && (s && ke(e, 1), !i && !X && (le(e, s ? "onComplete" : "onReverseComplete", !0), e._prom && e._prom()));
|
|
652
652
|
} else e._zTime || (e._zTime = t);
|
|
@@ -684,14 +684,14 @@ var he = {
|
|
|
684
684
|
s.immediateRender = ee(o.immediateRender), e < 2 ? s.runBackwards = 1 : s.startAt = t[r - 1];
|
|
685
685
|
}
|
|
686
686
|
return new j(t[0], s, t[r + 1]);
|
|
687
|
-
},
|
|
687
|
+
}, Ie = function(e, t) {
|
|
688
688
|
return e || e === 0 ? t(e) : t;
|
|
689
689
|
}, Dt = function(e, t, i) {
|
|
690
690
|
return i < e ? e : i > t ? t : i;
|
|
691
691
|
}, W = function(e, t) {
|
|
692
692
|
return !Z(e) || !(t = ts.exec(e)) ? "" : t[1];
|
|
693
693
|
}, ps = function(e, t, i) {
|
|
694
|
-
return
|
|
694
|
+
return Ie(i, function(n) {
|
|
695
695
|
return Dt(e, t, n);
|
|
696
696
|
});
|
|
697
697
|
}, pi = [].slice, Hn = function(e, t) {
|
|
@@ -744,7 +744,7 @@ var he = {
|
|
|
744
744
|
};
|
|
745
745
|
}, Xn = function(e, t) {
|
|
746
746
|
var i = K(e), n, r;
|
|
747
|
-
return !i && ve(e) && (n = i = e.radius || fe, e.values ? (e = me(e.values), (r = !Ce(e[0])) && (n *= n)) : e = mi(e.increment)),
|
|
747
|
+
return !i && ve(e) && (n = i = e.radius || fe, e.values ? (e = me(e.values), (r = !Ce(e[0])) && (n *= n)) : e = mi(e.increment)), Ie(t, i ? V(e) ? function(s) {
|
|
748
748
|
return r = e(s), Math.abs(r - s) <= n ? r : s;
|
|
749
749
|
} : function(s) {
|
|
750
750
|
for (var o = parseFloat(r ? s.x : s), l = parseFloat(r ? s.y : 0), c = fe, h = 0, u = e.length, p, m; u--; )
|
|
@@ -752,7 +752,7 @@ var he = {
|
|
|
752
752
|
return h = !n || c <= n ? e[h] : s, r || h === s || Ce(s) ? h : h + W(s);
|
|
753
753
|
} : mi(e));
|
|
754
754
|
}, Wn = function(e, t, i, n) {
|
|
755
|
-
return
|
|
755
|
+
return Ie(K(e) ? !t : i === !0 ? !!(i = 0) : !n, function() {
|
|
756
756
|
return K(e) ? e[~~(Math.random() * e.length)] : (i = i || 1e-5) && (n = i < 1 ? Math.pow(10, (i + "").length - 2) : 1) && Math.floor(Math.round((e - i / 2 + Math.random() * (t - e + i * 0.99)) / i) * i * n) / n;
|
|
757
757
|
});
|
|
758
758
|
}, ms = function() {
|
|
@@ -770,17 +770,17 @@ var he = {
|
|
|
770
770
|
}, _s = function(e, t, i) {
|
|
771
771
|
return qn(e, t, 0, 1, i);
|
|
772
772
|
}, Kn = function(e, t, i) {
|
|
773
|
-
return
|
|
773
|
+
return Ie(i, function(n) {
|
|
774
774
|
return e[~~t(n)];
|
|
775
775
|
});
|
|
776
776
|
}, ys = function a(e, t, i) {
|
|
777
777
|
var n = t - e;
|
|
778
|
-
return K(e) ? Kn(e, a(0, e.length), t) :
|
|
778
|
+
return K(e) ? Kn(e, a(0, e.length), t) : Ie(i, function(r) {
|
|
779
779
|
return (n + (r - e) % n) % n + e;
|
|
780
780
|
});
|
|
781
781
|
}, xs = function a(e, t, i) {
|
|
782
782
|
var n = t - e, r = n * 2;
|
|
783
|
-
return K(e) ? Kn(e, a(0, e.length - 1), t) :
|
|
783
|
+
return K(e) ? Kn(e, a(0, e.length - 1), t) : Ie(i, function(s) {
|
|
784
784
|
return s = (r + (s - e) % r) % r || 0, e + (s > n ? r - s : s);
|
|
785
785
|
});
|
|
786
786
|
}, wt = function(e) {
|
|
@@ -789,7 +789,7 @@ var he = {
|
|
|
789
789
|
return i + e.substr(t, e.length - t);
|
|
790
790
|
}, qn = function(e, t, i, n, r) {
|
|
791
791
|
var s = t - e, o = n - i;
|
|
792
|
-
return
|
|
792
|
+
return Ie(r, function(l) {
|
|
793
793
|
return i + ((l - e) / s * o || 0);
|
|
794
794
|
});
|
|
795
795
|
}, bs = function a(e, t, i, n) {
|
|
@@ -815,13 +815,13 @@ var he = {
|
|
|
815
815
|
} else n || (e = at(K(e) ? [] : {}, e));
|
|
816
816
|
if (!h) {
|
|
817
817
|
for (l in t)
|
|
818
|
-
|
|
818
|
+
Li.call(o, e, l, "get", t[l]);
|
|
819
819
|
r = function(f) {
|
|
820
820
|
return zi(f, o) || (s ? e.p : e);
|
|
821
821
|
};
|
|
822
822
|
}
|
|
823
823
|
}
|
|
824
|
-
return
|
|
824
|
+
return Ie(i, r);
|
|
825
825
|
}, en = function(e, t, i) {
|
|
826
826
|
var n = e.labels, r = fe, s, o, l;
|
|
827
827
|
for (s in n)
|
|
@@ -841,9 +841,9 @@ var he = {
|
|
|
841
841
|
} : e, r = {
|
|
842
842
|
init: Et,
|
|
843
843
|
render: zi,
|
|
844
|
-
add:
|
|
844
|
+
add: Li,
|
|
845
845
|
kill: Us,
|
|
846
|
-
modifier:
|
|
846
|
+
modifier: Is,
|
|
847
847
|
rawVars: 0
|
|
848
848
|
}, s = {
|
|
849
849
|
targetTest: 0,
|
|
@@ -855,42 +855,42 @@ var he = {
|
|
|
855
855
|
if (ht(), e !== n) {
|
|
856
856
|
if (ae[t])
|
|
857
857
|
return;
|
|
858
|
-
ue(n, ue(Nt(e, r), s)), at(n.prototype, at(r, Nt(e, s))), ae[n.prop = t] = n, e.targetTest && (
|
|
858
|
+
ue(n, ue(Nt(e, r), s)), at(n.prototype, at(r, Nt(e, s))), ae[n.prop = t] = n, e.targetTest && (Lt.push(n), Mi[t] = 1), t = (t === "css" ? "CSS" : t.charAt(0).toUpperCase() + t.substr(1)) + "Plugin";
|
|
859
859
|
}
|
|
860
|
-
|
|
860
|
+
In(t, n), e.register && e.register(re, n, ie);
|
|
861
861
|
} else
|
|
862
862
|
Qn.push(e);
|
|
863
|
-
},
|
|
864
|
-
aqua: [0,
|
|
865
|
-
lime: [0,
|
|
863
|
+
}, L = 255, gt = {
|
|
864
|
+
aqua: [0, L, L],
|
|
865
|
+
lime: [0, L, 0],
|
|
866
866
|
silver: [192, 192, 192],
|
|
867
867
|
black: [0, 0, 0],
|
|
868
868
|
maroon: [128, 0, 0],
|
|
869
869
|
teal: [0, 128, 128],
|
|
870
|
-
blue: [0, 0,
|
|
870
|
+
blue: [0, 0, L],
|
|
871
871
|
navy: [0, 0, 128],
|
|
872
|
-
white: [
|
|
872
|
+
white: [L, L, L],
|
|
873
873
|
olive: [128, 128, 0],
|
|
874
|
-
yellow: [
|
|
875
|
-
orange: [
|
|
874
|
+
yellow: [L, L, 0],
|
|
875
|
+
orange: [L, 165, 0],
|
|
876
876
|
gray: [128, 128, 128],
|
|
877
877
|
purple: [128, 0, 128],
|
|
878
878
|
green: [0, 128, 0],
|
|
879
|
-
red: [
|
|
880
|
-
pink: [
|
|
881
|
-
cyan: [0,
|
|
882
|
-
transparent: [
|
|
879
|
+
red: [L, 0, 0],
|
|
880
|
+
pink: [L, 192, 203],
|
|
881
|
+
cyan: [0, L, L],
|
|
882
|
+
transparent: [L, L, L, 0]
|
|
883
883
|
}, Kt = function(e, t, i) {
|
|
884
|
-
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) *
|
|
884
|
+
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) * L + 0.5 | 0;
|
|
885
885
|
}, er = function(e, t, i) {
|
|
886
|
-
var n = e ? Ce(e) ? [e >> 16, e >> 8 &
|
|
886
|
+
var n = e ? Ce(e) ? [e >> 16, e >> 8 & L, e & L] : 0 : gt.black, r, s, o, l, c, h, u, p, m, f;
|
|
887
887
|
if (!n) {
|
|
888
888
|
if (e.substr(-1) === "," && (e = e.substr(0, e.length - 1)), gt[e])
|
|
889
889
|
n = gt[e];
|
|
890
890
|
else if (e.charAt(0) === "#") {
|
|
891
891
|
if (e.length < 6 && (r = e.charAt(1), s = e.charAt(2), o = e.charAt(3), e = "#" + r + r + s + s + o + o + (e.length === 5 ? e.charAt(4) + e.charAt(4) : "")), e.length === 9)
|
|
892
|
-
return n = parseInt(e.substr(1, 6), 16), [n >> 16, n >> 8 &
|
|
893
|
-
e = parseInt(e.substr(1), 16), n = [e >> 16, e >> 8 &
|
|
892
|
+
return n = parseInt(e.substr(1, 6), 16), [n >> 16, n >> 8 & L, n & L, parseInt(e.substr(7), 16) / 255];
|
|
893
|
+
e = parseInt(e.substr(1), 16), n = [e >> 16, e >> 8 & L, e & L];
|
|
894
894
|
} else if (e.substr(0, 3) === "hsl") {
|
|
895
895
|
if (n = f = e.match(li), !t)
|
|
896
896
|
l = +n[0] % 360 / 360, c = +n[1] / 100, h = +n[2] / 100, s = h <= 0.5 ? h * (c + 1) : h + c - h * c, r = h * 2 - s, n.length > 3 && (n[3] *= 1), n[0] = Kt(l + 1 / 3, r, s), n[1] = Kt(l, r, s), n[2] = Kt(l - 1 / 3, r, s);
|
|
@@ -900,7 +900,7 @@ var he = {
|
|
|
900
900
|
n = e.match(li) || gt.transparent;
|
|
901
901
|
n = n.map(Number);
|
|
902
902
|
}
|
|
903
|
-
return t && !f && (r = n[0] /
|
|
903
|
+
return t && !f && (r = n[0] / L, s = n[1] / L, o = n[2] / L, u = Math.max(r, s, o), p = Math.min(r, s, o), h = (u + p) / 2, u === p ? l = c = 0 : (m = u - p, c = h > 0.5 ? m / (2 - u - p) : m / (u + p), 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] = ~~(c * 100 + 0.5), n[2] = ~~(h * 100 + 0.5)), i && n.length < 4 && (n[3] = 1), n;
|
|
904
904
|
}, tr = function(e) {
|
|
905
905
|
var t = [], i = [], n = -1;
|
|
906
906
|
return e.split(Oe).forEach(function(r) {
|
|
@@ -946,7 +946,7 @@ var he = {
|
|
|
946
946
|
return p / (1e3 / (g || 60));
|
|
947
947
|
},
|
|
948
948
|
wake: function() {
|
|
949
|
-
kn && (!hi && Ai() && (_e = hi = window, Si = _e.document || {}, ce.gsap = re, (_e.gsapVersions || (_e.gsapVersions = [])).push(re.version),
|
|
949
|
+
kn && (!hi && Ai() && (_e = hi = window, Si = _e.document || {}, ce.gsap = re, (_e.gsapVersions || (_e.gsapVersions = [])).push(re.version), Ln(Ft || _e.GreenSockGlobals || !_e.gsap && _e || {}), Qn.forEach(Jn)), h = typeof requestAnimationFrame < "u" && requestAnimationFrame, l && u.sleep(), c = h || function(g) {
|
|
950
950
|
return setTimeout(g, s - u.time * 1e3 + 1 | 0);
|
|
951
951
|
}, Pt = 1, f(2));
|
|
952
952
|
},
|
|
@@ -1066,7 +1066,7 @@ We("Back", Qt("in"), Qt("out"), Qt());
|
|
|
1066
1066
|
S.SteppedEase = S.steps = ce.SteppedEase = {
|
|
1067
1067
|
config: function(e, t) {
|
|
1068
1068
|
e === void 0 && (e = 1);
|
|
1069
|
-
var i = 1 / e, n = e + (t ? 0 : 1), r = t ? 1 : 0, s = 1 -
|
|
1069
|
+
var i = 1 / e, n = e + (t ? 0 : 1), r = t ? 1 : 0, s = 1 - I;
|
|
1070
1070
|
return function(o) {
|
|
1071
1071
|
return ((n * Dt(0, s, o) | 0) + r) * i;
|
|
1072
1072
|
};
|
|
@@ -1098,7 +1098,7 @@ var ar = function(e, t) {
|
|
|
1098
1098
|
r.parent._time !== r._start + (r._ts >= 0 ? r._tTime / r._ts : (r.totalDuration() - r._tTime) / -r._ts) && r.totalTime(r._tTime, !0), r = r.parent;
|
|
1099
1099
|
!this.parent && this._dp.autoRemoveChildren && (this._ts > 0 && i < this._tDur || this._ts < 0 && i > 0 || !this._tDur && !i) && ye(this._dp, this, this._start - this._delay);
|
|
1100
1100
|
}
|
|
1101
|
-
return (this._tTime !== i || !this._dur && !n || this._initted && Math.abs(this._zTime) ===
|
|
1101
|
+
return (this._tTime !== i || !this._dur && !n || this._initted && Math.abs(this._zTime) === I || !i && !this._initted && (this.add || this._ptLookup)) && (this._ts || (this._pTime = i), zn(this, i, n)), this;
|
|
1102
1102
|
}, e.time = function(i, n) {
|
|
1103
1103
|
return arguments.length ? this.totalTime(Math.min(this.totalDuration(), i + Qi(this)) % (this._dur + this._rDelay) || (i ? this._dur : 0), n) : this._time;
|
|
1104
1104
|
}, e.totalProgress = function(i, n) {
|
|
@@ -1110,13 +1110,13 @@ var ar = function(e, t) {
|
|
|
1110
1110
|
return arguments.length ? this.totalTime(this._time + (i - 1) * r, n) : this._repeat ? ot(this._tTime, r) + 1 : 1;
|
|
1111
1111
|
}, e.timeScale = function(i, n) {
|
|
1112
1112
|
if (!arguments.length)
|
|
1113
|
-
return this._rts === -
|
|
1113
|
+
return this._rts === -I ? 0 : this._rts;
|
|
1114
1114
|
if (this._rts === i)
|
|
1115
1115
|
return this;
|
|
1116
1116
|
var r = this.parent && this._ts ? $t(this.parent._time, this) : this._tTime;
|
|
1117
|
-
return this._rts = +i || 0, this._ts = this._ps || i === -
|
|
1117
|
+
return this._rts = +i || 0, this._ts = this._ps || i === -I ? 0 : this._rts, this.totalTime(Dt(-Math.abs(this._delay), this.totalDuration(), r), n !== !1), Ht(this), os(this);
|
|
1118
1118
|
}, e.paused = function(i) {
|
|
1119
|
-
return arguments.length ? (this._ps !== i && (this._ps = i, i ? (this._pTime = this._tTime || Math.max(-this._delay, this.rawTime()), this._ts = this._act = 0) : (ht(), this._ts = this._rts, this.totalTime(this.parent && !this.parent.smoothChildTiming ? this.rawTime() : this._tTime || this._pTime, this.progress() === 1 && Math.abs(this._zTime) !==
|
|
1119
|
+
return arguments.length ? (this._ps !== i && (this._ps = i, i ? (this._pTime = this._tTime || Math.max(-this._delay, this.rawTime()), this._ts = this._act = 0) : (ht(), this._ts = this._rts, this.totalTime(this.parent && !this.parent.smoothChildTiming ? this.rawTime() : this._tTime || this._pTime, this.progress() === 1 && Math.abs(this._zTime) !== I && (this._tTime -= I)))), this) : this._ps;
|
|
1120
1120
|
}, e.startTime = function(i) {
|
|
1121
1121
|
if (arguments.length) {
|
|
1122
1122
|
this._start = i;
|
|
@@ -1150,7 +1150,7 @@ var ar = function(e, t) {
|
|
|
1150
1150
|
}, e.seek = function(i, n) {
|
|
1151
1151
|
return this.totalTime(pe(this, i), ee(n));
|
|
1152
1152
|
}, e.restart = function(i, n) {
|
|
1153
|
-
return this.play().totalTime(i ? -this._delay : 0, ee(n)), this._dur || (this._zTime = -
|
|
1153
|
+
return this.play().totalTime(i ? -this._delay : 0, ee(n)), this._dur || (this._zTime = -I), this;
|
|
1154
1154
|
}, e.play = function(i, n) {
|
|
1155
1155
|
return i != null && this.seek(i, n), this.reversed(!1).paused(!1);
|
|
1156
1156
|
}, e.reverse = function(i, n) {
|
|
@@ -1160,12 +1160,12 @@ var ar = function(e, t) {
|
|
|
1160
1160
|
}, e.resume = function() {
|
|
1161
1161
|
return this.paused(!1);
|
|
1162
1162
|
}, e.reversed = function(i) {
|
|
1163
|
-
return arguments.length ? (!!i !== this.reversed() && this.timeScale(-this._rts || (i ? -
|
|
1163
|
+
return arguments.length ? (!!i !== this.reversed() && this.timeScale(-this._rts || (i ? -I : 0)), this) : this._rts < 0;
|
|
1164
1164
|
}, e.invalidate = function() {
|
|
1165
|
-
return this._initted = this._act = 0, this._zTime = -
|
|
1165
|
+
return this._initted = this._act = 0, this._zTime = -I, this;
|
|
1166
1166
|
}, e.isActive = function() {
|
|
1167
1167
|
var i = this.parent || this._dp, n = this._start, r;
|
|
1168
|
-
return !!(!i || this._ts && this._initted && i.isActive() && (r = i.rawTime(!0)) >= n && r < this.endTime(!0) -
|
|
1168
|
+
return !!(!i || this._ts && this._initted && i.isActive() && (r = i.rawTime(!0)) >= n && r < this.endTime(!0) - I);
|
|
1169
1169
|
}, e.eventCallback = function(i, n, r) {
|
|
1170
1170
|
var s = this.vars;
|
|
1171
1171
|
return arguments.length > 1 ? (n ? (s[i] = n, r && (s[i + "Params"] = r), i === "onUpdate" && (this._onUpdate = n)) : delete s[i], this) : s[i];
|
|
@@ -1197,7 +1197,7 @@ ue(Ct.prototype, {
|
|
|
1197
1197
|
_ts: 1,
|
|
1198
1198
|
_dp: 0,
|
|
1199
1199
|
ratio: 0,
|
|
1200
|
-
_zTime: -
|
|
1200
|
+
_zTime: -I,
|
|
1201
1201
|
_prom: 0,
|
|
1202
1202
|
_ps: !1,
|
|
1203
1203
|
_rts: 1
|
|
@@ -1248,7 +1248,7 @@ var q = /* @__PURE__ */ (function(a) {
|
|
|
1248
1248
|
if (m.parent !== this)
|
|
1249
1249
|
return this.render(n, r, s);
|
|
1250
1250
|
if (m.render(m._ts > 0 ? (p - m._start) * m._ts : (m._dirty ? m.totalDuration() : m._tDur) + (p - m._start) * m._ts, r, s), p !== this._time || !this._ts && !_) {
|
|
1251
|
-
y = 0, f && (h += this._zTime = -
|
|
1251
|
+
y = 0, f && (h += this._zTime = -I);
|
|
1252
1252
|
break;
|
|
1253
1253
|
}
|
|
1254
1254
|
}
|
|
@@ -1261,14 +1261,14 @@ var q = /* @__PURE__ */ (function(a) {
|
|
|
1261
1261
|
if (m.parent !== this)
|
|
1262
1262
|
return this.render(n, r, s);
|
|
1263
1263
|
if (m.render(m._ts > 0 ? (A - m._start) * m._ts : (m._dirty ? m.totalDuration() : m._tDur) + (A - m._start) * m._ts, r, s || X && ki(m)), p !== this._time || !this._ts && !_) {
|
|
1264
|
-
y = 0, f && (h += this._zTime = A ? -
|
|
1264
|
+
y = 0, f && (h += this._zTime = A ? -I : I);
|
|
1265
1265
|
break;
|
|
1266
1266
|
}
|
|
1267
1267
|
}
|
|
1268
1268
|
m = f;
|
|
1269
1269
|
}
|
|
1270
1270
|
}
|
|
1271
|
-
if (y && !r && (this.pause(), y.render(p >= o ? 0 : -
|
|
1271
|
+
if (y && !r && (this.pause(), y.render(p >= o ? 0 : -I)._zTime = p >= o ? 1 : -1, this._ts))
|
|
1272
1272
|
return this._start = b, Ht(this), this.render(n, r, s);
|
|
1273
1273
|
this._onUpdate && !r && le(this, "onUpdate", !0), (h === l && this._tTime >= this.totalDuration() || !h && o) && (b === this._start || Math.abs(x) !== Math.abs(this._ts)) && (this._lock || ((n || !c) && (h === l && this._ts > 0 || !h && this._ts < 0) && ke(this, 1), !r && !(n < 0 && !o) && (h || o || !l) && (le(this, h === l && n >= 0 ? "onComplete" : "onReverseComplete", !0), this._prom && !(h < l && this.timeScale() > 0) && this._prom())));
|
|
1274
1274
|
}
|
|
@@ -1328,7 +1328,7 @@ var q = /* @__PURE__ */ (function(a) {
|
|
|
1328
1328
|
immediateRender: !1,
|
|
1329
1329
|
time: o,
|
|
1330
1330
|
overwrite: "auto",
|
|
1331
|
-
duration: r.duration || Math.abs((o - (c && "time" in c ? c.time : s._time)) / s.timeScale()) ||
|
|
1331
|
+
duration: r.duration || Math.abs((o - (c && "time" in c ? c.time : s._time)) / s.timeScale()) || I,
|
|
1332
1332
|
onStart: function() {
|
|
1333
1333
|
if (s.pause(), !m) {
|
|
1334
1334
|
var g = r.duration || Math.abs((o - (c && "time" in c ? c.time : s._time)) / s.timeScale());
|
|
@@ -1351,7 +1351,7 @@ var q = /* @__PURE__ */ (function(a) {
|
|
|
1351
1351
|
}, t.previousLabel = function(n) {
|
|
1352
1352
|
return n === void 0 && (n = this._time), en(this, pe(this, n), 1);
|
|
1353
1353
|
}, t.currentLabel = function(n) {
|
|
1354
|
-
return arguments.length ? this.seek(n, !0) : this.previousLabel(this._time +
|
|
1354
|
+
return arguments.length ? this.seek(n, !0) : this.previousLabel(this._time + I);
|
|
1355
1355
|
}, t.shiftChildren = function(n, r, s) {
|
|
1356
1356
|
s === void 0 && (s = 0);
|
|
1357
1357
|
for (var o = this._first, l = this.labels, c; o; )
|
|
@@ -1409,11 +1409,11 @@ var As = function(e, t, i, n, r, s, o) {
|
|
|
1409
1409
|
m: m && m < 4 ? Math.round : 0
|
|
1410
1410
|
}, c = Xt.lastIndex);
|
|
1411
1411
|
return l.c = c < n.length ? n.substring(c, n.length) : "", l.fp = o, (Rn.test(n) || _) && (l.e = 0), this._pt = l, l;
|
|
1412
|
-
},
|
|
1412
|
+
}, Li = function(e, t, i, n, r, s, o, l, c, h) {
|
|
1413
1413
|
V(n) && (n = n(r || 0, e, s));
|
|
1414
1414
|
var u = e[t], p = i !== "get" ? i : V(u) ? c ? e[t.indexOf("set") || !V(e["get" + t.substr(3)]) ? t : "get" + t.substr(3)](c) : e[t]() : u, m = V(u) ? c ? Os : cr : Ui, f;
|
|
1415
1415
|
if (Z(n) && (~n.indexOf("random(") && (n = wt(n)), n.charAt(1) === "=" && (f = it(p, n) + (W(p) || 0), (f || f === 0) && (n = f))), !h || p !== n || gi)
|
|
1416
|
-
return !isNaN(p * n) && n !== "" ? (f = new ie(this._pt, e, t, +p || 0, n - (p || 0), typeof u == "boolean" ?
|
|
1416
|
+
return !isNaN(p * n) && n !== "" ? (f = new ie(this._pt, e, t, +p || 0, n - (p || 0), typeof u == "boolean" ? Ls : ur, 0, m), c && (f.fp = c), o && f.modifier(o, this, e), this._pt = f) : (!u && !(t in e) && Di(t, n), As.call(this, e, t, p, n, m, l || he.stringFilter, c));
|
|
1417
1417
|
}, Ss = function(e, t, i, n, r) {
|
|
1418
1418
|
if (V(e) && (e = bt(e, r, t, i, n)), !ve(e) || e.style && e.nodeType || K(e) || Dn(e))
|
|
1419
1419
|
return Z(e) ? bt(e, r, t, i, n) : e;
|
|
@@ -1427,7 +1427,7 @@ var As = function(e, t, i, n, r, s, o) {
|
|
|
1427
1427
|
for (c = i._ptLookup[i._targets.indexOf(r)], h = o._props.length; h--; )
|
|
1428
1428
|
c[o._props[h]] = l;
|
|
1429
1429
|
return o;
|
|
1430
|
-
}, Ae, gi,
|
|
1430
|
+
}, Ae, gi, Ii = function a(e, t, i) {
|
|
1431
1431
|
var n = e.vars, r = n.ease, s = n.startAt, o = n.immediateRender, l = n.lazy, c = n.onUpdate, h = n.runBackwards, u = n.yoyoEase, p = n.keyframes, m = n.autoRevert, f = e._dur, d = e._startAt, g = e._targets, _ = e.parent, y = _ && _.data === "nested" ? _.vars.targets : g, x = e._overwrite === "auto" && !Ci, b = e.timeline, v, P, w, C, E, A, D, T, R, O, B, F, U;
|
|
1432
1432
|
if (b && (!p || !r) && (r = "none"), e._ease = Ye(r, st.ease), e._yEase = u ? nr(Ye(u === !0 ? r : u, st.ease)) : 0, u && e._yoyo && !e._repeat && (u = e._yEase, e._yEase = e._ease, e._ease = u), e._from = !b && !!n.runBackwards, !b || p && !n.stagger) {
|
|
1433
1433
|
if (T = g[0] ? je(g[0]).harness : 0, F = T && n[T.prop], v = Nt(n, Mi), d && (d._zTime < 0 && d.progress(1), t < 0 && h && o && !m ? d.render(-1, !0) : d.revert(h && f ? kt : is), d._lazy = 0), s) {
|
|
@@ -1459,7 +1459,7 @@ var As = function(e, t, i, n, r, s, o) {
|
|
|
1459
1459
|
parent: _
|
|
1460
1460
|
//ensures that nested tweens that had a stagger are handled properly, like gsap.from(".class", {y: gsap.utils.wrap([-100,100]), stagger: 0.5})
|
|
1461
1461
|
}, v), F && (w[T.prop] = F), ke(e._startAt = j.set(g, w)), e._startAt._dp = 0, e._startAt._sat = e, t < 0 && (X ? e._startAt.revert(kt) : e._startAt.render(-1, !0)), e._zTime = t, !o)
|
|
1462
|
-
a(e._startAt,
|
|
1462
|
+
a(e._startAt, I, I);
|
|
1463
1463
|
else if (!t)
|
|
1464
1464
|
return;
|
|
1465
1465
|
}
|
|
@@ -1468,7 +1468,7 @@ var As = function(e, t, i, n, r, s, o) {
|
|
|
1468
1468
|
O[Q] = C;
|
|
1469
1469
|
}), R.priority && (A = 1)), !T || F)
|
|
1470
1470
|
for (w in v)
|
|
1471
|
-
ae[w] && (R = or(w, v, e, B, E, y)) ? R.priority && (A = 1) : O[w] = C =
|
|
1471
|
+
ae[w] && (R = or(w, v, e, B, E, y)) ? R.priority && (A = 1) : O[w] = C = Li.call(e, E, w, "get", v[w], B, y, 0, n.stringFilter);
|
|
1472
1472
|
e._op && e._op[P] && e.kill(E, e._op[P]), x && e._pt && (Ae = e, N.killTweensOf(E, O, e.globalTime(t)), U = !e.parent, Ae = 0), e._pt && l && (ci[D.id] = 1);
|
|
1473
1473
|
}
|
|
1474
1474
|
A && pr(e), e._onInit && e._onInit(e);
|
|
@@ -1482,7 +1482,7 @@ var As = function(e, t, i, n, r, s, o) {
|
|
|
1482
1482
|
for (h = h.d._pt; h && h.p !== t && h.fp !== t; )
|
|
1483
1483
|
h = h._next;
|
|
1484
1484
|
if (!h)
|
|
1485
|
-
return gi = 1, e.vars[t] = "+=0",
|
|
1485
|
+
return gi = 1, e.vars[t] = "+=0", Ii(e, o), gi = 0, l ? vt(t + " not eligible for reset") : 1;
|
|
1486
1486
|
c.push(h);
|
|
1487
1487
|
}
|
|
1488
1488
|
for (m = c.length; m--; )
|
|
@@ -1567,11 +1567,11 @@ var j = /* @__PURE__ */ (function(a) {
|
|
|
1567
1567
|
c || o.duration(c = b.duration());
|
|
1568
1568
|
} else
|
|
1569
1569
|
o.timeline = 0;
|
|
1570
|
-
return m === !0 && !Ci && (Ae = we(o), N.killTweensOf(x), Ae = 0), ye(y, we(o), r), n.reversed && o.reverse(), n.paused && o.paused(!0), (u || !c && !f && o._start === H(y._time) && ee(u) && ls(we(o)) && y.data !== "nested") && (o._tTime = -
|
|
1570
|
+
return m === !0 && !Ci && (Ae = we(o), N.killTweensOf(x), Ae = 0), ye(y, we(o), r), n.reversed && o.reverse(), n.paused && o.paused(!0), (u || !c && !f && o._start === H(y._time) && ee(u) && ls(we(o)) && y.data !== "nested") && (o._tTime = -I, o.render(Math.max(0, -h) || 0)), g && Gn(we(o), g), o;
|
|
1571
1571
|
}
|
|
1572
1572
|
var t = e.prototype;
|
|
1573
1573
|
return t.render = function(n, r, s) {
|
|
1574
|
-
var o = this._time, l = this._tDur, c = this._dur, h = n < 0, u = n > l -
|
|
1574
|
+
var o = this._time, l = this._tDur, c = this._dur, h = n < 0, u = n > l - I && !h ? l : n < I ? 0 : n, p, m, f, d, g, _, y, x, b;
|
|
1575
1575
|
if (!c)
|
|
1576
1576
|
cs(this, n, r, s);
|
|
1577
1577
|
else if (u !== this._tTime || !n || s || !this._initted && this._tTime || this._startAt && this._zTime < 0 !== h || this._lazy) {
|
|
@@ -1604,7 +1604,7 @@ var j = /* @__PURE__ */ (function(a) {
|
|
|
1604
1604
|
}, t.resetTo = function(n, r, s, o, l) {
|
|
1605
1605
|
Pt || oe.wake(), this._ts || this.play();
|
|
1606
1606
|
var c = Math.min(this._dur, (this._dp._time - this._start) * this._ts), h;
|
|
1607
|
-
return this._initted ||
|
|
1607
|
+
return this._initted || Ii(this, c), h = this._ease(c / this._dur), Ds(this, n, r, s, o, h, c, l) ? this.resetTo(n, r, s, o, 1) : (Yt(this, 0), this.parent || Bn(this._dp, this, "_first", "_last", this._dp._sort ? "_start" : 0), this.render(0));
|
|
1608
1608
|
}, t.kill = function(n, r) {
|
|
1609
1609
|
if (r === void 0 && (r = "all"), !n && (!r || r === "all"))
|
|
1610
1610
|
return this._lazy = this._pt = 0, this.parent ? mt(this) : this.scrollTrigger && this.scrollTrigger.kill(!!X), this;
|
|
@@ -1673,7 +1673,7 @@ var Ui = function(e, t, i) {
|
|
|
1673
1673
|
return V(e[t]) ? cr : Ti(e[t]) && e.setAttribute ? ks : Ui;
|
|
1674
1674
|
}, ur = function(e, t) {
|
|
1675
1675
|
return t.set(t.t, t.p, Math.round((t.s + t.c * e) * 1e6) / 1e6, t);
|
|
1676
|
-
},
|
|
1676
|
+
}, Ls = function(e, t) {
|
|
1677
1677
|
return t.set(t.t, t.p, !!(t.s + t.c * e), t);
|
|
1678
1678
|
}, dr = function(e, t) {
|
|
1679
1679
|
var i = t._pt, n = "";
|
|
@@ -1690,7 +1690,7 @@ var Ui = function(e, t, i) {
|
|
|
1690
1690
|
}, zi = function(e, t) {
|
|
1691
1691
|
for (var i = t._pt; i; )
|
|
1692
1692
|
i.r(e, i.d), i = i._next;
|
|
1693
|
-
},
|
|
1693
|
+
}, Is = function(e, t, i, n) {
|
|
1694
1694
|
for (var r = this._pt, s; r; )
|
|
1695
1695
|
s = r._next, r.p === n && r.modifier(e, t, i), r = s;
|
|
1696
1696
|
}, Us = function(e) {
|
|
@@ -1728,8 +1728,8 @@ N = new q({
|
|
|
1728
1728
|
smoothChildTiming: !0
|
|
1729
1729
|
});
|
|
1730
1730
|
he.stringFilter = ir;
|
|
1731
|
-
var Ze = [],
|
|
1732
|
-
return (
|
|
1731
|
+
var Ze = [], It = {}, zs = [], nn = 0, Ns = 0, Jt = function(e) {
|
|
1732
|
+
return (It[e] || zs).map(function(t) {
|
|
1733
1733
|
return t();
|
|
1734
1734
|
});
|
|
1735
1735
|
}, _i = function() {
|
|
@@ -1916,11 +1916,11 @@ var Ze = [], Lt = {}, zs = [], nn = 0, Ns = 0, Jt = function(e) {
|
|
|
1916
1916
|
}) || _i();
|
|
1917
1917
|
},
|
|
1918
1918
|
addEventListener: function(e, t) {
|
|
1919
|
-
var i =
|
|
1919
|
+
var i = It[e] || (It[e] = []);
|
|
1920
1920
|
~i.indexOf(t) || i.push(t);
|
|
1921
1921
|
},
|
|
1922
1922
|
removeEventListener: function(e, t) {
|
|
1923
|
-
var i =
|
|
1923
|
+
var i = It[e], n = i && i.indexOf(t);
|
|
1924
1924
|
n >= 0 && i.splice(n, 1);
|
|
1925
1925
|
},
|
|
1926
1926
|
utils: {
|
|
@@ -1941,7 +1941,7 @@ var Ze = [], Lt = {}, zs = [], nn = 0, Ns = 0, Jt = function(e) {
|
|
|
1941
1941
|
interpolate: bs,
|
|
1942
1942
|
shuffle: Yn
|
|
1943
1943
|
},
|
|
1944
|
-
install:
|
|
1944
|
+
install: Ln,
|
|
1945
1945
|
effects: Wt,
|
|
1946
1946
|
ticker: oe,
|
|
1947
1947
|
updateRoot: q.updateRoot,
|
|
@@ -1949,7 +1949,7 @@ var Ze = [], Lt = {}, zs = [], nn = 0, Ns = 0, Jt = function(e) {
|
|
|
1949
1949
|
globalTimeline: N,
|
|
1950
1950
|
core: {
|
|
1951
1951
|
PropTween: ie,
|
|
1952
|
-
globals:
|
|
1952
|
+
globals: In,
|
|
1953
1953
|
Tween: j,
|
|
1954
1954
|
Timeline: q,
|
|
1955
1955
|
Animation: Ct,
|
|
@@ -2173,7 +2173,7 @@ var rn, Se, nt, Ni, Ve, sn, $i, Gs = function() {
|
|
|
2173
2173
|
}, na = {
|
|
2174
2174
|
grid: 1,
|
|
2175
2175
|
flex: 1
|
|
2176
|
-
},
|
|
2176
|
+
}, Le = function a(e, t, i, n) {
|
|
2177
2177
|
var r = parseFloat(i) || 0, s = (i + "").trim().substr((r + "").length) || "px", o = Ve.style, l = js.test(t), c = e.tagName.toLowerCase() === "svg", h = (c ? "client" : "offset") + (l ? "Width" : "Height"), u = 100, p = n === "px", m = n === "%", f, d, g, _;
|
|
2178
2178
|
if (n === s || !r || cn[n] || cn[s])
|
|
2179
2179
|
return r;
|
|
@@ -2189,7 +2189,7 @@ var rn, Se, nt, Ni, Ve, sn, $i, Gs = function() {
|
|
|
2189
2189
|
return l && m && (g = je(d), g.time = oe.time, g.width = d[h]), G(p ? f * r / u : f && r ? u / f * r : 0);
|
|
2190
2190
|
}, Pe = function(e, t, i, n) {
|
|
2191
2191
|
var r;
|
|
2192
|
-
return Ni || bi(), t in xe && t !== "transform" && (t = xe[t], ~t.indexOf(",") && (t = t.split(",")[0])), Te[t] && t !== "transform" ? (r = At(e, n), r = t !== "transformOrigin" ? r[t] : r.svg ? r.origin : Gt(ge(e, ne)) + " " + r.zOrigin + "px") : (r = e.style[t], (!r || r === "auto" || n || ~(r + "").indexOf("calc(")) && (r = Vt[t] && Vt[t](e, t, i) || ge(e, t) || Fn(e, t) || (t === "opacity" ? 1 : 0))), i && !~(r + "").trim().indexOf(" ") ?
|
|
2192
|
+
return Ni || bi(), t in xe && t !== "transform" && (t = xe[t], ~t.indexOf(",") && (t = t.split(",")[0])), Te[t] && t !== "transform" ? (r = At(e, n), r = t !== "transformOrigin" ? r[t] : r.svg ? r.origin : Gt(ge(e, ne)) + " " + r.zOrigin + "px") : (r = e.style[t], (!r || r === "auto" || n || ~(r + "").indexOf("calc(")) && (r = Vt[t] && Vt[t](e, t, i) || ge(e, t) || Fn(e, t) || (t === "opacity" ? 1 : 0))), i && !~(r + "").trim().indexOf(" ") ? Le(e, t, r, i) + i : r;
|
|
2193
2193
|
}, ra = function(e, t, i, n) {
|
|
2194
2194
|
if (!i || i === "none") {
|
|
2195
2195
|
var r = ct(t, e, 1), s = r && ge(e, r, 1);
|
|
@@ -2198,7 +2198,7 @@ var rn, Se, nt, Ni, Ve, sn, $i, Gs = function() {
|
|
|
2198
2198
|
var o = new ie(this._pt, e.style, t, 0, 1, dr), l = 0, c = 0, h, u, p, m, f, d, g, _, y, x, b, v;
|
|
2199
2199
|
if (o.b = i, o.e = n, i += "", n += "", n.substring(0, 6) === "var(--" && (n = ge(e, n.substring(4, n.indexOf(")")))), n === "auto" && (d = e.style[t], e.style[t] = n, n = ge(e, t) || n, d ? e.style[t] = d : Xe(e, t)), h = [i, n], ir(h), i = h[0], n = h[1], p = i.match(Je) || [], v = n.match(Je) || [], v.length) {
|
|
2200
2200
|
for (; u = Je.exec(n); )
|
|
2201
|
-
g = u[0], y = n.substring(l, u.index), f ? f = (f + 1) % 5 : (y.substr(-5) === "rgba(" || y.substr(-5) === "hsla(") && (f = 1), g !== (d = p[c++] || "") && (m = parseFloat(d) || 0, b = d.substr((m + "").length), g.charAt(1) === "=" && (g = it(m, g) + b), _ = parseFloat(g), x = g.substr((_ + "").length), l = Je.lastIndex - x.length, x || (x = x || he.units[t] || b, l === n.length && (n += x, o.e += x)), b !== x && (m =
|
|
2201
|
+
g = u[0], y = n.substring(l, u.index), f ? f = (f + 1) % 5 : (y.substr(-5) === "rgba(" || y.substr(-5) === "hsla(") && (f = 1), g !== (d = p[c++] || "") && (m = parseFloat(d) || 0, b = d.substr((m + "").length), g.charAt(1) === "=" && (g = it(m, g) + b), _ = parseFloat(g), x = g.substr((_ + "").length), l = Je.lastIndex - x.length, x || (x = x || he.units[t] || b, l === n.length && (n += x, o.e += x)), b !== x && (m = Le(e, t, d, x) || 0), o._pt = {
|
|
2202
2202
|
_next: o._pt,
|
|
2203
2203
|
p: y || c === 1 ? y : ",",
|
|
2204
2204
|
//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.
|
|
@@ -2320,7 +2320,7 @@ var rn, Se, nt, Ni, Ve, sn, $i, Gs = function() {
|
|
|
2320
2320
|
return (e = e.split(" "))[0] + " " + e[1];
|
|
2321
2321
|
}, ti = function(e, t, i) {
|
|
2322
2322
|
var n = W(t);
|
|
2323
|
-
return G(parseFloat(t) + parseFloat(
|
|
2323
|
+
return G(parseFloat(t) + parseFloat(Le(e, "x", i + "px", n))) + n;
|
|
2324
2324
|
}, oa = function(e, t) {
|
|
2325
2325
|
t.z = "0px", t.rotationY = t.rotationX = "0deg", t.force3D = 0, Pr(e, t);
|
|
2326
2326
|
}, ze = "0deg", ft = "0px", Ne = ") ", Pr = function(e, t) {
|
|
@@ -2332,7 +2332,7 @@ var rn, Se, nt, Ni, Ve, sn, $i, Gs = function() {
|
|
|
2332
2332
|
g !== ft && (b += "perspective(" + g + Ne), (n || r) && (b += "translate(" + n + "%, " + r + "%) "), (v || s !== ft || o !== ft || l !== ft) && (b += l !== ft || v ? "translate3d(" + s + ", " + o + ", " + l + ") " : "translate(" + s + ", " + o + Ne), c !== ze && (b += "rotate(" + c + Ne), h !== ze && (b += "rotateY(" + h + Ne), u !== ze && (b += "rotateX(" + u + Ne), (p !== ze || m !== ze) && (b += "skew(" + p + ", " + m + Ne), (f !== 1 || d !== 1) && (b += "scale(" + f + ", " + d + Ne), y.style[$] = b || "translate(0, 0)";
|
|
2333
2333
|
}, la = function(e, t) {
|
|
2334
2334
|
var i = t || this, n = i.xPercent, r = i.yPercent, s = i.x, o = i.y, l = i.rotation, c = i.skewX, h = i.skewY, u = i.scaleX, p = i.scaleY, m = i.target, f = i.xOrigin, d = i.yOrigin, g = i.xOffset, _ = i.yOffset, y = i.forceCSS, x = parseFloat(s), b = parseFloat(o), v, P, w, C, E;
|
|
2335
|
-
l = parseFloat(l), c = parseFloat(c), h = parseFloat(h), h && (h = parseFloat(h), c += h, l += h), l || c ? (l *= rt, c *= rt, v = Math.cos(l) * u, P = Math.sin(l) * u, w = Math.sin(l - c) * -p, C = Math.cos(l - c) * p, c && (h *= rt, E = Math.tan(c - h), E = Math.sqrt(1 + E * E), w *= E, C *= E, h && (E = Math.tan(h), E = Math.sqrt(1 + E * E), v *= E, P *= E)), v = G(v), P = G(P), w = G(w), C = G(C)) : (v = u, C = p, P = w = 0), (x && !~(s + "").indexOf("px") || b && !~(o + "").indexOf("px")) && (x =
|
|
2335
|
+
l = parseFloat(l), c = parseFloat(c), h = parseFloat(h), h && (h = parseFloat(h), c += h, l += h), l || c ? (l *= rt, c *= rt, v = Math.cos(l) * u, P = Math.sin(l) * u, w = Math.sin(l - c) * -p, C = Math.cos(l - c) * p, c && (h *= rt, E = Math.tan(c - h), E = Math.sqrt(1 + E * E), w *= E, C *= E, h && (E = Math.tan(h), E = Math.sqrt(1 + E * E), v *= E, P *= E)), v = G(v), P = G(P), w = G(w), C = G(C)) : (v = u, C = p, P = w = 0), (x && !~(s + "").indexOf("px") || b && !~(o + "").indexOf("px")) && (x = Le(m, "x", s, "px"), b = Le(m, "y", o, "px")), (f || d || g || _) && (x = G(x + f - (f * v + d * w) + g), b = G(b + d - (f * P + d * C) + _)), (n || r) && (E = m.getBBox(), x = G(x + n / 100 * E.width), b = G(b + r / 100 * E.height)), E = "matrix(" + v + "," + P + "," + w + "," + C + "," + x + "," + b + ")", m.setAttribute("transform", E), y && (m.style[$] = E);
|
|
2336
2336
|
}, ha = function(e, t, i, n, r) {
|
|
2337
2337
|
var s = 360, o = Z(r), l = parseFloat(r) * (o && ~r.indexOf("rad") ? $e : 1), c = l - n, h = n + c + "deg", u, p;
|
|
2338
2338
|
return o && (u = r.split("_")[1], u === "short" && (c %= s, c !== c % (s / 2) && (c += c < 0 ? s : -s)), u === "cw" && c < 0 ? c = (c + s * an) % s - ~~(c / s) * s : u === "ccw" && c > 0 && (c = (c - s * an) % s - ~~(c / s) * s)), e._pt = p = new ie(e._pt, t, i, n, c, Ys), p.e = h, p.u = "deg", e._props.push(i), p;
|
|
@@ -2344,7 +2344,7 @@ var rn, Se, nt, Ni, Ve, sn, $i, Gs = function() {
|
|
|
2344
2344
|
var n = pn({}, i._gsap), r = "perspective,force3D,transformOrigin,svgOrigin", s = i.style, o, l, c, h, u, p, m, f;
|
|
2345
2345
|
n.svg ? (c = i.getAttribute("transform"), i.setAttribute("transform", ""), s[$] = t, o = At(i, 1), Xe(i, $), i.setAttribute("transform", c)) : (c = getComputedStyle(i)[$], s[$] = t, o = At(i, 1), s[$] = c);
|
|
2346
2346
|
for (l in Te)
|
|
2347
|
-
c = n[l], h = o[l], c !== h && r.indexOf(l) < 0 && (m = W(c), f = W(h), u = m !== f ?
|
|
2347
|
+
c = n[l], h = o[l], c !== h && r.indexOf(l) < 0 && (m = W(c), f = W(h), u = m !== f ? Le(i, l, c, f) : parseFloat(c), p = parseFloat(h), e._pt = new ie(e._pt, o, l, u, p - u, yi), e._pt.u = f || 0, e._props.push(l));
|
|
2348
2348
|
pn(o, n);
|
|
2349
2349
|
};
|
|
2350
2350
|
te("padding,margin,Width,Radius", function(a, e) {
|
|
@@ -2376,7 +2376,7 @@ var Cr = {
|
|
|
2376
2376
|
if (m = typeof h, f = Vt[d], m === "function" && (h = h.call(i, n, e, r), m = typeof h), m === "string" && ~h.indexOf("random(") && (h = wt(h)), f)
|
|
2377
2377
|
f(this, e, d, h, i) && (w = 1);
|
|
2378
2378
|
else if (d.substr(0, 2) === "--")
|
|
2379
|
-
c = (getComputedStyle(e).getPropertyValue(d) + "").trim(), h += "", Oe.lastIndex = 0, Oe.test(c) || (g = W(c), _ = W(h)), _ ? g !== _ && (c =
|
|
2379
|
+
c = (getComputedStyle(e).getPropertyValue(d) + "").trim(), h += "", Oe.lastIndex = 0, Oe.test(c) || (g = W(c), _ = W(h)), _ ? g !== _ && (c = Le(e, d, c, _) + _) : g && (h += g), this.add(o, "setProperty", c, h, n, r, 0, 0, d), s.push(d), C.push(d, 0, o[d]);
|
|
2380
2380
|
else if (m !== "undefined") {
|
|
2381
2381
|
if (l && d in l ? (c = typeof l[d] == "function" ? l[d].call(i, n, e, r) : l[d], Z(c) && ~c.indexOf("random(") && (c = wt(c)), W(c + "") || c === "auto" || (c += he.units[d] || W(Pe(e, d)) || ""), (c + "").charAt(1) === "=" && (c = Pe(e, d))) : c = Pe(e, d), p = parseFloat(c), y = m === "string" && h.charAt(1) === "=" && h.substr(0, 2), y && (h = h.substr(2)), u = parseFloat(h), d in xe && (d === "autoAlpha" && (p === 1 && Pe(e, "visibility") === "hidden" && u && (p = 0), C.push("visibility", 0, o.visibility), De(this, o, "visibility", p ? "inherit" : "hidden", u ? "inherit" : "hidden", !u)), d !== "scale" && d !== "transform" && (d = xe[d], ~d.indexOf(",") && (d = d.split(",")[0]))), x = d in Te, x) {
|
|
2382
2382
|
if (this.styles.save(d), m === "string" && h.substring(0, 6) === "var(--" && (h = ge(e, h.substring(4, h.indexOf(")"))), u = parseFloat(h)), b || (v = e._gsap, v.renderTransform && !t.parseTransform || At(e, t.parseTransform), P = t.smoothOrigin !== !1 && v.smooth, b = this._pt = new ie(this._pt, o, $, 0, 1, v.renderTransform, v, 0, -1), b.dep = 1), d === "scale")
|
|
@@ -2402,7 +2402,7 @@ var Cr = {
|
|
|
2402
2402
|
}
|
|
2403
2403
|
} else d in o || (d = ct(d) || d);
|
|
2404
2404
|
if (x || (u || u === 0) && (p || p === 0) && !Hs.test(h) && d in o)
|
|
2405
|
-
g = (c + "").substr((p + "").length), u || (u = 0), _ = W(h) || (d in he.units ? he.units[d] : g), g !== _ && (p =
|
|
2405
|
+
g = (c + "").substr((p + "").length), u || (u = 0), _ = W(h) || (d in he.units ? he.units[d] : g), g !== _ && (p = Le(e, d, c, _)), this._pt = new ie(this._pt, x ? v : o, d, p, (y ? it(p, y + u) : u) - p, !x && (_ === "px" || d === "zIndex") && t.autoRound !== !1 ? Xs : yi), this._pt.u = _ || 0, g !== _ && _ !== "%" && (this._pt.b = c, this._pt.r = Zs);
|
|
2406
2406
|
else if (d in o)
|
|
2407
2407
|
ra.call(this, e, d, c, y ? y + h : h);
|
|
2408
2408
|
else if (d in e)
|
|
@@ -4104,6 +4104,7 @@ class Ra {
|
|
|
4104
4104
|
visible = !1;
|
|
4105
4105
|
constructor() {
|
|
4106
4106
|
this.container = document.createElement("div"), this.container.id = "legend", this.container.innerHTML = `
|
|
4107
|
+
<div class="legend-hint">Press G to toggle globe/flat</div>
|
|
4107
4108
|
<div class="legend-title"></div>
|
|
4108
4109
|
<div class="legend-gradient"></div>
|
|
4109
4110
|
<div class="legend-labels">
|
|
@@ -4166,6 +4167,14 @@ class Ra {
|
|
|
4166
4167
|
color: #888;
|
|
4167
4168
|
font-style: italic;
|
|
4168
4169
|
}
|
|
4170
|
+
|
|
4171
|
+
.legend-hint {
|
|
4172
|
+
font-size: 10px;
|
|
4173
|
+
color: #666;
|
|
4174
|
+
margin-bottom: 8px;
|
|
4175
|
+
padding-bottom: 6px;
|
|
4176
|
+
border-bottom: 1px solid rgba(100, 150, 200, 0.2);
|
|
4177
|
+
}
|
|
4169
4178
|
`, document.head.appendChild(e);
|
|
4170
4179
|
}
|
|
4171
4180
|
show(e) {
|
|
@@ -4213,7 +4222,7 @@ function Ar(a = 256) {
|
|
|
4213
4222
|
}
|
|
4214
4223
|
}
|
|
4215
4224
|
var si = 12, gn = 5003, ka = [0, 1, 3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047, 4095, 8191, 16383, 32767, 65535];
|
|
4216
|
-
function
|
|
4225
|
+
function La(a, e, t, i, n = Ar(512), r = new Uint8Array(256), s = new Int32Array(gn), o = new Int32Array(gn)) {
|
|
4217
4226
|
let l = s.length, c = Math.max(2, i);
|
|
4218
4227
|
r.fill(0), o.fill(0), s.fill(-1);
|
|
4219
4228
|
let h = 0, u = 0, p = c + 1, m = p, f = !1, d = m, g = (1 << d) - 1, _ = 1 << p - 1, y = _ + 1, x = _ + 2, b = 0, v = t[0], P = 0;
|
|
@@ -4243,7 +4252,7 @@ function Ia(a, e, t, i, n = Ar(512), r = new Uint8Array(256), s = new Int32Array
|
|
|
4243
4252
|
}
|
|
4244
4253
|
}
|
|
4245
4254
|
}
|
|
4246
|
-
var
|
|
4255
|
+
var Ia = La;
|
|
4247
4256
|
function Sr(a, e, t) {
|
|
4248
4257
|
return a << 8 & 63488 | e << 2 & 992 | t >> 3;
|
|
4249
4258
|
}
|
|
@@ -4446,7 +4455,7 @@ function Ya(a, e, t, i) {
|
|
|
4446
4455
|
} else a.writeByte(0);
|
|
4447
4456
|
}
|
|
4448
4457
|
function Za(a, e, t, i, n = 8, r, s, o) {
|
|
4449
|
-
|
|
4458
|
+
Ia(t, i, e, n, a, r, s, o);
|
|
4450
4459
|
}
|
|
4451
4460
|
function Me(a, e) {
|
|
4452
4461
|
a.writeByte(e & 255), a.writeByte(e >> 8 & 255);
|
|
@@ -5724,7 +5733,7 @@ class uo {
|
|
|
5724
5733
|
}
|
|
5725
5734
|
async init() {
|
|
5726
5735
|
const e = this.config.width || this.container.clientWidth || 800, t = this.config.height || this.container.clientHeight || 600;
|
|
5727
|
-
this.scene = new M.Scene(), this.scene.background = new M.Color(2066), this.camera = new M.PerspectiveCamera(50, e / t, 1, 1e3), this.camera.position.set(0, 0, this.config.initialView === "flat" ? 350 : 150), this.renderer = new M.WebGLRenderer({ antialias: !0 }), this.renderer.setSize(e, t), this.renderer.setPixelRatio(Math.min(window.devicePixelRatio, 2)), this.container.appendChild(this.renderer.domElement), this.controls = new zr(this.camera, this.renderer.domElement), this.controls.enableDamping = !0, this.controls.minDistance = 80, this.controls.maxDistance = 400, this.choropleth = new Ma(), this.config.showLegend && (this.legend = new Ra()), await this.createGlobe(), this.createStars(), this.config.effects.atmosphere && this.createAtmosphere(), this.countryLabels = new no(this.container, Be), this.scene.add(this.countryLabels.getGroup()), this.globe && this.countryLabels.setGlobe(this.globe), this.countryLabels.setCamera(this.camera), this.countryLabels.setStyle(this.config.labels), this.exporter = new Xa(this.renderer, this.scene, this.camera), this.config.showControls && this.createGUI(), await this.choropleth.waitForLoad(), typeof this.config.statistic == "string" && this.setStatistic(this.config.statistic), this.morph = this.config.initialView === "globe" ? 1 : 0, this.material && (this.material.uniforms.uMorph.value = this.morph), this.countryLabels?.setMorph(this.morph), window.addEventListener("resize", this.handleResize), this.animate();
|
|
5736
|
+
this.scene = new M.Scene(), this.scene.background = new M.Color(2066), this.camera = new M.PerspectiveCamera(50, e / t, 1, 1e3), this.camera.position.set(0, 0, this.config.initialView === "flat" ? 350 : 150), this.renderer = new M.WebGLRenderer({ antialias: !0 }), this.renderer.setSize(e, t), this.renderer.setPixelRatio(Math.min(window.devicePixelRatio, 2)), this.container.appendChild(this.renderer.domElement), this.controls = new zr(this.camera, this.renderer.domElement), this.controls.enableDamping = !0, this.controls.minDistance = 80, this.controls.maxDistance = 400, this.choropleth = new Ma(), this.config.showLegend && (this.legend = new Ra()), await this.createGlobe(), this.createStars(), this.config.effects.atmosphere && this.createAtmosphere(), this.countryLabels = new no(this.container, Be), this.scene.add(this.countryLabels.getGroup()), this.globe && this.countryLabels.setGlobe(this.globe), this.countryLabels.setCamera(this.camera), this.countryLabels.setStyle(this.config.labels), this.exporter = new Xa(this.renderer, this.scene, this.camera), this.config.showControls && this.createGUI(), await this.choropleth.waitForLoad(), typeof this.config.statistic == "string" && this.setStatistic(this.config.statistic), this.morph = this.config.initialView === "globe" ? 1 : 0, this.material && (this.material.uniforms.uMorph.value = this.morph), this.countryLabels?.setMorph(this.morph), window.addEventListener("resize", this.handleResize), window.addEventListener("keydown", this.handleKeydown), this.animate();
|
|
5728
5737
|
}
|
|
5729
5738
|
async createGlobe() {
|
|
5730
5739
|
const e = await this.textureLoader.loadAsync(
|
|
@@ -5837,6 +5846,9 @@ class uo {
|
|
|
5837
5846
|
const e = this.config.width || this.container.clientWidth, t = this.config.height || this.container.clientHeight;
|
|
5838
5847
|
this.camera.aspect = e / t, this.camera.updateProjectionMatrix(), this.renderer.setSize(e, t), this.countryLabels?.resize(e, t);
|
|
5839
5848
|
};
|
|
5849
|
+
handleKeydown = (e) => {
|
|
5850
|
+
this.isDestroyed || (e.key === "g" || e.key === "G") && (this.morph > 0.5 ? this.toFlat() : this.toGlobe());
|
|
5851
|
+
};
|
|
5840
5852
|
animate = () => {
|
|
5841
5853
|
if (this.isDestroyed) return;
|
|
5842
5854
|
this.animationId = requestAnimationFrame(this.animate);
|
|
@@ -5935,7 +5947,7 @@ class uo {
|
|
|
5935
5947
|
this.config.width = e, this.config.height = t, this.handleResize();
|
|
5936
5948
|
}
|
|
5937
5949
|
destroy() {
|
|
5938
|
-
this.isDestroyed = !0, this.animationId && cancelAnimationFrame(this.animationId), window.removeEventListener("resize", this.handleResize), this.gui?.destroy(), this.legend?.dispose(), this.countryLabels?.dispose(), this.globe?.geometry.dispose(), this.globe?.material?.dispose(), this.atmosphere?.geometry.dispose(), this.atmosphere?.material?.dispose(), this.stars?.geometry.dispose(), this.stars?.material?.dispose(), this.renderer.dispose(), this.container.removeChild(this.renderer.domElement);
|
|
5950
|
+
this.isDestroyed = !0, this.animationId && cancelAnimationFrame(this.animationId), window.removeEventListener("resize", this.handleResize), window.removeEventListener("keydown", this.handleKeydown), this.gui?.destroy(), this.legend?.dispose(), this.countryLabels?.dispose(), this.globe?.geometry.dispose(), this.globe?.material?.dispose(), this.atmosphere?.geometry.dispose(), this.atmosphere?.material?.dispose(), this.stars?.geometry.dispose(), this.stars?.material?.dispose(), this.renderer.dispose(), this.container.removeChild(this.renderer.domElement);
|
|
5939
5951
|
}
|
|
5940
5952
|
}
|
|
5941
5953
|
export {
|